streamlit 1.52.0__py3-none-any.whl → 1.52.1__py3-none-any.whl

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 (93) hide show
  1. streamlit/static/index.html +1 -1
  2. streamlit/static/manifest.json +284 -284
  3. streamlit/static/static/js/{ErrorOutline.esm.ZJDbmVTx.js → ErrorOutline.esm.sMJdFExW.js} +1 -1
  4. streamlit/static/static/js/{FileDownload.esm.Dx0vI3vH.js → FileDownload.esm.CV-WYqBn.js} +1 -1
  5. streamlit/static/static/js/{FileHelper.B7Ero7qQ.js → FileHelper.5nCh9KDY.js} +1 -1
  6. streamlit/static/static/js/{FormClearHelper.CG2XN1_g.js → FormClearHelper.-9RbsnV0.js} +1 -1
  7. streamlit/static/static/js/{InputInstructions.Cj5-1zf6.js → InputInstructions.2R3tBtW9.js} +1 -1
  8. streamlit/static/static/js/{Particles.BfWfv0Aw.js → Particles.DDHoXFxh.js} +1 -1
  9. streamlit/static/static/js/{ProgressBar.CGQ8OgfO.js → ProgressBar.BxmfHxKu.js} +1 -1
  10. streamlit/static/static/js/{StreamlitSyntaxHighlighter.DTKLpwhl.js → StreamlitSyntaxHighlighter.BFWV0oqR.js} +1 -1
  11. streamlit/static/static/js/{Toolbar.B2qFUmd9.js → Toolbar.DMgU0Vgw.js} +1 -1
  12. streamlit/static/static/js/{base-input.o9tL8MDP.js → base-input.BXTqYbyG.js} +1 -1
  13. streamlit/static/static/js/{checkbox.0BeV1IBL.js → checkbox.5xWaqPqm.js} +1 -1
  14. streamlit/static/static/js/{createSuper.RBO59fEm.js → createSuper.OIgV8wc-.js} +1 -1
  15. streamlit/static/static/js/{data-grid-overlay-editor.CiTkUy0t.js → data-grid-overlay-editor.B4RIu9cw.js} +1 -1
  16. streamlit/static/static/js/{downloader.DwNZg3Mw.js → downloader.DwCJck8O.js} +1 -1
  17. streamlit/static/static/js/{embed.XT9xNd3F.js → embed.HKcgTiLB.js} +1 -1
  18. streamlit/static/static/js/{es6.x9KsYQg-.js → es6.4AP97RGk.js} +2 -2
  19. streamlit/static/static/js/{iframeResizer.contentWindow.ZVXpMPi0.js → iframeResizer.contentWindow.BZAsvL9q.js} +1 -1
  20. streamlit/static/static/js/{index.BxjzhVUb.js → index.-3selq_5.js} +1 -1
  21. streamlit/static/static/js/{index.AnXMIBz3.js → index.1ylynMAS.js} +1 -1
  22. streamlit/static/static/js/{index.hbeqcRTn.js → index.6UunrySF.js} +1 -1
  23. streamlit/static/static/js/{index.BfEKaEmw.js → index.B0TPxAZ1.js} +1 -1
  24. streamlit/static/static/js/{index.BQr-XwGV.js → index.BHWBaOWH.js} +1 -1
  25. streamlit/static/static/js/{index.CF5MxTbK.js → index.BJas6XzW.js} +1 -1
  26. streamlit/static/static/js/{index.B527JZdO.js → index.BKIlG7Ng.js} +1 -1
  27. streamlit/static/static/js/{index.5VPOamri.js → index.BMU6zZRk.js} +1 -1
  28. streamlit/static/static/js/{index.DO5utP74.js → index.BNMLO-0p.js} +1 -1
  29. streamlit/static/static/js/{index.DS7lf09n.js → index.BPmBNTel.js} +1 -1
  30. streamlit/static/static/js/{index.q5hIQwAY.js → index.BVuohWM1.js} +1 -1
  31. streamlit/static/static/js/{index.uSX757_v.js → index.B_AvdOKC.js} +1 -1
  32. streamlit/static/static/js/{index.RJZuWCGA.js → index.BjQIH-3U.js} +1 -1
  33. streamlit/static/static/js/{index.CyroQtI4.js → index.BrqtKtSu.js} +1 -1
  34. streamlit/static/static/js/{index.C_rK-Swb.js → index.Buc7XrOl.js} +5 -5
  35. streamlit/static/static/js/{index.DBalctjj.js → index.CIC9pLsG.js} +1 -1
  36. streamlit/static/static/js/{index.BTtmaLDB.js → index.CP2YZ73v.js} +1 -1
  37. streamlit/static/static/js/{index.DpNTZz82.js → index.CSbah0y4.js} +1 -1
  38. streamlit/static/static/js/{index.BWB_91TA.js → index.CbiYVMT1.js} +1 -1
  39. streamlit/static/static/js/{index.BHgV-yW4.js → index.CbxllBj8.js} +1 -1
  40. streamlit/static/static/js/{index.D6HmkoDm.js → index.Cd1D2eGF.js} +1 -1
  41. streamlit/static/static/js/{index.CuvXOyER.js → index.Ckcqwai8.js} +1 -1
  42. streamlit/static/static/js/{index.DMxc2XFp.js → index.CqTPbV5Y.js} +5 -5
  43. streamlit/static/static/js/{index.x_QRaLMd.js → index.CxXo5UKy.js} +1 -1
  44. streamlit/static/static/js/{index.rORSX6IW.js → index.CxbL5FgL.js} +1 -1
  45. streamlit/static/static/js/{index.CLmq_z9K.js → index.D52dMvK5.js} +1 -1
  46. streamlit/static/static/js/{index.Bjy4NRu9.js → index.DBUdji-9.js} +1 -1
  47. streamlit/static/static/js/{index.BuCx76ZV.js → index.DMU3coc2.js} +1 -1
  48. streamlit/static/static/js/{index.DsgAU5lc.js → index.DN4sfQLP.js} +1 -1
  49. streamlit/static/static/js/{index.KfXqjDYy.js → index.DRDE9rnx.js} +1 -1
  50. streamlit/static/static/js/{index.CyUHWoCC.js → index.DY9Ac89e.js} +1 -1
  51. streamlit/static/static/js/{index.BfXjTO8b.js → index.DYKCsDvl.js} +1 -1
  52. streamlit/static/static/js/{index.DXxnU5ej.js → index.Da9gznCC.js} +1 -1
  53. streamlit/static/static/js/{index.CjozwSzS.js → index.DfIRibXG.js} +1 -1
  54. streamlit/static/static/js/{index.CTgm_-jO.js → index.Dg5zbEp2.js} +1 -1
  55. streamlit/static/static/js/{index.Dr9HIhQw.js → index.Di9I2cid.js} +1 -1
  56. streamlit/static/static/js/{index.Bu5JWpT_.js → index.DkpEv0uV.js} +1 -1
  57. streamlit/static/static/js/{index.PaidgjCs.js → index.DwJ9Vhsl.js} +1 -1
  58. streamlit/static/static/js/{index.DWexTVLY.js → index.L7erTnMm.js} +1 -1
  59. streamlit/static/static/js/{index.CkGVt6-G.js → index.NaDyAN1s.js} +1 -1
  60. streamlit/static/static/js/{index.DlltaH7J.js → index.RNTPpVde.js} +1 -1
  61. streamlit/static/static/js/{index.DB_w_CZQ.js → index.VFDFuf_7.js} +1 -1
  62. streamlit/static/static/js/{index.By55VdPY.js → index.W-bl3NDo.js} +1 -1
  63. streamlit/static/static/js/{index.CNH4rdSz.js → index.XYozEjwK.js} +1 -1
  64. streamlit/static/static/js/{index.DAqCNvsO.js → index.oyLQ4pue.js} +1 -1
  65. streamlit/static/static/js/{index.DK0RFJUG.js → index.q4fLUQtC.js} +1 -1
  66. streamlit/static/static/js/{index.DcU3uDvB.js → index.q9puCQgK.js} +1 -1
  67. streamlit/static/static/js/{index.B1fRb5wF.js → index.xZBTXGNC.js} +1 -1
  68. streamlit/static/static/js/{input.D5oh9-aB.js → input.CcvrgErO.js} +1 -1
  69. streamlit/static/static/js/{main.q9oGOg0H.js → main.eVHOp4Th.js} +1 -1
  70. streamlit/static/static/js/{memory.5kCSFUJS.js → memory.Ck_sLv5Y.js} +1 -1
  71. streamlit/static/static/js/{number-overlay-editor.Cn_LsK8N.js → number-overlay-editor.DgcLMWOy.js} +1 -1
  72. streamlit/static/static/js/{pandasStylerUtils.BqhXt51_.js → pandasStylerUtils.DqP0h70z.js} +1 -1
  73. streamlit/static/static/js/{possibleConstructorReturn.DD9NK1Z8.js → possibleConstructorReturn.C_51n46K.js} +1 -1
  74. streamlit/static/static/js/{sandbox.DACSyz29.js → sandbox.Q-g3QIZJ.js} +1 -1
  75. streamlit/static/static/js/{styled-components.C3R090At.js → styled-components.e0V96rJw.js} +1 -1
  76. streamlit/static/static/js/{throttle.B0GR3Iyz.js → throttle.D3b5WILl.js} +1 -1
  77. streamlit/static/static/js/{timepicker.BdhzPxrv.js → timepicker.Bpn70xGc.js} +1 -1
  78. streamlit/static/static/js/{toConsumableArray.Db2pdqM2.js → toConsumableArray.DIN_ys1J.js} +1 -1
  79. streamlit/static/static/js/uniqueId.B27POWT6.js +1 -0
  80. streamlit/static/static/js/{useBasicWidgetState.Bfp6TnSw.js → useBasicWidgetState.DA3_qaXD.js} +1 -1
  81. streamlit/static/static/js/{useIntlLocale.hRV75Xgj.js → useIntlLocale.BSq6SANa.js} +1 -1
  82. streamlit/static/static/js/{useTextInputAutoExpand.QepX7n8Y.js → useTextInputAutoExpand.ytEW5QmA.js} +1 -1
  83. streamlit/static/static/js/{useUpdateUiValue.DHx8TzX6.js → useUpdateUiValue.DOxWBNiI.js} +1 -1
  84. streamlit/static/static/js/{useWaveformController.WxVzpzEX.js → useWaveformController.BCmk6WLk.js} +1 -1
  85. streamlit/static/static/js/{withCalculatedWidth.DcKeRSWJ.js → withCalculatedWidth.ChdrMItN.js} +1 -1
  86. streamlit/static/static/js/{withFullScreenWrapper.CrHddARq.js → withFullScreenWrapper.7j_lzlaF.js} +1 -1
  87. {streamlit-1.52.0.dist-info → streamlit-1.52.1.dist-info}/METADATA +1 -1
  88. {streamlit-1.52.0.dist-info → streamlit-1.52.1.dist-info}/RECORD +92 -92
  89. streamlit/static/static/js/uniqueId.CtqIr-Yh.js +0 -1
  90. {streamlit-1.52.0.data → streamlit-1.52.1.data}/scripts/streamlit.cmd +0 -0
  91. {streamlit-1.52.0.dist-info → streamlit-1.52.1.dist-info}/WHEEL +0 -0
  92. {streamlit-1.52.0.dist-info → streamlit-1.52.1.dist-info}/entry_points.txt +0 -0
  93. {streamlit-1.52.0.dist-info → streamlit-1.52.1.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.D6HmkoDm.js","./index.CLmq_z9K.js","./index.DO5utP74.js","./index.By55VdPY.js","./index.CjozwSzS.js","./index.RJZuWCGA.js","./pandasStylerUtils.BqhXt51_.js","./moment.C3j7ZXd7.js","./_baseIndexOf.BTknn6Gb.js","./index.DAqCNvsO.js","./withFullScreenWrapper.CrHddARq.js","./Toolbar.B2qFUmd9.js","./index.C_rK-Swb.js","./FormClearHelper.CG2XN1_g.js","./sprintf.D7DtBTRn.js","./index.8HslT92O.js","./main.q9oGOg0H.js","./throttle.B0GR3Iyz.js","./checkbox.0BeV1IBL.js","./createDownloadLinkElement.ZaXNnPK4.js","./toConsumableArray.Db2pdqM2.js","./possibleConstructorReturn.DD9NK1Z8.js","./createSuper.RBO59fEm.js","./FileDownload.esm.Dx0vI3vH.js","./_arrayIncludes.B19Iyn2B.js","../css/index.DgR7E2CV.css","./embed.XT9xNd3F.js","./threshold.Q1mXg5rX.js","./value.B4vHRSi7.js","./timer.C2hYhUse.js","./index.rORSX6IW.js","./Particles.BfWfv0Aw.js","./index.CTgm_-jO.js","./useBasicWidgetState.Bfp6TnSw.js","../css/index.DzuxGC_t.css","./index.B527JZdO.js","./index.Dr9HIhQw.js","./IFrameUtil.DefezniK.js","./index.BfEKaEmw.js","./index.DBalctjj.js","./index.DB_w_CZQ.js","./index.hbeqcRTn.js","./index.DS7lf09n.js","./ProgressBar.CGQ8OgfO.js","./index.AnXMIBz3.js","./index.BWB_91TA.js","./useWaveformController.WxVzpzEX.js","./urls.BwSlolu9.js","./index.CyroQtI4.js","./index.DK0RFJUG.js","./withCalculatedWidth.DcKeRSWJ.js","./index.BHgV-yW4.js","./UploadFileInfo.C-jY39rj.js","./index.PaidgjCs.js","./FileHelper.B7Ero7qQ.js","./InputInstructions.Cj5-1zf6.js","./useTextInputAutoExpand.QepX7n8Y.js","./base-input.o9tL8MDP.js","./inputUtils.CptNuJwn.js","./ErrorOutline.esm.ZJDbmVTx.js","./index.DlltaH7J.js","./index.DpNTZz82.js","./index.CF5MxTbK.js","./useIntlLocale.hRV75Xgj.js","./timepicker.BdhzPxrv.js","./input.D5oh9-aB.js","./index.CNH4rdSz.js","./styled-components.C3R090At.js","./index.BTtmaLDB.js","./index.B1fRb5wF.js","./index.BQr-XwGV.js","./index.BuCx76ZV.js","./index.Bu5JWpT_.js","./uniqueId.CtqIr-Yh.js","./index.CyUHWoCC.js","./index.KfXqjDYy.js","./index.CuvXOyER.js","./index.BfXjTO8b.js","./useUpdateUiValue.DHx8TzX6.js","./index.x_QRaLMd.js","./index.Bjy4NRu9.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.Cd1D2eGF.js","./index.D52dMvK5.js","./index.BNMLO-0p.js","./index.W-bl3NDo.js","./index.DfIRibXG.js","./index.BjQIH-3U.js","./pandasStylerUtils.DqP0h70z.js","./moment.C3j7ZXd7.js","./_baseIndexOf.BTknn6Gb.js","./index.oyLQ4pue.js","./withFullScreenWrapper.7j_lzlaF.js","./Toolbar.DMgU0Vgw.js","./index.Buc7XrOl.js","./FormClearHelper.-9RbsnV0.js","./sprintf.D7DtBTRn.js","./index.8HslT92O.js","./main.eVHOp4Th.js","./throttle.D3b5WILl.js","./checkbox.5xWaqPqm.js","./createDownloadLinkElement.ZaXNnPK4.js","./toConsumableArray.DIN_ys1J.js","./possibleConstructorReturn.C_51n46K.js","./createSuper.OIgV8wc-.js","./FileDownload.esm.CV-WYqBn.js","./_arrayIncludes.B19Iyn2B.js","../css/index.DgR7E2CV.css","./embed.HKcgTiLB.js","./threshold.Q1mXg5rX.js","./value.B4vHRSi7.js","./timer.C2hYhUse.js","./index.CxbL5FgL.js","./Particles.DDHoXFxh.js","./index.Dg5zbEp2.js","./useBasicWidgetState.DA3_qaXD.js","../css/index.DzuxGC_t.css","./index.BKIlG7Ng.js","./index.Di9I2cid.js","./IFrameUtil.DefezniK.js","./index.B0TPxAZ1.js","./index.CIC9pLsG.js","./index.VFDFuf_7.js","./index.6UunrySF.js","./index.BPmBNTel.js","./ProgressBar.BxmfHxKu.js","./index.1ylynMAS.js","./index.CbiYVMT1.js","./useWaveformController.BCmk6WLk.js","./urls.BwSlolu9.js","./index.BrqtKtSu.js","./index.q4fLUQtC.js","./withCalculatedWidth.ChdrMItN.js","./index.CbxllBj8.js","./UploadFileInfo.C-jY39rj.js","./index.DwJ9Vhsl.js","./FileHelper.5nCh9KDY.js","./InputInstructions.2R3tBtW9.js","./useTextInputAutoExpand.ytEW5QmA.js","./base-input.BXTqYbyG.js","./inputUtils.CptNuJwn.js","./ErrorOutline.esm.sMJdFExW.js","./index.RNTPpVde.js","./index.CSbah0y4.js","./index.BJas6XzW.js","./useIntlLocale.BSq6SANa.js","./timepicker.Bpn70xGc.js","./input.CcvrgErO.js","./index.XYozEjwK.js","./styled-components.e0V96rJw.js","./index.CP2YZ73v.js","./index.xZBTXGNC.js","./index.BHWBaOWH.js","./index.DMU3coc2.js","./index.DkpEv0uV.js","./uniqueId.B27POWT6.js","./index.DY9Ac89e.js","./index.DRDE9rnx.js","./index.Ckcqwai8.js","./index.DYKCsDvl.js","./useUpdateUiValue.DOxWBNiI.js","./index.CxXo5UKy.js","./index.DBUdji-9.js"])))=>i.map(i=>d[i]);
2
2
  function _mergeNamespaces(n,o){for(var e=0;e<o.length;e++){const t=o[e];if(typeof t!="string"&&!Array.isArray(t)){for(const c in t)if(c!=="default"&&!(c in n)){const p=Object.getOwnPropertyDescriptor(t,c);p&&Object.defineProperty(n,c,p.get?p:{enumerable:!0,get:()=>t[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))t(c);new MutationObserver(c=>{for(const p of c)if(p.type==="childList")for(const h of p.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&t(h)}).observe(document,{childList:!0,subtree:!0});function e(c){const p={};return c.integrity&&(p.integrity=c.integrity),c.referrerPolicy&&(p.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?p.credentials="include":c.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function t(c){if(c.ep)return;c.ep=!0;const p=e(c);fetch(c.href,p)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function getAugmentedNamespace(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var o=n.default;if(typeof o=="function"){var e=function t(){var c=!1;try{c=this instanceof t}catch{}return c?Reflect.construct(o,arguments,this.constructor):o.apply(this,arguments)};e.prototype=o.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(t){var c=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,c.get?c:{enumerable:!0,get:function(){return n[t]}})}),e}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};var hasRequiredReact_production_min;function requireReact_production_min(){if(hasRequiredReact_production_min)return react_production_min;hasRequiredReact_production_min=1;var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),t=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),$=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),A=Symbol.iterator;function N(We){return We===null||typeof We!="object"?null:(We=A&&We[A]||We["@@iterator"],typeof We=="function"?We:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z=Object.assign,X={};function be(We,tt,Ve){this.props=We,this.context=tt,this.refs=X,this.updater=Ve||H}be.prototype.isReactComponent={},be.prototype.setState=function(We,tt){if(typeof We!="object"&&typeof We!="function"&&We!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,We,tt,"setState")},be.prototype.forceUpdate=function(We){this.updater.enqueueForceUpdate(this,We,"forceUpdate")};function we(){}we.prototype=be.prototype;function $e(We,tt,Ve){this.props=We,this.context=tt,this.refs=X,this.updater=Ve||H}var Ce=$e.prototype=new we;Ce.constructor=$e,Z(Ce,be.prototype),Ce.isPureReactComponent=!0;var Ie=Array.isArray,Ne=Object.prototype.hasOwnProperty,Fe={current:null},Be={key:!0,ref:!0,__self:!0,__source:!0};function Ge(We,tt,Ve){var vt,xt={},Qe=null,St=null;if(tt!=null)for(vt in tt.ref!==void 0&&(St=tt.ref),tt.key!==void 0&&(Qe=""+tt.key),tt)Ne.call(tt,vt)&&!Be.hasOwnProperty(vt)&&(xt[vt]=tt[vt]);var pt=arguments.length-2;if(pt===1)xt.children=Ve;else if(1<pt){for(var wt=Array(pt),Ft=0;Ft<pt;Ft++)wt[Ft]=arguments[Ft+2];xt.children=wt}if(We&&We.defaultProps)for(vt in pt=We.defaultProps,pt)xt[vt]===void 0&&(xt[vt]=pt[vt]);return{$$typeof:n,type:We,key:Qe,ref:St,props:xt,_owner:Fe.current}}function je(We,tt){return{$$typeof:n,type:We.type,key:tt,ref:We.ref,props:We.props,_owner:We._owner}}function De(We){return typeof We=="object"&&We!==null&&We.$$typeof===n}function Ue(We){var tt={"=":"=0",":":"=2"};return"$"+We.replace(/[=:]/g,function(Ve){return tt[Ve]})}var Je=/\/+/g;function Xe(We,tt){return typeof We=="object"&&We!==null&&We.key!=null?Ue(""+We.key):tt.toString(36)}function Ke(We,tt,Ve,vt,xt){var Qe=typeof We;(Qe==="undefined"||Qe==="boolean")&&(We=null);var St=!1;if(We===null)St=!0;else switch(Qe){case"string":case"number":St=!0;break;case"object":switch(We.$$typeof){case n:case o:St=!0}}if(St)return St=We,xt=xt(St),We=vt===""?"."+Xe(St,0):vt,Ie(xt)?(Ve="",We!=null&&(Ve=We.replace(Je,"$&/")+"/"),Ke(xt,tt,Ve,"",function(Ft){return Ft})):xt!=null&&(De(xt)&&(xt=je(xt,Ve+(!xt.key||St&&St.key===xt.key?"":(""+xt.key).replace(Je,"$&/")+"/")+We)),tt.push(xt)),1;if(St=0,vt=vt===""?".":vt+":",Ie(We))for(var pt=0;pt<We.length;pt++){Qe=We[pt];var wt=vt+Xe(Qe,pt);St+=Ke(Qe,tt,Ve,wt,xt)}else if(wt=N(We),typeof wt=="function")for(We=wt.call(We),pt=0;!(Qe=We.next()).done;)Qe=Qe.value,wt=vt+Xe(Qe,pt++),St+=Ke(Qe,tt,Ve,wt,xt);else if(Qe==="object")throw tt=String(We),Error("Objects are not valid as a React child (found: "+(tt==="[object Object]"?"object with keys {"+Object.keys(We).join(", ")+"}":tt)+"). If you meant to render a collection of children, use an array instead.");return St}function ze(We,tt,Ve){if(We==null)return We;var vt=[],xt=0;return Ke(We,vt,"","",function(Qe){return tt.call(Ve,Qe,xt++)}),vt}function nt(We){if(We._status===-1){var tt=We._result;tt=tt(),tt.then(function(Ve){(We._status===0||We._status===-1)&&(We._status=1,We._result=Ve)},function(Ve){(We._status===0||We._status===-1)&&(We._status=2,We._result=Ve)}),We._status===-1&&(We._status=0,We._result=tt)}if(We._status===1)return We._result.default;throw We._result}var ct={current:null},at={transition:null},dt={ReactCurrentDispatcher:ct,ReactCurrentBatchConfig:at,ReactCurrentOwner:Fe};function Me(){throw Error("act(...) is not supported in production builds of React.")}return react_production_min.Children={map:ze,forEach:function(We,tt,Ve){ze(We,function(){tt.apply(this,arguments)},Ve)},count:function(We){var tt=0;return ze(We,function(){tt++}),tt},toArray:function(We){return ze(We,function(tt){return tt})||[]},only:function(We){if(!De(We))throw Error("React.Children.only expected to receive a single React element child.");return We}},react_production_min.Component=be,react_production_min.Fragment=e,react_production_min.Profiler=c,react_production_min.PureComponent=$e,react_production_min.StrictMode=t,react_production_min.Suspense=g,react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dt,react_production_min.act=Me,react_production_min.cloneElement=function(We,tt,Ve){if(We==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+We+".");var vt=Z({},We.props),xt=We.key,Qe=We.ref,St=We._owner;if(tt!=null){if(tt.ref!==void 0&&(Qe=tt.ref,St=Fe.current),tt.key!==void 0&&(xt=""+tt.key),We.type&&We.type.defaultProps)var pt=We.type.defaultProps;for(wt in tt)Ne.call(tt,wt)&&!Be.hasOwnProperty(wt)&&(vt[wt]=tt[wt]===void 0&&pt!==void 0?pt[wt]:tt[wt])}var wt=arguments.length-2;if(wt===1)vt.children=Ve;else if(1<wt){pt=Array(wt);for(var Ft=0;Ft<wt;Ft++)pt[Ft]=arguments[Ft+2];vt.children=pt}return{$$typeof:n,type:We.type,key:xt,ref:Qe,props:vt,_owner:St}},react_production_min.createContext=function(We){return We={$$typeof:h,_currentValue:We,_currentValue2:We,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},We.Provider={$$typeof:p,_context:We},We.Consumer=We},react_production_min.createElement=Ge,react_production_min.createFactory=function(We){var tt=Ge.bind(null,We);return tt.type=We,tt},react_production_min.createRef=function(){return{current:null}},react_production_min.forwardRef=function(We){return{$$typeof:y,render:We}},react_production_min.isValidElement=De,react_production_min.lazy=function(We){return{$$typeof:E,_payload:{_status:-1,_result:We},_init:nt}},react_production_min.memo=function(We,tt){return{$$typeof:$,type:We,compare:tt===void 0?null:tt}},react_production_min.startTransition=function(We){var tt=at.transition;at.transition={};try{We()}finally{at.transition=tt}},react_production_min.unstable_act=Me,react_production_min.useCallback=function(We,tt){return ct.current.useCallback(We,tt)},react_production_min.useContext=function(We){return ct.current.useContext(We)},react_production_min.useDebugValue=function(){},react_production_min.useDeferredValue=function(We){return ct.current.useDeferredValue(We)},react_production_min.useEffect=function(We,tt){return ct.current.useEffect(We,tt)},react_production_min.useId=function(){return ct.current.useId()},react_production_min.useImperativeHandle=function(We,tt,Ve){return ct.current.useImperativeHandle(We,tt,Ve)},react_production_min.useInsertionEffect=function(We,tt){return ct.current.useInsertionEffect(We,tt)},react_production_min.useLayoutEffect=function(We,tt){return ct.current.useLayoutEffect(We,tt)},react_production_min.useMemo=function(We,tt){return ct.current.useMemo(We,tt)},react_production_min.useReducer=function(We,tt,Ve){return ct.current.useReducer(We,tt,Ve)},react_production_min.useRef=function(We){return ct.current.useRef(We)},react_production_min.useState=function(We){return ct.current.useState(We)},react_production_min.useSyncExternalStore=function(We,tt,Ve){return ct.current.useSyncExternalStore(We,tt,Ve)},react_production_min.useTransition=function(){return ct.current.useTransition()},react_production_min.version="18.3.1",react_production_min}var hasRequiredReact;function requireReact(){return hasRequiredReact||(hasRequiredReact=1,react.exports=requireReact_production_min()),react.exports}var hasRequiredReactJsxRuntime_production_min;function requireReactJsxRuntime_production_min(){if(hasRequiredReactJsxRuntime_production_min)return reactJsxRuntime_production_min;hasRequiredReactJsxRuntime_production_min=1;var n=requireReact(),o=Symbol.for("react.element"),e=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function h(y,g,$){var E,A={},N=null,H=null;$!==void 0&&(N=""+$),g.key!==void 0&&(N=""+g.key),g.ref!==void 0&&(H=g.ref);for(E in g)t.call(g,E)&&!p.hasOwnProperty(E)&&(A[E]=g[E]);if(y&&y.defaultProps)for(E in g=y.defaultProps,g)A[E]===void 0&&(A[E]=g[E]);return{$$typeof:o,type:y,key:N,ref:H,props:A,_owner:c.current}}return reactJsxRuntime_production_min.Fragment=e,reactJsxRuntime_production_min.jsx=h,reactJsxRuntime_production_min.jsxs=h,reactJsxRuntime_production_min}var hasRequiredJsxRuntime;function requireJsxRuntime(){return hasRequiredJsxRuntime||(hasRequiredJsxRuntime=1,jsxRuntime.exports=requireReactJsxRuntime_production_min()),jsxRuntime.exports}var jsxRuntimeExports=requireJsxRuntime(),reactExports=requireReact();const React=getDefaultExportFromCjs(reactExports),React$1=_mergeNamespaces({__proto__:null,default:React},[reactExports]);function sheetForTag(n){if(n.sheet)return n.sheet;for(var o=0;o<document.styleSheets.length;o++)if(document.styleSheets[o].ownerNode===n)return document.styleSheets[o]}function createStyleElement(n){var o=document.createElement("style");return o.setAttribute("data-emotion",n.key),n.nonce!==void 0&&o.setAttribute("nonce",n.nonce),o.appendChild(document.createTextNode("")),o.setAttribute("data-s",""),o}var StyleSheet=function(){function n(e){var t=this;this._insertTag=function(c){var p;t.tags.length===0?t.insertionPoint?p=t.insertionPoint.nextSibling:t.prepend?p=t.container.firstChild:p=t.before:p=t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(c,p),t.tags.push(c)},this.isSpeedy=e.speedy===void 0?!0:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var o=n.prototype;return o.hydrate=function(t){t.forEach(this._insertTag)},o.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(createStyleElement(this));var c=this.tags[this.tags.length-1];if(this.isSpeedy){var p=sheetForTag(c);try{p.insertRule(t,p.cssRules.length)}catch{}}else c.appendChild(document.createTextNode(t));this.ctr++},o.flush=function(){this.tags.forEach(function(t){var c;return(c=t.parentNode)==null?void 0:c.removeChild(t)}),this.tags=[],this.ctr=0},n}(),MS="-ms-",MOZ="-moz-",WEBKIT="-webkit-",COMMENT="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs=Math.abs,from=String.fromCharCode,assign$1=Object.assign;function hash$1(n,o){return charat(n,0)^45?(((o<<2^charat(n,0))<<2^charat(n,1))<<2^charat(n,2))<<2^charat(n,3):0}function trim(n){return n.trim()}function match(n,o){return(n=o.exec(n))?n[0]:n}function replace$1(n,o,e){return n.replace(o,e)}function indexof(n,o){return n.indexOf(o)}function charat(n,o){return n.charCodeAt(o)|0}function substr(n,o,e){return n.slice(o,e)}function strlen(n){return n.length}function sizeof(n){return n.length}function append(n,o){return o.push(n),n}function combine(n,o){return n.map(o).join("")}var line=1,column=1,length=0,position$3=0,character=0,characters="";function node$1(n,o,e,t,c,p,h){return{value:n,root:o,parent:e,type:t,props:c,children:p,line,column,length:h,return:""}}function copy(n,o){return assign$1(node$1("",null,null,"",null,null,0),n,{length:-n.length},o)}function char(){return character}function prev(){return character=position$3>0?charat(characters,--position$3):0,column--,character===10&&(column=1,line--),character}function next(){return character=position$3<length?charat(characters,position$3++):0,column++,character===10&&(column=1,line++),character}function peek$1(){return charat(characters,position$3)}function caret(){return position$3}function slice(n,o){return substr(characters,n,o)}function token(n){switch(n){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(n){return line=column=1,length=strlen(characters=n),position$3=0,[]}function dealloc(n){return characters="",n}function delimit(n){return trim(slice(position$3-1,delimiter(n===91?n+2:n===40?n+1:n)))}function whitespace$1(n){for(;(character=peek$1())&&character<33;)next();return token(n)>2||token(character)>3?"":" "}function escaping(n,o){for(;--o&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(n,caret()+(o<6&&peek$1()==32&&next()==32))}function delimiter(n){for(;next();)switch(character){case n:return position$3;case 34:case 39:n!==34&&n!==39&&delimiter(character);break;case 40:n===41&&delimiter(n);break;case 92:next();break}return position$3}function commenter(n,o){for(;next()&&n+character!==57;)if(n+character===84&&peek$1()===47)break;return"/*"+slice(o,position$3-1)+"*"+from(n===47?n:next())}function identifier(n){for(;!token(peek$1());)next();return slice(n,position$3)}function compile(n){return dealloc(parse$3("",null,null,null,[""],n=alloc(n),0,[0],n))}function parse$3(n,o,e,t,c,p,h,y,g){for(var $=0,E=0,A=h,N=0,H=0,Z=0,X=1,be=1,we=1,$e=0,Ce="",Ie=c,Ne=p,Fe=t,Be=Ce;be;)switch(Z=$e,$e=next()){case 40:if(Z!=108&&charat(Be,A-1)==58){indexof(Be+=replace$1(delimit($e),"&","&\f"),"&\f")!=-1&&(we=-1);break}case 34:case 39:case 91:Be+=delimit($e);break;case 9:case 10:case 13:case 32:Be+=whitespace$1(Z);break;case 92:Be+=escaping(caret()-1,7);continue;case 47:switch(peek$1()){case 42:case 47:append(comment(commenter(next(),caret()),o,e),g);break;default:Be+="/"}break;case 123*X:y[$++]=strlen(Be)*we;case 125*X:case 59:case 0:switch($e){case 0:case 125:be=0;case 59+E:we==-1&&(Be=replace$1(Be,/\f/g,"")),H>0&&strlen(Be)-A&&append(H>32?declaration(Be+";",t,e,A-1):declaration(replace$1(Be," ","")+";",t,e,A-2),g);break;case 59:Be+=";";default:if(append(Fe=ruleset(Be,o,e,$,E,c,y,Ce,Ie=[],Ne=[],A),p),$e===123)if(E===0)parse$3(Be,o,Fe,Fe,Ie,p,A,y,Ne);else switch(N===99&&charat(Be,3)===110?100:N){case 100:case 108:case 109:case 115:parse$3(n,Fe,Fe,t&&append(ruleset(n,Fe,Fe,0,0,c,y,Ce,c,Ie=[],A),Ne),c,Ne,A,y,t?Ie:Ne);break;default:parse$3(Be,Fe,Fe,Fe,[""],Ne,0,y,Ne)}}$=E=H=0,X=we=1,Ce=Be="",A=h;break;case 58:A=1+strlen(Be),H=Z;default:if(X<1){if($e==123)--X;else if($e==125&&X++==0&&prev()==125)continue}switch(Be+=from($e),$e*X){case 38:we=E>0?1:(Be+="\f",-1);break;case 44:y[$++]=(strlen(Be)-1)*we,we=1;break;case 64:peek$1()===45&&(Be+=delimit(next())),N=peek$1(),E=A=strlen(Ce=Be+=identifier(caret())),$e++;break;case 45:Z===45&&strlen(Be)==2&&(X=0)}}return p}function ruleset(n,o,e,t,c,p,h,y,g,$,E){for(var A=c-1,N=c===0?p:[""],H=sizeof(N),Z=0,X=0,be=0;Z<t;++Z)for(var we=0,$e=substr(n,A+1,A=abs(X=h[Z])),Ce=n;we<H;++we)(Ce=trim(X>0?N[we]+" "+$e:replace$1($e,/&\f/g,N[we])))&&(g[be++]=Ce);return node$1(n,o,e,c===0?RULESET:y,g,$,E)}function comment(n,o,e){return node$1(n,o,e,COMMENT,from(char()),substr(n,2,-2),0)}function declaration(n,o,e,t){return node$1(n,o,e,DECLARATION,substr(n,0,t),substr(n,t+1,-1),t)}function serialize$2(n,o){for(var e="",t=sizeof(n),c=0;c<t;c++)e+=o(n[c],c,n,o)||"";return e}function stringify$2(n,o,e,t){switch(n.type){case LAYER:if(n.children.length)break;case IMPORT:case DECLARATION:return n.return=n.return||n.value;case COMMENT:return"";case KEYFRAMES:return n.return=n.value+"{"+serialize$2(n.children,t)+"}";case RULESET:n.value=n.props.join(",")}return strlen(e=serialize$2(n.children,t))?n.return=n.value+"{"+e+"}":""}function middleware(n){var o=sizeof(n);return function(e,t,c,p){for(var h="",y=0;y<o;y++)h+=n[y](e,t,c,p)||"";return h}}function rulesheet(n){return function(o){o.root||(o=o.return)&&n(o)}}var weakMemoize=function(o){var e=new WeakMap;return function(t){if(e.has(t))return e.get(t);var c=o(t);return e.set(t,c),c}};function memoize$1(n){var o=Object.create(null);return function(e){return o[e]===void 0&&(o[e]=n(e)),o[e]}}var identifierWithPointTracking=function(o,e,t){for(var c=0,p=0;c=p,p=peek$1(),c===38&&p===12&&(e[t]=1),!token(p);)next();return slice(o,position$3)},toRules=function(o,e){var t=-1,c=44;do switch(token(c)){case 0:c===38&&peek$1()===12&&(e[t]=1),o[t]+=identifierWithPointTracking(position$3-1,e,t);break;case 2:o[t]+=delimit(c);break;case 4:if(c===44){o[++t]=peek$1()===58?"&\f":"",e[t]=o[t].length;break}default:o[t]+=from(c)}while(c=next());return o},getRules=function(o,e){return dealloc(toRules(alloc(o),e))},fixedElements=new WeakMap,compat=function(o){if(!(o.type!=="rule"||!o.parent||o.length<1)){for(var e=o.value,t=o.parent,c=o.column===t.column&&o.line===t.line;t.type!=="rule";)if(t=t.parent,!t)return;if(!(o.props.length===1&&e.charCodeAt(0)!==58&&!fixedElements.get(t))&&!c){fixedElements.set(o,!0);for(var p=[],h=getRules(e,p),y=t.props,g=0,$=0;g<h.length;g++)for(var E=0;E<y.length;E++,$++)o.props[$]=p[g]?h[g].replace(/&\f/g,y[E]):y[E]+" "+h[g]}}},removeLabel=function(o){if(o.type==="decl"){var e=o.value;e.charCodeAt(0)===108&&e.charCodeAt(2)===98&&(o.return="",o.value="")}};function prefix$1(n,o){switch(hash$1(n,o)){case 5103:return WEBKIT+"print-"+n+n;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT+n+n;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+n+MOZ+n+MS+n+n;case 6828:case 4268:return WEBKIT+n+MS+n+n;case 6165:return WEBKIT+n+MS+"flex-"+n+n;case 5187:return WEBKIT+n+replace$1(n,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+n;case 5443:return WEBKIT+n+MS+"flex-item-"+replace$1(n,/flex-|-self/,"")+n;case 4675:return WEBKIT+n+MS+"flex-line-pack"+replace$1(n,/align-content|flex-|-self/,"")+n;case 5548:return WEBKIT+n+MS+replace$1(n,"shrink","negative")+n;case 5292:return WEBKIT+n+MS+replace$1(n,"basis","preferred-size")+n;case 6060:return WEBKIT+"box-"+replace$1(n,"-grow","")+WEBKIT+n+MS+replace$1(n,"grow","positive")+n;case 4554:return WEBKIT+replace$1(n,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+n;case 6187:return replace$1(replace$1(replace$1(n,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),n,"")+n;case 5495:case 3959:return replace$1(n,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace$1(replace$1(n,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+n+n;case 4095:case 3583:case 4068:case 2532:return replace$1(n,/(.+)-inline(.+)/,WEBKIT+"$1$2")+n;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(n)-1-o>6)switch(charat(n,o+1)){case 109:if(charat(n,o+4)!==45)break;case 102:return replace$1(n,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(n,o+3)==108?"$3":"$2-$3"))+n;case 115:return~indexof(n,"stretch")?prefix$1(replace$1(n,"stretch","fill-available"),o)+n:n}break;case 4949:if(charat(n,o+1)!==115)break;case 6444:switch(charat(n,strlen(n)-3-(~indexof(n,"!important")&&10))){case 107:return replace$1(n,":",":"+WEBKIT)+n;case 101:return replace$1(n,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(n,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+n}break;case 5936:switch(charat(n,o+11)){case 114:return WEBKIT+n+MS+replace$1(n,/[svh]\w+-[tblr]{2}/,"tb")+n;case 108:return WEBKIT+n+MS+replace$1(n,/[svh]\w+-[tblr]{2}/,"tb-rl")+n;case 45:return WEBKIT+n+MS+replace$1(n,/[svh]\w+-[tblr]{2}/,"lr")+n}return WEBKIT+n+MS+n+n}return n}var prefixer=function(o,e,t,c){if(o.length>-1&&!o.return)switch(o.type){case DECLARATION:o.return=prefix$1(o.value,o.length);break;case KEYFRAMES:return serialize$2([copy(o,{value:replace$1(o.value,"@","@"+WEBKIT)})],c);case RULESET:if(o.length)return combine(o.props,function(p){switch(match(p,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize$2([copy(o,{props:[replace$1(p,/:(read-\w+)/,":"+MOZ+"$1")]})],c);case"::placeholder":return serialize$2([copy(o,{props:[replace$1(p,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(o,{props:[replace$1(p,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(o,{props:[replace$1(p,/:(plac\w+)/,MS+"input-$1")]})],c)}return""})}},defaultStylisPlugins=[prefixer],createCache=function(o){var e=o.key;if(e==="css"){var t=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(t,function(X){var be=X.getAttribute("data-emotion");be.indexOf(" ")!==-1&&(document.head.appendChild(X),X.setAttribute("data-s",""))})}var c=o.stylisPlugins||defaultStylisPlugins,p={},h,y=[];h=o.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),function(X){for(var be=X.getAttribute("data-emotion").split(" "),we=1;we<be.length;we++)p[be[we]]=!0;y.push(X)});var g,$=[compat,removeLabel];{var E,A=[stringify$2,rulesheet(function(X){E.insert(X)})],N=middleware($.concat(c,A)),H=function(be){return serialize$2(compile(be),N)};g=function(be,we,$e,Ce){E=$e,H(be?be+"{"+we.styles+"}":we.styles),Ce&&(Z.inserted[we.name]=!0)}}var Z={key:e,sheet:new StyleSheet({key:e,container:h,nonce:o.nonce,speedy:o.speedy,prepend:o.prepend,insertionPoint:o.insertionPoint}),nonce:o.nonce,inserted:p,registered:{},insert:g};return Z.sheet.hydrate(y),Z};function _extends$C(){return _extends$C=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var t in e)({}).hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$C.apply(null,arguments)}var reactIs$1={exports:{}},reactIs_production_min$1={};var hasRequiredReactIs_production_min$1;function requireReactIs_production_min$1(){if(hasRequiredReactIs_production_min$1)return reactIs_production_min$1;hasRequiredReactIs_production_min$1=1;var n=typeof Symbol=="function"&&Symbol.for,o=n?Symbol.for("react.element"):60103,e=n?Symbol.for("react.portal"):60106,t=n?Symbol.for("react.fragment"):60107,c=n?Symbol.for("react.strict_mode"):60108,p=n?Symbol.for("react.profiler"):60114,h=n?Symbol.for("react.provider"):60109,y=n?Symbol.for("react.context"):60110,g=n?Symbol.for("react.async_mode"):60111,$=n?Symbol.for("react.concurrent_mode"):60111,E=n?Symbol.for("react.forward_ref"):60112,A=n?Symbol.for("react.suspense"):60113,N=n?Symbol.for("react.suspense_list"):60120,H=n?Symbol.for("react.memo"):60115,Z=n?Symbol.for("react.lazy"):60116,X=n?Symbol.for("react.block"):60121,be=n?Symbol.for("react.fundamental"):60117,we=n?Symbol.for("react.responder"):60118,$e=n?Symbol.for("react.scope"):60119;function Ce(Ne){if(typeof Ne=="object"&&Ne!==null){var Fe=Ne.$$typeof;switch(Fe){case o:switch(Ne=Ne.type,Ne){case g:case $:case t:case p:case c:case A:return Ne;default:switch(Ne=Ne&&Ne.$$typeof,Ne){case y:case E:case Z:case H:case h:return Ne;default:return Fe}}case e:return Fe}}}function Ie(Ne){return Ce(Ne)===$}return reactIs_production_min$1.AsyncMode=g,reactIs_production_min$1.ConcurrentMode=$,reactIs_production_min$1.ContextConsumer=y,reactIs_production_min$1.ContextProvider=h,reactIs_production_min$1.Element=o,reactIs_production_min$1.ForwardRef=E,reactIs_production_min$1.Fragment=t,reactIs_production_min$1.Lazy=Z,reactIs_production_min$1.Memo=H,reactIs_production_min$1.Portal=e,reactIs_production_min$1.Profiler=p,reactIs_production_min$1.StrictMode=c,reactIs_production_min$1.Suspense=A,reactIs_production_min$1.isAsyncMode=function(Ne){return Ie(Ne)||Ce(Ne)===g},reactIs_production_min$1.isConcurrentMode=Ie,reactIs_production_min$1.isContextConsumer=function(Ne){return Ce(Ne)===y},reactIs_production_min$1.isContextProvider=function(Ne){return Ce(Ne)===h},reactIs_production_min$1.isElement=function(Ne){return typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===o},reactIs_production_min$1.isForwardRef=function(Ne){return Ce(Ne)===E},reactIs_production_min$1.isFragment=function(Ne){return Ce(Ne)===t},reactIs_production_min$1.isLazy=function(Ne){return Ce(Ne)===Z},reactIs_production_min$1.isMemo=function(Ne){return Ce(Ne)===H},reactIs_production_min$1.isPortal=function(Ne){return Ce(Ne)===e},reactIs_production_min$1.isProfiler=function(Ne){return Ce(Ne)===p},reactIs_production_min$1.isStrictMode=function(Ne){return Ce(Ne)===c},reactIs_production_min$1.isSuspense=function(Ne){return Ce(Ne)===A},reactIs_production_min$1.isValidElementType=function(Ne){return typeof Ne=="string"||typeof Ne=="function"||Ne===t||Ne===$||Ne===p||Ne===c||Ne===A||Ne===N||typeof Ne=="object"&&Ne!==null&&(Ne.$$typeof===Z||Ne.$$typeof===H||Ne.$$typeof===h||Ne.$$typeof===y||Ne.$$typeof===E||Ne.$$typeof===be||Ne.$$typeof===we||Ne.$$typeof===$e||Ne.$$typeof===X)},reactIs_production_min$1.typeOf=Ce,reactIs_production_min$1}var hasRequiredReactIs$1;function requireReactIs$1(){return hasRequiredReactIs$1||(hasRequiredReactIs$1=1,reactIs$1.exports=requireReactIs_production_min$1()),reactIs$1.exports}var hoistNonReactStatics_cjs,hasRequiredHoistNonReactStatics_cjs;function requireHoistNonReactStatics_cjs(){if(hasRequiredHoistNonReactStatics_cjs)return hoistNonReactStatics_cjs;hasRequiredHoistNonReactStatics_cjs=1;var n=requireReactIs$1(),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},t={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},p={};p[n.ForwardRef]=t,p[n.Memo]=c;function h(Z){return n.isMemo(Z)?c:p[Z.$$typeof]||o}var y=Object.defineProperty,g=Object.getOwnPropertyNames,$=Object.getOwnPropertySymbols,E=Object.getOwnPropertyDescriptor,A=Object.getPrototypeOf,N=Object.prototype;function H(Z,X,be){if(typeof X!="string"){if(N){var we=A(X);we&&we!==N&&H(Z,we,be)}var $e=g(X);$&&($e=$e.concat($(X)));for(var Ce=h(Z),Ie=h(X),Ne=0;Ne<$e.length;++Ne){var Fe=$e[Ne];if(!e[Fe]&&!(be&&be[Fe])&&!(Ie&&Ie[Fe])&&!(Ce&&Ce[Fe])){var Be=E(X,Fe);try{y(Z,Fe,Be)}catch{}}}}return Z}return hoistNonReactStatics_cjs=H,hoistNonReactStatics_cjs}var hoistNonReactStatics_cjsExports=requireHoistNonReactStatics_cjs();const hoistNonReactStatics=getDefaultExportFromCjs(hoistNonReactStatics_cjsExports);var isBrowser$2=!0;function getRegisteredStyles(n,o,e){var t="";return e.split(" ").forEach(function(c){n[c]!==void 0?o.push(n[c]+";"):c&&(t+=c+" ")}),t}var registerStyles=function(o,e,t){var c=o.key+"-"+e.name;(t===!1||isBrowser$2===!1)&&o.registered[c]===void 0&&(o.registered[c]=e.styles)},insertStyles=function(o,e,t){registerStyles(o,e,t);var c=o.key+"-"+e.name;if(o.inserted[e.name]===void 0){var p=e;do o.insert(e===p?"."+c:"",p,o.sheet,!0),p=p.next;while(p!==void 0)}};function murmur2(n){for(var o=0,e,t=0,c=n.length;c>=4;++t,c-=4)e=n.charCodeAt(t)&255|(n.charCodeAt(++t)&255)<<8|(n.charCodeAt(++t)&255)<<16|(n.charCodeAt(++t)&255)<<24,e=(e&65535)*1540483477+((e>>>16)*59797<<16),e^=e>>>24,o=(e&65535)*1540483477+((e>>>16)*59797<<16)^(o&65535)*1540483477+((o>>>16)*59797<<16);switch(c){case 3:o^=(n.charCodeAt(t+2)&255)<<16;case 2:o^=(n.charCodeAt(t+1)&255)<<8;case 1:o^=n.charCodeAt(t)&255,o=(o&65535)*1540483477+((o>>>16)*59797<<16)}return o^=o>>>13,o=(o&65535)*1540483477+((o>>>16)*59797<<16),((o^o>>>15)>>>0).toString(36)}var unitlessKeys={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(o){return o.charCodeAt(1)===45},isProcessableValue=function(o){return o!=null&&typeof o!="boolean"},processStyleName=memoize$1(function(n){return isCustomProperty(n)?n:n.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(o,e){switch(o){case"animation":case"animationName":if(typeof e=="string")return e.replace(animationRegex,function(t,c,p){return cursor$1={name:c,styles:p,next:cursor$1},c})}return unitlessKeys[o]!==1&&!isCustomProperty(o)&&typeof e=="number"&&e!==0?e+"px":e};function handleInterpolation(n,o,e){if(e==null)return"";var t=e;if(t.__emotion_styles!==void 0)return t;switch(typeof e){case"boolean":return"";case"object":{var c=e;if(c.anim===1)return cursor$1={name:c.name,styles:c.styles,next:cursor$1},c.name;var p=e;if(p.styles!==void 0){var h=p.next;if(h!==void 0)for(;h!==void 0;)cursor$1={name:h.name,styles:h.styles,next:cursor$1},h=h.next;var y=p.styles+";";return y}return createStringFromObject(n,o,e)}case"function":{if(n!==void 0){var g=cursor$1,$=e(n);return cursor$1=g,handleInterpolation(n,o,$)}break}}var E=e;if(o==null)return E;var A=o[E];return A!==void 0?A:E}function createStringFromObject(n,o,e){var t="";if(Array.isArray(e))for(var c=0;c<e.length;c++)t+=handleInterpolation(n,o,e[c])+";";else for(var p in e){var h=e[p];if(typeof h!="object"){var y=h;o!=null&&o[y]!==void 0?t+=p+"{"+o[y]+"}":isProcessableValue(y)&&(t+=processStyleName(p)+":"+processStyleValue(p,y)+";")}else if(Array.isArray(h)&&typeof h[0]=="string"&&(o==null||o[h[0]]===void 0))for(var g=0;g<h.length;g++)isProcessableValue(h[g])&&(t+=processStyleName(p)+":"+processStyleValue(p,h[g])+";");else{var $=handleInterpolation(n,o,h);switch(p){case"animation":case"animationName":{t+=processStyleName(p)+":"+$+";";break}default:t+=p+"{"+$+"}"}}}return t}var labelPattern=/label:\s*([^\s;{]+)\s*(;|$)/g,cursor$1;function serializeStyles(n,o,e){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var t=!0,c="";cursor$1=void 0;var p=n[0];if(p==null||p.raw===void 0)t=!1,c+=handleInterpolation(e,o,p);else{var h=p;c+=h[0]}for(var y=1;y<n.length;y++)if(c+=handleInterpolation(e,o,n[y]),t){var g=p;c+=g[y]}labelPattern.lastIndex=0;for(var $="",E;(E=labelPattern.exec(c))!==null;)$+="-"+E[1];var A=murmur2(c)+$;return{name:A,styles:c,next:cursor$1}}var syncFallback=function(o){return o()},useInsertionEffect=React$1.useInsertionEffect?React$1.useInsertionEffect:!1,useInsertionEffectAlwaysWithSyncFallback=useInsertionEffect||syncFallback,useInsertionEffectWithLayoutFallback=useInsertionEffect||reactExports.useLayoutEffect,EmotionCacheContext=reactExports.createContext(typeof HTMLElement<"u"?createCache({key:"css"}):null),CacheProvider=EmotionCacheContext.Provider,withEmotionCache=function(o){return reactExports.forwardRef(function(e,t){var c=reactExports.useContext(EmotionCacheContext);return o(e,c,t)})},ThemeContext$2=reactExports.createContext({}),useTheme=function(){return reactExports.useContext(ThemeContext$2)},getTheme=function(o,e){if(typeof e=="function"){var t=e(o);return t}return _extends$C({},o,e)},createCacheWithTheme=weakMemoize(function(n){return weakMemoize(function(o){return getTheme(n,o)})}),ThemeProvider$2=function(o){var e=reactExports.useContext(ThemeContext$2);return o.theme!==e&&(e=createCacheWithTheme(e)(o.theme)),reactExports.createElement(ThemeContext$2.Provider,{value:e},o.children)},hasOwn={}.hasOwnProperty,typePropName="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",createEmotionProps=function(o,e){var t={};for(var c in e)hasOwn.call(e,c)&&(t[c]=e[c]);return t[typePropName]=o,t},Insertion$1=function(o){var e=o.cache,t=o.serialized,c=o.isStringTag;return registerStyles(e,t,c),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(e,t,c)}),null},Emotion=withEmotionCache(function(n,o,e){var t=n.css;typeof t=="string"&&o.registered[t]!==void 0&&(t=o.registered[t]);var c=n[typePropName],p=[t],h="";typeof n.className=="string"?h=getRegisteredStyles(o.registered,p,n.className):n.className!=null&&(h=n.className+" ");var y=serializeStyles(p,void 0,reactExports.useContext(ThemeContext$2));h+=o.key+"-"+y.name;var g={};for(var $ in n)hasOwn.call(n,$)&&$!=="css"&&$!==typePropName&&(g[$]=n[$]);return g.className=h,e&&(g.ref=e),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion$1,{cache:o,serialized:y,isStringTag:typeof c=="string"}),reactExports.createElement(c,g))}),Emotion$1=Emotion,Fragment=jsxRuntimeExports.Fragment,jsx$1=function(o,e,t){return hasOwn.call(e,"css")?jsxRuntimeExports.jsx(Emotion$1,createEmotionProps(o,e),t):jsxRuntimeExports.jsx(o,e,t)},jsxs=function(o,e,t){return hasOwn.call(e,"css")?jsxRuntimeExports.jsxs(Emotion$1,createEmotionProps(o,e),t):jsxRuntimeExports.jsxs(o,e,t)},loglevel$1={exports:{}},loglevel=loglevel$1.exports,hasRequiredLoglevel;function requireLoglevel(){return hasRequiredLoglevel||(hasRequiredLoglevel=1,function(n){(function(o,e){n.exports?n.exports=e():o.log=e()})(loglevel,function(){var o=function(){},e="undefined",t=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),c=["trace","debug","info","warn","error"],p={},h=null;function y(X,be){var we=X[be];if(typeof we.bind=="function")return we.bind(X);try{return Function.prototype.bind.call(we,X)}catch{return function(){return Function.prototype.apply.apply(we,[X,arguments])}}}function g(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function $(X){return X==="debug"&&(X="log"),typeof console===e?!1:X==="trace"&&t?g:console[X]!==void 0?y(console,X):console.log!==void 0?y(console,"log"):o}function E(){for(var X=this.getLevel(),be=0;be<c.length;be++){var we=c[be];this[we]=be<X?o:this.methodFactory(we,X,this.name)}if(this.log=this.debug,typeof console===e&&X<this.levels.SILENT)return"No console available for logging"}function A(X){return function(){typeof console!==e&&(E.call(this),this[X].apply(this,arguments))}}function N(X,be,we){return $(X)||A.apply(this,arguments)}function H(X,be){var we=this,$e,Ce,Ie,Ne="loglevel";typeof X=="string"?Ne+=":"+X:typeof X=="symbol"&&(Ne=void 0);function Fe(Ue){var Je=(c[Ue]||"silent").toUpperCase();if(!(typeof window===e||!Ne)){try{window.localStorage[Ne]=Je;return}catch{}try{window.document.cookie=encodeURIComponent(Ne)+"="+Je+";"}catch{}}}function Be(){var Ue;if(!(typeof window===e||!Ne)){try{Ue=window.localStorage[Ne]}catch{}if(typeof Ue===e)try{var Je=window.document.cookie,Xe=encodeURIComponent(Ne),Ke=Je.indexOf(Xe+"=");Ke!==-1&&(Ue=/^([^;]+)/.exec(Je.slice(Ke+Xe.length+1))[1])}catch{}return we.levels[Ue]===void 0&&(Ue=void 0),Ue}}function Ge(){if(!(typeof window===e||!Ne)){try{window.localStorage.removeItem(Ne)}catch{}try{window.document.cookie=encodeURIComponent(Ne)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function je(Ue){var Je=Ue;if(typeof Je=="string"&&we.levels[Je.toUpperCase()]!==void 0&&(Je=we.levels[Je.toUpperCase()]),typeof Je=="number"&&Je>=0&&Je<=we.levels.SILENT)return Je;throw new TypeError("log.setLevel() called with invalid level: "+Ue)}we.name=X,we.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},we.methodFactory=be||N,we.getLevel=function(){return Ie??Ce??$e},we.setLevel=function(Ue,Je){return Ie=je(Ue),Je!==!1&&Fe(Ie),E.call(we)},we.setDefaultLevel=function(Ue){Ce=je(Ue),Be()||we.setLevel(Ue,!1)},we.resetLevel=function(){Ie=null,Ge(),E.call(we)},we.enableAll=function(Ue){we.setLevel(we.levels.TRACE,Ue)},we.disableAll=function(Ue){we.setLevel(we.levels.SILENT,Ue)},we.rebuild=function(){if(h!==we&&($e=je(h.getLevel())),E.call(we),h===we)for(var Ue in p)p[Ue].rebuild()},$e=je(h?h.getLevel():"WARN");var De=Be();De!=null&&(Ie=je(De)),E.call(we)}h=new H,h.getLogger=function(be){if(typeof be!="symbol"&&typeof be!="string"||be==="")throw new TypeError("You must supply a name when creating a logger.");var we=p[be];return we||(we=p[be]=new H(be,h.methodFactory)),we};var Z=typeof window!==e?window.log:void 0;return h.noConflict=function(){return typeof window!==e&&window.log===h&&(window.log=Z),h},h.getLoggers=function(){return p},h.default=h,h})}(loglevel$1)),loglevel$1.exports}var loglevelExports=requireLoglevel(),client={},reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={};var hasRequiredScheduler_production_min;function requireScheduler_production_min(){return hasRequiredScheduler_production_min||(hasRequiredScheduler_production_min=1,function(n){function o(at,dt){var Me=at.length;at.push(dt);e:for(;0<Me;){var We=Me-1>>>1,tt=at[We];if(0<c(tt,dt))at[We]=dt,at[Me]=tt,Me=We;else break e}}function e(at){return at.length===0?null:at[0]}function t(at){if(at.length===0)return null;var dt=at[0],Me=at.pop();if(Me!==dt){at[0]=Me;e:for(var We=0,tt=at.length,Ve=tt>>>1;We<Ve;){var vt=2*(We+1)-1,xt=at[vt],Qe=vt+1,St=at[Qe];if(0>c(xt,Me))Qe<tt&&0>c(St,xt)?(at[We]=St,at[Qe]=Me,We=Qe):(at[We]=xt,at[vt]=Me,We=vt);else if(Qe<tt&&0>c(St,Me))at[We]=St,at[Qe]=Me,We=Qe;else break e}}return dt}function c(at,dt){var Me=at.sortIndex-dt.sortIndex;return Me!==0?Me:at.id-dt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var p=performance;n.unstable_now=function(){return p.now()}}else{var h=Date,y=h.now();n.unstable_now=function(){return h.now()-y}}var g=[],$=[],E=1,A=null,N=3,H=!1,Z=!1,X=!1,be=typeof setTimeout=="function"?setTimeout:null,we=typeof clearTimeout=="function"?clearTimeout:null,$e=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ce(at){for(var dt=e($);dt!==null;){if(dt.callback===null)t($);else if(dt.startTime<=at)t($),dt.sortIndex=dt.expirationTime,o(g,dt);else break;dt=e($)}}function Ie(at){if(X=!1,Ce(at),!Z)if(e(g)!==null)Z=!0,nt(Ne);else{var dt=e($);dt!==null&&ct(Ie,dt.startTime-at)}}function Ne(at,dt){Z=!1,X&&(X=!1,we(Ge),Ge=-1),H=!0;var Me=N;try{for(Ce(dt),A=e(g);A!==null&&(!(A.expirationTime>dt)||at&&!Ue());){var We=A.callback;if(typeof We=="function"){A.callback=null,N=A.priorityLevel;var tt=We(A.expirationTime<=dt);dt=n.unstable_now(),typeof tt=="function"?A.callback=tt:A===e(g)&&t(g),Ce(dt)}else t(g);A=e(g)}if(A!==null)var Ve=!0;else{var vt=e($);vt!==null&&ct(Ie,vt.startTime-dt),Ve=!1}return Ve}finally{A=null,N=Me,H=!1}}var Fe=!1,Be=null,Ge=-1,je=5,De=-1;function Ue(){return!(n.unstable_now()-De<je)}function Je(){if(Be!==null){var at=n.unstable_now();De=at;var dt=!0;try{dt=Be(!0,at)}finally{dt?Xe():(Fe=!1,Be=null)}}else Fe=!1}var Xe;if(typeof $e=="function")Xe=function(){$e(Je)};else if(typeof MessageChannel<"u"){var Ke=new MessageChannel,ze=Ke.port2;Ke.port1.onmessage=Je,Xe=function(){ze.postMessage(null)}}else Xe=function(){be(Je,0)};function nt(at){Be=at,Fe||(Fe=!0,Xe())}function ct(at,dt){Ge=be(function(){at(n.unstable_now())},dt)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(at){at.callback=null},n.unstable_continueExecution=function(){Z||H||(Z=!0,nt(Ne))},n.unstable_forceFrameRate=function(at){0>at||125<at?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):je=0<at?Math.floor(1e3/at):5},n.unstable_getCurrentPriorityLevel=function(){return N},n.unstable_getFirstCallbackNode=function(){return e(g)},n.unstable_next=function(at){switch(N){case 1:case 2:case 3:var dt=3;break;default:dt=N}var Me=N;N=dt;try{return at()}finally{N=Me}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(at,dt){switch(at){case 1:case 2:case 3:case 4:case 5:break;default:at=3}var Me=N;N=at;try{return dt()}finally{N=Me}},n.unstable_scheduleCallback=function(at,dt,Me){var We=n.unstable_now();switch(typeof Me=="object"&&Me!==null?(Me=Me.delay,Me=typeof Me=="number"&&0<Me?We+Me:We):Me=We,at){case 1:var tt=-1;break;case 2:tt=250;break;case 5:tt=1073741823;break;case 4:tt=1e4;break;default:tt=5e3}return tt=Me+tt,at={id:E++,callback:dt,priorityLevel:at,startTime:Me,expirationTime:tt,sortIndex:-1},Me>We?(at.sortIndex=Me,o($,at),e(g)===null&&at===e($)&&(X?(we(Ge),Ge=-1):X=!0,ct(Ie,Me-We))):(at.sortIndex=tt,o(g,at),Z||H||(Z=!0,nt(Ne))),at},n.unstable_shouldYield=Ue,n.unstable_wrapCallback=function(at){var dt=N;return function(){var Me=N;N=dt;try{return at.apply(this,arguments)}finally{N=Me}}}}(scheduler_production_min)),scheduler_production_min}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler=1,scheduler.exports=requireScheduler_production_min()),scheduler.exports}var hasRequiredReactDom_production_min;function requireReactDom_production_min(){if(hasRequiredReactDom_production_min)return reactDom_production_min;hasRequiredReactDom_production_min=1;var n=requireReact(),o=requireScheduler();function e(S){for(var k="https://reactjs.org/docs/error-decoder.html?invariant="+S,M=1;M<arguments.length;M++)k+="&args[]="+encodeURIComponent(arguments[M]);return"Minified React error #"+S+"; visit "+k+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t=new Set,c={};function p(S,k){h(S,k),h(S+"Capture",k)}function h(S,k){for(c[S]=k,S=0;S<k.length;S++)t.add(k[S])}var y=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,$=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,E={},A={};function N(S){return g.call(A,S)?!0:g.call(E,S)?!1:$.test(S)?A[S]=!0:(E[S]=!0,!1)}function H(S,k,M,ye){if(M!==null&&M.type===0)return!1;switch(typeof k){case"function":case"symbol":return!0;case"boolean":return ye?!1:M!==null?!M.acceptsBooleans:(S=S.toLowerCase().slice(0,5),S!=="data-"&&S!=="aria-");default:return!1}}function Z(S,k,M,ye){if(k===null||typeof k>"u"||H(S,k,M,ye))return!0;if(ye)return!1;if(M!==null)switch(M.type){case 3:return!k;case 4:return k===!1;case 5:return isNaN(k);case 6:return isNaN(k)||1>k}return!1}function X(S,k,M,ye,ve,xe,Le){this.acceptsBooleans=k===2||k===3||k===4,this.attributeName=ye,this.attributeNamespace=ve,this.mustUseProperty=M,this.propertyName=S,this.type=k,this.sanitizeURL=xe,this.removeEmptyString=Le}var be={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(S){be[S]=new X(S,0,!1,S,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(S){var k=S[0];be[k]=new X(k,1,!1,S[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(S){be[S]=new X(S,2,!1,S.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(S){be[S]=new X(S,2,!1,S,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(S){be[S]=new X(S,3,!1,S.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(S){be[S]=new X(S,3,!0,S,null,!1,!1)}),["capture","download"].forEach(function(S){be[S]=new X(S,4,!1,S,null,!1,!1)}),["cols","rows","size","span"].forEach(function(S){be[S]=new X(S,6,!1,S,null,!1,!1)}),["rowSpan","start"].forEach(function(S){be[S]=new X(S,5,!1,S.toLowerCase(),null,!1,!1)});var we=/[\-:]([a-z])/g;function $e(S){return S[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(S){var k=S.replace(we,$e);be[k]=new X(k,1,!1,S,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(S){var k=S.replace(we,$e);be[k]=new X(k,1,!1,S,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(S){var k=S.replace(we,$e);be[k]=new X(k,1,!1,S,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(S){be[S]=new X(S,1,!1,S.toLowerCase(),null,!1,!1)}),be.xlinkHref=new X("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(S){be[S]=new X(S,1,!1,S.toLowerCase(),null,!0,!0)});function Ce(S,k,M,ye){var ve=be.hasOwnProperty(k)?be[k]:null;(ve!==null?ve.type!==0:ye||!(2<k.length)||k[0]!=="o"&&k[0]!=="O"||k[1]!=="n"&&k[1]!=="N")&&(Z(k,M,ve,ye)&&(M=null),ye||ve===null?N(k)&&(M===null?S.removeAttribute(k):S.setAttribute(k,""+M)):ve.mustUseProperty?S[ve.propertyName]=M===null?ve.type===3?!1:"":M:(k=ve.attributeName,ye=ve.attributeNamespace,M===null?S.removeAttribute(k):(ve=ve.type,M=ve===3||ve===4&&M===!0?"":""+M,ye?S.setAttributeNS(ye,k,M):S.setAttribute(k,M))))}var Ie=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ne=Symbol.for("react.element"),Fe=Symbol.for("react.portal"),Be=Symbol.for("react.fragment"),Ge=Symbol.for("react.strict_mode"),je=Symbol.for("react.profiler"),De=Symbol.for("react.provider"),Ue=Symbol.for("react.context"),Je=Symbol.for("react.forward_ref"),Xe=Symbol.for("react.suspense"),Ke=Symbol.for("react.suspense_list"),ze=Symbol.for("react.memo"),nt=Symbol.for("react.lazy"),ct=Symbol.for("react.offscreen"),at=Symbol.iterator;function dt(S){return S===null||typeof S!="object"?null:(S=at&&S[at]||S["@@iterator"],typeof S=="function"?S:null)}var Me=Object.assign,We;function tt(S){if(We===void 0)try{throw Error()}catch(M){var k=M.stack.trim().match(/\n( *(at )?)/);We=k&&k[1]||""}return`
3
3
  `+We+S}var Ve=!1;function vt(S,k){if(!S||Ve)return"";Ve=!0;var M=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(k)if(k=function(){throw Error()},Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(rt){var ye=rt}Reflect.construct(S,[],k)}else{try{k.call()}catch(rt){ye=rt}S.call(k.prototype)}else{try{throw Error()}catch(rt){ye=rt}S()}}catch(rt){if(rt&&ye&&typeof rt.stack=="string"){for(var ve=rt.stack.split(`
4
4
  `),xe=ye.stack.split(`
@@ -89,7 +89,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
89
89
  `):[];p.shift();const h=p.map(y=>y.trim()).join(`
90
90
  `);return jsxs(AlertContainer,{kind:Kind.ERROR,width:c,children:[jsxs(StyledErrorName,{children:[o,": "]}),e,t?jsx$1(StyledStackTrace,{"data-testid":"stErrorElementStack",children:jsx$1(StyledCode,{wrapLines:!1,children:h})}):null]})}const LOG$g=loglevelExports.getLogger("ErrorBoundary"),gs=class gs extends reactExports.PureComponent{constructor(){super(...arguments),this.state={error:null},this.componentDidCatch=o=>{LOG$g.error(`${o.name}: ${o.message}
91
91
  ${o.stack}`)}}render(){const{error:o}=this.state;return o?o.name==="ChunkLoadError"?jsx$1(ErrorElement,{width:this.props.width,name:"Network issue",message:jsxs("p",{children:["Cannot load Streamlit frontend code. This can happen when you update Streamlit while a Streamlit app is running.",jsx$1("br",{}),"To fix this, simply reload this app by pressing"," ",jsx$1(StyledInlineCode,{children:"F5"}),","," ",jsx$1(StyledInlineCode,{children:"Ctrl+R"}),", or"," ",jsx$1(StyledInlineCode,{children:"Cmd+R"}),".",jsx$1("br",{}),"If the error persists, try force-clearing your browser's cache as described"," ",jsx$1("a",{href:"https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache#Cache_clearing_and_disabling",rel:"noopener noreferrer",target:"_blank",children:"here"})]})}):jsx$1(ErrorElement,{width:this.props.width,name:o.name,message:o.message,stack:o.stack}):this.props.children}};gs.getDerivedStateFromError=o=>({error:o});let ErrorBoundary=gs;const StyledTooltipIconWrapper=styled("div",{target:"eoo3rg90"})(({isLatex:n,theme:o})=>({display:"flex",alignItems:"center",marginTop:n?o.spacing.md:"0","& .stTooltipHoverTarget > svg":{stroke:o.colors.fadedText60,strokeWidth:2.25}})),StyledLabelHelpWrapper=styled("div",{target:"eoo3rg91"})(({isLatex:n})=>({display:"flex",flexDirection:"row",alignItems:"center",visibility:"visible",width:n?"fit-content":"100%",...n?{maxWidth:"100%",marginInline:"auto"}:{}})),StyledLabelHelpInline=styled("label",{target:"eoo3rg92"})(({theme:n})=>({marginLeft:n.spacing.xs,position:"relative",display:"flex",flexDirection:"row"}));var PLACEMENT={auto:"auto",topLeft:"topLeft",top:"top",topRight:"topRight",rightTop:"rightTop",right:"right",rightBottom:"rightBottom",bottomRight:"bottomRight",bottom:"bottom",bottomLeft:"bottomLeft",leftBottom:"leftBottom",left:"left",leftTop:"leftTop"},TRIGGER_TYPE={click:"click",hover:"hover"},STATE_CHANGE_TYPE$1={open:"open",close:"close"},ACCESSIBILITY_TYPE={none:"none",menu:"menu",tooltip:"tooltip"},POPOVER_MARGIN=8,ARROW_SIZE=6,ANIMATE_OUT_TIME=0,ANIMATE_IN_TIME=20,ARROW_WIDTH=Math.ceil(Math.sqrt(Math.pow(ARROW_SIZE*2,2)/2));function _typeof$b(n){"@babel/helpers - typeof";return _typeof$b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof$b(n)}function ownKeys$l(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$j(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$l(Object(e),!0).forEach(function(t){_defineProperty$m(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$l(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _classCallCheck$9(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$9(n,o){for(var e=0;e<o.length;e++){var t=o[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$9(n,o,e){return o&&_defineProperties$9(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$9(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),o&&_setPrototypeOf$9(n,o)}function _setPrototypeOf$9(n,o){return _setPrototypeOf$9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$9(n,o)}function _createSuper$9(n){var o=_isNativeReflectConstruct$9();return function(){var t=_getPrototypeOf$9(n),c;if(o){var p=_getPrototypeOf$9(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$9(this,c)}}function _possibleConstructorReturn$9(n,o){if(o&&(_typeof$b(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$a(n)}function _assertThisInitialized$a(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$9(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$9(n){return _getPrototypeOf$9=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$9(n)}function _defineProperty$m(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var defaultStateReducer=function n(o,e){return e},StatefulContainer$1=function(n){_inherits$9(e,n);var o=_createSuper$9(e);function e(){var t;_classCallCheck$9(this,e);for(var c=arguments.length,p=new Array(c),h=0;h<c;h++)p[h]=arguments[h];return t=o.call.apply(o,[this].concat(p)),_defineProperty$m(_assertThisInitialized$a(t),"state",_objectSpread$j({isOpen:!1},t.props.initialState)),_defineProperty$m(_assertThisInitialized$a(t),"onBlur",function(y){t.props.onBlur&&t.props.onBlur(y),!(t.props.focusLock||t.props.autoFocus)&&t.close()}),_defineProperty$m(_assertThisInitialized$a(t),"onClick",function(y){t.props.onClick&&t.props.onClick(y),t.state.isOpen?t.close():t.open()}),_defineProperty$m(_assertThisInitialized$a(t),"onClickOutside",function(){t.close()}),_defineProperty$m(_assertThisInitialized$a(t),"onEsc",function(){t.close()}),_defineProperty$m(_assertThisInitialized$a(t),"onFocus",function(y){t.props.onFocus&&t.props.onFocus(y),isFocusVisible(y)&&t.open()}),_defineProperty$m(_assertThisInitialized$a(t),"onMouseEnter",function(y){t.props.onMouseEnter&&t.props.onMouseEnter(y),t.open()}),_defineProperty$m(_assertThisInitialized$a(t),"onMouseLeave",function(y){t.props.onMouseLeave&&t.props.onMouseLeave(y),t.close()}),_defineProperty$m(_assertThisInitialized$a(t),"onContentClose",function(){t.close()}),_defineProperty$m(_assertThisInitialized$a(t),"renderContent",function(){var y=t.props.content;return typeof y=="function"?y({close:t.onContentClose}):y}),t}return _createClass$9(e,[{key:"open",value:function(){this.internalSetState(STATE_CHANGE_TYPE$1.open,{isOpen:!0}),this.props.onOpen&&this.props.onOpen()}},{key:"close",value:function(){this.internalSetState(STATE_CHANGE_TYPE$1.close,{isOpen:!1}),this.props.onClose&&this.props.onClose()}},{key:"internalSetState",value:function(c,p){var h=this.props.stateReducer;if(typeof h!="function"){this.setState(p);return}this.setState(function(y){return h(c,p,y)})}},{key:"render",value:function(){var c=this.props,p=c.accessibilityType,h=c.autoFocus,y=c.animateOutTime,g=c.dismissOnClickOutside,$=c.dismissOnEsc,E=c.focusLock,A=c.ignoreBoundary,N=c.mountNode,H=c.onBlur,Z=c.onClick,X=c.onFocus,be=c.onMouseEnter,we=c.onMouseLeave,$e=c.onMouseEnterDelay,Ce=c.onMouseLeaveDelay,Ie=c.overrides,Ne=c.placement,Fe=c.popperOptions,Be=c.renderAll,Ge=c.returnFocus,je=c.showArrow,De=c.triggerType,Ue=c.popoverMargin,Je=c.focusOptions,Xe={accessibilityType:p,animateOutTime:y,autoFocus:h,content:this.renderContent,focusLock:E,ignoreBoundary:A,isOpen:this.state.isOpen,mountNode:N,onBlur:H,onClick:Z,onFocus:X,onMouseEnter:be,onMouseLeave:we,onMouseEnterDelay:$e,onMouseLeaveDelay:Ce,overrides:Ie,placement:Ne,popperOptions:Fe,renderAll:Be,returnFocus:Ge,showArrow:je,triggerType:De,popoverMargin:Ue,focusOptions:Je};return g&&(Xe.onClickOutside=this.onClickOutside),$&&(Xe.onEsc=this.onEsc),De===TRIGGER_TYPE.hover?(Xe.onBlur=this.onBlur,Xe.onFocus=this.onFocus,Xe.onMouseEnter=this.onMouseEnter,Xe.onMouseLeave=this.onMouseLeave):Xe.onClick=this.onClick,this.props.children(Xe)}}]),e}(reactExports.Component);_defineProperty$m(StatefulContainer$1,"defaultProps",{accessibilityType:ACCESSIBILITY_TYPE.menu,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT.auto,popperOptions:{},showArrow:!1,triggerType:TRIGGER_TYPE.click,dismissOnClickOutside:!0,dismissOnEsc:!0,stateReducer:defaultStateReducer,popoverMargin:POPOVER_MARGIN});function ownKeys$k(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$i(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$k(Object(e),!0).forEach(function(t){_defineProperty$l(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$k(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$l(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}function _slicedToArray$f(n,o){return _arrayWithHoles$f(n)||_iterableToArrayLimit$f(n,o)||_unsupportedIterableToArray$f(n,o)||_nonIterableRest$f()}function _nonIterableRest$f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
92
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(n,o){if(n){if(typeof n=="string")return _arrayLikeToArray$f(n,o);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$f(n,o)}}function _arrayLikeToArray$f(n,o){(o==null||o>n.length)&&(o=n.length);for(var e=0,t=new Array(o);e<o;e++)t[e]=n[e];return t}function _iterableToArrayLimit$f(n,o){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],c=!0,p=!1,h,y;try{for(e=e.call(n);!(c=(h=e.next()).done)&&(t.push(h.value),!(o&&t.length===o));c=!0);}catch(g){p=!0,y=g}finally{try{!c&&e.return!=null&&e.return()}finally{if(p)throw y}}return t}}function _arrayWithHoles$f(n){if(Array.isArray(n))return n}var OPPOSITE_POSITIONS={top:"bottom",bottom:"top",right:"left",left:"right"};function getOppositePosition(n){return OPPOSITE_POSITIONS[n]}function isVerticalPosition(n){return n==="top"||n==="bottom"}function capitalize(n){return n.charAt(0).toUpperCase()+n.slice(1)}function fromPopperPlacement(n){var o=n.replace(/(top|bottom)-start$/,"$1Left").replace(/(top|bottom)-end$/,"$1Right").replace(/(left|right)-start$/,"$1Top").replace(/(left|right)-end$/,"$1Bottom");return PLACEMENT[o]||null}function splitPlacement(n){var o=n.match(/^([a-z]+)([A-Z][a-z]+)?/)||[];return o.slice(1,3).filter(Boolean).map(function(e){return e.toLowerCase()})}function getPopoverMarginStyles(n,o,e){var t=splitPlacement(o),c=_slicedToArray$f(t,1),p=c[0],h=getOppositePosition(p);if(!h)return null;var y="margin".concat(capitalize(h));return _defineProperty$l({},y,"".concat(n+e,"px"))}function getStartPosition(n,o,e,t){n=_objectSpread$i({},n);var c=splitPlacement(o),p=_slicedToArray$f(c,1),h=p[0],y=(e>0?e:t)*2;return isVerticalPosition(h)?n.top+=h==="top"?y:-y:n.left+=h==="left"?y:-y,"translate3d(".concat(n.left,"px, ").concat(n.top,"px, 0)")}function getEndPosition(n){return"translate3d(".concat(n.left,"px, ").concat(n.top,"px, 0)")}function getArrowPositionStyles(n,o){var e,t=splitPlacement(o),c=_slicedToArray$f(t,1),p=c[0],h=getOppositePosition(p);if(!h)return null;var y=isVerticalPosition(p)?"left":"top";return e={},_defineProperty$l(e,y,"".concat(n[y],"px")),_defineProperty$l(e,h,"-".concat(ARROW_SIZE-2,"px")),e}function ownKeys$j(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$h(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$j(Object(e),!0).forEach(function(t){_defineProperty$k(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$j(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$k(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}function getBodyStyles(n){var o=n.$animationDuration,e=n.$isOpen,t=n.$isAnimating,c=n.$placement,p=n.$popoverOffset,h=n.$showArrow,y=n.$theme,g=n.$popoverMargin,$=n.$isHoverTrigger;return _objectSpread$h(_objectSpread$h({position:"absolute",top:0,left:0,backgroundColor:y.colors.backgroundTertiary,borderTopLeftRadius:y.borders.popoverBorderRadius,borderTopRightRadius:y.borders.popoverBorderRadius,borderBottomRightRadius:y.borders.popoverBorderRadius,borderBottomLeftRadius:y.borders.popoverBorderRadius,boxShadow:y.lighting.shadow600,transitionProperty:"opacity,transform",transitionDuration:t?e?"0.1s":"".concat(o,"ms"):"0s",transitionTimingFunction:e?y.animation.easeOutCurve:y.animation.easeInCurve,opacity:t&&e?1:0,transform:t&&e?getEndPosition(p):getStartPosition(p,c,h?ARROW_SIZE:0,g)},getPopoverMarginStyles(h?ARROW_SIZE:0,c,g)),$?{animationDuration:".1s",animationName:{"0%":{pointerEvents:"none"},"99%":{pointerEvents:"none"},"100%":{pointerEvents:"auto"}}}:{})}var Body$2=styled$1("div",getBodyStyles);Body$2.displayName="Body";Body$2.displayName="Body";function getArrowStyles(n){var o=n.$arrowOffset,e=n.$placement,t=n.$theme;return _objectSpread$h({backgroundColor:t.colors.backgroundTertiary,boxShadow:t.lighting.shadow600,width:"".concat(ARROW_WIDTH,"px"),height:"".concat(ARROW_WIDTH,"px"),transform:"rotate(45deg)",position:"absolute"},getArrowPositionStyles(o,e))}var Arrow$1=styled$1("div",getArrowStyles);Arrow$1.displayName="Arrow";Arrow$1.displayName="Arrow";function getInnerStyles(n){var o=n.$theme;return{backgroundColor:o.colors.backgroundTertiary,borderTopLeftRadius:o.borders.popoverBorderRadius,borderTopRightRadius:o.borders.popoverBorderRadius,borderBottomRightRadius:o.borders.popoverBorderRadius,borderBottomLeftRadius:o.borders.popoverBorderRadius,color:o.colors.contentPrimary,position:"relative"}}var Inner$1=styled$1("div",getInnerStyles);Inner$1.displayName="Inner";Inner$1.displayName="Inner";var Padding=styled$1("div",{paddingLeft:"12px",paddingTop:"12px",paddingRight:"12px",paddingBottom:"12px"});Padding.displayName="Padding";Padding.displayName="Padding";var Hidden=styled$1("div",{display:"none"});Hidden.displayName="Hidden";Hidden.displayName="Hidden";var baseDefaultProps$1={accessibilityType:ACCESSIBILITY_TYPE.menu,focusLock:!1,autoFocus:!0,returnFocus:!0,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT.auto,showArrow:!1,triggerType:TRIGGER_TYPE.click,renderAll:!1};function ownKeys$i(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$g(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$i(Object(e),!0).forEach(function(t){_defineProperty$j(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$i(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _extends$l(){return _extends$l=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$l.apply(this,arguments)}function _typeof$a(n){"@babel/helpers - typeof";return _typeof$a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof$a(n)}function _classCallCheck$8(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$8(n,o){for(var e=0;e<o.length;e++){var t=o[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$8(n,o,e){return o&&_defineProperties$8(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$8(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),o&&_setPrototypeOf$8(n,o)}function _setPrototypeOf$8(n,o){return _setPrototypeOf$8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$8(n,o)}function _createSuper$8(n){var o=_isNativeReflectConstruct$8();return function(){var t=_getPrototypeOf$8(n),c;if(o){var p=_getPrototypeOf$8(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$8(this,c)}}function _possibleConstructorReturn$8(n,o){if(o&&(_typeof$a(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$9(n)}function _assertThisInitialized$9(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$8(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$8(n){return _getPrototypeOf$8=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$8(n)}function _defineProperty$j(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var PopoverInner=function(n){_inherits$8(e,n);var o=_createSuper$8(e);function e(){var t;_classCallCheck$8(this,e);for(var c=arguments.length,p=new Array(c),h=0;h<c;h++)p[h]=arguments[h];return t=o.call.apply(o,[this].concat(p)),_defineProperty$j(_assertThisInitialized$9(t),"animateInTimer",void 0),_defineProperty$j(_assertThisInitialized$9(t),"animateOutTimer",void 0),_defineProperty$j(_assertThisInitialized$9(t),"animateOutCompleteTimer",void 0),_defineProperty$j(_assertThisInitialized$9(t),"onMouseEnterTimer",void 0),_defineProperty$j(_assertThisInitialized$9(t),"onMouseLeaveTimer",void 0),_defineProperty$j(_assertThisInitialized$9(t),"anchorRef",reactExports.createRef()),_defineProperty$j(_assertThisInitialized$9(t),"popperRef",reactExports.createRef()),_defineProperty$j(_assertThisInitialized$9(t),"arrowRef",reactExports.createRef()),_defineProperty$j(_assertThisInitialized$9(t),"state",t.getDefaultState(t.props)),_defineProperty$j(_assertThisInitialized$9(t),"animateIn",function(){t.props.isOpen&&t.setState({isAnimating:!0})}),_defineProperty$j(_assertThisInitialized$9(t),"animateOut",function(){t.props.isOpen||(t.setState({isAnimating:!0}),t.animateOutCompleteTimer=setTimeout(function(){t.setState({isAnimating:!1,placement:t.props.placement})},t.props.animateOutTime||ANIMATE_OUT_TIME))}),_defineProperty$j(_assertThisInitialized$9(t),"onAnchorClick",function(y){t.props.onClick&&t.props.onClick(y)}),_defineProperty$j(_assertThisInitialized$9(t),"onAnchorMouseEnter",function(y){t.onMouseLeaveTimer&&clearTimeout(t.onMouseLeaveTimer),t.triggerOnMouseEnterWithDelay(y)}),_defineProperty$j(_assertThisInitialized$9(t),"onAnchorMouseLeave",function(y){t.onMouseEnterTimer&&clearTimeout(t.onMouseEnterTimer),t.triggerOnMouseLeaveWithDelay(y)}),_defineProperty$j(_assertThisInitialized$9(t),"onPopoverMouseEnter",function(){t.onMouseLeaveTimer&&clearTimeout(t.onMouseLeaveTimer)}),_defineProperty$j(_assertThisInitialized$9(t),"onPopoverMouseLeave",function(y){t.triggerOnMouseLeaveWithDelay(y)}),_defineProperty$j(_assertThisInitialized$9(t),"onPopperUpdate",function(y,g){var $=fromPopperPlacement(g.placement)||PLACEMENT.top;return t.setState({arrowOffset:y.arrow,popoverOffset:y.popper,placement:$}),t.animateInTimer=setTimeout(t.animateIn,ANIMATE_IN_TIME),g}),_defineProperty$j(_assertThisInitialized$9(t),"triggerOnMouseLeave",function(y){t.props.onMouseLeave&&t.props.onMouseLeave(y)}),_defineProperty$j(_assertThisInitialized$9(t),"triggerOnMouseEnter",function(y){t.props.onMouseEnter&&t.props.onMouseEnter(y)}),_defineProperty$j(_assertThisInitialized$9(t),"onDocumentClick",function(y){var g=y.composedPath?y.composedPath()[0]:y.target,$=t.popperRef.current,E=t.anchorRef.current;!$||$===g||g instanceof Node&&$.contains(g)||!E||E===g||g instanceof Node&&E.contains(g)||t.props.onClickOutside&&t.props.onClickOutside(y)}),t}return _createClass$8(e,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(c,p){this.init(c,p),this.props.accessibilityType!==ACCESSIBILITY_TYPE.tooltip&&this.props.autoFocus&&!this.state.autoFocusAfterPositioning&&this.popperRef.current!==null&&this.popperRef.current.getBoundingClientRect().top>0&&this.setState({autoFocusAfterPositioning:!0})}},{key:"init",value:function(c,p){if(this.props.isOpen!==c.isOpen||this.state.isMounted!==p.isMounted||this.state.isLayerMounted!==p.isLayerMounted){if(this.props.isOpen&&this.state.isLayerMounted){this.clearTimers();return}if(!this.props.isOpen&&c.isOpen){this.animateOutTimer=setTimeout(this.animateOut,20);return}}}},{key:"componentWillUnmount",value:function(){this.clearTimers()}},{key:"getDefaultState",value:function(c){return{isAnimating:!1,arrowOffset:{left:0,top:0},popoverOffset:{left:0,top:0},placement:c.placement,isMounted:!1,isLayerMounted:!1,autoFocusAfterPositioning:!1}}},{key:"clearTimers",value:function(){[this.animateInTimer,this.animateOutTimer,this.animateOutCompleteTimer,this.onMouseEnterTimer,this.onMouseLeaveTimer].forEach(function(c){c&&clearTimeout(c)})}},{key:"triggerOnMouseLeaveWithDelay",value:function(c){var p=this,h=this.props.onMouseLeaveDelay;if(h){this.onMouseLeaveTimer=setTimeout(function(){return p.triggerOnMouseLeave(c)},h);return}this.triggerOnMouseLeave(c)}},{key:"triggerOnMouseEnterWithDelay",value:function(c){var p=this,h=this.props.onMouseEnterDelay;if(h){this.onMouseEnterTimer=setTimeout(function(){return p.triggerOnMouseEnter(c)},h);return}this.triggerOnMouseEnter(c)}},{key:"isClickTrigger",value:function(){return this.props.triggerType===TRIGGER_TYPE.click}},{key:"isHoverTrigger",value:function(){return this.props.triggerType===TRIGGER_TYPE.hover}},{key:"isAccessibilityTypeMenu",value:function(){return this.props.accessibilityType===ACCESSIBILITY_TYPE.menu}},{key:"isAccessibilityTypeTooltip",value:function(){return this.props.accessibilityType===ACCESSIBILITY_TYPE.tooltip}},{key:"getAnchorIdAttr",value:function(){var c=this.getPopoverIdAttr();return c?"".concat(c,"__anchor"):null}},{key:"getPopoverIdAttr",value:function(){return this.props.id||null}},{key:"getAnchorProps",value:function(){var c=this.props.isOpen,p={ref:this.anchorRef},h=this.getPopoverIdAttr();if(this.isAccessibilityTypeMenu()){var y=this.isClickTrigger()?"aria-controls":"aria-owns";p[y]=c?h:null,p["aria-haspopup"]=!0,p["aria-expanded"]=!!c}else this.isAccessibilityTypeTooltip()&&(p.id=this.getAnchorIdAttr(),p["aria-describedby"]=c?h:null);return this.isHoverTrigger()?(p.onMouseEnter=this.onAnchorMouseEnter,p.onMouseLeave=this.onAnchorMouseLeave,p.onBlur=this.props.onBlur,p.onFocus=this.props.onFocus):p.onClick=this.onAnchorClick,p}},{key:"getPopoverBodyProps",value:function(){var c={},p=this.getPopoverIdAttr();return this.isAccessibilityTypeMenu()?c.id=p:this.isAccessibilityTypeTooltip()&&(c.id=p,c.role="tooltip"),this.isHoverTrigger()&&(c.onMouseEnter=this.onPopoverMouseEnter,c.onMouseLeave=this.onPopoverMouseLeave),c}},{key:"getSharedProps",value:function(){var c=this.props,p=c.isOpen,h=c.showArrow,y=c.popoverMargin,g=y===void 0?POPOVER_MARGIN:y,$=this.state,E=$.isAnimating,A=$.arrowOffset,N=$.popoverOffset,H=$.placement;return{$showArrow:!!h,$arrowOffset:A,$popoverOffset:N,$placement:H,$isAnimating:E,$animationDuration:this.props.animateOutTime||ANIMATE_OUT_TIME,$isOpen:p,$popoverMargin:g,$isHoverTrigger:this.isHoverTrigger()}}},{key:"getAnchorFromChildren",value:function(){var c=this.props.children,p=reactExports.Children.toArray(c);return p.length!==1&&console.error("[baseui] Exactly 1 child must be passed to Popover/Tooltip, found ".concat(p.length," children")),p[0]}},{key:"renderAnchor",value:function(){var c=this.getAnchorFromChildren();if(!c)return null;var p=reactExports.isValidElement(c),h=this.getAnchorProps();return _typeof$a(c)==="object"&&p?reactExports.cloneElement(c,h):reactExports.createElement("span",_extends$l({key:"popover-anchor"},h),c)}},{key:"renderPopover",value:function(c){var p=this.props,h=p.showArrow,y=p.overrides,g=y===void 0?{}:y,$=g.Arrow,E=g.Body,A=g.Inner,N=getOverride($)||Arrow$1,H=getOverride(E)||Body$2,Z=getOverride(A)||Inner$1,X=this.getSharedProps(),be=this.getPopoverBodyProps();return reactExports.createElement(H,_extends$l({key:"popover-body",ref:this.popperRef,"data-baseweb":this.props["data-baseweb"]||"popover"},be,X,getOverrideProps(E)),h?reactExports.createElement(N,_extends$l({key:"popover-arrow",ref:this.arrowRef},X,getOverrideProps($))):null,reactExports.createElement(Z,_extends$l({},X,getOverrideProps(A)),c))}},{key:"renderContent",value:function(){var c=this.props.content;return typeof c=="function"?c():c}},{key:"render",value:function(){var c=this,p=this.state.isMounted&&(this.props.isOpen||this.state.isAnimating),h=[this.renderAnchor()],y=p||this.props.renderAll?this.renderContent():null,g={modifiers:{preventOverflow:{enabled:!this.props.ignoreBoundary,padding:0}}};return y&&(p?h.push(reactExports.createElement(Layer,{key:"new-layer",mountNode:this.props.mountNode,onEscape:this.props.onEsc,onDocumentClick:this.isHoverTrigger()?void 0:this.onDocumentClick,isHoverLayer:this.isHoverTrigger(),onMount:function(){return c.setState({isLayerMounted:!0})},onUnmount:function(){return c.setState({isLayerMounted:!1})}},reactExports.createElement(Tether,{anchorRef:this.anchorRef.current,arrowRef:this.arrowRef.current,popperRef:this.popperRef.current,popperOptions:_objectSpread$g(_objectSpread$g({},g),this.props.popperOptions),onPopperUpdate:this.onPopperUpdate,placement:this.state.placement},this.props.focusLock&&this.props.accessibilityType!==ACCESSIBILITY_TYPE.tooltip?reactExports.createElement(FocusLockCombination,{disabled:!this.props.focusLock,noFocusGuards:!1,returnFocus:!this.isHoverTrigger()&&this.props.returnFocus,autoFocus:this.state.autoFocusAfterPositioning,crossFrame:!1,focusOptions:this.props.focusOptions},this.renderPopover(y)):reactExports.createElement(MoveFocusInside,{disabled:!this.props.autoFocus||!this.state.autoFocusAfterPositioning},this.renderPopover(y))))):h.push(reactExports.createElement(Hidden,{key:"hidden-layer"},y))),h}}]),e}(reactExports.Component);_defineProperty$j(PopoverInner,"defaultProps",baseDefaultProps$1);var Popover$2=function n(o){var e=o.innerRef,t=useUID();return reactExports.createElement(PopoverInner,_extends$l({id:o.id||t,ref:e},o))};Popover$2.defaultProps=baseDefaultProps$1;var _excluded$l=["children"];function _objectWithoutProperties$j(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$i(n,o),t,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(n);for(c=0;c<p.length;c++)t=p[c],!(o.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$i(n,o){if(n==null)return{};var e={},t=Object.keys(n),c,p;for(p=0;p<t.length;p++)c=t[p],!(o.indexOf(c)>=0)&&(e[c]=n[c]);return e}function StatefulPopover(n){var o=n.children,e=_objectWithoutProperties$j(n,_excluded$l);return reactExports.createElement(StatefulContainer$1,e,function(t){return reactExports.createElement(Popover$2,t,o)})}StatefulPopover.defaultProps={accessibilityType:ACCESSIBILITY_TYPE.menu,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT.auto,showArrow:!1,triggerType:TRIGGER_TYPE.click,dismissOnClickOutside:!0,dismissOnEsc:!0,stateReducer:function n(o,e){return e},popoverMargin:POPOVER_MARGIN};var baseDefaultProps={accessibilityType:ACCESSIBILITY_TYPE.tooltip,focusLock:!1,autoFocus:!1,returnFocus:!1,onMouseEnterDelay:200,onMouseLeaveDelay:200,overrides:{},placement:PLACEMENT.auto,popoverMargin:0,showArrow:!1,triggerType:TRIGGER_TYPE.hover,renderAll:!1};function _typeof$9(n){"@babel/helpers - typeof";return _typeof$9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof$9(n)}function ownKeys$h(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$f(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$h(Object(e),!0).forEach(function(t){_defineProperty$i(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$h(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _classCallCheck$7(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(n,o){for(var e=0;e<o.length;e++){var t=o[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$7(n,o,e){return o&&_defineProperties$7(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$7(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),o&&_setPrototypeOf$7(n,o)}function _setPrototypeOf$7(n,o){return _setPrototypeOf$7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$7(n,o)}function _createSuper$7(n){var o=_isNativeReflectConstruct$7();return function(){var t=_getPrototypeOf$7(n),c;if(o){var p=_getPrototypeOf$7(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$7(this,c)}}function _possibleConstructorReturn$7(n,o){if(o&&(_typeof$9(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$8(n)}function _assertThisInitialized$8(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$7(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$7(n){return _getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$7(n)}function _defineProperty$i(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var StatefulContainer=function(n){_inherits$7(e,n);var o=_createSuper$7(e);function e(){return _classCallCheck$7(this,e),o.apply(this,arguments)}return _createClass$7(e,[{key:"render",value:function(){return reactExports.createElement(StatefulContainer$1,this.props)}}]),e}(reactExports.Component);_defineProperty$i(StatefulContainer,"defaultProps",_objectSpread$f({},baseDefaultProps));function ownKeys$g(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$e(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$g(Object(e),!0).forEach(function(t){_defineProperty$h(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$g(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$h(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var Body$1=styled$1("div",function(n){return _objectSpread$e(_objectSpread$e({},getBodyStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground,borderTopLeftRadius:n.$theme.borders.radius300,borderTopRightRadius:n.$theme.borders.radius300,borderBottomRightRadius:n.$theme.borders.radius300,borderBottomLeftRadius:n.$theme.borders.radius300,boxShadow:n.$theme.lighting.shadow400,color:n.$theme.colors.tooltipText,transitionProperty:"opacity",transform:getEndPosition(n.$popoverOffset)})});Body$1.displayName="Body";Body$1.displayName="Body";var Inner=styled$1("div",function(n){return _objectSpread$e(_objectSpread$e(_objectSpread$e({},getInnerStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground,borderTopLeftRadius:n.$theme.borders.radius300,borderTopRightRadius:n.$theme.borders.radius300,borderBottomRightRadius:n.$theme.borders.radius300,borderBottomLeftRadius:n.$theme.borders.radius300,paddingTop:n.$theme.sizing.scale300,paddingBottom:n.$theme.sizing.scale300,paddingLeft:n.$theme.sizing.scale600,paddingRight:n.$theme.sizing.scale600},n.$theme.typography.font150),{},{color:n.$theme.colors.tooltipText})});Inner.displayName="Inner";Inner.displayName="Inner";var Arrow=styled$1("div",function(n){return _objectSpread$e(_objectSpread$e({},getArrowStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground})});Arrow.displayName="Arrow";Arrow.displayName="Arrow";function _typeof$8(n){"@babel/helpers - typeof";return _typeof$8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof$8(n)}function ownKeys$f(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$d(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$f(Object(e),!0).forEach(function(t){_defineProperty$g(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$f(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _extends$k(){return _extends$k=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$k.apply(this,arguments)}function _classCallCheck$6(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(n,o){for(var e=0;e<o.length;e++){var t=o[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$6(n,o,e){return o&&_defineProperties$6(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$6(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),o&&_setPrototypeOf$6(n,o)}function _setPrototypeOf$6(n,o){return _setPrototypeOf$6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$6(n,o)}function _createSuper$6(n){var o=_isNativeReflectConstruct$6();return function(){var t=_getPrototypeOf$6(n),c;if(o){var p=_getPrototypeOf$6(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$6(this,c)}}function _possibleConstructorReturn$6(n,o){if(o&&(_typeof$8(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$7(n)}function _assertThisInitialized$7(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(n){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$6(n)}function _defineProperty$g(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var Tooltip$2=function(n){_inherits$6(e,n);var o=_createSuper$6(e);function e(){return _classCallCheck$6(this,e),o.apply(this,arguments)}return _createClass$6(e,[{key:"render",value:function(){var c=mergeOverrides({Arrow,Body:Body$1,Inner},this.props.overrides);return reactExports.createElement(Popover$2,_extends$k({autoFocus:!1,"data-baseweb":"tooltip"},this.props,{overrides:c}))}}]),e}(reactExports.Component);_defineProperty$g(Tooltip$2,"defaultProps",_objectSpread$d({},baseDefaultProps));var _excluded$k=["children"];function _objectWithoutProperties$i(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$h(n,o),t,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(n);for(c=0;c<p.length;c++)t=p[c],!(o.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$h(n,o){if(n==null)return{};var e={},t=Object.keys(n),c,p;for(p=0;p<t.length;p++)c=t[p],!(o.indexOf(c)>=0)&&(e[c]=n[c]);return e}function StatefulTooltip(n){var o=n.children,e=_objectWithoutProperties$i(n,_excluded$k);return reactExports.createElement(StatefulContainer,e,function(t){return reactExports.createElement(Tooltip$2,t,o)})}StatefulTooltip.defaultProps=StatefulContainer.defaultProps;const StyledWrapper=styled("div",{target:"etx0m6x0"})({display:"table",tableLayout:"fixed",width:"100%"}),StyledEllipsizedDiv=styled("div",{target:"etx0m6x1"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell"}),StyledTooltipContentWrapper=styled("div",{target:"etx0m6x2"})(({theme:n})=>({boxSizing:"border-box",fontSize:`${n.fontSizes.sm}`,maxWidth:`calc(${n.sizes.contentMaxWidth} - 2 * ${n.spacing.threeXL})`,maxHeight:n.sizes.maxTooltipHeight,overflow:"auto",padding:`${n.spacing.xs} ${n.spacing.md}`,[`@media (max-width: ${n.breakpoints.sm})`]:{maxWidth:`calc(100% - ${n.spacing.threeXL})`},img:{maxWidth:"100%"},"*":{fontSize:n.fontSizes.sm}}));function useTooltipMeasurementSideEffect(n,o){const{innerWidth:e}=useWindowDimensionsContext();reactExports.useEffect(()=>{const t=n?.parentElement;if(!t)return;(async()=>{const p=()=>{const N=t.getBoundingClientRect();return N.x!==0||N.y!==0?N:null};let h=null,y=0;const g=5;for(;!h&&y<g;)h=p(),h||(y++,await new Promise(N=>requestAnimationFrame(N)));h||(h=t.getBoundingClientRect());const $=h.x,E=$+h.width-e,A=t.parentElement;if(E>0&&A){const N=new DOMMatrix(window.getComputedStyle(A)?.transform);A.style.transform=`translate3d(${N.e-E}px, ${N.f}px, 0px)`}$<0&&(t.style.left=`${-$}px`)})()},[n,o,e])}var Placement=function(n){return n.AUTO="auto",n.TOP_LEFT="topLeft",n.TOP="top",n.TOP_RIGHT="topRight",n.RIGHT_TOP="rightTop",n.RIGHT="right",n.RIGHT_BOTTOM="rightBottom",n.BOTTOM_RIGHT="bottomRight",n.BOTTOM="bottom",n.BOTTOM_LEFT="bottomLeft",n.LEFT_BOTTOM="leftBottom",n.LEFT="left",n.LEFT_TOP="leftTop",n}({});const generateDefaultTooltipOverrides=(n,o)=>{const{colors:e,fontSizes:t,radii:c,fontWeights:p}=n;return{Body:{style:{borderTopLeftRadius:c.default,borderTopRightRadius:c.default,borderBottomLeftRadius:c.default,borderBottomRightRadius:c.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:hasLightBackgroundColor(n)?e.bgColor:e.secondaryBg,color:e.bodyText,fontSize:t.sm,fontWeight:p.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"},...o}}};function Tooltip({content:n,placement:o,children:e,inline:t,style:c,onMouseEnterDelay:p,overrides:h,containerWidth:y,error:g}){const $=useEmotionTheme(),[E,A]=reactExports.useState(null),[N,H]=reactExports.useState(!1),Z=reactExports.useCallback(()=>{H(!0)},[]),X=reactExports.useCallback(()=>{H(!1)},[]);useTooltipMeasurementSideEffect(E,N);const be=generateDefaultTooltipOverrides($,h);return jsx$1(StatefulTooltip,{onOpen:Z,onClose:X,content:n?jsx$1(StyledTooltipContentWrapper,{className:g?"stTooltipErrorContent":"stTooltipContent","data-testid":g?"stTooltipErrorContent":"stTooltipContent",ref:A,children:n}):null,placement:PLACEMENT[o],accessibilityType:ACCESSIBILITY_TYPE.tooltip,showArrow:!1,popoverMargin:10,onMouseEnterDelay:p,overrides:be,children:jsx$1("div",{style:{display:"flex",flexDirection:"row",justifyContent:t?"flex-end":"",width:y?"100%":"auto",...c},"data-testid":g?"stTooltipErrorHoverTarget":"stTooltipHoverTarget",className:g?"stTooltipErrorHoverTarget":"stTooltipHoverTarget",children:e})})}const Tooltip$1=reactExports.memo(Tooltip);function OverflowTooltip({content:n,placement:o,children:e,inline:t,style:c}){const p=React.useRef(null),[h,y]=reactExports.useState(!1);return React.useEffect(()=>{const g=p?.current?p.current.offsetWidth<p.current.scrollWidth:!1;g!==h&&y(g)},[e,h]),jsx$1(Tooltip$1,{content:h?n:"",placement:o,inline:t,children:jsx$1(StyledWrapper,{children:jsx$1(StyledEllipsizedDiv,{ref:p,style:c,children:e})})})}function TooltipIcon({placement:n=Placement.AUTO,isLatex:o=!1,content:e,children:t,markdownProps:c,onMouseEnterDelay:p,containerWidth:h=!1}){const y=useEmotionTheme();return jsx$1(StyledTooltipIconWrapper,{className:"stTooltipIcon","data-testid":"stTooltipIcon",isLatex:o,children:jsx$1(Tooltip$1,{content:jsx$1(StreamlitMarkdown$1,{style:{fontSize:y.fontSizes.sm},source:e,allowHTML:!1,...c||{}}),placement:n,onMouseEnterDelay:p,inline:!0,containerWidth:h,children:t||jsx$1(HelpCircle,{className:"icon",size:convertRemToPx(y.iconSizes.base)})})})}const InlineTooltipIcon=({placement:n=Placement.TOP_RIGHT,isLatex:o=!1,content:e,children:t,markdownProps:c})=>jsx$1(StyledLabelHelpInline,{children:jsx$1(TooltipIcon,{placement:n,isLatex:o,content:e,markdownProps:c,children:t})});function convertRemToEm(n){return n.replace(/rem$/,"em")}function sharedMarkdownStyle(n){return{a:{color:n.colors.link,textDecoration:n.linkUnderline?"underline":"none"}}}function convertFontSizes(n,o,e){if(o){const t=roundFontSizeToNearestEighth(parseFloat(n)*.65),c=`${Math.max(t,.75)}rem`;return e?convertRemToEm(c):c}return e?convertRemToEm(n):n}function getMarkdownHeadingDefinitions(n,o,e){return{"h1, h2, h3, h4, h5, h6":{fontFamily:n.genericFonts.headingFont,lineHeight:n.lineHeights.headings,margin:0,color:"inherit"},h1:{fontSize:convertFontSizes(n.fontSizes.h1FontSize,o,e),fontWeight:n.fontWeights.h1FontWeight,padding:`${n.spacing.xl} 0 ${n.spacing.lg} 0`},"h1 b, h1 strong":{fontWeight:n.fontWeights.h1FontWeight},"h2, h3":{letterSpacing:"-0.005em"},h2:{fontSize:convertFontSizes(n.fontSizes.h2FontSize,o,e),fontWeight:n.fontWeights.h2FontWeight,padding:`${n.spacing.lg} 0 ${n.spacing.lg} 0`},h3:{fontSize:convertFontSizes(n.fontSizes.h3FontSize,o,e),fontWeight:n.fontWeights.h3FontWeight,padding:`${n.spacing.md} 0 ${n.spacing.lg} 0`},h4:{fontSize:convertFontSizes(n.fontSizes.h4FontSize,o,e),fontWeight:n.fontWeights.h4FontWeight,padding:`${n.spacing.sm} 0 ${n.spacing.lg} 0`},h5:{fontSize:convertFontSizes(n.fontSizes.h5FontSize,o,e),fontWeight:n.fontWeights.h5FontWeight,padding:`${n.spacing.xs} 0 ${n.spacing.lg} 0`},h6:{fontSize:convertFontSizes(n.fontSizes.h6FontSize,o,e),fontWeight:n.fontWeights.h6FontWeight,padding:`${n.spacing.twoXS} 0 ${n.spacing.lg} 0`}}}const StyledStreamlitMarkdown=styled("div",{target:"eqpbrs00"})(({theme:n,isCaption:o,isInDialog:e,isLabel:t,inheritFont:c,boldLabel:p,largerLabel:h,isToast:y})=>{const g=t&&!h||y||o;return{fontFamily:c?"inherit":n.genericFonts.bodyFont,fontSize:c?"inherit":g?n.fontSizes.sm:n.fontSizes.md,marginBottom:t?"":`-${n.spacing.lg}`,opacity:o?.6:void 0,color:"inherit",maxWidth:"100%",width:t?"":"100%",overflowWrap:"break-word",...sharedMarkdownStyle(n),...getMarkdownHeadingDefinitions(n,e,o),"&:has(.katex-display)":{overflowX:"hidden"},p:{wordBreak:"break-word",marginBottom:t?n.spacing.none:"",fontWeight:c?"inherit":p?n.fontWeights.bold:"",marginTop:n.spacing.none,marginLeft:n.spacing.none,marginRight:n.spacing.none},img:{maxWidth:"100%",maxHeight:t?"1em":void 0,verticalAlign:"middle",objectFit:"scale-down"},li:{margin:"0.2em 0 0.2em 1.15em",padding:"0 0 0 0.3em"},"li.task-list-item":{listStyleType:"none",padding:"0",marginLeft:"0","input[type='checkbox']":{verticalAlign:"middle",margin:"0 0.35em 0.1em 0"}},blockquote:{margin:"1em 0 1em 0",padding:"0 0 0 0.75em",borderLeft:`0.15em solid ${n.colors.borderColor}`,opacity:.6},"b, strong":{fontWeight:n.fontWeights.bold},"b code, strong code":{fontWeight:n.fontWeights.codeBold},hr:{margin:"2em 0",padding:0,color:"inherit",backgroundColor:"transparent",border:"none",borderBottom:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,"&:not([size])":{height:n.sizes.borderWidth}},table:{display:"table",borderCollapse:"collapse",marginBottom:n.spacing.lg},tr:{borderTop:`${n.sizes.borderWidth} solid ${n.colors.dataframeBorderColor}`},th:{textAlign:"inherit"},"th, td":{padding:`${n.spacing.xs} ${n.spacing.md}`,border:`${n.sizes.borderWidth} solid ${n.colors.dataframeBorderColor}`},"span.stMarkdownColoredBackground":{borderRadius:n.radii.md,padding:`${n.spacing.threeXS} ${n.spacing.twoXS}`,margin:n.spacing.none,boxDecorationBreak:"clone"},"span.stMarkdownBadge":{borderRadius:n.radii.md,padding:`0 ${n.spacing.twoXS}`,margin:`0 ${n.spacing.px}`,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",display:"inline-block",verticalAlign:"middle"},"p, ol, ul, dl, li":{fontSize:"inherit"},"& > ul, & > ol":{display:"block",width:"fit-content",textAlign:"left"},"li > ul, li > ol":{display:"block"},".katex-display":{overflowX:"auto",overflowY:"hidden"},".katex":{fontWeight:n.fontWeights.normal}}}),StyledLinkIcon=styled("a",{target:"eqpbrs01"})(({theme:n})=>({lineHeight:0,display:"inline-flex",alignItems:"center",justifyContent:"center",svg:{stroke:n.colors.fadedText60,strokeWidth:2.25},"&:hover svg":{stroke:n.colors.bodyText}})),StyledHeadingWithActionElements=styled("div",{target:"eqpbrs02"})(({theme:n})=>({"h1, h2, h3, h4, h5, h6, span":{scrollMarginTop:n.sizes.headerHeight},...sharedMarkdownStyle(n),wordBreak:"break-word",textWrap:"pretty",[StyledLinkIcon]:{visibility:"hidden"},"&:hover":{[StyledLinkIcon]:{visibility:"visible"}}})),StyledHeadingActionElements=styled("span",{target:"eqpbrs03"})(({theme:n})=>({marginLeft:n.spacing.sm,display:"inline-flex",gap:n.spacing.sm,verticalAlign:"middle","& > *":{marginLeft:"0 !important"}})),StyledHeaderDivider=styled("hr",{target:"eqpbrs04"})(({theme:n,rainbow:o,color:e})=>({height:`${n.spacing.threeXS} !important`,marginTop:n.spacing.sm,marginBottom:n.spacing.none,border:"none",borderRadius:n.radii.full,...o?{background:e}:{backgroundColor:e}})),StyledPreWrapper=styled("div",{target:"eqpbrs05"})(({theme:n})=>({marginBottom:n.spacing.lg})),StyledHelpIconWrapper=styled("span",{target:"eqpbrs06"})({display:"inline-block",verticalAlign:"middle",transform:"translateY(-0.1em)"}),LOAD_FAILED=Symbol("plugin_load_failed"),pluginCache={katex:null,raw:null,emoji:null},loadingPromises={katex:null,raw:null,emoji:null},loadKatexPlugin=()=>__vitePreload(()=>import("./index.D6HmkoDm.js"),__vite__mapDeps([0,1]),import.meta.url),loadKatexStyles=once(()=>{__vitePreload(()=>Promise.resolve().then(()=>katex_min),void 0,import.meta.url)}),loadRehypeRaw=()=>__vitePreload(()=>import("./index.DO5utP74.js"),__vite__mapDeps([2,1]),import.meta.url),loadRemarkEmoji=()=>__vitePreload(()=>import("./index.By55VdPY.js"),__vite__mapDeps([3,4]),import.meta.url);function isLoadedPlugin(n){return n!==null&&n!==LOAD_FAILED}function extractPlugin(n,o){const e=[];let t=n,c=0;for(;t&&typeof t=="object"&&"default"in t&&c<5;){const p=t.default;if(e.push(p),p===t)break;t=p,c+=1}e.push(n);for(const p of e)if(typeof p=="function")return p;return console.warn(`[StreamlitMarkdown] Failed to load ${o} plugin`),LOAD_FAILED}function wrapRehypePlugin(n,o){return e=>{const t=n(e);return(c,p)=>{if(!c)return c;try{return t(c,p)}catch(h){return console.error(`[StreamlitMarkdown] ${o} crashed while transforming`,h),c}}}}function wrapRemarkPlugin(n,o){return e=>{const t=n(e);return(c,p)=>{if(!c)return c;try{return t(c,p)}catch(h){return console.error(`[StreamlitMarkdown] ${o} crashed while transforming`,h),c}}}}function useLazyPlugin(n){const{key:o,needed:e,load:t,pluginName:c,onBeforeLoad:p}=n,h=e?pluginCache[o]:null,[y,g]=reactExports.useState(null);return reactExports.useEffect(()=>{if(!e||h||y)return;const $=loadingPromises[o];if($){let N=!1;return $.then(H=>{N||g(()=>H)}),()=>{N=!0}}p?.();let E=!1;const A=t().then(N=>extractPlugin(N,c)).then(N=>(pluginCache[o]=N,E||g(()=>N),N)).catch(()=>{const N=LOAD_FAILED;return pluginCache[o]=N,E||g(()=>N),N}).finally(()=>{loadingPromises[o]=null});return loadingPromises[o]=A,()=>{E=!0}},[e,h,y,o,t,c,p]),e?h??y:null}const StreamlitSyntaxHighlighter$1=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.DTKLpwhl.js"),[],import.meta.url));function containsEmojiShortcodes(n){return/:(?!material\/|streamlit:)[\w+-][\w_+-]*:/.test(n)}function containsMathSyntax(n){return new RegExp("\\$\\$[\\s\\S]+?\\$\\$|\\$(?!\\s)[^$\\n]+?(?<!\\s)\\$").test(n)}var Tags=function(n){return n.H1="h1",n.H2="h2",n.H3="h3",n}({});function rehypeSetCodeInlineProperty(){return n=>{visit(n,"element",(o,e,t)=>{o.tagName==="code"&&(t?.type==="element"&&t.tagName==="pre"?o.properties={...o.properties,inline:!1}:o.properties={...o.properties,inline:!0})})}}function createAnchorFromText(n){if(!n)return"";const o=slugify(n);return o.length>0?o:xxhash.h32(n,43981).toString(16)}function transformLinkUri(n){return n}const scrollNodeIntoView=once(n=>{n.scrollIntoView(!0)}),HeaderActionElements=({elementId:n,help:o,hideAnchor:e})=>{const t=useEmotionTheme();return!o&&e?jsx$1(Fragment,{}):jsxs(StyledHeadingActionElements,{"data-testid":"stHeaderActionElements",children:[o&&jsx$1(InlineTooltipIcon,{content:o}),n&&!e&&jsx$1(StyledLinkIcon,{href:`#${n}`,children:jsx$1(Link2,{size:convertRemToPx(t.iconSizes.base)})})]})},HeadingWithActionElements=({tag:n,anchor:o,help:e,hideAnchor:t,children:c,tagProps:p})=>{const h=reactExports.useContext(IsSidebarContext),y=reactExports.useContext(IsDialogContext),[g,$]=reactExports.useState(o),E=reactExports.useCallback(be=>{if(be===null)return;const we=o||createAnchorFromText(be.textContent);$(we);const $e=window.location.hash.slice(1);$e&&$e===we&&scrollNodeIntoView(be)},[o]),A=h||y,X=jsxs(n,{...p,...A?{}:{ref:E,id:g},children:[c,jsx$1(HeaderActionElements,{elementId:g,help:e,hideAnchor:t||A})]});return A?X:jsx$1(StyledHeadingWithActionElements,{"data-testid":"stHeadingWithActionElements",children:X})},CustomHeading=({node:n,children:o,...e})=>{const t=e["data-anchor"];return jsx$1(HeadingWithActionElements,{tag:n.tagName,anchor:t,tagProps:e,children:o})},CustomCodeTag=({inline:n,className:o,children:e,...t})=>{const c=/language-(\w+)/.exec(o||""),p=String(e??"").replace(/^\n/,"").replace(/\n$/,""),h=c?.[1]||"";return n?jsx$1(StyledInlineCode,{className:o,...omit(t,"node"),children:e}):jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(StreamlitSyntaxHighlighter$1,{language:h,showLineNumbers:!1,children:p})})})},CustomPreTag=({children:n})=>jsx$1(StyledPreWrapper,{"data-testid":"stMarkdownPre",children:n}),CustomMediaTag=({node:n,...o})=>{const e=useCrossOriginAttribute(o.src),t=n.tagName,c={...o,crossOrigin:e};return jsx$1(t,{...c})},CustomHelpIcon=({children:n})=>jsx$1(StyledHelpIconWrapper,{children:jsx$1(InlineTooltipIcon,{content:typeof n=="string"?n:""})}),BASE_RENDERERS={pre:CustomPreTag,code:CustomCodeTag,h1:CustomHeading,h2:CustomHeading,h3:CustomHeading,h4:CustomHeading,h5:CustomHeading,h6:CustomHeading,img:CustomMediaTag,video:CustomMediaTag,audio:CustomMediaTag,"streamlit-help-icon":CustomHelpIcon};function createColorMapping(n){const{red:o,orange:e,yellow:t,green:c,blue:p,violet:h,purple:y,gray:g,primary:$}=getMarkdownTextColors(n),{redbg:E,orangebg:A,yellowbg:N,greenbg:H,bluebg:Z,violetbg:X,purplebg:be,graybg:we,primarybg:$e}=getMarkdownBgColors(n);return new Map(Object.entries({red:`color: ${o}`,orange:`color: ${e}`,yellow:`color: ${t}`,blue:`color: ${p}`,green:`color: ${c}`,violet:`color: ${h}`,gray:`color: ${g}`,grey:`color: ${g}`,primary:`color: ${$}`,rainbow:`color: transparent; background-clip: text; -webkit-background-clip: text; background-image: linear-gradient(to right,
92
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(n,o){if(n){if(typeof n=="string")return _arrayLikeToArray$f(n,o);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$f(n,o)}}function _arrayLikeToArray$f(n,o){(o==null||o>n.length)&&(o=n.length);for(var e=0,t=new Array(o);e<o;e++)t[e]=n[e];return t}function _iterableToArrayLimit$f(n,o){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],c=!0,p=!1,h,y;try{for(e=e.call(n);!(c=(h=e.next()).done)&&(t.push(h.value),!(o&&t.length===o));c=!0);}catch(g){p=!0,y=g}finally{try{!c&&e.return!=null&&e.return()}finally{if(p)throw y}}return t}}function _arrayWithHoles$f(n){if(Array.isArray(n))return n}var OPPOSITE_POSITIONS={top:"bottom",bottom:"top",right:"left",left:"right"};function getOppositePosition(n){return OPPOSITE_POSITIONS[n]}function isVerticalPosition(n){return n==="top"||n==="bottom"}function capitalize(n){return n.charAt(0).toUpperCase()+n.slice(1)}function fromPopperPlacement(n){var o=n.replace(/(top|bottom)-start$/,"$1Left").replace(/(top|bottom)-end$/,"$1Right").replace(/(left|right)-start$/,"$1Top").replace(/(left|right)-end$/,"$1Bottom");return PLACEMENT[o]||null}function splitPlacement(n){var o=n.match(/^([a-z]+)([A-Z][a-z]+)?/)||[];return o.slice(1,3).filter(Boolean).map(function(e){return e.toLowerCase()})}function getPopoverMarginStyles(n,o,e){var t=splitPlacement(o),c=_slicedToArray$f(t,1),p=c[0],h=getOppositePosition(p);if(!h)return null;var y="margin".concat(capitalize(h));return _defineProperty$l({},y,"".concat(n+e,"px"))}function getStartPosition(n,o,e,t){n=_objectSpread$i({},n);var c=splitPlacement(o),p=_slicedToArray$f(c,1),h=p[0],y=(e>0?e:t)*2;return isVerticalPosition(h)?n.top+=h==="top"?y:-y:n.left+=h==="left"?y:-y,"translate3d(".concat(n.left,"px, ").concat(n.top,"px, 0)")}function getEndPosition(n){return"translate3d(".concat(n.left,"px, ").concat(n.top,"px, 0)")}function getArrowPositionStyles(n,o){var e,t=splitPlacement(o),c=_slicedToArray$f(t,1),p=c[0],h=getOppositePosition(p);if(!h)return null;var y=isVerticalPosition(p)?"left":"top";return e={},_defineProperty$l(e,y,"".concat(n[y],"px")),_defineProperty$l(e,h,"-".concat(ARROW_SIZE-2,"px")),e}function ownKeys$j(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$h(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$j(Object(e),!0).forEach(function(t){_defineProperty$k(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$j(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$k(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}function getBodyStyles(n){var o=n.$animationDuration,e=n.$isOpen,t=n.$isAnimating,c=n.$placement,p=n.$popoverOffset,h=n.$showArrow,y=n.$theme,g=n.$popoverMargin,$=n.$isHoverTrigger;return _objectSpread$h(_objectSpread$h({position:"absolute",top:0,left:0,backgroundColor:y.colors.backgroundTertiary,borderTopLeftRadius:y.borders.popoverBorderRadius,borderTopRightRadius:y.borders.popoverBorderRadius,borderBottomRightRadius:y.borders.popoverBorderRadius,borderBottomLeftRadius:y.borders.popoverBorderRadius,boxShadow:y.lighting.shadow600,transitionProperty:"opacity,transform",transitionDuration:t?e?"0.1s":"".concat(o,"ms"):"0s",transitionTimingFunction:e?y.animation.easeOutCurve:y.animation.easeInCurve,opacity:t&&e?1:0,transform:t&&e?getEndPosition(p):getStartPosition(p,c,h?ARROW_SIZE:0,g)},getPopoverMarginStyles(h?ARROW_SIZE:0,c,g)),$?{animationDuration:".1s",animationName:{"0%":{pointerEvents:"none"},"99%":{pointerEvents:"none"},"100%":{pointerEvents:"auto"}}}:{})}var Body$2=styled$1("div",getBodyStyles);Body$2.displayName="Body";Body$2.displayName="Body";function getArrowStyles(n){var o=n.$arrowOffset,e=n.$placement,t=n.$theme;return _objectSpread$h({backgroundColor:t.colors.backgroundTertiary,boxShadow:t.lighting.shadow600,width:"".concat(ARROW_WIDTH,"px"),height:"".concat(ARROW_WIDTH,"px"),transform:"rotate(45deg)",position:"absolute"},getArrowPositionStyles(o,e))}var Arrow$1=styled$1("div",getArrowStyles);Arrow$1.displayName="Arrow";Arrow$1.displayName="Arrow";function getInnerStyles(n){var o=n.$theme;return{backgroundColor:o.colors.backgroundTertiary,borderTopLeftRadius:o.borders.popoverBorderRadius,borderTopRightRadius:o.borders.popoverBorderRadius,borderBottomRightRadius:o.borders.popoverBorderRadius,borderBottomLeftRadius:o.borders.popoverBorderRadius,color:o.colors.contentPrimary,position:"relative"}}var Inner$1=styled$1("div",getInnerStyles);Inner$1.displayName="Inner";Inner$1.displayName="Inner";var Padding=styled$1("div",{paddingLeft:"12px",paddingTop:"12px",paddingRight:"12px",paddingBottom:"12px"});Padding.displayName="Padding";Padding.displayName="Padding";var Hidden=styled$1("div",{display:"none"});Hidden.displayName="Hidden";Hidden.displayName="Hidden";var baseDefaultProps$1={accessibilityType:ACCESSIBILITY_TYPE.menu,focusLock:!1,autoFocus:!0,returnFocus:!0,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT.auto,showArrow:!1,triggerType:TRIGGER_TYPE.click,renderAll:!1};function ownKeys$i(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$g(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$i(Object(e),!0).forEach(function(t){_defineProperty$j(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$i(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _extends$l(){return _extends$l=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$l.apply(this,arguments)}function _typeof$a(n){"@babel/helpers - typeof";return _typeof$a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof$a(n)}function _classCallCheck$8(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$8(n,o){for(var e=0;e<o.length;e++){var t=o[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$8(n,o,e){return o&&_defineProperties$8(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$8(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),o&&_setPrototypeOf$8(n,o)}function _setPrototypeOf$8(n,o){return _setPrototypeOf$8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$8(n,o)}function _createSuper$8(n){var o=_isNativeReflectConstruct$8();return function(){var t=_getPrototypeOf$8(n),c;if(o){var p=_getPrototypeOf$8(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$8(this,c)}}function _possibleConstructorReturn$8(n,o){if(o&&(_typeof$a(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$9(n)}function _assertThisInitialized$9(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$8(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$8(n){return _getPrototypeOf$8=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$8(n)}function _defineProperty$j(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var PopoverInner=function(n){_inherits$8(e,n);var o=_createSuper$8(e);function e(){var t;_classCallCheck$8(this,e);for(var c=arguments.length,p=new Array(c),h=0;h<c;h++)p[h]=arguments[h];return t=o.call.apply(o,[this].concat(p)),_defineProperty$j(_assertThisInitialized$9(t),"animateInTimer",void 0),_defineProperty$j(_assertThisInitialized$9(t),"animateOutTimer",void 0),_defineProperty$j(_assertThisInitialized$9(t),"animateOutCompleteTimer",void 0),_defineProperty$j(_assertThisInitialized$9(t),"onMouseEnterTimer",void 0),_defineProperty$j(_assertThisInitialized$9(t),"onMouseLeaveTimer",void 0),_defineProperty$j(_assertThisInitialized$9(t),"anchorRef",reactExports.createRef()),_defineProperty$j(_assertThisInitialized$9(t),"popperRef",reactExports.createRef()),_defineProperty$j(_assertThisInitialized$9(t),"arrowRef",reactExports.createRef()),_defineProperty$j(_assertThisInitialized$9(t),"state",t.getDefaultState(t.props)),_defineProperty$j(_assertThisInitialized$9(t),"animateIn",function(){t.props.isOpen&&t.setState({isAnimating:!0})}),_defineProperty$j(_assertThisInitialized$9(t),"animateOut",function(){t.props.isOpen||(t.setState({isAnimating:!0}),t.animateOutCompleteTimer=setTimeout(function(){t.setState({isAnimating:!1,placement:t.props.placement})},t.props.animateOutTime||ANIMATE_OUT_TIME))}),_defineProperty$j(_assertThisInitialized$9(t),"onAnchorClick",function(y){t.props.onClick&&t.props.onClick(y)}),_defineProperty$j(_assertThisInitialized$9(t),"onAnchorMouseEnter",function(y){t.onMouseLeaveTimer&&clearTimeout(t.onMouseLeaveTimer),t.triggerOnMouseEnterWithDelay(y)}),_defineProperty$j(_assertThisInitialized$9(t),"onAnchorMouseLeave",function(y){t.onMouseEnterTimer&&clearTimeout(t.onMouseEnterTimer),t.triggerOnMouseLeaveWithDelay(y)}),_defineProperty$j(_assertThisInitialized$9(t),"onPopoverMouseEnter",function(){t.onMouseLeaveTimer&&clearTimeout(t.onMouseLeaveTimer)}),_defineProperty$j(_assertThisInitialized$9(t),"onPopoverMouseLeave",function(y){t.triggerOnMouseLeaveWithDelay(y)}),_defineProperty$j(_assertThisInitialized$9(t),"onPopperUpdate",function(y,g){var $=fromPopperPlacement(g.placement)||PLACEMENT.top;return t.setState({arrowOffset:y.arrow,popoverOffset:y.popper,placement:$}),t.animateInTimer=setTimeout(t.animateIn,ANIMATE_IN_TIME),g}),_defineProperty$j(_assertThisInitialized$9(t),"triggerOnMouseLeave",function(y){t.props.onMouseLeave&&t.props.onMouseLeave(y)}),_defineProperty$j(_assertThisInitialized$9(t),"triggerOnMouseEnter",function(y){t.props.onMouseEnter&&t.props.onMouseEnter(y)}),_defineProperty$j(_assertThisInitialized$9(t),"onDocumentClick",function(y){var g=y.composedPath?y.composedPath()[0]:y.target,$=t.popperRef.current,E=t.anchorRef.current;!$||$===g||g instanceof Node&&$.contains(g)||!E||E===g||g instanceof Node&&E.contains(g)||t.props.onClickOutside&&t.props.onClickOutside(y)}),t}return _createClass$8(e,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(c,p){this.init(c,p),this.props.accessibilityType!==ACCESSIBILITY_TYPE.tooltip&&this.props.autoFocus&&!this.state.autoFocusAfterPositioning&&this.popperRef.current!==null&&this.popperRef.current.getBoundingClientRect().top>0&&this.setState({autoFocusAfterPositioning:!0})}},{key:"init",value:function(c,p){if(this.props.isOpen!==c.isOpen||this.state.isMounted!==p.isMounted||this.state.isLayerMounted!==p.isLayerMounted){if(this.props.isOpen&&this.state.isLayerMounted){this.clearTimers();return}if(!this.props.isOpen&&c.isOpen){this.animateOutTimer=setTimeout(this.animateOut,20);return}}}},{key:"componentWillUnmount",value:function(){this.clearTimers()}},{key:"getDefaultState",value:function(c){return{isAnimating:!1,arrowOffset:{left:0,top:0},popoverOffset:{left:0,top:0},placement:c.placement,isMounted:!1,isLayerMounted:!1,autoFocusAfterPositioning:!1}}},{key:"clearTimers",value:function(){[this.animateInTimer,this.animateOutTimer,this.animateOutCompleteTimer,this.onMouseEnterTimer,this.onMouseLeaveTimer].forEach(function(c){c&&clearTimeout(c)})}},{key:"triggerOnMouseLeaveWithDelay",value:function(c){var p=this,h=this.props.onMouseLeaveDelay;if(h){this.onMouseLeaveTimer=setTimeout(function(){return p.triggerOnMouseLeave(c)},h);return}this.triggerOnMouseLeave(c)}},{key:"triggerOnMouseEnterWithDelay",value:function(c){var p=this,h=this.props.onMouseEnterDelay;if(h){this.onMouseEnterTimer=setTimeout(function(){return p.triggerOnMouseEnter(c)},h);return}this.triggerOnMouseEnter(c)}},{key:"isClickTrigger",value:function(){return this.props.triggerType===TRIGGER_TYPE.click}},{key:"isHoverTrigger",value:function(){return this.props.triggerType===TRIGGER_TYPE.hover}},{key:"isAccessibilityTypeMenu",value:function(){return this.props.accessibilityType===ACCESSIBILITY_TYPE.menu}},{key:"isAccessibilityTypeTooltip",value:function(){return this.props.accessibilityType===ACCESSIBILITY_TYPE.tooltip}},{key:"getAnchorIdAttr",value:function(){var c=this.getPopoverIdAttr();return c?"".concat(c,"__anchor"):null}},{key:"getPopoverIdAttr",value:function(){return this.props.id||null}},{key:"getAnchorProps",value:function(){var c=this.props.isOpen,p={ref:this.anchorRef},h=this.getPopoverIdAttr();if(this.isAccessibilityTypeMenu()){var y=this.isClickTrigger()?"aria-controls":"aria-owns";p[y]=c?h:null,p["aria-haspopup"]=!0,p["aria-expanded"]=!!c}else this.isAccessibilityTypeTooltip()&&(p.id=this.getAnchorIdAttr(),p["aria-describedby"]=c?h:null);return this.isHoverTrigger()?(p.onMouseEnter=this.onAnchorMouseEnter,p.onMouseLeave=this.onAnchorMouseLeave,p.onBlur=this.props.onBlur,p.onFocus=this.props.onFocus):p.onClick=this.onAnchorClick,p}},{key:"getPopoverBodyProps",value:function(){var c={},p=this.getPopoverIdAttr();return this.isAccessibilityTypeMenu()?c.id=p:this.isAccessibilityTypeTooltip()&&(c.id=p,c.role="tooltip"),this.isHoverTrigger()&&(c.onMouseEnter=this.onPopoverMouseEnter,c.onMouseLeave=this.onPopoverMouseLeave),c}},{key:"getSharedProps",value:function(){var c=this.props,p=c.isOpen,h=c.showArrow,y=c.popoverMargin,g=y===void 0?POPOVER_MARGIN:y,$=this.state,E=$.isAnimating,A=$.arrowOffset,N=$.popoverOffset,H=$.placement;return{$showArrow:!!h,$arrowOffset:A,$popoverOffset:N,$placement:H,$isAnimating:E,$animationDuration:this.props.animateOutTime||ANIMATE_OUT_TIME,$isOpen:p,$popoverMargin:g,$isHoverTrigger:this.isHoverTrigger()}}},{key:"getAnchorFromChildren",value:function(){var c=this.props.children,p=reactExports.Children.toArray(c);return p.length!==1&&console.error("[baseui] Exactly 1 child must be passed to Popover/Tooltip, found ".concat(p.length," children")),p[0]}},{key:"renderAnchor",value:function(){var c=this.getAnchorFromChildren();if(!c)return null;var p=reactExports.isValidElement(c),h=this.getAnchorProps();return _typeof$a(c)==="object"&&p?reactExports.cloneElement(c,h):reactExports.createElement("span",_extends$l({key:"popover-anchor"},h),c)}},{key:"renderPopover",value:function(c){var p=this.props,h=p.showArrow,y=p.overrides,g=y===void 0?{}:y,$=g.Arrow,E=g.Body,A=g.Inner,N=getOverride($)||Arrow$1,H=getOverride(E)||Body$2,Z=getOverride(A)||Inner$1,X=this.getSharedProps(),be=this.getPopoverBodyProps();return reactExports.createElement(H,_extends$l({key:"popover-body",ref:this.popperRef,"data-baseweb":this.props["data-baseweb"]||"popover"},be,X,getOverrideProps(E)),h?reactExports.createElement(N,_extends$l({key:"popover-arrow",ref:this.arrowRef},X,getOverrideProps($))):null,reactExports.createElement(Z,_extends$l({},X,getOverrideProps(A)),c))}},{key:"renderContent",value:function(){var c=this.props.content;return typeof c=="function"?c():c}},{key:"render",value:function(){var c=this,p=this.state.isMounted&&(this.props.isOpen||this.state.isAnimating),h=[this.renderAnchor()],y=p||this.props.renderAll?this.renderContent():null,g={modifiers:{preventOverflow:{enabled:!this.props.ignoreBoundary,padding:0}}};return y&&(p?h.push(reactExports.createElement(Layer,{key:"new-layer",mountNode:this.props.mountNode,onEscape:this.props.onEsc,onDocumentClick:this.isHoverTrigger()?void 0:this.onDocumentClick,isHoverLayer:this.isHoverTrigger(),onMount:function(){return c.setState({isLayerMounted:!0})},onUnmount:function(){return c.setState({isLayerMounted:!1})}},reactExports.createElement(Tether,{anchorRef:this.anchorRef.current,arrowRef:this.arrowRef.current,popperRef:this.popperRef.current,popperOptions:_objectSpread$g(_objectSpread$g({},g),this.props.popperOptions),onPopperUpdate:this.onPopperUpdate,placement:this.state.placement},this.props.focusLock&&this.props.accessibilityType!==ACCESSIBILITY_TYPE.tooltip?reactExports.createElement(FocusLockCombination,{disabled:!this.props.focusLock,noFocusGuards:!1,returnFocus:!this.isHoverTrigger()&&this.props.returnFocus,autoFocus:this.state.autoFocusAfterPositioning,crossFrame:!1,focusOptions:this.props.focusOptions},this.renderPopover(y)):reactExports.createElement(MoveFocusInside,{disabled:!this.props.autoFocus||!this.state.autoFocusAfterPositioning},this.renderPopover(y))))):h.push(reactExports.createElement(Hidden,{key:"hidden-layer"},y))),h}}]),e}(reactExports.Component);_defineProperty$j(PopoverInner,"defaultProps",baseDefaultProps$1);var Popover$2=function n(o){var e=o.innerRef,t=useUID();return reactExports.createElement(PopoverInner,_extends$l({id:o.id||t,ref:e},o))};Popover$2.defaultProps=baseDefaultProps$1;var _excluded$l=["children"];function _objectWithoutProperties$j(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$i(n,o),t,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(n);for(c=0;c<p.length;c++)t=p[c],!(o.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$i(n,o){if(n==null)return{};var e={},t=Object.keys(n),c,p;for(p=0;p<t.length;p++)c=t[p],!(o.indexOf(c)>=0)&&(e[c]=n[c]);return e}function StatefulPopover(n){var o=n.children,e=_objectWithoutProperties$j(n,_excluded$l);return reactExports.createElement(StatefulContainer$1,e,function(t){return reactExports.createElement(Popover$2,t,o)})}StatefulPopover.defaultProps={accessibilityType:ACCESSIBILITY_TYPE.menu,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT.auto,showArrow:!1,triggerType:TRIGGER_TYPE.click,dismissOnClickOutside:!0,dismissOnEsc:!0,stateReducer:function n(o,e){return e},popoverMargin:POPOVER_MARGIN};var baseDefaultProps={accessibilityType:ACCESSIBILITY_TYPE.tooltip,focusLock:!1,autoFocus:!1,returnFocus:!1,onMouseEnterDelay:200,onMouseLeaveDelay:200,overrides:{},placement:PLACEMENT.auto,popoverMargin:0,showArrow:!1,triggerType:TRIGGER_TYPE.hover,renderAll:!1};function _typeof$9(n){"@babel/helpers - typeof";return _typeof$9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof$9(n)}function ownKeys$h(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$f(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$h(Object(e),!0).forEach(function(t){_defineProperty$i(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$h(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _classCallCheck$7(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(n,o){for(var e=0;e<o.length;e++){var t=o[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$7(n,o,e){return o&&_defineProperties$7(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$7(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),o&&_setPrototypeOf$7(n,o)}function _setPrototypeOf$7(n,o){return _setPrototypeOf$7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$7(n,o)}function _createSuper$7(n){var o=_isNativeReflectConstruct$7();return function(){var t=_getPrototypeOf$7(n),c;if(o){var p=_getPrototypeOf$7(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$7(this,c)}}function _possibleConstructorReturn$7(n,o){if(o&&(_typeof$9(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$8(n)}function _assertThisInitialized$8(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$7(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$7(n){return _getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$7(n)}function _defineProperty$i(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var StatefulContainer=function(n){_inherits$7(e,n);var o=_createSuper$7(e);function e(){return _classCallCheck$7(this,e),o.apply(this,arguments)}return _createClass$7(e,[{key:"render",value:function(){return reactExports.createElement(StatefulContainer$1,this.props)}}]),e}(reactExports.Component);_defineProperty$i(StatefulContainer,"defaultProps",_objectSpread$f({},baseDefaultProps));function ownKeys$g(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$e(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$g(Object(e),!0).forEach(function(t){_defineProperty$h(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$g(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$h(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var Body$1=styled$1("div",function(n){return _objectSpread$e(_objectSpread$e({},getBodyStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground,borderTopLeftRadius:n.$theme.borders.radius300,borderTopRightRadius:n.$theme.borders.radius300,borderBottomRightRadius:n.$theme.borders.radius300,borderBottomLeftRadius:n.$theme.borders.radius300,boxShadow:n.$theme.lighting.shadow400,color:n.$theme.colors.tooltipText,transitionProperty:"opacity",transform:getEndPosition(n.$popoverOffset)})});Body$1.displayName="Body";Body$1.displayName="Body";var Inner=styled$1("div",function(n){return _objectSpread$e(_objectSpread$e(_objectSpread$e({},getInnerStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground,borderTopLeftRadius:n.$theme.borders.radius300,borderTopRightRadius:n.$theme.borders.radius300,borderBottomRightRadius:n.$theme.borders.radius300,borderBottomLeftRadius:n.$theme.borders.radius300,paddingTop:n.$theme.sizing.scale300,paddingBottom:n.$theme.sizing.scale300,paddingLeft:n.$theme.sizing.scale600,paddingRight:n.$theme.sizing.scale600},n.$theme.typography.font150),{},{color:n.$theme.colors.tooltipText})});Inner.displayName="Inner";Inner.displayName="Inner";var Arrow=styled$1("div",function(n){return _objectSpread$e(_objectSpread$e({},getArrowStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground})});Arrow.displayName="Arrow";Arrow.displayName="Arrow";function _typeof$8(n){"@babel/helpers - typeof";return _typeof$8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof$8(n)}function ownKeys$f(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$d(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$f(Object(e),!0).forEach(function(t){_defineProperty$g(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$f(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _extends$k(){return _extends$k=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$k.apply(this,arguments)}function _classCallCheck$6(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(n,o){for(var e=0;e<o.length;e++){var t=o[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$6(n,o,e){return o&&_defineProperties$6(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$6(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),o&&_setPrototypeOf$6(n,o)}function _setPrototypeOf$6(n,o){return _setPrototypeOf$6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$6(n,o)}function _createSuper$6(n){var o=_isNativeReflectConstruct$6();return function(){var t=_getPrototypeOf$6(n),c;if(o){var p=_getPrototypeOf$6(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$6(this,c)}}function _possibleConstructorReturn$6(n,o){if(o&&(_typeof$8(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$7(n)}function _assertThisInitialized$7(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(n){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$6(n)}function _defineProperty$g(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var Tooltip$2=function(n){_inherits$6(e,n);var o=_createSuper$6(e);function e(){return _classCallCheck$6(this,e),o.apply(this,arguments)}return _createClass$6(e,[{key:"render",value:function(){var c=mergeOverrides({Arrow,Body:Body$1,Inner},this.props.overrides);return reactExports.createElement(Popover$2,_extends$k({autoFocus:!1,"data-baseweb":"tooltip"},this.props,{overrides:c}))}}]),e}(reactExports.Component);_defineProperty$g(Tooltip$2,"defaultProps",_objectSpread$d({},baseDefaultProps));var _excluded$k=["children"];function _objectWithoutProperties$i(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$h(n,o),t,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(n);for(c=0;c<p.length;c++)t=p[c],!(o.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$h(n,o){if(n==null)return{};var e={},t=Object.keys(n),c,p;for(p=0;p<t.length;p++)c=t[p],!(o.indexOf(c)>=0)&&(e[c]=n[c]);return e}function StatefulTooltip(n){var o=n.children,e=_objectWithoutProperties$i(n,_excluded$k);return reactExports.createElement(StatefulContainer,e,function(t){return reactExports.createElement(Tooltip$2,t,o)})}StatefulTooltip.defaultProps=StatefulContainer.defaultProps;const StyledWrapper=styled("div",{target:"etx0m6x0"})({display:"table",tableLayout:"fixed",width:"100%"}),StyledEllipsizedDiv=styled("div",{target:"etx0m6x1"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell"}),StyledTooltipContentWrapper=styled("div",{target:"etx0m6x2"})(({theme:n})=>({boxSizing:"border-box",fontSize:`${n.fontSizes.sm}`,maxWidth:`calc(${n.sizes.contentMaxWidth} - 2 * ${n.spacing.threeXL})`,maxHeight:n.sizes.maxTooltipHeight,overflow:"auto",padding:`${n.spacing.xs} ${n.spacing.md}`,[`@media (max-width: ${n.breakpoints.sm})`]:{maxWidth:`calc(100% - ${n.spacing.threeXL})`},img:{maxWidth:"100%"},"*":{fontSize:n.fontSizes.sm}}));function useTooltipMeasurementSideEffect(n,o){const{innerWidth:e}=useWindowDimensionsContext();reactExports.useEffect(()=>{const t=n?.parentElement;if(!t)return;(async()=>{const p=()=>{const N=t.getBoundingClientRect();return N.x!==0||N.y!==0?N:null};let h=null,y=0;const g=5;for(;!h&&y<g;)h=p(),h||(y++,await new Promise(N=>requestAnimationFrame(N)));h||(h=t.getBoundingClientRect());const $=h.x,E=$+h.width-e,A=t.parentElement;if(E>0&&A){const N=new DOMMatrix(window.getComputedStyle(A)?.transform);A.style.transform=`translate3d(${N.e-E}px, ${N.f}px, 0px)`}$<0&&(t.style.left=`${-$}px`)})()},[n,o,e])}var Placement=function(n){return n.AUTO="auto",n.TOP_LEFT="topLeft",n.TOP="top",n.TOP_RIGHT="topRight",n.RIGHT_TOP="rightTop",n.RIGHT="right",n.RIGHT_BOTTOM="rightBottom",n.BOTTOM_RIGHT="bottomRight",n.BOTTOM="bottom",n.BOTTOM_LEFT="bottomLeft",n.LEFT_BOTTOM="leftBottom",n.LEFT="left",n.LEFT_TOP="leftTop",n}({});const generateDefaultTooltipOverrides=(n,o)=>{const{colors:e,fontSizes:t,radii:c,fontWeights:p}=n;return{Body:{style:{borderTopLeftRadius:c.default,borderTopRightRadius:c.default,borderBottomLeftRadius:c.default,borderBottomRightRadius:c.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:hasLightBackgroundColor(n)?e.bgColor:e.secondaryBg,color:e.bodyText,fontSize:t.sm,fontWeight:p.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"},...o}}};function Tooltip({content:n,placement:o,children:e,inline:t,style:c,onMouseEnterDelay:p,overrides:h,containerWidth:y,error:g}){const $=useEmotionTheme(),[E,A]=reactExports.useState(null),[N,H]=reactExports.useState(!1),Z=reactExports.useCallback(()=>{H(!0)},[]),X=reactExports.useCallback(()=>{H(!1)},[]);useTooltipMeasurementSideEffect(E,N);const be=generateDefaultTooltipOverrides($,h);return jsx$1(StatefulTooltip,{onOpen:Z,onClose:X,content:n?jsx$1(StyledTooltipContentWrapper,{className:g?"stTooltipErrorContent":"stTooltipContent","data-testid":g?"stTooltipErrorContent":"stTooltipContent",ref:A,children:n}):null,placement:PLACEMENT[o],accessibilityType:ACCESSIBILITY_TYPE.tooltip,showArrow:!1,popoverMargin:10,onMouseEnterDelay:p,overrides:be,children:jsx$1("div",{style:{display:"flex",flexDirection:"row",justifyContent:t?"flex-end":"",width:y?"100%":"auto",...c},"data-testid":g?"stTooltipErrorHoverTarget":"stTooltipHoverTarget",className:g?"stTooltipErrorHoverTarget":"stTooltipHoverTarget",children:e})})}const Tooltip$1=reactExports.memo(Tooltip);function OverflowTooltip({content:n,placement:o,children:e,inline:t,style:c}){const p=React.useRef(null),[h,y]=reactExports.useState(!1);return React.useEffect(()=>{const g=p?.current?p.current.offsetWidth<p.current.scrollWidth:!1;g!==h&&y(g)},[e,h]),jsx$1(Tooltip$1,{content:h?n:"",placement:o,inline:t,children:jsx$1(StyledWrapper,{children:jsx$1(StyledEllipsizedDiv,{ref:p,style:c,children:e})})})}function TooltipIcon({placement:n=Placement.AUTO,isLatex:o=!1,content:e,children:t,markdownProps:c,onMouseEnterDelay:p,containerWidth:h=!1}){const y=useEmotionTheme();return jsx$1(StyledTooltipIconWrapper,{className:"stTooltipIcon","data-testid":"stTooltipIcon",isLatex:o,children:jsx$1(Tooltip$1,{content:jsx$1(StreamlitMarkdown$1,{style:{fontSize:y.fontSizes.sm},source:e,allowHTML:!1,...c||{}}),placement:n,onMouseEnterDelay:p,inline:!0,containerWidth:h,children:t||jsx$1(HelpCircle,{className:"icon",size:convertRemToPx(y.iconSizes.base)})})})}const InlineTooltipIcon=({placement:n=Placement.TOP_RIGHT,isLatex:o=!1,content:e,children:t,markdownProps:c})=>jsx$1(StyledLabelHelpInline,{children:jsx$1(TooltipIcon,{placement:n,isLatex:o,content:e,markdownProps:c,children:t})});function convertRemToEm(n){return n.replace(/rem$/,"em")}function sharedMarkdownStyle(n){return{a:{color:n.colors.link,textDecoration:n.linkUnderline?"underline":"none"}}}function convertFontSizes(n,o,e){if(o){const t=roundFontSizeToNearestEighth(parseFloat(n)*.65),c=`${Math.max(t,.75)}rem`;return e?convertRemToEm(c):c}return e?convertRemToEm(n):n}function getMarkdownHeadingDefinitions(n,o,e){return{"h1, h2, h3, h4, h5, h6":{fontFamily:n.genericFonts.headingFont,lineHeight:n.lineHeights.headings,margin:0,color:"inherit"},h1:{fontSize:convertFontSizes(n.fontSizes.h1FontSize,o,e),fontWeight:n.fontWeights.h1FontWeight,padding:`${n.spacing.xl} 0 ${n.spacing.lg} 0`},"h1 b, h1 strong":{fontWeight:n.fontWeights.h1FontWeight},"h2, h3":{letterSpacing:"-0.005em"},h2:{fontSize:convertFontSizes(n.fontSizes.h2FontSize,o,e),fontWeight:n.fontWeights.h2FontWeight,padding:`${n.spacing.lg} 0 ${n.spacing.lg} 0`},h3:{fontSize:convertFontSizes(n.fontSizes.h3FontSize,o,e),fontWeight:n.fontWeights.h3FontWeight,padding:`${n.spacing.md} 0 ${n.spacing.lg} 0`},h4:{fontSize:convertFontSizes(n.fontSizes.h4FontSize,o,e),fontWeight:n.fontWeights.h4FontWeight,padding:`${n.spacing.sm} 0 ${n.spacing.lg} 0`},h5:{fontSize:convertFontSizes(n.fontSizes.h5FontSize,o,e),fontWeight:n.fontWeights.h5FontWeight,padding:`${n.spacing.xs} 0 ${n.spacing.lg} 0`},h6:{fontSize:convertFontSizes(n.fontSizes.h6FontSize,o,e),fontWeight:n.fontWeights.h6FontWeight,padding:`${n.spacing.twoXS} 0 ${n.spacing.lg} 0`}}}const StyledStreamlitMarkdown=styled("div",{target:"eqpbrs00"})(({theme:n,isCaption:o,isInDialog:e,isLabel:t,inheritFont:c,boldLabel:p,largerLabel:h,isToast:y})=>{const g=t&&!h||y||o;return{fontFamily:c?"inherit":n.genericFonts.bodyFont,fontSize:c?"inherit":g?n.fontSizes.sm:n.fontSizes.md,marginBottom:t?"":`-${n.spacing.lg}`,opacity:o?.6:void 0,color:"inherit",maxWidth:"100%",width:t?"":"100%",overflowWrap:"break-word",...sharedMarkdownStyle(n),...getMarkdownHeadingDefinitions(n,e,o),"&:has(.katex-display)":{overflowX:"hidden"},p:{wordBreak:"break-word",marginBottom:t?n.spacing.none:"",fontWeight:c?"inherit":p?n.fontWeights.bold:"",marginTop:n.spacing.none,marginLeft:n.spacing.none,marginRight:n.spacing.none},img:{maxWidth:"100%",maxHeight:t?"1em":void 0,verticalAlign:"middle",objectFit:"scale-down"},li:{margin:"0.2em 0 0.2em 1.15em",padding:"0 0 0 0.3em"},"li.task-list-item":{listStyleType:"none",padding:"0",marginLeft:"0","input[type='checkbox']":{verticalAlign:"middle",margin:"0 0.35em 0.1em 0"}},blockquote:{margin:"1em 0 1em 0",padding:"0 0 0 0.75em",borderLeft:`0.15em solid ${n.colors.borderColor}`,opacity:.6},"b, strong":{fontWeight:n.fontWeights.bold},"b code, strong code":{fontWeight:n.fontWeights.codeBold},hr:{margin:"2em 0",padding:0,color:"inherit",backgroundColor:"transparent",border:"none",borderBottom:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,"&:not([size])":{height:n.sizes.borderWidth}},table:{display:"table",borderCollapse:"collapse",marginBottom:n.spacing.lg},tr:{borderTop:`${n.sizes.borderWidth} solid ${n.colors.dataframeBorderColor}`},th:{textAlign:"inherit"},"th, td":{padding:`${n.spacing.xs} ${n.spacing.md}`,border:`${n.sizes.borderWidth} solid ${n.colors.dataframeBorderColor}`},"span.stMarkdownColoredBackground":{borderRadius:n.radii.md,padding:`${n.spacing.threeXS} ${n.spacing.twoXS}`,margin:n.spacing.none,boxDecorationBreak:"clone"},"span.stMarkdownBadge":{borderRadius:n.radii.md,padding:`0 ${n.spacing.twoXS}`,margin:`0 ${n.spacing.px}`,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",display:"inline-block",verticalAlign:"middle"},"p, ol, ul, dl, li":{fontSize:"inherit"},"& > ul, & > ol":{display:"block",width:"fit-content",textAlign:"left"},"li > ul, li > ol":{display:"block"},".katex-display":{overflowX:"auto",overflowY:"hidden"},".katex":{fontWeight:n.fontWeights.normal}}}),StyledLinkIcon=styled("a",{target:"eqpbrs01"})(({theme:n})=>({lineHeight:0,display:"inline-flex",alignItems:"center",justifyContent:"center",svg:{stroke:n.colors.fadedText60,strokeWidth:2.25},"&:hover svg":{stroke:n.colors.bodyText}})),StyledHeadingWithActionElements=styled("div",{target:"eqpbrs02"})(({theme:n})=>({"h1, h2, h3, h4, h5, h6, span":{scrollMarginTop:n.sizes.headerHeight},...sharedMarkdownStyle(n),wordBreak:"break-word",textWrap:"pretty",[StyledLinkIcon]:{visibility:"hidden"},"&:hover":{[StyledLinkIcon]:{visibility:"visible"}}})),StyledHeadingActionElements=styled("span",{target:"eqpbrs03"})(({theme:n})=>({marginLeft:n.spacing.sm,display:"inline-flex",gap:n.spacing.sm,verticalAlign:"middle","& > *":{marginLeft:"0 !important"}})),StyledHeaderDivider=styled("hr",{target:"eqpbrs04"})(({theme:n,rainbow:o,color:e})=>({height:`${n.spacing.threeXS} !important`,marginTop:n.spacing.sm,marginBottom:n.spacing.none,border:"none",borderRadius:n.radii.full,...o?{background:e}:{backgroundColor:e}})),StyledPreWrapper=styled("div",{target:"eqpbrs05"})(({theme:n})=>({marginBottom:n.spacing.lg})),StyledHelpIconWrapper=styled("span",{target:"eqpbrs06"})({display:"inline-block",verticalAlign:"middle",transform:"translateY(-0.1em)"}),LOAD_FAILED=Symbol("plugin_load_failed"),pluginCache={katex:null,raw:null,emoji:null},loadingPromises={katex:null,raw:null,emoji:null},loadKatexPlugin=()=>__vitePreload(()=>import("./index.Cd1D2eGF.js"),__vite__mapDeps([0,1]),import.meta.url),loadKatexStyles=once(()=>{__vitePreload(()=>Promise.resolve().then(()=>katex_min),void 0,import.meta.url)}),loadRehypeRaw=()=>__vitePreload(()=>import("./index.BNMLO-0p.js"),__vite__mapDeps([2,1]),import.meta.url),loadRemarkEmoji=()=>__vitePreload(()=>import("./index.W-bl3NDo.js"),__vite__mapDeps([3,4]),import.meta.url);function isLoadedPlugin(n){return n!==null&&n!==LOAD_FAILED}function extractPlugin(n,o){const e=[];let t=n,c=0;for(;t&&typeof t=="object"&&"default"in t&&c<5;){const p=t.default;if(e.push(p),p===t)break;t=p,c+=1}e.push(n);for(const p of e)if(typeof p=="function")return p;return console.warn(`[StreamlitMarkdown] Failed to load ${o} plugin`),LOAD_FAILED}function wrapRehypePlugin(n,o){return e=>{const t=n(e);return(c,p)=>{if(!c)return c;try{return t(c,p)}catch(h){return console.error(`[StreamlitMarkdown] ${o} crashed while transforming`,h),c}}}}function wrapRemarkPlugin(n,o){return e=>{const t=n(e);return(c,p)=>{if(!c)return c;try{return t(c,p)}catch(h){return console.error(`[StreamlitMarkdown] ${o} crashed while transforming`,h),c}}}}function useLazyPlugin(n){const{key:o,needed:e,load:t,pluginName:c,onBeforeLoad:p}=n,h=e?pluginCache[o]:null,[y,g]=reactExports.useState(null);return reactExports.useEffect(()=>{if(!e||h||y)return;const $=loadingPromises[o];if($){let N=!1;return $.then(H=>{N||g(()=>H)}),()=>{N=!0}}p?.();let E=!1;const A=t().then(N=>extractPlugin(N,c)).then(N=>(pluginCache[o]=N,E||g(()=>N),N)).catch(()=>{const N=LOAD_FAILED;return pluginCache[o]=N,E||g(()=>N),N}).finally(()=>{loadingPromises[o]=null});return loadingPromises[o]=A,()=>{E=!0}},[e,h,y,o,t,c,p]),e?h??y:null}const StreamlitSyntaxHighlighter$1=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.BFWV0oqR.js"),[],import.meta.url));function containsEmojiShortcodes(n){return/:(?!material\/|streamlit:)[\w+-][\w_+-]*:/.test(n)}function containsMathSyntax(n){return new RegExp("\\$\\$[\\s\\S]+?\\$\\$|\\$(?!\\s)[^$\\n]+?(?<!\\s)\\$").test(n)}var Tags=function(n){return n.H1="h1",n.H2="h2",n.H3="h3",n}({});function rehypeSetCodeInlineProperty(){return n=>{visit(n,"element",(o,e,t)=>{o.tagName==="code"&&(t?.type==="element"&&t.tagName==="pre"?o.properties={...o.properties,inline:!1}:o.properties={...o.properties,inline:!0})})}}function createAnchorFromText(n){if(!n)return"";const o=slugify(n);return o.length>0?o:xxhash.h32(n,43981).toString(16)}function transformLinkUri(n){return n}const scrollNodeIntoView=once(n=>{n.scrollIntoView(!0)}),HeaderActionElements=({elementId:n,help:o,hideAnchor:e})=>{const t=useEmotionTheme();return!o&&e?jsx$1(Fragment,{}):jsxs(StyledHeadingActionElements,{"data-testid":"stHeaderActionElements",children:[o&&jsx$1(InlineTooltipIcon,{content:o}),n&&!e&&jsx$1(StyledLinkIcon,{href:`#${n}`,children:jsx$1(Link2,{size:convertRemToPx(t.iconSizes.base)})})]})},HeadingWithActionElements=({tag:n,anchor:o,help:e,hideAnchor:t,children:c,tagProps:p})=>{const h=reactExports.useContext(IsSidebarContext),y=reactExports.useContext(IsDialogContext),[g,$]=reactExports.useState(o),E=reactExports.useCallback(be=>{if(be===null)return;const we=o||createAnchorFromText(be.textContent);$(we);const $e=window.location.hash.slice(1);$e&&$e===we&&scrollNodeIntoView(be)},[o]),A=h||y,X=jsxs(n,{...p,...A?{}:{ref:E,id:g},children:[c,jsx$1(HeaderActionElements,{elementId:g,help:e,hideAnchor:t||A})]});return A?X:jsx$1(StyledHeadingWithActionElements,{"data-testid":"stHeadingWithActionElements",children:X})},CustomHeading=({node:n,children:o,...e})=>{const t=e["data-anchor"];return jsx$1(HeadingWithActionElements,{tag:n.tagName,anchor:t,tagProps:e,children:o})},CustomCodeTag=({inline:n,className:o,children:e,...t})=>{const c=/language-(\w+)/.exec(o||""),p=String(e??"").replace(/^\n/,"").replace(/\n$/,""),h=c?.[1]||"";return n?jsx$1(StyledInlineCode,{className:o,...omit(t,"node"),children:e}):jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(StreamlitSyntaxHighlighter$1,{language:h,showLineNumbers:!1,children:p})})})},CustomPreTag=({children:n})=>jsx$1(StyledPreWrapper,{"data-testid":"stMarkdownPre",children:n}),CustomMediaTag=({node:n,...o})=>{const e=useCrossOriginAttribute(o.src),t=n.tagName,c={...o,crossOrigin:e};return jsx$1(t,{...c})},CustomHelpIcon=({children:n})=>jsx$1(StyledHelpIconWrapper,{children:jsx$1(InlineTooltipIcon,{content:typeof n=="string"?n:""})}),BASE_RENDERERS={pre:CustomPreTag,code:CustomCodeTag,h1:CustomHeading,h2:CustomHeading,h3:CustomHeading,h4:CustomHeading,h5:CustomHeading,h6:CustomHeading,img:CustomMediaTag,video:CustomMediaTag,audio:CustomMediaTag,"streamlit-help-icon":CustomHelpIcon};function createColorMapping(n){const{red:o,orange:e,yellow:t,green:c,blue:p,violet:h,purple:y,gray:g,primary:$}=getMarkdownTextColors(n),{redbg:E,orangebg:A,yellowbg:N,greenbg:H,bluebg:Z,violetbg:X,purplebg:be,graybg:we,primarybg:$e}=getMarkdownBgColors(n);return new Map(Object.entries({red:`color: ${o}`,orange:`color: ${e}`,yellow:`color: ${t}`,blue:`color: ${p}`,green:`color: ${c}`,violet:`color: ${h}`,gray:`color: ${g}`,grey:`color: ${g}`,primary:`color: ${$}`,rainbow:`color: transparent; background-clip: text; -webkit-background-clip: text; background-image: linear-gradient(to right,
93
93
  ${o}, ${e}, ${t}, ${c}, ${p}, ${h}, ${y});`,"red-background":`background-color: ${E}`,"orange-background":`background-color: ${A}`,"yellow-background":`background-color: ${N}`,"blue-background":`background-color: ${Z}`,"green-background":`background-color: ${H}`,"violet-background":`background-color: ${X}`,"gray-background":`background-color: ${we}`,"grey-background":`background-color: ${we}`,"primary-background":`background-color: ${$e}`,"rainbow-background":`background: linear-gradient(to right,
94
94
  ${E}, ${A}, ${N}, ${H}, ${Z}, ${X}, ${be});`}))}function createRemarkHelpIcon(){return()=>n=>(visit(n,"textDirective",(o,e,t)=>{if(String(o.name)==="help"){const p=o.data||(o.data={});p.hName="streamlit-help-icon",p.hProperties=p.hProperties||{};return}}),n)}function createRemarkColoringAndSmall(n,o){return()=>e=>(visit(e,"textDirective",(t,c,p)=>{const h=String(t.name);if(h==="small"){const g=t.data||(t.data={});g.hName="span",g.hProperties=g.hProperties||{},g.hProperties.style=`font-size: ${n.fontSizes.sm};`;return}const y=h.match(/^(.+)-badge$/);if(y&&o.has(y[1])){const g=y[1];if(g==="rainbow")return;const $=o.get(g),E=o.get(`${g}-background`);if($&&E){const A=t.data||(t.data={});A.hName="span",A.hProperties=A.hProperties||{},A.hProperties.className="stMarkdownBadge",A.hProperties.style=`${E}; ${$}; font-size: ${n.fontSizes.sm};`;return}}if(o.has(h)){const g=t.data||(t.data={}),$=o.get(h);g.hName="span",g.hProperties=g.hProperties||{},g.hProperties.style=$,g.hProperties.className="stMarkdownColoredText",$&&(/background-color:/.test($)||/background:/.test($))&&(g.hProperties.className="stMarkdownColoredBackground");return}t.data?.hName||(t.type="text",t.value=`:${h}`,t.data={})}),e)}function createRemarkMaterialIcons(n){return()=>o=>{function e(t,c){return{type:"text",value:t,data:{hName:"span",hProperties:{role:"img",ariaLabel:c+" icon",translate:"no",style:`
95
95
  display: inline-block;
@@ -112,7 +112,7 @@ For more information, refer to the [documentation for forms](https://docs.stream
112
112
  ${n.stackTrace?.join(`
113
113
  `)}`,t=`https://www.google.com/search?q=${encodeURIComponent(o)}`,c=`https://chatgpt.com/?q=${encodeURIComponent(e)}`,{copyToClipboard:p}=useCopyToClipboard(),h=reactExports.useCallback(()=>{p(e)},[p,e]);return jsx$1("div",{className:"stException","data-testid":"stException",children:jsx$1(AlertContainer,{kind:n.isWarning?Kind.WARNING:Kind.ERROR,children:jsxs(StyledExceptionWrapper,{children:[jsx$1(StyledExceptionMessage,{"data-testid":"stExceptionMessage",children:jsx$1(ExceptionMessage,{type:n.type,message:n.message,messageIsMarkdown:n.messageIsMarkdown})}),n.stackTrace&&n.stackTrace.length>0?jsx$1(StackTrace,{stackTrace:n.stackTrace}):null,isLocalhost()&&jsxs(StyledExceptionLinks,{children:[jsx$1(StyledExceptionCopyButton,{onClick:h,children:"Copy"}),jsx$1("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Ask Google"}),jsx$1("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:"Ask ChatGPT"})]})]})})})}const ExceptionElement$1=reactExports.memo(ExceptionElement),SINGLE_BADGE_REGEX=/^:\w+-badge\[((?:\\.|[^\]\\])*)\]$/;function Markdown({element:n}){const{allowHtml:o,body:e,elementType:t,help:c,isCaption:p}=n,h=t===Markdown$3.Type.LATEX,y=t===Markdown$3.Type.NATIVE&&SINGLE_BADGE_REGEX.test(e.trim());let g;if(c&&y)g=jsx$1(BaseButtonTooltip,{help:c,containerWidth:!1,children:jsx$1(StreamlitMarkdown$1,{isCaption:p,source:e,allowHTML:o})});else if(c&&h)g=jsxs(StyledLabelHelpWrapper,{isLatex:h,children:[jsx$1(StreamlitMarkdown$1,{isCaption:p,source:e,allowHTML:o}),jsx$1(InlineTooltipIcon,{content:c,isLatex:h})]});else{const $=c?`${e} :help[${c}]`:e;g=jsx$1(StyledLabelHelpWrapper,{isLatex:h,children:jsx$1(StreamlitMarkdown$1,{isCaption:p,source:$,allowHTML:o})})}return jsx$1("div",{className:"stMarkdown","data-testid":"stMarkdown",children:g})}const Markdown$1=reactExports.memo(Markdown),StyledText=styled("span",{target:"edwxmgj0"})(({theme:n})=>({fontFamily:n.genericFonts.bodyFont,color:n.colors.bodyText,whiteSpace:"pre-line",whiteSpaceCollapse:"preserve",wordBreak:"break-word",display:"inline-block",verticalAlign:"middle",width:"100%"})),StyledInlineHelpIcon=styled("span",{target:"edwxmgj1"})(({theme:n})=>({display:"inline-block",verticalAlign:"middle",marginLeft:n.spacing.twoXS,transform:"translateY(-0.05em)"}));function TextElement({element:n}){return jsx$1(StyledLabelHelpWrapper,{className:"stText","data-testid":"stText",children:jsxs(StyledText,{children:[n.body,n.help&&jsx$1(StyledInlineHelpIcon,{children:jsx$1(InlineTooltipIcon,{content:n.help})})]})})}const TextElement$1=reactExports.memo(TextElement),katex_min=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function makeMarkdownHeading(n,o){switch(n.toLowerCase()){case Tags.H1:return`# ${o}`;case Tags.H2:return`## ${o}`;case Tags.H3:return`### ${o}`;default:throw new Error(`Unrecognized tag for header: ${n}`)}}const OVERRIDE_COMPONENTS={p:reactExports.Fragment,h1:reactExports.Fragment,h2:reactExports.Fragment,h3:reactExports.Fragment,h4:reactExports.Fragment,h5:reactExports.Fragment,h6:reactExports.Fragment};function Heading(n){const{element:o}=n,{tag:e,anchor:t,body:c,help:p,hideAnchor:h,divider:y}=o,g=reactExports.useContext(IsDialogContext),[$,...E]=c.split(`
114
114
  `);return jsxs("div",{className:"stHeading","data-testid":"stHeading",children:[jsxs(StyledStreamlitMarkdown,{isCaption:!1,isInDialog:g,"data-testid":"stMarkdownContainer",children:[jsx$1(HeadingWithActionElements,{anchor:t,help:p,hideAnchor:h,tag:e,children:jsx$1(RenderedMarkdown,{allowHTML:!1,source:makeMarkdownHeading(e,$),overrideComponents:OVERRIDE_COMPONENTS})}),E.length>0&&jsx$1(RenderedMarkdown,{source:E.join(`
115
- `),allowHTML:!1})]}),y&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:y.includes("linear"),color:y})]})}const StyledCheckbox$1=styled("div",{target:"eg2gxky0"})(({theme:n})=>({display:"flex",alignItems:"center",minHeight:n.sizes.smallElementHeight})),StyledContent=styled("div",{target:"eg2gxky1"})(({visibility:n})=>({display:n===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:n===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(n,o){let e=o.spacing.lg;return n===streamlit.GapSize.MEDIUM?e=o.spacing.threeXL:n===streamlit.GapSize.LARGE?e=o.spacing.fourXL:n===streamlit.GapSize.NONE&&(e=o.spacing.none),e}const StyledSpace=styled("div",{target:"ek2vi380"})({width:"100%",height:"100%"}),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=styled("div",{target:"ek2vi381"})(({theme:n,isStale:o,width:e,height:t,elementType:c,overflow:p,flex:h,minWidth:y,textAlign:g})=>({width:e,height:t,textAlign:g,maxWidth:"100%",minWidth:e==="0px"?0:y??"1rem",position:"relative",overflow:p,flex:h,"@media print":{overflow:"visible"},":has(> .stCacheSpinner)":{height:n.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${n.spacing.lg}`,zIndex:n.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${n.spacing.xs}`,marginBottom:`-${n.spacing.xs}`},...o&&c!=="skeleton"&&STALE_STYLES,...c==="empty"?{display:"none"}:{},...c==="space"?{minWidth:0,minHeight:0}:{},...GLOBAL_ELEMENTS.includes(c)?{marginBottom:`-${n.spacing.lg}`}:{}})),StyledColumn=styled("div",{target:"ek2vi382"})(({theme:n,weight:o,gap:e,showBorder:t,verticalAlignment:c})=>{const{VerticalAlignment:p}=Block$1.Column,h=o*100,y=translateGapWidth(e,n),g=y===n.spacing.none?`${h}%`:`calc(${h}% - ${y})`;return{width:g,flex:`1 1 ${g}`,[`@media (max-width: ${n.breakpoints.columns})`]:{minWidth:`calc(100% - ${n.spacing.twoXL})`},...c===p.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:n.spacing.sm}},...c===p.TOP&&{[`& ${StyledElementContainer}:first-of-type > ${StyledCheckbox$1}`]:{marginTop:n.spacing.sm}},...c===p.CENTER&&{marginTop:"auto",marginBottom:"auto"},...t&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`}}}),getAlignItems=n=>{switch(n){case Block$1.FlexContainer.Align.ALIGN_START:return"start";case Block$1.FlexContainer.Align.ALIGN_CENTER:return"center";case Block$1.FlexContainer.Align.ALIGN_END:return"end";case Block$1.FlexContainer.Align.STRETCH:return"stretch";case Block$1.FlexContainer.Align.ALIGN_UNDEFINED:case void 0:case null:return"stretch";default:assertNever(n)}},getJustifyContent=n=>{switch(n){case Block$1.FlexContainer.Justify.JUSTIFY_START:return"start";case Block$1.FlexContainer.Justify.JUSTIFY_CENTER:return"center";case Block$1.FlexContainer.Justify.JUSTIFY_END:return"end";case Block$1.FlexContainer.Justify.SPACE_BETWEEN:return"space-between";case Block$1.FlexContainer.Justify.JUSTIFY_UNDEFINED:case void 0:case null:return"start";default:assertNever(n)}},StyledFlexContainerBlock=styled("div",{target:"ek2vi383"})(({theme:n,direction:o,gap:e,flex:t,$wrap:c,height:p,border:h,align:y,justify:g,overflow:$})=>{let E;return e!==void 0&&(E=translateGapWidth(e,n)),{display:"flex",gap:E,width:"100%",maxWidth:"100%",height:p??"auto",minWidth:"1rem",flexDirection:o,flex:t,alignItems:getAlignItems(y),justifyContent:getJustifyContent(g),flexWrap:c?"wrap":"nowrap",...h&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`},overflow:$}}),StyledLayoutWrapper=styled("div",{target:"ek2vi384"})(({width:n,height:o,flex:e})=>({display:"flex",flexDirection:"column",width:n,maxWidth:"100%",minWidth:"1rem",height:o,flex:e})),LARGE_STRETCH_BEHAVIOR$1=["graphvizChart","arrowVegaLiteChart","deckGlJsonChart","plotlyChart","docString","arrowDataFrame","json","audioInput","fileUploader","cameraInput","audio","video","code","buttonGroup","iframe"],MEDIUM_STRETCH_BEHAVIOR$1=["dateInput","radio","slider","textArea","progress","multiselect","selectbox","timeInput","numberInput","textInput"],WIDTH_STRETCH_OVERRIDE=["componentInstance","skeleton"],VISIBLE_OVERFLOW_OVERRIDE=["iframe","arrowDataFrame","deckGlJsonChart","arrowVegaLiteChart","graphvizChart"],StyledElementContainerLayoutWrapper=({node:n,...o})=>{const{isInHorizontalLayout:e,isInRoot:t}=useRequiredContext(FlexContext);let c;LARGE_STRETCH_BEHAVIOR$1.includes(n.element.type??"")?c="14rem":MEDIUM_STRETCH_BEHAVIOR$1.includes(n.element.type??"")&&(c="8rem"),n.element.type==="buttonGroup"&&n.element.buttonGroup?.style===ButtonGroup$1.Style.BORDERLESS&&(c="fit-content");const p=reactExports.useMemo(()=>{const y={};if(WIDTH_STRETCH_OVERRIDE.includes(n.element.type??"")&&(y.width="100%"),VISIBLE_OVERFLOW_OVERRIDE.includes(n.element.type??"")&&(y.overflow="visible"),n.element.type==="textArea")return n.element.heightConfig?.useStretch?{height:"100%",flex:"1 1 8rem"}:e?{height:"auto"}:{height:"auto",flex:""};if(n.element.type==="arrowVegaLiteChart")return n.element.widthConfig?.useContent&&t&&(y.width="100%"),e&&!n.element.widthConfig&&(y.flex="1 1 14rem"),y;if(n.element.type==="arrowDataFrame")return n.element.widthConfig?.useContent&&t&&(y.width="100%"),y;if(n.element.type==="imgs"){const g=!n.element.widthConfig||n.element.widthConfig.useStretch;y.width=g?"100%":"auto"}return y},[n.element.type,n.element.heightConfig?.useStretch,e,t,n.element.widthConfig]);let h=useLayoutStyles({element:n.element,subElement:n.element?.type&&n.element[n.element.type]||void 0,styleOverrides:p,minStretchBehavior:c});return n.element.type==="space"&&(e?h={...h,height:"auto"}:h={...h,width:"auto"}),jsx$1(StyledElementContainer,{...o,...h})},ArrowTable=reactExports.lazy(()=>__vitePreload(()=>import("./index.RJZuWCGA.js"),__vite__mapDeps([5,6,7,8]),import.meta.url)),ArrowVegaLiteChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.DAqCNvsO.js"),__vite__mapDeps([9,10,11,12,13,7,6,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]),import.meta.url)),Audio=reactExports.lazy(()=>__vitePreload(()=>import("./index.CkGVt6-G.js"),[],import.meta.url)),Balloons=reactExports.lazy(()=>__vitePreload(()=>import("./index.rORSX6IW.js"),__vite__mapDeps([30,31]),import.meta.url)),DeckGlJsonChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.CTgm_-jO.js"),__vite__mapDeps([32,20,21,10,11,15,33,13,27,28,34]),import.meta.url)),GraphVizChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.B527JZdO.js"),__vite__mapDeps([35,29,28,10,11]),import.meta.url)),Html=reactExports.lazy(()=>__vitePreload(()=>import("./index.BxjzhVUb.js"),[],import.meta.url)),IFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dr9HIhQw.js"),__vite__mapDeps([36,37]),import.meta.url)),ImageList=reactExports.lazy(()=>__vitePreload(()=>import("./index.BfEKaEmw.js"),__vite__mapDeps([38,10,11]),import.meta.url)),Json=reactExports.lazy(()=>__vitePreload(()=>import("./index.DBalctjj.js"),__vite__mapDeps([39,15,16]),import.meta.url)),LinkButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.DXxnU5ej.js"),[],import.meta.url)),Metric=reactExports.lazy(()=>__vitePreload(()=>import("./index.DB_w_CZQ.js"),__vite__mapDeps([40,26,27,28,29]),import.meta.url)),PageLink=reactExports.lazy(()=>__vitePreload(()=>import("./index.q5hIQwAY.js"),[],import.meta.url)),PlotlyChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.hbeqcRTn.js"),__vite__mapDeps([41,10,13]),import.meta.url)),Progress=reactExports.lazy(()=>__vitePreload(()=>import("./index.DS7lf09n.js"),__vite__mapDeps([42,43]),import.meta.url)),Snow=reactExports.lazy(()=>__vitePreload(()=>import("./index.AnXMIBz3.js"),__vite__mapDeps([44,31]),import.meta.url)),Spinner=reactExports.lazy(()=>__vitePreload(()=>import("./index.uSX757_v.js"),[],import.meta.url)),StreamlitSyntaxHighlighter=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.DTKLpwhl.js"),[],import.meta.url)),Toast=reactExports.lazy(()=>__vitePreload(()=>import("./index.DsgAU5lc.js"),[],import.meta.url)),Video=reactExports.lazy(()=>__vitePreload(()=>import("./index.5VPOamri.js"),[],import.meta.url)),AudioInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BWB_91TA.js"),__vite__mapDeps([45,46,11,13,19,47,23]),import.meta.url)),ArrowDataFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.C_rK-Swb.js").then(n=>n.c),__vite__mapDeps([12,10,11,13,7,6,8,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url)),Button=reactExports.lazy(()=>__vitePreload(()=>import("./index.DWexTVLY.js"),[],import.meta.url)),ButtonGroup=reactExports.lazy(()=>__vitePreload(()=>import("./index.CyroQtI4.js"),__vite__mapDeps([48,33,13]),import.meta.url)),ComponentInstance=reactExports.lazy(()=>__vitePreload(()=>import("./index.DK0RFJUG.js"),__vite__mapDeps([49,50,47,37]),import.meta.url).then(n=>({default:n.ComponentInstance}))),CameraInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BHgV-yW4.js"),__vite__mapDeps([51,50,52,13,43,47]),import.meta.url)),ChatInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.PaidgjCs.js"),__vite__mapDeps([53,54,52,46,55,56,57,58,59]),import.meta.url)),Checkbox=reactExports.lazy(()=>__vitePreload(()=>import("./index.DlltaH7J.js"),__vite__mapDeps([60,33,13,18]),import.meta.url)),ColorPicker=reactExports.lazy(()=>__vitePreload(()=>import("./index.DpNTZz82.js"),__vite__mapDeps([61,33,13,17]),import.meta.url)),DateInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CF5MxTbK.js"),__vite__mapDeps([62,7,33,13,63,64,21,22,65,57,59]),import.meta.url)),DateTimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CNH4rdSz.js"),__vite__mapDeps([66,7,63,64,21,22,65,57,33,13,67,59]),import.meta.url)),DownloadButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.BTtmaLDB.js"),__vite__mapDeps([68,19]),import.meta.url)),FileUploader=reactExports.lazy(()=>__vitePreload(()=>import("./index.B1fRb5wF.js"),__vite__mapDeps([69,13,54,52,43]),import.meta.url)),FormSubmitContent=reactExports.lazy(()=>__vitePreload(()=>import("./index.BQr-XwGV.js"),__vite__mapDeps([70,13]),import.meta.url).then(n=>({default:n.FormSubmitContent}))),Multiselect=reactExports.lazy(()=>__vitePreload(()=>import("./index.BuCx76ZV.js"),__vite__mapDeps([71,33,13,24,8]),import.meta.url)),NumberInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bu5JWpT_.js"),__vite__mapDeps([72,55,13,14,73,65,57]),import.meta.url)),Radio=reactExports.lazy(()=>__vitePreload(()=>import("./index.CyUHWoCC.js"),__vite__mapDeps([74,33,13]),import.meta.url)),Selectbox$1=reactExports.lazy(()=>__vitePreload(()=>import("./index.KfXqjDYy.js"),__vite__mapDeps([75,33,13]),import.meta.url)),Slider=reactExports.lazy(()=>__vitePreload(()=>import("./index.CuvXOyER.js"),__vite__mapDeps([76,7,14,50,33,13]),import.meta.url)),TextArea=reactExports.lazy(()=>__vitePreload(()=>import("./index.BfXjTO8b.js"),__vite__mapDeps([77,55,33,13,78,58,56,57,73]),import.meta.url)),TextInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.x_QRaLMd.js"),__vite__mapDeps([79,55,33,13,78,58,73,65,57]),import.meta.url)),TimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bjy4NRu9.js"),__vite__mapDeps([80,33,13,67,64,21,22]),import.meta.url)),BidiComponent=reactExports.lazy(()=>__vitePreload(()=>import("./index.DcU3uDvB.js"),[],import.meta.url));function hideIfStale(n,o){return n?jsx$1(Fragment,{}):o}const RawElementNodeRenderer=n=>{const{node:o}=n;if(!o)throw new Error("ElementNode not found.");const e={disableFullscreenMode:n.disableFullscreenMode,widthConfig:o.element.widthConfig,heightConfig:o.element.heightConfig},t={...e,widgetMgr:n.widgetMgr,disabled:n.widgetsDisabled,fragmentId:o.fragmentId,componentRegistry:n.componentRegistry};switch(o.element.type){case"alert":{const c=o.element.alert;return jsx$1(AlertElement$1,{icon:c.icon,body:c.body,kind:getAlertElementKind(c.format),...e})}case"arrowTable":{const c=o.element.arrowTable;return jsx$1(ArrowTable,{element:c,data:o.quiverElement,...e})}case"audio":return jsx$1(Audio,{element:o.element.audio,endpoints:n.endpoints,...e,elementMgr:n.widgetMgr});case"balloons":return hideIfStale(n.isStale,jsx$1(Balloons,{scriptRunId:o.scriptRunId}));case"code":{const c=o.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:c.language,showLineNumbers:c.showLineNumbers,wrapLines:c.wrapLines,children:c.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:o.element.deckGlJsonChart,...t});case"docString":return jsx$1(DocString$1,{element:o.element.docString,...e});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement$1,{element:o.element.exception,...e});case"graphvizChart":return jsx$1(GraphVizChart,{element:o.element.graphvizChart,...e});case"heading":return jsx$1(Heading,{element:o.element.heading,...e});case"iframe":return jsx$1(IFrame,{element:o.element.iframe,...e});case"imgs":return jsx$1(ImageList,{element:o.element.imgs,endpoints:n.endpoints,...e});case"json":return jsx$1(Json,{element:o.element.json,...e});case"markdown":return jsx$1(Markdown$1,{element:o.element.markdown,...e});case"metric":return jsx$1(Metric,{element:o.element.metric,...e});case"html":return jsx$1(Html,{element:o.element.html,...e});case"pageLink":{const c=o.element.pageLink,p=t.disabled||c.disabled;return jsx$1(PageLink,{element:c,disabled:p,...e})}case"progress":return jsx$1(Progress,{element:o.element.progress,...e});case"skeleton":return jsx$1(Skeleton,{element:o.element.skeleton});case"snow":return hideIfStale(n.isStale,jsx$1(Snow,{scriptRunId:o.scriptRunId}));case"space":return jsx$1(StyledSpace,{className:"stSpace","data-testid":"stSpace"});case"spinner":return jsx$1(Spinner,{element:o.element.spinner,...e});case"text":return jsx$1(TextElement$1,{element:o.element.text,...e});case"video":return jsx$1(Video,{element:o.element.video,endpoints:n.endpoints,...e,elementMgr:n.widgetMgr});case"toast":{const c=o.element.toast;return jsx$1(Toast,{element:c,...e},o.scriptRunId)}case"arrowDataFrame":{const c=o.element.arrowDataFrame;return t.disabled=t.disabled||c.disabled,jsx$1(ArrowDataFrame,{element:c,data:o.quiverElement,...t},c.id||void 0)}case"arrowVegaLiteChart":{const c=o.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:c,...t},c.id||void 0)}case"audioInput":{const c=o.element.audioInput;return t.disabled=t.disabled||c.disabled,jsx$1(AudioInput,{uploadClient:n.uploadClient,element:c,...t},c.id)}case"button":{const c=o.element.button;return t.disabled=t.disabled||c.disabled,c.isFormSubmitter?jsx$1(FormSubmitContent,{element:c,...t}):jsx$1(Button,{element:c,...t})}case"buttonGroup":{const c=o.element.buttonGroup;return t.disabled=t.disabled||c.disabled,jsx$1(ButtonGroup,{element:c,...t},c.id)}case"downloadButton":{const c=o.element.downloadButton;return t.disabled=t.disabled||c.disabled,jsx$1(DownloadButton,{endpoints:n.endpoints,element:c,...t},c.id)}case"cameraInput":{const c=o.element.cameraInput;return t.disabled=t.disabled||c.disabled,jsx$1(CameraInput,{element:c,uploadClient:n.uploadClient,...t},c.id)}case"chatInput":{const c=o.element.chatInput;return t.disabled=t.disabled||c.disabled,jsx$1(ChatInput,{element:c,uploadClient:n.uploadClient,...t},c.id)}case"checkbox":{const c=o.element.checkbox;return t.disabled=t.disabled||c.disabled,jsx$1(Checkbox,{element:c,...t},c.id)}case"colorPicker":{const c=o.element.colorPicker;return t.disabled=t.disabled||c.disabled,jsx$1(ColorPicker,{element:c,...t},c.id)}case"componentInstance":return jsx$1(ComponentInstance,{element:o.element.componentInstance,...t});case"dateInput":{const c=o.element.dateInput;return t.disabled=t.disabled||c.disabled,jsx$1(DateInput,{element:c,...t},c.id)}case"fileUploader":{const c=o.element.fileUploader;return t.disabled=t.disabled||c.disabled,jsx$1(FileUploader,{element:c,uploadClient:n.uploadClient,...t},c.id)}case"linkButton":{const c=o.element.linkButton;return jsx$1(LinkButton,{element:c,...e})}case"multiselect":{const c=o.element.multiselect;return t.disabled=t.disabled||c.disabled,jsx$1(Multiselect,{element:c,...t},c.id)}case"numberInput":{const c=o.element.numberInput;return t.disabled=t.disabled||c.disabled,jsx$1(NumberInput,{element:c,...t},c.id)}case"plotlyChart":{const c=o.element.plotlyChart;return jsx$1(PlotlyChart,{element:c,...t},c.id)}case"radio":{const c=o.element.radio;return t.disabled=t.disabled||c.disabled,jsx$1(Radio,{element:c,...t},c.id)}case"selectbox":{const c=o.element.selectbox;return t.disabled=t.disabled||c.disabled,jsx$1(Selectbox$1,{element:c,...t},c.id)}case"slider":{const c=o.element.slider;return t.disabled=t.disabled||c.disabled,jsx$1(Slider,{element:c,...t},c.id)}case"textArea":{const c=o.element.textArea;return t.disabled=t.disabled||c.disabled,jsx$1(TextArea,{element:c,outerElement:o.element,...t},c.id)}case"textInput":{const c=o.element.textInput;return t.disabled=t.disabled||c.disabled,jsx$1(TextInput,{element:c,...t},c.id)}case"dateTimeInput":{const c=o.element.dateTimeInput;return t.disabled=t.disabled||c.disabled,jsx$1(DateTimeInput,{element:c,...t},c.id)}case"timeInput":{const c=o.element.timeInput;return t.disabled=t.disabled||c.disabled,jsx$1(TimeInput,{element:c,...t},c.id)}case"bidiComponent":{const c=o.element.bidiComponent;return jsx$1(BidiComponent,{element:c,...t},c.id)}default:throw new Error(`Unrecognized Element type ${o.element.type}`)}},ElementNodeRenderer=n=>{const{isFullScreen:o}=reactExports.useContext(ViewStateContext),{scriptRunState:e,scriptRunId:t,fragmentIdsThisRun:c}=reactExports.useContext(ScriptRunContext),{node:p}=n,h=p.element.type||"",y=shouldComponentBeEnabled(h,e),g=isComponentStale(y,p,e,t,c),$=getElementId(p.element),E=getKeyFromId($);return jsx$1(Maybe,{enable:y,children:jsx$1(StyledElementContainerLayoutWrapper,{className:classNames("stElementContainer","element-container",convertKeyToClassName(E)),"data-testid":"stElementContainer","data-stale":g,isStale:g&&!o,elementType:h,node:p,children:jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...n,isStale:g})})})})})};class RenderNodeVisitor{constructor(o){this.props=o,this.elementKeySet=new Set,this.reactElements=[],this.index=0}getCurrentKey(o){const e=o||this.index.toString();return this.index+=1,e}visitBlockNode(o){const e={...this.props,node:o},t=this.getCurrentKey(),c=jsx$1(BlockNodeRenderer,{...e},t);return this.reactElements.push(c),c}visitElementNode(o){const e={...this.props,node:o},t=this.getCurrentKey(getElementId(o.element));if(this.elementKeySet.has(t))return null;this.elementKeySet.add(t);const c=jsx$1(ElementNodeRenderer,{...e},t);return this.reactElements.push(c),c}static collectReactElements(o){if(!o.node.children)return[];const e=new RenderNodeVisitor(o);return o.node.children.forEach(t=>t.accept(e)),e.reactElements}}const ChildRenderer=n=>(assignDividerColor(n.node,useEmotionTheme()),jsx$1(Fragment,{children:RenderNodeVisitor.collectReactElements(n)})),getLayoutSubElement=n=>{const o=n.type,e=o?n[o]:void 0;if(!e||typeof e!="object")return;const t=e,c={useContainerWidth:t.useContainerWidth,height:t.height,width:t.width,widthConfig:t.widthConfig};if(!(c.useContainerWidth===void 0&&c.height===void 0&&c.width===void 0&&c.widthConfig===void 0))return c},ContainerContentsWrapper=n=>{const o=reactExports.useContext(FlexContext),e={direction:Direction.VERTICAL,flex:1,gap:streamlit.GapSize.SMALL,height:n.height,border:!1},t=getKeyFromId(n.node.deltaBlock.id);return jsx$1(FlexContextProvider,{direction:Direction.VERTICAL,isRoot:n.isRoot,parentContext:o,children:jsx$1(StyledFlexContainerBlock,{...e,className:classNames(getClassnamePrefix(Direction.VERTICAL),convertKeyToClassName(t)),"data-testid":getClassnamePrefix(Direction.VERTICAL),children:jsx$1(ChildRenderer,{...n})})})},FlexBoxContainer=n=>{const o=getDirectionOfBlock(n.node.deltaBlock),e=reactExports.useContext(FlexContext),t=getActivateScrollToBottomBackwardsCompatible(n.node),c=useScrollToBottom(t),p=useLayoutStyles({element:n.node.deltaBlock,subElement:getLayoutSubElement(n.node.deltaBlock)}),h={gap:n.node.deltaBlock.flexContainer?.gapConfig?.gapSize??streamlit.GapSize.SMALL,direction:o,$wrap:n.node.deltaBlock.flexContainer?.wrap??!1,overflow:p.overflow,border:getBorderBackwardsCompatible(n.node.deltaBlock),height:p.height,flex:"1",align:n.node.deltaBlock.flexContainer?.align,justify:n.node.deltaBlock.flexContainer?.justify},y=getKeyFromId(n.node.deltaBlock.id),g=n.node.deltaBlock.widthConfig?.pixelWidth??void 0,$=n.node.deltaBlock.widthConfig?.useContent??!1,E=(n.node.deltaBlock.widthConfig?.pixelWidth??0)>0||(n.node.deltaBlock.widthConfig?.remWidth??0)>0;return jsx$1(FlexContextProvider,{direction:o,parentWidth:g,hasContentWidth:$,hasFixedWidth:E,parentContext:e,children:jsx$1(StyledFlexContainerBlock,{...h,className:classNames(getClassnamePrefix(o),convertKeyToClassName(y)),"data-testid":getClassnamePrefix(o),ref:c,"data-test-scroll-behavior":t?"scroll-to-bottom":"normal",children:jsx$1(ChildRenderer,{...n})})})},LARGE_STRETCH_BEHAVIOR=["tabContainer"],MEDIUM_STRETCH_BEHAVIOR=["chatInput"],BlockNodeRenderer=n=>{const{node:o}=n,{scriptRunState:e,scriptRunId:t,fragmentIdsThisRun:c}=reactExports.useContext(ScriptRunContext);let p;LARGE_STRETCH_BEHAVIOR.includes(o.deltaBlock.type??"")?p="14rem":MEDIUM_STRETCH_BEHAVIOR.includes(o.deltaBlock.type??"")?p="8rem":o.deltaBlock.type==="chatMessage"?o.isEmpty&&(p="8rem"):(o.deltaBlock.type==="flexContainer"||o.deltaBlock.column||o.deltaBlock.expandable)&&(o.isEmpty||(p="8rem"));const h=useLayoutStyles({element:o.deltaBlock,subElement:getLayoutSubElement(o.deltaBlock),minStretchBehavior:p});if(o.isEmpty&&!o.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const y=shouldComponentBeEnabled("",e),g=isComponentStale(y,o,e,t,c),$={...n,node:o},E=n.disableFullscreenMode||notNullOrUndefined(o.deltaBlock.dialog)||notNullOrUndefined(o.deltaBlock.popover);let A;const N=jsx$1(ContainerContentsWrapper,{...$,disableFullscreenMode:E,height:"100%"});if(checkFlexContainerBackwardsCompatibile(o.deltaBlock)&&(A=jsx$1(FlexBoxContainer,{...$})),o.deltaBlock.dialog)return jsx$1(Dialog$1,{element:o.deltaBlock.dialog,deltaMsgReceivedAt:o.deltaMsgReceivedAt,widgetMgr:n.widgetMgr,fragmentId:o.fragmentId,children:N});if(o.deltaBlock.expandable&&(A=jsx$1(Expander$1,{isStale:g,element:o.deltaBlock.expandable,children:N})),o.deltaBlock.popover&&(A=jsx$1(Popover$1,{empty:o.isEmpty,element:o.deltaBlock.popover,stretchWidth:shouldWidthStretch(o.deltaBlock.widthConfig),children:N})),o.deltaBlock.type==="form"){const{formId:H,clearOnSubmit:Z,enterToSubmit:X,border:be}=o.deltaBlock.form;A=jsx$1(Form$1,{formId:H,clearOnSubmit:Z,enterToSubmit:X,widgetMgr:n.widgetMgr,border:be,overflow:h.overflow,children:N})}if(o.deltaBlock.chatMessage&&(A=jsx$1(ChatMessage$1,{element:o.deltaBlock.chatMessage,endpoints:n.endpoints,children:N})),o.deltaBlock.column)return jsx$1(StyledColumn,{weight:o.deltaBlock.column.weight??0,gap:backwardsCompatibleColumnGapSize(o.deltaBlock.column),verticalAlignment:o.deltaBlock.column.verticalAlignment??void 0,showBorder:o.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:N});if(o.deltaBlock.tabContainer){const Z={...$,isStale:g,renderTabContent:X=>jsx$1(ContainerContentsWrapper,{...X,height:"auto"}),width:h.width,flex:h.flex};return jsx$1(Tabs$1,{...Z})}return A?jsx$1(StyledLayoutWrapper,{"data-testid":"stLayoutWrapper",...h,children:A}):N},DownloadContext=reactExports.createContext({requestDeferredFile:void 0});DownloadContext.displayName="DownloadContext";const NavigationContext=reactExports.createContext({pageLinkBaseUrl:"",currentPageScriptHash:"",onPageChange:()=>{},navSections:[],appPages:[]});NavigationContext.displayName="NavigationContext";const StyledDataFrameOverlay=styled("div",{target:"e1hos2sk1"})(({theme:n})=>({position:"fixed",top:0,left:0,zIndex:n.zIndices.tablePortal,lineHeight:"100%",...!hasLightBackgroundColor(n)&&{"& input[type='date'], & input[type='time'], & input[type='datetime-local']":{"&::-webkit-calendar-picker-indicator":{filter:"brightness(0) invert(1)",opacity:1}}}})),StyledErrorMessage=styled("small",{target:"e1hos2sk2"})(({theme:n})=>({color:n.colors.redTextColor,fontSize:n.fontSizes.sm,marginTop:n.spacing.twoXS,display:"block"})),PortalContext=reactExports.createContext(null);PortalContext.displayName="PortalContext";const PortalProvider=({children:n})=>{const o=reactExports.useRef(null),e=reactExports.useCallback(()=>o.current,[]);return jsxs(PortalContext.Provider,{value:e,children:[n,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:o})]})},SidebarConfigContext=reactExports.createContext({initialSidebarState:PageConfig.SidebarState.AUTO,appLogo:null,sidebarChevronDownshift:0,expandSidebarNav:!1,hideSidebarNav:!1});SidebarConfigContext.displayName="SidebarConfigContext";const ThemeContext=reactExports.createContext({activeTheme:getDefaultTheme(),setTheme:()=>{},availableThemes:[]});ThemeContext.displayName="ThemeContext";function ThemeProvider({theme:n,baseuiTheme:o,children:e}){return jsx$1(ThemeProvider$1,{theme:o||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:n,children:e})})}const CopyButton=({text:n})=>{const o=useEmotionTheme(),e=reactExports.useRef(null),{isCopied:t,copyToClipboard:c,label:p}=useCopyToClipboard(),h=reactExports.useCallback(()=>{c(n)},[c,n]);return jsx$1(StyledCopyButton,{"data-testid":"stCodeCopyButton",title:p,"aria-label":p,type:"button",ref:e,onClick:h,children:t?jsx$1(Check,{size:convertRemToPx(o.iconSizes.base)}):jsx$1(Copy,{size:convertRemToPx(o.iconSizes.base)})})},CopyButton$1=reactExports.memo(CopyButton);function StreamlitErrorCodeBlock({children:n}){const o=typeof n=="string"&&n.trim().length>0;return jsxs(StyledCodeBlock,{className:"stErrorCodeBlock","data-testid":"stErrorCodeBlock",children:[jsx$1(StyledPre,{wrapLines:!1,children:jsx$1(StyledCode,{wrapLines:!1,children:n})}),o&&jsx$1(StyledCopyButtonContainer,{children:jsx$1(CopyButton$1,{text:n})})]})}const StreamlitErrorCodeBlock$1=reactExports.memo(StreamlitErrorCodeBlock);function iconToUrl(n){const o=/^:(.+)\/(.+):$/,e=n.match(o);return e===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${e[2]}/default/24px.svg`}function handleFavicon(n,o,e){const t=h=>{overwriteFavicon(h),o({type:"SET_PAGE_FAVICON",favicon:h})};if(n.startsWith(":material")){t(iconToUrl(n));return}const c="emoji:";if(n.startsWith(c)){const h=n.substring(c.length),y=createEmojiDataUrl(h);t(y);return}/^:[a-zA-Z0-9_+-]+:$/.test(n)?convertShortcodeToEmoji(n).then(h=>{t(h?createEmojiDataUrl(h):e.buildMediaURL(n))}).catch(()=>{t(e.buildMediaURL(n))}):t(e.buildMediaURL(n))}function createEmojiDataUrl(n){return`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>${n}</text></svg>`}function overwriteFavicon(n){const o=document.querySelector("link[rel='shortcut icon']");o&&(o.href=n)}async function convertShortcodeToEmoji(n){const o=await __vitePreload(()=>import("./index.CjozwSzS.js"),[],import.meta.url),e=n.replace(/-/g,"_"),t=o.get(e);return t&&t!==e&&o.has(t)?t:""}const StyledWidgetLabel=styled("label",{target:"e1gk92lc0"})(({disabled:n,labelVisibility:o,theme:e})=>({fontSize:e.fontSizes.sm,color:n?e.colors.fadedText40:e.colors.bodyText,display:o===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:o===LabelVisibilityOptions.Hidden?"hidden":"visible",marginBottom:e.spacing.twoXS,height:"auto",minHeight:e.fontSizes.xl,verticalAlign:"middle",flexDirection:"row",alignItems:"center"})),StyledWidgetLabelHelp=styled("div",{target:"e1gk92lc1"})({display:"flex",flexDirection:"row",justifyContent:"flex-end",flex:1}),StyledWidgetInstructions=styled("div",{target:"e1gk92lc2"})(({theme:n})=>({fontSize:n.fontSizes.twoSm,color:n.colors.fadedText60,margin:n.spacing.none,textAlign:"right",position:"absolute",bottom:n.spacing.threeXS,right:`calc(${n.fontSizes.mdLg} * 0.5)`})),StyledWidgetLabelHelpInline=styled("label",{target:"e1gk92lc3"})(({theme:n})=>({marginLeft:n.spacing.xs,position:"relative",display:"flex",flexDirection:"row"}));function WidgetLabel({label:n,children:o,disabled:e,labelVisibility:t,htmlFor:c}){return isNullOrUndefined(n)?jsx$1(Fragment,{}):jsxs(StyledWidgetLabel,{"data-testid":"stWidgetLabel","aria-hidden":"true",disabled:e,labelVisibility:t,htmlFor:c,children:[jsx$1(StreamlitMarkdown$1,{source:n,allowHTML:!1,isLabel:!0}),o]})}var _excluded$i=["title","size","color","overrides"];function _extends$i(){return _extends$i=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$i.apply(this,arguments)}function _objectWithoutProperties$g(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$f(n,o),t,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(n);for(c=0;c<p.length;c++)t=p[c],!(o.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$f(n,o){if(n==null)return{};var e={},t=Object.keys(n),c,p;for(p=0;p<t.length;p++)c=t[p],!(o.indexOf(c)>=0)&&(e[c]=n[c]);return e}function _slicedToArray$d(n,o){return _arrayWithHoles$d(n)||_iterableToArrayLimit$d(n,o)||_unsupportedIterableToArray$d(n,o)||_nonIterableRest$d()}function _nonIterableRest$d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
115
+ `),allowHTML:!1})]}),y&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:y.includes("linear"),color:y})]})}const StyledCheckbox$1=styled("div",{target:"eg2gxky0"})(({theme:n})=>({display:"flex",alignItems:"center",minHeight:n.sizes.smallElementHeight})),StyledContent=styled("div",{target:"eg2gxky1"})(({visibility:n})=>({display:n===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:n===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(n,o){let e=o.spacing.lg;return n===streamlit.GapSize.MEDIUM?e=o.spacing.threeXL:n===streamlit.GapSize.LARGE?e=o.spacing.fourXL:n===streamlit.GapSize.NONE&&(e=o.spacing.none),e}const StyledSpace=styled("div",{target:"ek2vi380"})({width:"100%",height:"100%"}),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=styled("div",{target:"ek2vi381"})(({theme:n,isStale:o,width:e,height:t,elementType:c,overflow:p,flex:h,minWidth:y,textAlign:g})=>({width:e,height:t,textAlign:g,maxWidth:"100%",minWidth:e==="0px"?0:y??"1rem",position:"relative",overflow:p,flex:h,"@media print":{overflow:"visible"},":has(> .stCacheSpinner)":{height:n.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${n.spacing.lg}`,zIndex:n.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${n.spacing.xs}`,marginBottom:`-${n.spacing.xs}`},...o&&c!=="skeleton"&&STALE_STYLES,...c==="empty"?{display:"none"}:{},...c==="space"?{minWidth:0,minHeight:0}:{},...GLOBAL_ELEMENTS.includes(c)?{marginBottom:`-${n.spacing.lg}`}:{}})),StyledColumn=styled("div",{target:"ek2vi382"})(({theme:n,weight:o,gap:e,showBorder:t,verticalAlignment:c})=>{const{VerticalAlignment:p}=Block$1.Column,h=o*100,y=translateGapWidth(e,n),g=y===n.spacing.none?`${h}%`:`calc(${h}% - ${y})`;return{width:g,flex:`1 1 ${g}`,[`@media (max-width: ${n.breakpoints.columns})`]:{minWidth:`calc(100% - ${n.spacing.twoXL})`},...c===p.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:n.spacing.sm}},...c===p.TOP&&{[`& ${StyledElementContainer}:first-of-type > ${StyledCheckbox$1}`]:{marginTop:n.spacing.sm}},...c===p.CENTER&&{marginTop:"auto",marginBottom:"auto"},...t&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`}}}),getAlignItems=n=>{switch(n){case Block$1.FlexContainer.Align.ALIGN_START:return"start";case Block$1.FlexContainer.Align.ALIGN_CENTER:return"center";case Block$1.FlexContainer.Align.ALIGN_END:return"end";case Block$1.FlexContainer.Align.STRETCH:return"stretch";case Block$1.FlexContainer.Align.ALIGN_UNDEFINED:case void 0:case null:return"stretch";default:assertNever(n)}},getJustifyContent=n=>{switch(n){case Block$1.FlexContainer.Justify.JUSTIFY_START:return"start";case Block$1.FlexContainer.Justify.JUSTIFY_CENTER:return"center";case Block$1.FlexContainer.Justify.JUSTIFY_END:return"end";case Block$1.FlexContainer.Justify.SPACE_BETWEEN:return"space-between";case Block$1.FlexContainer.Justify.JUSTIFY_UNDEFINED:case void 0:case null:return"start";default:assertNever(n)}},StyledFlexContainerBlock=styled("div",{target:"ek2vi383"})(({theme:n,direction:o,gap:e,flex:t,$wrap:c,height:p,border:h,align:y,justify:g,overflow:$})=>{let E;return e!==void 0&&(E=translateGapWidth(e,n)),{display:"flex",gap:E,width:"100%",maxWidth:"100%",height:p??"auto",minWidth:"1rem",flexDirection:o,flex:t,alignItems:getAlignItems(y),justifyContent:getJustifyContent(g),flexWrap:c?"wrap":"nowrap",...h&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`},overflow:$}}),StyledLayoutWrapper=styled("div",{target:"ek2vi384"})(({width:n,height:o,flex:e})=>({display:"flex",flexDirection:"column",width:n,maxWidth:"100%",minWidth:"1rem",height:o,flex:e})),LARGE_STRETCH_BEHAVIOR$1=["graphvizChart","arrowVegaLiteChart","deckGlJsonChart","plotlyChart","docString","arrowDataFrame","json","audioInput","fileUploader","cameraInput","audio","video","code","buttonGroup","iframe"],MEDIUM_STRETCH_BEHAVIOR$1=["dateInput","radio","slider","textArea","progress","multiselect","selectbox","timeInput","numberInput","textInput"],WIDTH_STRETCH_OVERRIDE=["componentInstance","skeleton"],VISIBLE_OVERFLOW_OVERRIDE=["iframe","arrowDataFrame","deckGlJsonChart","arrowVegaLiteChart","graphvizChart"],StyledElementContainerLayoutWrapper=({node:n,...o})=>{const{isInHorizontalLayout:e,isInRoot:t}=useRequiredContext(FlexContext);let c;LARGE_STRETCH_BEHAVIOR$1.includes(n.element.type??"")?c="14rem":MEDIUM_STRETCH_BEHAVIOR$1.includes(n.element.type??"")&&(c="8rem"),n.element.type==="buttonGroup"&&n.element.buttonGroup?.style===ButtonGroup$1.Style.BORDERLESS&&(c="fit-content");const p=reactExports.useMemo(()=>{const y={};if(WIDTH_STRETCH_OVERRIDE.includes(n.element.type??"")&&(y.width="100%"),VISIBLE_OVERFLOW_OVERRIDE.includes(n.element.type??"")&&(y.overflow="visible"),n.element.type==="textArea")return n.element.heightConfig?.useStretch?{height:"100%",flex:"1 1 8rem"}:e?{height:"auto"}:{height:"auto",flex:""};if(n.element.type==="arrowVegaLiteChart")return n.element.widthConfig?.useContent&&t&&(y.width="100%"),e&&!n.element.widthConfig&&(y.flex="1 1 14rem"),y;if(n.element.type==="arrowDataFrame")return n.element.widthConfig?.useContent&&t&&(y.width="100%"),y;if(n.element.type==="imgs"){const g=!n.element.widthConfig||n.element.widthConfig.useStretch;y.width=g?"100%":"auto"}return y},[n.element.type,n.element.heightConfig?.useStretch,e,t,n.element.widthConfig]);let h=useLayoutStyles({element:n.element,subElement:n.element?.type&&n.element[n.element.type]||void 0,styleOverrides:p,minStretchBehavior:c});return n.element.type==="space"&&(e?h={...h,height:"auto"}:h={...h,width:"auto"}),jsx$1(StyledElementContainer,{...o,...h})},ArrowTable=reactExports.lazy(()=>__vitePreload(()=>import("./index.BjQIH-3U.js"),__vite__mapDeps([5,6,7,8]),import.meta.url)),ArrowVegaLiteChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.oyLQ4pue.js"),__vite__mapDeps([9,10,11,12,13,7,6,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]),import.meta.url)),Audio=reactExports.lazy(()=>__vitePreload(()=>import("./index.NaDyAN1s.js"),[],import.meta.url)),Balloons=reactExports.lazy(()=>__vitePreload(()=>import("./index.CxbL5FgL.js"),__vite__mapDeps([30,31]),import.meta.url)),DeckGlJsonChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dg5zbEp2.js"),__vite__mapDeps([32,20,21,10,11,15,33,13,27,28,34]),import.meta.url)),GraphVizChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.BKIlG7Ng.js"),__vite__mapDeps([35,29,28,10,11]),import.meta.url)),Html=reactExports.lazy(()=>__vitePreload(()=>import("./index.-3selq_5.js"),[],import.meta.url)),IFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.Di9I2cid.js"),__vite__mapDeps([36,37]),import.meta.url)),ImageList=reactExports.lazy(()=>__vitePreload(()=>import("./index.B0TPxAZ1.js"),__vite__mapDeps([38,10,11]),import.meta.url)),Json=reactExports.lazy(()=>__vitePreload(()=>import("./index.CIC9pLsG.js"),__vite__mapDeps([39,15,16]),import.meta.url)),LinkButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.Da9gznCC.js"),[],import.meta.url)),Metric=reactExports.lazy(()=>__vitePreload(()=>import("./index.VFDFuf_7.js"),__vite__mapDeps([40,26,27,28,29]),import.meta.url)),PageLink=reactExports.lazy(()=>__vitePreload(()=>import("./index.BVuohWM1.js"),[],import.meta.url)),PlotlyChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.6UunrySF.js"),__vite__mapDeps([41,10,13]),import.meta.url)),Progress=reactExports.lazy(()=>__vitePreload(()=>import("./index.BPmBNTel.js"),__vite__mapDeps([42,43]),import.meta.url)),Snow=reactExports.lazy(()=>__vitePreload(()=>import("./index.1ylynMAS.js"),__vite__mapDeps([44,31]),import.meta.url)),Spinner=reactExports.lazy(()=>__vitePreload(()=>import("./index.B_AvdOKC.js"),[],import.meta.url)),StreamlitSyntaxHighlighter=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.BFWV0oqR.js"),[],import.meta.url)),Toast=reactExports.lazy(()=>__vitePreload(()=>import("./index.DN4sfQLP.js"),[],import.meta.url)),Video=reactExports.lazy(()=>__vitePreload(()=>import("./index.BMU6zZRk.js"),[],import.meta.url)),AudioInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CbiYVMT1.js"),__vite__mapDeps([45,46,11,13,19,47,23]),import.meta.url)),ArrowDataFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.Buc7XrOl.js").then(n=>n.c),__vite__mapDeps([12,10,11,13,7,6,8,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url)),Button=reactExports.lazy(()=>__vitePreload(()=>import("./index.L7erTnMm.js"),[],import.meta.url)),ButtonGroup=reactExports.lazy(()=>__vitePreload(()=>import("./index.BrqtKtSu.js"),__vite__mapDeps([48,33,13]),import.meta.url)),ComponentInstance=reactExports.lazy(()=>__vitePreload(()=>import("./index.q4fLUQtC.js"),__vite__mapDeps([49,50,47,37]),import.meta.url).then(n=>({default:n.ComponentInstance}))),CameraInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CbxllBj8.js"),__vite__mapDeps([51,50,52,13,43,47]),import.meta.url)),ChatInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.DwJ9Vhsl.js"),__vite__mapDeps([53,54,52,46,55,56,57,58,59]),import.meta.url)),Checkbox=reactExports.lazy(()=>__vitePreload(()=>import("./index.RNTPpVde.js"),__vite__mapDeps([60,33,13,18]),import.meta.url)),ColorPicker=reactExports.lazy(()=>__vitePreload(()=>import("./index.CSbah0y4.js"),__vite__mapDeps([61,33,13,17]),import.meta.url)),DateInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BJas6XzW.js"),__vite__mapDeps([62,7,33,13,63,64,21,22,65,57,59]),import.meta.url)),DateTimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.XYozEjwK.js"),__vite__mapDeps([66,7,63,64,21,22,65,57,33,13,67,59]),import.meta.url)),DownloadButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.CP2YZ73v.js"),__vite__mapDeps([68,19]),import.meta.url)),FileUploader=reactExports.lazy(()=>__vitePreload(()=>import("./index.xZBTXGNC.js"),__vite__mapDeps([69,13,54,52,43]),import.meta.url)),FormSubmitContent=reactExports.lazy(()=>__vitePreload(()=>import("./index.BHWBaOWH.js"),__vite__mapDeps([70,13]),import.meta.url).then(n=>({default:n.FormSubmitContent}))),Multiselect=reactExports.lazy(()=>__vitePreload(()=>import("./index.DMU3coc2.js"),__vite__mapDeps([71,33,13,24,8]),import.meta.url)),NumberInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.DkpEv0uV.js"),__vite__mapDeps([72,55,13,14,73,65,57]),import.meta.url)),Radio=reactExports.lazy(()=>__vitePreload(()=>import("./index.DY9Ac89e.js"),__vite__mapDeps([74,33,13]),import.meta.url)),Selectbox$1=reactExports.lazy(()=>__vitePreload(()=>import("./index.DRDE9rnx.js"),__vite__mapDeps([75,33,13]),import.meta.url)),Slider=reactExports.lazy(()=>__vitePreload(()=>import("./index.Ckcqwai8.js"),__vite__mapDeps([76,7,14,50,33,13]),import.meta.url)),TextArea=reactExports.lazy(()=>__vitePreload(()=>import("./index.DYKCsDvl.js"),__vite__mapDeps([77,55,33,13,78,58,56,57,73]),import.meta.url)),TextInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CxXo5UKy.js"),__vite__mapDeps([79,55,33,13,78,58,73,65,57]),import.meta.url)),TimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.DBUdji-9.js"),__vite__mapDeps([80,33,13,67,64,21,22]),import.meta.url)),BidiComponent=reactExports.lazy(()=>__vitePreload(()=>import("./index.q9puCQgK.js"),[],import.meta.url));function hideIfStale(n,o){return n?jsx$1(Fragment,{}):o}const RawElementNodeRenderer=n=>{const{node:o}=n;if(!o)throw new Error("ElementNode not found.");const e={disableFullscreenMode:n.disableFullscreenMode,widthConfig:o.element.widthConfig,heightConfig:o.element.heightConfig},t={...e,widgetMgr:n.widgetMgr,disabled:n.widgetsDisabled,fragmentId:o.fragmentId,componentRegistry:n.componentRegistry};switch(o.element.type){case"alert":{const c=o.element.alert;return jsx$1(AlertElement$1,{icon:c.icon,body:c.body,kind:getAlertElementKind(c.format),...e})}case"arrowTable":{const c=o.element.arrowTable;return jsx$1(ArrowTable,{element:c,data:o.quiverElement,...e})}case"audio":return jsx$1(Audio,{element:o.element.audio,endpoints:n.endpoints,...e,elementMgr:n.widgetMgr});case"balloons":return hideIfStale(n.isStale,jsx$1(Balloons,{scriptRunId:o.scriptRunId}));case"code":{const c=o.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:c.language,showLineNumbers:c.showLineNumbers,wrapLines:c.wrapLines,children:c.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:o.element.deckGlJsonChart,...t});case"docString":return jsx$1(DocString$1,{element:o.element.docString,...e});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement$1,{element:o.element.exception,...e});case"graphvizChart":return jsx$1(GraphVizChart,{element:o.element.graphvizChart,...e});case"heading":return jsx$1(Heading,{element:o.element.heading,...e});case"iframe":return jsx$1(IFrame,{element:o.element.iframe,...e});case"imgs":return jsx$1(ImageList,{element:o.element.imgs,endpoints:n.endpoints,...e});case"json":return jsx$1(Json,{element:o.element.json,...e});case"markdown":return jsx$1(Markdown$1,{element:o.element.markdown,...e});case"metric":return jsx$1(Metric,{element:o.element.metric,...e});case"html":return jsx$1(Html,{element:o.element.html,...e});case"pageLink":{const c=o.element.pageLink,p=t.disabled||c.disabled;return jsx$1(PageLink,{element:c,disabled:p,...e})}case"progress":return jsx$1(Progress,{element:o.element.progress,...e});case"skeleton":return jsx$1(Skeleton,{element:o.element.skeleton});case"snow":return hideIfStale(n.isStale,jsx$1(Snow,{scriptRunId:o.scriptRunId}));case"space":return jsx$1(StyledSpace,{className:"stSpace","data-testid":"stSpace"});case"spinner":return jsx$1(Spinner,{element:o.element.spinner,...e});case"text":return jsx$1(TextElement$1,{element:o.element.text,...e});case"video":return jsx$1(Video,{element:o.element.video,endpoints:n.endpoints,...e,elementMgr:n.widgetMgr});case"toast":{const c=o.element.toast;return jsx$1(Toast,{element:c,...e},o.scriptRunId)}case"arrowDataFrame":{const c=o.element.arrowDataFrame;return t.disabled=t.disabled||c.disabled,jsx$1(ArrowDataFrame,{element:c,data:o.quiverElement,...t},c.id||void 0)}case"arrowVegaLiteChart":{const c=o.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:c,...t},c.id||void 0)}case"audioInput":{const c=o.element.audioInput;return t.disabled=t.disabled||c.disabled,jsx$1(AudioInput,{uploadClient:n.uploadClient,element:c,...t},c.id)}case"button":{const c=o.element.button;return t.disabled=t.disabled||c.disabled,c.isFormSubmitter?jsx$1(FormSubmitContent,{element:c,...t}):jsx$1(Button,{element:c,...t})}case"buttonGroup":{const c=o.element.buttonGroup;return t.disabled=t.disabled||c.disabled,jsx$1(ButtonGroup,{element:c,...t},c.id)}case"downloadButton":{const c=o.element.downloadButton;return t.disabled=t.disabled||c.disabled,jsx$1(DownloadButton,{endpoints:n.endpoints,element:c,...t},c.id)}case"cameraInput":{const c=o.element.cameraInput;return t.disabled=t.disabled||c.disabled,jsx$1(CameraInput,{element:c,uploadClient:n.uploadClient,...t},c.id)}case"chatInput":{const c=o.element.chatInput;return t.disabled=t.disabled||c.disabled,jsx$1(ChatInput,{element:c,uploadClient:n.uploadClient,...t},c.id)}case"checkbox":{const c=o.element.checkbox;return t.disabled=t.disabled||c.disabled,jsx$1(Checkbox,{element:c,...t},c.id)}case"colorPicker":{const c=o.element.colorPicker;return t.disabled=t.disabled||c.disabled,jsx$1(ColorPicker,{element:c,...t},c.id)}case"componentInstance":return jsx$1(ComponentInstance,{element:o.element.componentInstance,...t});case"dateInput":{const c=o.element.dateInput;return t.disabled=t.disabled||c.disabled,jsx$1(DateInput,{element:c,...t},c.id)}case"fileUploader":{const c=o.element.fileUploader;return t.disabled=t.disabled||c.disabled,jsx$1(FileUploader,{element:c,uploadClient:n.uploadClient,...t},c.id)}case"linkButton":{const c=o.element.linkButton;return jsx$1(LinkButton,{element:c,...e})}case"multiselect":{const c=o.element.multiselect;return t.disabled=t.disabled||c.disabled,jsx$1(Multiselect,{element:c,...t},c.id)}case"numberInput":{const c=o.element.numberInput;return t.disabled=t.disabled||c.disabled,jsx$1(NumberInput,{element:c,...t},c.id)}case"plotlyChart":{const c=o.element.plotlyChart;return jsx$1(PlotlyChart,{element:c,...t},c.id)}case"radio":{const c=o.element.radio;return t.disabled=t.disabled||c.disabled,jsx$1(Radio,{element:c,...t},c.id)}case"selectbox":{const c=o.element.selectbox;return t.disabled=t.disabled||c.disabled,jsx$1(Selectbox$1,{element:c,...t},c.id)}case"slider":{const c=o.element.slider;return t.disabled=t.disabled||c.disabled,jsx$1(Slider,{element:c,...t},c.id)}case"textArea":{const c=o.element.textArea;return t.disabled=t.disabled||c.disabled,jsx$1(TextArea,{element:c,outerElement:o.element,...t},c.id)}case"textInput":{const c=o.element.textInput;return t.disabled=t.disabled||c.disabled,jsx$1(TextInput,{element:c,...t},c.id)}case"dateTimeInput":{const c=o.element.dateTimeInput;return t.disabled=t.disabled||c.disabled,jsx$1(DateTimeInput,{element:c,...t},c.id)}case"timeInput":{const c=o.element.timeInput;return t.disabled=t.disabled||c.disabled,jsx$1(TimeInput,{element:c,...t},c.id)}case"bidiComponent":{const c=o.element.bidiComponent;return jsx$1(BidiComponent,{element:c,...t},c.id)}default:throw new Error(`Unrecognized Element type ${o.element.type}`)}},ElementNodeRenderer=n=>{const{isFullScreen:o}=reactExports.useContext(ViewStateContext),{scriptRunState:e,scriptRunId:t,fragmentIdsThisRun:c}=reactExports.useContext(ScriptRunContext),{node:p}=n,h=p.element.type||"",y=shouldComponentBeEnabled(h,e),g=isComponentStale(y,p,e,t,c),$=getElementId(p.element),E=getKeyFromId($);return jsx$1(Maybe,{enable:y,children:jsx$1(StyledElementContainerLayoutWrapper,{className:classNames("stElementContainer","element-container",convertKeyToClassName(E)),"data-testid":"stElementContainer","data-stale":g,isStale:g&&!o,elementType:h,node:p,children:jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...n,isStale:g})})})})})};class RenderNodeVisitor{constructor(o){this.props=o,this.elementKeySet=new Set,this.reactElements=[],this.index=0}getCurrentKey(o){const e=o||this.index.toString();return this.index+=1,e}visitBlockNode(o){const e={...this.props,node:o},t=this.getCurrentKey(),c=jsx$1(BlockNodeRenderer,{...e},t);return this.reactElements.push(c),c}visitElementNode(o){const e={...this.props,node:o},t=this.getCurrentKey(getElementId(o.element));if(this.elementKeySet.has(t))return null;this.elementKeySet.add(t);const c=jsx$1(ElementNodeRenderer,{...e},t);return this.reactElements.push(c),c}static collectReactElements(o){if(!o.node.children)return[];const e=new RenderNodeVisitor(o);return o.node.children.forEach(t=>t.accept(e)),e.reactElements}}const ChildRenderer=n=>(assignDividerColor(n.node,useEmotionTheme()),jsx$1(Fragment,{children:RenderNodeVisitor.collectReactElements(n)})),getLayoutSubElement=n=>{const o=n.type,e=o?n[o]:void 0;if(!e||typeof e!="object")return;const t=e,c={useContainerWidth:t.useContainerWidth,height:t.height,width:t.width,widthConfig:t.widthConfig};if(!(c.useContainerWidth===void 0&&c.height===void 0&&c.width===void 0&&c.widthConfig===void 0))return c},ContainerContentsWrapper=n=>{const o=reactExports.useContext(FlexContext),e={direction:Direction.VERTICAL,flex:1,gap:streamlit.GapSize.SMALL,height:n.height,border:!1},t=getKeyFromId(n.node.deltaBlock.id);return jsx$1(FlexContextProvider,{direction:Direction.VERTICAL,isRoot:n.isRoot,parentContext:o,children:jsx$1(StyledFlexContainerBlock,{...e,className:classNames(getClassnamePrefix(Direction.VERTICAL),convertKeyToClassName(t)),"data-testid":getClassnamePrefix(Direction.VERTICAL),children:jsx$1(ChildRenderer,{...n})})})},FlexBoxContainer=n=>{const o=getDirectionOfBlock(n.node.deltaBlock),e=reactExports.useContext(FlexContext),t=getActivateScrollToBottomBackwardsCompatible(n.node),c=useScrollToBottom(t),p=useLayoutStyles({element:n.node.deltaBlock,subElement:getLayoutSubElement(n.node.deltaBlock)}),h={gap:n.node.deltaBlock.flexContainer?.gapConfig?.gapSize??streamlit.GapSize.SMALL,direction:o,$wrap:n.node.deltaBlock.flexContainer?.wrap??!1,overflow:p.overflow,border:getBorderBackwardsCompatible(n.node.deltaBlock),height:p.height,flex:"1",align:n.node.deltaBlock.flexContainer?.align,justify:n.node.deltaBlock.flexContainer?.justify},y=getKeyFromId(n.node.deltaBlock.id),g=n.node.deltaBlock.widthConfig?.pixelWidth??void 0,$=n.node.deltaBlock.widthConfig?.useContent??!1,E=(n.node.deltaBlock.widthConfig?.pixelWidth??0)>0||(n.node.deltaBlock.widthConfig?.remWidth??0)>0;return jsx$1(FlexContextProvider,{direction:o,parentWidth:g,hasContentWidth:$,hasFixedWidth:E,parentContext:e,children:jsx$1(StyledFlexContainerBlock,{...h,className:classNames(getClassnamePrefix(o),convertKeyToClassName(y)),"data-testid":getClassnamePrefix(o),ref:c,"data-test-scroll-behavior":t?"scroll-to-bottom":"normal",children:jsx$1(ChildRenderer,{...n})})})},LARGE_STRETCH_BEHAVIOR=["tabContainer"],MEDIUM_STRETCH_BEHAVIOR=["chatInput"],BlockNodeRenderer=n=>{const{node:o}=n,{scriptRunState:e,scriptRunId:t,fragmentIdsThisRun:c}=reactExports.useContext(ScriptRunContext);let p;LARGE_STRETCH_BEHAVIOR.includes(o.deltaBlock.type??"")?p="14rem":MEDIUM_STRETCH_BEHAVIOR.includes(o.deltaBlock.type??"")?p="8rem":o.deltaBlock.type==="chatMessage"?o.isEmpty&&(p="8rem"):(o.deltaBlock.type==="flexContainer"||o.deltaBlock.column||o.deltaBlock.expandable)&&(o.isEmpty||(p="8rem"));const h=useLayoutStyles({element:o.deltaBlock,subElement:getLayoutSubElement(o.deltaBlock),minStretchBehavior:p});if(o.isEmpty&&!o.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const y=shouldComponentBeEnabled("",e),g=isComponentStale(y,o,e,t,c),$={...n,node:o},E=n.disableFullscreenMode||notNullOrUndefined(o.deltaBlock.dialog)||notNullOrUndefined(o.deltaBlock.popover);let A;const N=jsx$1(ContainerContentsWrapper,{...$,disableFullscreenMode:E,height:"100%"});if(checkFlexContainerBackwardsCompatibile(o.deltaBlock)&&(A=jsx$1(FlexBoxContainer,{...$})),o.deltaBlock.dialog)return jsx$1(Dialog$1,{element:o.deltaBlock.dialog,deltaMsgReceivedAt:o.deltaMsgReceivedAt,widgetMgr:n.widgetMgr,fragmentId:o.fragmentId,children:N});if(o.deltaBlock.expandable&&(A=jsx$1(Expander$1,{isStale:g,element:o.deltaBlock.expandable,children:N})),o.deltaBlock.popover&&(A=jsx$1(Popover$1,{empty:o.isEmpty,element:o.deltaBlock.popover,stretchWidth:shouldWidthStretch(o.deltaBlock.widthConfig),children:N})),o.deltaBlock.type==="form"){const{formId:H,clearOnSubmit:Z,enterToSubmit:X,border:be}=o.deltaBlock.form;A=jsx$1(Form$1,{formId:H,clearOnSubmit:Z,enterToSubmit:X,widgetMgr:n.widgetMgr,border:be,overflow:h.overflow,children:N})}if(o.deltaBlock.chatMessage&&(A=jsx$1(ChatMessage$1,{element:o.deltaBlock.chatMessage,endpoints:n.endpoints,children:N})),o.deltaBlock.column)return jsx$1(StyledColumn,{weight:o.deltaBlock.column.weight??0,gap:backwardsCompatibleColumnGapSize(o.deltaBlock.column),verticalAlignment:o.deltaBlock.column.verticalAlignment??void 0,showBorder:o.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:N});if(o.deltaBlock.tabContainer){const Z={...$,isStale:g,renderTabContent:X=>jsx$1(ContainerContentsWrapper,{...X,height:"auto"}),width:h.width,flex:h.flex};return jsx$1(Tabs$1,{...Z})}return A?jsx$1(StyledLayoutWrapper,{"data-testid":"stLayoutWrapper",...h,children:A}):N},DownloadContext=reactExports.createContext({requestDeferredFile:void 0});DownloadContext.displayName="DownloadContext";const NavigationContext=reactExports.createContext({pageLinkBaseUrl:"",currentPageScriptHash:"",onPageChange:()=>{},navSections:[],appPages:[]});NavigationContext.displayName="NavigationContext";const StyledDataFrameOverlay=styled("div",{target:"e1hos2sk1"})(({theme:n})=>({position:"fixed",top:0,left:0,zIndex:n.zIndices.tablePortal,lineHeight:"100%",...!hasLightBackgroundColor(n)&&{"& input[type='date'], & input[type='time'], & input[type='datetime-local']":{"&::-webkit-calendar-picker-indicator":{filter:"brightness(0) invert(1)",opacity:1}}}})),StyledErrorMessage=styled("small",{target:"e1hos2sk2"})(({theme:n})=>({color:n.colors.redTextColor,fontSize:n.fontSizes.sm,marginTop:n.spacing.twoXS,display:"block"})),PortalContext=reactExports.createContext(null);PortalContext.displayName="PortalContext";const PortalProvider=({children:n})=>{const o=reactExports.useRef(null),e=reactExports.useCallback(()=>o.current,[]);return jsxs(PortalContext.Provider,{value:e,children:[n,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:o})]})},SidebarConfigContext=reactExports.createContext({initialSidebarState:PageConfig.SidebarState.AUTO,appLogo:null,sidebarChevronDownshift:0,expandSidebarNav:!1,hideSidebarNav:!1});SidebarConfigContext.displayName="SidebarConfigContext";const ThemeContext=reactExports.createContext({activeTheme:getDefaultTheme(),setTheme:()=>{},availableThemes:[]});ThemeContext.displayName="ThemeContext";function ThemeProvider({theme:n,baseuiTheme:o,children:e}){return jsx$1(ThemeProvider$1,{theme:o||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:n,children:e})})}const CopyButton=({text:n})=>{const o=useEmotionTheme(),e=reactExports.useRef(null),{isCopied:t,copyToClipboard:c,label:p}=useCopyToClipboard(),h=reactExports.useCallback(()=>{c(n)},[c,n]);return jsx$1(StyledCopyButton,{"data-testid":"stCodeCopyButton",title:p,"aria-label":p,type:"button",ref:e,onClick:h,children:t?jsx$1(Check,{size:convertRemToPx(o.iconSizes.base)}):jsx$1(Copy,{size:convertRemToPx(o.iconSizes.base)})})},CopyButton$1=reactExports.memo(CopyButton);function StreamlitErrorCodeBlock({children:n}){const o=typeof n=="string"&&n.trim().length>0;return jsxs(StyledCodeBlock,{className:"stErrorCodeBlock","data-testid":"stErrorCodeBlock",children:[jsx$1(StyledPre,{wrapLines:!1,children:jsx$1(StyledCode,{wrapLines:!1,children:n})}),o&&jsx$1(StyledCopyButtonContainer,{children:jsx$1(CopyButton$1,{text:n})})]})}const StreamlitErrorCodeBlock$1=reactExports.memo(StreamlitErrorCodeBlock);function iconToUrl(n){const o=/^:(.+)\/(.+):$/,e=n.match(o);return e===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${e[2]}/default/24px.svg`}function handleFavicon(n,o,e){const t=h=>{overwriteFavicon(h),o({type:"SET_PAGE_FAVICON",favicon:h})};if(n.startsWith(":material")){t(iconToUrl(n));return}const c="emoji:";if(n.startsWith(c)){const h=n.substring(c.length),y=createEmojiDataUrl(h);t(y);return}/^:[a-zA-Z0-9_+-]+:$/.test(n)?convertShortcodeToEmoji(n).then(h=>{t(h?createEmojiDataUrl(h):e.buildMediaURL(n))}).catch(()=>{t(e.buildMediaURL(n))}):t(e.buildMediaURL(n))}function createEmojiDataUrl(n){return`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>${n}</text></svg>`}function overwriteFavicon(n){const o=document.querySelector("link[rel='shortcut icon']");o&&(o.href=n)}async function convertShortcodeToEmoji(n){const o=await __vitePreload(()=>import("./index.DfIRibXG.js"),[],import.meta.url),e=n.replace(/-/g,"_"),t=o.get(e);return t&&t!==e&&o.has(t)?t:""}const StyledWidgetLabel=styled("label",{target:"e1gk92lc0"})(({disabled:n,labelVisibility:o,theme:e})=>({fontSize:e.fontSizes.sm,color:n?e.colors.fadedText40:e.colors.bodyText,display:o===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:o===LabelVisibilityOptions.Hidden?"hidden":"visible",marginBottom:e.spacing.twoXS,height:"auto",minHeight:e.fontSizes.xl,verticalAlign:"middle",flexDirection:"row",alignItems:"center"})),StyledWidgetLabelHelp=styled("div",{target:"e1gk92lc1"})({display:"flex",flexDirection:"row",justifyContent:"flex-end",flex:1}),StyledWidgetInstructions=styled("div",{target:"e1gk92lc2"})(({theme:n})=>({fontSize:n.fontSizes.twoSm,color:n.colors.fadedText60,margin:n.spacing.none,textAlign:"right",position:"absolute",bottom:n.spacing.threeXS,right:`calc(${n.fontSizes.mdLg} * 0.5)`})),StyledWidgetLabelHelpInline=styled("label",{target:"e1gk92lc3"})(({theme:n})=>({marginLeft:n.spacing.xs,position:"relative",display:"flex",flexDirection:"row"}));function WidgetLabel({label:n,children:o,disabled:e,labelVisibility:t,htmlFor:c}){return isNullOrUndefined(n)?jsx$1(Fragment,{}):jsxs(StyledWidgetLabel,{"data-testid":"stWidgetLabel","aria-hidden":"true",disabled:e,labelVisibility:t,htmlFor:c,children:[jsx$1(StreamlitMarkdown$1,{source:n,allowHTML:!1,isLabel:!0}),o]})}var _excluded$i=["title","size","color","overrides"];function _extends$i(){return _extends$i=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$i.apply(this,arguments)}function _objectWithoutProperties$g(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$f(n,o),t,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(n);for(c=0;c<p.length;c++)t=p[c],!(o.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$f(n,o){if(n==null)return{};var e={},t=Object.keys(n),c,p;for(p=0;p<t.length;p++)c=t[p],!(o.indexOf(c)>=0)&&(e[c]=n[c]);return e}function _slicedToArray$d(n,o){return _arrayWithHoles$d(n)||_iterableToArrayLimit$d(n,o)||_unsupportedIterableToArray$d(n,o)||_nonIterableRest$d()}function _nonIterableRest$d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
116
116
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$d(n,o){if(n){if(typeof n=="string")return _arrayLikeToArray$d(n,o);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$d(n,o)}}function _arrayLikeToArray$d(n,o){(o==null||o>n.length)&&(o=n.length);for(var e=0,t=new Array(o);e<o;e++)t[e]=n[e];return t}function _iterableToArrayLimit$d(n,o){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],c=!0,p=!1,h,y;try{for(e=e.call(n);!(c=(h=e.next()).done)&&(t.push(h.value),!(o&&t.length===o));c=!0);}catch(g){p=!0,y=g}finally{try{!c&&e.return!=null&&e.return()}finally{if(p)throw y}}return t}}function _arrayWithHoles$d(n){if(Array.isArray(n))return n}function ChevronDown(n,o){var e=useStyletron(),t=_slicedToArray$d(e,2),c=t[1],p=n.title,h=p===void 0?"Down":p,y=n.size,g=n.color,$=n.overrides,E=$===void 0?{}:$,A=_objectWithoutProperties$g(n,_excluded$i),N=mergeOverride({component:c.icons&&c.icons.ChevronDown?c.icons.ChevronDown:null},E&&E.Svg?toObjectOverride(E.Svg):{});return reactExports.createElement(Icon$1,_extends$i({viewBox:"0 0 24 24",ref:o,title:h,size:y,color:g,overrides:{Svg:N}},A),reactExports.createElement("path",{transform:"rotate(270, 12, 12)",fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"}))}const ChevronDown$1=reactExports.forwardRef(ChevronDown);var _excluded$h=["title","size","color","overrides"];function _extends$h(){return _extends$h=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$h.apply(this,arguments)}function _objectWithoutProperties$f(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$e(n,o),t,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(n);for(c=0;c<p.length;c++)t=p[c],!(o.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$e(n,o){if(n==null)return{};var e={},t=Object.keys(n),c,p;for(p=0;p<t.length;p++)c=t[p],!(o.indexOf(c)>=0)&&(e[c]=n[c]);return e}function _slicedToArray$c(n,o){return _arrayWithHoles$c(n)||_iterableToArrayLimit$c(n,o)||_unsupportedIterableToArray$c(n,o)||_nonIterableRest$c()}function _nonIterableRest$c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
117
117
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$c(n,o){if(n){if(typeof n=="string")return _arrayLikeToArray$c(n,o);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$c(n,o)}}function _arrayLikeToArray$c(n,o){(o==null||o>n.length)&&(o=n.length);for(var e=0,t=new Array(o);e<o;e++)t[e]=n[e];return t}function _iterableToArrayLimit$c(n,o){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],c=!0,p=!1,h,y;try{for(e=e.call(n);!(c=(h=e.next()).done)&&(t.push(h.value),!(o&&t.length===o));c=!0);}catch(g){p=!0,y=g}finally{try{!c&&e.return!=null&&e.return()}finally{if(p)throw y}}return t}}function _arrayWithHoles$c(n){if(Array.isArray(n))return n}function DeleteAlt(n,o){var e=useStyletron(),t=_slicedToArray$c(e,2),c=t[1],p=n.title,h=p===void 0?"Delete Alt":p,y=n.size,g=n.color,$=n.overrides,E=$===void 0?{}:$,A=_objectWithoutProperties$f(n,_excluded$h),N=mergeOverride({component:c.icons&&c.icons.DeleteAlt?c.icons.DeleteAlt:null},E&&E.Svg?toObjectOverride(E.Svg):{});return reactExports.createElement(Icon$1,_extends$h({viewBox:"0 0 24 24",ref:o,title:h,size:y,color:g,overrides:{Svg:N}},A),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}const DeleteAlt$1=reactExports.forwardRef(DeleteAlt);var _excluded$g=["title","size","color","overrides"];function _extends$g(){return _extends$g=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$g.apply(this,arguments)}function _objectWithoutProperties$e(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$d(n,o),t,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(n);for(c=0;c<p.length;c++)t=p[c],!(o.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$d(n,o){if(n==null)return{};var e={},t=Object.keys(n),c,p;for(p=0;p<t.length;p++)c=t[p],!(o.indexOf(c)>=0)&&(e[c]=n[c]);return e}function _slicedToArray$b(n,o){return _arrayWithHoles$b(n)||_iterableToArrayLimit$b(n,o)||_unsupportedIterableToArray$b(n,o)||_nonIterableRest$b()}function _nonIterableRest$b(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
118
118
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$b(n,o){if(n){if(typeof n=="string")return _arrayLikeToArray$b(n,o);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$b(n,o)}}function _arrayLikeToArray$b(n,o){(o==null||o>n.length)&&(o=n.length);for(var e=0,t=new Array(o);e<o;e++)t[e]=n[e];return t}function _iterableToArrayLimit$b(n,o){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],c=!0,p=!1,h,y;try{for(e=e.call(n);!(c=(h=e.next()).done)&&(t.push(h.value),!(o&&t.length===o));c=!0);}catch(g){p=!0,y=g}finally{try{!c&&e.return!=null&&e.return()}finally{if(p)throw y}}return t}}function _arrayWithHoles$b(n){if(Array.isArray(n))return n}function Search(n,o){var e=useStyletron(),t=_slicedToArray$b(e,2),c=t[1],p=n.title,h=p===void 0?"Search":p,y=n.size,g=n.color,$=n.overrides,E=$===void 0?{}:$,A=_objectWithoutProperties$e(n,_excluded$g),N=mergeOverride({component:c.icons&&c.icons.Search?c.icons.Search:null},E&&E.Svg?toObjectOverride(E.Svg):{});return reactExports.createElement(Icon$1,_extends$g({viewBox:"0 0 24 24",ref:o,title:h,size:y,color:g,overrides:{Svg:N}},A),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 6C8.79086 6 7 7.79086 7 10C7 12.2091 8.79086 14 11 14C13.2091 14 15 12.2091 15 10C15 7.79086 13.2091 6 11 6ZM5 10C5 6.68629 7.68629 4 11 4C14.3137 4 17 6.68629 17 10C17 11.2958 16.5892 12.4957 15.8907 13.4765L19.7071 17.2929C20.0976 17.6834 20.0976 18.3166 19.7071 18.7071C19.3166 19.0976 18.6834 19.0976 18.2929 18.7071L14.4765 14.8907C13.4957 15.5892 12.2958 16 11 16C7.68629 16 5 13.3137 5 10Z"}))}const SearchIconComponent=reactExports.forwardRef(Search);var _excluded$f=["title","size","color","overrides"];function _extends$f(){return _extends$f=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$f.apply(this,arguments)}function _objectWithoutProperties$d(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$c(n,o),t,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(n);for(c=0;c<p.length;c++)t=p[c],!(o.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$c(n,o){if(n==null)return{};var e={},t=Object.keys(n),c,p;for(p=0;p<t.length;p++)c=t[p],!(o.indexOf(c)>=0)&&(e[c]=n[c]);return e}function _slicedToArray$a(n,o){return _arrayWithHoles$a(n)||_iterableToArrayLimit$a(n,o)||_unsupportedIterableToArray$a(n,o)||_nonIterableRest$a()}function _nonIterableRest$a(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -136,7 +136,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136
136
  `;)nt++;return nt}function De(){if($e.length>0)return $e.shift();if(Ce)return Ne();var ze,nt,ct,at,dt,Me=H===0;do{if(H===Z)return null;for(ze=!1;h.test(ct=Fe(H));)if(ct===`
137
137
  `&&(Me=!0,++X),++H===Z)return null;if(Fe(H)==="/"){if(++H===Z)throw Ie("comment");if(Fe(H)==="/")if(N){if(at=H,dt=!1,Ge(H-1)){dt=!0;do if(H=je(H),H===Z||(H++,!Me))break;while(Ge(H))}else H=Math.min(Z,je(H)+1);dt&&(Be(at,H,Me),Me=!0),X++,ze=!0}else{for(dt=Fe(at=H+1)==="/";Fe(++H)!==`
138
138
  `;)if(H===Z)return null;++H,dt&&(Be(at,H-1,Me),Me=!0),++X,ze=!0}else if((ct=Fe(H))==="*"){at=H+1,dt=N||Fe(at)==="*";do{if(ct===`
139
- `&&++X,++H===Z)throw Ie("comment");nt=ct,ct=Fe(H)}while(nt!=="*"||ct!=="/");++H,dt&&(Be(at,H-2,Me),Me=!0),ze=!0}else return"/"}}while(ze);var We=H;n.lastIndex=0;var tt=n.test(Fe(We++));if(!tt)for(;We<Z&&!n.test(Fe(We));)++We;var Ve=A.substring(H,H=We);return(Ve==='"'||Ve==="'")&&(Ce=Ve),Ve}function Ue(ze){$e.push(ze)}function Je(){if(!$e.length){var ze=De();if(ze===null)return null;Ue(ze)}return $e[0]}function Xe(ze,nt){var ct=Je(),at=ct===ze;if(at)return De(),!0;if(!nt)throw Ie("token '"+ct+"', '"+ze+"' expected");return!1}function Ke(ze){var nt=null,ct;return ze===void 0?(ct=we[X-1],delete we[X-1],ct&&(N||ct.type==="*"||ct.lineEmpty)&&(nt=ct.leading?ct.text:null)):(be<ze&&Je(),ct=we[ze],delete we[ze],ct&&!ct.lineEmpty&&(N||ct.type==="/")&&(nt=ct.leading?null:ct.text)),nt}return Object.defineProperty({next:De,peek:Je,push:Ue,skip:Xe,cmnt:Ke},"line",{get:function(){return X}})}return tokenize_1}var parse_1,hasRequiredParse;function requireParse(){if(hasRequiredParse)return parse_1;hasRequiredParse=1,parse_1=Ne,Ne.filename=null,Ne.defaults={keepCase:!1};var n=requireTokenize(),o=requireRoot(),e=requireType(),t=requireField(),c=requireMapfield(),p=requireOneof(),h=require_enum(),y=requireService(),g=requireMethod(),$=requireObject(),E=requireTypes(),A=requireUtil(),N=/^[1-9][0-9]*$/,H=/^-?[1-9][0-9]*$/,Z=/^0[x][0-9a-fA-F]+$/,X=/^-?0[x][0-9a-fA-F]+$/,be=/^0[0-7]+$/,we=/^-?0[0-7]+$/,$e=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,Ce=/^[a-zA-Z_][a-zA-Z_0-9]*$/,Ie=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;function Ne(Fe,Be,Ge){Be instanceof o||(Ge=Be,Be=new o),Ge||(Ge=Ne.defaults);var je=Ge.preferTrailingComment||!1,De=n(Fe,Ge.alternateCommentMode||!1),Ue=De.next,Je=De.push,Xe=De.peek,Ke=De.skip,ze=De.cmnt,nt=!0,ct,at,dt,Me="proto2",We=Be,tt=[],Ve={},vt=Ge.keepCase?function(ot){return ot}:A.camelCase;function xt(){tt.forEach(ot=>{ot._edition=Me,Object.keys(Ve).forEach(lt=>{ot.getOption(lt)===void 0&&ot.setOption(lt,Ve[lt],!0)})})}function Qe(ot,lt,st){var ft=Ne.filename;return st||(Ne.filename=null),Error("illegal "+(lt||"token")+" '"+ot+"' ("+(ft?ft+", ":"")+"line "+De.line+")")}function St(){var ot=[],lt;do{if((lt=Ue())!=='"'&&lt!=="'")throw Qe(lt);ot.push(Ue()),Ke(lt),lt=Xe()}while(lt==='"'||lt==="'");return ot.join("")}function pt(ot){var lt=Ue();switch(lt){case"'":case'"':return Je(lt),St();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return Ft(lt,!0)}catch{if(Ie.test(lt))return lt;throw Qe(lt,"value")}}function wt(ot,lt){var st,ft;do if(lt&&((st=Xe())==='"'||st==="'")){var ut=St();if(ot.push(ut),Me>=2023)throw Qe(ut,"id")}else try{ot.push([ft=Ht(Ue()),Ke("to",!0)?Ht(Ue()):ft])}catch(Gt){if(lt&&Ie.test(st)&&Me>=2023)ot.push(st);else throw Gt}while(Ke(",",!0));var At={options:void 0};At.setOption=function(Gt,Xt){this.options===void 0&&(this.options={}),this.options[Gt]=Xt},zt(At,function(Xt){if(Xt==="option")Ut(At,Xt),Ke(";");else throw Qe(Xt)},function(){Et(At)})}function Ft(ot,lt){var st=1;switch(ot.charAt(0)==="-"&&(st=-1,ot=ot.substring(1)),ot){case"inf":case"INF":case"Inf":return st*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(N.test(ot))return st*parseInt(ot,10);if(Z.test(ot))return st*parseInt(ot,16);if(be.test(ot))return st*parseInt(ot,8);if($e.test(ot))return st*parseFloat(ot);throw Qe(ot,"number",lt)}function Ht(ot,lt){switch(ot){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!lt&&ot.charAt(0)==="-")throw Qe(ot,"id");if(H.test(ot))return parseInt(ot,10);if(X.test(ot))return parseInt(ot,16);if(we.test(ot))return parseInt(ot,8);throw Qe(ot,"id")}function on(){if(ct!==void 0)throw Qe("package");if(ct=Ue(),!Ie.test(ct))throw Qe(ct,"name");We=We.define(ct),Ke(";")}function en(){var ot=Xe(),lt;switch(ot){case"weak":lt=dt||(dt=[]),Ue();break;case"public":Ue();default:lt=at||(at=[]);break}ot=St(),Ke(";"),lt.push(ot)}function Wt(){if(Ke("="),Me=St(),Me<2023)throw Qe(Me,"syntax");Ke(";")}function an(){if(Ke("="),Me=St(),!["2023"].includes(Me))throw Qe(Me,"edition");Ke(";")}function qt(ot,lt){switch(lt){case"option":return Ut(ot,lt),Ke(";"),!0;case"message":return Jt(ot,lt),!0;case"enum":return nn(ot,lt),!0;case"service":return Nt(ot,lt),!0;case"extend":return Bt(ot,lt),!0}return!1}function zt(ot,lt,st){var ft=De.line;if(ot&&(typeof ot.comment!="string"&&(ot.comment=ze()),ot.filename=Ne.filename),Ke("{",!0)){for(var ut;(ut=Ue())!=="}";)lt(ut);Ke(";",!0)}else st&&st(),Ke(";"),ot&&(typeof ot.comment!="string"||je)&&(ot.comment=ze(ft)||ot.comment)}function Jt(ot,lt){if(!Ce.test(lt=Ue()))throw Qe(lt,"type name");var st=new e(lt);zt(st,function(ut){if(!qt(st,ut))switch(ut){case"map":yn(st);break;case"required":if(Me!=="proto2")throw Qe(ut);case"repeated":jt(st,ut);break;case"optional":if(Me==="proto3")jt(st,"proto3_optional");else{if(Me!=="proto2")throw Qe(ut);jt(st,"optional")}break;case"oneof":vn(st,ut);break;case"extensions":wt(st.extensions||(st.extensions=[]));break;case"reserved":wt(st.reserved||(st.reserved=[]),!0);break;default:if(Me==="proto2"||!Ie.test(ut))throw Qe(ut);Je(ut),jt(st,"optional");break}}),ot.add(st),ot===We&&tt.push(st)}function jt(ot,lt,st){var ft=Ue();if(ft==="group"){Yt(ot,lt);return}for(;ft.endsWith(".")||Xe().startsWith(".");)ft+=Ue();if(!Ie.test(ft))throw Qe(ft,"type");var ut=Ue();if(!Ce.test(ut))throw Qe(ut,"name");ut=vt(ut),Ke("=");var At=new t(ut,Ht(Ue()),ft,lt,st);if(zt(At,function(un){if(un==="option")Ut(At,un),Ke(";");else throw Qe(un)},function(){Et(At)}),lt==="proto3_optional"){var Gt=new p("_"+ut);At.setOption("proto3_optional",!0),Gt.add(At),ot.add(Gt)}else ot.add(At);ot===We&&tt.push(At)}function Yt(ot,lt){if(Me>=2023)throw Qe("group");var st=Ue();if(!Ce.test(st))throw Qe(st,"name");var ft=A.lcFirst(st);st===ft&&(st=A.ucFirst(st)),Ke("=");var ut=Ht(Ue()),At=new e(st);At.group=!0;var Gt=new t(ft,ut,st,lt);Gt.filename=Ne.filename,zt(At,function(un){switch(un){case"option":Ut(At,un),Ke(";");break;case"required":case"repeated":jt(At,un);break;case"optional":Me==="proto3"?jt(At,"proto3_optional"):jt(At,"optional");break;case"message":Jt(At,un);break;case"enum":nn(At,un);break;case"reserved":wt(At.reserved||(At.reserved=[]),!0);break;default:throw Qe(un)}}),ot.add(At).add(Gt)}function yn(ot){Ke("<");var lt=Ue();if(E.mapKey[lt]===void 0)throw Qe(lt,"type");Ke(",");var st=Ue();if(!Ie.test(st))throw Qe(st,"type");Ke(">");var ft=Ue();if(!Ce.test(ft))throw Qe(ft,"name");Ke("=");var ut=new c(vt(ft),Ht(Ue()),lt,st);zt(ut,function(Gt){if(Gt==="option")Ut(ut,Gt),Ke(";");else throw Qe(Gt)},function(){Et(ut)}),ot.add(ut)}function vn(ot,lt){if(!Ce.test(lt=Ue()))throw Qe(lt,"name");var st=new p(vt(lt));zt(st,function(ut){ut==="option"?(Ut(st,ut),Ke(";")):(Je(ut),jt(st,"optional"))}),ot.add(st)}function nn(ot,lt){if(!Ce.test(lt=Ue()))throw Qe(lt,"name");var st=new h(lt);zt(st,function(ut){switch(ut){case"option":Ut(st,ut),Ke(";");break;case"reserved":wt(st.reserved||(st.reserved=[]),!0),st.reserved===void 0&&(st.reserved=[]);break;default:pn(st,ut)}}),ot.add(st),ot===We&&tt.push(st)}function pn(ot,lt){if(!Ce.test(lt))throw Qe(lt,"name");Ke("=");var st=Ht(Ue(),!0),ft={options:void 0};ft.getOption=function(ut){return this.options[ut]},ft.setOption=function(ut,At){$.prototype.setOption.call(ft,ut,At)},ft.setParsedOption=function(){},zt(ft,function(At){if(At==="option")Ut(ft,At),Ke(";");else throw Qe(At)},function(){Et(ft)}),ot.add(lt,st,ft.comment,ft.parsedOptions||ft.options)}function Ut(ot,lt){var st,ft,ut=!0;for(lt==="option"&&(lt=Ue());lt!=="=";){if(lt==="("){var At=Ue();Ke(")"),lt="("+At+")"}if(ut){if(ut=!1,lt.includes(".")&&!lt.includes("(")){var Gt=lt.split(".");st=Gt[0]+".",lt=Gt[1];continue}st=lt}else ft=ft?ft+=lt:lt;lt=Ue()}var Xt=ft?st.concat(ft):st,un=it(ot,Xt);ft=ft&&ft[0]==="."?ft.slice(1):ft,st=st&&st[st.length-1]==="."?st.slice(0,-1):st,Tt(ot,st,un,ft)}function it(ot,lt){if(Ke("{",!0)){for(var st={};!Ke("}",!0);){if(!Ce.test(Ot=Ue()))throw Qe(Ot,"name");if(Ot===null)throw Qe(Ot,"end of input");var ft,ut=Ot;if(Ke(":",!0),Xe()==="{")ft=it(ot,lt+"."+Ot);else if(Xe()==="["){ft=[];var At;if(Ke("[",!0)){do At=pt(),ft.push(At);while(Ke(",",!0));Ke("]"),typeof At<"u"&&gt(ot,lt+"."+Ot,At)}}else ft=pt(),gt(ot,lt+"."+Ot,ft);var Gt=st[ut];Gt&&(ft=[].concat(Gt).concat(ft)),st[ut]=ft,Ke(",",!0),Ke(";",!0)}return st}var Xt=pt();return gt(ot,lt,Xt),Xt}function gt(ot,lt,st){if(We===ot&&/^features\./.test(lt)){Ve[lt]=st;return}ot.setOption&&ot.setOption(lt,st)}function Tt(ot,lt,st,ft){ot.setParsedOption&&ot.setParsedOption(lt,st,ft)}function Et(ot){if(Ke("[",!0)){do Ut(ot,"option");while(Ke(",",!0));Ke("]")}return ot}function Nt(ot,lt){if(!Ce.test(lt=Ue()))throw Qe(lt,"service name");var st=new y(lt);zt(st,function(ut){if(!qt(st,ut))if(ut==="rpc")Ct(st,ut);else throw Qe(ut)}),ot.add(st),ot===We&&tt.push(st)}function Ct(ot,lt){var st=ze(),ft=lt;if(!Ce.test(lt=Ue()))throw Qe(lt,"name");var ut=lt,At,Gt,Xt,un;if(Ke("("),Ke("stream",!0)&&(Gt=!0),!Ie.test(lt=Ue())||(At=lt,Ke(")"),Ke("returns"),Ke("("),Ke("stream",!0)&&(un=!0),!Ie.test(lt=Ue())))throw Qe(lt);Xt=lt,Ke(")");var rr=new g(ut,ft,At,Xt,Gt,un);rr.comment=st,zt(rr,function(Sr){if(Sr==="option")Ut(rr,Sr),Ke(";");else throw Qe(Sr)}),ot.add(rr)}function Bt(ot,lt){if(!Ie.test(lt=Ue()))throw Qe(lt,"reference");var st=lt;zt(null,function(ut){switch(ut){case"required":case"repeated":jt(ot,ut,st);break;case"optional":Me==="proto3"?jt(ot,"proto3_optional",st):jt(ot,"optional",st);break;default:if(Me==="proto2"||!Ie.test(ut))throw Qe(ut);Je(ut),jt(ot,"optional",st);break}})}for(var Ot;(Ot=Ue())!==null;)switch(Ot){case"package":if(!nt)throw Qe(Ot);on();break;case"import":if(!nt)throw Qe(Ot);en();break;case"syntax":if(!nt)throw Qe(Ot);Wt();break;case"edition":if(!nt)throw Qe(Ot);an();break;case"option":Ut(We,Ot),Ke(";",!0);break;default:if(qt(We,Ot)){nt=!1;continue}throw Qe(Ot)}return xt(),Ne.filename=null,{package:ct,imports:at,weakImports:dt,root:Be}}return parse_1}var common_1,hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common_1;hasRequiredCommon=1,common_1=o;var n=/\/|\./;function o(t,c){n.test(t)||(t="google/protobuf/"+t+".proto",c={nested:{google:{nested:{protobuf:{nested:c}}}}}),o[t]=c}o("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var e;return o("duration",{Duration:e={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),o("timestamp",{Timestamp:e}),o("empty",{Empty:{fields:{}}}),o("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),o("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),o("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),o.get=function(c){return o[c]||null},common_1}var hasRequiredSrc;function requireSrc(){if(hasRequiredSrc)return src.exports;hasRequiredSrc=1;var n=src.exports=requireIndexLight();return n.build="full",n.tokenize=requireTokenize(),n.parse=requireParse(),n.common=requireCommon(),n.Root._configure(n.Type,n.parse,n.common),src.exports}var protobufjs,hasRequiredProtobufjs;function requireProtobufjs(){return hasRequiredProtobufjs||(hasRequiredProtobufjs=1,protobufjs=requireSrc()),protobufjs}var protobufjsExports=requireProtobufjs(),dist={},Collector={},hasRequiredCollector;function requireCollector(){if(hasRequiredCollector)return Collector;hasRequiredCollector=1,Object.defineProperty(Collector,"__esModule",{value:!0}),Collector.Collector=void 0;let n=class{constructor(e){this.emit=(...t)=>{e.emitCollecting(this,t)}}};return Collector.Collector=n,Collector}var CollectorArray={},hasRequiredCollectorArray;function requireCollectorArray(){if(hasRequiredCollectorArray)return CollectorArray;hasRequiredCollectorArray=1,Object.defineProperty(CollectorArray,"__esModule",{value:!0}),CollectorArray.CollectorArray=void 0;const n=requireCollector();let o=class extends n.Collector{constructor(){super(...arguments),this.result=[]}handleResult(t){return this.result.push(t),!0}getResult(){return this.result}reset(){this.result.length=0}};return CollectorArray.CollectorArray=o,CollectorArray}var CollectorLast={},hasRequiredCollectorLast;function requireCollectorLast(){if(hasRequiredCollectorLast)return CollectorLast;hasRequiredCollectorLast=1,Object.defineProperty(CollectorLast,"__esModule",{value:!0}),CollectorLast.CollectorLast=void 0;const n=requireCollector();let o=class extends n.Collector{handleResult(t){return this.result=t,!0}getResult(){return this.result}reset(){delete this.result}};return CollectorLast.CollectorLast=o,CollectorLast}var CollectorUntil0={},hasRequiredCollectorUntil0;function requireCollectorUntil0(){if(hasRequiredCollectorUntil0)return CollectorUntil0;hasRequiredCollectorUntil0=1,Object.defineProperty(CollectorUntil0,"__esModule",{value:!0}),CollectorUntil0.CollectorUntil0=void 0;const n=requireCollector();let o=class extends n.Collector{constructor(){super(...arguments),this.result=!1}handleResult(t){return this.result=t,this.result}getResult(){return this.result}reset(){this.result=!1}};return CollectorUntil0.CollectorUntil0=o,CollectorUntil0}var CollectorWhile0={},hasRequiredCollectorWhile0;function requireCollectorWhile0(){if(hasRequiredCollectorWhile0)return CollectorWhile0;hasRequiredCollectorWhile0=1,Object.defineProperty(CollectorWhile0,"__esModule",{value:!0}),CollectorWhile0.CollectorWhile0=void 0;const n=requireCollector();let o=class extends n.Collector{constructor(){super(...arguments),this.result=!1}handleResult(t){return this.result=t,!this.result}getResult(){return this.result}reset(){this.result=!1}};return CollectorWhile0.CollectorWhile0=o,CollectorWhile0}var Signal={},SignalConnection={},hasRequiredSignalConnection;function requireSignalConnection(){if(hasRequiredSignalConnection)return SignalConnection;hasRequiredSignalConnection=1,Object.defineProperty(SignalConnection,"__esModule",{value:!0}),SignalConnection.SignalConnectionImpl=void 0;class n{constructor(e){this.link=e}disconnect(){return this.link.unlink()}set enabled(e){this.link.setEnabled(e)}get enabled(){return this.link.isEnabled()}}return SignalConnection.SignalConnectionImpl=n,SignalConnection}var SignalLink={},hasRequiredSignalLink;function requireSignalLink(){if(hasRequiredSignalLink)return SignalLink;hasRequiredSignalLink=1,Object.defineProperty(SignalLink,"__esModule",{value:!0}),SignalLink.SignalLink=void 0;let n=class td{constructor(e,t,c){this.enabled=!0,this.newLink=!1,this.prev=e??this,this.next=t??this,this.order=c.order,this.isPublic=c.isPublic,this.callback=c.callback,this.onUnlink=c.onUnlink}isEnabled(){return this.enabled&&!this.newLink}setEnabled(e){this.enabled=e}unlink(){return this.callback?(delete this.callback,this.next.prev=this.prev,this.prev.next=this.next,this.onUnlink(),!0):!1}insert(e){const{order:t}=e;let c=this.prev;for(;c!==this&&!(c.order<=t);)c=c.prev;const p=new td(c,c.next,e);return c.next=p,p.next.prev=p,p}};return SignalLink.SignalLink=n,SignalLink}var hasRequiredSignal;function requireSignal(){if(hasRequiredSignal)return Signal;hasRequiredSignal=1,Object.defineProperty(Signal,"__esModule",{value:!0}),Signal.Signal=void 0;const n=requireSignalConnection(),o=requireSignalLink(),e={order:0,isPublic:!0,onUnlink(){}};let t=class{constructor(){this.head=new o.SignalLink(null,null,e),this.hasNewLinks=!1,this.emitDepth=0,this.connectionsCount=0,this.onUnlink=()=>{this.connectionsCount--}}getConnectionsCount(){return this.connectionsCount}hasConnections(){return this.connectionsCount>0}connect(p,{order:h=0,isPublic:y=!0}={}){this.connectionsCount++;const g=this.head.insert({callback:p,order:h,isPublic:y,onUnlink:this.onUnlink});return this.emitDepth>0&&(this.hasNewLinks=!0,g.newLink=!0),new n.SignalConnectionImpl(g)}disconnect(p){for(let h=this.head.next;h!==this.head;h=h.next)if(h.callback===p)return h.unlink(),!0;return!1}disconnectAll(){let{next:p}=this.head;for(;p!==this.head;)p.isPublic&&p.unlink(),p=p.next}emit(...p){this.emitDepth++;for(let h=this.head.next;h!==this.head;h=h.next)h.isEnabled()&&h.callback&&h.callback.apply(null,p);this.emitDepth--,this.unsetNewLink()}emitCollecting(p,h){this.emitDepth++;for(let y=this.head.next;y!==this.head;y=y.next)if(y.isEnabled()&&y.callback){const g=y.callback.apply(null,h);if(!p.handleResult(g))break}this.emitDepth--,this.unsetNewLink()}unsetNewLink(){if(this.hasNewLinks&&this.emitDepth===0){for(let p=this.head.next;p!==this.head;p=p.next)p.newLink=!1;this.hasNewLinks=!1}}};return Signal.Signal=t,Signal}var SignalConnections={},hasRequiredSignalConnections;function requireSignalConnections(){if(hasRequiredSignalConnections)return SignalConnections;hasRequiredSignalConnections=1,Object.defineProperty(SignalConnections,"__esModule",{value:!0}),SignalConnections.SignalConnections=void 0;let n=class{constructor(){this.list=[]}add(e){this.list.push(e)}disconnectAll(){for(const e of this.list)e.disconnect();this.list=[]}getCount(){return this.list.length}isEmpty(){return this.list.length===0}};return SignalConnections.SignalConnections=n,SignalConnections}var hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.SignalConnections=n.Signal=n.CollectorWhile0=n.CollectorUntil0=n.CollectorLast=n.CollectorArray=n.Collector=void 0;var o=requireCollector();Object.defineProperty(n,"Collector",{enumerable:!0,get:function(){return o.Collector}});var e=requireCollectorArray();Object.defineProperty(n,"CollectorArray",{enumerable:!0,get:function(){return e.CollectorArray}});var t=requireCollectorLast();Object.defineProperty(n,"CollectorLast",{enumerable:!0,get:function(){return t.CollectorLast}});var c=requireCollectorUntil0();Object.defineProperty(n,"CollectorUntil0",{enumerable:!0,get:function(){return c.CollectorUntil0}});var p=requireCollectorWhile0();Object.defineProperty(n,"CollectorWhile0",{enumerable:!0,get:function(){return p.CollectorWhile0}});var h=requireSignal();Object.defineProperty(n,"Signal",{enumerable:!0,get:function(){return h.Signal}});var y=requireSignalConnections();Object.defineProperty(n,"SignalConnections",{enumerable:!0,get:function(){return y.SignalConnections}})}(dist)),dist}var distExports=requireDist();function createFormsData(){return{formsWithPendingChanges:new Set,formsWithUploads:new Set,submitButtons:new Map}}const LOG$c=loglevelExports.getLogger("WidgetStateManager");class WidgetStateDict{constructor(){this.widgetStates=new Map}createState(o){const e=new WidgetState({id:o});return this.widgetStates.set(o,e),e}getState(o){return this.widgetStates.get(o)}deleteState(o){this.widgetStates.delete(o)}removeInactive(o){this.widgetStates.forEach((e,t)=>{o.has(t)||this.widgetStates.delete(t)})}clear(){this.widgetStates.clear()}get isEmpty(){return this.widgetStates.size===0}createWidgetStatesMsg(){const o=new WidgetStates;return this.widgetStates.forEach(e=>o.widgets.push(e)),o}copyFrom(o){o.widgetStates.forEach((e,t)=>{this.widgetStates.set(t,e)})}forEach(o){this.widgetStates.forEach(o)}}class FormState{constructor(){this.widgetStates=new WidgetStateDict,this.clearOnSubmit=!1,this.enterToSubmit=!0,this.formCleared=new distExports.Signal}get hasPendingChanges(){return!this.widgetStates.isEmpty}}class WidgetStateManager{constructor(o){this.widgetStates=new WidgetStateDict,this.forms=new Map,this.elementStates=new Map,this.pendingTriggerIds=new Set,this.triggerFlushResolvers=[],this.flushScheduled=!1,this.hasFragmentIdConflict=!1,this.props=o,this.formsData=createFormsData()}addFormClearedListener(o,e){return this.getOrCreateFormState(o).formCleared.connect(e)}setFormSubmitBehaviors(o,e,t=!0){const c=this.getOrCreateFormState(o);c.clearOnSubmit=e,c.enterToSubmit=t}submitForm(o,e,t){if(!isValidFormId(o))throw new Error(`invalid formID '${o}'`);const c=this.getOrCreateFormState(o),p=this.formsData.submitButtons.get(o);let h;t!==void 0?h=t:p!==void 0&&p.length>0&&(h=p[0]),h&&(this.createWidgetState(h,{fromUi:!0}).triggerValue=!0),this.widgetStates.copyFrom(c.widgetStates),c.widgetStates.clear(),this.sendUpdateWidgetsMessage(e),this.syncFormsWithPendingChanges(),h&&this.deleteWidgetState(h.id),c.clearOnSubmit&&c.formCleared.emit()}setChatInputValue(o,e,t,c){this.createWidgetState(o,t).chatInputValue=new ChatInputValue(e),this.pendingTriggerIds.add(o.id),this.scheduleFlush(c)}setTriggerValue(o,e,t,c){let p=this.getWidgetState(o);if(p===void 0&&(p=this.createWidgetState(o,e)),c===void 0)p.triggerValue=!0;else{const h=c;try{if(isNullOrUndefined(p.jsonTriggerValue))p.jsonTriggerValue=JSON.stringify([h]);else{const y=p.jsonTriggerValue,g=JSON.parse(y),$=Array.isArray(g)?g:[g];$.push(h),p.jsonTriggerValue=JSON.stringify($)}}catch(y){LOG$c.error("Failed to parse or stringify widgetState.jsonTriggerValue:",y),p.jsonTriggerValue=JSON.stringify([p.jsonTriggerValue,h])}}return this.pendingTriggerIds.add(o.id),new Promise(h=>{this.triggerFlushResolvers.push(h),this.scheduleFlush(t)})}getBoolValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="boolValue")return e.boolValue}setBoolValue(o,e,t,c){this.createWidgetState(o,t).boolValue=e,this.onWidgetValueChanged(o.formId,t,c)}getIntValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="intValue")return requireNumberInt(e.intValue)}setIntValue(o,e,t,c){this.createWidgetState(o,t).intValue=e,this.onWidgetValueChanged(o.formId,t,c)}getDoubleValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="doubleValue")return e.doubleValue}setDoubleValue(o,e,t,c){this.createWidgetState(o,t).doubleValue=e,this.onWidgetValueChanged(o.formId,t,c)}getStringValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="stringValue")return e.stringValue}setStringValue(o,e,t,c){this.createWidgetState(o,t).stringValue=e,this.onWidgetValueChanged(o.formId,t,c)}setStringArrayValue(o,e,t,c){this.createWidgetState(o,t).stringArrayValue=new StringArray({data:e}),this.onWidgetValueChanged(o.formId,t,c)}getStringArrayValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="stringArrayValue"&&notNullOrUndefined(e.stringArrayValue)&&notNullOrUndefined(e.stringArrayValue.data))return e.stringArrayValue.data}getDoubleArrayValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="doubleArrayValue"&&notNullOrUndefined(e.doubleArrayValue)&&notNullOrUndefined(e.doubleArrayValue.data))return e.doubleArrayValue.data}setDoubleArrayValue(o,e,t,c){this.createWidgetState(o,t).doubleArrayValue=new DoubleArray({data:e}),this.onWidgetValueChanged(o.formId,t,c)}getIntArrayValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="intArrayValue"&&notNullOrUndefined(e.intArrayValue)&&notNullOrUndefined(e.intArrayValue.data))return e.intArrayValue.data.map(requireNumberInt)}setIntArrayValue(o,e,t,c){this.createWidgetState(o,t).intArrayValue=new SInt64Array({data:e}),this.onWidgetValueChanged(o.formId,t,c)}getJsonValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="jsonValue")return e.jsonValue}setJsonValue(o,e,t,c){this.createWidgetState(o,t).jsonValue=JSON.stringify(e),this.onWidgetValueChanged(o.formId,t,c)}setArrowValue(o,e,t,c){this.createWidgetState(o,t).arrowValue=e,this.onWidgetValueChanged(o.formId,t,c)}getArrowValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="arrowValue"&&notNullOrUndefined(e.arrowValue))return e.arrowValue}setBytesValue(o,e,t,c){this.createWidgetState(o,t).bytesValue=e,this.onWidgetValueChanged(o.formId,t,c)}getBytesValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="bytesValue")return e.bytesValue}setFileUploaderStateValue(o,e,t,c){this.createWidgetState(o,t).fileUploaderStateValue=e,this.onWidgetValueChanged(o.formId,t,c)}getFileUploaderStateValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="fileUploaderStateValue")return e.fileUploaderStateValue}onWidgetValueChanged(o,e,t){isValidFormId(o)?this.syncFormsWithPendingChanges():e.fromUi&&this.scheduleFlush(t)}syncFormsWithPendingChanges(){const o=new Set;this.forms.forEach((e,t)=>{e.hasPendingChanges&&o.add(t)}),this.updateFormsData(e=>{e.formsWithPendingChanges=o})}sendUpdateWidgetsMessage(o,e=void 0){this.props.sendRerunBackMsg(this.widgetStates.createWidgetStatesMsg(),o,void 0,e)}getActiveWidgetStates(o){const e=new WidgetStates;return this.widgetStates.forEach(t=>{o.has(t.id)&&e.widgets.push(t)}),e}removeInactive(o){this.widgetStates.removeInactive(o),this.forms.forEach(e=>e.widgetStates.removeInactive(o)),this.elementStates.forEach((e,t)=>{o.has(t)||this.deleteElementState(t)})}createWidgetState(o,e){return(isValidFormId(o.formId)&&e.fromUi?this.getOrCreateFormState(o.formId).widgetStates:this.widgetStates).createState(o.id)}getWidgetState(o){if(isValidFormId(o.formId)){const e=this.forms.get(o.formId)?.widgetStates.getState(o.id);if(notNullOrUndefined(e))return e}return this.widgetStates.getState(o.id)}deleteWidgetState(o){this.widgetStates.deleteState(o)}getOrCreateFormState(o){let e=this.forms.get(o);return notNullOrUndefined(e)||(e=new FormState,this.forms.set(o,e)),e}setFormsWithUploadsInProgress(o){this.updateFormsData(e=>{e.formsWithUploads=o})}allowFormEnterToSubmit(o){if(!isValidFormId(o))return!1;const e=this.forms.get(o);if(e&&!e.enterToSubmit)return!1;const c=this.formsData.submitButtons.get(o)?.[0];return c?!c.disabled:!1}addSubmitButton(o,e){const t=this.formsData.submitButtons.get(o);if(t===void 0)this.setSubmitButtons(o,[e]);else{const c=Object.assign([],t);c.push(e),this.setSubmitButtons(o,c)}}removeSubmitButton(o,e){const t=this.formsData.submitButtons.get(o);if(t!==void 0){const c=Object.assign([],t),p=c.indexOf(e,0);p>-1&&c.splice(p,1),this.setSubmitButtons(o,c)}}setSubmitButtons(o,e){if(e.length<0)throw new Error(`Bad submitButtons length ${e.length} (must be >= 0)`);this.updateFormsData(t=>{t.submitButtons.set(o,e)})}updateFormsData(o){const e=produce(this.formsData,o);this.formsData!==e&&(this.formsData=e,this.props.formsDataChanged(this.formsData))}getElementState(o,e){return this.elementStates.get(o)?.get(e)}setElementState(o,e,t){this.elementStates.has(o)||this.elementStates.set(o,new Map),this.elementStates.get(o).set(e,t)}deleteElementState(o,e){notNullOrUndefined(e)?this.elementStates.get(o)?.delete(e):this.elementStates.delete(o)}scheduleFlush(o){this.scheduledFragmentId===void 0&&(this.scheduledFragmentId=o),this.scheduledFragmentId!==void 0&&o!==void 0&&o!==this.scheduledFragmentId&&!this.hasFragmentIdConflict&&(LOG$c.warn("Unexpected state: Multiple different fragmentIds detected in a single batch of widget updates. Proceeding with flushing updates using fragmentId '%s' for this batch.",this.scheduledFragmentId),this.hasFragmentIdConflict=!0),!this.flushScheduled&&(this.flushScheduled=!0,setTimeout(()=>{this.sendUpdateWidgetsMessage(this.scheduledFragmentId),this.pendingTriggerIds.forEach(e=>this.deleteWidgetState(e)),this.pendingTriggerIds.clear(),this.triggerFlushResolvers.forEach(e=>e()),this.triggerFlushResolvers=[],this.flushScheduled=!1,this.scheduledFragmentId=void 0,this.hasFragmentIdConflict=!1},0))}}function requireNumberInt(n){if(typeof n=="number")return n;const o=protobufjsExports.util.LongBits.from(n).toNumber();if(Number.isSafeInteger(o))return o;throw new Error(`value ${n} cannot be converted to number without a loss of precision!`)}class ReactHotkeys extends React.Component{constructor(o){super(o),this.isKeyDown=!1,this.handle=void 0,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.handleKeyUpEvent=this.handleKeyUpEvent.bind(this),this.handle={}}componentDidMount(){var{filter:o,splitKey:e}=this.props;o&&(hotkeys.filter=o),hotkeys.unbind(this.props.keyName),hotkeys(this.props.keyName,{splitKey:e},this.onKeyDown),document&&document.body.addEventListener("keyup",this.handleKeyUpEvent)}componentWillUnmount(){hotkeys.unbind(this.props.keyName),this.isKeyDown=!0,this.handle={},document&&document.body.removeEventListener("keyup",this.handleKeyUpEvent)}onKeyUp(o,e){var{onKeyUp:t,disabled:c}=this.props;!c&&t&&t(e.shortcut,o,e)}onKeyDown(o,e){var{onKeyDown:t,allowRepeat:c,disabled:p}=this.props;this.isKeyDown&&!c||(this.isKeyDown=!0,this.handle=e,!p&&t&&t(e.shortcut,o,e))}handleKeyUpEvent(o){this.isKeyDown&&(this.isKeyDown=!1,!(this.props.keyName&&this.props.keyName.indexOf(this.handle.shortcut)<0)&&(this.onKeyUp(o,this.handle),this.handle={}))}render(){return this.props.children||null}}ReactHotkeys.defaultProps={filter(n){var o=n.target||n.srcElement,e=o.tagName;return!(o.isContentEditable||e==="INPUT"||e==="SELECT"||e==="TEXTAREA")}};ReactHotkeys.propTypes={keyName:propTypesExports.string,filter:propTypesExports.func,onKeyDown:propTypesExports.func,onKeyUp:propTypesExports.func,disabled:propTypesExports.bool,splitKey:propTypesExports.string};function EventContainer({children:n}){const o=useEmotionTheme();return jsxs(Fragment,{children:[jsx$1(ToasterContainer,{placement:PLACEMENT$1.topRight,autoHideDuration:4*1e3,overrides:{Root:{style:{top:o.sizes.headerHeight,zIndex:o.zIndices.toast},props:{"data-testid":"stToastContainer",className:"stToastContainer"}}}}),n]})}const StyledLogoContainer=styled("div",{target:"e3g0k5y0"})(({theme:n})=>({marginLeft:n.spacing.lg})),StyledHeader$2=styled("header",{target:"e3g0k5y1"})(({theme:n,isTransparentBackground:o})=>({position:"absolute",top:0,left:0,right:0,display:"flex",alignItems:"center",height:n.sizes.headerHeight,minHeight:n.sizes.headerHeight,width:"100%",background:o?"transparent":n.colors.bgColor,outline:"none",zIndex:n.zIndices.header,pointerEvents:o?"none":"auto",fontSize:n.fontSizes.sm,"@media print":{position:"absolute",background:"transparent","& *":{display:"none !important"},[`& ${StyledLogoContainer}, & ${StyledLogoContainer} *, & :has(${StyledLogoContainer})`]:{display:"flex !important"},[`& ${StyledLogoContainer} img`]:{display:"block !important"}}})),StyledHeaderToolbar=styled("div",{target:"e3g0k5y2"})(({theme:n})=>({display:"flex",alignItems:"center",height:"100%",width:"100%",padding:0,pointerEvents:"auto",position:"relative",zIndex:n.zIndices.header})),StyledOpenSidebarButton=styled("div",{target:"e3g0k5y3"})(({theme:n})=>({display:"flex",alignItems:"center",justifyContent:"center",marginLeft:n.spacing.lg,"@media print":{display:"none"}})),StyledHeaderContent=styled("div",{target:"e3g0k5y4"})(()=>({flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",margin:0,border:0})),StyledHeaderLeftSection=styled("div",{target:"e3g0k5y5"})(()=>({display:"flex",alignItems:"center"})),StyledHeaderRightSection=styled("div",{target:"e3g0k5y6"})(({theme:n})=>({flexShrink:0,display:"flex",alignItems:"center",justifyContent:"flex-end",marginLeft:"auto",height:"100%",minWidth:n.sizes.headerRightContentMaxWidth,marginRight:n.spacing.lg})),Header=({hasSidebar:n,isSidebarOpen:o,onToggleSidebar:e,navigation:t,rightContent:c,logoComponent:p,showToolbar:h})=>{const{activeTheme:y}=reactExports.useContext(ThemeContext),g=p&&!o,$=n&&!o,E=h&&c,A=g||$||t||E;return jsx$1(StyledHeader$2,{className:"stAppHeader","data-testid":"stHeader",isTransparentBackground:!A,children:A?jsx$1(StyledHeaderToolbar,{className:"stAppToolbar","data-testid":"stToolbar",theme:y.emotion,children:jsxs(StyledHeaderContent,{children:[jsxs(StyledHeaderLeftSection,{children:[g?jsx$1(StyledLogoContainer,{children:p}):null,$&&jsx$1(StyledOpenSidebarButton,{children:jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_NO_PADDING,onClick:e,"data-testid":"stExpandSidebarButton",children:jsx$1(DynamicIcon,{size:"xl",iconValue:":material/keyboard_double_arrow_right:",color:y.emotion.colors.fadedText60})})})]}),t,E?jsx$1(StyledHeaderRightSection,{children:c}):null]})}):null})},getSidebarHorizontalSpacing=(n,o)=>`max(
139
+ `&&++X,++H===Z)throw Ie("comment");nt=ct,ct=Fe(H)}while(nt!=="*"||ct!=="/");++H,dt&&(Be(at,H-2,Me),Me=!0),ze=!0}else return"/"}}while(ze);var We=H;n.lastIndex=0;var tt=n.test(Fe(We++));if(!tt)for(;We<Z&&!n.test(Fe(We));)++We;var Ve=A.substring(H,H=We);return(Ve==='"'||Ve==="'")&&(Ce=Ve),Ve}function Ue(ze){$e.push(ze)}function Je(){if(!$e.length){var ze=De();if(ze===null)return null;Ue(ze)}return $e[0]}function Xe(ze,nt){var ct=Je(),at=ct===ze;if(at)return De(),!0;if(!nt)throw Ie("token '"+ct+"', '"+ze+"' expected");return!1}function Ke(ze){var nt=null,ct;return ze===void 0?(ct=we[X-1],delete we[X-1],ct&&(N||ct.type==="*"||ct.lineEmpty)&&(nt=ct.leading?ct.text:null)):(be<ze&&Je(),ct=we[ze],delete we[ze],ct&&!ct.lineEmpty&&(N||ct.type==="/")&&(nt=ct.leading?null:ct.text)),nt}return Object.defineProperty({next:De,peek:Je,push:Ue,skip:Xe,cmnt:Ke},"line",{get:function(){return X}})}return tokenize_1}var parse_1,hasRequiredParse;function requireParse(){if(hasRequiredParse)return parse_1;hasRequiredParse=1,parse_1=Ne,Ne.filename=null,Ne.defaults={keepCase:!1};var n=requireTokenize(),o=requireRoot(),e=requireType(),t=requireField(),c=requireMapfield(),p=requireOneof(),h=require_enum(),y=requireService(),g=requireMethod(),$=requireObject(),E=requireTypes(),A=requireUtil(),N=/^[1-9][0-9]*$/,H=/^-?[1-9][0-9]*$/,Z=/^0[x][0-9a-fA-F]+$/,X=/^-?0[x][0-9a-fA-F]+$/,be=/^0[0-7]+$/,we=/^-?0[0-7]+$/,$e=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,Ce=/^[a-zA-Z_][a-zA-Z_0-9]*$/,Ie=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;function Ne(Fe,Be,Ge){Be instanceof o||(Ge=Be,Be=new o),Ge||(Ge=Ne.defaults);var je=Ge.preferTrailingComment||!1,De=n(Fe,Ge.alternateCommentMode||!1),Ue=De.next,Je=De.push,Xe=De.peek,Ke=De.skip,ze=De.cmnt,nt=!0,ct,at,dt,Me="proto2",We=Be,tt=[],Ve={},vt=Ge.keepCase?function(ot){return ot}:A.camelCase;function xt(){tt.forEach(ot=>{ot._edition=Me,Object.keys(Ve).forEach(lt=>{ot.getOption(lt)===void 0&&ot.setOption(lt,Ve[lt],!0)})})}function Qe(ot,lt,st){var ft=Ne.filename;return st||(Ne.filename=null),Error("illegal "+(lt||"token")+" '"+ot+"' ("+(ft?ft+", ":"")+"line "+De.line+")")}function St(){var ot=[],lt;do{if((lt=Ue())!=='"'&&lt!=="'")throw Qe(lt);ot.push(Ue()),Ke(lt),lt=Xe()}while(lt==='"'||lt==="'");return ot.join("")}function pt(ot){var lt=Ue();switch(lt){case"'":case'"':return Je(lt),St();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return Ft(lt,!0)}catch{if(Ie.test(lt))return lt;throw Qe(lt,"value")}}function wt(ot,lt){var st,ft;do if(lt&&((st=Xe())==='"'||st==="'")){var ut=St();if(ot.push(ut),Me>=2023)throw Qe(ut,"id")}else try{ot.push([ft=Ht(Ue()),Ke("to",!0)?Ht(Ue()):ft])}catch(Gt){if(lt&&Ie.test(st)&&Me>=2023)ot.push(st);else throw Gt}while(Ke(",",!0));var At={options:void 0};At.setOption=function(Gt,Xt){this.options===void 0&&(this.options={}),this.options[Gt]=Xt},zt(At,function(Xt){if(Xt==="option")Ut(At,Xt),Ke(";");else throw Qe(Xt)},function(){Et(At)})}function Ft(ot,lt){var st=1;switch(ot.charAt(0)==="-"&&(st=-1,ot=ot.substring(1)),ot){case"inf":case"INF":case"Inf":return st*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(N.test(ot))return st*parseInt(ot,10);if(Z.test(ot))return st*parseInt(ot,16);if(be.test(ot))return st*parseInt(ot,8);if($e.test(ot))return st*parseFloat(ot);throw Qe(ot,"number",lt)}function Ht(ot,lt){switch(ot){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!lt&&ot.charAt(0)==="-")throw Qe(ot,"id");if(H.test(ot))return parseInt(ot,10);if(X.test(ot))return parseInt(ot,16);if(we.test(ot))return parseInt(ot,8);throw Qe(ot,"id")}function on(){if(ct!==void 0)throw Qe("package");if(ct=Ue(),!Ie.test(ct))throw Qe(ct,"name");We=We.define(ct),Ke(";")}function en(){var ot=Xe(),lt;switch(ot){case"weak":lt=dt||(dt=[]),Ue();break;case"public":Ue();default:lt=at||(at=[]);break}ot=St(),Ke(";"),lt.push(ot)}function Wt(){if(Ke("="),Me=St(),Me<2023)throw Qe(Me,"syntax");Ke(";")}function an(){if(Ke("="),Me=St(),!["2023"].includes(Me))throw Qe(Me,"edition");Ke(";")}function qt(ot,lt){switch(lt){case"option":return Ut(ot,lt),Ke(";"),!0;case"message":return Jt(ot,lt),!0;case"enum":return nn(ot,lt),!0;case"service":return Nt(ot,lt),!0;case"extend":return Bt(ot,lt),!0}return!1}function zt(ot,lt,st){var ft=De.line;if(ot&&(typeof ot.comment!="string"&&(ot.comment=ze()),ot.filename=Ne.filename),Ke("{",!0)){for(var ut;(ut=Ue())!=="}";)lt(ut);Ke(";",!0)}else st&&st(),Ke(";"),ot&&(typeof ot.comment!="string"||je)&&(ot.comment=ze(ft)||ot.comment)}function Jt(ot,lt){if(!Ce.test(lt=Ue()))throw Qe(lt,"type name");var st=new e(lt);zt(st,function(ut){if(!qt(st,ut))switch(ut){case"map":yn(st);break;case"required":if(Me!=="proto2")throw Qe(ut);case"repeated":jt(st,ut);break;case"optional":if(Me==="proto3")jt(st,"proto3_optional");else{if(Me!=="proto2")throw Qe(ut);jt(st,"optional")}break;case"oneof":vn(st,ut);break;case"extensions":wt(st.extensions||(st.extensions=[]));break;case"reserved":wt(st.reserved||(st.reserved=[]),!0);break;default:if(Me==="proto2"||!Ie.test(ut))throw Qe(ut);Je(ut),jt(st,"optional");break}}),ot.add(st),ot===We&&tt.push(st)}function jt(ot,lt,st){var ft=Ue();if(ft==="group"){Yt(ot,lt);return}for(;ft.endsWith(".")||Xe().startsWith(".");)ft+=Ue();if(!Ie.test(ft))throw Qe(ft,"type");var ut=Ue();if(!Ce.test(ut))throw Qe(ut,"name");ut=vt(ut),Ke("=");var At=new t(ut,Ht(Ue()),ft,lt,st);if(zt(At,function(un){if(un==="option")Ut(At,un),Ke(";");else throw Qe(un)},function(){Et(At)}),lt==="proto3_optional"){var Gt=new p("_"+ut);At.setOption("proto3_optional",!0),Gt.add(At),ot.add(Gt)}else ot.add(At);ot===We&&tt.push(At)}function Yt(ot,lt){if(Me>=2023)throw Qe("group");var st=Ue();if(!Ce.test(st))throw Qe(st,"name");var ft=A.lcFirst(st);st===ft&&(st=A.ucFirst(st)),Ke("=");var ut=Ht(Ue()),At=new e(st);At.group=!0;var Gt=new t(ft,ut,st,lt);Gt.filename=Ne.filename,zt(At,function(un){switch(un){case"option":Ut(At,un),Ke(";");break;case"required":case"repeated":jt(At,un);break;case"optional":Me==="proto3"?jt(At,"proto3_optional"):jt(At,"optional");break;case"message":Jt(At,un);break;case"enum":nn(At,un);break;case"reserved":wt(At.reserved||(At.reserved=[]),!0);break;default:throw Qe(un)}}),ot.add(At).add(Gt)}function yn(ot){Ke("<");var lt=Ue();if(E.mapKey[lt]===void 0)throw Qe(lt,"type");Ke(",");var st=Ue();if(!Ie.test(st))throw Qe(st,"type");Ke(">");var ft=Ue();if(!Ce.test(ft))throw Qe(ft,"name");Ke("=");var ut=new c(vt(ft),Ht(Ue()),lt,st);zt(ut,function(Gt){if(Gt==="option")Ut(ut,Gt),Ke(";");else throw Qe(Gt)},function(){Et(ut)}),ot.add(ut)}function vn(ot,lt){if(!Ce.test(lt=Ue()))throw Qe(lt,"name");var st=new p(vt(lt));zt(st,function(ut){ut==="option"?(Ut(st,ut),Ke(";")):(Je(ut),jt(st,"optional"))}),ot.add(st)}function nn(ot,lt){if(!Ce.test(lt=Ue()))throw Qe(lt,"name");var st=new h(lt);zt(st,function(ut){switch(ut){case"option":Ut(st,ut),Ke(";");break;case"reserved":wt(st.reserved||(st.reserved=[]),!0),st.reserved===void 0&&(st.reserved=[]);break;default:pn(st,ut)}}),ot.add(st),ot===We&&tt.push(st)}function pn(ot,lt){if(!Ce.test(lt))throw Qe(lt,"name");Ke("=");var st=Ht(Ue(),!0),ft={options:void 0};ft.getOption=function(ut){return this.options[ut]},ft.setOption=function(ut,At){$.prototype.setOption.call(ft,ut,At)},ft.setParsedOption=function(){},zt(ft,function(At){if(At==="option")Ut(ft,At),Ke(";");else throw Qe(At)},function(){Et(ft)}),ot.add(lt,st,ft.comment,ft.parsedOptions||ft.options)}function Ut(ot,lt){var st,ft,ut=!0;for(lt==="option"&&(lt=Ue());lt!=="=";){if(lt==="("){var At=Ue();Ke(")"),lt="("+At+")"}if(ut){if(ut=!1,lt.includes(".")&&!lt.includes("(")){var Gt=lt.split(".");st=Gt[0]+".",lt=Gt[1];continue}st=lt}else ft=ft?ft+=lt:lt;lt=Ue()}var Xt=ft?st.concat(ft):st,un=it(ot,Xt);ft=ft&&ft[0]==="."?ft.slice(1):ft,st=st&&st[st.length-1]==="."?st.slice(0,-1):st,Tt(ot,st,un,ft)}function it(ot,lt){if(Ke("{",!0)){for(var st={};!Ke("}",!0);){if(!Ce.test(Ot=Ue()))throw Qe(Ot,"name");if(Ot===null)throw Qe(Ot,"end of input");var ft,ut=Ot;if(Ke(":",!0),Xe()==="{")ft=it(ot,lt+"."+Ot);else if(Xe()==="["){ft=[];var At;if(Ke("[",!0)){do At=pt(),ft.push(At);while(Ke(",",!0));Ke("]"),typeof At<"u"&&gt(ot,lt+"."+Ot,At)}}else ft=pt(),gt(ot,lt+"."+Ot,ft);var Gt=st[ut];Gt&&(ft=[].concat(Gt).concat(ft)),st[ut]=ft,Ke(",",!0),Ke(";",!0)}return st}var Xt=pt();return gt(ot,lt,Xt),Xt}function gt(ot,lt,st){if(We===ot&&/^features\./.test(lt)){Ve[lt]=st;return}ot.setOption&&ot.setOption(lt,st)}function Tt(ot,lt,st,ft){ot.setParsedOption&&ot.setParsedOption(lt,st,ft)}function Et(ot){if(Ke("[",!0)){do Ut(ot,"option");while(Ke(",",!0));Ke("]")}return ot}function Nt(ot,lt){if(!Ce.test(lt=Ue()))throw Qe(lt,"service name");var st=new y(lt);zt(st,function(ut){if(!qt(st,ut))if(ut==="rpc")Ct(st,ut);else throw Qe(ut)}),ot.add(st),ot===We&&tt.push(st)}function Ct(ot,lt){var st=ze(),ft=lt;if(!Ce.test(lt=Ue()))throw Qe(lt,"name");var ut=lt,At,Gt,Xt,un;if(Ke("("),Ke("stream",!0)&&(Gt=!0),!Ie.test(lt=Ue())||(At=lt,Ke(")"),Ke("returns"),Ke("("),Ke("stream",!0)&&(un=!0),!Ie.test(lt=Ue())))throw Qe(lt);Xt=lt,Ke(")");var rr=new g(ut,ft,At,Xt,Gt,un);rr.comment=st,zt(rr,function(Sr){if(Sr==="option")Ut(rr,Sr),Ke(";");else throw Qe(Sr)}),ot.add(rr)}function Bt(ot,lt){if(!Ie.test(lt=Ue()))throw Qe(lt,"reference");var st=lt;zt(null,function(ut){switch(ut){case"required":case"repeated":jt(ot,ut,st);break;case"optional":Me==="proto3"?jt(ot,"proto3_optional",st):jt(ot,"optional",st);break;default:if(Me==="proto2"||!Ie.test(ut))throw Qe(ut);Je(ut),jt(ot,"optional",st);break}})}for(var Ot;(Ot=Ue())!==null;)switch(Ot){case"package":if(!nt)throw Qe(Ot);on();break;case"import":if(!nt)throw Qe(Ot);en();break;case"syntax":if(!nt)throw Qe(Ot);Wt();break;case"edition":if(!nt)throw Qe(Ot);an();break;case"option":Ut(We,Ot),Ke(";",!0);break;default:if(qt(We,Ot)){nt=!1;continue}throw Qe(Ot)}return xt(),Ne.filename=null,{package:ct,imports:at,weakImports:dt,root:Be}}return parse_1}var common_1,hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common_1;hasRequiredCommon=1,common_1=o;var n=/\/|\./;function o(t,c){n.test(t)||(t="google/protobuf/"+t+".proto",c={nested:{google:{nested:{protobuf:{nested:c}}}}}),o[t]=c}o("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var e;return o("duration",{Duration:e={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),o("timestamp",{Timestamp:e}),o("empty",{Empty:{fields:{}}}),o("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),o("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),o("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),o.get=function(c){return o[c]||null},common_1}var hasRequiredSrc;function requireSrc(){if(hasRequiredSrc)return src.exports;hasRequiredSrc=1;var n=src.exports=requireIndexLight();return n.build="full",n.tokenize=requireTokenize(),n.parse=requireParse(),n.common=requireCommon(),n.Root._configure(n.Type,n.parse,n.common),src.exports}var protobufjs,hasRequiredProtobufjs;function requireProtobufjs(){return hasRequiredProtobufjs||(hasRequiredProtobufjs=1,protobufjs=requireSrc()),protobufjs}var protobufjsExports=requireProtobufjs(),dist={},Collector={},hasRequiredCollector;function requireCollector(){if(hasRequiredCollector)return Collector;hasRequiredCollector=1,Object.defineProperty(Collector,"__esModule",{value:!0}),Collector.Collector=void 0;let n=class{constructor(e){this.emit=(...t)=>{e.emitCollecting(this,t)}}};return Collector.Collector=n,Collector}var CollectorArray={},hasRequiredCollectorArray;function requireCollectorArray(){if(hasRequiredCollectorArray)return CollectorArray;hasRequiredCollectorArray=1,Object.defineProperty(CollectorArray,"__esModule",{value:!0}),CollectorArray.CollectorArray=void 0;const n=requireCollector();let o=class extends n.Collector{constructor(){super(...arguments),this.result=[]}handleResult(t){return this.result.push(t),!0}getResult(){return this.result}reset(){this.result.length=0}};return CollectorArray.CollectorArray=o,CollectorArray}var CollectorLast={},hasRequiredCollectorLast;function requireCollectorLast(){if(hasRequiredCollectorLast)return CollectorLast;hasRequiredCollectorLast=1,Object.defineProperty(CollectorLast,"__esModule",{value:!0}),CollectorLast.CollectorLast=void 0;const n=requireCollector();let o=class extends n.Collector{handleResult(t){return this.result=t,!0}getResult(){return this.result}reset(){delete this.result}};return CollectorLast.CollectorLast=o,CollectorLast}var CollectorUntil0={},hasRequiredCollectorUntil0;function requireCollectorUntil0(){if(hasRequiredCollectorUntil0)return CollectorUntil0;hasRequiredCollectorUntil0=1,Object.defineProperty(CollectorUntil0,"__esModule",{value:!0}),CollectorUntil0.CollectorUntil0=void 0;const n=requireCollector();let o=class extends n.Collector{constructor(){super(...arguments),this.result=!1}handleResult(t){return this.result=t,this.result}getResult(){return this.result}reset(){this.result=!1}};return CollectorUntil0.CollectorUntil0=o,CollectorUntil0}var CollectorWhile0={},hasRequiredCollectorWhile0;function requireCollectorWhile0(){if(hasRequiredCollectorWhile0)return CollectorWhile0;hasRequiredCollectorWhile0=1,Object.defineProperty(CollectorWhile0,"__esModule",{value:!0}),CollectorWhile0.CollectorWhile0=void 0;const n=requireCollector();let o=class extends n.Collector{constructor(){super(...arguments),this.result=!1}handleResult(t){return this.result=t,!this.result}getResult(){return this.result}reset(){this.result=!1}};return CollectorWhile0.CollectorWhile0=o,CollectorWhile0}var Signal={},SignalConnection={},hasRequiredSignalConnection;function requireSignalConnection(){if(hasRequiredSignalConnection)return SignalConnection;hasRequiredSignalConnection=1,Object.defineProperty(SignalConnection,"__esModule",{value:!0}),SignalConnection.SignalConnectionImpl=void 0;class n{constructor(e){this.link=e}disconnect(){return this.link.unlink()}set enabled(e){this.link.setEnabled(e)}get enabled(){return this.link.isEnabled()}}return SignalConnection.SignalConnectionImpl=n,SignalConnection}var SignalLink={},hasRequiredSignalLink;function requireSignalLink(){if(hasRequiredSignalLink)return SignalLink;hasRequiredSignalLink=1,Object.defineProperty(SignalLink,"__esModule",{value:!0}),SignalLink.SignalLink=void 0;let n=class td{constructor(e,t,c){this.enabled=!0,this.newLink=!1,this.prev=e??this,this.next=t??this,this.order=c.order,this.isPublic=c.isPublic,this.callback=c.callback,this.onUnlink=c.onUnlink}isEnabled(){return this.enabled&&!this.newLink}setEnabled(e){this.enabled=e}unlink(){return this.callback?(delete this.callback,this.next.prev=this.prev,this.prev.next=this.next,this.onUnlink(),!0):!1}insert(e){const{order:t}=e;let c=this.prev;for(;c!==this&&!(c.order<=t);)c=c.prev;const p=new td(c,c.next,e);return c.next=p,p.next.prev=p,p}};return SignalLink.SignalLink=n,SignalLink}var hasRequiredSignal;function requireSignal(){if(hasRequiredSignal)return Signal;hasRequiredSignal=1,Object.defineProperty(Signal,"__esModule",{value:!0}),Signal.Signal=void 0;const n=requireSignalConnection(),o=requireSignalLink(),e={order:0,isPublic:!0,onUnlink(){}};let t=class{constructor(){this.head=new o.SignalLink(null,null,e),this.hasNewLinks=!1,this.emitDepth=0,this.connectionsCount=0,this.onUnlink=()=>{this.connectionsCount--}}getConnectionsCount(){return this.connectionsCount}hasConnections(){return this.connectionsCount>0}connect(p,{order:h=0,isPublic:y=!0}={}){this.connectionsCount++;const g=this.head.insert({callback:p,order:h,isPublic:y,onUnlink:this.onUnlink});return this.emitDepth>0&&(this.hasNewLinks=!0,g.newLink=!0),new n.SignalConnectionImpl(g)}disconnect(p){for(let h=this.head.next;h!==this.head;h=h.next)if(h.callback===p)return h.unlink(),!0;return!1}disconnectAll(){let{next:p}=this.head;for(;p!==this.head;)p.isPublic&&p.unlink(),p=p.next}emit(...p){this.emitDepth++;for(let h=this.head.next;h!==this.head;h=h.next)h.isEnabled()&&h.callback&&h.callback.apply(null,p);this.emitDepth--,this.unsetNewLink()}emitCollecting(p,h){this.emitDepth++;for(let y=this.head.next;y!==this.head;y=y.next)if(y.isEnabled()&&y.callback){const g=y.callback.apply(null,h);if(!p.handleResult(g))break}this.emitDepth--,this.unsetNewLink()}unsetNewLink(){if(this.hasNewLinks&&this.emitDepth===0){for(let p=this.head.next;p!==this.head;p=p.next)p.newLink=!1;this.hasNewLinks=!1}}};return Signal.Signal=t,Signal}var SignalConnections={},hasRequiredSignalConnections;function requireSignalConnections(){if(hasRequiredSignalConnections)return SignalConnections;hasRequiredSignalConnections=1,Object.defineProperty(SignalConnections,"__esModule",{value:!0}),SignalConnections.SignalConnections=void 0;let n=class{constructor(){this.list=[]}add(e){this.list.push(e)}disconnectAll(){for(const e of this.list)e.disconnect();this.list=[]}getCount(){return this.list.length}isEmpty(){return this.list.length===0}};return SignalConnections.SignalConnections=n,SignalConnections}var hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.SignalConnections=n.Signal=n.CollectorWhile0=n.CollectorUntil0=n.CollectorLast=n.CollectorArray=n.Collector=void 0;var o=requireCollector();Object.defineProperty(n,"Collector",{enumerable:!0,get:function(){return o.Collector}});var e=requireCollectorArray();Object.defineProperty(n,"CollectorArray",{enumerable:!0,get:function(){return e.CollectorArray}});var t=requireCollectorLast();Object.defineProperty(n,"CollectorLast",{enumerable:!0,get:function(){return t.CollectorLast}});var c=requireCollectorUntil0();Object.defineProperty(n,"CollectorUntil0",{enumerable:!0,get:function(){return c.CollectorUntil0}});var p=requireCollectorWhile0();Object.defineProperty(n,"CollectorWhile0",{enumerable:!0,get:function(){return p.CollectorWhile0}});var h=requireSignal();Object.defineProperty(n,"Signal",{enumerable:!0,get:function(){return h.Signal}});var y=requireSignalConnections();Object.defineProperty(n,"SignalConnections",{enumerable:!0,get:function(){return y.SignalConnections}})}(dist)),dist}var distExports=requireDist();function createFormsData(){return{formsWithPendingChanges:new Set,formsWithUploads:new Set,submitButtons:new Map}}const LOG$c=loglevelExports.getLogger("WidgetStateManager");class WidgetStateDict{constructor(){this.widgetStates=new Map}createState(o){const e=new WidgetState({id:o});return this.widgetStates.set(o,e),e}getState(o){return this.widgetStates.get(o)}deleteState(o){this.widgetStates.delete(o)}removeInactive(o){this.widgetStates.forEach((e,t)=>{o.has(t)||this.widgetStates.delete(t)})}clear(){this.widgetStates.clear()}get isEmpty(){return this.widgetStates.size===0}createWidgetStatesMsg(){const o=new WidgetStates;return this.widgetStates.forEach(e=>o.widgets.push(e)),o}copyFrom(o){o.widgetStates.forEach((e,t)=>{this.widgetStates.set(t,e)})}forEach(o){this.widgetStates.forEach(o)}}class FormState{constructor(){this.widgetStates=new WidgetStateDict,this.clearOnSubmit=!1,this.enterToSubmit=!0,this.formCleared=new distExports.Signal}get hasPendingChanges(){return!this.widgetStates.isEmpty}}class WidgetStateManager{constructor(o){this.widgetStates=new WidgetStateDict,this.forms=new Map,this.elementStates=new Map,this.pendingTriggerIds=new Set,this.triggerFlushResolvers=[],this.flushScheduled=!1,this.hasFragmentIdConflict=!1,this.props=o,this.formsData=createFormsData()}addFormClearedListener(o,e){return this.getOrCreateFormState(o).formCleared.connect(e)}setFormSubmitBehaviors(o,e,t=!0){const c=this.getOrCreateFormState(o);c.clearOnSubmit=e,c.enterToSubmit=t}submitForm(o,e,t){if(!isValidFormId(o))throw new Error(`invalid formID '${o}'`);const c=this.getOrCreateFormState(o),p=this.formsData.submitButtons.get(o);let h;t!==void 0?h=t:p!==void 0&&p.length>0&&(h=p[0]),h&&(this.createWidgetState(h,{fromUi:!0}).triggerValue=!0),this.widgetStates.copyFrom(c.widgetStates),c.widgetStates.clear(),this.sendUpdateWidgetsMessage(e),this.syncFormsWithPendingChanges(),h&&this.deleteWidgetState(h.id),c.clearOnSubmit&&c.formCleared.emit()}setChatInputValue(o,e,t,c){this.createWidgetState(o,t).chatInputValue=new ChatInputValue(e),this.pendingTriggerIds.add(o.id),this.scheduleFlush(c)}setTriggerValue(o,e,t,c){let p=this.getWidgetState(o);if(p===void 0&&(p=this.createWidgetState(o,e)),c===void 0)p.triggerValue=!0;else{const h=c;try{if(isNullOrUndefined(p.jsonTriggerValue))p.jsonTriggerValue=JSON.stringify([h]);else{const y=p.jsonTriggerValue,g=JSON.parse(y),$=Array.isArray(g)?g:[g];$.push(h),p.jsonTriggerValue=JSON.stringify($)}}catch(y){LOG$c.error("Failed to parse or stringify widgetState.jsonTriggerValue:",y),p.jsonTriggerValue=JSON.stringify([p.jsonTriggerValue,h])}}return this.pendingTriggerIds.add(o.id),new Promise(h=>{this.triggerFlushResolvers.push(h),this.scheduleFlush(t)})}getBoolValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="boolValue")return e.boolValue}setBoolValue(o,e,t,c){this.createWidgetState(o,t).boolValue=e,this.onWidgetValueChanged(o.formId,t,c)}getIntValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="intValue")return requireNumberInt(e.intValue)}setIntValue(o,e,t,c){this.createWidgetState(o,t).intValue=e,this.onWidgetValueChanged(o.formId,t,c)}getDoubleValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="doubleValue")return e.doubleValue}setDoubleValue(o,e,t,c){this.createWidgetState(o,t).doubleValue=e,this.onWidgetValueChanged(o.formId,t,c)}getStringValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="stringValue")return e.stringValue}setStringValue(o,e,t,c){this.createWidgetState(o,t).stringValue=e,this.onWidgetValueChanged(o.formId,t,c)}setStringArrayValue(o,e,t,c){this.createWidgetState(o,t).stringArrayValue=new StringArray({data:e}),this.onWidgetValueChanged(o.formId,t,c)}getStringArrayValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="stringArrayValue"&&notNullOrUndefined(e.stringArrayValue)&&notNullOrUndefined(e.stringArrayValue.data))return e.stringArrayValue.data}getDoubleArrayValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="doubleArrayValue"&&notNullOrUndefined(e.doubleArrayValue)&&notNullOrUndefined(e.doubleArrayValue.data))return e.doubleArrayValue.data}setDoubleArrayValue(o,e,t,c){this.createWidgetState(o,t).doubleArrayValue=new DoubleArray({data:e}),this.onWidgetValueChanged(o.formId,t,c)}getIntArrayValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="intArrayValue"&&notNullOrUndefined(e.intArrayValue)&&notNullOrUndefined(e.intArrayValue.data))return e.intArrayValue.data.map(requireNumberInt)}setIntArrayValue(o,e,t,c){this.createWidgetState(o,t).intArrayValue=new SInt64Array({data:e}),this.onWidgetValueChanged(o.formId,t,c)}getJsonValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="jsonValue")return e.jsonValue}setJsonValue(o,e,t,c){this.createWidgetState(o,t).jsonValue=JSON.stringify(e),this.onWidgetValueChanged(o.formId,t,c)}setArrowValue(o,e,t,c){this.createWidgetState(o,t).arrowValue=e,this.onWidgetValueChanged(o.formId,t,c)}getArrowValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="arrowValue"&&notNullOrUndefined(e.arrowValue))return e.arrowValue}setBytesValue(o,e,t,c){this.createWidgetState(o,t).bytesValue=e,this.onWidgetValueChanged(o.formId,t,c)}getBytesValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="bytesValue")return e.bytesValue}setFileUploaderStateValue(o,e,t,c){this.createWidgetState(o,t).fileUploaderStateValue=e,this.onWidgetValueChanged(o.formId,t,c)}getFileUploaderStateValue(o){const e=this.getWidgetState(o);if(notNullOrUndefined(e)&&e.value==="fileUploaderStateValue")return e.fileUploaderStateValue}onWidgetValueChanged(o,e,t){isValidFormId(o)?this.syncFormsWithPendingChanges():e.fromUi&&this.scheduleFlush(t)}syncFormsWithPendingChanges(){const o=new Set;this.forms.forEach((e,t)=>{e.hasPendingChanges&&o.add(t)}),this.updateFormsData(e=>{e.formsWithPendingChanges=o})}sendUpdateWidgetsMessage(o,e=void 0){this.props.sendRerunBackMsg(this.widgetStates.createWidgetStatesMsg(),o,void 0,e)}getActiveWidgetStates(o){const e=new WidgetStates;return this.widgetStates.forEach(t=>{o.has(t.id)&&e.widgets.push(t)}),e}removeInactive(o){this.widgetStates.removeInactive(o),this.forms.forEach(e=>e.widgetStates.removeInactive(o)),this.elementStates.forEach((e,t)=>{o.has(t)||this.deleteElementState(t)})}createWidgetState(o,e){return(isValidFormId(o.formId)&&e.fromUi?this.getOrCreateFormState(o.formId).widgetStates:this.widgetStates).createState(o.id)}getWidgetState(o){if(isValidFormId(o.formId)){const e=this.forms.get(o.formId)?.widgetStates.getState(o.id);if(notNullOrUndefined(e))return e}return this.widgetStates.getState(o.id)}deleteWidgetState(o){this.widgetStates.deleteState(o)}getOrCreateFormState(o){let e=this.forms.get(o);return notNullOrUndefined(e)||(e=new FormState,this.forms.set(o,e)),e}setFormsWithUploadsInProgress(o){this.updateFormsData(e=>{e.formsWithUploads=o})}allowFormEnterToSubmit(o){if(!isValidFormId(o))return!1;const e=this.forms.get(o);if(e&&!e.enterToSubmit)return!1;const c=this.formsData.submitButtons.get(o)?.[0];return c?!c.disabled:!1}addSubmitButton(o,e){const t=this.formsData.submitButtons.get(o);if(t===void 0)this.setSubmitButtons(o,[e]);else{const c=Object.assign([],t);c.push(e),this.setSubmitButtons(o,c)}}removeSubmitButton(o,e){const t=this.formsData.submitButtons.get(o);if(t!==void 0){const c=Object.assign([],t),p=c.indexOf(e,0);p>-1&&c.splice(p,1),this.setSubmitButtons(o,c)}}setSubmitButtons(o,e){if(e.length<0)throw new Error(`Bad submitButtons length ${e.length} (must be >= 0)`);this.updateFormsData(t=>{t.submitButtons.set(o,e)})}updateFormsData(o){const e=produce(this.formsData,o);this.formsData!==e&&(this.formsData=e,this.props.formsDataChanged(this.formsData))}getElementState(o,e){return this.elementStates.get(o)?.get(e)}setElementState(o,e,t){this.elementStates.has(o)||this.elementStates.set(o,new Map),this.elementStates.get(o).set(e,t)}deleteElementState(o,e){notNullOrUndefined(e)?this.elementStates.get(o)?.delete(e):this.elementStates.delete(o)}scheduleFlush(o){this.scheduledFragmentId===void 0&&(this.scheduledFragmentId=o),this.scheduledFragmentId!==void 0&&o!==void 0&&o!==this.scheduledFragmentId&&!this.hasFragmentIdConflict&&(LOG$c.warn("Unexpected state: Multiple different fragmentIds detected in a single batch of widget updates. Proceeding with flushing updates using fragmentId '%s' for this batch.",this.scheduledFragmentId),this.hasFragmentIdConflict=!0),!this.flushScheduled&&(this.flushScheduled=!0,setTimeout(()=>{this.sendUpdateWidgetsMessage(this.scheduledFragmentId),this.pendingTriggerIds.forEach(e=>this.deleteWidgetState(e)),this.pendingTriggerIds.clear(),this.triggerFlushResolvers.forEach(e=>e()),this.triggerFlushResolvers=[],this.flushScheduled=!1,this.scheduledFragmentId=void 0,this.hasFragmentIdConflict=!1},0))}}function requireNumberInt(n){if(typeof n=="number")return n;const o=protobufjsExports.util.LongBits.from(n).toNumber();if(Number.isSafeInteger(o))return o;throw new Error(`value ${n} cannot be converted to number without a loss of precision!`)}class ReactHotkeys extends React.Component{constructor(o){super(o),this.isKeyDown=!1,this.handle=void 0,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.handleKeyUpEvent=this.handleKeyUpEvent.bind(this),this.handle={}}componentDidMount(){var{filter:o,splitKey:e}=this.props;o&&(hotkeys.filter=o),hotkeys.unbind(this.props.keyName),hotkeys(this.props.keyName,{splitKey:e},this.onKeyDown),document&&document.body.addEventListener("keyup",this.handleKeyUpEvent)}componentWillUnmount(){hotkeys.unbind(this.props.keyName),this.isKeyDown=!0,this.handle={},document&&document.body.removeEventListener("keyup",this.handleKeyUpEvent)}onKeyUp(o,e){var{onKeyUp:t,disabled:c}=this.props;!c&&t&&t(e.shortcut,o,e)}onKeyDown(o,e){var{onKeyDown:t,allowRepeat:c,disabled:p}=this.props;this.isKeyDown&&!c||(this.isKeyDown=!0,this.handle=e,!p&&t&&t(e.shortcut,o,e))}handleKeyUpEvent(o){this.isKeyDown&&(this.isKeyDown=!1,!(this.props.keyName&&this.props.keyName.indexOf(this.handle.shortcut)<0)&&(this.onKeyUp(o,this.handle),this.handle={}))}render(){return this.props.children||null}}ReactHotkeys.defaultProps={filter(n){var o=n.target||n.srcElement,e=o.tagName;return!(o.isContentEditable||e==="INPUT"||e==="SELECT"||e==="TEXTAREA")}};ReactHotkeys.propTypes={keyName:propTypesExports.string,filter:propTypesExports.func,onKeyDown:propTypesExports.func,onKeyUp:propTypesExports.func,disabled:propTypesExports.bool,splitKey:propTypesExports.string};function EventContainer({children:n}){const o=useEmotionTheme();return jsxs(Fragment,{children:[jsx$1(ToasterContainer,{placement:PLACEMENT$1.topRight,autoHideDuration:4*1e3,overrides:{Root:{style:{top:o.sizes.headerHeight,zIndex:o.zIndices.toast},props:{"data-testid":"stToastContainer",className:"stToastContainer"}}}}),n]})}const StyledLogoContainer=styled("div",{target:"e1o8oa9v0"})(({theme:n})=>({marginLeft:n.spacing.lg})),StyledHeader$2=styled("header",{target:"e1o8oa9v1"})(({theme:n,isTransparentBackground:o})=>({position:"absolute",top:0,left:0,right:0,display:"flex",alignItems:"center",height:n.sizes.headerHeight,minHeight:n.sizes.headerHeight,width:"100%",background:o?"transparent":n.colors.bgColor,outline:"none",zIndex:n.zIndices.header,pointerEvents:o?"none":"auto",fontSize:n.fontSizes.sm,"@media print":{position:"absolute",background:"transparent","& *":{display:"none !important"},[`& ${StyledLogoContainer}, & ${StyledLogoContainer} *, & :has(${StyledLogoContainer})`]:{display:"flex !important"},[`& ${StyledLogoContainer} img`]:{display:"block !important"}}})),StyledHeaderToolbar=styled("div",{target:"e1o8oa9v2"})(({theme:n})=>({display:"flex",alignItems:"center",height:"100%",width:"100%",padding:0,pointerEvents:"auto",position:"relative",zIndex:n.zIndices.header})),StyledOpenSidebarButton=styled("div",{target:"e1o8oa9v3"})(({theme:n})=>({display:"flex",alignItems:"center",justifyContent:"center",marginLeft:n.spacing.lg,"@media print":{display:"none"}})),StyledHeaderContent=styled("div",{target:"e1o8oa9v4"})(()=>({flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",margin:0,border:0})),StyledHeaderLeftSection=styled("div",{target:"e1o8oa9v5"})(()=>({display:"flex",alignItems:"center",flexShrink:0})),StyledHeaderRightSection=styled("div",{target:"e1o8oa9v6"})(({theme:n})=>({flexShrink:0,display:"flex",alignItems:"center",justifyContent:"flex-end",marginLeft:"auto",height:"100%",minWidth:n.sizes.headerRightContentMaxWidth,marginRight:n.spacing.lg})),Header=({hasSidebar:n,isSidebarOpen:o,onToggleSidebar:e,navigation:t,rightContent:c,logoComponent:p,showToolbar:h})=>{const{activeTheme:y}=reactExports.useContext(ThemeContext),g=p&&!o,$=n&&!o,E=h&&c,A=g||$||t||E;return jsx$1(StyledHeader$2,{className:"stAppHeader","data-testid":"stHeader",isTransparentBackground:!A,children:A?jsx$1(StyledHeaderToolbar,{className:"stAppToolbar","data-testid":"stToolbar",theme:y.emotion,children:jsxs(StyledHeaderContent,{children:[jsxs(StyledHeaderLeftSection,{children:[g?jsx$1(StyledLogoContainer,{children:p}):null,$&&jsx$1(StyledOpenSidebarButton,{children:jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_NO_PADDING,onClick:e,"data-testid":"stExpandSidebarButton",children:jsx$1(DynamicIcon,{size:"xl",iconValue:":material/keyboard_double_arrow_right:",color:y.emotion.colors.fadedText60})})})]}),t,E?jsx$1(StyledHeaderRightSection,{children:c}):null]})}):null})},getSidebarHorizontalSpacing=(n,o)=>`max(
140
140
  ${o}px,
141
141
  calc(${n.spacing.xl} - ${o}px)
142
142
  )`,StyledSidebar=styled("section",{target:"e6f82ta0"})(({theme:n,isCollapsed:o,adjustTop:e,sidebarWidth:t,windowInnerWidth:c})=>{const p=o?0:Math.min(200,c),h=o?0:Math.min(600,c*.9);return{position:"relative",top:e?n.sizes.headerDecorationHeight:n.spacing.none,backgroundColor:n.colors.bgColor,color:n.colors.bodyText,colorScheme:hasLightBackgroundColor(n)?"light":"dark",zIndex:n.zIndices.header+1,minWidth:p,maxWidth:h,transform:o?`translateX(-${t}px)`:"none",transition:"transform 300ms, min-width 300ms, max-width 300ms","&:focus":{outline:"none"},[`@media (max-width: ${n.breakpoints.md})`]:{boxShadow:`-2rem 0 2rem 2rem ${o?"transparent":"#00000029"}`},"@media print":{display:o?"none":"initial",height:"auto !important",maxHeight:"99%",boxShadow:"none"}}}),StyledSidebarUserContent=styled("div",{target:"e6f82ta1"})(({hasPageNavAbove:n,theme:o})=>({paddingTop:n?o.spacing.twoXL:0,paddingBottom:o.sizes.sidebarTopSpace})),StyledSidebarContent=styled("div",{target:"e6f82ta2"})(({theme:n,scrollbarGutterSize:o})=>({position:"relative",height:"100%",width:"100%",overflow:"auto",scrollbarGutter:"stable both-edges",paddingLeft:getSidebarHorizontalSpacing(n,o),paddingRight:getSidebarHorizontalSpacing(n,o)})),RESIZE_HANDLE_WIDTH="8px",StyledResizeHandle=styled("div",{target:"e6f82ta3"})(({theme:n})=>({position:"absolute",width:RESIZE_HANDLE_WIDTH,height:"100%",cursor:"col-resize",zIndex:n.zIndices.sidebarMobile,backgroundImage:n.showSidebarBorder?`linear-gradient(to right, transparent 20%, ${n.colors.borderColor} 28%, transparent 36%)`:"none","&:hover":{backgroundImage:`linear-gradient(to right, transparent 20%, ${n.colors.borderColor} 28%, transparent 44%)`}})),StyledSidebarHeaderContainer=styled("div",{target:"e6f82ta4"})(({theme:n})=>({display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:n.spacing.lg,height:n.sizes.headerHeight})),StyledLogoLink=styled("a",{target:"e6f82ta5"})({"&:hover":{opacity:"0.7"}});function translateLogoHeight(n,o){return o==="small"?n.sizes.smallLogoHeight:o==="large"?n.sizes.largeLogoHeight:n.sizes.defaultLogoHeight}const StyledLogo=styled("img",{target:"e6f82ta6"})(({theme:n,size:o})=>({height:translateLogoHeight(n,o),marginTop:o=="small"?n.spacing.xs:n.spacing.twoXS,marginBottom:o=="small"?n.spacing.xs:n.spacing.twoXS,marginLeft:n.spacing.none,zIndex:n.zIndices.header,objectFit:"contain",objectPosition:"left",verticalAlign:"middle",maxWidth:"100%"})),StyledNoLogoSpacer=styled("div",{target:"e6f82ta7"})(({theme:n})=>({height:n.sizes.largeLogoHeight})),StyledCollapseSidebarButton=styled("div",{target:"e6f82ta8"})(({showSidebarCollapse:n,theme:o})=>({display:"inline",visibility:n?"visible":"hidden",marginLeft:o.spacing.sm,transition:"left 300ms",transitionDelay:"left 300ms",color:hasLightBackgroundColor(o)?o.colors.fadedText60:o.colors.bodyText,lineHeight:"0","@media print":{visibility:"hidden"},[`@media (max-width: ${o.breakpoints.sm})`]:{visibility:"visible"}})),LOG$b=loglevelExports.getLogger("LogoComponent"),LogoComponent=({appLogo:n,endpoints:o,collapsed:e=!1,componentName:t="Logo",dataTestId:c="stLogo"})=>{const{resourceCrossOriginMode:p}=reactExports.useContext(LibConfigContext);if(!n)return null;const h=A=>{LOG$b.error(`Client Error: ${t} source error - ${A}`),o.sendClientErrorToHost(t,"Logo source failed to load","onerror triggered",A)},y=e&&n.iconImage?n.iconImage:n.image,g=o.buildMediaURL(y),$=getCrossOriginAttribute(p,y),E=jsx$1(StyledLogo,{src:g,size:n.size,alt:"Logo",className:"stLogo","data-testid":c,onError:A=>h(g),crossOrigin:$});return n.link?jsx$1(StyledLogoLink,{href:n.link,target:"_blank",rel:"noreferrer","data-testid":"stLogoLink",children:E}):jsx$1("div",{children:E})},getNavTextColor=(n,o,e=!1,t)=>{if(e)return n.colors.fadedText40;if(t)return n.colors.bodyText;const c=hasLightBackgroundColor(n);return o?n.colors.bodyText:c?transparentize(n.colors.bodyText,.2):transparentize(n.colors.bodyText,.25)},StyledSidebarNavContainer=styled("div",{target:"eof1nuh0"})(({theme:n})=>({position:"relative",fontFamily:n.genericFonts.bodyFont})),StyledSidebarNavItems=styled("ul",{target:"eof1nuh1"})(({theme:n})=>({listStyle:"none",margin:n.spacing.none,paddingBottom:n.spacing.threeXS,paddingTop:n.spacing.none,paddingRight:n.spacing.none,paddingLeft:n.spacing.none})),StyledSidebarNavLinkContainer=styled("div",{target:"eof1nuh2"})(({disabled:n})=>({display:"flex",flexDirection:"column",cursor:n?"not-allowed":"pointer"})),StyledSidebarNavIcon=styled("span",{target:"eof1nuh3"})(({theme:n,isActive:o})=>({display:"inline-flex",span:{fontWeight:o?n.fontWeights.bold:n.fontWeights.normal}})),StyledSidebarNavLinkListItem=styled("li",{target:"eof1nuh4"})(({theme:n})=>({marginTop:n.spacing.threeXS,marginBottom:n.spacing.threeXS})),StyledSidebarNavLink=styled("a",{target:"eof1nuh5"})(({theme:n,isActive:o,disabled:e})=>{const t={textDecoration:"none",fontWeight:o?n.fontWeights.bold:n.fontWeights.normal};return{...t,display:"flex",flexDirection:"row",alignItems:"center",gap:n.spacing.sm,borderRadius:n.radii.default,paddingLeft:n.spacing.sm,paddingRight:n.spacing.sm,marginTop:n.spacing.threeXS,marginBottom:n.spacing.threeXS,lineHeight:n.lineHeights.menuItem,color:getNavTextColor(n,o),backgroundColor:o?n.colors.darkenedBgMix25:"transparent",...e&&{pointerEvents:"none"},"&:hover":{backgroundColor:n.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{...t},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:n.colors.darkenedBgMix15},"@media print":{paddingLeft:n.spacing.none}}}),StyledSidebarLinkText=styled("span",{target:"eof1nuh6"})(({isActive:n,theme:o,disabled:e,isTopNav:t,label:c})=>({color:getNavTextColor(o,n,e,t),fontSize:o.fontSizes.sm,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell","&::after":{content:`"${c}"`,fontWeight:o.fontWeights.bold,visibility:"hidden",display:"block",width:"fit-content",height:0}})),StyledChevronContainer=styled("div",{target:"eof1nuh7"})(({isExpanded:n})=>({visibility:"hidden",display:"flex",alignItems:"center",justifyContent:"center",transform:n?"rotate(0deg)":"rotate(-90deg)",transition:"transform 200ms ease",flexShrink:0})),StyledNavSectionHeaderText=styled("span",{target:"eof1nuh8"})(()=>({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",minWidth:0})),StyledSidebarNavSectionHeader=styled("header",{target:"eof1nuh9"})(({theme:n})=>({fontSize:n.fontSizes.sm,fontWeight:n.fontWeights.semiBold,color:getNavTextColor(n,!1),lineHeight:n.lineHeights.small,paddingRight:n.spacing.sm,marginTop:n.spacing.sm,marginBottom:n.spacing.twoXS,display:"flex",flexDirection:"row",alignItems:"center",gap:n.spacing.sm,cursor:"pointer",userSelect:"none","&:hover":{[`& > ${StyledChevronContainer}`]:{visibility:"visible"}}})),StyledViewButton=styled("button",{target:"eof1nuh10"})(({theme:n})=>({fontSize:n.fontSizes.sm,fontFamily:"inherit",lineHeight:n.lineHeights.base,color:getNavTextColor(n,!0),backgroundColor:n.colors.transparent,border:"none",borderRadius:n.radii.default,marginTop:n.spacing.twoXS,marginLeft:n.spacing.none,marginBottom:n.spacing.none,marginRight:n.spacing.none,padding:`${n.spacing.threeXS} ${n.spacing.sm}`,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{backgroundColor:n.colors.darkenedBgMix15}})),StyledSidebarNavSeparator=styled("div",{target:"eof1nuh11"})(({theme:n})=>({paddingTop:n.spacing.lg,borderBottom:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`})),StyledNavSectionContainer=styled("div",{target:"eof1nuh12"})(({theme:n})=>({"&:not(:first-child)":{marginTop:n.spacing.lg}})),StyledOverflowContainer=styled("div",{target:"eof1nuh13"})(({theme:n})=>({display:"flex",alignItems:"center",width:"100%",flexShrink:1,overflow:"hidden",padding:`0 ${n.spacing.lg}`})),StyledNavSection=styled("div",{target:"eof1nuh14"})(({theme:n,isOpen:o})=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",position:"relative",lineHeight:n.lineHeights.menuItem,fontSize:n.fontSizes.sm,padding:`0 ${n.spacing.sm}`,color:getNavTextColor(n,!1,!1,!0),borderRadius:n.radii.default,marginRight:n.spacing.twoXS,"&:not(:first-of-type)":{marginLeft:n.spacing.twoXS},...o?{backgroundColor:n.colors.darkenedBgMix25}:{},"&:hover":{backgroundColor:n.colors.darkenedBgMix15}})),StyledTopNavLinkContainer=styled("div",{target:"eof1nuh15"})(({theme:n})=>({marginRight:n.spacing.twoXS,"&:not(:first-of-type)":{marginLeft:n.spacing.twoXS}})),StyledTopNavSidebarNavLinkContainer=styled("div",{target:"eof1nuh16"})(({theme:n})=>({margin:`${n.spacing.twoXS} ${n.spacing.sm}`})),StyledNavSectionText=styled("span",{target:"eof1nuh17"})(()=>({whiteSpace:"nowrap"})),StyledSectionName=styled("div",{target:"eof1nuh18"})(({theme:n})=>({marginLeft:n.spacing.sm,marginTop:n.spacing.sm,marginBottom:n.spacing.sm})),StyledPopoverContent=styled("div",{target:"eof1nuh19"})(({theme:n})=>({padding:`${n.spacing.twoXS} 0`,fontSize:n.fontSizes.sm})),StyledIconContainer=styled("div",{target:"eof1nuh20"})(({theme:n})=>({marginLeft:n.spacing.twoXS})),NavSection=({header:n="",children:o,isExpanded:e,onToggle:t})=>jsxs(StyledNavSectionContainer,{children:[n&&jsxs(StyledSidebarNavSectionHeader,{"data-testid":"stNavSectionHeader",onClick:t,isExpanded:e,children:[jsx$1(StyledNavSectionHeaderText,{children:n}),jsx$1(StyledChevronContainer,{isExpanded:e,children:jsx$1(DynamicIcon,{iconValue:":material/expand_more:",size:"lg"})})]}),e&&o]}),SidebarNavLink=({isActive:n,pageUrl:o,icon:e,onClick:t,isTopNav:c,isInDropdown:p,children:h,widgetsDisabled:y})=>{const g=useEmotionTheme(),$=y;let E;return c&&p?E="stTopNavDropdownLink":c?E="stTopNavLink":E="stSidebarNavLink",jsx$1(StyledSidebarNavLinkContainer,{disabled:$,"data-testid":c?"stTopNavLinkContainer":"stSidebarNavLinkContainer",children:jsxs(StyledSidebarNavLink,{"data-testid":E,isActive:n,disabled:$,href:o,onClick:t,"aria-current":n?"page":void 0,children:[e?.length?jsx$1(StyledSidebarNavIcon,{isActive:n,children:jsx$1(DynamicIcon,{size:"base",iconValue:e,color:!n&&isMaterialIcon(e)?g.colors.fadedText60:g.colors.bodyText})}):null,jsx$1(StyledSidebarLinkText,{isActive:n,disabled:$,isTopNav:c,label:h,children:h})]})})};function shouldShowNavigation(n,o){return n.length<=1?!1:(o.length===0||o.length>1,!0)}function groupPagesBySection(n){return groupBy(n,o=>o.sectionHeader||"")}function hasNonEmptySections(n){return Object.keys(n).some(o=>o!=="")}function processNavigationStructure(n){if(!hasNonEmptySections(n))return{individualPages:Object.values(n).flat(),sections:{}};const e=n[""]||[],t={};return Object.entries(n).forEach(([c,p])=>{c&&c!==""&&c!=="undefined"&&(t[c]=p)}),{individualPages:e,sections:t}}const COLLAPSE_THRESHOLD=12,NUM_PAGES_TO_SHOW_WHEN_COLLAPSED=10,LOG$a=loglevelExports.getLogger("SidebarNav");function NavLink({pageUrl:n,page:o,isActive:e,onClick:t,widgetsDisabled:c}){const p=o.pageName;return jsx$1(StyledSidebarNavLinkListItem,{children:jsx$1(SidebarNavLink,{isActive:e,pageUrl:n,icon:o.icon,onClick:t,widgetsDisabled:c,children:p})})}function generateNavSections(n,o,e,t,c,p){const h=[];let y=p;return Object.entries(n).forEach(([g,$])=>{const E=[...$];let A=E;const N=t[g];if(o){const H=NUM_PAGES_TO_SHOW_WHEN_COLLAPSED-y;H<=0?A=[]:E.length>H&&(A=E.slice(0,H))}N&&(y+=A.length),A.length>0&&h.push(jsx$1(NavSection,{header:g,isExpanded:N,onToggle:()=>c(g),children:A.map(e)},g))}),{sections:h,updatedPageCount:y}}const SidebarNav=({endpoints:n,collapseSidebar:o,hasSidebarElements:e,widgetsDisabled:t})=>{const[c,p]=reactExports.useState(!1),{expandSidebarNav:h}=reactExports.useContext(SidebarConfigContext),{pageLinkBaseUrl:y,appPages:g,onPageChange:$,currentPageScriptHash:E}=reactExports.useContext(NavigationContext),A=`stSidebarSectionsState-${y}`,[N,H]=reactExports.useState(null),Z=reactExports.useMemo(()=>processNavigationStructure(groupPagesBySection(g)),[g]),X=reactExports.useMemo(()=>{if(!(Object.keys(Z.sections).length>0))return g.length;let Ge=Z.individualPages.length;return Object.entries(Z.sections).forEach(([je,De])=>{N?.[je]&&(Ge+=De.length)}),Ge},[g.length,N,Z]);reactExports.useEffect(()=>{const Be=localStorageAvailable()&&window.localStorage.getItem("sidebarNavState")==="expanded";!c&&(h||Be)&&p(!0)},[c,h]),reactExports.useEffect(()=>{if(localStorageAvailable()){const Be=window.localStorage.getItem(A);let Ge={};if(Be)try{Ge=JSON.parse(Be)}catch(De){Ge={},LOG$a.warn("Could not parse sidebar nav state from localStorage",De)}const je=Object.keys(Z.sections).reduce((De,Ue)=>(De[Ue]=Ge[Ue]??!0,De),{});H(je)}else{const Be=Object.keys(Z.sections).reduce((Ge,je)=>(Ge[je]=!0,Ge),{});H(Be)}},[Z.sections,A]),reactExports.useEffect(()=>{localStorageAvailable()&&N&&window.localStorage.setItem(A,JSON.stringify(N))},[N,A]);const be=reactExports.useCallback(Be=>{H(Ge=>Ge?{...Ge,[Be]:!Ge[Be]}:null)},[]),we=reactExports.useCallback(()=>{const Be=!c;localStorageAvailable()&&(Be?window.localStorage.setItem("sidebarNavState","expanded"):window.localStorage.removeItem("sidebarNavState")),p(Be)},[c]),$e=reactExports.useCallback((Be,Ge)=>{const je=n.buildAppPageURL(y,Be),De=Be.pageScriptHash===E;return jsx$1(NavLink,{pageUrl:je,page:Be,isActive:De,onClick:Ue=>{Ue.preventDefault(),$(Be.pageScriptHash),isMobile()&&o()},widgetsDisabled:t},`${Be.pageName}-${Ge}`)},[o,E,n,$,y,t]);if(!N)return null;const Ce=[],Ie=e&&X>COLLAPSE_THRESHOLD&&!h,Ne=Ie&&!c;let Fe=0;if(Z.individualPages.length>0){const Be=Ne?Z.individualPages.slice(0,NUM_PAGES_TO_SHOW_WHEN_COLLAPSED):Z.individualPages;Ce.push(...Be.map($e)),Fe+=Be.length}if(Object.keys(Z.sections).length>0){const Be=generateNavSections(Z.sections,Ne,$e,N,be,Fe);Ce.push(...Be.sections)}return jsxs(StyledSidebarNavContainer,{"data-testid":"stSidebarNav",children:[jsx$1(StyledSidebarNavItems,{"data-testid":"stSidebarNavItems",children:Ce}),Ie&&jsx$1(StyledViewButton,{onClick:we,"data-testid":"stSidebarNavViewButton",children:c?"View less":`View ${X-NUM_PAGES_TO_SHOW_WHEN_COLLAPSED} more`}),e&&jsx$1(StyledSidebarNavSeparator,{"data-testid":"stSidebarNavSeparator"})]})};function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var t in e)({}).hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$2.apply(null,arguments)}function _typeof$1(n){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof$1(n)}function toPrimitive$1(n,o){if(_typeof$1(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,o);if(_typeof$1(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}function toPropertyKey$1(n){var o=toPrimitive$1(n,"string");return _typeof$1(o)=="symbol"?o:o+""}function _defineProperty$2(n,o,e){return(o=toPropertyKey$1(o))in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}function ownKeys$3(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);o&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),e.push.apply(e,t)}return e}function _objectSpread2$1(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$3(Object(e),!0).forEach(function(t){_defineProperty$2(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$3(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _arrayWithHoles(n){if(Array.isArray(n))return n}function _iterableToArrayLimit(n,o){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t,c,p,h,y=[],g=!0,$=!1;try{if(p=(e=e.call(n)).next,o!==0)for(;!(g=(t=p.call(e)).done)&&(y.push(t.value),y.length!==o);g=!0);}catch(E){$=!0,c=E}finally{try{if(!g&&e.return!=null&&(h=e.return(),Object(h)!==h))return}finally{if($)throw c}}return y}}function _arrayLikeToArray(n,o){(o==null||o>n.length)&&(o=n.length);for(var e=0,t=Array(o);e<o;e++)t[e]=n[e];return t}function _unsupportedIterableToArray(n,o){if(n){if(typeof n=="string")return _arrayLikeToArray(n,o);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?_arrayLikeToArray(n,o):void 0}}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -148,4 +148,4 @@ Event: ${o}`)}async pingServer(){this.pingRequest=doInitPings(this.args.baseUriP
148
148
  The app's main file \`${n}\` has
149
149
  not been pushed to GitHub. Please add it to continue.
150
150
  `,allowHTML:!1})}}const DEPLOY_URL="https://share.streamlit.io/deploy",STREAMLIT_CLOUD_URL="https://streamlit.io/cloud",STREAMLIT_COMMUNITY_CLOUD_DOCS_URL="https://share.streamlit.io/cloud-getting-started",STREAMLIT_DEPLOY_TUTORIAL_URL="https://share.streamlit.io/deployment-tutorial",SNOWFLAKE_LEARN_MORE_URL="https://share.streamlit.io/sis-about",SNOWFLAKE_TRIAL_URL="https://share.streamlit.io/snowflake-trial",StyledParagraph=styled("p",{target:"edgwnvj0"})({textAlign:"justify"});function NoRepositoryDetected(){return{title:"Unable to deploy",body:jsxs(StyledParagraph,{children:["The app’s code is not connected to a remote GitHub repository. To deploy on Streamlit Community Cloud, please put your code in a GitHub repository and publish the current branch. Read more in"," ",jsx$1("a",{href:STREAMLIT_COMMUNITY_CLOUD_DOCS_URL,rel:"noopener noreferrer",target:"_blank",children:"our documentation"}),"."]})}}function DeployCard(n){const{colors:o,spacing:e,radii:t,breakpoints:c,sizes:p}=useEmotionTheme(),{children:h}=n;return jsx$1(Card,{overrides:{Root:{style:{borderTopWidth:p.borderWidth,borderBottomWidth:p.borderWidth,borderLeftWidth:p.borderWidth,borderRightWidth:p.borderWidth,borderTopStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"solid",borderTopColor:o.borderColor,borderBottomColor:o.borderColor,borderLeftColor:o.borderColor,borderRightColor:o.borderColor,borderTopLeftRadius:"none",borderTopRightRadius:"none",borderBottomLeftRadius:"none",borderBottomRightRadius:"none",":last-child":{borderRightStyle:"none",borderBottomRightRadius:t.xl},":first-child":{borderBottomLeftRadius:t.xl},[`@media (max-width: ${c.md})`]:{":last-child":{borderBottomLeftRadius:t.xl}}}},Contents:{style:{marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:"100%"}},Body:{style:{padding:e.twoXL,marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:"100%",display:"flex",flexDirection:"column",[`@media (max-width: ${c.md})`]:{padding:e.xl}}}},children:h})}const Checkmark="data:image/svg+xml,%3csvg%20width='12'%20height='9'%20viewBox='0%200%2012%209'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.00009%206.78L1.68676%204.46667C1.42676%204.20667%201.00676%204.20667%200.746758%204.46667C0.486758%204.72667%200.486758%205.14667%200.746758%205.40667L3.53342%208.19334C3.79342%208.45334%204.21342%208.45334%204.47342%208.19334L11.5268%201.14C11.7868%200.880005%2011.7868%200.460005%2011.5268%200.200005C11.2668%20-0.0599951%2010.8468%20-0.0599951%2010.5868%200.200005L4.00009%206.78Z'%20fill='%23808495'/%3e%3c/svg%3e",StyledHeader$1=styled("div",{target:"e7qwnp70"})(({theme:n})=>({fontFamily:n.fonts.sansSerif,fontWeight:n.fontWeights.bold,fontSize:n.fontSizes.lg,marginTop:n.spacing.twoXL,marginBottom:n.spacing.twoXS,[`@media (max-width: ${n.breakpoints.md})`]:{marginTop:n.spacing.md}})),StyledSubheader=styled("div",{target:"e7qwnp71"})(({theme:n})=>({fontFamily:n.fonts.sansSerif,fontWeight:n.fontWeights.normal,fontSize:n.fontSizes.md,marginTop:n.spacing.twoXS,marginBottom:n.spacing.md,[`@media (max-width: ${n.breakpoints.md})`]:{marginTop:n.spacing.md}})),StyledCardContainer=styled("div",{target:"e7qwnp72"})(({theme:n})=>({display:"grid",maxWidth:`calc(1.25 * ${n.sizes.contentMaxWidth})`,gridTemplateColumns:"1fr 1fr 1fr",gridGap:n.spacing.none,[`@media (max-width: ${n.breakpoints.md})`]:{gridTemplateColumns:"1fr"}})),StyledElement=styled("div",{target:"e7qwnp73"})(({theme:n})=>({display:"inline-flex",marginTop:n.spacing.sm,"& > span":{fontFamily:n.fonts.sansSerif,fontWeight:n.fontWeights.normal,fontSize:n.fontSizes.md,marginLeft:n.spacing.twoXL,color:n.colors.gray70},"& > img":{position:"absolute",marginTop:n.spacing.sm}})),StyledActionsWrapper=styled("div",{target:"e7qwnp74"})(({theme:n})=>({display:"flex",marginTop:n.spacing.threeXL,"& > button":{marginRight:n.spacing.twoXL},[`@media (max-width: ${n.breakpoints.md})`]:{marginTop:n.spacing.xl}}));function DeployListElement(n){const{children:o}=n;return jsxs(StyledElement,{children:[jsx$1("img",{src:Checkmark,alt:"Checkmark"}),jsx$1("span",{children:o})]})}function ModalBody({children:n}){const{colors:o,fontSizes:e,spacing:t}=useEmotionTheme();return jsx$1(ModalBody$2,{style:{marginTop:t.none,marginLeft:t.none,marginRight:t.none,marginBottom:t.none,paddingTop:t.md,paddingRight:t.none,paddingBottom:t.none,paddingLeft:t.none,color:o.bodyText,fontSize:e.md,overflowY:"auto"},children:n})}function DeployModal(n){const{children:o,onClose:e}=n;return jsxs(Modal,{isOpen:!0,closeable:!0,onClose:e,size:"auto",children:[jsx$1(ModalHeader,{children:"Deploy this app using..."}),jsx$1(ModalBody,{children:o})]})}const{GitStates}=GitInfo,openUrl=n=>{window.open(n,"_blank")},getDeployAppUrl=n=>{if(n){const o=new URL(DEPLOY_URL);return o.searchParams.set("repository",n.repository??""),o.searchParams.set("branch",n.branch??""),o.searchParams.set("mainModule",n.module??""),o.toString()}return STREAMLIT_CLOUD_URL};function DeployDialog(n){const{gitInfo:o,onClose:e,metricsMgr:t,showDeployError:c,isDeployErrorModalOpen:p}=n,h=reactExports.useCallback(()=>{if(t.enqueue("menuClick",{label:"deployButtonInDialog"}),!o){const H=NoRepositoryDetected();c(H.title,H.body);return}const{repository:y,branch:g,module:$,untrackedFiles:E,state:A}=o;if((!y||!g||!$)&&A===GitStates.DEFAULT){const H=NoRepositoryDetected();c(H.title,H.body);return}if(A===GitStates.HEAD_DETACHED){const H=DetachedHead();c(H.title,H.body);return}if($&&E?.includes($)){const H=ModuleIsNotAdded($);c(H.title,H.body);return}p&&e(),openUrl(getDeployAppUrl(o))},[t,o,p,c,e]);return jsx$1(DeployModal,{onClose:e,children:jsxs(StyledCardContainer,{children:[jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:1},children:[jsx$1("img",{src:StreamlitLogo,alt:"Streamlit Logo","data-testid":"stDeployDialogCommunityCloudIcon"}),jsx$1(StyledHeader$1,{children:"Streamlit Community Cloud"}),jsx$1(StyledSubheader,{children:"For community, always free"}),jsx$1(DeployListElement,{children:"For personal hobbies and learning"}),jsx$1(DeployListElement,{children:"Deploy unlimited public apps"}),jsx$1(DeployListElement,{children:"Explore and learn from Streamlit’s community and popular apps"})]}),jsx$1(Action,{children:jsxs(StyledActionsWrapper,{children:[jsx$1(BaseButton,{kind:BaseButtonKind.PRIMARY,onClick:h,children:"Deploy now"}),jsx$1(BaseButton,{onClick:()=>{t.enqueue("menuClick",{label:"readMoreCommunityCloudInDeployDialog"}),openUrl(STREAMLIT_COMMUNITY_CLOUD_DOCS_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})]})})]}),jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:1},children:[jsx$1("img",{src:Snowflake,alt:"Snowflake","data-testid":"stDeployDialogSnowflakeDeploymentIcon"}),jsx$1(StyledHeader$1,{children:"Snowflake"}),jsx$1(StyledSubheader,{children:"For enterprise"}),jsx$1(DeployListElement,{children:"Enterprise-level security, support, and fully managed infrastructure"}),jsx$1(DeployListElement,{children:"Deploy unlimited private apps with role-based sharing"}),jsx$1(DeployListElement,{children:"Integrate with Snowflake’s full data stack"})]}),jsx$1(Action,{children:jsxs(StyledActionsWrapper,{children:[jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:()=>{t.enqueue("menuClick",{label:"startTrialInDeployDialog"}),openUrl(SNOWFLAKE_TRIAL_URL)},children:"Start trial"}),jsx$1(BaseButton,{onClick:()=>{t.enqueue("menuClick",{label:"learnMoreSnowflakeInDeployDialog"}),openUrl(SNOWFLAKE_LEARN_MORE_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})]})})]}),jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:2},children:[jsx$1("img",{src:Rocket,alt:"Rocket","data-testid":"stDeployDialogCustomDeploymentIcon"}),jsx$1(StyledHeader$1,{children:"Other platforms"}),jsx$1(StyledSubheader,{children:"For custom deployment "}),jsx$1(DeployListElement,{children:"Deploy on your own hardware or cloud service"}),jsx$1(DeployListElement,{children:"Set up and maintain your own authentication, resources, and costs"})]}),jsx$1(Action,{children:jsx$1(StyledActionsWrapper,{children:jsx$1(BaseButton,{onClick:()=>{t.enqueue("menuClick",{label:"readMoreDeployTutorialInDeployDialog"}),openUrl(STREAMLIT_DEPLOY_TUTORIAL_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})})})]})]})})}const StyledDialogBody=styled("div",{target:"e1gfztv20"})(({theme:n})=>({display:"grid",gap:n.spacing.twoXL,gridTemplateColumns:"1fr 1fr",margin:0,padding:0})),StyledFullRow=styled("div",{target:"e1gfztv21"})(({theme:n})=>({gridColumnStart:1,gridColumnEnd:-1,display:"grid",gap:n.spacing.xs})),StyledHeader=styled("h2",{target:"e1gfztv22"})(({theme:n})=>({paddingBottom:0,paddingTop:0,marginBottom:n.spacing.md,marginTop:"0",fontWeight:n.fontWeights.bold,fontSize:n.fontSizes.md,lineHeight:n.lineHeights.tight,color:n.colors.bodyText,display:"grid",gridAutoFlow:"row",gap:n.spacing.xs,"&:first-of-type":{marginTop:0}})),StyledLabel=styled("label",{target:"e1gfztv23"})(({theme:n})=>({paddingBottom:0,paddingTop:0,marginBottom:0,marginTop:0,lineHeight:n.lineHeights.tight,fontSize:n.fontSizes.sm})),StyledCheckbox=styled("input",{target:"e1gfztv26"})(({theme:n})=>({marginRight:n.spacing.xs,appearance:"none",border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,width:n.fontSizes.md,height:n.fontSizes.md,borderRadius:`min(${n.radii.md}, ${n.radii.maxCheckbox})`,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,verticalAlign:"middle",overflow:"hidden","&:focus-visible":{outline:`2px solid ${n.colors.primary}`},"&:checked":{backgroundColor:n.colors.primary,"&:after":{content:'"✓"',fontFamily:n.fonts.monospace,fontSize:n.fontSizes.md,color:n.colors.white,lineHeight:n.lineHeights.none}},"&:disabled":{backgroundColor:n.colors.darkenedBgMix15}})),StyledDeployErrorContent=styled("div",{target:"e1gfztv27"})(({theme:n})=>({"& > ul":{paddingLeft:n.spacing.twoXL}})),StyledErrorText=styled("div",{target:"e1gfztv28"})(({theme:n,hasCodeBelow:o})=>({...o&&{marginBottom:n.spacing.lg}})),SettingsDialog=reactExports.memo(function n({isServerConnected:o,onClose:e,onSave:t,settings:c,allowRunOnSave:p,animateModal:h,metricsMgr:y,sessionInfo:g}){const{activeTheme:$,availableThemes:E,setTheme:A}=reactExports.useContext(ThemeContext),N=reactExports.useRef(c),H=reactExports.useRef(!0),[Z,X]=reactExports.useState({...c}),be=reactExports.useCallback((Ie,Ne)=>{X(Fe=>({...Fe,[Ie]:Ne}))},[]);reactExports.useEffect(()=>{if(H.current){H.current=!1;return}N.current=Z,t(N.current)},[t,Z]);const we=reactExports.useCallback(Ie=>{be(Ie.target.name,Ie.target.checked)},[be]),$e=reactExports.useCallback(Ie=>{let Ne;Ie&&(Ne=E.find(Fe=>Fe.name.startsWith("Custom Theme")?Fe.displayName===Ie:Fe.name===Ie)),Ne===void 0&&(Ne=E[0]),y.enqueue("menuClick",{label:"changeTheme"}),A(Ne)},[A,y,E]),Ce=reactExports.useCallback(()=>E.map(Ie=>Ie.displayName??Ie.name),[E]);return jsxs(Modal,{animate:h,isOpen:!0,onClose:e,children:[jsx$1(ModalHeader,{children:"Settings"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogBody,{children:[p&&jsxs(StyledFullRow,{children:[jsx$1(StyledHeader,{children:"Development"}),jsxs("label",{children:[jsx$1(StyledCheckbox,{disabled:!o,type:"checkbox",name:"runOnSave",checked:Z.runOnSave&&o,onChange:we})," ","Run on save"]}),jsx$1(StreamlitMarkdown$1,{source:"Automatically updates the app when the underlying code is updated.",allowHTML:!1,isCaption:!0})]}),jsxs(StyledFullRow,{children:[jsx$1(StyledHeader,{children:"Appearance"}),jsxs("label",{children:[jsx$1(StyledCheckbox,{type:"checkbox",name:"wideMode",checked:Z.wideMode,onChange:we})," ","Wide mode"]}),jsx$1(StreamlitMarkdown$1,{source:" Turn on to make this app occupy the entire width of the screen.",allowHTML:!1,isCaption:!0})]}),!!E.length&&jsxs(StyledFullRow,{children:[jsx$1(StyledLabel,{children:"Choose app theme"}),jsx$1(UISelectbox,{options:Ce(),disabled:$.name===CUSTOM_THEME_NAME,onChange:$e,value:$.displayName??$.name,placeholder:"",acceptNewOptions:!1})]}),g.isSet&&jsx$1("div",{"data-testid":"stVersionInfo",children:jsx$1(StreamlitMarkdown$1,{source:`Made with Streamlit ${g.current.streamlitVersion}`,allowHTML:!1,isCaption:!0})})]})})]})});function StreamlitDialog(n){switch(n.type){case DialogType.ABOUT:return jsx$1(AboutDialog,{...n});case DialogType.CLEAR_CACHE:return jsx$1(ClearCacheDialog,{...n});case DialogType.SETTINGS:return jsx$1(SettingsDialog,{...n});case DialogType.SCRIPT_COMPILE_ERROR:return jsx$1(ScriptCompileErrorDialog,{...n});case DialogType.WARNING:case DialogType.CONNECTION_ERROR:return jsx$1(WarningDialog,{...n});case DialogType.DEPLOY_DIALOG:return jsx$1(DeployDialog,{...n});case DialogType.DEPLOY_ERROR:return jsx$1(DeployErrorDialog,{...n});case void 0:return noDialog(n);default:return typeNotRecognizedDialog(n)}}function AboutDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:"About"}),jsx$1(ModalBody$1,{children:n.aboutSectionMd&&jsx$1(StreamlitMarkdown$1,{source:n.aboutSectionMd,allowHTML:!1})})]})}function ClearCacheDialog(n){const e=["**Are you sure you want to clear the app's function caches?**","This will remove all cached entries from functions using","`@st.cache_data` and `@st.cache_resource`."].join(`
151
- `);return jsx$1("div",{"data-testid":"stClearCacheDialog",children:jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:"Clear caches"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitMarkdown$1,{source:e,allowHTML:!1})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:n.onClose,children:"Cancel"}),jsx$1(ModalButton,{autoFocus:!0,kind:BaseButtonKind.SECONDARY,onClick:n.confirmCallback,children:"Clear caches"})]})]})})}function ScriptCompileErrorDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,size:"auto",autoFocus:!1,children:[jsx$1(ModalHeader,{children:"Script execution error"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitErrorCodeBlock$1,{children:n.exception?.message?n.exception.message:"No message"})}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:n.onClose,children:"Close"})})]})}function WarningDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:n.title}),jsx$1(ModalBody$1,{children:n.msg})]})}function DeployErrorDialog({title:n,msg:o,onClose:e,onContinue:t,onTryAgain:c}){const p=()=>{e(),t&&t()};return jsxs(Modal,{isOpen:!0,onClose:e,children:[jsx$1(ModalHeader,{children:n}),jsx$1(ModalBody$1,{children:jsx$1(StyledDeployErrorContent,{children:o})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:c,children:"Try again"}),jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:p,children:t?"Continue anyway":"Close"})]})]})}function noDialog({onClose:n}){return jsx$1(Modal,{isOpen:!1,onClose:n})}function typeNotRecognizedDialog(n){return jsx$1(Modal,{isOpen:!0,onClose:n.onClose,children:jsx$1(ModalBody$1,{children:`Dialog type "${n.type}" not recognized.`})})}function parseLinks(n){const o=[];let e=0,t=0;const c=/\[([^\]]+)\]\(([^)]+)\)/g;let p;for(;(p=c.exec(n))!==null;)p.index>e&&o.push(jsx$1(reactExports.Fragment,{children:n.substring(e,p.index)},t++)),o.push(jsx$1("a",{href:p[2],target:"_blank",rel:"noopener noreferrer",children:p[1]},t++)),e=p.index+p[0].length;return e<n.length&&o.push(jsx$1(reactExports.Fragment,{children:n.substring(e)},t++)),o}function DialogErrorMessage({message:n,codeBlock:o}){return jsxs(Fragment,{children:[jsx$1(StyledErrorText,{hasCodeBelow:!!o,children:parseLinks(n)}),o&&jsx$1(StreamlitErrorCodeBlock$1,{children:o})]})}const DialogErrorMessage$1=reactExports.memo(DialogErrorMessage),StyledActionButtonContainer=styled("div",{target:"ekuhni80"})(({theme:n})=>({display:"flex",gap:n.spacing.sm,alignItems:"center",lineHeight:n.iconSizes.md})),StyledActionButtonIcon=styled("div",{target:"ekuhni81"})(({theme:n,icon:o})=>({background:`url("${o}") no-repeat center / contain`,width:n.iconSizes.base,height:n.iconSizes.base})),StyledToolbarActions=styled("div",{target:"ekuhni82"})({display:"flex",alignItems:"center",flexDirection:"row"});function ActionButton({label:n,icon:o,onClick:e}){return jsx$1("div",{className:"stToolbarActionButton","data-testid":"stToolbarActionButton",children:jsx$1(BaseButton,{onClick:e,kind:BaseButtonKind.HEADER_BUTTON,children:jsxs(StyledActionButtonContainer,{children:[o&&jsx$1(StyledActionButtonIcon,{"data-testid":"stToolbarActionButtonIcon",icon:o}),n&&jsx$1("span",{"data-testid":"stToolbarActionButtonLabel",children:n})]})})})}function ToolbarActions({sendMessageToHost:n,hostToolbarItems:o,metricsMgr:e}){return jsx$1(StyledToolbarActions,{className:"stToolbarActions","data-testid":"stToolbarActions",children:o.map(({key:t,label:c,icon:p})=>jsx$1(ActionButton,{label:c,icon:p,onClick:()=>{e.enqueue("menuClick",{label:t}),n({type:"TOOLBAR_ITEM_CALLBACK",key:t})}},t))})}const screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=styled("div",{target:"e1ejanx90"})(({theme:n})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:n.sizes.full,height:n.sizes.full,fontSize:"40vh",color:n.colors.redTextColor,fontWeight:n.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${n.colors.grayTextColor}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:n,endCallback:o})=>{const[e,t]=reactExports.useState(n);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const p=e-1;p>=0&&t(p),p===0&&o()},children:jsx$1("span",{children:e})},`frame${e}`)},StyledRecordAudioLabel=styled("label",{target:"ej964cx0"})({margin:0}),StyledInstruction=styled("p",{target:"ej964cx1"})({margin:0}),ScreencastDialog=({onClose:n,toggleRecordAudio:o,recordAudio:e,startRecording:t})=>{const[c,p]=reactExports.useState(e),h=reactExports.useCallback(g=>{const{checked:$}=g.target;$!==c&&(p($),o())},[c,o]),y=reactExports.useCallback(()=>{t(),n()},[t,n]);return jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsxs(ModalBody$1,{children:[jsx$1("p",{children:"This will record a video with the contents of your screen, so you can easily share what you're seeing with others."}),jsx$1("p",{children:jsxs(StyledRecordAudioLabel,{"data-testid":"stScreencastAudioCheckbox",children:[jsx$1("input",{type:"checkbox",name:"recordAudio",checked:c,onChange:h})," ","Also record audio"]})}),jsx$1(StyledInstruction,{"data-testid":"stScreencastInstruction",children:jsx$1(StreamlitMarkdown$1,{source:"Press `Esc` any time to stop recording.",allowHTML:!1})})]}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:y,children:"Start recording!"})})]})},StyledVideo=styled("video",{target:"e1hp04x70"})(({theme:n})=>({width:n.sizes.full,borderRadius:n.radii.md})),StyledDialogContainer=styled("div",{target:"e1hp04x71"})(({theme:n})=>({display:"flex",flexDirection:"column",width:n.sizes.full})),StyledRow=styled("div",{target:"e1hp04x72"})(({theme:n})=>({display:"flex",flexDirection:"row",paddingTop:n.spacing.md,paddingBottom:n.spacing.md})),StyledFirstColumn=styled("div",{target:"e1hp04x73"})(({theme:n})=>({paddingRight:n.spacing.lg,textAlign:"right",color:n.colors.grayTextColor,fontWeight:n.fontWeights.bold,width:"6em"})),StyledSecondColumn=styled("div",{target:"e1hp04x74"})(({theme:n})=>({flex:1,paddingRight:n.spacing.lg,marginRight:"6em",[`@media (max-width: ${n.breakpoints.sm})`]:{marginRight:n.spacing.none}})),StyledVideoFormatInstructions=styled("p",{target:"e1hp04x75"})(({theme:n})=>({marginTop:n.spacing.sm,marginBottom:n.spacing.none,fontSize:n.fontSizes.sm})),StyledDownloadButtonContainer=styled("div",{target:"e1hp04x76"})(({theme:n})=>({marginTop:n.spacing.twoXS})),VideoRecordedDialog=({onClose:n,videoBlob:o,fileName:e})=>{const t=URL.createObjectURL(o),c=()=>{const p=document.createElement("a");p.setAttribute("href",t),p.setAttribute("download",`${e}.webm`),p.click(),n()};return jsxs(Modal,{isOpen:!0,onClose:n,overrides:{Dialog:{style:{width:"80vw"}}},children:[jsx$1(ModalHeader,{children:"Next steps"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogContainer,{"data-testid":"stVideoRecordedDialog",children:[jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 1"}),jsxs(StyledSecondColumn,{children:[jsx$1("p",{children:"Preview your video below:"}),jsx$1(StyledVideo,{src:t,controls:!0})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 2"}),jsxs(StyledSecondColumn,{children:[jsx$1(StyledDownloadButtonContainer,{children:jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:c,children:"Save video to disk"})}),jsxs(StyledVideoFormatInstructions,{children:["This video is encoded in the"," ",jsx$1("a",{href:"https://www.webmproject.org/",children:"WebM format"}),", which is only supported by newer video players. You can also play it by dragging the file directly into your browser."]})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 3"}),jsxs(StyledSecondColumn,{children:["Share your video with the world on Twitter, LinkedIn, YouTube, or just plain email!"," ",jsx$1("span",{role:"img","aria-label":"Happy",children:"😀"})]})]})]})})]})},StyledScreenCastWarningDialog=styled("div",{target:"e1o5y2010"})({display:"flex"}),StyledUnsupportedScreenCastIcon=styled("div",{target:"e1o5y2011"})(({theme:n})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:n.spacing.twoXL,marginLeft:n.spacing.sm,fontSize:n.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=styled("p",{target:"e1o5y2012"})(({theme:n})=>({margin:n.spacing.none})),UnsupportedBrowserDialog=({onClose:n})=>jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsx$1(ModalBody$1,{children:jsxs(StyledScreenCastWarningDialog,{"data-testid":"stUnsupportedBrowserDialog",children:[jsx$1(StyledUnsupportedScreenCastIcon,{children:jsx$1("span",{role:"img","aria-label":"Alien Monster",children:"👾"})}),jsx$1(StyledUnsupportedScreenCastExplanation,{children:"Due to limitations with some browsers, this feature is only supported on recent desktop versions of Chrome, Firefox, and Edge."})]})})]}),UnsupportedBrowserDialog$1=reactExports.memo(UnsupportedBrowserDialog),LOG$2=loglevelExports.getLogger("withScreencast");function withScreencast(n){const o=e=>{const{testOverride:t}=e,c=reactExports.useRef(null),[p,h]=reactExports.useState("streamlit-screencast"),[y,g]=reactExports.useState(!1),[$,E]=reactExports.useState(void 0),[A,N]=reactExports.useState(t||"OFF"),H=reactExports.useCallback(()=>{g(Ie=>!Ie)},[]),Z=reactExports.useCallback(async()=>{if(!(A==="OFF"||isNullOrUndefined(c.current))){if(A==="COUNTDOWN"){N("OFF");return}if(A==="RECORDING"){const Ie=c.current;if(!Ie||Ie.getState()==="inactive")N("OFF");else{const Ne=await Ie.stop();E(Ne),N("PREVIEW_FILE")}}}},[A]),X=reactExports.useCallback(async()=>{if(!ScreenCastRecorder.isSupportedBrowser()){N("UNSUPPORTED");return}c.current=new ScreenCastRecorder({recordAudio:y,onErrorOrStop:()=>{Z().catch(Ie=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Ie}`))}});try{await c.current.initialize()}catch(Ie){LOG$2.warn(`ScreenCastRecorder.initialize error: ${Ie}`),N("UNSUPPORTED");return}N("COUNTDOWN")},[y,Z]),be=reactExports.useCallback(Ie=>{if(!ScreenCastRecorder.isSupportedBrowser()){N("UNSUPPORTED");return}if(A==="OFF"){h(Ie),N("SETUP");return}Z().catch(Ne=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Ne}`))},[A,Z]),we=reactExports.useCallback(()=>{if(isNullOrUndefined(c.current))throw new Error("Countdown finished but recorder is null");c.current.start()?N("RECORDING"):Z().catch(Ne=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Ne}`))},[Z]),$e=reactExports.useCallback(()=>{N("OFF")},[]);return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(n,{...e,screenCast:{currentState:A,toggleRecordAudio:H,startRecording:be,stopRecording:Z}}),A==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:$e}),A==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:y,onClose:$e,startRecording:X,toggleRecordAudio:H}),A==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:we}),A==="PREVIEW_FILE"&&$&&jsx$1(VideoRecordedDialog,{onClose:$e,videoBlob:$,fileName:p})]})};return o.displayName=`withScreencast(${n.displayName||n.name||"Component"})`,hoistNonReactStatics(o,n)}const useViewportSize=()=>{const{activeTheme:n}=reactExports.useContext(ThemeContext),{innerWidth:o}=useWindowDimensionsContext(),e=parseInt(n.emotion.breakpoints.md,10);return{isMobile:o<e}},DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json",LOG$1=loglevelExports.getLogger("MetricsManager");class MetricsManager{constructor(o){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=e=>{this.appHash=e},this.setMetricsConfig=(e="")=>{this.metricsUrl=e},this.sessionInfo=o}async initialize({gatherUsageStats:o,sendMessageToHost:e}){this.sendMessageToHost=e,this.actuallySendMetrics=o&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(LOG$1.error("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),LOG$1.info("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(o,e={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([o,e]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(o,e))}setMetadata(o){this.metadata=o}async requestDefaultMetricsConfig(){const o=localStorageAvailable();if(o){const e=window.localStorage.getItem("stMetricsConfig");if(e){this.metricsUrl=e;return}}try{const e=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!e.ok)this.metricsUrl=void 0,LOG$1.error("Failed to fetch metrics config: ",e.status);else{const t=await e.json();this.metricsUrl=t.url??void 0,o&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(e){LOG$1.error("Failed to fetch metrics config:",e)}}send(o,e={}){const t=this.buildEventProto(o,e);this.metricsUrl==="postMessage"?this.postMessageEvent(o,t):this.track(t)}sendPendingEvents(){this.pendingEvents.forEach(([o,e])=>{this.send(o,e)}),this.pendingEvents=[]}async track(o){const e=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o.toJSON())});await fetch(e)}postMessageEvent(o,e){this.sendMessageToHost({type:"METRICS_EVENT",eventName:o,data:e})}buildEventProto(o,e){const t=new MetricsEvent({event:o,anonymousId:this.anonymousId,...this.getHostTrackingData(),...this.getInstallationData(),reportHash:this.appHash,dev:IS_DEV_ENV,source:"browser",streamlitVersion:this.sessionInfo.current.streamlitVersion,isHello:this.sessionInfo.isHello,appId:this.sessionInfo.current.appId,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,serverOs:this.sessionInfo.current.serverOS,hasDisplay:this.sessionInfo.current.hasDisplay,isWebdriver:isWebdriver(),...this.getContextData()});if(o==="menuClick")t.label=e.label;else if(o==="pageProfile")return new MetricsEvent({...t,...e});return t}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3,machineIdV4:this.sessionInfo.current.installationIdV4}}getHostTrackingData(){return this.metadata?pick$1(this.metadata,["hostedAt","owner","repo","branch","mainModule","creatorId"]):{}}getContextData(){return{contextPageUrl:window.location.href,contextPageTitle:document.title,contextPagePath:window.location.pathname,contextPageReferrer:document.referrer,contextPageSearch:window.location.search,contextLocale:window.navigator.language,contextUserAgent:window.navigator.userAgent}}getAnonymousId(){if(!this.actuallySendMetrics)return;const o="ajs_anonymous_id",e=localStorageAvailable(),t=getCookie(o),c=e?window.localStorage.getItem(o):null,p=new Date;if(p.setFullYear(new Date().getFullYear()+1),t)this.anonymousId=t,e&&window.localStorage.setItem(o,t);else if(c){try{this.anonymousId=JSON.parse(c)}catch{this.anonymousId=c}setCookie(o,this.anonymousId,p)}else this.anonymousId=v4(),setCookie(o,this.anonymousId,p),e&&window.localStorage.setItem(o,this.anonymousId)}}function isWebdriver(){return window.navigator?.webdriver??!1}class SessionEventDispatcher{constructor(){this.onSessionEvent=new distExports.Signal}handleSessionEventMsg(o){this.onSessionEvent.emit(o)}}const StyledApp=styled("div",{target:"ee4bbma0"})(({theme:n})=>{const o=hasLightBackgroundColor(n);return{position:"absolute",background:n.colors.bgColor,color:n.colors.bodyText,top:n.spacing.none,left:n.spacing.none,right:n.spacing.none,bottom:n.spacing.none,colorScheme:o?"light":"dark",overflow:"hidden","@media print":{float:"none",height:n.sizes.full,position:"static",overflow:"visible"}}});function getBrowserInfo(){const o=new UAParser().getResult();return{browserName:o.browser.name||"Unknown",browserVersion:o.browser.version||"Unknown",deviceType:o.device.type||"desktop",os:o.os.name||"Unknown"}}const showDevelopmentOptions=(n,o)=>o==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==o||Config.ToolbarMode.MINIMAL==o?!1:n||isLocalhost();function getTitle(n){return n||"Streamlit"}class AppNavigation{constructor(o,e,t,c){this.hostCommunicationMgr=o,this.onUpdatePageUrl=e,this.onPageNotFound=t,this.onPageIconChange=c,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.hasSetDefaultFavicon=!1,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(o){return this.mainScriptHash!==o.mainScriptHash&&(this.isPageTitleSet=!1,this.isPageIconSet=!1,this.hasSetDefaultFavicon=!1),this.mainScriptHash=o.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=o.config?.hideSidebarNav??null),document.title=getTitle(""),[{currentPageScriptHash:o.pageScriptHash,hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handleNavigation(o){const{sections:e,position:t,appPages:c}=o;this.appPages=c,this.hideSidebarNav=t===Navigation.Position.HIDDEN;const p=o.pageScriptHash,h=c.find($=>$.pageScriptHash===p),y=c.find($=>$.isDefault);this.mainPage=y;const g=h.urlPathname;if(!this.isPageTitleSet){const $=getTitle(h.pageName);document.title=$,this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:h.pageName??""})}return!this.isPageIconSet&&h.icon&&this.onPageIconChange(h.icon),this.onUpdatePageUrl(y.urlPathname??"",g,h.isDefault??!1),[{appPages:c,navSections:e,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:o.expanded,currentPageScriptHash:p},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:c}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:h.isDefault?"":g,currentPageScriptHash:p})}]}handlePageNotFound(o){return this.onPageNotFound(o),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}findPageByUrlPath(o){return this.appPages.find(e=>o.endsWith("/"+e.urlPathname))??this.mainPage}handlePageConfigChanged(o){o.favicon&&(this.isPageIconSet=!0),o.title&&(this.isPageTitleSet=!0)}clearPageElements(o,e){return o.filterMainScriptElements(e)}}var define_PACKAGE_METADATA_default={version:"1.52.0"};const INITIAL_SCRIPT_RUN_ID="<null>",LOG=loglevelExports.getLogger("App");class App extends reactExports.PureComponent{constructor(o){super(o),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.deferredFileListeners=new Map,this.isInitializingConnectionManager=!0,this.hasReceivedNewSession=!1,this.showDeployError=(t,c,p)=>{const h={type:DialogType.DEPLOY_ERROR,title:t,msg:c,onContinue:p,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg};this.openDialog(h)},this.handleThemeMessage=(t,c)=>{const[,p,h]=createPresetThemes(),y=isPresetTheme(this.props.theme.activeTheme);t===p.name&&y?this.props.theme.setTheme(p):t===h.name&&y?this.props.theme.setTheme(h):c&&this.props.theme.setImportedTheme(c)},this.handleConnectionStateChanged=t=>{if(LOG.info(`Connection state changed from ${this.state.connectionState} to ${t}`),t===ConnectionState.CONNECTED){LOG.info("Reconnected to server."),this.state.connectionErrorDismissed&&this.setState({connectionErrorDismissed:!1});const c=this.state.scriptRunState===ScriptRunState.RUNNING,p=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED;!this.sessionInfo.last||c||p||this.state.fragmentIdsThisRun.length>0||this.state.autoReruns.length>0?(LOG.info("Requesting a script run."),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})):this.state.dialog?.type===DialogType.CONNECTION_ERROR&&this.setState({dialog:null}),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:t!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.disconnect();this.isInitializingConnectionManager?this.setState({connectionState:t}):reactDomExports.flushSync(()=>{this.setState({connectionState:t})})},this.handleGitInfoChanged=t=>{this.setState({gitInfo:t})},this.handleCustomParentMessage=t=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:t.message}):LOG.error("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=t=>{const c=(p,h,y)=>{const g=p[h];if(g in y)return y[g](p[g]);throw new Error(`Cannot handle ${h} "${g}".`)};try{c(t,"type",{newSession:p=>this.handleNewSession(p),sessionStatusChanged:p=>this.handleSessionStatusChanged(p),sessionEvent:p=>this.handleSessionEvent(p),delta:p=>this.handleDeltaMsg(p,t.metadata),pageConfigChanged:p=>this.handlePageConfigChanged(p),pageInfoChanged:p=>this.handlePageInfoChanged(p),pagesChanged:p=>{},pageNotFound:p=>this.handlePageNotFound(p),gitInfoChanged:p=>this.handleGitInfoChanged(p),scriptFinished:p=>this.handleScriptFinished(p),pageProfile:p=>this.handlePageProfileMsg(p),autoRerun:p=>this.handleAutoRerun(p),fileUrlsResponse:p=>this.uploadClient.onFileURLsResponse(p),deferredFileResponse:p=>this.handleDeferredFileResponse(p),parentMessage:p=>this.handleCustomParentMessage(p),logo:p=>this.handleLogo(p,t.metadata),navigation:p=>this.handleNavigation(p),authRedirect:p=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:p.url}):window.location.href=p.url}})}catch(p){const h=ensureError(p);LOG.error(h),this.showError("Bad message format",{message:h.message})}},this.handleLogo=(t,c)=>{this.setState(p=>({elements:p.elements.appRootWithLogo(t,{activeScriptHash:c.activeScriptHash,scriptRunId:p.scriptRunId})}))},this.handlePageConfigChanged=t=>{const{title:c,favicon:p,layout:h,initialSidebarState:y,menuItems:g}=t;this.appNavigation.handlePageConfigChanged(t),c&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:c}),document.title=c),p&&this.onPageIconChanged(p),h!==this.state.layout&&h!==PageConfig.Layout.LAYOUT_UNSET&&this.setState($=>({layout:h,userSettings:{...$.userSettings,wideMode:h===PageConfig.Layout.WIDE}})),y!==this.state.initialSidebarState&&y!==PageConfig.SidebarState.SIDEBAR_UNSET&&this.setState(()=>({initialSidebarState:y})),g&&this.setState($=>(g.clearAboutMd&&(g.aboutSectionMd=""),{menuItems:{...$.menuItems,...g}}))},this.handlePageInfoChanged=t=>{const{queryString:c}=t,p=document.location.pathname+(c?`?${c}`:"");window.history.pushState({},"",p),this.setState({queryParams:c}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:c?`?${c}`:""})},this.onPageNotFound=t=>{const c=t?`You have requested page /${t}, but no corresponding file was found in the app's pages/ directory`:"The page that you have requested does not seem to exist";this.showError("Page not found",{message:`${c}. Running the app's main page.`})},this.handlePageNotFound=t=>{const{pageName:c}=t;this.maybeSetState(this.appNavigation.handlePageNotFound(c))},this.onPageIconChanged=t=>{handleFavicon(t,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handleNavigation=t=>{this.setState({navigationPosition:t.position}),this.maybeSetState(this.appNavigation.handleNavigation(t))},this.handlePageProfileMsg=t=>{const c=PageProfile.toObject(t),p=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...c,isFragmentRun:!!c.isFragmentRun,numPages:this.state.appPages?.length,pageScriptHash:this.state.currentPageScriptHash,activeTheme:this.props.theme?.activeTheme?.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:p})},this.handleAutoRerun=t=>{const c=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(t.fragmentId,!0)},t.interval*1e3);this.setState(p=>({autoReruns:[...p.autoReruns,c]}))},this.handleSessionStatusChanged=t=>{this.setState(c=>{let{scriptRunState:p}=c,{dialog:h}=c;return t.scriptIsRunning&&c.scriptRunState!==ScriptRunState.STOP_REQUESTED?(p=ScriptRunState.RUNNING,notNullOrUndefined(h)&&h.type===DialogType.SCRIPT_COMPILE_ERROR&&(h=void 0)):!t.scriptIsRunning&&c.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&c.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(p=ScriptRunState.NOT_RUNNING),{userSettings:{...c.userSettings,runOnSave:!!t.runOnSave},dialog:h,scriptRunState:p,scriptChangedOnDisk:t.scriptIsRunning?!1:c.scriptChangedOnDisk}})},this.handleSessionEvent=t=>{if(this.sessionEventDispatcher.handleSessionEventMsg(t),t.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const c={type:DialogType.SCRIPT_COMPILE_ERROR,exception:t.scriptCompilationException,onClose:()=>{}};this.maybeShowErrorDialog(c,t.scriptCompilationException?.message??"No message")}else t.type==="scriptChangedOnDisk"&&this.setState({scriptChangedOnDisk:!0})},this.maybeUpdatePageUrl=(t,c,p)=>{const h=this.getBaseUriParts();if(h){let y;window.__streamlit?.MAIN_PAGE_BASE_URL?y=parseUriIntoBaseParts(window.__streamlit.MAIN_PAGE_BASE_URL).pathname:y=h.pathname;const g=extractPageNameFromPathName(document.location.pathname,y);if((g===""?t:g)!==c){const E=p?"":c,A=this.state.queryParams||preserveEmbedQueryParams(),N=A?`?${A}`:"",Z=`${y==="/"?"":y}/${E}${N}`;window.history.pushState({},"",Z)}}},this.handleNewSession=t=>{const c=t.initialize;if(this.hasStreamlitVersionChanged(c)){window.location.reload();return}this.hasReceivedNewSession=!0,(!this.sessionInfo.isSet||!this.sessionInfo.current.isConnected)&&this.handleInitialization(t);const{appHash:p,currentPageScriptHash:h}=this.state,{scriptRunId:y,name:g,mainScriptPath:$,fragmentIdsThisRun:E,pageScriptHash:A,mainScriptHash:N}=t;if(E.length)this.setState({fragmentIdsThisRun:E,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Z=t.config,X=t.customTheme;this.processThemeInput(X),this.setState({allowRunOnSave:Z.allowRunOnSave,hideTopBar:Z.hideTopBar,toolbarMode:Z.toolbarMode,latestRunTime:performance.now(),mainScriptHash:N,fragmentIdsThisRun:E}),this.maybeSetState(this.appNavigation.handleNewSession(t)),!this.appNavigation.hasSetDefaultFavicon&&!this.appNavigation.isPageIconSet&&(this.appNavigation.hasSetDefaultFavicon=!0,this.onPageIconChanged("./favicon.png"))}const H=hashString(this.sessionInfo.current.installationId+$);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(H),this.metricsMgr.enqueue("updateReport"),p===H&&h===A?this.setState({scriptRunId:y}):this.clearAppState(H,y,g,N)},this.handleInitialization=t=>{const c=t.initialize,p=t.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(t)),this.metricsMgr.initialize({gatherUsageStats:p.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(c.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:t}=this.state,c=this.appNavigation.findPageByUrlPath(document.location.pathname),p=document.location.toString().includes("#"),h=c?.pageScriptHash===t;isNullOrUndefined(c)||p&&h||this.onPageChange(c.pageScriptHash,void 0,!0)},this.setAndSendTheme=t=>{this.props.theme.setTheme(t),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(t.emotion)})},this.createThemeHash=t=>t?hashString(JSON.stringify(t,Object.keys(t).sort())):"hash_for_undefined_custom_theme",this.closeDialog=()=>{this.state.dialog?.type===DialogType.CONNECTION_ERROR?this.setState({dialog:void 0,connectionErrorDismissed:!0}):this.setState({dialog:void 0})},this.saveSettings=t=>{const{runOnSave:c}=this.state.userSettings,{runOnSave:p}=t;if(this.setState({userSettings:t}),c!==p&&this.isServerConnected()){const h=new BackMsg({setRunOnSave:p});h.type="setRunOnSave",this.sendBackMsg(h)}},this.handleDeltaMsg=(t,c)=>{this.setState(p=>({elements:p.elements.applyDelta(p.scriptRunId,t,c)}))},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const t=new BackMsg({debugShutdownRuntime:!0});t.type="debugShutdownRuntime",this.sendBackMsg(t)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const t=new BackMsg({debugDisconnectWebsocket:!0});t.type="debugDisconnectWebsocket",this.sendBackMsg(t)}},this.debugClearForwardMsgCache=()=>{isLocalhost()&&this.connectionManager?.websocketConnection?.cache.messages.clear()},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(t=>{clearInterval(t)}),this.setState({autoReruns:[]})},this.rerunScript=(t=!1)=>{if(this.closeDialog(),!this.isServerConnected()){LOG.error("Cannot rerun script when disconnected from server.");return}this.state.scriptRunState===ScriptRunState.RUNNING||this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),t===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){LOG.error("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=(t,c,p)=>{const{elements:h,mainScriptHash:y}=this.state;this.cleanupAutoReruns();const g=this.appNavigation.clearPageElements(h,y),$=new Set(Array.from(g.getElements()).map(E=>getElementId(E)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates($),void 0,t,void 0,c,p)},this.isAppInReadyState=t=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&t.scriptRunState===ScriptRunState.RUNNING&&t.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(t,c,p,h,y,g)=>{const $=this.getBaseUriParts();if(!$){LOG.error("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:E}=this.state;let A=y??this.getQueryString(),N="";const H={timezone:getTimezone$1(),timezoneOffset:getTimezoneOffset(),locale:getLocaleLanguage(),url:getUrl(),isEmbedded:isEmbed(),colorScheme:this.getThemeColorScheme()};if(p){if(p!==E&&!g){const X=preserveEmbedQueryParams();A=getQueryString(y,X),this.setState({queryParams:A}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:A})}}else if(E)p=E;else{let X;window.__streamlit?.MAIN_PAGE_BASE_URL?X=parseUriIntoBaseParts(window.__streamlit.MAIN_PAGE_BASE_URL).pathname:X=$.pathname,N=extractPageNameFromPathName(document.location.pathname,X),p=""}const Z=this.connectionManager?.getCachedMessageHashes()??[];this.sendBackMsg(new BackMsg({rerunScript:{queryString:A,widgetStates:t,pageScriptHash:p,pageName:N,fragmentId:c,isAutoRerun:h,cachedMessageHashes:Z,contextInfo:H}})),this.hasReceivedNewSession=!1},this.stopScript=()=>{if(!this.isServerConnected()){LOG.error("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const t=new BackMsg({stopScript:!0});t.type="stopScript",this.sendBackMsg(t),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const t={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(t)}else LOG.error("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{const t={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:this.state.dialog?.type===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr,gitInfo:this.state.gitInfo};this.openDialog(t)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const t=new BackMsg({clearCache:!0});t.type="clearCache",this.sendBackMsg(t)}else LOG.error("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const t=new BackMsg({appHeartbeat:!0});t.type="appHeartbeat",this.sendBackMsg(t)}else LOG.error("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=t=>{this.connectionManager?(LOG.info(t),this.connectionManager.sendMessage(t)):LOG.error(`Not connected. Cannot send back message: ${t}`)},this.handleConnectionError=t=>{this.state.connectionErrorDismissed||this.showError("Connection error",t,DialogType.CONNECTION_ERROR)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(t=!0)=>{const c={type:DialogType.SETTINGS,sessionInfo:this.sessionInfo,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},animateModal:t,metricsMgr:this.metricsMgr};this.openDialog(c)},this.aboutCallback=()=>{const{menuItems:t}=this.state,c={type:DialogType.ABOUT,onClose:this.closeDialog,aboutSectionMd:t?.aboutSectionMd};this.openDialog(c)},this.printCallback=()=>{const{scriptRunState:t}=this.state;if(t!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let c;try{const p=getIFrameEnclosingApp(this.embeddingId);p?.contentWindow?c=p.contentWindow.window:c=window}catch{c=window}finally{c||(c=window),c.print()}},this.screencastCallback=()=>{const{scriptName:t}=this.state,{startRecording:c}=this.props.screenCast,p=getScreencastTimestamp();c(`streamlit-${t}-${p}`)},this.handleFullScreen=t=>{this.setState({isFullScreen:t})},this.setLibConfig=t=>{this.setState({libConfig:t})},this.setAppConfig=t=>{this.setState({appConfig:t})},this.addScriptFinishedHandler=t=>{this.setState((c,p)=>({scriptFinishedHandlers:c.scriptFinishedHandlers.concat(t)}))},this.removeScriptFinishedHandler=t=>{this.setState((c,p)=>({scriptFinishedHandlers:c.scriptFinishedHandlers.filter(h=>h!==t)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:t}=this.state,c=t&&t.length>0?t:document.location.search;return c.startsWith("?")?c.substring(1):c},this.getThemeColorScheme=()=>{const{activeTheme:t}=this.props.theme;return hasLightBackgroundColor(t.emotion)?"light":"dark"},this.isInCloudEnvironment=()=>{const{hostMenuItems:t}=this.state;return t&&t?.length>0},this.showDeployButton=()=>showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&!this.isInCloudEnvironment()&&this.sessionInfo.isSet&&!this.sessionInfo.isHello,this.deployButtonClicked=()=>{this.metricsMgr.enqueue("menuClick",{label:"deployButtonInApp"}),this.sendLoadGitInfoBackMsg(),this.openDeployDialog()},this.requestFileURLs=(t,c)=>{const p=this.isServerConnected(),h=this.sessionInfo.isSet;if(p&&h){const y=new BackMsg({fileUrlsRequest:{requestId:t,fileNames:c.map(g=>g.name),sessionId:this.sessionInfo.current.sessionId}});y.type="fileUrlsRequest",this.sendBackMsg(y)}else LOG.warn(`Cannot request file URLs (isServerConnected: ${p}, isSessionInfoSet: ${h})`),this.uploadClient.onFileURLsResponse({responseId:t,errorMsg:"Connection lost. Please wait for the app to reconnect, then try again."})},this.requestDeferredFile=t=>{const c=this.isServerConnected(),p=this.sessionInfo.isSet;if(!c||!p)return Promise.reject(new Error("Not connected to server or session not initialized"));const h=Promise.withResolvers(),y=this.deferredFileListeners.get(t)??new Set,g=E=>{y.delete(g),h.resolve(E)};y.add(g),this.deferredFileListeners.set(t,y);const $=new BackMsg({deferredFileRequest:{fileId:t,sessionId:this.sessionInfo.current.sessionId}});return $.type="deferredFileRequest",this.sendBackMsg($),h.promise},this.handleDeferredFileResponse=t=>{const c=this.deferredFileListeners.get(t.fileId);if(!(!c||c.size===0)){for(const p of Array.from(c))try{p(t)}catch{}this.deferredFileListeners.delete(t.fileId)}},this.handleKeyDown=t=>{switch(t){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=t=>{t==="esc"&&this.props.screenCast.stopRecording()},this.hasAppDefinedMenuItems=()=>{const{menuItems:t}=this.state;return!!(t?.aboutSectionMd||t?.getHelpUrl&&!t?.hideGetHelp||t?.reportABugUrl&&!t?.hideReportABug)},this.shouldShowToolbar=(t,c)=>{const p=!isEmbed()||isToolbarDisplayed();let h;return this.state.toolbarMode===Config.ToolbarMode.MINIMAL?h=t.length>0||c.length>0||this.hasAppDefinedMenuItems():h=!0,p&&h},ensureHotkeysFilterConfigured(),enablePatches(),enableMapSet();let e=this.createThemeHash();isPresetTheme(o.theme.activeTheme)||(e=this.createThemeHash(toThemeInput(o.theme.activeTheme.emotion))),this.state={connectionState:ConnectionState.INITIAL,elements:AppRoot.empty("",!0),isFullScreen:!1,scriptName:"",scriptRunId:INITIAL_SCRIPT_RUN_ID,appHash:null,scriptRunState:ScriptRunState.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},connectionErrorDismissed:!1,layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:e,gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:Config.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:"",queryParams:"",deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1,navigationPosition:Navigation.Position.SIDEBAR,scriptChangedOnDisk:!1},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:t=>this.setState({formsData:t})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:o.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:t=>{this.setState({inputsDisabled:t})},themeChanged:this.handleThemeMessage,pageChanged:t=>this.onPageChange(t),isOwnerChanged:t=>this.setState({isOwner:t}),fileUploadClientConfigChanged:t=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(t)},hostMenuItemsChanged:t=>{this.setState({hostMenuItems:t})},hostToolbarItemsChanged:t=>{this.setState({hostToolbarItems:t})},hostHideSidebarNavChanged:t=>{this.setState({hostHideSidebarNav:t})},sidebarChevronDownshiftChanged:t=>{this.setState({sidebarChevronDownshift:t})},pageLinkBaseUrlChanged:t=>{this.setState({pageLinkBaseUrl:t})},queryParamsChanged:t=>{this.setState({queryParams:t})},deployedAppMetadataChanged:t=>{this.setState({deployedAppMetadata:t})},restartWebsocketConnection:()=>{this.connectionManager||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),this.initializeConnectionManager())},terminateWebsocketConnection:()=>{this.connectionManager?.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0,sendClientError:(t,c,p,h,y)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:t,error:c,message:p,source:h,customComponentName:y})}}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:t=>this.widgetMgr.setFormsWithUploadsInProgress(t),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}initializeConnectionManager(){this.isInitializingConnectionManager=!0,this.connectionManager=new ConnectionManager({getLastSessionId:()=>this.sessionInfo.last?.sessionId,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,sendClientError:(o,e,t)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:"Websocket Connection",error:o,message:e,source:t})},onHostConfigResp:o=>{const{allowedOrigins:e,useExternalAuthToken:t,disableFullscreenMode:c,enableCustomParentMessages:p,mapboxToken:h,enforceDownloadInNewTab:y,metricsUrl:g,blockErrorDialogs:$,setAnonymousCrossOriginPropertyOnMediaElements:E,resourceCrossOriginMode:A}=o,N={allowedOrigins:e,useExternalAuthToken:t,enableCustomParentMessages:p,blockErrorDialogs:$},H={mapboxToken:h,disableFullscreenMode:c,enforceDownloadInNewTab:y,resourceCrossOriginMode:A??E?"anonymous":void 0};this.metricsMgr.setMetricsConfig(g),this.hostCommunicationMgr.setAllowedOrigins(N),this.setAppConfig(N),this.setLibConfig(H)}}),this.isInitializingConnectionManager=!1}componentDidMount(){this.initializeConnectionManager(),mark(this.state.scriptRunState),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),isScrollingHidden()&&document.body.classList.add("embedded"),isInChildFrame()&&(window.iFrameResizer={heightCalculationMethod:()=>{const o=document.querySelectorAll("[data-iframe-height]"),e=Array.from(o).map(t=>Math.ceil(t.getBoundingClientRect().bottom));return Math.max(0,...e)}},__vitePreload(()=>import("./iframeResizer.contentWindow.ZVXpMPi0.js").then(o=>o.i),[],import.meta.url)),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(this.props.theme.activeTheme.emotion)}),this.metricsMgr.enqueue("viewReport"),window.addEventListener("popstate",this.onHistoryChange,!1)}componentDidUpdate(o,e){if(window.prerenderReady===!1&&this.isAppInReadyState(e)&&(window.prerenderReady=!0),this.state.scriptRunState!==e.scriptRunState){if(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING)try{measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING)}catch{}this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState})}}componentWillUnmount(){this.connectionManager?.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}maybeShowErrorDialog(o,e){const{blockErrorDialogs:t}=this.state.appConfig;t||this.openDialog(o);const p=o.type===DialogType.SCRIPT_COMPILE_ERROR?o.type:o.title;this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR_DIALOG",error:p,message:e})}showError(o,e,t=DialogType.WARNING){LOG.error(e.message);const c={type:t,title:o,msg:jsx$1(DialogErrorMessage$1,{message:e.message,codeBlock:e.codeBlock}),onClose:()=>{}};this.maybeShowErrorDialog(c,e.message)}hasStreamlitVersionChanged(o){let e;if(window.__streamlit?.ENABLE_RELOAD_BASED_ON_HARDCODED_STREAMLIT_VERSION===!0?e=define_PACKAGE_METADATA_default.version:this.sessionInfo.isSet&&(e=this.sessionInfo.current.streamlitVersion),e){const{environmentInfo:t}=o;if(notNullOrUndefined(t)&&notNullOrUndefined(t.streamlitVersion))return e!=t.streamlitVersion}return!1}maybeSetState(o){if(o){const[e,t]=o;this.setState(e,t)}}processThemeInput(o){const e=this.createThemeHash(o);if(e===this.state.themeHash)return;this.setState({themeHash:e});const t=!isPresetTheme(this.props.theme.activeTheme);if(o){const c=createCustomThemes(o);if(this.props.theme.addThemes(c,{keepPresetThemes:!1}),getCachedTheme()===null||t)if(c.length>1){const h=c.findIndex(y=>y.name===CUSTOM_THEME_AUTO_NAME);this.setAndSendTheme(c[h])}else this.setAndSendTheme(c[0])}else this.props.theme.addThemes([]),t&&this.setAndSendTheme(getHostSpecifiedTheme());(o?.fontFaces&&o.fontFaces.length>0||o?.fontSources&&o.fontSources.length>0)&&this.props.theme.setFonts(o)}handleScriptFinished(o){(o===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||o===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||o===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&(Promise.resolve().then(()=>{this.state.scriptFinishedHandlers.forEach(e=>e())}),(o===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||o===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&this.setState(({scriptRunId:e,fragmentIdsThisRun:t,elements:c})=>({elements:c.clearStaleNodes(e,t)}),()=>{const e=new Set(Array.from(this.state.elements.getElements()).map(t=>getElementId(t)).filter(notUndefined));this.widgetMgr.removeInactive(e)}),this.connectionManager!==null&&o!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.hasReceivedNewSession&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge,this.state.fragmentIdsThisRun))}clearAppState(o,e,t,c){this.setState(p=>{const h=this.appNavigation.clearPageElements(p.elements,c);return{scriptRunId:e,scriptName:t,appHash:o,elements:h}},()=>{const p=new Set(Array.from(this.state.elements.getElements()).map(h=>getElementId(h)).filter(notUndefined));this.widgetMgr.removeInactive(p)})}openDialog(o){this.setState({dialog:o})}render(){const{allowRunOnSave:o,connectionState:e,dialog:t,elements:c,initialSidebarState:p,menuItems:h,isFullScreen:y,scriptRunId:g,scriptRunState:$,userSettings:E,hideTopBar:A,hideSidebarNav:N,expandSidebarNav:H,currentPageScriptHash:Z,hostHideSidebarNav:X,pageLinkBaseUrl:be,sidebarChevronDownshift:we,hostMenuItems:$e,hostToolbarItems:Ce,libConfig:Ie,inputsDisabled:Ne,appPages:Fe,navSections:Be,navigationPosition:Ge,scriptChangedOnDisk:je}=this.state,De=this.props.isMobileViewport?Navigation.Position.SIDEBAR:Ge,Ue=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),Je=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":E.wideMode}),Xe=t?StreamlitDialog({...t,onClose:this.closeDialog}):null,Ke=this.shouldShowToolbar($e,Ce),ze=!isEmbed()||isPaddingDisplayed(),nt=isScrollingHidden();return jsx$1(StreamlitContextProvider$1,{initialSidebarState:p,pageLinkBaseUrl:be,currentPageScriptHash:Z,onPageChange:this.onPageChange,navSections:Be,appPages:Fe,appLogo:c.logo,sidebarChevronDownshift:we,expandSidebarNav:H,hideSidebarNav:N||X,isFullScreen:y,setFullScreen:this.handleFullScreen,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language,formsData:this.state.formsData,scriptRunState:$,scriptRunId:g,mapboxToken:Ie.mapboxToken,enforceDownloadInNewTab:Ie.enforceDownloadInNewTab,resourceCrossOriginMode:Ie.resourceCrossOriginMode,requestDeferredFile:this.requestDeferredFile,children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:Je,"data-testid":"stApp","data-test-script-state":g==INITIAL_SCRIPT_RUN_ID?"initial":$,"data-test-connection-state":e,children:[jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:c,widgetMgr:this.widgetMgr,uploadClient:this.uploadClient,navigationPosition:De,wideMode:E.wideMode,embedded:isEmbed(),showPadding:ze,disableScrolling:nt,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,widgetsDisabled:Ne||e!==ConnectionState.CONNECTED,showToolbar:Ke,disableFullscreenMode:Ie.disableFullscreenMode,componentRegistry:this.componentRegistry,topRightContent:jsxs(Fragment,{children:[!A&&jsx$1(StatusWidget,{connectionState:e,scriptRunState:$,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:o,showScriptChangedActions:je}),!A&&jsx$1(ToolbarActions,{hostToolbarItems:Ce,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr}),this.showDeployButton()&&!je&&jsx$1(DeployButton,{onClick:this.deployButtonClicked}),!A&&jsx$1(MainMenu$1,{isServerConnected:this.isServerConnected(),quickRerunCallback:this.rerunScript,clearCacheCallback:this.openClearCacheDialog,settingsCallback:this.settingsCallback,aboutCallback:this.aboutCallback,printCallback:this.printCallback,screencastCallback:this.screencastCallback,screenCastState:this.props.screenCast.currentState,hostMenuItems:$e,developmentMode:Ue,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:h,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]})}),Xe]})})})}}const AppWithScreenCast=withScreencast(App),AppWrapper=n=>{const{isMobile:o}=useViewportSize();return jsx$1(AppWithScreenCast,{...n,isMobileViewport:o})};function useThemeManager(){const n=getDefaultTheme(),[o,e]=reactExports.useState(n),[t,c]=reactExports.useState(n.themeInput?.fontFaces??[]),[p,h]=reactExports.useState(null),[y,g]=reactExports.useState(()=>[...createPresetThemes(),...isPresetTheme(n)?[]:[n]]),$=(Z,X={})=>{const{keepPresetThemes:be=!0}=X;g([...be?createPresetThemes():[],...Z])},E=reactExports.useCallback(Z=>{e(X=>Z!==X?(Z.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(Z),Z):X)},[e]),A=reactExports.useCallback(()=>{o.name===AUTO_THEME_NAME&&E(getHostSpecifiedTheme());const Z=y.filter(X=>X.name!==AUTO_THEME_NAME);g([createAutoTheme(),...Z])},[o.name,y,E]),N=reactExports.useCallback(Z=>{Z.fontFaces&&c(Z.fontFaces);const X=[...Z.fontSources||[],...Z.sidebar?.fontSources||[]],be={};X.forEach(we=>{we.sourceUrl&&we.configName&&(be[we.configName]=we.sourceUrl)}),h(Object.keys(be).length>0?be:null)},[c,h]),H=reactExports.useCallback(Z=>{N(Z);const X=new CustomThemeConfig(Z),be=createTheme(CUSTOM_THEME_NAME,X);E(be)},[N,E]);return reactExports.useEffect(()=>{const Z=window.matchMedia("(prefers-color-scheme: dark)");return Z.addEventListener("change",A),window.addEventListener("afterprint",A),()=>{window.removeEventListener("afterprint",A),Z.removeEventListener("change",A)}},[o,y,A]),[{setTheme:E,activeTheme:o,addThemes:$,availableThemes:y,setFonts:N,setImportedTheme:H},t,p]}const ThemedApp=({streamlitExecutionStartedAt:n})=>{const[o,e,t]=useThemeManager(),{activeTheme:c}=o;return jsx$1(RootStyleProvider,{theme:c,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[e.length>0&&jsx$1(FontFaceDeclaration,{fontFaces:e}),t&&jsx$1(FontSources,{fontSources:t}),jsx$1(AppWrapper,{theme:o,streamlitExecutionStartedAt:n})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"}),rootDomNode=document.getElementById("root");if(!rootDomNode)throw new Error("#root DOM element not found");const reactRoot=clientExports.createRoot(rootDomNode);reactRoot.render(jsx$1(reactExports.StrictMode,{children:jsx$1(HelmetProvider,{children:jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})})})}));export{toaster as $,ADJOINED as A,BaseButtonKind as B,Checkbox$1 as C,DynamicButtonLabel as D,EmotionIconBase as E,DownloadContext as F,StyledErrorMessage as G,toString$2 as H,findAndReplace as I,Arrow$2 as J,range as K,LibConfigContext as L,isNumericType as M,DataFrameCellType as N,useCrossOriginAttribute as O,Placement as P,loglevelExports as Q,useRequiredContext as R,StreamlitMarkdown$1 as S,TooltipIcon as T,UISelectbox as U,useCopyToClipboard as V,ensureError as W,ErrorElement as X,NavigationContext as Y,DynamicIcon as Z,_extends$C as _,BaseButtonTooltip as a,getCrossOriginAttribute as a$,Fragment as a0,Kind as a1,AlertElement$1 as a2,Video$1 as a3,keyframes as a4,StyledWidgetInstructions as a5,isFromMac as a6,FormsContext as a7,StyledFormSubmitContent as a8,Form$1 as a9,LabelVisibilityOptions as aA,React as aB,StyledWidgetLabel as aC,getMetricBackgroundColor as aD,getMetricTextColor as aE,Metric$1 as aF,Global as aG,getMetricColor as aH,convertRemToPx as aI,hexToRgb as aJ,withWrapper as aK,__vitePreload as aL,blend as aM,SetCache as aN,cacheHas as aO,baseRest as aP,isArrayLikeObject as aQ,useSelectCommon as aR,Select as aS,VirtualDropdown as aT,TYPE as aU,find as aV,parse$1 as aW,parse$2 as aX,normalize$1 as aY,html$2 as aZ,svg as a_,isInForm as aa,StyledWidgetLabelHelp as ab,WidgetLabel as ac,isMaterialIcon as ad,getBorderColor as ae,TextInput$1 as af,getDefaultExportFromCjs as ag,darken as ah,PortalContext as ai,reactDomExports as aj,classNames as ak,requireReact as al,styled$1 as am,isFocusVisible as an,getOverride as ao,getOverrideProps as ap,root$4 as aq,toNumber as ar,isObject$1 as as,mergeOverrides as at,CUSTOM_INPUT_TYPE as au,ChevronDown$1 as av,PLACEMENT as aw,Icon$2 as ax,Tooltip$1 as ay,IsSidebarContext as az,BaseButton as b,util_math_ as b$,ViewStateContext as b0,useWindowDimensionsContext as b1,LocaleContext as b2,shouldWidthStretch as b3,ButtonGroup$1 as b4,LabelVisibilityMessage as b5,StyledButtonGroup as b6,NumberInput$1 as b7,useStyletron as b8,mergeOverride as b9,merge$1 as bA,getIncreasingGreen as bB,getDecreasingRed as bC,getBlue80 as bD,getGray30 as bE,getGray70 as bF,getGray90 as bG,getDivergingColorsArray as bH,keysToSnakeCase as bI,PlotlyChart$1 as bJ,themeColors as bK,isMobile as bL,UploadedFileInfo as bM,FileUploaderState as bN,__awaiter as bO,PropTypes as bP,isFromWindows as bQ,ThemeContext$1 as bR,pick$1 as bS,Slider$1 as bT,zip as bU,baseSlice as bV,baseToString as bW,trimmedEndIndex as bX,util_bn_ as bY,util_int_ as bZ,util_bit_ as b_,toObjectOverride as ba,Icon$1 as bb,DeleteAlt$1 as bc,forkBlur as bd,forkFocus as be,addCssUnit as bf,convert as bg,visitParents as bh,SKIP as bi,isDatetimeType as bj,isDateType as bk,getTimezone as bl,debounce$2 as bm,isEqual$1 as bn,shouldHeightStretch as bo,toPropertyKey$2 as bp,_setPrototypeOf$e as bq,_typeof$g as br,_assertThisInitialized$1 as bs,toExportedTheme as bt,ArrowDataframe as bu,useTimeout as bv,Skeleton$1 as bw,Skeleton as bx,ComponentRegistry as by,requirePropTypes as bz,BaseButtonSize as c,StyledCodeBlock as c$,util_buffer_ as c0,util_vector_ as c1,util_pretty_ as c2,util_interval_ as c3,compareTypes as c4,compareFields as c5,compareSchemas as c6,getAugmentedNamespace as c7,isStringType as c8,isTimeType as c9,ok as cA,stringify$1 as cB,stringify as cC,pointStart as cD,visit as cE,pointEnd as cF,structuredClone$1 as cG,identity as cH,arrayEach as cI,baseEach as cJ,isArray as cK,arrayMap as cL,baseMap as cM,baseIteratee as cN,baseForOwn as cO,isObjectLike as cP,baseGetTag as cQ,isPlainObject$3 as cR,cloneDeep$1 as cS,StatefulPopover as cT,_defineProperty$u as cU,filterOptions as cV,mergeWith as cW,commonjsGlobal as cX,StyledPre as cY,CopyButton$1 as cZ,StyledCopyButtonContainer as c_,isPeriodType as ca,isIntervalType as cb,isDurationType as cc,isDecimalType as cd,isFloatType as ce,isObjectType as cf,isListType as cg,TimeUnit as ch,Struct as ci,AcceptFileValue as cj,assertNever as ck,chatInputAcceptFileProtoValueToEnum as cl,ThemeProvider$1 as cm,createThemedStyled as cn,createThemedUseStyletron as co,createThemedWithStyle as cp,expandBorderStyles as cq,withStyle as cr,requireReactIs$1 as cs,tableFromIPC as ct,v4 as cu,requireReactDom as cv,UIDConsumer as cw,Popover$2 as cx,StatefulMenu as cy,ACCESSIBILITY_TYPE as cz,Box as d,propTypesExports as d0,index as d1,parseToRgba as d2,DeckGlJsonChart$1 as d3,hasPath as d4,isArrayLike as d5,isBuffer as d6,isTypedArray as d7,isArguments as d8,getTag as d9,css as dA,lighten as dB,mix$1 as dC,TRIGGER_TYPE as dD,StyledTooltipContentWrapper as dE,FlexContext as dF,useScrollbarGutterSize as dG,Resizable as dH,streamlit as dI,isPrototype as da,baseKeys as db,Set$1 as dc,setToArray as dd,memoize$1 as de,requireClassnames as df,groupBy as dg,flatten as dh,Vector as di,getLuminance as dj,parseIconPackEntry as dk,genericFonts as dl,getMarkdownBgColors as dm,isUnsignedIntegerType as dn,isIntegerType as dp,isBooleanType as dq,Field as dr,Null as ds,isRangeIndexType as dt,isEmptyType as du,isBytesType as dv,isCategoricalType as dw,fontSizes as dx,_objectWithoutProperties$1 as dy,jsx as dz,isNullOrUndefined as e,useCalculatedDimensions as f,useEmotionTheme as g,hoistNonReactStatics as h,isValidFormId as i,jsx$1 as j,hasLightBackgroundColor as k,jsxs as l,labelVisibilityProtoValueToEnum as m,notNullOrUndefined as n,StyledWidgetLabelHelpInline as o,StyledContent as p,StyledCheckbox$1 as q,reactExports as r,getOverrides as s,transparentize as t,useRegisterShortcut as u,SIZE$1 as v,ENHANCER_POSITION as w,styled as x,StyledDropdownListItem as y,isPropValid$1 as z};
151
+ `);return jsx$1("div",{"data-testid":"stClearCacheDialog",children:jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:"Clear caches"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitMarkdown$1,{source:e,allowHTML:!1})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:n.onClose,children:"Cancel"}),jsx$1(ModalButton,{autoFocus:!0,kind:BaseButtonKind.SECONDARY,onClick:n.confirmCallback,children:"Clear caches"})]})]})})}function ScriptCompileErrorDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,size:"auto",autoFocus:!1,children:[jsx$1(ModalHeader,{children:"Script execution error"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitErrorCodeBlock$1,{children:n.exception?.message?n.exception.message:"No message"})}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:n.onClose,children:"Close"})})]})}function WarningDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:n.title}),jsx$1(ModalBody$1,{children:n.msg})]})}function DeployErrorDialog({title:n,msg:o,onClose:e,onContinue:t,onTryAgain:c}){const p=()=>{e(),t&&t()};return jsxs(Modal,{isOpen:!0,onClose:e,children:[jsx$1(ModalHeader,{children:n}),jsx$1(ModalBody$1,{children:jsx$1(StyledDeployErrorContent,{children:o})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:c,children:"Try again"}),jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:p,children:t?"Continue anyway":"Close"})]})]})}function noDialog({onClose:n}){return jsx$1(Modal,{isOpen:!1,onClose:n})}function typeNotRecognizedDialog(n){return jsx$1(Modal,{isOpen:!0,onClose:n.onClose,children:jsx$1(ModalBody$1,{children:`Dialog type "${n.type}" not recognized.`})})}function parseLinks(n){const o=[];let e=0,t=0;const c=/\[([^\]]+)\]\(([^)]+)\)/g;let p;for(;(p=c.exec(n))!==null;)p.index>e&&o.push(jsx$1(reactExports.Fragment,{children:n.substring(e,p.index)},t++)),o.push(jsx$1("a",{href:p[2],target:"_blank",rel:"noopener noreferrer",children:p[1]},t++)),e=p.index+p[0].length;return e<n.length&&o.push(jsx$1(reactExports.Fragment,{children:n.substring(e)},t++)),o}function DialogErrorMessage({message:n,codeBlock:o}){return jsxs(Fragment,{children:[jsx$1(StyledErrorText,{hasCodeBelow:!!o,children:parseLinks(n)}),o&&jsx$1(StreamlitErrorCodeBlock$1,{children:o})]})}const DialogErrorMessage$1=reactExports.memo(DialogErrorMessage),StyledActionButtonContainer=styled("div",{target:"ekuhni80"})(({theme:n})=>({display:"flex",gap:n.spacing.sm,alignItems:"center",lineHeight:n.iconSizes.md})),StyledActionButtonIcon=styled("div",{target:"ekuhni81"})(({theme:n,icon:o})=>({background:`url("${o}") no-repeat center / contain`,width:n.iconSizes.base,height:n.iconSizes.base})),StyledToolbarActions=styled("div",{target:"ekuhni82"})({display:"flex",alignItems:"center",flexDirection:"row"});function ActionButton({label:n,icon:o,onClick:e}){return jsx$1("div",{className:"stToolbarActionButton","data-testid":"stToolbarActionButton",children:jsx$1(BaseButton,{onClick:e,kind:BaseButtonKind.HEADER_BUTTON,children:jsxs(StyledActionButtonContainer,{children:[o&&jsx$1(StyledActionButtonIcon,{"data-testid":"stToolbarActionButtonIcon",icon:o}),n&&jsx$1("span",{"data-testid":"stToolbarActionButtonLabel",children:n})]})})})}function ToolbarActions({sendMessageToHost:n,hostToolbarItems:o,metricsMgr:e}){return jsx$1(StyledToolbarActions,{className:"stToolbarActions","data-testid":"stToolbarActions",children:o.map(({key:t,label:c,icon:p})=>jsx$1(ActionButton,{label:c,icon:p,onClick:()=>{e.enqueue("menuClick",{label:t}),n({type:"TOOLBAR_ITEM_CALLBACK",key:t})}},t))})}const screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=styled("div",{target:"e1ejanx90"})(({theme:n})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:n.sizes.full,height:n.sizes.full,fontSize:"40vh",color:n.colors.redTextColor,fontWeight:n.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${n.colors.grayTextColor}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:n,endCallback:o})=>{const[e,t]=reactExports.useState(n);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const p=e-1;p>=0&&t(p),p===0&&o()},children:jsx$1("span",{children:e})},`frame${e}`)},StyledRecordAudioLabel=styled("label",{target:"ej964cx0"})({margin:0}),StyledInstruction=styled("p",{target:"ej964cx1"})({margin:0}),ScreencastDialog=({onClose:n,toggleRecordAudio:o,recordAudio:e,startRecording:t})=>{const[c,p]=reactExports.useState(e),h=reactExports.useCallback(g=>{const{checked:$}=g.target;$!==c&&(p($),o())},[c,o]),y=reactExports.useCallback(()=>{t(),n()},[t,n]);return jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsxs(ModalBody$1,{children:[jsx$1("p",{children:"This will record a video with the contents of your screen, so you can easily share what you're seeing with others."}),jsx$1("p",{children:jsxs(StyledRecordAudioLabel,{"data-testid":"stScreencastAudioCheckbox",children:[jsx$1("input",{type:"checkbox",name:"recordAudio",checked:c,onChange:h})," ","Also record audio"]})}),jsx$1(StyledInstruction,{"data-testid":"stScreencastInstruction",children:jsx$1(StreamlitMarkdown$1,{source:"Press `Esc` any time to stop recording.",allowHTML:!1})})]}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:y,children:"Start recording!"})})]})},StyledVideo=styled("video",{target:"e1hp04x70"})(({theme:n})=>({width:n.sizes.full,borderRadius:n.radii.md})),StyledDialogContainer=styled("div",{target:"e1hp04x71"})(({theme:n})=>({display:"flex",flexDirection:"column",width:n.sizes.full})),StyledRow=styled("div",{target:"e1hp04x72"})(({theme:n})=>({display:"flex",flexDirection:"row",paddingTop:n.spacing.md,paddingBottom:n.spacing.md})),StyledFirstColumn=styled("div",{target:"e1hp04x73"})(({theme:n})=>({paddingRight:n.spacing.lg,textAlign:"right",color:n.colors.grayTextColor,fontWeight:n.fontWeights.bold,width:"6em"})),StyledSecondColumn=styled("div",{target:"e1hp04x74"})(({theme:n})=>({flex:1,paddingRight:n.spacing.lg,marginRight:"6em",[`@media (max-width: ${n.breakpoints.sm})`]:{marginRight:n.spacing.none}})),StyledVideoFormatInstructions=styled("p",{target:"e1hp04x75"})(({theme:n})=>({marginTop:n.spacing.sm,marginBottom:n.spacing.none,fontSize:n.fontSizes.sm})),StyledDownloadButtonContainer=styled("div",{target:"e1hp04x76"})(({theme:n})=>({marginTop:n.spacing.twoXS})),VideoRecordedDialog=({onClose:n,videoBlob:o,fileName:e})=>{const t=URL.createObjectURL(o),c=()=>{const p=document.createElement("a");p.setAttribute("href",t),p.setAttribute("download",`${e}.webm`),p.click(),n()};return jsxs(Modal,{isOpen:!0,onClose:n,overrides:{Dialog:{style:{width:"80vw"}}},children:[jsx$1(ModalHeader,{children:"Next steps"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogContainer,{"data-testid":"stVideoRecordedDialog",children:[jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 1"}),jsxs(StyledSecondColumn,{children:[jsx$1("p",{children:"Preview your video below:"}),jsx$1(StyledVideo,{src:t,controls:!0})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 2"}),jsxs(StyledSecondColumn,{children:[jsx$1(StyledDownloadButtonContainer,{children:jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:c,children:"Save video to disk"})}),jsxs(StyledVideoFormatInstructions,{children:["This video is encoded in the"," ",jsx$1("a",{href:"https://www.webmproject.org/",children:"WebM format"}),", which is only supported by newer video players. You can also play it by dragging the file directly into your browser."]})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 3"}),jsxs(StyledSecondColumn,{children:["Share your video with the world on Twitter, LinkedIn, YouTube, or just plain email!"," ",jsx$1("span",{role:"img","aria-label":"Happy",children:"😀"})]})]})]})})]})},StyledScreenCastWarningDialog=styled("div",{target:"e1o5y2010"})({display:"flex"}),StyledUnsupportedScreenCastIcon=styled("div",{target:"e1o5y2011"})(({theme:n})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:n.spacing.twoXL,marginLeft:n.spacing.sm,fontSize:n.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=styled("p",{target:"e1o5y2012"})(({theme:n})=>({margin:n.spacing.none})),UnsupportedBrowserDialog=({onClose:n})=>jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsx$1(ModalBody$1,{children:jsxs(StyledScreenCastWarningDialog,{"data-testid":"stUnsupportedBrowserDialog",children:[jsx$1(StyledUnsupportedScreenCastIcon,{children:jsx$1("span",{role:"img","aria-label":"Alien Monster",children:"👾"})}),jsx$1(StyledUnsupportedScreenCastExplanation,{children:"Due to limitations with some browsers, this feature is only supported on recent desktop versions of Chrome, Firefox, and Edge."})]})})]}),UnsupportedBrowserDialog$1=reactExports.memo(UnsupportedBrowserDialog),LOG$2=loglevelExports.getLogger("withScreencast");function withScreencast(n){const o=e=>{const{testOverride:t}=e,c=reactExports.useRef(null),[p,h]=reactExports.useState("streamlit-screencast"),[y,g]=reactExports.useState(!1),[$,E]=reactExports.useState(void 0),[A,N]=reactExports.useState(t||"OFF"),H=reactExports.useCallback(()=>{g(Ie=>!Ie)},[]),Z=reactExports.useCallback(async()=>{if(!(A==="OFF"||isNullOrUndefined(c.current))){if(A==="COUNTDOWN"){N("OFF");return}if(A==="RECORDING"){const Ie=c.current;if(!Ie||Ie.getState()==="inactive")N("OFF");else{const Ne=await Ie.stop();E(Ne),N("PREVIEW_FILE")}}}},[A]),X=reactExports.useCallback(async()=>{if(!ScreenCastRecorder.isSupportedBrowser()){N("UNSUPPORTED");return}c.current=new ScreenCastRecorder({recordAudio:y,onErrorOrStop:()=>{Z().catch(Ie=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Ie}`))}});try{await c.current.initialize()}catch(Ie){LOG$2.warn(`ScreenCastRecorder.initialize error: ${Ie}`),N("UNSUPPORTED");return}N("COUNTDOWN")},[y,Z]),be=reactExports.useCallback(Ie=>{if(!ScreenCastRecorder.isSupportedBrowser()){N("UNSUPPORTED");return}if(A==="OFF"){h(Ie),N("SETUP");return}Z().catch(Ne=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Ne}`))},[A,Z]),we=reactExports.useCallback(()=>{if(isNullOrUndefined(c.current))throw new Error("Countdown finished but recorder is null");c.current.start()?N("RECORDING"):Z().catch(Ne=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Ne}`))},[Z]),$e=reactExports.useCallback(()=>{N("OFF")},[]);return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(n,{...e,screenCast:{currentState:A,toggleRecordAudio:H,startRecording:be,stopRecording:Z}}),A==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:$e}),A==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:y,onClose:$e,startRecording:X,toggleRecordAudio:H}),A==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:we}),A==="PREVIEW_FILE"&&$&&jsx$1(VideoRecordedDialog,{onClose:$e,videoBlob:$,fileName:p})]})};return o.displayName=`withScreencast(${n.displayName||n.name||"Component"})`,hoistNonReactStatics(o,n)}const useViewportSize=()=>{const{activeTheme:n}=reactExports.useContext(ThemeContext),{innerWidth:o}=useWindowDimensionsContext(),e=parseInt(n.emotion.breakpoints.md,10);return{isMobile:o<e}},DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json",LOG$1=loglevelExports.getLogger("MetricsManager");class MetricsManager{constructor(o){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=e=>{this.appHash=e},this.setMetricsConfig=(e="")=>{this.metricsUrl=e},this.sessionInfo=o}async initialize({gatherUsageStats:o,sendMessageToHost:e}){this.sendMessageToHost=e,this.actuallySendMetrics=o&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(LOG$1.error("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),LOG$1.info("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(o,e={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([o,e]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(o,e))}setMetadata(o){this.metadata=o}async requestDefaultMetricsConfig(){const o=localStorageAvailable();if(o){const e=window.localStorage.getItem("stMetricsConfig");if(e){this.metricsUrl=e;return}}try{const e=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!e.ok)this.metricsUrl=void 0,LOG$1.error("Failed to fetch metrics config: ",e.status);else{const t=await e.json();this.metricsUrl=t.url??void 0,o&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(e){LOG$1.error("Failed to fetch metrics config:",e)}}send(o,e={}){const t=this.buildEventProto(o,e);this.metricsUrl==="postMessage"?this.postMessageEvent(o,t):this.track(t)}sendPendingEvents(){this.pendingEvents.forEach(([o,e])=>{this.send(o,e)}),this.pendingEvents=[]}async track(o){const e=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o.toJSON())});await fetch(e)}postMessageEvent(o,e){this.sendMessageToHost({type:"METRICS_EVENT",eventName:o,data:e})}buildEventProto(o,e){const t=new MetricsEvent({event:o,anonymousId:this.anonymousId,...this.getHostTrackingData(),...this.getInstallationData(),reportHash:this.appHash,dev:IS_DEV_ENV,source:"browser",streamlitVersion:this.sessionInfo.current.streamlitVersion,isHello:this.sessionInfo.isHello,appId:this.sessionInfo.current.appId,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,serverOs:this.sessionInfo.current.serverOS,hasDisplay:this.sessionInfo.current.hasDisplay,isWebdriver:isWebdriver(),...this.getContextData()});if(o==="menuClick")t.label=e.label;else if(o==="pageProfile")return new MetricsEvent({...t,...e});return t}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3,machineIdV4:this.sessionInfo.current.installationIdV4}}getHostTrackingData(){return this.metadata?pick$1(this.metadata,["hostedAt","owner","repo","branch","mainModule","creatorId"]):{}}getContextData(){return{contextPageUrl:window.location.href,contextPageTitle:document.title,contextPagePath:window.location.pathname,contextPageReferrer:document.referrer,contextPageSearch:window.location.search,contextLocale:window.navigator.language,contextUserAgent:window.navigator.userAgent}}getAnonymousId(){if(!this.actuallySendMetrics)return;const o="ajs_anonymous_id",e=localStorageAvailable(),t=getCookie(o),c=e?window.localStorage.getItem(o):null,p=new Date;if(p.setFullYear(new Date().getFullYear()+1),t)this.anonymousId=t,e&&window.localStorage.setItem(o,t);else if(c){try{this.anonymousId=JSON.parse(c)}catch{this.anonymousId=c}setCookie(o,this.anonymousId,p)}else this.anonymousId=v4(),setCookie(o,this.anonymousId,p),e&&window.localStorage.setItem(o,this.anonymousId)}}function isWebdriver(){return window.navigator?.webdriver??!1}class SessionEventDispatcher{constructor(){this.onSessionEvent=new distExports.Signal}handleSessionEventMsg(o){this.onSessionEvent.emit(o)}}const StyledApp=styled("div",{target:"ee4bbma0"})(({theme:n})=>{const o=hasLightBackgroundColor(n);return{position:"absolute",background:n.colors.bgColor,color:n.colors.bodyText,top:n.spacing.none,left:n.spacing.none,right:n.spacing.none,bottom:n.spacing.none,colorScheme:o?"light":"dark",overflow:"hidden","@media print":{float:"none",height:n.sizes.full,position:"static",overflow:"visible"}}});function getBrowserInfo(){const o=new UAParser().getResult();return{browserName:o.browser.name||"Unknown",browserVersion:o.browser.version||"Unknown",deviceType:o.device.type||"desktop",os:o.os.name||"Unknown"}}const showDevelopmentOptions=(n,o)=>o==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==o||Config.ToolbarMode.MINIMAL==o?!1:n||isLocalhost();function getTitle(n){return n||"Streamlit"}class AppNavigation{constructor(o,e,t,c){this.hostCommunicationMgr=o,this.onUpdatePageUrl=e,this.onPageNotFound=t,this.onPageIconChange=c,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.hasSetDefaultFavicon=!1,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(o){return this.mainScriptHash!==o.mainScriptHash&&(this.isPageTitleSet=!1,this.isPageIconSet=!1,this.hasSetDefaultFavicon=!1),this.mainScriptHash=o.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=o.config?.hideSidebarNav??null),document.title=getTitle(""),[{currentPageScriptHash:o.pageScriptHash,hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handleNavigation(o){const{sections:e,position:t,appPages:c}=o;this.appPages=c,this.hideSidebarNav=t===Navigation.Position.HIDDEN;const p=o.pageScriptHash,h=c.find($=>$.pageScriptHash===p),y=c.find($=>$.isDefault);this.mainPage=y;const g=h.urlPathname;if(!this.isPageTitleSet){const $=getTitle(h.pageName);document.title=$,this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:h.pageName??""})}return!this.isPageIconSet&&h.icon&&this.onPageIconChange(h.icon),this.onUpdatePageUrl(y.urlPathname??"",g,h.isDefault??!1),[{appPages:c,navSections:e,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:o.expanded,currentPageScriptHash:p},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:c}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:h.isDefault?"":g,currentPageScriptHash:p})}]}handlePageNotFound(o){return this.onPageNotFound(o),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}findPageByUrlPath(o){return this.appPages.find(e=>o.endsWith("/"+e.urlPathname))??this.mainPage}handlePageConfigChanged(o){o.favicon&&(this.isPageIconSet=!0),o.title&&(this.isPageTitleSet=!0)}clearPageElements(o,e){return o.filterMainScriptElements(e)}}var define_PACKAGE_METADATA_default={version:"1.52.1"};const INITIAL_SCRIPT_RUN_ID="<null>",LOG=loglevelExports.getLogger("App");class App extends reactExports.PureComponent{constructor(o){super(o),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.deferredFileListeners=new Map,this.isInitializingConnectionManager=!0,this.hasReceivedNewSession=!1,this.showDeployError=(t,c,p)=>{const h={type:DialogType.DEPLOY_ERROR,title:t,msg:c,onContinue:p,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg};this.openDialog(h)},this.handleThemeMessage=(t,c)=>{const[,p,h]=createPresetThemes(),y=isPresetTheme(this.props.theme.activeTheme);t===p.name&&y?this.props.theme.setTheme(p):t===h.name&&y?this.props.theme.setTheme(h):c&&this.props.theme.setImportedTheme(c)},this.handleConnectionStateChanged=t=>{if(LOG.info(`Connection state changed from ${this.state.connectionState} to ${t}`),t===ConnectionState.CONNECTED){LOG.info("Reconnected to server."),this.state.connectionErrorDismissed&&this.setState({connectionErrorDismissed:!1});const c=this.state.scriptRunState===ScriptRunState.RUNNING,p=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED;!this.sessionInfo.last||c||p||this.state.fragmentIdsThisRun.length>0||this.state.autoReruns.length>0?(LOG.info("Requesting a script run."),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})):this.state.dialog?.type===DialogType.CONNECTION_ERROR&&this.setState({dialog:null}),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:t!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.disconnect();this.isInitializingConnectionManager?this.setState({connectionState:t}):reactDomExports.flushSync(()=>{this.setState({connectionState:t})})},this.handleGitInfoChanged=t=>{this.setState({gitInfo:t})},this.handleCustomParentMessage=t=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:t.message}):LOG.error("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=t=>{const c=(p,h,y)=>{const g=p[h];if(g in y)return y[g](p[g]);throw new Error(`Cannot handle ${h} "${g}".`)};try{c(t,"type",{newSession:p=>this.handleNewSession(p),sessionStatusChanged:p=>this.handleSessionStatusChanged(p),sessionEvent:p=>this.handleSessionEvent(p),delta:p=>this.handleDeltaMsg(p,t.metadata),pageConfigChanged:p=>this.handlePageConfigChanged(p),pageInfoChanged:p=>this.handlePageInfoChanged(p),pagesChanged:p=>{},pageNotFound:p=>this.handlePageNotFound(p),gitInfoChanged:p=>this.handleGitInfoChanged(p),scriptFinished:p=>this.handleScriptFinished(p),pageProfile:p=>this.handlePageProfileMsg(p),autoRerun:p=>this.handleAutoRerun(p),fileUrlsResponse:p=>this.uploadClient.onFileURLsResponse(p),deferredFileResponse:p=>this.handleDeferredFileResponse(p),parentMessage:p=>this.handleCustomParentMessage(p),logo:p=>this.handleLogo(p,t.metadata),navigation:p=>this.handleNavigation(p),authRedirect:p=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:p.url}):window.location.href=p.url}})}catch(p){const h=ensureError(p);LOG.error(h),this.showError("Bad message format",{message:h.message})}},this.handleLogo=(t,c)=>{this.setState(p=>({elements:p.elements.appRootWithLogo(t,{activeScriptHash:c.activeScriptHash,scriptRunId:p.scriptRunId})}))},this.handlePageConfigChanged=t=>{const{title:c,favicon:p,layout:h,initialSidebarState:y,menuItems:g}=t;this.appNavigation.handlePageConfigChanged(t),c&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:c}),document.title=c),p&&this.onPageIconChanged(p),h!==this.state.layout&&h!==PageConfig.Layout.LAYOUT_UNSET&&this.setState($=>({layout:h,userSettings:{...$.userSettings,wideMode:h===PageConfig.Layout.WIDE}})),y!==this.state.initialSidebarState&&y!==PageConfig.SidebarState.SIDEBAR_UNSET&&this.setState(()=>({initialSidebarState:y})),g&&this.setState($=>(g.clearAboutMd&&(g.aboutSectionMd=""),{menuItems:{...$.menuItems,...g}}))},this.handlePageInfoChanged=t=>{const{queryString:c}=t,p=document.location.pathname+(c?`?${c}`:"");window.history.pushState({},"",p),this.setState({queryParams:c}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:c?`?${c}`:""})},this.onPageNotFound=t=>{const c=t?`You have requested page /${t}, but no corresponding file was found in the app's pages/ directory`:"The page that you have requested does not seem to exist";this.showError("Page not found",{message:`${c}. Running the app's main page.`})},this.handlePageNotFound=t=>{const{pageName:c}=t;this.maybeSetState(this.appNavigation.handlePageNotFound(c))},this.onPageIconChanged=t=>{handleFavicon(t,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handleNavigation=t=>{this.setState({navigationPosition:t.position}),this.maybeSetState(this.appNavigation.handleNavigation(t))},this.handlePageProfileMsg=t=>{const c=PageProfile.toObject(t),p=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...c,isFragmentRun:!!c.isFragmentRun,numPages:this.state.appPages?.length,pageScriptHash:this.state.currentPageScriptHash,activeTheme:this.props.theme?.activeTheme?.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:p})},this.handleAutoRerun=t=>{const c=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(t.fragmentId,!0)},t.interval*1e3);this.setState(p=>({autoReruns:[...p.autoReruns,c]}))},this.handleSessionStatusChanged=t=>{this.setState(c=>{let{scriptRunState:p}=c,{dialog:h}=c;return t.scriptIsRunning&&c.scriptRunState!==ScriptRunState.STOP_REQUESTED?(p=ScriptRunState.RUNNING,notNullOrUndefined(h)&&h.type===DialogType.SCRIPT_COMPILE_ERROR&&(h=void 0)):!t.scriptIsRunning&&c.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&c.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(p=ScriptRunState.NOT_RUNNING),{userSettings:{...c.userSettings,runOnSave:!!t.runOnSave},dialog:h,scriptRunState:p,scriptChangedOnDisk:t.scriptIsRunning?!1:c.scriptChangedOnDisk}})},this.handleSessionEvent=t=>{if(this.sessionEventDispatcher.handleSessionEventMsg(t),t.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const c={type:DialogType.SCRIPT_COMPILE_ERROR,exception:t.scriptCompilationException,onClose:()=>{}};this.maybeShowErrorDialog(c,t.scriptCompilationException?.message??"No message")}else t.type==="scriptChangedOnDisk"&&this.setState({scriptChangedOnDisk:!0})},this.maybeUpdatePageUrl=(t,c,p)=>{const h=this.getBaseUriParts();if(h){let y;window.__streamlit?.MAIN_PAGE_BASE_URL?y=parseUriIntoBaseParts(window.__streamlit.MAIN_PAGE_BASE_URL).pathname:y=h.pathname;const g=extractPageNameFromPathName(document.location.pathname,y);if((g===""?t:g)!==c){const E=p?"":c,A=this.state.queryParams||preserveEmbedQueryParams(),N=A?`?${A}`:"",Z=`${y==="/"?"":y}/${E}${N}`;window.history.pushState({},"",Z)}}},this.handleNewSession=t=>{const c=t.initialize;if(this.hasStreamlitVersionChanged(c)){window.location.reload();return}this.hasReceivedNewSession=!0,(!this.sessionInfo.isSet||!this.sessionInfo.current.isConnected)&&this.handleInitialization(t);const{appHash:p,currentPageScriptHash:h}=this.state,{scriptRunId:y,name:g,mainScriptPath:$,fragmentIdsThisRun:E,pageScriptHash:A,mainScriptHash:N}=t;if(E.length)this.setState({fragmentIdsThisRun:E,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Z=t.config,X=t.customTheme;this.processThemeInput(X),this.setState({allowRunOnSave:Z.allowRunOnSave,hideTopBar:Z.hideTopBar,toolbarMode:Z.toolbarMode,latestRunTime:performance.now(),mainScriptHash:N,fragmentIdsThisRun:E}),this.maybeSetState(this.appNavigation.handleNewSession(t)),!this.appNavigation.hasSetDefaultFavicon&&!this.appNavigation.isPageIconSet&&(this.appNavigation.hasSetDefaultFavicon=!0,this.onPageIconChanged("./favicon.png"))}const H=hashString(this.sessionInfo.current.installationId+$);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(H),this.metricsMgr.enqueue("updateReport"),p===H&&h===A?this.setState({scriptRunId:y}):this.clearAppState(H,y,g,N)},this.handleInitialization=t=>{const c=t.initialize,p=t.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(t)),this.metricsMgr.initialize({gatherUsageStats:p.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(c.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:t}=this.state,c=this.appNavigation.findPageByUrlPath(document.location.pathname),p=document.location.toString().includes("#"),h=c?.pageScriptHash===t;isNullOrUndefined(c)||p&&h||this.onPageChange(c.pageScriptHash,void 0,!0)},this.setAndSendTheme=t=>{this.props.theme.setTheme(t),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(t.emotion)})},this.createThemeHash=t=>t?hashString(JSON.stringify(t,Object.keys(t).sort())):"hash_for_undefined_custom_theme",this.closeDialog=()=>{this.state.dialog?.type===DialogType.CONNECTION_ERROR?this.setState({dialog:void 0,connectionErrorDismissed:!0}):this.setState({dialog:void 0})},this.saveSettings=t=>{const{runOnSave:c}=this.state.userSettings,{runOnSave:p}=t;if(this.setState({userSettings:t}),c!==p&&this.isServerConnected()){const h=new BackMsg({setRunOnSave:p});h.type="setRunOnSave",this.sendBackMsg(h)}},this.handleDeltaMsg=(t,c)=>{this.setState(p=>({elements:p.elements.applyDelta(p.scriptRunId,t,c)}))},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const t=new BackMsg({debugShutdownRuntime:!0});t.type="debugShutdownRuntime",this.sendBackMsg(t)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const t=new BackMsg({debugDisconnectWebsocket:!0});t.type="debugDisconnectWebsocket",this.sendBackMsg(t)}},this.debugClearForwardMsgCache=()=>{isLocalhost()&&this.connectionManager?.websocketConnection?.cache.messages.clear()},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(t=>{clearInterval(t)}),this.setState({autoReruns:[]})},this.rerunScript=(t=!1)=>{if(this.closeDialog(),!this.isServerConnected()){LOG.error("Cannot rerun script when disconnected from server.");return}this.state.scriptRunState===ScriptRunState.RUNNING||this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),t===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){LOG.error("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=(t,c,p)=>{const{elements:h,mainScriptHash:y}=this.state;this.cleanupAutoReruns();const g=this.appNavigation.clearPageElements(h,y),$=new Set(Array.from(g.getElements()).map(E=>getElementId(E)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates($),void 0,t,void 0,c,p)},this.isAppInReadyState=t=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&t.scriptRunState===ScriptRunState.RUNNING&&t.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(t,c,p,h,y,g)=>{const $=this.getBaseUriParts();if(!$){LOG.error("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:E}=this.state;let A=y??this.getQueryString(),N="";const H={timezone:getTimezone$1(),timezoneOffset:getTimezoneOffset(),locale:getLocaleLanguage(),url:getUrl(),isEmbedded:isEmbed(),colorScheme:this.getThemeColorScheme()};if(p){if(p!==E&&!g){const X=preserveEmbedQueryParams();A=getQueryString(y,X),this.setState({queryParams:A}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:A})}}else if(E)p=E;else{let X;window.__streamlit?.MAIN_PAGE_BASE_URL?X=parseUriIntoBaseParts(window.__streamlit.MAIN_PAGE_BASE_URL).pathname:X=$.pathname,N=extractPageNameFromPathName(document.location.pathname,X),p=""}const Z=this.connectionManager?.getCachedMessageHashes()??[];this.sendBackMsg(new BackMsg({rerunScript:{queryString:A,widgetStates:t,pageScriptHash:p,pageName:N,fragmentId:c,isAutoRerun:h,cachedMessageHashes:Z,contextInfo:H}})),this.hasReceivedNewSession=!1},this.stopScript=()=>{if(!this.isServerConnected()){LOG.error("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const t=new BackMsg({stopScript:!0});t.type="stopScript",this.sendBackMsg(t),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const t={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(t)}else LOG.error("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{const t={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:this.state.dialog?.type===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr,gitInfo:this.state.gitInfo};this.openDialog(t)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const t=new BackMsg({clearCache:!0});t.type="clearCache",this.sendBackMsg(t)}else LOG.error("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const t=new BackMsg({appHeartbeat:!0});t.type="appHeartbeat",this.sendBackMsg(t)}else LOG.error("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=t=>{this.connectionManager?(LOG.info(t),this.connectionManager.sendMessage(t)):LOG.error(`Not connected. Cannot send back message: ${t}`)},this.handleConnectionError=t=>{this.state.connectionErrorDismissed||this.showError("Connection error",t,DialogType.CONNECTION_ERROR)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(t=!0)=>{const c={type:DialogType.SETTINGS,sessionInfo:this.sessionInfo,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},animateModal:t,metricsMgr:this.metricsMgr};this.openDialog(c)},this.aboutCallback=()=>{const{menuItems:t}=this.state,c={type:DialogType.ABOUT,onClose:this.closeDialog,aboutSectionMd:t?.aboutSectionMd};this.openDialog(c)},this.printCallback=()=>{const{scriptRunState:t}=this.state;if(t!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let c;try{const p=getIFrameEnclosingApp(this.embeddingId);p?.contentWindow?c=p.contentWindow.window:c=window}catch{c=window}finally{c||(c=window),c.print()}},this.screencastCallback=()=>{const{scriptName:t}=this.state,{startRecording:c}=this.props.screenCast,p=getScreencastTimestamp();c(`streamlit-${t}-${p}`)},this.handleFullScreen=t=>{this.setState({isFullScreen:t})},this.setLibConfig=t=>{this.setState({libConfig:t})},this.setAppConfig=t=>{this.setState({appConfig:t})},this.addScriptFinishedHandler=t=>{this.setState((c,p)=>({scriptFinishedHandlers:c.scriptFinishedHandlers.concat(t)}))},this.removeScriptFinishedHandler=t=>{this.setState((c,p)=>({scriptFinishedHandlers:c.scriptFinishedHandlers.filter(h=>h!==t)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:t}=this.state,c=t&&t.length>0?t:document.location.search;return c.startsWith("?")?c.substring(1):c},this.getThemeColorScheme=()=>{const{activeTheme:t}=this.props.theme;return hasLightBackgroundColor(t.emotion)?"light":"dark"},this.isInCloudEnvironment=()=>{const{hostMenuItems:t}=this.state;return t&&t?.length>0},this.showDeployButton=()=>showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&!this.isInCloudEnvironment()&&this.sessionInfo.isSet&&!this.sessionInfo.isHello,this.deployButtonClicked=()=>{this.metricsMgr.enqueue("menuClick",{label:"deployButtonInApp"}),this.sendLoadGitInfoBackMsg(),this.openDeployDialog()},this.requestFileURLs=(t,c)=>{const p=this.isServerConnected(),h=this.sessionInfo.isSet;if(p&&h){const y=new BackMsg({fileUrlsRequest:{requestId:t,fileNames:c.map(g=>g.name),sessionId:this.sessionInfo.current.sessionId}});y.type="fileUrlsRequest",this.sendBackMsg(y)}else LOG.warn(`Cannot request file URLs (isServerConnected: ${p}, isSessionInfoSet: ${h})`),this.uploadClient.onFileURLsResponse({responseId:t,errorMsg:"Connection lost. Please wait for the app to reconnect, then try again."})},this.requestDeferredFile=t=>{const c=this.isServerConnected(),p=this.sessionInfo.isSet;if(!c||!p)return Promise.reject(new Error("Not connected to server or session not initialized"));const h=Promise.withResolvers(),y=this.deferredFileListeners.get(t)??new Set,g=E=>{y.delete(g),h.resolve(E)};y.add(g),this.deferredFileListeners.set(t,y);const $=new BackMsg({deferredFileRequest:{fileId:t,sessionId:this.sessionInfo.current.sessionId}});return $.type="deferredFileRequest",this.sendBackMsg($),h.promise},this.handleDeferredFileResponse=t=>{const c=this.deferredFileListeners.get(t.fileId);if(!(!c||c.size===0)){for(const p of Array.from(c))try{p(t)}catch{}this.deferredFileListeners.delete(t.fileId)}},this.handleKeyDown=t=>{switch(t){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=t=>{t==="esc"&&this.props.screenCast.stopRecording()},this.hasAppDefinedMenuItems=()=>{const{menuItems:t}=this.state;return!!(t?.aboutSectionMd||t?.getHelpUrl&&!t?.hideGetHelp||t?.reportABugUrl&&!t?.hideReportABug)},this.shouldShowToolbar=(t,c)=>{const p=!isEmbed()||isToolbarDisplayed();let h;return this.state.toolbarMode===Config.ToolbarMode.MINIMAL?h=t.length>0||c.length>0||this.hasAppDefinedMenuItems():h=!0,p&&h},ensureHotkeysFilterConfigured(),enablePatches(),enableMapSet();let e=this.createThemeHash();isPresetTheme(o.theme.activeTheme)||(e=this.createThemeHash(toThemeInput(o.theme.activeTheme.emotion))),this.state={connectionState:ConnectionState.INITIAL,elements:AppRoot.empty("",!0),isFullScreen:!1,scriptName:"",scriptRunId:INITIAL_SCRIPT_RUN_ID,appHash:null,scriptRunState:ScriptRunState.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},connectionErrorDismissed:!1,layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:e,gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:Config.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:"",queryParams:"",deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1,navigationPosition:Navigation.Position.SIDEBAR,scriptChangedOnDisk:!1},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:t=>this.setState({formsData:t})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:o.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:t=>{this.setState({inputsDisabled:t})},themeChanged:this.handleThemeMessage,pageChanged:t=>this.onPageChange(t),isOwnerChanged:t=>this.setState({isOwner:t}),fileUploadClientConfigChanged:t=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(t)},hostMenuItemsChanged:t=>{this.setState({hostMenuItems:t})},hostToolbarItemsChanged:t=>{this.setState({hostToolbarItems:t})},hostHideSidebarNavChanged:t=>{this.setState({hostHideSidebarNav:t})},sidebarChevronDownshiftChanged:t=>{this.setState({sidebarChevronDownshift:t})},pageLinkBaseUrlChanged:t=>{this.setState({pageLinkBaseUrl:t})},queryParamsChanged:t=>{this.setState({queryParams:t})},deployedAppMetadataChanged:t=>{this.setState({deployedAppMetadata:t})},restartWebsocketConnection:()=>{this.connectionManager||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),this.initializeConnectionManager())},terminateWebsocketConnection:()=>{this.connectionManager?.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0,sendClientError:(t,c,p,h,y)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:t,error:c,message:p,source:h,customComponentName:y})}}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:t=>this.widgetMgr.setFormsWithUploadsInProgress(t),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}initializeConnectionManager(){this.isInitializingConnectionManager=!0,this.connectionManager=new ConnectionManager({getLastSessionId:()=>this.sessionInfo.last?.sessionId,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,sendClientError:(o,e,t)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:"Websocket Connection",error:o,message:e,source:t})},onHostConfigResp:o=>{const{allowedOrigins:e,useExternalAuthToken:t,disableFullscreenMode:c,enableCustomParentMessages:p,mapboxToken:h,enforceDownloadInNewTab:y,metricsUrl:g,blockErrorDialogs:$,setAnonymousCrossOriginPropertyOnMediaElements:E,resourceCrossOriginMode:A}=o,N={allowedOrigins:e,useExternalAuthToken:t,enableCustomParentMessages:p,blockErrorDialogs:$},H={mapboxToken:h,disableFullscreenMode:c,enforceDownloadInNewTab:y,resourceCrossOriginMode:A??E?"anonymous":void 0};this.metricsMgr.setMetricsConfig(g),this.hostCommunicationMgr.setAllowedOrigins(N),this.setAppConfig(N),this.setLibConfig(H)}}),this.isInitializingConnectionManager=!1}componentDidMount(){this.initializeConnectionManager(),mark(this.state.scriptRunState),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),isScrollingHidden()&&document.body.classList.add("embedded"),isInChildFrame()&&(window.iFrameResizer={heightCalculationMethod:()=>{const o=document.querySelectorAll("[data-iframe-height]"),e=Array.from(o).map(t=>Math.ceil(t.getBoundingClientRect().bottom));return Math.max(0,...e)}},__vitePreload(()=>import("./iframeResizer.contentWindow.BZAsvL9q.js").then(o=>o.i),[],import.meta.url)),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(this.props.theme.activeTheme.emotion)}),this.metricsMgr.enqueue("viewReport"),window.addEventListener("popstate",this.onHistoryChange,!1)}componentDidUpdate(o,e){if(window.prerenderReady===!1&&this.isAppInReadyState(e)&&(window.prerenderReady=!0),this.state.scriptRunState!==e.scriptRunState){if(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING)try{measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING)}catch{}this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState})}}componentWillUnmount(){this.connectionManager?.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}maybeShowErrorDialog(o,e){const{blockErrorDialogs:t}=this.state.appConfig;t||this.openDialog(o);const p=o.type===DialogType.SCRIPT_COMPILE_ERROR?o.type:o.title;this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR_DIALOG",error:p,message:e})}showError(o,e,t=DialogType.WARNING){LOG.error(e.message);const c={type:t,title:o,msg:jsx$1(DialogErrorMessage$1,{message:e.message,codeBlock:e.codeBlock}),onClose:()=>{}};this.maybeShowErrorDialog(c,e.message)}hasStreamlitVersionChanged(o){let e;if(window.__streamlit?.ENABLE_RELOAD_BASED_ON_HARDCODED_STREAMLIT_VERSION===!0?e=define_PACKAGE_METADATA_default.version:this.sessionInfo.isSet&&(e=this.sessionInfo.current.streamlitVersion),e){const{environmentInfo:t}=o;if(notNullOrUndefined(t)&&notNullOrUndefined(t.streamlitVersion))return e!=t.streamlitVersion}return!1}maybeSetState(o){if(o){const[e,t]=o;this.setState(e,t)}}processThemeInput(o){const e=this.createThemeHash(o);if(e===this.state.themeHash)return;this.setState({themeHash:e});const t=!isPresetTheme(this.props.theme.activeTheme);if(o){const c=createCustomThemes(o);if(this.props.theme.addThemes(c,{keepPresetThemes:!1}),getCachedTheme()===null||t)if(c.length>1){const h=c.findIndex(y=>y.name===CUSTOM_THEME_AUTO_NAME);this.setAndSendTheme(c[h])}else this.setAndSendTheme(c[0])}else this.props.theme.addThemes([]),t&&this.setAndSendTheme(getHostSpecifiedTheme());(o?.fontFaces&&o.fontFaces.length>0||o?.fontSources&&o.fontSources.length>0)&&this.props.theme.setFonts(o)}handleScriptFinished(o){(o===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||o===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||o===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&(Promise.resolve().then(()=>{this.state.scriptFinishedHandlers.forEach(e=>e())}),(o===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||o===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&this.setState(({scriptRunId:e,fragmentIdsThisRun:t,elements:c})=>({elements:c.clearStaleNodes(e,t)}),()=>{const e=new Set(Array.from(this.state.elements.getElements()).map(t=>getElementId(t)).filter(notUndefined));this.widgetMgr.removeInactive(e)}),this.connectionManager!==null&&o!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.hasReceivedNewSession&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge,this.state.fragmentIdsThisRun))}clearAppState(o,e,t,c){this.setState(p=>{const h=this.appNavigation.clearPageElements(p.elements,c);return{scriptRunId:e,scriptName:t,appHash:o,elements:h}},()=>{const p=new Set(Array.from(this.state.elements.getElements()).map(h=>getElementId(h)).filter(notUndefined));this.widgetMgr.removeInactive(p)})}openDialog(o){this.setState({dialog:o})}render(){const{allowRunOnSave:o,connectionState:e,dialog:t,elements:c,initialSidebarState:p,menuItems:h,isFullScreen:y,scriptRunId:g,scriptRunState:$,userSettings:E,hideTopBar:A,hideSidebarNav:N,expandSidebarNav:H,currentPageScriptHash:Z,hostHideSidebarNav:X,pageLinkBaseUrl:be,sidebarChevronDownshift:we,hostMenuItems:$e,hostToolbarItems:Ce,libConfig:Ie,inputsDisabled:Ne,appPages:Fe,navSections:Be,navigationPosition:Ge,scriptChangedOnDisk:je}=this.state,De=this.props.isMobileViewport?Navigation.Position.SIDEBAR:Ge,Ue=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),Je=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":E.wideMode}),Xe=t?StreamlitDialog({...t,onClose:this.closeDialog}):null,Ke=this.shouldShowToolbar($e,Ce),ze=!isEmbed()||isPaddingDisplayed(),nt=isScrollingHidden();return jsx$1(StreamlitContextProvider$1,{initialSidebarState:p,pageLinkBaseUrl:be,currentPageScriptHash:Z,onPageChange:this.onPageChange,navSections:Be,appPages:Fe,appLogo:c.logo,sidebarChevronDownshift:we,expandSidebarNav:H,hideSidebarNav:N||X||De===Navigation.Position.TOP,isFullScreen:y,setFullScreen:this.handleFullScreen,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language,formsData:this.state.formsData,scriptRunState:$,scriptRunId:g,mapboxToken:Ie.mapboxToken,enforceDownloadInNewTab:Ie.enforceDownloadInNewTab,resourceCrossOriginMode:Ie.resourceCrossOriginMode,requestDeferredFile:this.requestDeferredFile,children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:Je,"data-testid":"stApp","data-test-script-state":g==INITIAL_SCRIPT_RUN_ID?"initial":$,"data-test-connection-state":e,children:[jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:c,widgetMgr:this.widgetMgr,uploadClient:this.uploadClient,navigationPosition:De,wideMode:E.wideMode,embedded:isEmbed(),showPadding:ze,disableScrolling:nt,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,widgetsDisabled:Ne||e!==ConnectionState.CONNECTED,showToolbar:Ke,disableFullscreenMode:Ie.disableFullscreenMode,componentRegistry:this.componentRegistry,topRightContent:jsxs(Fragment,{children:[!A&&jsx$1(StatusWidget,{connectionState:e,scriptRunState:$,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:o,showScriptChangedActions:je}),!A&&jsx$1(ToolbarActions,{hostToolbarItems:Ce,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr}),this.showDeployButton()&&!je&&jsx$1(DeployButton,{onClick:this.deployButtonClicked}),!A&&jsx$1(MainMenu$1,{isServerConnected:this.isServerConnected(),quickRerunCallback:this.rerunScript,clearCacheCallback:this.openClearCacheDialog,settingsCallback:this.settingsCallback,aboutCallback:this.aboutCallback,printCallback:this.printCallback,screencastCallback:this.screencastCallback,screenCastState:this.props.screenCast.currentState,hostMenuItems:$e,developmentMode:Ue,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:h,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]})}),Xe]})})})}}const AppWithScreenCast=withScreencast(App),AppWrapper=n=>{const{isMobile:o}=useViewportSize();return jsx$1(AppWithScreenCast,{...n,isMobileViewport:o})};function useThemeManager(){const n=getDefaultTheme(),[o,e]=reactExports.useState(n),[t,c]=reactExports.useState(n.themeInput?.fontFaces??[]),[p,h]=reactExports.useState(null),[y,g]=reactExports.useState(()=>[...createPresetThemes(),...isPresetTheme(n)?[]:[n]]),$=(Z,X={})=>{const{keepPresetThemes:be=!0}=X;g([...be?createPresetThemes():[],...Z])},E=reactExports.useCallback(Z=>{e(X=>Z!==X?(Z.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(Z),Z):X)},[e]),A=reactExports.useCallback(()=>{o.name===AUTO_THEME_NAME&&E(getHostSpecifiedTheme());const Z=y.filter(X=>X.name!==AUTO_THEME_NAME);g([createAutoTheme(),...Z])},[o.name,y,E]),N=reactExports.useCallback(Z=>{Z.fontFaces&&c(Z.fontFaces);const X=[...Z.fontSources||[],...Z.sidebar?.fontSources||[]],be={};X.forEach(we=>{we.sourceUrl&&we.configName&&(be[we.configName]=we.sourceUrl)}),h(Object.keys(be).length>0?be:null)},[c,h]),H=reactExports.useCallback(Z=>{N(Z);const X=new CustomThemeConfig(Z),be=createTheme(CUSTOM_THEME_NAME,X);E(be)},[N,E]);return reactExports.useEffect(()=>{const Z=window.matchMedia("(prefers-color-scheme: dark)");return Z.addEventListener("change",A),window.addEventListener("afterprint",A),()=>{window.removeEventListener("afterprint",A),Z.removeEventListener("change",A)}},[o,y,A]),[{setTheme:E,activeTheme:o,addThemes:$,availableThemes:y,setFonts:N,setImportedTheme:H},t,p]}const ThemedApp=({streamlitExecutionStartedAt:n})=>{const[o,e,t]=useThemeManager(),{activeTheme:c}=o;return jsx$1(RootStyleProvider,{theme:c,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[e.length>0&&jsx$1(FontFaceDeclaration,{fontFaces:e}),t&&jsx$1(FontSources,{fontSources:t}),jsx$1(AppWrapper,{theme:o,streamlitExecutionStartedAt:n})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"}),rootDomNode=document.getElementById("root");if(!rootDomNode)throw new Error("#root DOM element not found");const reactRoot=clientExports.createRoot(rootDomNode);reactRoot.render(jsx$1(reactExports.StrictMode,{children:jsx$1(HelmetProvider,{children:jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})})})}));export{toaster as $,ADJOINED as A,BaseButtonKind as B,Checkbox$1 as C,DynamicButtonLabel as D,EmotionIconBase as E,DownloadContext as F,StyledErrorMessage as G,toString$2 as H,findAndReplace as I,Arrow$2 as J,range as K,LibConfigContext as L,isNumericType as M,DataFrameCellType as N,useCrossOriginAttribute as O,Placement as P,loglevelExports as Q,useRequiredContext as R,StreamlitMarkdown$1 as S,TooltipIcon as T,UISelectbox as U,useCopyToClipboard as V,ensureError as W,ErrorElement as X,NavigationContext as Y,DynamicIcon as Z,_extends$C as _,BaseButtonTooltip as a,getCrossOriginAttribute as a$,Fragment as a0,Kind as a1,AlertElement$1 as a2,Video$1 as a3,keyframes as a4,StyledWidgetInstructions as a5,isFromMac as a6,FormsContext as a7,StyledFormSubmitContent as a8,Form$1 as a9,LabelVisibilityOptions as aA,React as aB,StyledWidgetLabel as aC,getMetricBackgroundColor as aD,getMetricTextColor as aE,Metric$1 as aF,Global as aG,getMetricColor as aH,convertRemToPx as aI,hexToRgb as aJ,withWrapper as aK,__vitePreload as aL,blend as aM,SetCache as aN,cacheHas as aO,baseRest as aP,isArrayLikeObject as aQ,useSelectCommon as aR,Select as aS,VirtualDropdown as aT,TYPE as aU,find as aV,parse$1 as aW,parse$2 as aX,normalize$1 as aY,html$2 as aZ,svg as a_,isInForm as aa,StyledWidgetLabelHelp as ab,WidgetLabel as ac,isMaterialIcon as ad,getBorderColor as ae,TextInput$1 as af,getDefaultExportFromCjs as ag,darken as ah,PortalContext as ai,reactDomExports as aj,classNames as ak,requireReact as al,styled$1 as am,isFocusVisible as an,getOverride as ao,getOverrideProps as ap,root$4 as aq,toNumber as ar,isObject$1 as as,mergeOverrides as at,CUSTOM_INPUT_TYPE as au,ChevronDown$1 as av,PLACEMENT as aw,Icon$2 as ax,Tooltip$1 as ay,IsSidebarContext as az,BaseButton as b,util_math_ as b$,ViewStateContext as b0,useWindowDimensionsContext as b1,LocaleContext as b2,shouldWidthStretch as b3,ButtonGroup$1 as b4,LabelVisibilityMessage as b5,StyledButtonGroup as b6,NumberInput$1 as b7,useStyletron as b8,mergeOverride as b9,merge$1 as bA,getIncreasingGreen as bB,getDecreasingRed as bC,getBlue80 as bD,getGray30 as bE,getGray70 as bF,getGray90 as bG,getDivergingColorsArray as bH,keysToSnakeCase as bI,PlotlyChart$1 as bJ,themeColors as bK,isMobile as bL,UploadedFileInfo as bM,FileUploaderState as bN,__awaiter as bO,PropTypes as bP,isFromWindows as bQ,ThemeContext$1 as bR,pick$1 as bS,Slider$1 as bT,zip as bU,baseSlice as bV,baseToString as bW,trimmedEndIndex as bX,util_bn_ as bY,util_int_ as bZ,util_bit_ as b_,toObjectOverride as ba,Icon$1 as bb,DeleteAlt$1 as bc,forkBlur as bd,forkFocus as be,addCssUnit as bf,convert as bg,visitParents as bh,SKIP as bi,isDatetimeType as bj,isDateType as bk,getTimezone as bl,debounce$2 as bm,isEqual$1 as bn,shouldHeightStretch as bo,toPropertyKey$2 as bp,_setPrototypeOf$e as bq,_typeof$g as br,_assertThisInitialized$1 as bs,toExportedTheme as bt,ArrowDataframe as bu,useTimeout as bv,Skeleton$1 as bw,Skeleton as bx,ComponentRegistry as by,requirePropTypes as bz,BaseButtonSize as c,StyledCodeBlock as c$,util_buffer_ as c0,util_vector_ as c1,util_pretty_ as c2,util_interval_ as c3,compareTypes as c4,compareFields as c5,compareSchemas as c6,getAugmentedNamespace as c7,isStringType as c8,isTimeType as c9,ok as cA,stringify$1 as cB,stringify as cC,pointStart as cD,visit as cE,pointEnd as cF,structuredClone$1 as cG,identity as cH,arrayEach as cI,baseEach as cJ,isArray as cK,arrayMap as cL,baseMap as cM,baseIteratee as cN,baseForOwn as cO,isObjectLike as cP,baseGetTag as cQ,isPlainObject$3 as cR,cloneDeep$1 as cS,StatefulPopover as cT,_defineProperty$u as cU,filterOptions as cV,mergeWith as cW,commonjsGlobal as cX,StyledPre as cY,CopyButton$1 as cZ,StyledCopyButtonContainer as c_,isPeriodType as ca,isIntervalType as cb,isDurationType as cc,isDecimalType as cd,isFloatType as ce,isObjectType as cf,isListType as cg,TimeUnit as ch,Struct as ci,AcceptFileValue as cj,assertNever as ck,chatInputAcceptFileProtoValueToEnum as cl,ThemeProvider$1 as cm,createThemedStyled as cn,createThemedUseStyletron as co,createThemedWithStyle as cp,expandBorderStyles as cq,withStyle as cr,requireReactIs$1 as cs,tableFromIPC as ct,v4 as cu,requireReactDom as cv,UIDConsumer as cw,Popover$2 as cx,StatefulMenu as cy,ACCESSIBILITY_TYPE as cz,Box as d,propTypesExports as d0,index as d1,parseToRgba as d2,DeckGlJsonChart$1 as d3,hasPath as d4,isArrayLike as d5,isBuffer as d6,isTypedArray as d7,isArguments as d8,getTag as d9,css as dA,lighten as dB,mix$1 as dC,TRIGGER_TYPE as dD,StyledTooltipContentWrapper as dE,FlexContext as dF,useScrollbarGutterSize as dG,Resizable as dH,streamlit as dI,isPrototype as da,baseKeys as db,Set$1 as dc,setToArray as dd,memoize$1 as de,requireClassnames as df,groupBy as dg,flatten as dh,Vector as di,getLuminance as dj,parseIconPackEntry as dk,genericFonts as dl,getMarkdownBgColors as dm,isUnsignedIntegerType as dn,isIntegerType as dp,isBooleanType as dq,Field as dr,Null as ds,isRangeIndexType as dt,isEmptyType as du,isBytesType as dv,isCategoricalType as dw,fontSizes as dx,_objectWithoutProperties$1 as dy,jsx as dz,isNullOrUndefined as e,useCalculatedDimensions as f,useEmotionTheme as g,hoistNonReactStatics as h,isValidFormId as i,jsx$1 as j,hasLightBackgroundColor as k,jsxs as l,labelVisibilityProtoValueToEnum as m,notNullOrUndefined as n,StyledWidgetLabelHelpInline as o,StyledContent as p,StyledCheckbox$1 as q,reactExports as r,getOverrides as s,transparentize as t,useRegisterShortcut as u,SIZE$1 as v,ENHANCER_POSITION as w,styled as x,StyledDropdownListItem as y,isPropValid$1 as z};