streamlit 1.52.1__py3-none-any.whl → 1.52.2__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 (98) hide show
  1. streamlit/elements/widgets/data_editor.py +7 -1
  2. streamlit/static/index.html +1 -1
  3. streamlit/static/manifest.json +284 -284
  4. streamlit/static/static/js/{ErrorOutline.esm.sMJdFExW.js → ErrorOutline.esm.LtBTGAgi.js} +1 -1
  5. streamlit/static/static/js/{FileDownload.esm.CV-WYqBn.js → FileDownload.esm.DllwCvQc.js} +1 -1
  6. streamlit/static/static/js/{FileHelper.5nCh9KDY.js → FileHelper.DgwA_xYF.js} +1 -1
  7. streamlit/static/static/js/{FormClearHelper.-9RbsnV0.js → FormClearHelper.DyYuMYyM.js} +1 -1
  8. streamlit/static/static/js/{InputInstructions.2R3tBtW9.js → InputInstructions.ikAdmYQR.js} +1 -1
  9. streamlit/static/static/js/{Particles.DDHoXFxh.js → Particles.Cg5ey-rW.js} +1 -1
  10. streamlit/static/static/js/{ProgressBar.BxmfHxKu.js → ProgressBar.D1rDn4Rn.js} +1 -1
  11. streamlit/static/static/js/{StreamlitSyntaxHighlighter.BFWV0oqR.js → StreamlitSyntaxHighlighter.DU42g8NY.js} +1 -1
  12. streamlit/static/static/js/{Toolbar.DMgU0Vgw.js → Toolbar.0YdWjZhn.js} +1 -1
  13. streamlit/static/static/js/{base-input.BXTqYbyG.js → base-input.DYzkAUR7.js} +1 -1
  14. streamlit/static/static/js/{checkbox.5xWaqPqm.js → checkbox.YeQ8t-PZ.js} +1 -1
  15. streamlit/static/static/js/{createSuper.OIgV8wc-.js → createSuper.CXzRWZIx.js} +1 -1
  16. streamlit/static/static/js/{data-grid-overlay-editor.B4RIu9cw.js → data-grid-overlay-editor.vnwILR0p.js} +1 -1
  17. streamlit/static/static/js/{downloader.DwCJck8O.js → downloader.BdNzicWj.js} +1 -1
  18. streamlit/static/static/js/{embed.HKcgTiLB.js → embed.C_8wI7Q8.js} +1 -1
  19. streamlit/static/static/js/{es6.4AP97RGk.js → es6.D6UMoOIM.js} +2 -2
  20. streamlit/static/static/js/{iframeResizer.contentWindow.BZAsvL9q.js → iframeResizer.contentWindow.DM7vAi8H.js} +1 -1
  21. streamlit/static/static/js/{index.CxXo5UKy.js → index.0CGAg_-3.js} +1 -1
  22. streamlit/static/static/js/{index.CbiYVMT1.js → index.19XigCCW.js} +1 -1
  23. streamlit/static/static/js/{index.CqTPbV5Y.js → index.3bHSf9gi.js} +8 -8
  24. streamlit/static/static/js/{index.Da9gznCC.js → index.B1br6-J8.js} +1 -1
  25. streamlit/static/static/js/{index.DN4sfQLP.js → index.BDyX78eQ.js} +1 -1
  26. streamlit/static/static/js/{index.D52dMvK5.js → index.BEiPXRiB.js} +1 -1
  27. streamlit/static/static/js/{index.DfIRibXG.js → index.BGGsxMsK.js} +1 -1
  28. streamlit/static/static/js/{index.VFDFuf_7.js → index.BK8LGuo5.js} +1 -1
  29. streamlit/static/static/js/{index.Di9I2cid.js → index.BNH1O6vW.js} +1 -1
  30. streamlit/static/static/js/{index.CSbah0y4.js → index.BNJ18Gvk.js} +1 -1
  31. streamlit/static/static/js/{index.BKIlG7Ng.js → index.BSC_e7mC.js} +1 -1
  32. streamlit/static/static/js/{index.q4fLUQtC.js → index.BSsyTGMU.js} +1 -1
  33. streamlit/static/static/js/{index.DMU3coc2.js → index.BTeFWqxT.js} +1 -1
  34. streamlit/static/static/js/index.BVQ-x0jB.js +2 -0
  35. streamlit/static/static/js/{index.CbxllBj8.js → index.BtT26h8D.js} +1 -1
  36. streamlit/static/static/js/{index.NaDyAN1s.js → index.BuO127Fv.js} +1 -1
  37. streamlit/static/static/js/{index.CxbL5FgL.js → index.C4SaLgc9.js} +1 -1
  38. streamlit/static/static/js/{index.DY9Ac89e.js → index.C6PG_WI2.js} +1 -1
  39. streamlit/static/static/js/{index.BVuohWM1.js → index.C9ZwaDT3.js} +1 -1
  40. streamlit/static/static/js/{index.DkpEv0uV.js → index.CCH6P_Oz.js} +1 -1
  41. streamlit/static/static/js/{index.B0TPxAZ1.js → index.CJdAAsMS.js} +1 -1
  42. streamlit/static/static/js/{index.-3selq_5.js → index.CLw67zQa.js} +1 -1
  43. streamlit/static/static/js/{index.BHWBaOWH.js → index.COYdue8P.js} +1 -1
  44. streamlit/static/static/js/index.CPVPS6MS.js +1 -0
  45. streamlit/static/static/js/{index.L7erTnMm.js → index.CQRv0Buu.js} +1 -1
  46. streamlit/static/static/js/{index.BjQIH-3U.js → index.CTssS8CY.js} +1 -1
  47. streamlit/static/static/js/{index.BJas6XzW.js → index.CV56Xzvw.js} +1 -1
  48. streamlit/static/static/js/{index.DwJ9Vhsl.js → index.CVgZcb-2.js} +1 -1
  49. streamlit/static/static/js/{index.BrqtKtSu.js → index.CaMDX02c.js} +1 -1
  50. streamlit/static/static/js/{index.DRDE9rnx.js → index.Cc0FyOvj.js} +1 -1
  51. streamlit/static/static/js/{index.CP2YZ73v.js → index.CccNGpyY.js} +1 -1
  52. streamlit/static/static/js/{index.W-bl3NDo.js → index.CinPJsaI.js} +1 -1
  53. streamlit/static/static/js/{index.CIC9pLsG.js → index.Cys-qREe.js} +1 -1
  54. streamlit/static/static/js/{index.Dg5zbEp2.js → index.DATGLwZn.js} +1 -1
  55. streamlit/static/static/js/{index.Buc7XrOl.js → index.DDuPBAVu.js} +5 -5
  56. streamlit/static/static/js/{index.xZBTXGNC.js → index.DN77pJCq.js} +1 -1
  57. streamlit/static/static/js/{index.BNMLO-0p.js → index.DRgFBrOW.js} +1 -1
  58. streamlit/static/static/js/{index.RNTPpVde.js → index.Dc27IuI8.js} +1 -1
  59. streamlit/static/static/js/{index.DYKCsDvl.js → index.DdjNqo0t.js} +1 -1
  60. streamlit/static/static/js/{index.Ckcqwai8.js → index.DmQGepo0.js} +1 -1
  61. streamlit/static/static/js/{index.6UunrySF.js → index.DmaExHyk.js} +1 -1
  62. streamlit/static/static/js/{index.Cd1D2eGF.js → index.Dou8UoAD.js} +1 -1
  63. streamlit/static/static/js/{index.oyLQ4pue.js → index.Dt4MKWrN.js} +1 -1
  64. streamlit/static/static/js/{index.BMU6zZRk.js → index.M-iumICI.js} +1 -1
  65. streamlit/static/static/js/{index.XYozEjwK.js → index.NjN0yaAC.js} +1 -1
  66. streamlit/static/static/js/{index.BPmBNTel.js → index.OW6D7CJ5.js} +1 -1
  67. streamlit/static/static/js/{index.DBUdji-9.js → index.SnIe8o_F.js} +1 -1
  68. streamlit/static/static/js/{index.1ylynMAS.js → index.xg87JKI8.js} +1 -1
  69. streamlit/static/static/js/{input.CcvrgErO.js → input.-I2c-pPm.js} +1 -1
  70. streamlit/static/static/js/{main.eVHOp4Th.js → main.zgyqwsPV.js} +1 -1
  71. streamlit/static/static/js/{memory.Ck_sLv5Y.js → memory.BTaCc67b.js} +1 -1
  72. streamlit/static/static/js/{number-overlay-editor.DgcLMWOy.js → number-overlay-editor.Bp2-OIVN.js} +1 -1
  73. streamlit/static/static/js/{pandasStylerUtils.DqP0h70z.js → pandasStylerUtils.PlmC_Sod.js} +1 -1
  74. streamlit/static/static/js/{possibleConstructorReturn.C_51n46K.js → possibleConstructorReturn.D2vivPxX.js} +1 -1
  75. streamlit/static/static/js/{sandbox.Q-g3QIZJ.js → sandbox.C-NkJg85.js} +1 -1
  76. streamlit/static/static/js/{styled-components.e0V96rJw.js → styled-components.-ywQNIcz.js} +1 -1
  77. streamlit/static/static/js/{throttle.D3b5WILl.js → throttle.SbSFuU2P.js} +1 -1
  78. streamlit/static/static/js/{timepicker.Bpn70xGc.js → timepicker.BRg2LlYz.js} +1 -1
  79. streamlit/static/static/js/{toConsumableArray.DIN_ys1J.js → toConsumableArray.DmYuqCFN.js} +1 -1
  80. streamlit/static/static/js/uniqueId.DDLECwS_.js +1 -0
  81. streamlit/static/static/js/{useBasicWidgetState.DA3_qaXD.js → useBasicWidgetState.CSKMY_WY.js} +1 -1
  82. streamlit/static/static/js/{useIntlLocale.BSq6SANa.js → useIntlLocale.DrzrdT6m.js} +1 -1
  83. streamlit/static/static/js/{useTextInputAutoExpand.ytEW5QmA.js → useTextInputAutoExpand.BZ_dM91Q.js} +1 -1
  84. streamlit/static/static/js/{useUpdateUiValue.DOxWBNiI.js → useUpdateUiValue.y-s71G-M.js} +1 -1
  85. streamlit/static/static/js/{useWaveformController.BCmk6WLk.js → useWaveformController.Bumwfqnl.js} +1 -1
  86. streamlit/static/static/js/{withCalculatedWidth.ChdrMItN.js → withCalculatedWidth.Dl_TDMaA.js} +1 -1
  87. streamlit/static/static/js/{withFullScreenWrapper.7j_lzlaF.js → withFullScreenWrapper.CWEBbO_P.js} +1 -1
  88. streamlit/web/server/authlib_tornado_integration.py +60 -0
  89. streamlit/web/server/oidc_mixin.py +14 -3
  90. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/METADATA +1 -1
  91. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/RECORD +95 -95
  92. streamlit/static/static/js/index.B_AvdOKC.js +0 -1
  93. streamlit/static/static/js/index.q9puCQgK.js +0 -2
  94. streamlit/static/static/js/uniqueId.B27POWT6.js +0 -1
  95. {streamlit-1.52.1.data → streamlit-1.52.2.data}/scripts/streamlit.cmd +0 -0
  96. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/WHEEL +0 -0
  97. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/entry_points.txt +0 -0
  98. {streamlit-1.52.1.dist-info → streamlit-1.52.2.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.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]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.Dou8UoAD.js","./index.BEiPXRiB.js","./index.DRgFBrOW.js","./index.CinPJsaI.js","./index.BGGsxMsK.js","./index.CTssS8CY.js","./pandasStylerUtils.PlmC_Sod.js","./moment.C3j7ZXd7.js","./_baseIndexOf.BTknn6Gb.js","./index.Dt4MKWrN.js","./withFullScreenWrapper.CWEBbO_P.js","./Toolbar.0YdWjZhn.js","./index.DDuPBAVu.js","./FormClearHelper.DyYuMYyM.js","./sprintf.D7DtBTRn.js","./index.8HslT92O.js","./main.zgyqwsPV.js","./throttle.SbSFuU2P.js","./checkbox.YeQ8t-PZ.js","./createDownloadLinkElement.ZaXNnPK4.js","./toConsumableArray.DmYuqCFN.js","./possibleConstructorReturn.D2vivPxX.js","./createSuper.CXzRWZIx.js","./FileDownload.esm.DllwCvQc.js","./_arrayIncludes.B19Iyn2B.js","../css/index.DgR7E2CV.css","./embed.C_8wI7Q8.js","./threshold.Q1mXg5rX.js","./value.B4vHRSi7.js","./timer.C2hYhUse.js","./index.C4SaLgc9.js","./Particles.Cg5ey-rW.js","./index.DATGLwZn.js","./useBasicWidgetState.CSKMY_WY.js","../css/index.DzuxGC_t.css","./index.BSC_e7mC.js","./index.BNH1O6vW.js","./IFrameUtil.DefezniK.js","./index.CJdAAsMS.js","./index.Cys-qREe.js","./index.BK8LGuo5.js","./index.DmaExHyk.js","./index.OW6D7CJ5.js","./ProgressBar.D1rDn4Rn.js","./index.xg87JKI8.js","./index.19XigCCW.js","./useWaveformController.Bumwfqnl.js","./urls.BwSlolu9.js","./index.CaMDX02c.js","./index.BSsyTGMU.js","./withCalculatedWidth.Dl_TDMaA.js","./index.BtT26h8D.js","./UploadFileInfo.C-jY39rj.js","./index.CVgZcb-2.js","./FileHelper.DgwA_xYF.js","./InputInstructions.ikAdmYQR.js","./useTextInputAutoExpand.BZ_dM91Q.js","./base-input.DYzkAUR7.js","./inputUtils.CptNuJwn.js","./ErrorOutline.esm.LtBTGAgi.js","./index.Dc27IuI8.js","./index.BNJ18Gvk.js","./index.CV56Xzvw.js","./useIntlLocale.DrzrdT6m.js","./timepicker.BRg2LlYz.js","./input.-I2c-pPm.js","./index.NjN0yaAC.js","./styled-components.-ywQNIcz.js","./index.CccNGpyY.js","./index.DN77pJCq.js","./index.COYdue8P.js","./index.BTeFWqxT.js","./index.CCH6P_Oz.js","./uniqueId.DDLECwS_.js","./index.C6PG_WI2.js","./index.Cc0FyOvj.js","./index.DmQGepo0.js","./index.DdjNqo0t.js","./useUpdateUiValue.y-s71G-M.js","./index.0CGAg_-3.js","./index.SnIe8o_F.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(`
@@ -43,7 +43,7 @@ but was expecting \`${JSON.stringify(t)}\`.
43
43
  `;const g=new DebugVisitor(y,!0);o+=e.accept(g)}),o}}var classnames={exports:{}};var hasRequiredClassnames;function requireClassnames(){return hasRequiredClassnames||(hasRequiredClassnames=1,function(n){(function(){var o={}.hasOwnProperty;function e(){for(var p="",h=0;h<arguments.length;h++){var y=arguments[h];y&&(p=c(p,t(y)))}return p}function t(p){if(typeof p=="string"||typeof p=="number")return p;if(typeof p!="object")return"";if(Array.isArray(p))return e.apply(null,p);if(p.toString!==Object.prototype.toString&&!p.toString.toString().includes("[native code]"))return p.toString();var h="";for(var y in p)o.call(p,y)&&p[y]&&(h=c(h,y));return h}function c(p,h){return h?p?p+" "+h:p+h:p}n.exports?(e.default=e,n.exports=e):window.classNames=e})()}(classnames)),classnames.exports}var classnamesExports=requireClassnames();const classNames=getDefaultExportFromCjs(classnamesExports);var Direction=function(n){return n.HORIZONTAL="row",n.VERTICAL="column",n}({});function getDirectionOfBlock(n){return n.flexContainer?n.flexContainer.direction==Block$1.FlexContainer.Direction.HORIZONTAL?"row":"column":n.vertical?"column":n.horizontal?"row":"column"}function shouldWidthStretch(n){return!!(n?.useStretch||n?.pixelWidth)}function shouldHeightStretch(n){return!!(n?.useStretch||n?.pixelHeight)}const alignmentMap={[streamlit.TextAlignmentConfig.Alignment.LEFT]:"left",[streamlit.TextAlignmentConfig.Alignment.CENTER]:"center",[streamlit.TextAlignmentConfig.Alignment.RIGHT]:"right",[streamlit.TextAlignmentConfig.Alignment.JUSTIFY]:"justify",[streamlit.TextAlignmentConfig.Alignment.UNSPECIFIED]:"left"};function getTextAlignmentStyle(n){if(n?.alignment)return alignmentMap[n.alignment]||"left"}const FlexContext=reactExports.createContext(null);FlexContext.displayName="FlexContext";const FlexContextProvider=({children:n,direction:o,isRoot:e,parentWidth:t,hasContentWidth:c=!1,hasFixedWidth:p=!1,parentContext:h=null})=>{const y=reactExports.useMemo(()=>{const g=o===Direction.HORIZONTAL;let $;return c?$=!0:p?$=!1:$=h?.isInContentWidthContainer??!1,{direction:o,isInHorizontalLayout:g,isInRoot:e??!1,parentWidth:t,isInContentWidthContainer:$}},[o,e,t,c,p,h]);return jsx$1(FlexContext.Provider,{value:y,children:n})};function guard(n,o,e){return Math.min(Math.max(n,e),o)}class ColorError extends Error{constructor(o){super(`Failed to parse color: "${o}"`)}}var ColorError$1=ColorError;function parseToRgba(n){if(typeof n!="string")throw new ColorError$1(n);if(n.trim().toLowerCase()==="transparent")return[0,0,0,0];let o=n.trim();o=namedColorRegex.test(n)?nameToHex(n):n;const e=reducedHexRegex.exec(o);if(e){const h=Array.from(e).slice(1);return[...h.slice(0,3).map(y=>parseInt(r(y,2),16)),parseInt(r(h[3]||"f",2),16)/255]}const t=hexRegex.exec(o);if(t){const h=Array.from(t).slice(1);return[...h.slice(0,3).map(y=>parseInt(y,16)),parseInt(h[3]||"ff",16)/255]}const c=rgbaRegex.exec(o);if(c){const h=Array.from(c).slice(1);return[...h.slice(0,3).map(y=>parseInt(y,10)),parseFloat(h[3]||"1")]}const p=hslaRegex.exec(o);if(p){const[h,y,g,$]=Array.from(p).slice(1).map(parseFloat);if(guard(0,100,y)!==y)throw new ColorError$1(n);if(guard(0,100,g)!==g)throw new ColorError$1(n);return[...hslToRgb(h,y,g),Number.isNaN($)?1:$]}throw new ColorError$1(n)}function hash(n){let o=5381,e=n.length;for(;e;)o=o*33^n.charCodeAt(--e);return(o>>>0)%2341}const colorToInt=n=>parseInt(n.replace(/_/g,""),36),compressedColorMap="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((n,o)=>{const e=colorToInt(o.substring(0,3)),t=colorToInt(o.substring(3)).toString(16);let c="";for(let p=0;p<6-t.length;p++)c+="0";return n[e]=`${c}${t}`,n},{});function nameToHex(n){const o=n.toLowerCase().trim(),e=compressedColorMap[hash(o)];if(!e)throw new ColorError$1(n);return`#${e}`}const r=(n,o)=>Array.from(Array(o)).map(()=>n).join(""),reducedHexRegex=new RegExp(`^#${r("([a-f0-9])",3)}([a-f0-9])?$`,"i"),hexRegex=new RegExp(`^#${r("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),rgbaRegex=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${r(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),hslaRegex=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,namedColorRegex=/^[a-z]+$/i,roundColor=n=>Math.round(n*255),hslToRgb=(n,o,e)=>{let t=e/100;if(o===0)return[t,t,t].map(roundColor);const c=(n%360+360)%360/60,p=(1-Math.abs(2*t-1))*(o/100),h=p*(1-Math.abs(c%2-1));let y=0,g=0,$=0;c>=0&&c<1?(y=p,g=h):c>=1&&c<2?(y=h,g=p):c>=2&&c<3?(g=p,$=h):c>=3&&c<4?(g=h,$=p):c>=4&&c<5?(y=h,$=p):c>=5&&c<6&&(y=p,$=h);const E=t-p/2,A=y+E,N=g+E,H=$+E;return[A,N,H].map(roundColor)};function parseToHsla(n){const[o,e,t,c]=parseToRgba(n).map((A,N)=>N===3?A:A/255),p=Math.max(o,e,t),h=Math.min(o,e,t),y=(p+h)/2;if(p===h)return[0,0,y,c];const g=p-h,$=y>.5?g/(2-p-h):g/(p+h);return[60*(o===p?(e-t)/g+(e<t?6:0):e===p?(t-o)/g+2:(o-e)/g+4),$,y,c]}function hsla(n,o,e,t){return`hsla(${(n%360).toFixed()}, ${guard(0,100,o*100).toFixed()}%, ${guard(0,100,e*100).toFixed()}%, ${parseFloat(guard(0,1,t).toFixed(3))})`}function darken(n,o){const[e,t,c,p]=parseToHsla(n);return hsla(e,t,c-o,p)}function getLuminance(n){if(n==="transparent")return 0;function o(p){const h=p/255;return h<=.04045?h/12.92:Math.pow((h+.055)/1.055,2.4)}const[e,t,c]=parseToRgba(n);return .2126*o(e)+.7152*o(t)+.0722*o(c)}function rgba$1(n,o,e,t){return`rgba(${guard(0,255,n).toFixed()}, ${guard(0,255,o).toFixed()}, ${guard(0,255,e).toFixed()}, ${parseFloat(guard(0,1,t).toFixed(3))})`}function mix$1(n,o,e){const t=(Ne,Fe)=>Fe===3?Ne:Ne/255,[c,p,h,y]=parseToRgba(n).map(t),[g,$,E,A]=parseToRgba(o).map(t),N=A-y,H=e*2-1,X=((H*N===-1?H:H+N/(1+H*N))+1)/2,be=1-X,we=(c*be+g*X)*255,$e=(p*be+$*X)*255,Ce=(h*be+E*X)*255,Ie=A*e+y*(1-e);return rgba$1(we,$e,Ce,Ie)}function lighten(n,o){return darken(n,-o)}function transparentize(n,o){const[e,t,c,p]=parseToRgba(n);return rgba$1(e,t,c,p-o)}function toHex(n){const[o,e,t,c]=parseToRgba(n);let p=h=>{const y=guard(0,255,h).toString(16);return y.length===1?`0${y}`:y};return`#${p(o)}${p(e)}${p(t)}${c<1?p(Math.round(c*255)):""}`}var colors$1={white:"#FFFFFF",gray50:"#F6F6F6",gray100:"#EEEEEE",gray200:"#E2E2E2",gray300:"#CBCBCB",gray400:"#AFAFAF",gray500:"#6B6B6B",gray600:"#545454",gray700:"#333333",gray800:"#1F1F1F",gray900:"#141414",black:"#000000",platinum400:"#8EA3AD",red50:"#FFEFED",red100:"#FED7D2",red200:"#F1998E",red300:"#E85C4A",red400:"#E11900",red500:"#AB1300",red600:"#870F00",red700:"#5A0A00",orange200:"#FABDA5",orange300:"#FA9269",orange400:"#FF6937",orange500:"#C14F29",orange600:"#9A3F21",orange700:"#672A16",yellow50:"#FFFAF0",yellow100:"#FFF2D9",yellow200:"#FFE3AC",yellow300:"#FFCF70",yellow400:"#FFC043",yellow500:"#BC8B2C",yellow600:"#996F00",yellow700:"#674D1B",green50:"#E6F2ED",green100:"#ADDEC9",green200:"#66D19E",green300:"#06C167",green400:"#048848",green500:"#03703C",green600:"#03582F",green700:"#10462D",blue50:"#EFF3FE",blue100:"#D4E2FC",blue200:"#A0BFF8",blue300:"#5B91F5",blue400:"#276EF1",blue500:"#1E54B7",blue600:"#174291",blue700:"#102C60",cobalt400:"#0E1FC1",purple200:"#C1B4E2",purple300:"#957FCE",purple400:"#7356BF",purple500:"#574191",purple600:"#453473",purple700:"#2E224C",brown200:"#D2BBB0",brown300:"#B18977",brown400:"#99644C",brown500:"#744C3A",brown600:"#5C3C2E",brown700:"#3D281E"},lightColorTokens={primaryA:colors$1.black,primaryB:colors$1.white,primary:colors$1.black,primary50:colors$1.gray50,primary100:colors$1.gray100,primary200:colors$1.gray200,primary300:colors$1.gray300,primary400:colors$1.gray400,primary500:colors$1.gray500,primary600:colors$1.gray600,primary700:colors$1.gray700,accent:colors$1.blue400,accent50:colors$1.blue50,accent100:colors$1.blue100,accent200:colors$1.blue200,accent300:colors$1.blue300,accent400:colors$1.blue400,accent500:colors$1.blue500,accent600:colors$1.blue600,accent700:colors$1.blue700,negative:colors$1.red400,negative50:colors$1.red50,negative100:colors$1.red100,negative200:colors$1.red200,negative300:colors$1.red300,negative400:colors$1.red400,negative500:colors$1.red500,negative600:colors$1.red600,negative700:colors$1.red700,warning:colors$1.yellow400,warning50:colors$1.yellow50,warning100:colors$1.yellow100,warning200:colors$1.yellow200,warning300:colors$1.yellow300,warning400:colors$1.yellow400,warning500:colors$1.yellow500,warning600:colors$1.yellow600,warning700:colors$1.yellow700,positive:colors$1.green500,positive50:colors$1.green50,positive100:colors$1.green100,positive200:colors$1.green200,positive300:colors$1.green300,positive400:colors$1.green400,positive500:colors$1.green500,positive600:colors$1.green600,positive700:colors$1.green700,white:colors$1.white,black:colors$1.black,mono100:colors$1.white,mono200:colors$1.gray50,mono300:colors$1.gray100,mono400:colors$1.gray200,mono500:colors$1.gray300,mono600:colors$1.gray400,mono700:colors$1.gray500,mono800:colors$1.gray600,mono900:colors$1.gray700,mono1000:colors$1.black,ratingInactiveFill:colors$1.gray100,ratingStroke:colors$1.gray300};function hexToRgb(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"1",e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;n=n.replace(e,function(c,p,h,y){return p+p+h+h+y+y});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return t?"rgba(".concat(parseInt(t[1],16),", ").concat(parseInt(t[2],16),", ").concat(parseInt(t[3],16),", ").concat(o,")"):null}var ellipsisText={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",wordWrap:"normal"};function expandBorderStyles(n){return{borderTopWidth:n.borderWidth,borderTopStyle:n.borderStyle,borderTopColor:n.borderColor,borderBottomWidth:n.borderWidth,borderBottomStyle:n.borderStyle,borderBottomColor:n.borderColor,borderLeftWidth:n.borderWidth,borderLeftStyle:n.borderStyle,borderLeftColor:n.borderColor,borderRightWidth:n.borderWidth,borderRightStyle:n.borderStyle,borderRightColor:n.borderColor}}function ownKeys$y(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$w(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$y(Object(e),!0).forEach(function(t){_defineProperty$F(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$y(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$F(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}const getSemanticColorTokens=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lightColorTokens,o={backgroundPrimary:n.primaryB,backgroundSecondary:colors$1.gray50,backgroundTertiary:colors$1.gray100,backgroundInversePrimary:n.primaryA,backgroundInverseSecondary:colors$1.gray800,contentPrimary:n.primaryA,contentSecondary:colors$1.gray600,contentTertiary:colors$1.gray500,contentInversePrimary:n.primaryB,contentInverseSecondary:colors$1.gray300,contentInverseTertiary:colors$1.gray400,borderOpaque:colors$1.gray200,borderTransparent:hexToRgb(n.primaryA,"0.08"),borderSelected:n.primaryA,borderInverseOpaque:colors$1.gray700,borderInverseTransparent:hexToRgb(n.primaryB,"0.2"),borderInverseSelected:n.primaryB},e={backgroundStateDisabled:colors$1.gray50,backgroundOverlayDark:hexToRgb(colors$1.black,"0.3"),backgroundOverlayLight:hexToRgb(colors$1.black,"0.08"),backgroundOverlayArt:hexToRgb(colors$1.black,"0.00"),backgroundAccent:n.accent,backgroundNegative:n.negative,backgroundWarning:n.warning,backgroundPositive:colors$1.green400,backgroundLightAccent:colors$1.blue50,backgroundLightNegative:colors$1.red50,backgroundLightWarning:colors$1.yellow50,backgroundLightPositive:colors$1.green50,backgroundAlwaysDark:colors$1.black,backgroundAlwaysLight:colors$1.white,contentStateDisabled:colors$1.gray400,contentAccent:n.accent,contentOnColor:colors$1.white,contentOnColorInverse:colors$1.black,contentNegative:n.negative,contentWarning:colors$1.yellow600,contentPositive:colors$1.green400,borderStateDisabled:colors$1.gray50,borderAccent:colors$1.blue400,borderAccentLight:colors$1.blue200,borderNegative:colors$1.red200,borderWarning:colors$1.yellow200,borderPositive:colors$1.green200,safety:colors$1.blue400,eatsGreen400:colors$1.green400,freightBlue400:colors$1.cobalt400,jumpRed400:colors$1.red400,rewardsTier1:colors$1.blue400,rewardsTier2:colors$1.yellow400,rewardsTier3:colors$1.platinum400,rewardsTier4:colors$1.black,membership:colors$1.yellow600};return _objectSpread$w(_objectSpread$w({},o),e)};var tagHoverBackground="rgba(0, 0, 0, 0.08)";const getComponentColorTokens=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lightColorTokens;return{bannerActionLowInfo:n.accent100,bannerActionLowNegative:n.negative100,bannerActionLowPositive:n.positive100,bannerActionLowWarning:n.warning200,bannerActionHighInfo:n.accent500,bannerActionHighNegative:n.negative500,bannerActionHighPositive:n.positive500,bannerActionHighWarning:n.warning200,buttonPrimaryFill:n.primary,buttonPrimaryText:n.white,buttonPrimaryHover:n.primary700,buttonPrimaryActive:n.primary600,buttonPrimarySelectedFill:n.primary600,buttonPrimarySelectedText:n.white,buttonPrimarySpinnerForeground:n.accent,buttonPrimarySpinnerBackground:n.primaryB,buttonSecondaryFill:n.primary100,buttonSecondaryText:n.primary,buttonSecondaryHover:n.primary200,buttonSecondaryActive:n.primary300,buttonSecondarySelectedFill:n.primary300,buttonSecondarySelectedText:n.primary,buttonSecondarySpinnerForeground:n.accent,buttonSecondarySpinnerBackground:n.primaryB,buttonTertiaryFill:"transparent",buttonTertiaryText:n.primary,buttonTertiaryHover:n.primary50,buttonTertiaryActive:n.primary100,buttonTertiarySelectedFill:n.primary100,buttonTertiarySelectedText:n.primary,buttonTertiaryDisabledActiveFill:n.primary50,buttonTertiaryDisabledActiveText:n.mono600,buttonTertiarySpinnerForeground:n.accent,buttonTertiarySpinnerBackground:n.primary100,buttonDisabledFill:n.mono200,buttonDisabledText:n.mono600,buttonDisabledActiveFill:n.mono700,buttonDisabledActiveText:n.mono100,buttonDisabledSpinnerForeground:n.mono600,buttonDisabledSpinnerBackground:n.mono400,breadcrumbsText:n.black,breadcrumbsSeparatorFill:n.mono700,calendarBackground:n.mono100,calendarForeground:n.mono1000,calendarForegroundDisabled:n.mono500,calendarHeaderBackground:n.white,calendarHeaderForeground:n.primary,calendarHeaderBackgroundActive:n.primary700,calendarHeaderForegroundDisabled:n.primary500,calendarDayForegroundPseudoSelected:n.mono1000,calendarDayBackgroundPseudoSelectedHighlighted:n.primary200,calendarDayForegroundPseudoSelectedHighlighted:n.mono1000,calendarDayBackgroundSelected:n.primary,calendarDayForegroundSelected:n.white,calendarDayBackgroundSelectedHighlighted:n.primary,calendarDayForegroundSelectedHighlighted:n.white,comboboxListItemFocus:n.mono200,comboboxListItemHover:n.mono300,fileUploaderBackgroundColor:n.mono200,fileUploaderBackgroundColorActive:n.primary50,fileUploaderBorderColorActive:n.primary,fileUploaderBorderColorDefault:n.mono500,fileUploaderMessageColor:n.mono800,linkText:n.primary,linkVisited:n.primary700,linkHover:n.primary600,linkActive:n.primary500,listHeaderFill:n.white,listBodyFill:n.white,progressStepsCompletedText:n.white,progressStepsCompletedFill:n.primary,progressStepsActiveText:n.white,progressStepsActiveFill:n.primary,toggleFill:n.white,toggleFillChecked:n.primary,toggleFillDisabled:n.mono600,toggleTrackFill:n.mono400,toggleTrackFillDisabled:n.mono300,tickFill:n.mono100,tickFillHover:n.mono200,tickFillActive:n.mono300,tickFillSelected:n.primary,tickFillSelectedHover:n.primary700,tickFillSelectedHoverActive:n.primary600,tickFillError:n.negative50,tickFillErrorHover:n.negative100,tickFillErrorHoverActive:n.negative200,tickFillErrorSelected:n.negative400,tickFillErrorSelectedHover:n.negative500,tickFillErrorSelectedHoverActive:n.negative600,tickFillDisabled:n.mono600,tickBorder:n.mono700,tickBorderError:n.negative400,tickMarkFill:n.white,tickMarkFillError:n.white,tickMarkFillDisabled:n.mono100,sliderTrackFill:"transparent",sliderHandleFill:n.primaryA,sliderHandleFillDisabled:n.primary400,sliderHandleInnerFill:n.primaryA,sliderTrackFillHover:n.mono500,sliderTrackFillActive:n.mono600,sliderTrackFillDisabled:n.mono300,sliderHandleInnerFillDisabled:n.mono400,sliderHandleInnerFillSelectedHover:n.primary,sliderHandleInnerFillSelectedActive:n.primary500,inputBorder:n.mono300,inputFill:n.mono300,inputFillError:n.negative50,inputFillDisabled:n.mono200,inputFillActive:n.mono200,inputFillPositive:n.positive50,inputTextDisabled:n.mono600,inputBorderError:n.negative200,inputBorderPositive:n.positive200,inputEnhancerFill:n.mono300,inputEnhancerFillDisabled:n.mono300,inputEnhancerTextDisabled:n.mono600,inputPlaceholder:n.mono700,inputPlaceholderDisabled:n.mono600,menuFill:n.mono100,menuFillHover:n.mono200,menuFontDefault:n.mono800,menuFontDisabled:n.mono500,menuFontHighlighted:n.mono1000,menuFontSelected:n.mono1000,modalCloseColor:n.mono1000,modalCloseColorHover:n.mono800,modalCloseColorFocus:n.mono800,tabBarFill:n.mono200,tabColor:n.mono800,notificationInfoBackground:n.accent50,notificationInfoText:n.primaryA,notificationPositiveBackground:n.positive50,notificationPositiveText:n.primaryA,notificationWarningBackground:n.warning50,notificationWarningText:n.primaryA,notificationNegativeBackground:n.negative50,notificationNegativeText:n.primaryA,tagFontDisabledRampUnit:"100",tagSolidFontRampUnit:"0",tagSolidRampUnit:"400",tagOutlinedFontRampUnit:"400",tagOutlinedRampUnit:"200",tagSolidHoverRampUnit:"50",tagSolidActiveRampUnit:"100",tagSolidDisabledRampUnit:"50",tagSolidFontHoverRampUnit:"500",tagLightRampUnit:"50",tagLightHoverRampUnit:"100",tagLightActiveRampUnit:"100",tagLightFontRampUnit:"500",tagLightFontHoverRampUnit:"500",tagOutlinedHoverRampUnit:"50",tagOutlinedActiveRampUnit:"0",tagOutlinedFontHoverRampUnit:"400",tagNeutralFontDisabled:n.mono600,tagNeutralOutlinedDisabled:n.mono400,tagNeutralSolidFont:n.white,tagNeutralSolidBackground:n.black,tagNeutralOutlinedBackground:n.mono600,tagNeutralOutlinedFont:n.black,tagNeutralSolidHover:n.mono300,tagNeutralSolidActive:n.mono400,tagNeutralSolidDisabled:n.mono200,tagNeutralSolidFontHover:n.mono900,tagNeutralLightBackground:n.mono300,tagNeutralLightHover:n.mono300,tagNeutralLightActive:n.mono400,tagNeutralLightDisabled:n.mono200,tagNeutralLightFont:n.mono900,tagNeutralLightFontHover:n.mono900,tagNeutralOutlinedActive:n.mono900,tagNeutralOutlinedFontHover:n.mono800,tagNeutralOutlinedHover:tagHoverBackground,tagPrimaryFontDisabled:n.primary400,tagPrimaryOutlinedDisabled:n.primary200,tagPrimarySolidFont:n.white,tagPrimarySolidBackground:n.primary,tagPrimaryOutlinedFontHover:n.primary,tagPrimaryOutlinedFont:n.primary,tagPrimarySolidHover:n.primary100,tagPrimarySolidActive:n.primary200,tagPrimarySolidDisabled:n.primary50,tagPrimarySolidFontHover:n.primary700,tagPrimaryLightBackground:n.primary50,tagPrimaryLightHover:n.primary100,tagPrimaryLightActive:n.primary100,tagPrimaryLightDisabled:n.primary50,tagPrimaryLightFont:n.primary500,tagPrimaryLightFontHover:n.primary500,tagPrimaryOutlinedActive:n.primary600,tagPrimaryOutlinedHover:tagHoverBackground,tagPrimaryOutlinedBackground:n.primary400,tagAccentFontDisabled:n.accent200,tagAccentOutlinedDisabled:n.accent200,tagAccentSolidFont:n.white,tagAccentSolidBackground:n.accent400,tagAccentOutlinedBackground:n.accent200,tagAccentOutlinedFont:n.accent400,tagAccentSolidHover:n.accent50,tagAccentSolidActive:n.accent100,tagAccentSolidDisabled:n.accent50,tagAccentSolidFontHover:n.accent500,tagAccentLightBackground:n.accent50,tagAccentLightHover:n.accent100,tagAccentLightActive:n.accent100,tagAccentLightDisabled:n.accent50,tagAccentLightFont:n.accent500,tagAccentLightFontHover:n.accent500,tagAccentOutlinedActive:n.accent600,tagAccentOutlinedFontHover:n.accent400,tagAccentOutlinedHover:tagHoverBackground,tagPositiveFontDisabled:n.positive200,tagPositiveOutlinedDisabled:n.positive200,tagPositiveSolidFont:n.white,tagPositiveSolidBackground:n.positive400,tagPositiveOutlinedBackground:n.positive200,tagPositiveOutlinedFont:n.positive400,tagPositiveSolidHover:n.positive50,tagPositiveSolidActive:n.positive100,tagPositiveSolidDisabled:n.positive50,tagPositiveSolidFontHover:n.positive500,tagPositiveLightBackground:n.positive50,tagPositiveLightHover:n.positive100,tagPositiveLightActive:n.positive100,tagPositiveLightDisabled:n.positive50,tagPositiveLightFont:n.positive500,tagPositiveLightFontHover:n.positive500,tagPositiveOutlinedActive:n.positive600,tagPositiveOutlinedFontHover:n.positive400,tagPositiveOutlinedHover:tagHoverBackground,tagWarningFontDisabled:n.warning300,tagWarningOutlinedDisabled:n.warning300,tagWarningSolidFont:n.warning700,tagWarningSolidBackground:n.warning400,tagWarningOutlinedBackground:n.warning300,tagWarningOutlinedFont:n.warning600,tagWarningSolidHover:n.warning50,tagWarningSolidActive:n.warning100,tagWarningSolidDisabled:n.warning50,tagWarningSolidFontHover:n.warning500,tagWarningLightBackground:n.warning50,tagWarningLightHover:n.warning100,tagWarningLightActive:n.warning100,tagWarningLightDisabled:n.warning50,tagWarningLightFont:n.warning500,tagWarningLightFontHover:n.warning500,tagWarningOutlinedActive:n.warning600,tagWarningOutlinedFontHover:n.warning600,tagWarningOutlinedHover:tagHoverBackground,tagNegativeFontDisabled:n.negative200,tagNegativeOutlinedDisabled:n.negative200,tagNegativeSolidFont:n.white,tagNegativeSolidBackground:n.negative400,tagNegativeOutlinedBackground:n.negative200,tagNegativeOutlinedFont:n.negative400,tagNegativeSolidHover:n.negative50,tagNegativeSolidActive:n.negative100,tagNegativeSolidDisabled:n.negative50,tagNegativeSolidFontHover:n.negative500,tagNegativeLightBackground:n.negative50,tagNegativeLightHover:n.negative100,tagNegativeLightActive:n.negative100,tagNegativeLightDisabled:n.negative50,tagNegativeLightFont:n.negative500,tagNegativeLightFontHover:n.negative500,tagNegativeOutlinedActive:n.negative600,tagNegativeOutlinedFontHover:n.negative400,tagNegativeOutlinedHover:tagHoverBackground,tableHeadBackgroundColor:n.mono100,tableBackground:n.mono100,tableStripedBackground:n.mono200,tableFilter:n.mono600,tableFilterHeading:n.mono700,tableFilterBackground:n.mono100,tableFilterFooterBackground:n.mono200,toastText:n.white,toastPrimaryText:n.white,toastInfoBackground:n.accent400,toastInfoText:n.white,toastPositiveBackground:n.positive400,toastPositiveText:n.white,toastWarningBackground:n.warning400,toastWarningText:n.black,toastNegativeBackground:n.negative400,toastNegativeText:n.white,spinnerTrackFill:n.mono900,progressbarTrackFill:n.mono900,tooltipBackground:n.mono900,tooltipText:n.mono100}};var borders={border100:{borderColor:"hsla(0, 0%, 0%, 0.04)",borderStyle:"solid",borderWidth:"1px"},border200:{borderColor:"hsla(0, 0%, 0%, 0.08)",borderStyle:"solid",borderWidth:"1px"},border300:{borderColor:"hsla(0, 0%, 0%, 0.12)",borderStyle:"solid",borderWidth:"1px"},border400:{borderColor:"hsla(0, 0%, 0%, 0.16)",borderStyle:"solid",borderWidth:"1px"},border500:{borderColor:"hsla(0, 0%, 0%, 0.2)",borderStyle:"solid",borderWidth:"1px"},border600:{borderColor:"hsla(0, 0%, 0%, 0.24)",borderStyle:"solid",borderWidth:"1px"},radius100:"2px",radius200:"4px",radius300:"8px",radius400:"12px",radius500:"16px",useRoundedCorners:!0,buttonBorderRadiusMini:"4px",buttonBorderRadius:"8px",checkboxBorderRadius:"0px",inputBorderRadiusMini:"4px",inputBorderRadius:"8px",popoverBorderRadius:"8px",surfaceBorderRadius:"0px",tagBorderRadius:"24px"},lighting={shadow400:"0 1px 4px hsla(0, 0%, 0%, 0.16)",shadow500:"0 2px 8px hsla(0, 0%, 0%, 0.16)",shadow600:"0 4px 16px hsla(0, 0%, 0%, 0.16)",shadow700:"0 8px 24px hsla(0, 0%, 0%, 0.16)",overlay0:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0)",overlay100:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.04)",overlay200:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.08)",overlay300:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.12)",overlay400:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.16)",overlay500:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.2)",overlay600:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.24)",shallowAbove:"0px -4px 16px rgba(0, 0, 0, 0.12)",shallowBelow:"0px 4px 16px rgba(0, 0, 0, 0.12)",deepAbove:"0px -16px 48px rgba(0, 0, 0, 0.22)",deepBelow:"0px 16px 48px rgba(0, 0, 0, 0.22)"};function ownKeys$x(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$v(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$x(Object(e),!0).forEach(function(t){_defineProperty$E(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$x(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$E(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var defaultFontTokens={primaryFontFamily:'system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif'},monoFontFamily='"Lucida Console", Monaco, monospace';const getTypography=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:defaultFontTokens,o={fontFamily:n.primaryFontFamily,fontSize:"12px",fontWeight:"normal",lineHeight:"20px"},e={fontFamily:n.primaryFontFamily,fontSize:"12px",fontWeight:500,lineHeight:"16px"},t={fontFamily:n.primaryFontFamily,fontSize:"14px",fontWeight:"normal",lineHeight:"20px"},c={fontFamily:n.primaryFontFamily,fontSize:"14px",fontWeight:500,lineHeight:"16px"},p={fontFamily:n.primaryFontFamily,fontSize:"16px",fontWeight:"normal",lineHeight:"24px"},h={fontFamily:n.primaryFontFamily,fontSize:"16px",fontWeight:500,lineHeight:"20px"},y={fontFamily:n.primaryFontFamily,fontSize:"18px",fontWeight:"normal",lineHeight:"28px"},g={fontFamily:n.primaryFontFamily,fontSize:"18px",fontWeight:500,lineHeight:"24px"},$={fontFamily:n.primaryFontFamily,fontSize:"20px",fontWeight:700,lineHeight:"28px"},E={fontFamily:n.primaryFontFamily,fontSize:"24px",fontWeight:700,lineHeight:"32px"},A={fontFamily:n.primaryFontFamily,fontSize:"28px",fontWeight:700,lineHeight:"36px"},N={fontFamily:n.primaryFontFamily,fontSize:"32px",fontWeight:700,lineHeight:"40px"},H={fontFamily:n.primaryFontFamily,fontSize:"36px",fontWeight:700,lineHeight:"44px"},Z={fontFamily:n.primaryFontFamily,fontSize:"40px",fontWeight:700,lineHeight:"52px"},X={fontFamily:n.primaryFontFamily,fontSize:"36px",fontWeight:700,lineHeight:"44px"},be={fontFamily:n.primaryFontFamily,fontSize:"44px",fontWeight:700,lineHeight:"52px"},we={fontFamily:n.primaryFontFamily,fontSize:"52px",fontWeight:700,lineHeight:"64px"},$e={fontFamily:n.primaryFontFamily,fontSize:"96px",fontWeight:700,lineHeight:"112px"};return{font100:o,font150:e,font200:t,font250:c,font300:p,font350:h,font400:y,font450:g,font550:$,font650:E,font750:A,font850:N,font950:H,font1050:Z,font1150:X,font1250:be,font1350:we,font1450:$e,ParagraphXSmall:o,ParagraphSmall:t,ParagraphMedium:p,ParagraphLarge:y,LabelXSmall:e,LabelSmall:c,LabelMedium:h,LabelLarge:g,HeadingXSmall:$,HeadingSmall:E,HeadingMedium:A,HeadingLarge:N,HeadingXLarge:H,HeadingXXLarge:Z,DisplayXSmall:X,DisplaySmall:be,DisplayMedium:we,DisplayLarge:$e,MonoParagraphXSmall:_objectSpread$v(_objectSpread$v({},o),{},{fontFamily:monoFontFamily}),MonoParagraphSmall:_objectSpread$v(_objectSpread$v({},t),{},{fontFamily:monoFontFamily}),MonoParagraphMedium:_objectSpread$v(_objectSpread$v({},p),{},{fontFamily:monoFontFamily}),MonoParagraphLarge:_objectSpread$v(_objectSpread$v({},y),{},{fontFamily:monoFontFamily}),MonoLabelXSmall:_objectSpread$v(_objectSpread$v({},e),{},{fontFamily:monoFontFamily}),MonoLabelSmall:_objectSpread$v(_objectSpread$v({},c),{},{fontFamily:monoFontFamily}),MonoLabelMedium:_objectSpread$v(_objectSpread$v({},h),{},{fontFamily:monoFontFamily}),MonoLabelLarge:_objectSpread$v(_objectSpread$v({},g),{},{fontFamily:monoFontFamily}),MonoHeadingXSmall:_objectSpread$v(_objectSpread$v({},$),{},{fontFamily:monoFontFamily}),MonoHeadingSmall:_objectSpread$v(_objectSpread$v({},E),{},{fontFamily:monoFontFamily}),MonoHeadingMedium:_objectSpread$v(_objectSpread$v({},A),{},{fontFamily:monoFontFamily}),MonoHeadingLarge:_objectSpread$v(_objectSpread$v({},N),{},{fontFamily:monoFontFamily}),MonoHeadingXLarge:_objectSpread$v(_objectSpread$v({},H),{},{fontFamily:monoFontFamily}),MonoHeadingXXLarge:_objectSpread$v(_objectSpread$v({},Z),{},{fontFamily:monoFontFamily}),MonoDisplayXSmall:_objectSpread$v(_objectSpread$v({},X),{},{fontFamily:monoFontFamily}),MonoDisplaySmall:_objectSpread$v(_objectSpread$v({},be),{},{fontFamily:monoFontFamily}),MonoDisplayMedium:_objectSpread$v(_objectSpread$v({},we),{},{fontFamily:monoFontFamily}),MonoDisplayLarge:_objectSpread$v(_objectSpread$v({},$e),{},{fontFamily:monoFontFamily})}};var animation={timing100:"100ms",timing200:"200ms",timing300:"300ms",timing400:"400ms",timing500:"500ms",timing600:"600ms",timing700:"700ms",timing800:"800ms",timing900:"900ms",timing1000:"1000ms",easeInCurve:"cubic-bezier(.8, .2, .6, 1)",easeOutCurve:"cubic-bezier(.2, .8, .4, 1)",easeInOutCurve:"cubic-bezier(0.4, 0, 0.2, 1)",easeInQuinticCurve:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",easeOutQuinticCurve:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutQuinticCurve:"cubic-bezier(0.86, 0, 0.07, 1)",linearCurve:"cubic-bezier(0, 0, 1, 1)"},breakpoints$1={small:320,medium:600,large:1136},grid={columns:[4,8,12],gutters:[16,36,36],margins:[16,36,64],gaps:0,unit:"px",maxWidth:1280},getMediaQuery=function n(o){return"@media screen and (min-width: ".concat(o,"px)")},mediaQuery={small:getMediaQuery(breakpoints$1.small),medium:getMediaQuery(breakpoints$1.medium),large:getMediaQuery(breakpoints$1.large)},sizing={scale0:"2px",scale100:"4px",scale200:"6px",scale300:"8px",scale400:"10px",scale500:"12px",scale550:"14px",scale600:"16px",scale650:"18px",scale700:"20px",scale750:"22px",scale800:"24px",scale850:"28px",scale900:"32px",scale950:"36px",scale1000:"40px",scale1200:"48px",scale1400:"56px",scale1600:"64px",scale2400:"96px",scale3200:"128px",scale4800:"192px"};function ownKeys$w(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$u(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$w(Object(e),!0).forEach(function(t){_defineProperty$D(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$w(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$D(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var LightTheme={name:"light-theme",colors:_objectSpread$u(_objectSpread$u(_objectSpread$u({},lightColorTokens),getComponentColorTokens()),getSemanticColorTokens()),animation,breakpoints:breakpoints$1,borders,direction:"auto",grid,lighting,mediaQuery,sizing,typography:getTypography(),zIndex:{modal:2e3}};function _typeof$l(n){"@babel/helpers - typeof";return _typeof$l=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$l(n)}function deepMerge(n){n=n||{};for(var o=arguments.length<=1?0:arguments.length-1,e,t,c=0;c<o;c++){e=(c+1<1||arguments.length<=c+1?void 0:arguments[c+1])||{};for(var p in e)_typeof$l(e[p])!==void 0&&(t=e[p],isCloneable(t)?n[p]=deepMerge(n[p]||Array.isArray(t)&&[]||{},t):n[p]=t)}return n}function isCloneable(n){return Array.isArray(n)||{}.toString.call(n)=="[object Object]"}var darkColorTokens={primaryA:colors$1.gray200,primaryB:colors$1.gray900,primary:colors$1.white,primary50:colors$1.gray50,primary100:colors$1.gray100,primary200:colors$1.gray200,primary300:colors$1.gray300,primary400:colors$1.gray400,primary500:colors$1.gray500,primary600:colors$1.gray600,primary700:colors$1.gray700,accent:colors$1.blue400,accent50:colors$1.blue50,accent100:colors$1.blue100,accent200:colors$1.blue200,accent300:colors$1.blue300,accent400:colors$1.blue400,accent500:colors$1.blue500,accent600:colors$1.blue600,accent700:colors$1.blue700,negative:colors$1.red500,negative50:colors$1.red50,negative100:colors$1.red100,negative200:colors$1.red200,negative300:colors$1.red300,negative400:colors$1.red400,negative500:colors$1.red500,negative600:colors$1.red600,negative700:colors$1.red700,warning:colors$1.yellow500,warning50:colors$1.yellow50,warning100:colors$1.yellow100,warning200:colors$1.yellow200,warning300:colors$1.yellow300,warning400:colors$1.yellow400,warning500:colors$1.yellow500,warning600:colors$1.yellow600,warning700:colors$1.yellow700,positive:colors$1.green400,positive50:colors$1.green50,positive100:colors$1.green100,positive200:colors$1.green200,positive300:colors$1.green300,positive400:colors$1.green400,positive500:colors$1.green500,positive600:colors$1.green600,positive700:colors$1.green700,white:colors$1.white,black:colors$1.black,mono100:colors$1.gray300,mono200:colors$1.gray400,mono300:colors$1.gray500,mono400:colors$1.gray600,mono500:colors$1.gray700,mono600:"#292929",mono700:"#1F1F1F",mono800:"#141414",mono900:"#111111",mono1000:colors$1.black,ratingInactiveFill:colors$1.gray500,ratingStroke:colors$1.gray700},_excluded$q=["primaryFontFamily"];function ownKeys$v(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$t(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$v(Object(e),!0).forEach(function(t){_defineProperty$C(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$v(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$C(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}function _objectWithoutProperties$s(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$s(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$s(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 createLightTheme(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,e=n.primaryFontFamily,t=_objectWithoutProperties$s(n,_excluded$q),c=_objectSpread$t(_objectSpread$t({},lightColorTokens),t),p={animation,borders,breakpoints:breakpoints$1,colors:_objectSpread$t(_objectSpread$t(_objectSpread$t({},c),getComponentColorTokens(c)),getSemanticColorTokens(c)),direction:"auto",grid,lighting,mediaQuery,sizing,typography:e?getTypography({primaryFontFamily:e}):getTypography(),zIndex:{modal:2e3}};return deepMerge(p,o)}function ownKeys$u(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$s(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$u(Object(e),!0).forEach(function(t){_defineProperty$B(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$u(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$B(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var primitives$1=_objectSpread$s(_objectSpread$s({},darkColorTokens),defaultFontTokens);function ownKeys$t(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$r(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$t(Object(e),!0).forEach(function(t){_defineProperty$A(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$t(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$A(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var primitives=_objectSpread$r(_objectSpread$r({},lightColorTokens),defaultFontTokens),ThemeContext$1=reactExports.createContext(LightTheme),ThemeProvider$1=function n(o){var e=o.theme,t=o.children;return reactExports.createElement(ThemeContext$1.Provider,{value:e},t)};function ownKeys$s(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$q(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$s(Object(e),!0).forEach(function(t){_defineProperty$z(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$s(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$z(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$m(n,o){return _arrayWithHoles$m(n)||_iterableToArrayLimit$m(n,o)||_unsupportedIterableToArray$m(n,o)||_nonIterableRest$m()}function _nonIterableRest$m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
44
44
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$m(n,o){if(n){if(typeof n=="string")return _arrayLikeToArray$m(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$m(n,o)}}function _arrayLikeToArray$m(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$m(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$m(n){if(Array.isArray(n))return n}function _extends$A(){return _extends$A=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$A.apply(this,arguments)}var wrapper=function n(o){return reactExports.forwardRef(function(e,t){return reactExports.createElement(ThemeContext$1.Consumer,null,function(c){return reactExports.createElement(o,_extends$A({ref:t},e,{$theme:c}))})})};function createThemedStyled(){return createStyled$1({wrapper,getInitialStyle,driver})}var styled$1=createThemedStyled();function createThemedWithStyle(){return withStyle$1}var withStyle=createThemedWithStyle();function createThemedUseStyletron(){return function(){var n=reactExports.useContext(ThemeContext$1),o=useStyletron$1(),e=_slicedToArray$m(o,1),t=e[0];return[t,n]}}var useStyletron=createThemedUseStyletron();function withWrapper(n,o){return withWrapper$1(n,function(e){return reactExports.forwardRef(function(t,c){return reactExports.createElement(ThemeContext$1.Consumer,null,function(p){return o(e)(_objectSpread$q(_objectSpread$q({ref:c},t),{},{$theme:p}))})})})}var locale$b={collapse:"Collapse",expand:"Expand"},locale$a={ariaLabel:"Breadcrumbs navigation"},locale$9={ariaLabel:"Select a date.",ariaLabelRange:"Select a date range.",ariaLabelCalendar:"Calendar.",ariaRoleDescriptionCalendarMonth:"Calendar month",previousMonth:"Previous month.",nextMonth:"Next month.",pastWeek:"Past Week",pastMonth:"Past Month",pastThreeMonths:"Past 3 Months",pastSixMonths:"Past 6 Months",pastYear:"Past Year",pastTwoYears:"Past 2 Years",screenReaderMessageInput:"Press the down arrow key to interact with the calendar and select a date. Press the escape button to close the calendar.",selectedDate:"Selected date is ${date}.",selectedDateRange:"Selected date range is from ${startDate} to ${endDate}.",selectSecondDatePrompt:"Select the second date.",quickSelectLabel:"Choose a date range",quickSelectAriaLabel:"Choose a date range",quickSelectPlaceholder:"None",timeSelectEndLabel:"End time",timeSelectStartLabel:"Start time",timePickerAriaLabel12Hour:"Select a time, 12-hour format.",timePickerAriaLabel24Hour:"Select a time, 24-hour format.",timezonePickerAriaLabel:"Select a timezone.",selectedStartDateLabel:"Selected start date.",selectedEndDateLabel:"Selected end date.",dateNotAvailableLabel:"Not available.",dateAvailableLabel:"It's available.",selectedLabel:"Selected.",chooseLabel:"Choose"},locale$8={emptyState:"No rows match the filter criteria defined. Please remove one or more filters to view more data.",loadingState:"Loading rows.",searchAriaLabel:"Search by text",filterAdd:"Add Filter",filterExclude:"Exclude",filterApply:"Apply",filterExcludeRange:"Exclude range",filterExcludeValue:"Exclude value",filterAppliedTo:"filter applied to",optionsLabel:"Select column to filter by",optionsSearch:"Search for a column to filter by...",optionsEmpty:"No columns available.",categoricalFilterSelectAll:"Select All",categoricalFilterSelectClear:"Clear",categoricalFilterEmpty:"No categories found",datetimeFilterRange:"Range",datetimeFilterRangeDatetime:"Date, Time",datetimeFilterRangeDate:"Date",datetimeFilterRangeTime:"Time",datetimeFilterCategorical:"Categorical",datetimeFilterCategoricalWeekday:"Weekday",datetimeFilterCategoricalMonth:"Month",datetimeFilterCategoricalQuarter:"Quarter",datetimeFilterCategoricalHalf:"Half",datetimeFilterCategoricalFirstHalf:"H1",datetimeFilterCategoricalSecondHalf:"H2",datetimeFilterCategoricalYear:"Year",numericalFilterRange:"Range",numericalFilterSingleValue:"Single Value",booleanFilterTrue:"true",booleanFilterFalse:"false",booleanColumnTrueShort:"T",booleanColumnFalseShort:"F",selectRow:"Select row",selectAllRows:"Select all rows"},locale$7={ariaLabel:"button group"},locale$6={dropFilesToUpload:"Drop files here to upload...",or:"",browseFiles:"Browse files",retry:"Retry Upload",cancel:"Cancel"},locale$5={noResultsMsg:"No results",parentMenuItemAriaLabel:"You are currently at an item that opens a nested listbox. Press right arrow to enter that element and left arrow to return."},locale$4={close:"Close"},locale$3={close:"Close"},locale$2={prev:"Prev",next:"Next",preposition:"of"},locale$1={noResultsMsg:"No results found",placeholder:"Select...",create:"Create"},locale={close:"Close"},en_US={accordion:locale$b,breadcrumbs:locale$a,datepicker:locale$9,datatable:locale$8,buttongroup:locale$7,fileuploader:locale$6,menu:locale$5,modal:locale$4,drawer:locale$3,pagination:locale$2,select:locale$1,toast:locale},LocaleContext=reactExports.createContext(en_US),generateUID$1=function(){var n=1,o=new WeakMap,e=function(t,c){return typeof t=="number"||typeof t=="string"?c?"idx-".concat(c):"val-".concat(t):o.has(t)?"uid"+o.get(t):(o.set(t,n++),e(t))};return e},createSource=function(n){return n===void 0&&(n=""),{value:1,prefix:n,uid:generateUID$1()}},counter=createSource(),source=reactExports.createContext(createSource()),getId=function(n){return n.value++},getPrefix=function(n){return n?n.prefix:""},__extends$1=function(){var n=function(o,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,c){t.__proto__=c}||function(t,c){for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&(t[p]=c[p])},n(o,e)};return function(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(o,e);function t(){this.constructor=o}o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),prefixId=function(n,o,e){var t=o+n;return String(e?e(t):t)},UID=function(n){__extends$1(o,n);function o(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={quartz:e.props.idSource||counter,prefix:getPrefix(e.props.idSource),id:getId(e.props.idSource||counter)},e.uid=function(t){return prefixId(e.state.id+"-"+e.state.quartz.uid(t),e.state.prefix,e.props.name)},e}return o.prototype.render=function(){var e=this.props,t=e.children,c=e.name,p=this.state,h=p.id,y=p.prefix;return t(prefixId(h,y,c),this.uid)},o}(reactExports.Component),generateUID=function(n){var o=n||counter,e=getPrefix(o),t=getId(o),c=e+t,p=function(h){return c+o.uid(h)};return{uid:c,gen:p}},useUIDState=function(){var n=reactExports.useContext(source),o=reactExports.useState(function(){return generateUID(n)})[0];return o},useUID=function(){var n=useUIDState().uid;return n},useUIDSeed=function(){var n=useUIDState().gen;return n},UIDReset=function(n){var o=n.children,e=n.prefix,t=e===void 0?"":e,c=reactExports.useState(function(){return createSource(t)})[0];return reactExports.createElement(source.Provider,{value:c},o)},UIDConsumer=function(n){var o=n.name,e=n.children;return reactExports.createElement(source.Consumer,null,function(t){return reactExports.createElement(UID,{name:o,idSource:t,children:e})})},reactIsExports$1=requireReactIs$1();function _extends$z(){return _extends$z=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$z.apply(this,arguments)}function ownKeys$r(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$p(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$r(Object(e),!0).forEach(function(t){_defineProperty$y(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$r(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$y(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}function _typeof$k(n){"@babel/helpers - typeof";return _typeof$k=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$k(n)}function getOverride(n){return reactIsExports$1.isValidElementType(n)?n:n&&_typeof$k(n)==="object"?n.component:n}function getOverrideProps(n){return n&&_typeof$k(n)==="object"?_typeof$k(n.props)==="object"?_objectSpread$p(_objectSpread$p({},n.props),{},{$style:n.style}):{$style:n.style}:{}}function toObjectOverride(n){return reactIsExports$1.isValidElementType(n)?{component:n}:n||{}}function getOverrides(n,o){var e=getOverride(n)||o;if(n&&_typeof$k(n)==="object"&&typeof n.props=="function"){var t=reactExports.forwardRef(function(p,h){var y=n.props(p),g=getOverrideProps(_objectSpread$p(_objectSpread$p({},n),{},{props:y}));return reactExports.createElement(e,_extends$z({ref:h},g))});return t.displayName=e.displayName,[t,{}]}var c=getOverrideProps(n);return[e,c]}function mergeOverrides(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=Object.assign({},n,o),t=Object.keys(e);return t.reduce(function(c,p){return c[p]=mergeOverride(toObjectOverride(n[p]),toObjectOverride(o[p])),c},{})}function mergeOverride(n,o){var e=_objectSpread$p(_objectSpread$p({},n),o);return n.props&&o.props&&(e.props=mergeConfigurationOverrides(n.props,o.props)),n.style&&o.style&&(e.style=mergeConfigurationOverrides(n.style,o.style)),e}function mergeConfigurationOverrides(n,o){return _typeof$k(n)==="object"&&_typeof$k(o)==="object"?deepMerge({},n,o):function(){return deepMerge({},typeof n=="function"?n.apply(void 0,arguments):n,typeof o=="function"?o.apply(void 0,arguments):o)}}var initialized=!1,hadKeyboardEvent=!0,inputTypesWhitelist={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function focusTriggersKeyboardModality(n){var o=n.type,e=n.tagName;return!!(e==="INPUT"&&inputTypesWhitelist[o]&&!n.readOnly||e==="TEXTAREA"&&!n.readOnly||n.isContentEditable)}function handleKeyDown(n){n.metaKey||n.altKey||n.ctrlKey||(hadKeyboardEvent=!0)}function handlePointerDown(){hadKeyboardEvent=!1}function handleVisibilityChange(){this.visibilityState}function prepare(n){n.addEventListener("keydown",handleKeyDown,!0),n.addEventListener("mousedown",handlePointerDown,!0),n.addEventListener("pointerdown",handlePointerDown,!0),n.addEventListener("touchstart",handlePointerDown,!0),n.addEventListener("visibilitychange",handleVisibilityChange,!0)}function isFocusVisible(n){try{return n.target.matches(":focus-visible")}catch{}return hadKeyboardEvent||focusTriggersKeyboardModality(n.target)}function initFocusVisible(n){!initialized&&n!=null&&(initialized=!0,prepare(n.ownerDocument))}var forkFocus=function n(o,e){return function(t){typeof o.onFocus=="function"&&o.onFocus(t),e(t)}},forkBlur=function n(o,e){return function(t){typeof o.onBlur=="function"&&o.onBlur(t),e(t)}};function _typeof$j(n){"@babel/helpers - typeof";return _typeof$j=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$j(n)}function _extends$y(){return _extends$y=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$y.apply(this,arguments)}function _slicedToArray$l(n,o){return _arrayWithHoles$l(n)||_iterableToArrayLimit$l(n,o)||_unsupportedIterableToArray$l(n,o)||_nonIterableRest$l()}function _nonIterableRest$l(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
45
45
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArrayLimit$l(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$l(n){if(Array.isArray(n))return n}function _toConsumableArray$3(n){return _arrayWithoutHoles$3(n)||_iterableToArray$3(n)||_unsupportedIterableToArray$l(n)||_nonIterableSpread$3()}function _nonIterableSpread$3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
46
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$l(n,o){if(n){if(typeof n=="string")return _arrayLikeToArray$l(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$l(n,o)}}function _iterableToArray$3(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function _arrayWithoutHoles$3(n){if(Array.isArray(n))return _arrayLikeToArray$l(n)}function _arrayLikeToArray$l(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 _classCallCheck$g(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$g(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$g(n,o,e){return o&&_defineProperties$g(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$g(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$h(n,o)}function _setPrototypeOf$h(n,o){return _setPrototypeOf$h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$h(n,o)}function _createSuper$g(n){var o=_isNativeReflectConstruct$g();return function(){var t=_getPrototypeOf$g(n),c;if(o){var p=_getPrototypeOf$g(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$g(this,c)}}function _possibleConstructorReturn$g(n,o){if(o&&(_typeof$j(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$h(n)}function _assertThisInitialized$h(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$g(){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$g(n){return _getPrototypeOf$g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$g(n)}function _defineProperty$x(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var StyledAppContainer=styled$1("div",{});StyledAppContainer.displayName="StyledAppContainer";var StyledLayersContainer=styled$1("div",{});StyledLayersContainer.displayName="StyledLayersContainer";function defaultEventHandlerFn(){}var LayersContext=reactExports.createContext({addEscapeHandler:defaultEventHandlerFn,removeEscapeHandler:defaultEventHandlerFn,addKeyDownHandler:defaultEventHandlerFn,removeKeyDownHandler:defaultEventHandlerFn,addKeyUpHandler:defaultEventHandlerFn,removeKeyUpHandler:defaultEventHandlerFn,addKeyPressHandler:defaultEventHandlerFn,removeKeyPressHandler:defaultEventHandlerFn,addDocClickHandler:defaultEventHandlerFn,removeDocClickHandler:defaultEventHandlerFn,host:void 0,zIndex:void 0}),Provider=LayersContext.Provider,Consumer=LayersContext.Consumer,LayersManager=function(n){_inherits$g(e,n);var o=_createSuper$g(e);function e(t){var c;return _classCallCheck$g(this,e),c=o.call(this,t),_defineProperty$x(_assertThisInitialized$h(c),"host",reactExports.createRef()),_defineProperty$x(_assertThisInitialized$h(c),"containerRef",reactExports.createRef()),_defineProperty$x(_assertThisInitialized$h(c),"onDocumentClick",function(p){var h=c.state.docClickHandlers[c.state.docClickHandlers.length-1];h&&h(p)}),_defineProperty$x(_assertThisInitialized$h(c),"onKeyDown",function(p){var h=c.state.keyDownHandlers[c.state.keyDownHandlers.length-1];h&&h(p)}),_defineProperty$x(_assertThisInitialized$h(c),"onKeyUp",function(p){if(p.key==="Escape"){var h=c.state.escapeKeyHandlers[c.state.escapeKeyHandlers.length-1];h&&h()}var y=c.state.keyUpHandlers[c.state.keyUpHandlers.length-1];y&&y(p)}),_defineProperty$x(_assertThisInitialized$h(c),"onKeyPress",function(p){var h=c.state.keyPressHandlers[c.state.keyPressHandlers.length-1];h&&h(p)}),_defineProperty$x(_assertThisInitialized$h(c),"onAddEscapeHandler",function(p){c.setState(function(h){return{escapeKeyHandlers:[].concat(_toConsumableArray$3(h.escapeKeyHandlers),[p])}})}),_defineProperty$x(_assertThisInitialized$h(c),"onRemoveEscapeHandler",function(p){c.setState(function(h){return{escapeKeyHandlers:h.escapeKeyHandlers.filter(function(y){return y!==p})}})}),_defineProperty$x(_assertThisInitialized$h(c),"onAddKeyDownHandler",function(p){c.setState(function(h){return{keyDownHandlers:[].concat(_toConsumableArray$3(h.keyDownHandlers),[p])}})}),_defineProperty$x(_assertThisInitialized$h(c),"onRemoveKeyDownHandler",function(p){c.setState(function(h){return{keyDownHandlers:h.keyDownHandlers.filter(function(y){return y!==p})}})}),_defineProperty$x(_assertThisInitialized$h(c),"onAddKeyUpHandler",function(p){c.setState(function(h){return{keyUpHandlers:[].concat(_toConsumableArray$3(h.keyUpHandlers),[p])}})}),_defineProperty$x(_assertThisInitialized$h(c),"onRemoveKeyUpHandler",function(p){c.setState(function(h){return{keyUpHandlers:h.keyUpHandlers.filter(function(y){return y!==p})}})}),_defineProperty$x(_assertThisInitialized$h(c),"onAddKeyPressHandler",function(p){c.setState(function(h){return{keyPressHandlers:[].concat(_toConsumableArray$3(h.keyPressHandlers),[p])}})}),_defineProperty$x(_assertThisInitialized$h(c),"onRemoveKeyPressHandler",function(p){c.setState(function(h){return{keyPressHandlers:h.keyPressHandlers.filter(function(y){return y!==p})}})}),_defineProperty$x(_assertThisInitialized$h(c),"onAddDocClickHandler",function(p){c.setState(function(h){return{docClickHandlers:[].concat(_toConsumableArray$3(h.docClickHandlers),[p])}})}),_defineProperty$x(_assertThisInitialized$h(c),"onRemoveDocClickHandler",function(p){c.setState(function(h){return{docClickHandlers:h.docClickHandlers.filter(function(y){return y!==p})}})}),c.state={escapeKeyHandlers:[],keyDownHandlers:[],keyUpHandlers:[],keyPressHandlers:[],docClickHandlers:[]},c}return _createClass$g(e,[{key:"componentDidMount",value:function(){this.forceUpdate(),initFocusVisible(this.containerRef.current),typeof document<"u"&&(document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("keypress",this.onKeyPress),document.addEventListener("mousedown",this.onDocumentClick))}},{key:"componentWillUnmount",value:function(){typeof document<"u"&&(document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("keypress",this.onKeyPress),document.removeEventListener("mousedown",this.onDocumentClick))}},{key:"render",value:function(){var c=this,p=this.props.overrides,h=p===void 0?{}:p,y=getOverrides(h.AppContainer,StyledAppContainer),g=_slicedToArray$l(y,2),$=g[0],E=g[1],A=getOverrides(h.LayersContainer,StyledLayersContainer),N=_slicedToArray$l(A,2),H=N[0],Z=N[1];return reactExports.createElement(Consumer,null,function(X){var be=X.host;return reactExports.createElement(Provider,{value:{host:be||c.host.current,zIndex:c.props.zIndex,addEscapeHandler:c.onAddEscapeHandler,removeEscapeHandler:c.onRemoveEscapeHandler,addKeyDownHandler:c.onAddKeyDownHandler,removeKeyDownHandler:c.onRemoveKeyDownHandler,addKeyUpHandler:c.onAddKeyUpHandler,removeKeyUpHandler:c.onRemoveKeyUpHandler,addKeyPressHandler:c.onAddKeyPressHandler,removeKeyPressHandler:c.onRemoveKeyPressHandler,addDocClickHandler:c.onAddDocClickHandler,removeDocClickHandler:c.onRemoveDocClickHandler}},reactExports.createElement($,_extends$y({},E,{ref:c.containerRef}),c.props.children),reactExports.createElement(H,_extends$y({},Z,{ref:c.host})))})}}]),e}(reactExports.Component),reactDomExports=requireReactDom();const ReactDOM=getDefaultExportFromCjs(reactDomExports);function _typeof$i(n){"@babel/helpers - typeof";return _typeof$i=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$i(n)}function _extends$x(){return _extends$x=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$x.apply(this,arguments)}function _classCallCheck$f(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$f(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$f(n,o,e){return o&&_defineProperties$f(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$f(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$g(n,o)}function _setPrototypeOf$g(n,o){return _setPrototypeOf$g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$g(n,o)}function _createSuper$f(n){var o=_isNativeReflectConstruct$f();return function(){var t=_getPrototypeOf$f(n),c;if(o){var p=_getPrototypeOf$f(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$f(this,c)}}function _possibleConstructorReturn$f(n,o){if(o&&(_typeof$i(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$g(n)}function _assertThisInitialized$g(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$f(){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$f(n){return _getPrototypeOf$f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$f(n)}function _defineProperty$w(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var Container=styled$1("div",function(n){var o=n.$zIndex;return{position:"absolute",top:0,left:0,right:0,zIndex:o||null}});Container.displayName="Container";var LayerComponent=function(n){_inherits$f(e,n);var o=_createSuper$f(e);function e(){var t;_classCallCheck$f(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$w(_assertThisInitialized$g(t),"state",{container:null}),_defineProperty$w(_assertThisInitialized$g(t),"onEscape",function(){t.props.onEscape&&t.props.onEscape()}),_defineProperty$w(_assertThisInitialized$g(t),"onKeyDown",function(y){t.props.onKeyDown&&t.props.onKeyDown(y)}),_defineProperty$w(_assertThisInitialized$g(t),"onKeyUp",function(y){t.props.onKeyUp&&t.props.onKeyUp(y)}),_defineProperty$w(_assertThisInitialized$g(t),"onKeyPress",function(y){t.props.onKeyPress&&t.props.onKeyPress(y)}),_defineProperty$w(_assertThisInitialized$g(t),"onDocumentClick",function(y){t.props.onDocumentClick&&t.props.onDocumentClick(y)}),t}return _createClass$f(e,[{key:"componentDidMount",value:function(){this.context.addEscapeHandler(this.onEscape),this.context.addKeyDownHandler(this.onKeyDown),this.context.addKeyUpHandler(this.onKeyUp),this.context.addKeyPressHandler(this.onKeyPress),this.props.isHoverLayer||this.context.addDocClickHandler(this.onDocumentClick);var c=this.props,p=c.onMount,h=c.mountNode,y=c.host;if(h){p&&p();return}var g=y!==void 0,$=g?y:document.body;$&&this.addContainer($)}},{key:"componentDidUpdate",value:function(c){var p=this.props,h=p.host,y=p.mountNode;y||(h&&h!==c.host&&c.host===null&&this.addContainer(h),c.isHoverLayer!=this.props.isHoverLayer&&(this.props.isHoverLayer?this.context.removeDocClickHandler(this.onDocumentClick):this.context.addDocClickHandler(this.onDocumentClick)))}},{key:"componentWillUnmount",value:function(){this.context.removeEscapeHandler(this.onEscape),this.context.removeKeyDownHandler(this.onKeyDown),this.context.removeKeyUpHandler(this.onKeyUp),this.context.removeKeyPressHandler(this.onKeyPress),this.context.removeDocClickHandler(this.onDocumentClick),this.props.onUnmount&&this.props.onUnmount();var c=this.props.host,p=this.state.container;c&&p&&c.contains(p)&&c.removeChild(p)}},{key:"addContainer",value:function(c){var p=this.props,h=p.index,y=p.mountNode,g=p.onMount;if(!y&&c){var $=c.ownerDocument.createElement("div"),E=typeof h=="number"?c.children[h]:null;E?c.insertBefore($,E):c.appendChild($),this.setState({container:$},function(){g&&g()})}}},{key:"render",value:function(){var c=this.state.container,p=this.props,h=p.children,y=p.mountNode,g=p.zIndex,$=g?reactExports.createElement(Container,{$zIndex:g},h):h;return typeof document<"u"?y?ReactDOM.createPortal($,y):c?ReactDOM.createPortal($,c):null:null}}]),e}(reactExports.Component);_defineProperty$w(LayerComponent,"contextType",LayersContext);function Layer(n){return reactExports.createElement(Consumer,null,function(o){var e=o.host,t=o.zIndex;return reactExports.createElement(LayerComponent,_extends$x({},n,{host:e,zIndex:t}))})}var isBrowser$1=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",timeoutDuration=function(){for(var n=["Edge","Trident","Firefox"],o=0;o<n.length;o+=1)if(isBrowser$1&&navigator.userAgent.indexOf(n[o])>=0)return 1;return 0}();function microtaskDebounce(n){var o=!1;return function(){o||(o=!0,window.Promise.resolve().then(function(){o=!1,n()}))}}function taskDebounce(n){var o=!1;return function(){o||(o=!0,setTimeout(function(){o=!1,n()},timeoutDuration))}}var supportsMicroTasks=isBrowser$1&&window.Promise,debounce$1=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction(n){var o={};return n&&o.toString.call(n)==="[object Function]"}function getStyleComputedProperty(n,o){if(n.nodeType!==1)return[];var e=n.ownerDocument.defaultView,t=e.getComputedStyle(n,null);return o?t[o]:t}function getParentNode$1(n){return n.nodeName==="HTML"?n:n.parentNode||n.host}function getScrollParent(n){if(!n)return document.body;switch(n.nodeName){case"HTML":case"BODY":return n.ownerDocument.body;case"#document":return n.body}var o=getStyleComputedProperty(n),e=o.overflow,t=o.overflowX,c=o.overflowY;return/(auto|scroll|overlay)/.test(e+c+t)?n:getScrollParent(getParentNode$1(n))}function getReferenceNode(n){return n&&n.referenceNode?n.referenceNode:n}var isIE11=isBrowser$1&&!!(window.MSInputMethodContext&&document.documentMode),isIE10=isBrowser$1&&/MSIE 10/.test(navigator.userAgent);function isIE(n){return n===11?isIE11:n===10?isIE10:isIE11||isIE10}function getOffsetParent(n){if(!n)return document.documentElement;for(var o=isIE(10)?document.body:null,e=n.offsetParent||null;e===o&&n.nextElementSibling;)e=(n=n.nextElementSibling).offsetParent;var t=e&&e.nodeName;return!t||t==="BODY"||t==="HTML"?n?n.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(e.nodeName)!==-1&&getStyleComputedProperty(e,"position")==="static"?getOffsetParent(e):e}function isOffsetContainer(n){var o=n.nodeName;return o==="BODY"?!1:o==="HTML"||getOffsetParent(n.firstElementChild)===n}function getRoot(n){return n.parentNode!==null?getRoot(n.parentNode):n}function findCommonOffsetParent(n,o){if(!n||!n.nodeType||!o||!o.nodeType)return document.documentElement;var e=n.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING,t=e?n:o,c=e?o:n,p=document.createRange();p.setStart(t,0),p.setEnd(c,0);var h=p.commonAncestorContainer;if(n!==h&&o!==h||t.contains(c))return isOffsetContainer(h)?h:getOffsetParent(h);var y=getRoot(n);return y.host?findCommonOffsetParent(y.host,o):findCommonOffsetParent(n,getRoot(o).host)}function getScroll(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",e=o==="top"?"scrollTop":"scrollLeft",t=n.nodeName;if(t==="BODY"||t==="HTML"){var c=n.ownerDocument.documentElement,p=n.ownerDocument.scrollingElement||c;return p[e]}return n[e]}function includeScroll(n,o){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=getScroll(o,"top"),c=getScroll(o,"left"),p=e?-1:1;return n.top+=t*p,n.bottom+=t*p,n.left+=c*p,n.right+=c*p,n}function getBordersSize$1(n,o){var e=o==="x"?"Left":"Top",t=e==="Left"?"Right":"Bottom";return parseFloat(n["border"+e+"Width"])+parseFloat(n["border"+t+"Width"])}function getSize(n,o,e,t){return Math.max(o["offset"+n],o["scroll"+n],e["client"+n],e["offset"+n],e["scroll"+n],isIE(10)?parseInt(e["offset"+n])+parseInt(t["margin"+(n==="Height"?"Top":"Left")])+parseInt(t["margin"+(n==="Height"?"Bottom":"Right")]):0)}function getWindowSizes(n){var o=n.body,e=n.documentElement,t=isIE(10)&&getComputedStyle(e);return{height:getSize("Height",o,e,t),width:getSize("Width",o,e,t)}}var classCallCheck=function(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")},createClass=function(){function n(o,e){for(var t=0;t<e.length;t++){var c=e[t];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(o,c.key,c)}}return function(o,e,t){return e&&n(o.prototype,e),t&&n(o,t),o}}(),defineProperty=function(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n},_extends$w=Object.assign||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};function getClientRect(n){return _extends$w({},n,{right:n.left+n.width,bottom:n.top+n.height})}function getBoundingClientRect(n){var o={};try{if(isIE(10)){o=n.getBoundingClientRect();var e=getScroll(n,"top"),t=getScroll(n,"left");o.top+=e,o.left+=t,o.bottom+=e,o.right+=t}else o=n.getBoundingClientRect()}catch{}var c={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},p=n.nodeName==="HTML"?getWindowSizes(n.ownerDocument):{},h=p.width||n.clientWidth||c.width,y=p.height||n.clientHeight||c.height,g=n.offsetWidth-h,$=n.offsetHeight-y;if(g||$){var E=getStyleComputedProperty(n);g-=getBordersSize$1(E,"x"),$-=getBordersSize$1(E,"y"),c.width-=g,c.height-=$}return getClientRect(c)}function getOffsetRectRelativeToArbitraryNode(n,o){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=isIE(10),c=o.nodeName==="HTML",p=getBoundingClientRect(n),h=getBoundingClientRect(o),y=getScrollParent(n),g=getStyleComputedProperty(o),$=parseFloat(g.borderTopWidth),E=parseFloat(g.borderLeftWidth);e&&c&&(h.top=Math.max(h.top,0),h.left=Math.max(h.left,0));var A=getClientRect({top:p.top-h.top-$,left:p.left-h.left-E,width:p.width,height:p.height});if(A.marginTop=0,A.marginLeft=0,!t&&c){var N=parseFloat(g.marginTop),H=parseFloat(g.marginLeft);A.top-=$-N,A.bottom-=$-N,A.left-=E-H,A.right-=E-H,A.marginTop=N,A.marginLeft=H}return(t&&!e?o.contains(y):o===y&&y.nodeName!=="BODY")&&(A=includeScroll(A,o)),A}function getViewportOffsetRectRelativeToArtbitraryNode(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=n.ownerDocument.documentElement,t=getOffsetRectRelativeToArbitraryNode(n,e),c=Math.max(e.clientWidth,window.innerWidth||0),p=Math.max(e.clientHeight,window.innerHeight||0),h=o?0:getScroll(e),y=o?0:getScroll(e,"left"),g={top:h-t.top+t.marginTop,left:y-t.left+t.marginLeft,width:c,height:p};return getClientRect(g)}function isFixed$1(n){var o=n.nodeName;if(o==="BODY"||o==="HTML")return!1;if(getStyleComputedProperty(n,"position")==="fixed")return!0;var e=getParentNode$1(n);return e?isFixed$1(e):!1}function getFixedPositionOffsetParent(n){if(!n||!n.parentElement||isIE())return document.documentElement;for(var o=n.parentElement;o&&getStyleComputedProperty(o,"transform")==="none";)o=o.parentElement;return o||document.documentElement}function getBoundaries(n,o,e,t){var c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,p={top:0,left:0},h=c?getFixedPositionOffsetParent(n):findCommonOffsetParent(n,getReferenceNode(o));if(t==="viewport")p=getViewportOffsetRectRelativeToArtbitraryNode(h,c);else{var y=void 0;t==="scrollParent"?(y=getScrollParent(getParentNode$1(o)),y.nodeName==="BODY"&&(y=n.ownerDocument.documentElement)):t==="window"?y=n.ownerDocument.documentElement:y=t;var g=getOffsetRectRelativeToArbitraryNode(y,h,c);if(y.nodeName==="HTML"&&!isFixed$1(h)){var $=getWindowSizes(n.ownerDocument),E=$.height,A=$.width;p.top+=g.top-g.marginTop,p.bottom=E+g.top,p.left+=g.left-g.marginLeft,p.right=A+g.left}else p=g}e=e||0;var N=typeof e=="number";return p.left+=N?e:e.left||0,p.top+=N?e:e.top||0,p.right-=N?e:e.right||0,p.bottom-=N?e:e.bottom||0,p}function getArea(n){var o=n.width,e=n.height;return o*e}function computeAutoPlacement(n,o,e,t,c){var p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(n.indexOf("auto")===-1)return n;var h=getBoundaries(e,t,p,c),y={top:{width:h.width,height:o.top-h.top},right:{width:h.right-o.right,height:h.height},bottom:{width:h.width,height:h.bottom-o.bottom},left:{width:o.left-h.left,height:h.height}},g=Object.keys(y).map(function(N){return _extends$w({key:N},y[N],{area:getArea(y[N])})}).sort(function(N,H){return H.area-N.area}),$=g.filter(function(N){var H=N.width,Z=N.height;return H>=e.clientWidth&&Z>=e.clientHeight}),E=$.length>0?$[0].key:g[0].key,A=n.split("-")[1];return E+(A?"-"+A:"")}function getReferenceOffsets(n,o,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,c=t?getFixedPositionOffsetParent(o):findCommonOffsetParent(o,getReferenceNode(e));return getOffsetRectRelativeToArbitraryNode(e,c,t)}function getOuterSizes(n){var o=n.ownerDocument.defaultView,e=o.getComputedStyle(n),t=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),c=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0),p={width:n.offsetWidth+c,height:n.offsetHeight+t};return p}function getOppositePlacement(n){var o={left:"right",right:"left",bottom:"top",top:"bottom"};return n.replace(/left|right|bottom|top/g,function(e){return o[e]})}function getPopperOffsets(n,o,e){e=e.split("-")[0];var t=getOuterSizes(n),c={width:t.width,height:t.height},p=["right","left"].indexOf(e)!==-1,h=p?"top":"left",y=p?"left":"top",g=p?"height":"width",$=p?"width":"height";return c[h]=o[h]+o[g]/2-t[g]/2,e===y?c[y]=o[y]-t[$]:c[y]=o[getOppositePlacement(y)],c}function find$1(n,o){return Array.prototype.find?n.find(o):n.filter(o)[0]}function findIndex(n,o,e){if(Array.prototype.findIndex)return n.findIndex(function(c){return c[o]===e});var t=find$1(n,function(c){return c[o]===e});return n.indexOf(t)}function runModifiers(n,o,e){var t=e===void 0?n:n.slice(0,findIndex(n,"name",e));return t.forEach(function(c){c.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var p=c.function||c.fn;c.enabled&&isFunction(p)&&(o.offsets.popper=getClientRect(o.offsets.popper),o.offsets.reference=getClientRect(o.offsets.reference),o=p(o,c))}),o}function update(){if(!this.state.isDestroyed){var n={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};n.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed),n.placement=computeAutoPlacement(this.options.placement,n.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),n.originalPlacement=n.placement,n.positionFixed=this.options.positionFixed,n.offsets.popper=getPopperOffsets(this.popper,n.offsets.reference,n.placement),n.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",n=runModifiers(this.modifiers,n),this.state.isCreated?this.options.onUpdate(n):(this.state.isCreated=!0,this.options.onCreate(n))}}function isModifierEnabled(n,o){return n.some(function(e){var t=e.name,c=e.enabled;return c&&t===o})}function getSupportedPropertyName(n){for(var o=[!1,"ms","Webkit","Moz","O"],e=n.charAt(0).toUpperCase()+n.slice(1),t=0;t<o.length;t++){var c=o[t],p=c?""+c+e:n;if(typeof document.body.style[p]<"u")return p}return null}function destroy(){return this.state.isDestroyed=!0,isModifierEnabled(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[getSupportedPropertyName("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function getWindow(n){var o=n.ownerDocument;return o?o.defaultView:window}function attachToScrollParents(n,o,e,t){var c=n.nodeName==="BODY",p=c?n.ownerDocument.defaultView:n;p.addEventListener(o,e,{passive:!0}),c||attachToScrollParents(getScrollParent(p.parentNode),o,e,t),t.push(p)}function setupEventListeners(n,o,e,t){e.updateBound=t,getWindow(n).addEventListener("resize",e.updateBound,{passive:!0});var c=getScrollParent(n);return attachToScrollParents(c,"scroll",e.updateBound,e.scrollParents),e.scrollElement=c,e.eventsEnabled=!0,e}function enableEventListeners(){this.state.eventsEnabled||(this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners(n,o){return getWindow(n).removeEventListener("resize",o.updateBound),o.scrollParents.forEach(function(e){e.removeEventListener("scroll",o.updateBound)}),o.updateBound=null,o.scrollParents=[],o.scrollElement=null,o.eventsEnabled=!1,o}function disableEventListeners(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners(this.reference,this.state))}function isNumeric(n){return n!==""&&!isNaN(parseFloat(n))&&isFinite(n)}function setStyles(n,o){Object.keys(o).forEach(function(e){var t="";["width","height","top","right","bottom","left"].indexOf(e)!==-1&&isNumeric(o[e])&&(t="px"),n.style[e]=o[e]+t})}function setAttributes(n,o){Object.keys(o).forEach(function(e){var t=o[e];t!==!1?n.setAttribute(e,o[e]):n.removeAttribute(e)})}function applyStyle(n){return setStyles(n.instance.popper,n.styles),setAttributes(n.instance.popper,n.attributes),n.arrowElement&&Object.keys(n.arrowStyles).length&&setStyles(n.arrowElement,n.arrowStyles),n}function applyStyleOnLoad(n,o,e,t,c){var p=getReferenceOffsets(c,o,n,e.positionFixed),h=computeAutoPlacement(e.placement,p,o,n,e.modifiers.flip.boundariesElement,e.modifiers.flip.padding);return o.setAttribute("x-placement",h),setStyles(o,{position:e.positionFixed?"fixed":"absolute"}),e}function getRoundedOffsets(n,o){var e=n.offsets,t=e.popper,c=e.reference,p=Math.round,h=Math.floor,y=function(we){return we},g=p(c.width),$=p(t.width),E=["left","right"].indexOf(n.placement)!==-1,A=n.placement.indexOf("-")!==-1,N=g%2===$%2,H=g%2===1&&$%2===1,Z=o?E||A||N?p:h:y,X=o?p:y;return{left:Z(H&&!A&&o?t.left-1:t.left),top:X(t.top),bottom:X(t.bottom),right:Z(t.right)}}var isFirefox=isBrowser$1&&/Firefox/i.test(navigator.userAgent);function computeStyle(n,o){var e=o.x,t=o.y,c=n.offsets.popper,p=find$1(n.instance.modifiers,function(Ce){return Ce.name==="applyStyle"}).gpuAcceleration;p!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var h=p!==void 0?p:o.gpuAcceleration,y=getOffsetParent(n.instance.popper),g=getBoundingClientRect(y),$={position:c.position},E=getRoundedOffsets(n,window.devicePixelRatio<2||!isFirefox),A=e==="bottom"?"top":"bottom",N=t==="right"?"left":"right",H=getSupportedPropertyName("transform"),Z=void 0,X=void 0;if(A==="bottom"?y.nodeName==="HTML"?X=-y.clientHeight+E.bottom:X=-g.height+E.bottom:X=E.top,N==="right"?y.nodeName==="HTML"?Z=-y.clientWidth+E.right:Z=-g.width+E.right:Z=E.left,h&&H)$[H]="translate3d("+Z+"px, "+X+"px, 0)",$[A]=0,$[N]=0,$.willChange="transform";else{var be=A==="bottom"?-1:1,we=N==="right"?-1:1;$[A]=X*be,$[N]=Z*we,$.willChange=A+", "+N}var $e={"x-placement":n.placement};return n.attributes=_extends$w({},$e,n.attributes),n.styles=_extends$w({},$,n.styles),n.arrowStyles=_extends$w({},n.offsets.arrow,n.arrowStyles),n}function isModifierRequired(n,o,e){var t=find$1(n,function(y){var g=y.name;return g===o}),c=!!t&&n.some(function(y){return y.name===e&&y.enabled&&y.order<t.order});if(!c){var p="`"+o+"`",h="`"+e+"`";console.warn(h+" modifier is required by "+p+" modifier in order to work, be sure to include it before "+p+"!")}return c}function arrow(n,o){var e;if(!isModifierRequired(n.instance.modifiers,"arrow","keepTogether"))return n;var t=o.element;if(typeof t=="string"){if(t=n.instance.popper.querySelector(t),!t)return n}else if(!n.instance.popper.contains(t))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),n;var c=n.placement.split("-")[0],p=n.offsets,h=p.popper,y=p.reference,g=["left","right"].indexOf(c)!==-1,$=g?"height":"width",E=g?"Top":"Left",A=E.toLowerCase(),N=g?"left":"top",H=g?"bottom":"right",Z=getOuterSizes(t)[$];y[H]-Z<h[A]&&(n.offsets.popper[A]-=h[A]-(y[H]-Z)),y[A]+Z>h[H]&&(n.offsets.popper[A]+=y[A]+Z-h[H]),n.offsets.popper=getClientRect(n.offsets.popper);var X=y[A]+y[$]/2-Z/2,be=getStyleComputedProperty(n.instance.popper),we=parseFloat(be["margin"+E]),$e=parseFloat(be["border"+E+"Width"]),Ce=X-n.offsets.popper[A]-we-$e;return Ce=Math.max(Math.min(h[$]-Z,Ce),0),n.arrowElement=t,n.offsets.arrow=(e={},defineProperty(e,A,Math.round(Ce)),defineProperty(e,N,""),e),n}function getOppositeVariation(n){return n==="end"?"start":n==="start"?"end":n}var placements=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],validPlacements=placements.slice(3);function clockwise(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=validPlacements.indexOf(n),t=validPlacements.slice(e+1).concat(validPlacements.slice(0,e));return o?t.reverse():t}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip(n,o){if(isModifierEnabled(n.instance.modifiers,"inner")||n.flipped&&n.placement===n.originalPlacement)return n;var e=getBoundaries(n.instance.popper,n.instance.reference,o.padding,o.boundariesElement,n.positionFixed),t=n.placement.split("-")[0],c=getOppositePlacement(t),p=n.placement.split("-")[1]||"",h=[];switch(o.behavior){case BEHAVIORS.FLIP:h=[t,c];break;case BEHAVIORS.CLOCKWISE:h=clockwise(t);break;case BEHAVIORS.COUNTERCLOCKWISE:h=clockwise(t,!0);break;default:h=o.behavior}return h.forEach(function(y,g){if(t!==y||h.length===g+1)return n;t=n.placement.split("-")[0],c=getOppositePlacement(t);var $=n.offsets.popper,E=n.offsets.reference,A=Math.floor,N=t==="left"&&A($.right)>A(E.left)||t==="right"&&A($.left)<A(E.right)||t==="top"&&A($.bottom)>A(E.top)||t==="bottom"&&A($.top)<A(E.bottom),H=A($.left)<A(e.left),Z=A($.right)>A(e.right),X=A($.top)<A(e.top),be=A($.bottom)>A(e.bottom),we=t==="left"&&H||t==="right"&&Z||t==="top"&&X||t==="bottom"&&be,$e=["top","bottom"].indexOf(t)!==-1,Ce=!!o.flipVariations&&($e&&p==="start"&&H||$e&&p==="end"&&Z||!$e&&p==="start"&&X||!$e&&p==="end"&&be),Ie=!!o.flipVariationsByContent&&($e&&p==="start"&&Z||$e&&p==="end"&&H||!$e&&p==="start"&&be||!$e&&p==="end"&&X),Ne=Ce||Ie;(N||we||Ne)&&(n.flipped=!0,(N||we)&&(t=h[g+1]),Ne&&(p=getOppositeVariation(p)),n.placement=t+(p?"-"+p:""),n.offsets.popper=_extends$w({},n.offsets.popper,getPopperOffsets(n.instance.popper,n.offsets.reference,n.placement)),n=runModifiers(n.instance.modifiers,n,"flip"))}),n}function keepTogether(n){var o=n.offsets,e=o.popper,t=o.reference,c=n.placement.split("-")[0],p=Math.floor,h=["top","bottom"].indexOf(c)!==-1,y=h?"right":"bottom",g=h?"left":"top",$=h?"width":"height";return e[y]<p(t[g])&&(n.offsets.popper[g]=p(t[g])-e[$]),e[g]>p(t[y])&&(n.offsets.popper[g]=p(t[y])),n}function toValue(n,o,e,t){var c=n.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),p=+c[1],h=c[2];if(!p)return n;if(h.indexOf("%")===0){var y=void 0;switch(h){case"%p":y=e;break;case"%":case"%r":default:y=t}var g=getClientRect(y);return g[o]/100*p}else if(h==="vh"||h==="vw"){var $=void 0;return h==="vh"?$=Math.max(document.documentElement.clientHeight,window.innerHeight||0):$=Math.max(document.documentElement.clientWidth,window.innerWidth||0),$/100*p}else return p}function parseOffset(n,o,e,t){var c=[0,0],p=["right","left"].indexOf(t)!==-1,h=n.split(/(\+|\-)/).map(function(E){return E.trim()}),y=h.indexOf(find$1(h,function(E){return E.search(/,|\s/)!==-1}));h[y]&&h[y].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var g=/\s*,\s*|\s+/,$=y!==-1?[h.slice(0,y).concat([h[y].split(g)[0]]),[h[y].split(g)[1]].concat(h.slice(y+1))]:[h];return $=$.map(function(E,A){var N=(A===1?!p:p)?"height":"width",H=!1;return E.reduce(function(Z,X){return Z[Z.length-1]===""&&["+","-"].indexOf(X)!==-1?(Z[Z.length-1]=X,H=!0,Z):H?(Z[Z.length-1]+=X,H=!1,Z):Z.concat(X)},[]).map(function(Z){return toValue(Z,N,o,e)})}),$.forEach(function(E,A){E.forEach(function(N,H){isNumeric(N)&&(c[A]+=N*(E[H-1]==="-"?-1:1))})}),c}function offset(n,o){var e=o.offset,t=n.placement,c=n.offsets,p=c.popper,h=c.reference,y=t.split("-")[0],g=void 0;return isNumeric(+e)?g=[+e,0]:g=parseOffset(e,p,h,y),y==="left"?(p.top+=g[0],p.left-=g[1]):y==="right"?(p.top+=g[0],p.left+=g[1]):y==="top"?(p.left+=g[0],p.top-=g[1]):y==="bottom"&&(p.left+=g[0],p.top+=g[1]),n.popper=p,n}function preventOverflow(n,o){var e=o.boundariesElement||getOffsetParent(n.instance.popper);n.instance.reference===e&&(e=getOffsetParent(e));var t=getSupportedPropertyName("transform"),c=n.instance.popper.style,p=c.top,h=c.left,y=c[t];c.top="",c.left="",c[t]="";var g=getBoundaries(n.instance.popper,n.instance.reference,o.padding,e,n.positionFixed);c.top=p,c.left=h,c[t]=y,o.boundaries=g;var $=o.priority,E=n.offsets.popper,A={primary:function(H){var Z=E[H];return E[H]<g[H]&&!o.escapeWithReference&&(Z=Math.max(E[H],g[H])),defineProperty({},H,Z)},secondary:function(H){var Z=H==="right"?"left":"top",X=E[Z];return E[H]>g[H]&&!o.escapeWithReference&&(X=Math.min(E[Z],g[H]-(H==="right"?E.width:E.height))),defineProperty({},Z,X)}};return $.forEach(function(N){var H=["left","top"].indexOf(N)!==-1?"primary":"secondary";E=_extends$w({},E,A[H](N))}),n.offsets.popper=E,n}function shift(n){var o=n.placement,e=o.split("-")[0],t=o.split("-")[1];if(t){var c=n.offsets,p=c.reference,h=c.popper,y=["bottom","top"].indexOf(e)!==-1,g=y?"left":"top",$=y?"width":"height",E={start:defineProperty({},g,p[g]),end:defineProperty({},g,p[g]+p[$]-h[$])};n.offsets.popper=_extends$w({},h,E[t])}return n}function hide(n){if(!isModifierRequired(n.instance.modifiers,"hide","preventOverflow"))return n;var o=n.offsets.reference,e=find$1(n.instance.modifiers,function(t){return t.name==="preventOverflow"}).boundaries;if(o.bottom<e.top||o.left>e.right||o.top>e.bottom||o.right<e.left){if(n.hide===!0)return n;n.hide=!0,n.attributes["x-out-of-boundaries"]=""}else{if(n.hide===!1)return n;n.hide=!1,n.attributes["x-out-of-boundaries"]=!1}return n}function inner(n){var o=n.placement,e=o.split("-")[0],t=n.offsets,c=t.popper,p=t.reference,h=["left","right"].indexOf(e)!==-1,y=["top","left"].indexOf(e)===-1;return c[h?"left":"top"]=p[e]-(y?c[h?"width":"height"]:0),n.placement=getOppositePlacement(o),n.offsets.popper=getClientRect(c),n}var modifiers={shift:{order:100,enabled:!0,fn:shift},offset:{order:200,enabled:!0,fn:offset,offset:0},preventOverflow:{order:300,enabled:!0,fn:preventOverflow,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:keepTogether},arrow:{order:500,enabled:!0,fn:arrow,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:flip,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:inner},hide:{order:800,enabled:!0,fn:hide},computeStyle:{order:850,enabled:!0,fn:computeStyle,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:void 0}},Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function n(){},onUpdate:function n(){},modifiers},Popper=function(){function n(o,e){var t=this,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};classCallCheck(this,n),this.scheduleUpdate=function(){return requestAnimationFrame(t.update)},this.update=debounce$1(this.update.bind(this)),this.options=_extends$w({},n.Defaults,c),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=o&&o.jquery?o[0]:o,this.popper=e&&e.jquery?e[0]:e,this.options.modifiers={},Object.keys(_extends$w({},n.Defaults.modifiers,c.modifiers)).forEach(function(h){t.options.modifiers[h]=_extends$w({},n.Defaults.modifiers[h]||{},c.modifiers?c.modifiers[h]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(h){return _extends$w({name:h},t.options.modifiers[h])}).sort(function(h,y){return h.order-y.order}),this.modifiers.forEach(function(h){h.enabled&&isFunction(h.onLoad)&&h.onLoad(t.reference,t.popper,t.options,h,t.state)}),this.update();var p=this.options.eventsEnabled;p&&this.enableEventListeners(),this.state.eventsEnabled=p}return createClass(n,[{key:"update",value:function(){return update.call(this)}},{key:"destroy",value:function(){return destroy.call(this)}},{key:"enableEventListeners",value:function(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function(){return disableEventListeners.call(this)}}]),n}();Popper.Utils=(typeof window<"u"?window:global).PopperUtils;Popper.placements=placements;Popper.Defaults=Defaults;function toPopperPlacement(n){return n.replace(/(Top|Left)$/,"-start").replace(/(Right|Bottom)$/,"-end")}function parsePopperOffset(n){return{top:Math.floor(n.top||0),left:Math.floor(n.left||0)}}var TETHER_PLACEMENT={auto:"auto"};function _typeof$h(n){"@babel/helpers - typeof";return _typeof$h=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$h(n)}var _excluded$p=["modifiers"];function ownKeys$q(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$o(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$q(Object(e),!0).forEach(function(t){_defineProperty$v(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$q(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _objectWithoutProperties$r(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$r(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$r(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 _classCallCheck$e(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(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$e(n,o,e){return o&&_defineProperties$e(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$e(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$f(n,o)}function _setPrototypeOf$f(n,o){return _setPrototypeOf$f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$f(n,o)}function _createSuper$e(n){var o=_isNativeReflectConstruct$e();return function(){var t=_getPrototypeOf$e(n),c;if(o){var p=_getPrototypeOf$e(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$e(this,c)}}function _possibleConstructorReturn$e(n,o){if(o&&(_typeof$h(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$f(n)}function _assertThisInitialized$f(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$e(){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$e(n){return _getPrototypeOf$e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$e(n)}function _defineProperty$v(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var Tether=function(n){_inherits$e(e,n);var o=_createSuper$e(e);function e(){var t;_classCallCheck$e(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$v(_assertThisInitialized$f(t),"popper",void 0),_defineProperty$v(_assertThisInitialized$f(t),"popperHeight",0),_defineProperty$v(_assertThisInitialized$f(t),"popperWidth",0),_defineProperty$v(_assertThisInitialized$f(t),"anchorHeight",0),_defineProperty$v(_assertThisInitialized$f(t),"anchorWidth",0),_defineProperty$v(_assertThisInitialized$f(t),"state",{isMounted:!1}),_defineProperty$v(_assertThisInitialized$f(t),"onPopperUpdate",function(y){var g={popper:parsePopperOffset(y.offsets.popper),arrow:y.offsets.arrow?parsePopperOffset(y.offsets.arrow):{top:0,left:0}};t.props.onPopperUpdate(g,y)}),t}return _createClass$e(e,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(c,p){if(this.props.anchorRef){var h=this.props.anchorRef.getBoundingClientRect(),y=h.height,g=h.width;(this.anchorHeight!==y||this.anchorWidth!==g)&&(this.anchorHeight=y,this.anchorWidth=g,this.popper&&this.popper.scheduleUpdate())}if(this.props.popperRef){var $=this.props.popperRef.getBoundingClientRect(),E=$.height,A=$.width;(this.popperHeight!==E||this.popperWidth!==A)&&(this.popperHeight=E,this.popperWidth=A,this.popper&&this.popper.scheduleUpdate()),this.state.isMounted!==p.isMounted&&this.props.anchorRef&&this.initializePopper()}}},{key:"componentWillUnmount",value:function(){this.destroyPopover()}},{key:"initializePopper",value:function(){var c=this.props,p=c.placement,h=c.popperOptions,y=h.modifiers,g=_objectWithoutProperties$r(h,_excluded$p);!this.props.anchorRef||!this.props.popperRef||(this.popper=new Popper(this.props.anchorRef,this.props.popperRef,_objectSpread$o({placement:toPopperPlacement(p),modifiers:_objectSpread$o({arrow:{element:this.props.arrowRef,enabled:!!this.props.arrowRef},computeStyle:{gpuAcceleration:!1},applyStyle:{enabled:!1},applyReactStyle:{enabled:!0,fn:this.onPopperUpdate,order:900},preventOverflow:{enabled:!0}},y)},g)))}},{key:"destroyPopover",value:function(){this.popper&&(this.popper.destroy(),delete this.popper)}},{key:"render",value:function(){return this.props.children||null}}]),e}(reactExports.Component);_defineProperty$v(Tether,"defaultProps",{anchorRef:null,onPopperUpdate:function n(){return null},placement:TETHER_PLACEMENT.auto,popperRef:null,popperOptions:{}});var BaseProvider=function n(o){var e=o.children,t=o.overrides,c=o.theme,p=o.zIndex;return reactExports.createElement(LayersManager,{zIndex:p,overrides:t},reactExports.createElement(UIDReset,{prefix:"bui"},reactExports.createElement(ThemeProvider$1,{theme:c},e)))};const createBaseUiThemePrimitives=(n,o)=>{const{colors:e,genericFonts:t}=o;return{...n,primaryFontFamily:t.bodyFont,primary100:e.primary,primary200:e.primary,primary300:e.primary,primary400:e.primary,primary500:e.primary,primary600:e.primary,primary700:e.primary,mono100:e.bgColor,mono200:e.secondaryBg,mono300:e.gray30,mono400:e.gray30,mono500:e.gray60,mono600:e.fadedText40,mono700:e.gray60,mono800:e.bodyText,mono900:e.bodyText,mono1000:e.black}},createBaseUiThemeOverrides=n=>{const{inSidebar:o,colors:e,genericFonts:t,fontSizes:c,lineHeights:p,radii:h}=n,y={fontFamily:t.bodyFont,fontSize:c.md,fontSizeSm:c.sm,fontWeight:"normal",lineHeight:p.base,lineHeightTight:p.tight},g=e.secondaryBg,$=o?e.secondaryBg:e.bgColor,E=o?e.bgColor:e.secondaryBg;return{borders:{radius100:h.default,radius200:h.default,radius300:h.default,radius400:h.default,radius500:h.default,useRoundedCorners:!0,buttonBorderRadiusMini:h.md,buttonBorderRadius:h.default,checkboxBorderRadius:`min(${h.md}, ${h.maxCheckbox})`,inputBorderRadiusMini:h.md,inputBorderRadius:h.default,popoverBorderRadius:h.default,surfaceBorderRadius:h.default,tagBorderRadius:h.md},typography:{font100:{},font150:{...y},font200:{},font250:{},font300:{...y},font350:{...y},font400:{...y},font450:{...y},font460:{...y},font470:{...y},font500:{...y},font600:{},LabelXSmall:{...y},LabelSmall:{...y},LabelMedium:{...y},LabelLarge:{...y},ParagraphSmall:{...y}},colors:{white:e.white,black:e.black,primary:e.primary,primaryA:e.primary,backgroundPrimary:e.bgColor,backgroundSecondary:g,backgroundTertiary:e.bgColor,borderOpaque:e.darkenedBgMix25,accent:transparentize(e.primary,.5),tagPrimarySolidBackground:e.primary,tagPrimaryFontDisabled:e.fadedText40,tagPrimaryOutlinedDisabled:e.transparent,borderSelected:e.primary,contentPrimary:e.bodyText,inputPlaceholder:e.fadedText60,tickFillDisabled:e.fadedText40,tickMarkFill:e.gray20,tickFillSelected:e.primary,datepickerBackground:$,calendarBackground:$,calendarForeground:e.bodyText,calendarDayForegroundPseudoSelected:e.bodyText,calendarHeaderBackground:E,calendarHeaderBackgroundActive:E,calendarHeaderForeground:e.bodyText,calendarHeaderForegroundDisabled:e.gray40,calendarDayBackgroundSelected:e.primary,calendarDayBackgroundSelectedHighlighted:e.primary,calendarDayForegroundSelected:e.white,calendarDayForegroundSelectedHighlighted:e.white,calendarDayForegroundPseudoSelectedHighlighted:e.bodyText,menuFontHighlighted:e.bodyText,menuFontSelected:e.bodyText,modalCloseColor:e.bodyText,notificationInfoBackground:e.blueBackgroundColor,notificationInfoText:e.blueTextColor,notificationPositiveBackground:e.greenBackgroundColor,notificationPositiveText:e.greenTextColor,notificationWarningBackground:e.yellowBackgroundColor,notificationWarningText:e.yellowTextColor,notificationNegativeBackground:e.redBackgroundColor,notificationNegativeText:e.redTextColor,progressbarTrackFill:g,tickFill:e.lightenedBg05,tickMarkFillDisabled:e.lightenedBg05,menuFill:$,buttonDisabledFill:e.lightenedBg05,tickFillHover:g,inputFillDisabled:g,inputFillActive:g,toggleTrackFillDisabled:g,tickFillActive:g,sliderTrackFillDisabled:g,inputBorder:e.widgetBorderColor||g,inputFill:g,inputEnhanceFill:g,inputEnhancerFillDisabled:g,buttonDisabledSpinnerBackground:e.gray40,toggleTrackFill:e.gray40,sliderTrackFill:e.gray40,sliderHandleInnerFill:e.gray40,sliderHandleInnerFillDisabled:e.gray40}}},createBaseUiTheme=(n,o=primitives)=>createLightTheme(createBaseUiThemePrimitives(o,n),createBaseUiThemeOverrides(n)),computeDerivedColors=n=>{const{bodyText:o,secondaryBg:e,bgColor:t}=n,c=getLuminance(t)>.5,p=transparentize(o,.9),h=transparentize(o,.8),y=transparentize(o,.7),g=transparentize(o,.6),$=transparentize(o,.4),E=mix$1(t,e,.5),A=c?darken(E,.3):lighten(E,.6),N=transparentize(A,.75),H=transparentize(A,.85),Z=lighten(t,.025);return{fadedText05:p,fadedText10:h,fadedText20:y,fadedText40:g,fadedText60:$,bgMix:E,darkenedBgMix100:A,darkenedBgMix25:N,darkenedBgMix15:H,lightenedBg05:Z}};function _isLightBackground(n){return getLuminance(n)>.5}function hasLightBackgroundColor(n){return _isLightBackground(n.colors.bgColor)}const createEmotionColors=n=>{const o=computeDerivedColors(n),e=defaultCategoricalColorsArray(n),t=defaultSequentialColorsArray(n);return{...n,...o,link:n.blueTextColor,codeTextColor:n.greenTextColor,codeBackgroundColor:o.bgMix,borderColor:o.fadedText10,borderColorLight:o.fadedText05,dataframeBorderColor:o.fadedText05,dataframeHeaderBackgroundColor:o.bgMix,headingColor:n.bodyText,chartCategoricalColors:e,chartSequentialColors:t}};function getDividerColors(n){const{redColor:o,orangeColor:e,yellowColor:t,blueColor:c,greenColor:p,violetColor:h,grayColor:y}=n.colors;return{red:o,orange:e,yellow:t,blue:c,green:p,violet:h,gray:y,grey:y,rainbow:`linear-gradient(to right, ${o}, ${e}, ${t}, ${p}, ${c}, ${h})`}}function getMetricColor(n,o){switch(o){case Metric$1.MetricColor.RED:return n.colors.redColor;case Metric$1.MetricColor.GREEN:return n.colors.greenColor;default:return n.colors.grayColor}}function getMarkdownBgColors(n){const o=hasLightBackgroundColor(n),e=n.colors;return{redbg:e.redBackgroundColor,orangebg:e.orangeBackgroundColor,yellowbg:e.yellowBackgroundColor,bluebg:e.blueBackgroundColor,greenbg:e.greenBackgroundColor,violetbg:e.violetBackgroundColor,purplebg:transparentize(e[o?"purple90":"purple80"],o?.9:.7),graybg:e.grayBackgroundColor,primarybg:transparentize(e.primary,o?.9:.7)}}function getMetricBackgroundColor(n,o){switch(o){case Metric$1.MetricColor.RED:return n.colors.redBackgroundColor;case Metric$1.MetricColor.GREEN:return n.colors.greenBackgroundColor;default:return n.colors.grayBackgroundColor}}function getMarkdownTextColors(n){const o=hasLightBackgroundColor(n),e=n.colors,t=e.primary,c=e.redTextColor,p=e.orangeTextColor,h=e.yellowTextColor,y=e.blueTextColor,g=e.greenTextColor,$=e.violetTextColor,E=o?e.purple100:e.purple80,A=e.grayTextColor;return{red:c,orange:p,yellow:h,green:g,blue:y,violet:$,purple:E,gray:A,primary:t}}function getMetricTextColor(n,o){switch(o){case Metric$1.MetricColor.RED:return n.colors.redTextColor;case Metric$1.MetricColor.GREEN:return n.colors.greenTextColor;default:return n.colors.grayTextColor}}function getGray70(n){return hasLightBackgroundColor(n)?n.colors.gray70:n.colors.gray30}function getGray30(n){return hasLightBackgroundColor(n)?n.colors.gray30:n.colors.gray85}function getGray90(n){return hasLightBackgroundColor(n)?n.colors.gray90:n.colors.gray10}function getBlue80(n){return hasLightBackgroundColor(n)?n.colors.blue80:n.colors.blue40}function getBlueArrayAsc(n){return[n.blue10,n.blue20,n.blue30,n.blue40,n.blue50,n.blue60,n.blue70,n.blue80,n.blue90,n.blue100]}function getBlueArrayDesc(n){return[n.blue100,n.blue90,n.blue80,n.blue70,n.blue60,n.blue50,n.blue40,n.blue30,n.blue20,n.blue10]}function getDivergingColorsArray(n){const{colors:o}=n;return[o.red100,o.red90,o.red70,o.red50,o.red30,o.blue30,o.blue50,o.blue70,o.blue90,o.blue100]}function defaultSequentialColorsArray(n){return _isLightBackground(n.bgColor)?getBlueArrayAsc(n):getBlueArrayDesc(n)}function defaultCategoricalColorsArray(n){return _isLightBackground(n.bgColor)?[n.blue80,n.blue40,n.red80,n.red40,n.blueGreen80,n.green40,n.orange80,n.orange50,n.purple80,n.gray40]:[n.blue40,n.blue80,n.red40,n.red80,n.green40,n.blueGreen80,n.orange50,n.orange80,n.purple80,n.gray40]}function getDecreasingRed(n){return hasLightBackgroundColor(n)?n.colors.red80:n.colors.red40}function getIncreasingGreen(n){return hasLightBackgroundColor(n)?n.colors.blueGreen80:n.colors.green40}const breakpoints={hideWidgetDetails:180,hideNumberInputControls:120,sm:"576px",columns:"640px",md:"768px"},colors={transparent:"transparent",black:"#000000",white:"#ffffff",gray10:"#fafafa",gray20:"#f0f2f6",gray30:"#e6eaf1",gray40:"#d5dae5",gray50:"#bfc5d3",gray60:"#a3a8b8",gray70:"#808495",gray80:"#555867",gray85:"#31333F",gray90:"#262730",gray100:"#0e1117",red10:"#fff0f0",red20:"#ffdede",red30:"#ffc7c7",red40:"#ffabab",red50:"#ff8c8c",red60:"#ff6c6c",red70:"#ff4b4b",red80:"#ff2b2b",red90:"#bd4043",red100:"#7d353b",orange10:"#fffae8",orange20:"#fff6d0",orange30:"#ffecb0",orange40:"#ffe08e",orange50:"#ffd16a",orange60:"#ffbd45",orange70:"#ffa421",orange80:"#ff8700",orange90:"#ed6f13",orange95:"#e2660c",orange100:"#d95a00",yellow10:"#ffffe1",yellow20:"#ffffc2",yellow30:"#ffffa0",yellow40:"#ffff7d",yellow50:"#ffff59",yellow60:"#fff835",yellow65:"#ffff12",yellow70:"#ffe312",yellow80:"#faca2b",yellow90:"#edbb16",yellow100:"#dea816",yellow110:"#916e10",yellow115:"#926c05",green10:"#dffde9",green20:"#c0fcd3",green30:"#9ef6bb",green40:"#7defa1",green50:"#5ce488",green60:"#3dd56d",green70:"#21c354",green80:"#09ab3b",green90:"#158237",green100:"#177233",blueGreen10:"#dcfffb",blueGreen20:"#bafff7",blueGreen30:"#93ffee",blueGreen40:"#6bfde3",blueGreen50:"#45f4d5",blueGreen60:"#20e7c5",blueGreen70:"#00d4b1",blueGreen80:"#29b09d",blueGreen90:"#2c867c",blueGreen100:"#246e69",lightBlue10:"#e0feff",lightBlue20:"#bffdff",lightBlue30:"#9af8ff",lightBlue40:"#73efff",lightBlue50:"#4be4ff",lightBlue60:"#24d4ff",lightBlue70:"#00c0f2",lightBlue80:"#00a4d4",lightBlue90:"#0d8cb5",lightBlue100:"#15799e",blue10:"#e4f5ff",blue20:"#c7ebff",blue30:"#a6dcff",blue40:"#83c9ff",blue50:"#60b4ff",blue60:"#3d9df3",blue65:"#1c83ff",blue70:"#1c83e1",blue80:"#0068c9",blue90:"#0054a3",blue100:"#004280",purple10:"#f5ebff",purple20:"#ebd6ff",purple30:"#dbbbff",purple40:"#c89dff",purple50:"#b27eff",purple60:"#9a5dff",purple70:"#803df5",purple80:"#6d3fc0",purple90:"#583f84",purple100:"#3f3163"},iconSizes={xs:"0.5rem",sm:"0.75rem",md:"0.9rem",base:"1rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.8rem",threeXL:"2.3rem"},radii={md:"0.25rem",default:"0.5rem",xl:"0.75rem",xxl:"1rem",button:"0.5rem",chatInput:"1.25rem",full:"9999px",maxCheckbox:"0.35rem"},sizes={full:"100%",headerHeight:"3.75rem",fullScreenHeaderHeight:"2.875rem",sidebarTopSpace:"6rem",toastWidth:"21rem",contentMaxWidth:"736px",maxChartTooltipWidth:"30rem",checkbox:"1rem",borderWidth:"1px",smallElementHeight:"1.5rem",minElementHeight:"2.5rem",largestElementHeight:"4.25rem",smallLogoHeight:"1.25rem",defaultLogoHeight:"1.5rem",largeLogoHeight:"2rem",sliderThumb:"0.75rem",wideSidePadding:"5rem",headerDecorationHeight:"0.125rem",appRunningMen:"1.6rem",appStatusMaxWidth:"20rem",spinnerSize:"1.375rem",spinnerThickness:"0.125rem",tabHeight:"2.5rem",minPopupWidth:"20rem",maxTooltipHeight:"18.75rem",chatAvatarSize:"2rem",clearIconSize:"1.5em",numberInputControlsWidth:"2rem",emptyDropdownHeight:"5.625rem",dropdownItemHeight:"2.5rem",maxDropdownHeight:"18.75rem",appDefaultBottomPadding:"3.5rem",defaultMapHeight:"31.25rem",defaultChartHeight:"21.875rem",defaultChartWidth:"25rem",minMenuWidth:"8rem",minChatInputFileListHeight:"3rem",headerItemHeight:"1.75rem",headerRightContentMaxWidth:"12.5rem"},spacing={px:"1px",none:"0",threeXS:"0.125rem",twoXS:"0.25rem",xs:"0.375rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.25rem",twoXL:"1.5rem",threeXL:"2rem",fourXL:"4rem"},fonts={sansSerif:'"Source Sans", sans-serif',monospace:'"Source Code Pro", monospace',serif:'"Source Serif", serif',materialIcons:"Material Symbols Rounded"},genericFonts={bodyFont:fonts.sansSerif,codeFont:fonts.monospace,headingFont:fonts.sansSerif,iconFont:fonts.materialIcons},fontSizes={baseFontSize:16,twoSm:"0.75rem",sm:"0.875rem",md:"1rem",mdLg:"1.125rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.75rem",threeXL:"2.25rem",fourXL:"2.75rem",codeFontSize:"0.875rem",inlineCodeFontSize:"0.75em",h1FontSize:"2.75rem",h2FontSize:"2.25rem",h3FontSize:"1.75rem",h4FontSize:"1.5rem",h5FontSize:"1.25rem",h6FontSize:"1rem"},fontWeights={normal:400,semiBold:500,bold:600,extrabold:700,code:400,codeBold:600,codeExtraBold:700,h1FontWeight:700,h2FontWeight:600,h3FontWeight:600,h4FontWeight:600,h5FontWeight:600,h6FontWeight:600},lineHeights={none:1,headings:1.2,tight:1.25,inputWidget:1.4,small:1.5,base:1.6,menuItem:2},sidebar=100,menuButton=sidebar+10,balloons=1e6,header=balloons-10,bottom=sidebar-1,sidebarMobile=balloons-5,fullscreenWrapper=balloons+50,headerDecoration=balloons-1,popup=fullscreenWrapper+10,tablePortal=fullscreenWrapper+60,cacheSpinner=sidebar+1,toast=popup+1,zIndices={hide:-1,auto:"auto",base:0,priority:1,sidebar,menuButton,balloons,header,sidebarMobile,popup,fullscreenWrapper,tablePortal,bottom,cacheSpinner,toast,headerDecoration},requiredThemeColors={bgColor:colors.white,secondaryBg:colors.gray20,bodyText:colors.gray85,primary:colors.red70,secondary:colors.blue70,redColor:colors.red70,orangeColor:colors.orange70,yellowColor:colors.yellow80,blueColor:colors.blue70,greenColor:colors.green70,violetColor:colors.purple70,grayColor:colors.gray60,redBackgroundColor:transparentize(colors.red80,.9),orangeBackgroundColor:transparentize(colors.orange70,.9),yellowBackgroundColor:transparentize(colors.yellow65,.9),blueBackgroundColor:transparentize(colors.blue65,.9),greenBackgroundColor:transparentize(colors.green70,.9),violetBackgroundColor:transparentize(colors.purple60,.9),grayBackgroundColor:transparentize(colors.gray85,.9),redTextColor:colors.red90,orangeTextColor:colors.orange95,yellowTextColor:colors.yellow115,blueTextColor:colors.blue90,greenTextColor:colors.green90,violetTextColor:colors.purple90,grayTextColor:transparentize(colors.gray85,.4)},optionalThemeColors={},themeColors={...colors,...requiredThemeColors,...optionalThemeColors},emotionBaseTheme={inSidebar:!1,showSidebarBorder:!1,linkUnderline:!0,breakpoints,colors:createEmotionColors(themeColors),fonts,fontSizes,fontWeights,genericFonts,iconSizes,lineHeights,radii,sizes,spacing,zIndices},genericColors$1={...colors,bgColor:colors.gray100,bodyText:colors.gray10,primary:colors.red70,secondaryBg:colors.gray90,redColor:colors.red80,orangeColor:colors.orange80,yellowColor:colors.yellow70,blueColor:colors.blue80,greenColor:colors.green80,violetColor:colors.purple70,grayColor:colors.gray80,redBackgroundColor:transparentize(colors.red60,.8),orangeBackgroundColor:transparentize(colors.orange80,.8),yellowBackgroundColor:transparentize(colors.yellow65,.8),blueBackgroundColor:transparentize(colors.blue60,.8),greenBackgroundColor:transparentize(colors.green60,.8),violetBackgroundColor:transparentize(colors.purple60,.8),grayBackgroundColor:transparentize(colors.gray70,.8),redTextColor:colors.red60,orangeTextColor:colors.orange60,yellowTextColor:colors.yellow20,blueTextColor:colors.blue60,greenTextColor:colors.green50,violetTextColor:colors.purple50,grayTextColor:transparentize(colors.gray10,.4)},emotionDarkTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors$1})},genericColors={...colors},emotionLightTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors})},baseuiLightTheme=createBaseUiTheme(emotionLightTheme,primitives),baseuiDarkTheme=createBaseUiTheme(emotionDarkTheme,primitives$1),globalStyles=n=>css("html{font-size:",n.fontSizes.baseFontSize,"px;}@media print{html{height:100%;print-color-adjust:exact;-webkit-print-color-adjust:exact;}}*,*::before,*::after{box-sizing:border-box;}body{margin:0;font-family:",n.genericFonts.bodyFont,";font-weight:",n.fontWeights.normal,";line-height:",n.lineHeights.base,";color:",n.colors.bodyText,";background-color:",n.colors.bgColor,";-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:",transparentize(n.colors.black,1),';-webkit-font-smoothing:auto;}body.embedded{overflow:hidden;}body.embedded:hover{overflow:auto;}[tabindex="-1"]:focus:not(:focus-visible){outline:0 !important;}p,ol,ul,dl{margin:0 0 1rem 0;padding:0;font-size:1rem;font-weight:',n.fontWeights.normal,';}ol ol,ul ul,ol ul,ul ol{margin-bottom:0;}a:not([href]):not([class]){&,&:hover{color:inherit;text-decoration:none;}}img,svg{vertical-align:middle;}input,button,select,optgroup,textarea{margin:0;font-family:inherit;line-height:inherit;font-size:inherit;}button,input{overflow:visible;}button,[role="button"]{&:not(:disabled){cursor:pointer;}}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button;}[hidden]{display:none !important;}@supports (scrollbar-color:transparent transparent){*{scrollbar-width:thin;scrollbar-color:transparent transparent;}*:hover{scrollbar-color:',n.colors.fadedText40," transparent;}}@supports not (scrollbar-color:transparent transparent){::-webkit-scrollbar{background:transparent;border-radius:",n.radii.full,";height:6px;width:6px;}::-webkit-scrollbar:active{background:",n.colors.fadedText10,";}:hover::-webkit-scrollbar-thumb:vertical,:hover::-webkit-scrollbar-thumb:horizontal{background:",n.colors.fadedText40,";border-radius:",n.radii.full,";}}"),baseTheme={name:"base",emotion:emotionBaseTheme,basewebTheme:baseuiLightTheme,primitives},darkTheme={name:"Dark",emotion:emotionDarkTheme,basewebTheme:baseuiDarkTheme,primitives:primitives$1},lightTheme={name:"Light",emotion:emotionLightTheme,basewebTheme:baseuiLightTheme,primitives},STALE_TRANSITION_PARAMS="1s ease-in 0.5s",STALE_STYLES={opacity:.33,transition:`opacity ${STALE_TRANSITION_PARAMS}`},CACHED_THEME_VERSION=1,CACHED_THEME_BASE_KEY=`stActiveTheme-${window.location.pathname}`,LocalStore={CACHED_THEME_VERSION,CACHED_THEME_BASE_KEY,ACTIVE_THEME:`${CACHED_THEME_BASE_KEY}-v${CACHED_THEME_VERSION}`},AUTO_THEME_NAME="Use system setting",CUSTOM_THEME_NAME="Custom Theme",CUSTOM_THEME_LIGHT_NAME="Custom Theme Light",CUSTOM_THEME_DARK_NAME="Custom Theme Dark",CUSTOM_THEME_AUTO_NAME="Custom Theme Auto",LOG$h=loglevelExports.getLogger("theme:utils");function mergeTheme(n,o){if(o&&isObject$1(o)){const e=new CustomThemeConfig(o);return createTheme(n.name,e,n)}return n}const getMergedLightTheme=once(()=>mergeTheme(lightTheme,window.__streamlit?.LIGHT_THEME)),getMergedDarkTheme=once(()=>mergeTheme(darkTheme,window.__streamlit?.DARK_THEME)),getSystemThemePreference=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",getSystemTheme=()=>getSystemThemePreference()==="dark"?getMergedDarkTheme():getMergedLightTheme(),createAutoTheme=()=>({...getSystemTheme(),name:AUTO_THEME_NAME}),createPresetThemes=()=>[createAutoTheme(),getMergedLightTheme(),getMergedDarkTheme()],isPresetTheme=n=>createPresetThemes().map(e=>e.name).includes(n.name),bgColorToBaseString=n=>n===void 0||getLuminance(n)>.5?"light":"dark",isColor=n=>{const o=new Option().style;return o.color=n,o.color!==""},roundFontSizeToNearestEighth=n=>Math.round(n*8)/8,parseFont=(n,o=fonts.sansSerif)=>{const e=n.trim();if(!e)return o;const t={"sans-serif":fonts.sansSerif,serif:fonts.serif,monospace:fonts.monospace},c=e.toLowerCase().replaceAll(" ","-");return c in t?t[c]:`${e}, ${o}`},parseColor=(n,o,e=!1)=>{if(isColor(n))return n;if(isColor(`#${n}`))return`#${n}`;if(o.toLowerCase().includes("color")){const c=e?"theme.sidebar":"theme";LOG$h.warn(`Invalid color passed for ${o} in ${c}: "${n}"`)}},resolveBgColor=(n,o,e,t)=>n||(o?transparentize(o,t?.9:.8):e),resolveTextColor=(n,o,e,t)=>n||(o?t?darken(o,.15):lighten(o,.15):e),setBackgroundColors=(n,o)=>{const e={...n},t={redBackgroundColor:{main:o.redColor,background:o.redBackgroundColor},orangeBackgroundColor:{main:o.orangeColor,background:o.orangeBackgroundColor},yellowBackgroundColor:{main:o.yellowColor,background:o.yellowBackgroundColor},blueBackgroundColor:{main:o.blueColor,background:o.blueBackgroundColor},greenBackgroundColor:{main:o.greenColor,background:o.greenBackgroundColor},violetBackgroundColor:{main:o.violetColor,background:o.violetBackgroundColor},grayBackgroundColor:{main:o.grayColor,background:o.grayBackgroundColor}},c=getLuminance(e.bgColor)>.5;return Object.entries(t).forEach(([p,{main:h,background:y}])=>{const g=p;e[g]=resolveBgColor(y,h,n[g],c)}),e},setTextColors=(n,o)=>{const e={...n},t={redTextColor:{main:o.redColor,text:o.redTextColor},orangeTextColor:{main:o.orangeColor,text:o.orangeTextColor},yellowTextColor:{main:o.yellowColor,text:o.yellowTextColor},blueTextColor:{main:o.blueColor,text:o.blueTextColor},greenTextColor:{main:o.greenColor,text:o.greenTextColor},violetTextColor:{main:o.violetColor,text:o.violetTextColor},grayTextColor:{main:o.grayColor,text:o.grayTextColor}},c=getLuminance(e.bgColor)>.5;return Object.entries(t).forEach(([p,{main:h,text:y}])=>{const g=p;e[g]=resolveTextColor(y,h,n[g],c)}),e},parseRadius=n=>{let o="rem",e;const t=n.trim().toLowerCase();return t==="none"?e=0:t==="small"?e=.35:t==="medium"?e=.5:t==="large"?e=1:t==="full"?e=1.4:t.endsWith("rem")?e=parseFloat(t):t.endsWith("px")?(e=parseFloat(t),o="px"):isNaN(parseFloat(t))||(e=parseFloat(t),o="px"),[e,o]},parseFontSize=(n,o,e)=>{const t=e?"theme.sidebar":"theme";if(typeof o=="string"){const c=o.trim().toLowerCase(),p=parseFloat(c);if(p&&(c.endsWith("rem")||c.endsWith("px")))return c;if(p.toString()===c)return`${c}px`}LOG$h.warn(`Invalid size passed for ${n} in ${t}: ${o}. Falling back to default ${n}.`)},isValidFontWeight=(n,o,e,t,c)=>{const p=c?"theme.sidebar":"theme";if(notNullOrUndefined(o)){const h=Number.isInteger(o),y=o%100===0,g=o>=e&&o<=t;return!h||!y||!g?(LOG$h.warn(`Invalid ${n}: ${o} in ${p}. The ${n} must be an integer ${e}-${t}, and an increment of 100. Falling back to default font weight.`),!1):!0}return!1},convertHeadingFontSizeToRem=(n,o,e,t)=>{const c=parseFontSize(n,o,t);if(c?.endsWith("rem"))return c;if(c?.endsWith("px"))return`${parseFloat(c)/e}rem`},setHeadingFontSizes=(n,o,e,t)=>{const c={...n};return t&&t.forEach((p,h)=>{const y=`h${h+1}FontSize`,g=convertHeadingFontSizeToRem(`${y} in headingFontSizes`,p,e,o);g&&(c[y]=g)}),c},setFontWeights=(n,o,e,t,c)=>{const p={...n,h1FontWeight:o?600:n.h1FontWeight};return e&&isValidFontWeight("baseFontWeight",e,100,600)&&(p.normal=e,p.semiBold=e+100,p.bold=e+200,p.extrabold=e+300,p.code=e,p.codeBold=e+200,p.codeExtraBold=e+300),t&&isValidFontWeight("codeFontWeight",t,100,600)&&(p.code=t,p.codeBold=t+200,p.codeExtraBold=t+300),c&&c.forEach((h,y)=>{const g=`h${y+1}FontWeight`;isValidFontWeight(`${g} in headingFontWeights`,h,100,900,o)&&(p[g]=h)}),p},validateChartColors=(n,o)=>o.map(e=>parseColor(e,n)).filter(e=>e!==void 0),createEmotionTheme=(n,o=baseTheme)=>{const{colors:e,genericFonts:t,inSidebar:c}=o.emotion,{baseFontSize:p,baseFontWeight:h,baseRadius:y,buttonRadius:g,codeFontSize:$,codeFontWeight:E,showWidgetBorder:A,headingFont:N,headingFontSizes:H,headingFontWeights:Z,bodyFont:X,codeFont:be,showSidebarBorder:we,linkUnderline:$e,chartCategoricalColors:Ce,chartSequentialColors:Ie,...Ne}=n,Fe=Object.entries(Ne).reduce((pt,[wt,Ft])=>{const Ht=parseColor(Ft,wt,c);return Ht&&(pt[wt]=Ht),pt},{}),{secondaryBackgroundColor:Be,backgroundColor:Ge,primaryColor:je,textColor:De,dataframeBorderColor:Ue,dataframeHeaderBackgroundColor:Je,widgetBorderColor:Xe,borderColor:Ke,linkColor:ze,codeTextColor:nt,codeBackgroundColor:ct,redColor:at,orangeColor:dt,yellowColor:Me,blueColor:We,greenColor:tt,violetColor:Ve,grayColor:vt}=Fe,xt={...e,primary:je??e.primary,bodyText:De??e.bodyText,secondaryBg:Be??e.secondaryBg,bgColor:Ge??e.bgColor,redColor:at??e.redColor,orangeColor:dt??e.orangeColor,yellowColor:Me??e.yellowColor,blueColor:We??e.blueColor,greenColor:tt??e.greenColor,violetColor:Ve??e.violetColor,grayColor:vt??e.grayColor,secondary:je??e.primary},Qe={colors:{...createEmotionColors(xt)},showSidebarBorder:we??o.emotion.showSidebarBorder,linkUnderline:$e??o.emotion.linkUnderline,radii:{...o.emotion.radii},fontSizes:{...o.emotion.fontSizes},fontWeights:{...o.emotion.fontWeights}};if(Qe.colors.codeBackgroundColor=ct??e.codeBackgroundColor,Qe.colors.dataframeHeaderBackgroundColor=Je??e.dataframeHeaderBackgroundColor,notNullOrUndefined(Ke)){Qe.colors.borderColor=Ke;const pt=transparentize(Ke,.55);Qe.colors.borderColorLight=pt,Qe.colors.dataframeBorderColor=pt}if(notNullOrUndefined(Ue)&&(Qe.colors.dataframeBorderColor=Ue),(A||Xe)&&(Qe.colors.widgetBorderColor=Xe||Qe.colors.borderColor),Qe.colors=setBackgroundColors(Qe.colors,Fe),Qe.colors=setTextColors(Qe.colors,Fe),Qe.colors.link=ze??Qe.colors.blueTextColor,Qe.colors.codeTextColor=nt??Qe.colors.greenTextColor,notNullOrUndefined(Ce)&&Ce.length>0){const pt=validateChartColors("chartCategoricalColors",Ce);pt.length>0&&(Qe.colors.chartCategoricalColors=pt)}if(notNullOrUndefined(Ie)&&Ie.length>0){const pt=validateChartColors("chartSequentialColors",Ie);pt.length===10?Qe.colors.chartSequentialColors=pt:LOG$h.warn(`Invalid chartSequentialColors: ${Ie.toString()}. Falling back to default chartSequentialColors.`)}if(notNullOrUndefined(y)){const[pt,wt]=parseRadius(y);if(notNullOrUndefined(pt)&&!isNaN(pt)){const Ft=addCssUnit(pt,wt);Qe.radii.default=Ft,Qe.radii.button=Ft,Qe.radii.md=addCssUnit(roundToTwoDecimals(pt*.5),wt),Qe.radii.xl=addCssUnit(roundToTwoDecimals(pt*1.5),wt),Qe.radii.xxl=addCssUnit(roundToTwoDecimals(pt*2),wt)}else LOG$h.warn(`Invalid base radius: ${y}. Falling back to default base radius.`)}if(notNullOrUndefined(g)){const[pt,wt]=parseRadius(g);notNullOrUndefined(pt)&&!isNaN(pt)?Qe.radii.button=addCssUnit(pt,wt):LOG$h.warn(`Invalid button radius: ${g}. Falling back to default button radius.`)}if(p&&p>0&&(Qe.fontSizes.baseFontSize=p),$){const pt=parseFontSize("codeFontSize",$,c);pt&&(Qe.fontSizes.codeFontSize=pt)}Qe.fontSizes=setHeadingFontSizes(Qe.fontSizes,c,Qe.fontSizes.baseFontSize,H),Qe.fontWeights=setFontWeights(o.emotion.fontWeights,c,h,E,Z);const St={...t,bodyFont:X?parseFont(X,fonts.sansSerif):t.bodyFont,codeFont:be?parseFont(be,fonts.monospace):t.codeFont,headingFont:N?parseFont(N,fonts.sansSerif):t.headingFont};return X&&!N&&(St.headingFont=parseFont(X,fonts.sansSerif)),{...o.emotion,genericFonts:St,...Qe}},toThemeInput=n=>{const{colors:o}=n;return{primaryColor:o.primary,backgroundColor:o.bgColor,secondaryBackgroundColor:o.secondaryBg,textColor:o.bodyText,bodyFont:n.genericFonts.bodyFont}},toExportedTheme=n=>{const{colors:o}=n,e=toThemeInput(n);return{primaryColor:e.primaryColor,backgroundColor:e.backgroundColor,secondaryBackgroundColor:e.secondaryBackgroundColor,textColor:e.textColor,bodyFont:e.bodyFont,base:bgColorToBaseString(e.backgroundColor),...computeDerivedColors(o)}},completeThemeInput=(n,o)=>new CustomThemeConfig({...toThemeInput(o.emotion),...n}),createTheme=(n,o,e,t=!1)=>{let c;e?c=completeThemeInput(o,e):o.base===CustomThemeConfig.BaseTheme.DARK?c=completeThemeInput(o,darkTheme):c=completeThemeInput(o,lightTheme);const p=c.backgroundColor,h=merge$1(cloneDeep(e||(getLuminance(p)>.5?lightTheme:darkTheme)),{emotion:{inSidebar:t}}),y=createEmotionTheme(c,h),g=cloneDeep(createBaseUiTheme(y,h.primitives));return{...h,name:n,emotion:y,basewebTheme:g,themeInput:o}},getCachedTheme=()=>{if(!localStorageAvailable())return null;const n=window.localStorage.getItem(LocalStore.ACTIVE_THEME);if(!n)return null;const{name:o,themeInput:e}=JSON.parse(n);switch(o){case lightTheme.name:return getMergedLightTheme();case darkTheme.name:return getMergedDarkTheme();default:return createTheme(o,e)}},deleteOldCachedThemes=()=>{const{CACHED_THEME_VERSION:n,CACHED_THEME_BASE_KEY:o}=LocalStore,{localStorage:e}=window;e.removeItem("stActiveTheme"),e.removeItem(o);for(let t=1;t<=n;t++)e.removeItem(`${o}-v${t}`)},setCachedTheme=n=>{if(!localStorageAvailable()||(deleteOldCachedThemes(),isLightThemeInQueryParams()||isDarkThemeInQueryParams()))return;const o={name:n.name,...!isPresetTheme(n)&&{themeInput:toThemeInput(n.emotion)}};window.localStorage.setItem(LocalStore.ACTIVE_THEME,JSON.stringify(o))},removeCachedTheme=()=>{localStorageAvailable()&&window.localStorage.removeItem(LocalStore.ACTIVE_THEME)},getHostSpecifiedTheme=()=>isLightThemeInQueryParams()?getMergedLightTheme():isDarkThemeInQueryParams()?getMergedDarkTheme():createAutoTheme(),getDefaultTheme=()=>{const n=getCachedTheme();return n&&n.name!==AUTO_THEME_NAME?n:getHostSpecifiedTheme()},whiteSpace=/\s+/;function computeSpacingStyle(n,o){return n===""?"":n.split(whiteSpace).map(e=>e==="0"?o.spacing.none:e in o.spacing?o.spacing[e]:(LOG$h.error(`Invalid spacing value: ${e}`),o.spacing.none)).join(" ")}function addCssUnit(n,o){return`${n}${o}`}function roundToTwoDecimals(n){return parseFloat(n.toFixed(2))}function blend(n,o){if(o===void 0)return n;const[e,t,c,p]=parseToRgba(n);if(p===1)return n;const[h,y,g,$]=parseToRgba(o),E=p+$*(1-p),A=Math.round((p*e+$*h*(1-p))/E),N=Math.round((p*t+$*y*(1-p))/E),H=Math.round((p*c+$*g*(1-p))/E);return toHex(`rgba(${A}, ${N}, ${H}, ${E})`)}const convertRemToPx=n=>parseFloat(n.replace(/rem$/,""))*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16),skipProtobufDefaults=(n,o)=>{if(o===""||o===null||Array.isArray(o)&&o.length===0)return n},handleSectionInheritance=(n,o)=>{const e=o==="light",t=e?CustomThemeConfig.BaseTheme.LIGHT:CustomThemeConfig.BaseTheme.DARK,{light:c,dark:p,sidebar:h,...y}=n,g=e?c:p,{sidebar:$,...E}=g||{},A=mergeWith({},y,E,{base:t},skipProtobufDefaults);return(h||$)&&(A.sidebar=mergeWith({},h,$,skipProtobufDefaults)),A},hasThemeSectionConfigs=n=>{if(!n)return!1;const o=e=>e==null?!1:Array.isArray(e)?e.length>0:typeof e=="object"?Object.values(e).some(o):!0;return Object.values(n).some(o)},createCustomThemes=n=>{const o=hasThemeSectionConfigs(n.light),e=hasThemeSectionConfigs(n.dark),t=[];if(o||e){const c=handleSectionInheritance(n,"light"),p={...createTheme(CUSTOM_THEME_LIGHT_NAME,c),displayName:"Light"},h=handleSectionInheritance(n,"dark"),y={...createTheme(CUSTOM_THEME_DARK_NAME,h),displayName:"Dark"},$={...getSystemThemePreference()==="dark"?y:p,displayName:AUTO_THEME_NAME,name:CUSTOM_THEME_AUTO_NAME};t.push(p,y,$)}else{const c=createTheme(CUSTOM_THEME_NAME,n);t.push(c)}return t},setSidebarHeadingFontSizes=n=>merge$1([],["1.5rem","1.25rem","1.125rem","1rem","0.875rem","0.75rem"],n||[]),createSidebarTheme=n=>{const o=n.themeInput?.sidebar,{bgColor:e,secondaryBg:t}=n.emotion.colors,c=o?.backgroundColor||t,p=o?.secondaryBackgroundColor||e,h=setSidebarHeadingFontSizes(o?.headingFontSizes);let y=getLuminance(c)>.5?CustomThemeConfig.BaseTheme.LIGHT:CustomThemeConfig.BaseTheme.DARK;n.name===CUSTOM_THEME_LIGHT_NAME?y=CustomThemeConfig.BaseTheme.LIGHT:n.name===CUSTOM_THEME_DARK_NAME&&(y=CustomThemeConfig.BaseTheme.DARK);const g=mergeWith({},n.themeInput,o,{base:y,backgroundColor:c,secondaryBackgroundColor:p,headingFontSizes:h},skipProtobufDefaults);return createTheme("Sidebar",g,void 0,!0)},isPositiveNumber=n=>typeof n=="number"&&n>=0&&!isNaN(n),isNonZeroPositiveNumber=n=>typeof n=="number"&&n>0&&!isNaN(n),getWidth=(n,o)=>{if(o?.useContainerWidth)return{type:"stretch"};const e=n.widthConfig?.useStretch||o?.widthConfig?.useStretch,t=n?.widthConfig?.useContent||o?.widthConfig?.useContent,c=n?.widthConfig?.pixelWidth||o?.widthConfig?.pixelWidth||n.widthConfig?.pixelWidth===0,p=n.widthConfig?.remWidth;return e?{type:"stretch"}:t?{type:"content"}:p&&isPositiveNumber(n.widthConfig?.remWidth)?{type:"rem",rem:n.widthConfig.remWidth}:c&&isPositiveNumber(n.widthConfig?.pixelWidth)?{type:"pixel",pixels:n.widthConfig.pixelWidth}:c&&isPositiveNumber(o?.widthConfig?.pixelWidth)?{type:"pixel",pixels:o.widthConfig.pixelWidth}:isNonZeroPositiveNumber(o?.width)&&!n.widthConfig?{type:"pixel",pixels:o.width}:{type:"auto"}},getHeight=(n,o)=>{const e=!!n.heightConfig?.useStretch,t=!!n.heightConfig?.useContent,c=!!n.heightConfig?.pixelHeight||n.heightConfig?.pixelHeight===0,p=n.heightConfig?.remHeight;return e?{type:"stretch"}:t?{type:"content"}:p&&isPositiveNumber(n.heightConfig?.remHeight)?{type:"rem",rem:n.heightConfig.remHeight}:c&&isPositiveNumber(n.heightConfig?.pixelHeight)?{type:"pixel",pixels:n.heightConfig.pixelHeight}:isNonZeroPositiveNumber(o?.height)&&!n.heightConfig?{type:"pixel",pixels:o.height}:{type:"auto"}},getFlex=(n,o,e,t)=>{if(e===Direction.HORIZONTAL)switch(n.type){case"pixel":return`0 0 ${n.pixels}px`;case"rem":return`0 0 ${n.rem}rem`;case"content":return"0 0 fit-content";case"stretch":return`1 1 ${t??"fit-content"}`;case"auto":return;default:assertNever(n)}else if(e===Direction.VERTICAL)switch(o.type){case"pixel":return`0 0 ${o.pixels}px`;case"rem":return`0 0 ${o.rem}rem`;case"content":case"stretch":case"auto":return;default:assertNever(o)}},getDirection=n=>n?.direction,calculateMinWidthWithParentConstraint=(n,o,e=32)=>{if(o===void 0||n===void 0||n==="fit-content")return n;const t=convertRemToPx(n);return o<t&&o>e?`${o-e}px`:n},useLayoutStyles=({element:n,subElement:o,styleOverrides:e,minStretchBehavior:t})=>{const c=reactExports.useContext(FlexContext);return reactExports.useMemo(()=>{if(!n)return{width:"auto",height:"auto",overflow:"visible"};const h=getWidth(n,o);let y,g;switch(h.type){case"stretch":y="100%";break;case"rem":y=`${h.rem}rem`;break;case"pixel":y=`${h.pixels}px`;break;case"content":y="fit-content";break;case"auto":y="auto";break;default:assertNever(h)}const $=getDirection(c);c?.isInContentWidthContainer&&h.type==="stretch"&&t!==void 0&&(g=calculateMinWidthWithParentConstraint(t,c?.parentWidth));const E=getHeight(n,o);let A,N="visible";switch(E.type){case"stretch":A="100%";break;case"content":A="auto";break;case"rem":A=`${E.rem}rem`;break;case"pixel":A=`${E.pixels}px`,N="auto";break;case"auto":A="auto";break;default:assertNever(E)}const H=getFlex(h,E,$,t),Z=getTextAlignmentStyle("textAlignmentConfig"in n?n.textAlignmentConfig:void 0);return{...{width:y,height:A,overflow:N,flex:H,minWidth:g,textAlign:Z},...e}},[n,o,e,c,t])};var ScriptRunState=function(n){return n.NOT_RUNNING="notRunning",n.RUNNING="running",n.RERUN_REQUESTED="rerunRequested",n.STOP_REQUESTED="stopRequested",n.COMPILATION_ERROR="compilationError",n}({});const ScriptRunContext=reactExports.createContext({scriptRunState:ScriptRunState.NOT_RUNNING,scriptRunId:"<null>",fragmentIdsThisRun:[]});ScriptRunContext.displayName="ScriptRunContext";var reactPropsRegex$1=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid$1=memoize$1(function(n){return reactPropsRegex$1.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid=memoize$1(function(n){return reactPropsRegex.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function n(o){return o!=="theme"},getDefaultShouldForwardProp=function n(o){return typeof o=="string"&&o.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function n(o,e,t){var c;if(e){var p=e.shouldForwardProp;c=o.__emotion_forwardProp&&p?function(h){return o.__emotion_forwardProp(h)&&p(h)}:p}return typeof c!="function"&&t&&(c=o.__emotion_forwardProp),c},Insertion=function n(o){var e=o.cache,t=o.serialized,c=o.isStringTag;return registerStyles(e,t,c),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(e,t,c)}),null},createStyled=function n(o,e){var t=o.__emotion_real===o,c=t&&o.__emotion_base||o,p,h;e!==void 0&&(p=e.label,h=e.target);var y=composeShouldForwardProps(o,e,t),g=y||getDefaultShouldForwardProp(c),$=!g("as");return function(){var E=arguments,A=t&&o.__emotion_styles!==void 0?o.__emotion_styles.slice(0):[];if(p!==void 0&&A.push("label:"+p+";"),E[0]==null||E[0].raw===void 0)A.push.apply(A,E);else{var N=E[0];A.push(N[0]);for(var H=E.length,Z=1;Z<H;Z++)A.push(E[Z],N[Z])}var X=withEmotionCache(function(be,we,$e){var Ce=$&&be.as||c,Ie="",Ne=[],Fe=be;if(be.theme==null){Fe={};for(var Be in be)Fe[Be]=be[Be];Fe.theme=reactExports.useContext(ThemeContext$2)}typeof be.className=="string"?Ie=getRegisteredStyles(we.registered,Ne,be.className):be.className!=null&&(Ie=be.className+" ");var Ge=serializeStyles(A.concat(Ne),we.registered,Fe);Ie+=we.key+"-"+Ge.name,h!==void 0&&(Ie+=" "+h);var je=$&&y===void 0?getDefaultShouldForwardProp(Ce):g,De={};for(var Ue in be)$&&Ue==="as"||je(Ue)&&(De[Ue]=be[Ue]);return De.className=Ie,$e&&(De.ref=$e),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:we,serialized:Ge,isStringTag:typeof Ce=="string"}),reactExports.createElement(Ce,De))});return X.displayName=p!==void 0?p:"Styled("+(typeof c=="string"?c:c.displayName||c.name||"Component")+")",X.defaultProps=o.defaultProps,X.__emotion_real=X,X.__emotion_base=c,X.__emotion_styles=A,X.__emotion_forwardProp=y,Object.defineProperty(X,"toString",{value:function(){return"."+h}}),X.withComponent=function(be,we){var $e=n(be,_extends$C({},e,we,{shouldForwardProp:composeShouldForwardProps(X,we,!0)}));return $e.apply(void 0,A)},X}},tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],styled=createStyled.bind(null);tags.forEach(function(n){styled[n]=styled(n)});var SIZE$3={medium:"medium"},spin={from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},StyledSpinner=styled$1("i",function(n){var o=n.$theme,e=n.$color,t=e===void 0?o.colors.contentAccent:e,c=n.$borderWidth,p=n.$size,h=p===void 0?SIZE$3.medium:p,y={large:o.sizing.scale300,medium:o.sizing.scale100,small:o.sizing.scale0}[c||h],g={large:o.sizing.scale1000,medium:o.sizing.scale900,small:o.sizing.scale800}[h];return y||(y=o.sizing[c],y||(y="".concat(parseInt(c),"px"))),g||(g=o.sizing[h],g||(g="".concat(parseInt(h),"px"))),{display:"block",animationName:spin,animationDuration:o.animation.timing1000,animationIterationCount:"infinite",animationTimingFunction:"linear",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderRadius:"50%",borderTopColor:t,borderRightColor:o.colors.backgroundTertiary,borderBottomColor:o.colors.backgroundTertiary,borderLeftColor:o.colors.backgroundTertiary,borderLeftWidth:y,borderRightWidth:y,borderTopWidth:y,borderBottomWidth:y,width:g,height:g,cursor:"wait"}});StyledSpinner.displayName="StyledSpinner";StyledSpinner.displayName="StyledSpinner";const StyledSpinnerIcon=styled(StyledSpinner,{shouldForwardProp:n=>isPropValid$1(n)&&!["size"].includes(n),target:"e1ob5mq00"})(({size:n="lg",margin:o="",padding:e="",theme:t})=>{const c=`calc(${t.iconSizes[n]} * 0.80)`;return{width:c,height:c,fontSize:c,justifyContents:"center",margin:computeSpacingStyle(o,t),padding:computeSpacingStyle(e,t),borderColor:t.colors.fadedText10,borderTopColor:t.colors.bodyText,borderWidth:t.sizes.spinnerThickness,flexGrow:0,flexShrink:0}}),StyledIcon=styled("span",{shouldForwardProp:n=>isPropValid$1(n)&&!["size","as"].includes(n),target:"e1ob5mq01"})(({color:n,size:o,margin:e,padding:t,theme:c})=>({color:n||"inherit",fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:c.iconSizes[o],width:c.iconSizes[o],height:c.iconSizes[o],margin:computeSpacingStyle(e,c),padding:computeSpacingStyle(t,c),flexShrink:0})),StyledDynamicIcon=styled("span",{target:"e1ob5mq02"})(({size:n="lg",margin:o="",padding:e="",theme:t})=>({fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:t.iconSizes[n],width:t.iconSizes[n],height:t.iconSizes[n],margin:computeSpacingStyle(o,t),padding:computeSpacingStyle(e,t),flexShrink:0})),StyledImageIcon=styled("img",{target:"e1ob5mq03"})({width:"100%",height:"100%"}),StyledEmojiIcon=styled("span",{target:"e1ob5mq04"})(({size:n,margin:o,padding:e,theme:t,color:c})=>{const p=`calc(${t.iconSizes[n]} * 0.90)`;return{display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:p,width:p,height:p,margin:computeSpacingStyle(o,t),padding:computeSpacingStyle(e,t),color:c}}),getDefaultProps$1=({size:n,margin:o,padding:e,color:t})=>({size:n||"md",margin:o||"",padding:e||"",color:t||void 0}),Icon$2=({content:n,color:o,size:e,margin:t,padding:c,testid:p})=>jsx$1(StyledIcon,{as:n,"aria-hidden":"true","data-testid":p,...getDefaultProps$1({size:e,margin:t,padding:c,color:o})}),EmojiIcon=({size:n,margin:o,padding:e,children:t,color:c,testid:p})=>(typeof t=="string"&&(t=t.replace(/^emoji:/,"")),jsx$1(StyledEmojiIcon,{"data-testid":p||"stIconEmoji","aria-hidden":"true",...getDefaultProps$1({size:n,margin:o,padding:e,color:c}),children:t})),StyledMaterialIcon=styled("span",{target:"ejhh0er0"})(({size:n,margin:o,padding:e,theme:t,color:c})=>({display:"inline-flex",alignItems:"center",justifyContents:"center",color:c,fontSize:t.iconSizes[n],width:t.iconSizes[n],height:t.iconSizes[n],margin:computeSpacingStyle(o,t),padding:computeSpacingStyle(e,t),userSelect:"none",fontFamily:t.genericFonts.iconFont,fontWeight:t.fontWeights.normal,fontStyle:"normal",lineHeight:t.lineHeights.none,letterSpacing:"normal",textTransform:"none",whiteSpace:"nowrap",wordWrap:"normal",direction:"ltr",fontFeatureSettings:"liga",MozFontFeatureSettings:"liga",WebkitFontFeatureSettings:"liga",WebkitFontSmoothing:"antialiased"})),getDefaultProps=({size:n,margin:o,padding:e,color:t})=>({size:n||"md",margin:o||"",padding:e||"",color:t||"inherit"}),MaterialFontIcon=({iconName:n,...o})=>jsx$1(StyledMaterialIcon,{...getDefaultProps(o),"data-testid":o.testid||"stIconMaterial",translate:"no",children:n});function parseIconPackEntry(n){const o=n.match(/^:(.+)\/(.+):$/);if(o===null)return{pack:"emoji",icon:n};const e=o[1],t=o[2];return{pack:e,icon:t}}function isMaterialIcon(n){if(!n)return!1;const o=parseIconPackEntry(n);return o.pack==="material"&&o.icon!==""}function getFilledStarIconSrc(){return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTg2MF84NDMpIj48cGF0aCBkPSJNOS45OTk5NCAxNC4zOTE2TDEzLjQ1ODMgMTYuNDgzM0MxNC4wOTE2IDE2Ljg2NjYgMTQuODY2NiAxNi4zIDE0LjY5OTkgMTUuNTgzM0wxMy43ODMzIDExLjY1TDE2Ljg0MTYgOC45OTk5N0MxNy4zOTk5IDguNTE2NjMgMTcuMDk5OSA3LjU5OTk3IDE2LjM2NjYgNy41NDE2M0wxMi4zNDE2IDcuMTk5OTdMMTAuNzY2NiAzLjQ4MzNDMTAuNDgzMyAyLjgwODMgOS41MTY2MSAyLjgwODMgOS4yMzMyNyAzLjQ4MzNMNy42NTgyNyA3LjE5MTYzTDMuNjMzMjcgNy41MzMzQzIuODk5OTQgNy41OTE2MyAyLjU5OTk0IDguNTA4MyAzLjE1ODI3IDguOTkxNjNMNi4yMTY2MSAxMS42NDE2TDUuMjk5OTQgMTUuNTc1QzUuMTMzMjcgMTYuMjkxNiA1LjkwODI3IDE2Ljg1ODMgNi41NDE2MSAxNi40NzVMOS45OTk5NCAxNC4zOTE2WiIgZmlsbD0iI0ZBQ0EyQiIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwXzE4NjBfODQzIj48cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9IndoaXRlIi8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+"}const DynamicIconDispatcher=({iconValue:n,...o})=>{if(n==="spinner")return jsx$1(StyledDynamicIcon,{...o,children:jsx$1(StyledSpinnerIcon,{"data-testid":o.testid||"stSpinnerIcon",...o})});const{pack:e,icon:t}=parseIconPackEntry(n);switch(e){case"material":switch(t){case"star_filled":return jsx$1(StyledDynamicIcon,{...o,children:jsx$1(StyledImageIcon,{src:getFilledStarIconSrc(),"data-testid":o.testid||"stImageIcon"})});default:return jsx$1(StyledDynamicIcon,{...o,children:jsx$1(MaterialFontIcon,{pack:e,iconName:t,...o})})}case"emoji":default:return jsx$1(StyledDynamicIcon,{...o,children:jsx$1(EmojiIcon,{...o,children:t})})}},DynamicIcon=n=>jsx$1(reactExports.Suspense,{fallback:jsx$1(StyledDynamicIcon,{...n,children:jsx$1(EmojiIcon,{...n,children:" "})}),children:jsx$1(DynamicIconDispatcher,{...n})},n.iconValue),LibConfigContext=reactExports.createContext({locale:window.navigator.language,mapboxToken:void 0,enforceDownloadInNewTab:void 0,resourceCrossOriginMode:void 0});LibConfigContext.displayName="LibConfigContext";var Pe=Object.defineProperty,a$1=(n,o)=>Pe(n,"name",{value:o,configurable:!0}),P=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(n,o,e,t,c,p){this.type=n,this.name=o,this.prefix=e,this.value=t,this.suffix=c,this.modifier=p}hasCustomName(){return this.name!==""&&typeof this.name!="number"}};a$1(P,"Part");var Re=/[$_\p{ID_Start}]/u,Ee=/[$_\u200C\u200D\p{ID_Continue}]/u,v=".*";function Oe(n,o){return(o?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(n)}a$1(Oe,"isASCII");function D(n,o=!1){let e=[],t=0;for(;t<n.length;){let c=n[t],p=a$1(function(h){if(!o)throw new TypeError(h);e.push({type:"INVALID_CHAR",index:t,value:n[t++]})},"ErrorOrInvalid");if(c==="*"){e.push({type:"ASTERISK",index:t,value:n[t++]});continue}if(c==="+"||c==="?"){e.push({type:"OTHER_MODIFIER",index:t,value:n[t++]});continue}if(c==="\\"){e.push({type:"ESCAPED_CHAR",index:t++,value:n[t++]});continue}if(c==="{"){e.push({type:"OPEN",index:t,value:n[t++]});continue}if(c==="}"){e.push({type:"CLOSE",index:t,value:n[t++]});continue}if(c===":"){let h="",y=t+1;for(;y<n.length;){let g=n.substr(y,1);if(y===t+1&&Re.test(g)||y!==t+1&&Ee.test(g)){h+=n[y++];continue}break}if(!h){p(`Missing parameter name at ${t}`);continue}e.push({type:"NAME",index:t,value:h}),t=y;continue}if(c==="("){let h=1,y="",g=t+1,$=!1;if(n[g]==="?"){p(`Pattern cannot start with "?" at ${g}`);continue}for(;g<n.length;){if(!Oe(n[g],!1)){p(`Invalid character '${n[g]}' at ${g}.`),$=!0;break}if(n[g]==="\\"){y+=n[g++]+n[g++];continue}if(n[g]===")"){if(h--,h===0){g++;break}}else if(n[g]==="("&&(h++,n[g+1]!=="?")){p(`Capturing groups are not allowed at ${g}`),$=!0;break}y+=n[g++]}if($)continue;if(h){p(`Unbalanced pattern at ${t}`);continue}if(!y){p(`Missing pattern at ${t}`);continue}e.push({type:"REGEX",index:t,value:y}),t=g;continue}e.push({type:"CHAR",index:t,value:n[t++]})}return e.push({type:"END",index:t,value:""}),e}a$1(D,"lexer");function F(n,o={}){let e=D(n);o.delimiter??="/#?",o.prefixes??="./";let t=`[^${x(o.delimiter)}]+?`,c=[],p=0,h=0,y=new Set,g=a$1($e=>{if(h<e.length&&e[h].type===$e)return e[h++].value},"tryConsume"),$=a$1(()=>g("OTHER_MODIFIER")??g("ASTERISK"),"tryConsumeModifier"),E=a$1($e=>{let Ce=g($e);if(Ce!==void 0)return Ce;let{type:Ie,index:Ne}=e[h];throw new TypeError(`Unexpected ${Ie} at ${Ne}, expected ${$e}`)},"mustConsume"),A=a$1(()=>{let $e="",Ce;for(;Ce=g("CHAR")??g("ESCAPED_CHAR");)$e+=Ce;return $e},"consumeText"),N=a$1($e=>$e,"DefaultEncodePart"),H=o.encodePart||N,Z="",X=a$1($e=>{Z+=$e},"appendToPendingFixedValue"),be=a$1(()=>{Z.length&&(c.push(new P(3,"","",H(Z),"",3)),Z="")},"maybeAddPartFromPendingFixedValue"),we=a$1(($e,Ce,Ie,Ne,Fe)=>{let Be=3;switch(Fe){case"?":Be=1;break;case"*":Be=0;break;case"+":Be=2;break}if(!Ce&&!Ie&&Be===3){X($e);return}if(be(),!Ce&&!Ie){if(!$e)return;c.push(new P(3,"","",H($e),"",Be));return}let Ge;Ie?Ie==="*"?Ge=v:Ge=Ie:Ge=t;let je=2;Ge===t?(je=1,Ge=""):Ge===v&&(je=0,Ge="");let De;if(Ce?De=Ce:Ie&&(De=p++),y.has(De))throw new TypeError(`Duplicate name '${De}'.`);y.add(De),c.push(new P(je,De,H($e),Ge,H(Ne),Be))},"addPart");for(;h<e.length;){let $e=g("CHAR"),Ce=g("NAME"),Ie=g("REGEX");if(!Ce&&!Ie&&(Ie=g("ASTERISK")),Ce||Ie){let Fe=$e??"";o.prefixes.indexOf(Fe)===-1&&(X(Fe),Fe=""),be();let Be=$();we(Fe,Ce,Ie,"",Be);continue}let Ne=$e??g("ESCAPED_CHAR");if(Ne){X(Ne);continue}if(g("OPEN")){let Fe=A(),Be=g("NAME"),Ge=g("REGEX");!Be&&!Ge&&(Ge=g("ASTERISK"));let je=A();E("CLOSE");let De=$();we(Fe,Be,Ge,je,De);continue}be(),E("END")}return c}a$1(F,"parse");function x(n){return n.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}a$1(x,"escapeString");function B(n){return n&&n.ignoreCase?"ui":"u"}a$1(B,"flags");function q(n,o,e){return W(F(n,e),o,e)}a$1(q,"stringToRegexp");function T(n){switch(n){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}a$1(T,"modifierToString");function W(n,o,e={}){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=!1,e.strict??=!1,e.end??=!0,e.start??=!0,e.endsWith="";let t=e.start?"^":"";for(let y of n){if(y.type===3){y.modifier===3?t+=x(y.value):t+=`(?:${x(y.value)})${T(y.modifier)}`;continue}o&&o.push(y.name);let g=`[^${x(e.delimiter)}]+?`,$=y.value;if(y.type===1?$=g:y.type===0&&($=v),!y.prefix.length&&!y.suffix.length){y.modifier===3||y.modifier===1?t+=`(${$})${T(y.modifier)}`:t+=`((?:${$})${T(y.modifier)})`;continue}if(y.modifier===3||y.modifier===1){t+=`(?:${x(y.prefix)}(${$})${x(y.suffix)})`,t+=T(y.modifier);continue}t+=`(?:${x(y.prefix)}`,t+=`((?:${$})(?:`,t+=x(y.suffix),t+=x(y.prefix),t+=`(?:${$}))*)${x(y.suffix)})`,y.modifier===0&&(t+="?")}let c=`[${x(e.endsWith)}]|$`,p=`[${x(e.delimiter)}]`;if(e.end)return e.strict||(t+=`${p}?`),e.endsWith.length?t+=`(?=${c})`:t+="$",new RegExp(t,B(e));e.strict||(t+=`(?:${p}(?=${c}))?`);let h=!1;if(n.length){let y=n[n.length-1];y.type===3&&y.modifier===3&&(h=e.delimiter.indexOf(y)>-1)}return h||(t+=`(?=${p}|${c})`),new RegExp(t,B(e))}a$1(W,"partsToRegexp");var b={delimiter:"",prefixes:"",sensitive:!0,strict:!0},J={delimiter:".",prefixes:"",sensitive:!0,strict:!0},Q={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function ee(n,o){return n.length?n[0]==="/"?!0:!o||n.length<2?!1:(n[0]=="\\"||n[0]=="{")&&n[1]=="/":!1}a$1(ee,"isAbsolutePathname");function te(n,o){return n.startsWith(o)?n.substring(o.length,n.length):n}a$1(te,"maybeStripPrefix");function ke(n,o){return n.endsWith(o)?n.substr(0,n.length-o.length):n}a$1(ke,"maybeStripSuffix");function _(n){return!n||n.length<2?!1:n[0]==="["||(n[0]==="\\"||n[0]==="{")&&n[1]==="["}a$1(_,"treatAsIPv6Hostname");var re$1=["ftp","file","http","https","ws","wss"];function U(n){if(!n)return!0;for(let o of re$1)if(n.test(o))return!0;return!1}a$1(U,"isSpecialScheme");function ne(n,o){if(n=te(n,"#"),o||n==="")return n;let e=new URL("https://example.com");return e.hash=n,e.hash?e.hash.substring(1,e.hash.length):""}a$1(ne,"canonicalizeHash");function se(n,o){if(n=te(n,"?"),o||n==="")return n;let e=new URL("https://example.com");return e.search=n,e.search?e.search.substring(1,e.search.length):""}a$1(se,"canonicalizeSearch");function ie(n,o){return o||n===""?n:_(n)?K(n):j(n)}a$1(ie,"canonicalizeHostname");function ae(n,o){if(o||n==="")return n;let e=new URL("https://example.com");return e.password=n,e.password}a$1(ae,"canonicalizePassword");function oe(n,o){if(o||n==="")return n;let e=new URL("https://example.com");return e.username=n,e.username}a$1(oe,"canonicalizeUsername");function ce(n,o,e){if(e||n==="")return n;if(o&&!re$1.includes(o))return new URL(`${o}:${n}`).pathname;let t=n[0]=="/";return n=new URL(t?n:"/-"+n,"https://example.com").pathname,t||(n=n.substring(2,n.length)),n}a$1(ce,"canonicalizePathname");function le(n,o,e){return z(o)===n&&(n=""),e||n===""?n:G(n)}a$1(le,"canonicalizePort");function fe(n,o){return n=ke(n,":"),o||n===""?n:w(n)}a$1(fe,"canonicalizeProtocol");function z(n){switch(n){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}a$1(z,"defaultPortForProtocol");function w(n){if(n==="")return n;if(/^[-+.A-Za-z0-9]*$/.test(n))return n.toLowerCase();throw new TypeError(`Invalid protocol '${n}'.`)}a$1(w,"protocolEncodeCallback");function he(n){if(n==="")return n;let o=new URL("https://example.com");return o.username=n,o.username}a$1(he,"usernameEncodeCallback");function ue(n){if(n==="")return n;let o=new URL("https://example.com");return o.password=n,o.password}a$1(ue,"passwordEncodeCallback");function j(n){if(n==="")return n;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(n))throw new TypeError(`Invalid hostname '${n}'`);let o=new URL("https://example.com");return o.hostname=n,o.hostname}a$1(j,"hostnameEncodeCallback");function K(n){if(n==="")return n;if(/[^0-9a-fA-F[\]:]/g.test(n))throw new TypeError(`Invalid IPv6 hostname '${n}'`);return n.toLowerCase()}a$1(K,"ipv6HostnameEncodeCallback");function G(n){if(n===""||/^[0-9]*$/.test(n)&&parseInt(n)<=65535)return n;throw new TypeError(`Invalid port '${n}'.`)}a$1(G,"portEncodeCallback");function de(n){if(n==="")return n;let o=new URL("https://example.com");return o.pathname=n[0]!=="/"?"/-"+n:n,n[0]!=="/"?o.pathname.substring(2,o.pathname.length):o.pathname}a$1(de,"standardURLPathnameEncodeCallback");function pe(n){return n===""?n:new URL(`data:${n}`).pathname}a$1(pe,"pathURLPathnameEncodeCallback");function ge(n){if(n==="")return n;let o=new URL("https://example.com");return o.search=n,o.search.substring(1,o.search.length)}a$1(ge,"searchEncodeCallback");function me(n){if(n==="")return n;let o=new URL("https://example.com");return o.hash=n,o.hash.substring(1,o.hash.length)}a$1(me,"hashEncodeCallback");var C=class{#o;#r=[];#t={};#e=0;#i=1;#u=0;#l=0;#p=0;#h=0;#y=!1;constructor(n){this.#o=n}get result(){return this.#t}parse(){for(this.#r=D(this.#o,!0);this.#e<this.#r.length;this.#e+=this.#i){if(this.#i=1,this.#r[this.#e].type==="END"){if(this.#l===0){this.#v(),this.#c()?this.#n(9,1):this.#d()?this.#n(8,1):this.#n(7,0);continue}else if(this.#l===2){this.#f(5);continue}this.#n(10,0);break}if(this.#p>0)if(this.#T())this.#p-=1;else continue;if(this.#x()){this.#p+=1;continue}switch(this.#l){case 0:this.#S()&&this.#f(1);break;case 1:if(this.#S()){this.#E();let n=7,o=1;this.#w()?(n=2,o=3):this.#y&&(n=2),this.#n(n,o)}break;case 2:this.#m()?this.#f(3):(this.#b()||this.#d()||this.#c())&&this.#f(5);break;case 3:this.#_()?this.#n(4,1):this.#m()&&this.#n(5,1);break;case 4:this.#m()&&this.#n(5,1);break;case 5:this.#C()?this.#h+=1:this.#k()&&(this.#h-=1),this.#$()&&!this.#h?this.#n(6,1):this.#b()?this.#n(7,0):this.#d()?this.#n(8,1):this.#c()&&this.#n(9,1);break;case 6:this.#b()?this.#n(7,0):this.#d()?this.#n(8,1):this.#c()&&this.#n(9,1);break;case 7:this.#d()?this.#n(8,1):this.#c()&&this.#n(9,1);break;case 8:this.#c()&&this.#n(9,1);break}}this.#t.hostname!==void 0&&this.#t.port===void 0&&(this.#t.port="")}#n(n,o){switch(this.#l){case 0:break;case 1:this.#t.protocol=this.#s();break;case 2:break;case 3:this.#t.username=this.#s();break;case 4:this.#t.password=this.#s();break;case 5:this.#t.hostname=this.#s();break;case 6:this.#t.port=this.#s();break;case 7:this.#t.pathname=this.#s();break;case 8:this.#t.search=this.#s();break;case 9:this.#t.hash=this.#s();break}this.#l!==0&&n!==10&&([1,2,3,4].includes(this.#l)&&[6,7,8,9].includes(n)&&(this.#t.hostname??=""),[1,2,3,4,5,6].includes(this.#l)&&[8,9].includes(n)&&(this.#t.pathname??=this.#y?"/":""),[1,2,3,4,5,6,7].includes(this.#l)&&n===9&&(this.#t.search??="")),this.#O(n,o)}#O(n,o){this.#l=n,this.#u=this.#e+o,this.#e+=o,this.#i=0}#v(){this.#e=this.#u,this.#i=0}#f(n){this.#v(),this.#l=n}#g(n){return n<0&&(n=this.#r.length-n),n<this.#r.length?this.#r[n]:this.#r[this.#r.length-1]}#a(n,o){let e=this.#g(n);return e.value===o&&(e.type==="CHAR"||e.type==="ESCAPED_CHAR"||e.type==="INVALID_CHAR")}#S(){return this.#a(this.#e,":")}#w(){return this.#a(this.#e+1,"/")&&this.#a(this.#e+2,"/")}#m(){return this.#a(this.#e,"@")}#_(){return this.#a(this.#e,":")}#$(){return this.#a(this.#e,":")}#b(){return this.#a(this.#e,"/")}#d(){if(this.#a(this.#e,"?"))return!0;if(this.#r[this.#e].value!=="?")return!1;let n=this.#g(this.#e-1);return n.type!=="NAME"&&n.type!=="REGEX"&&n.type!=="CLOSE"&&n.type!=="ASTERISK"}#c(){return this.#a(this.#e,"#")}#x(){return this.#r[this.#e].type=="OPEN"}#T(){return this.#r[this.#e].type=="CLOSE"}#C(){return this.#a(this.#e,"[")}#k(){return this.#a(this.#e,"]")}#s(){let n=this.#r[this.#e],o=this.#g(this.#u).index;return this.#o.substring(o,n.index)}#E(){let n={};Object.assign(n,b),n.encodePart=w;let o=q(this.#s(),void 0,n);this.#y=U(o)}};a$1(C,"Parser");var V=["protocol","username","password","hostname","port","pathname","search","hash"],O="*";function Se(n,o){if(typeof n!="string")throw new TypeError("parameter 1 is not of type 'string'.");let e=new URL(n,o);return{protocol:e.protocol.substring(0,e.protocol.length-1),username:e.username,password:e.password,hostname:e.hostname,port:e.port,pathname:e.pathname,search:e.search!==""?e.search.substring(1,e.search.length):void 0,hash:e.hash!==""?e.hash.substring(1,e.hash.length):void 0}}a$1(Se,"extractValues");function R(n,o){return o?I(n):n}a$1(R,"processBaseURLString");function L(n,o,e){let t;if(typeof o.baseURL=="string")try{t=new URL(o.baseURL),o.protocol===void 0&&(n.protocol=R(t.protocol.substring(0,t.protocol.length-1),e)),!e&&o.protocol===void 0&&o.hostname===void 0&&o.port===void 0&&o.username===void 0&&(n.username=R(t.username,e)),!e&&o.protocol===void 0&&o.hostname===void 0&&o.port===void 0&&o.username===void 0&&o.password===void 0&&(n.password=R(t.password,e)),o.protocol===void 0&&o.hostname===void 0&&(n.hostname=R(t.hostname,e)),o.protocol===void 0&&o.hostname===void 0&&o.port===void 0&&(n.port=R(t.port,e)),o.protocol===void 0&&o.hostname===void 0&&o.port===void 0&&o.pathname===void 0&&(n.pathname=R(t.pathname,e)),o.protocol===void 0&&o.hostname===void 0&&o.port===void 0&&o.pathname===void 0&&o.search===void 0&&(n.search=R(t.search.substring(1,t.search.length),e)),o.protocol===void 0&&o.hostname===void 0&&o.port===void 0&&o.pathname===void 0&&o.search===void 0&&o.hash===void 0&&(n.hash=R(t.hash.substring(1,t.hash.length),e))}catch{throw new TypeError(`invalid baseURL '${o.baseURL}'.`)}if(typeof o.protocol=="string"&&(n.protocol=fe(o.protocol,e)),typeof o.username=="string"&&(n.username=oe(o.username,e)),typeof o.password=="string"&&(n.password=ae(o.password,e)),typeof o.hostname=="string"&&(n.hostname=ie(o.hostname,e)),typeof o.port=="string"&&(n.port=le(o.port,n.protocol,e)),typeof o.pathname=="string"){if(n.pathname=o.pathname,t&&!ee(n.pathname,e)){let c=t.pathname.lastIndexOf("/");c>=0&&(n.pathname=R(t.pathname.substring(0,c+1),e)+n.pathname)}n.pathname=ce(n.pathname,n.protocol,e)}return typeof o.search=="string"&&(n.search=se(o.search,e)),typeof o.hash=="string"&&(n.hash=ne(o.hash,e)),n}a$1(L,"applyInit");function I(n){return n.replace(/([+*?:{}()\\])/g,"\\$1")}a$1(I,"escapePatternString");function Te(n){return n.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}a$1(Te,"escapeRegexpString");function Ae(n,o){o.delimiter??="/#?",o.prefixes??="./",o.sensitive??=!1,o.strict??=!1,o.end??=!0,o.start??=!0,o.endsWith="";let e=".*",t=`[^${Te(o.delimiter)}]+?`,c=/[$_\u200C\u200D\p{ID_Continue}]/u,p="";for(let h=0;h<n.length;++h){let y=n[h];if(y.type===3){if(y.modifier===3){p+=I(y.value);continue}p+=`{${I(y.value)}}${T(y.modifier)}`;continue}let g=y.hasCustomName(),$=!!y.suffix.length||!!y.prefix.length&&(y.prefix.length!==1||!o.prefixes.includes(y.prefix)),E=h>0?n[h-1]:null,A=h<n.length-1?n[h+1]:null;if(!$&&g&&y.type===1&&y.modifier===3&&A&&!A.prefix.length&&!A.suffix.length)if(A.type===3){let N=A.value.length>0?A.value[0]:"";$=c.test(N)}else $=!A.hasCustomName();if(!$&&!y.prefix.length&&E&&E.type===3){let N=E.value[E.value.length-1];$=o.prefixes.includes(N)}$&&(p+="{"),p+=I(y.prefix),g&&(p+=`:${y.name}`),y.type===2?p+=`(${y.value})`:y.type===1?g||(p+=`(${t})`):y.type===0&&(!g&&(!E||E.type===3||E.modifier!==3||$||y.prefix!=="")?p+="*":p+=`(${e})`),y.type===1&&g&&y.suffix.length&&c.test(y.suffix[0])&&(p+="\\"),p+=I(y.suffix),$&&(p+="}"),y.modifier!==3&&(p+=T(y.modifier))}return p}a$1(Ae,"partsToPattern");var Y=class{#o;#r={};#t={};#e={};#i={};#u=!1;constructor(n={},o,e){try{let t;if(typeof o=="string"?t=o:e=o,typeof n=="string"){let y=new C(n);if(y.parse(),n=y.result,t===void 0&&typeof n.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");n.baseURL=t}else{if(!n||typeof n!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(t)throw new TypeError("parameter 1 is not of type 'string'.")}typeof e>"u"&&(e={ignoreCase:!1});let c={ignoreCase:e.ignoreCase===!0},p={pathname:O,protocol:O,username:O,password:O,hostname:O,port:O,search:O,hash:O};this.#o=L(p,n,!0),z(this.#o.protocol)===this.#o.port&&(this.#o.port="");let h;for(h of V){if(!(h in this.#o))continue;let y={},g=this.#o[h];switch(this.#t[h]=[],h){case"protocol":Object.assign(y,b),y.encodePart=w;break;case"username":Object.assign(y,b),y.encodePart=he;break;case"password":Object.assign(y,b),y.encodePart=ue;break;case"hostname":Object.assign(y,J),_(g)?y.encodePart=K:y.encodePart=j;break;case"port":Object.assign(y,b),y.encodePart=G;break;case"pathname":U(this.#r.protocol)?(Object.assign(y,Q,c),y.encodePart=de):(Object.assign(y,b,c),y.encodePart=pe);break;case"search":Object.assign(y,b,c),y.encodePart=ge;break;case"hash":Object.assign(y,b,c),y.encodePart=me;break}try{this.#i[h]=F(g,y),this.#r[h]=W(this.#i[h],this.#t[h],y),this.#e[h]=Ae(this.#i[h],y),this.#u=this.#u||this.#i[h].some($=>$.type===2)}catch{throw new TypeError(`invalid ${h} pattern '${this.#o[h]}'.`)}}}catch(t){throw new TypeError(`Failed to construct 'URLPattern': ${t.message}`)}}get[Symbol.toStringTag](){return"URLPattern"}test(n={},o){let e={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof n!="string"&&o)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof n>"u")return!1;try{typeof n=="object"?e=L(e,n,!1):e=L(e,Se(n,o),!1)}catch{return!1}let t;for(t of V)if(!this.#r[t].exec(e[t]))return!1;return!0}exec(n={},o){let e={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof n!="string"&&o)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof n>"u")return;try{typeof n=="object"?e=L(e,n,!1):e=L(e,Se(n,o),!1)}catch{return null}let t={};o?t.inputs=[n,o]:t.inputs=[n];let c;for(c of V){let p=this.#r[c].exec(e[c]);if(!p)return null;let h={};for(let[y,g]of this.#t[c].entries())if(typeof g=="string"||typeof g=="number"){let $=p[y+1];h[g]=$}t[c]={input:e[c]??"",groups:h}}return t}static compareComponent(n,o,e){let t=a$1((y,g)=>{for(let $ of["type","modifier","prefix","value","suffix"]){if(y[$]<g[$])return-1;if(y[$]!==g[$])return 1}return 0},"comparePart"),c=new P(3,"","","","",3),p=new P(0,"","","","",3),h=a$1((y,g)=>{let $=0;for(;$<Math.min(y.length,g.length);++$){let E=t(y[$],g[$]);if(E)return E}return y.length===g.length?0:t(y[$]??c,g[$]??c)},"comparePartList");return!o.#e[n]&&!e.#e[n]?0:o.#e[n]&&!e.#e[n]?h(o.#i[n],[p]):!o.#e[n]&&e.#e[n]?h([p],e.#i[n]):h(o.#i[n],e.#i[n])}get protocol(){return this.#e.protocol}get username(){return this.#e.username}get password(){return this.#e.password}get hostname(){return this.#e.hostname}get port(){return this.#e.port}get pathname(){return this.#e.pathname}get search(){return this.#e.search}get hash(){return this.#e.hash}get hasRegExpGroups(){return this.#u}};a$1(Y,"URLPattern");globalThis.URLPattern||(globalThis.URLPattern=Y);function isValidOrigin(n,o){let e,t,c;try{e=new URLPattern(n),t=new URLPattern({protocol:e.protocol,hostname:e.hostname}),c=new URL(o)}catch{return!1}return c.hostname==="localhost"&&t.test(c)?!0:e.test(c)}function getCrossOriginAttribute(n,o){if(o)try{const e=new URL(o);return window.__streamlit?.BACKEND_BASE_URL&&e.origin===new URL(window.__streamlit?.BACKEND_BASE_URL).origin?n:void 0}catch{return window.__streamlit?.BACKEND_BASE_URL?n:void 0}}const useCrossOriginAttribute=n=>{const{resourceCrossOriginMode:o}=reactExports.useContext(LibConfigContext);if(n)return getCrossOriginAttribute(o,n)},useEmotionTheme=()=>useTheme(),StyledChatMessageContainer=styled("div",{target:"e1ypd8m70"})(({theme:n,background:o})=>{const e=hasLightBackgroundColor(n);return{width:"100%",display:"flex",alignItems:"flex-start",gap:n.spacing.sm,padding:n.spacing.lg,paddingRight:o?n.spacing.lg:0,borderRadius:n.radii.default,...o?{backgroundColor:transparentize(e?n.colors.gray20:n.colors.gray90,.5)}:{}}}),StyledMessageContent=styled("div",{target:"e1ypd8m71"})(({theme:n})=>({color:n.colors.bodyText,margin:"auto",flexGrow:1,minWidth:0})),StyledAvatarBackground=styled("div",{target:"e1ypd8m72"})(({theme:n})=>{const o=hasLightBackgroundColor(n);return{display:"flex",border:`${n.sizes.borderWidth} solid ${o?n.colors.gray40:n.colors.gray85}`,backgroundColor:o?n.colors.white:n.colors.gray100,color:o?n.colors.gray90:n.colors.white,lineHeight:n.lineHeights.none,fontSize:n.fontSizes.md,flexShrink:0,width:n.sizes.chatAvatarSize,height:n.sizes.chatAvatarSize,borderRadius:n.radii.default,alignItems:"center",justifyContent:"center"}}),StyledAvatarIcon=styled("div",{target:"e1ypd8m73"})(({theme:n,background:o})=>{const e=hasLightBackgroundColor(n);return{display:"flex",width:n.sizes.chatAvatarSize,height:n.sizes.chatAvatarSize,flexShrink:0,borderRadius:n.radii.default,alignItems:"center",justifyContent:"center",backgroundColor:o,color:e?n.colors.white:n.colors.gray100}}),StyledAvatarImage=styled("img",{target:"e1ypd8m74"})(({theme:n})=>({width:n.sizes.chatAvatarSize,height:n.sizes.chatAvatarSize,flexShrink:0,borderRadius:n.radii.default,objectFit:"cover",display:"flex"}));function ChatMessageAvatar(n){const{avatar:o,avatarType:e,name:t,endpoints:c}=n,p=useEmotionTheme(),h=useCrossOriginAttribute(o);if(o)switch(e){case Block$1.ChatMessage.AvatarType.IMAGE:return jsx$1(StyledAvatarImage,{src:c.buildMediaURL(o),alt:`${t} avatar`,crossOrigin:h});case Block$1.ChatMessage.AvatarType.EMOJI:return jsx$1(StyledAvatarBackground,{children:o});case Block$1.ChatMessage.AvatarType.ICON:if(o==="user")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarUser",background:p.colors.redColor,children:jsx$1(DynamicIcon,{size:"lg",iconValue:":material/face:"})});if(o==="assistant")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarAssistant",background:p.colors.orangeColor,children:jsx$1(DynamicIcon,{size:"lg",iconValue:":material/smart_toy:"})});if(o.startsWith(":material"))return jsx$1(StyledAvatarBackground,{"data-testid":"stChatMessageAvatarCustom",children:jsx$1(DynamicIcon,{size:"lg",iconValue:o,color:p.colors.bodyText})})}return jsx$1(StyledAvatarBackground,{children:t?t.charAt(0).toUpperCase():"🧑‍💻"})}const ChatMessage=({endpoints:n,element:o,children:e})=>{const{avatar:t,avatarType:c,name:p}=o;return jsxs(StyledChatMessageContainer,{className:"stChatMessage","data-testid":"stChatMessage",background:["user","human"].includes(p.toLowerCase()),children:[jsx$1(ChatMessageAvatar,{name:p,avatar:t,avatarType:c,endpoints:n}),jsx$1(StyledMessageContent,{"data-testid":"stChatMessageContent","aria-label":`Chat message from ${p}`,children:e})]})},ChatMessage$1=reactExports.memo(ChatMessage),IsDialogContext=reactExports.createContext(!1);IsDialogContext.displayName="IsDialogContext";function _objectWithoutPropertiesLoose$q(n,o){if(n==null)return{};var e={};for(var t in n)if({}.hasOwnProperty.call(n,t)){if(o.indexOf(t)!==-1)continue;e[t]=n[t]}return e}var propTypes={exports:{}},ReactPropTypesSecret_1,hasRequiredReactPropTypesSecret;function requireReactPropTypesSecret(){if(hasRequiredReactPropTypesSecret)return ReactPropTypesSecret_1;hasRequiredReactPropTypesSecret=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ReactPropTypesSecret_1=n,ReactPropTypesSecret_1}var factoryWithThrowingShims,hasRequiredFactoryWithThrowingShims;function requireFactoryWithThrowingShims(){if(hasRequiredFactoryWithThrowingShims)return factoryWithThrowingShims;hasRequiredFactoryWithThrowingShims=1;var n=requireReactPropTypesSecret();function o(){}function e(){}return e.resetWarningCache=o,factoryWithThrowingShims=function(){function t(h,y,g,$,E,A){if(A!==n){var N=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw N.name="Invariant Violation",N}}t.isRequired=t;function c(){return t}var p={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:c,element:t,elementType:t,instanceOf:c,node:t,objectOf:c,oneOf:c,oneOfType:c,shape:c,exact:c,checkPropTypes:e,resetWarningCache:o};return p.PropTypes=p,p},factoryWithThrowingShims}var hasRequiredPropTypes;function requirePropTypes(){return hasRequiredPropTypes||(hasRequiredPropTypes=1,propTypes.exports=requireFactoryWithThrowingShims()()),propTypes.exports}var propTypesExports=requirePropTypes();const PropTypes=getDefaultExportFromCjs(propTypesExports);var FOCUS_GROUP="data-focus-lock",FOCUS_DISABLED="data-focus-lock-disabled",FOCUS_ALLOW="data-no-focus-lock",FOCUS_AUTO="data-autofocus-inside",FOCUS_NO_AUTOFOCUS="data-no-autofocus";function assignRef(n,o){return typeof n=="function"?n(o):n&&(n.current=o),n}function useCallbackRef(n,o){var e=reactExports.useState(function(){return{value:n,callback:o,facade:{get current(){return e.value},set current(t){var c=e.value;c!==t&&(e.value=t,e.callback(t,c))}}}})[0];return e.callback=o,e.facade}var useIsomorphicLayoutEffect=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,currentValues=new WeakMap;function useMergeRefs(n,o){var e=useCallbackRef(null,function(t){return n.forEach(function(c){return assignRef(c,t)})});return useIsomorphicLayoutEffect(function(){var t=currentValues.get(e);if(t){var c=new Set(t),p=new Set(n),h=e.current;c.forEach(function(y){p.has(y)||assignRef(y,null)}),p.forEach(function(y){c.has(y)||assignRef(y,h)})}currentValues.set(e,n)},[n]),e}var hiddenGuard={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function ItoI(n){return n}function innerCreateMedium(n,o){o===void 0&&(o=ItoI);var e=[],t=!1,c={read:function(){if(t)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return e.length?e[e.length-1]:n},useMedium:function(p){var h=o(p,t);return e.push(h),function(){e=e.filter(function(y){return y!==h})}},assignSyncMedium:function(p){for(t=!0;e.length;){var h=e;e=[],h.forEach(p)}e={push:function(y){return p(y)},filter:function(){return e}}},assignMedium:function(p){t=!0;var h=[];if(e.length){var y=e;e=[],y.forEach(p),h=e}var g=function(){var E=h;h=[],E.forEach(p)},$=function(){return Promise.resolve().then(g)};$(),e={push:function(E){h.push(E),$()},filter:function(E){return h=h.filter(E),e}}}};return c}function createMedium(n,o){return o===void 0&&(o=ItoI),innerCreateMedium(n,o)}function createSidecarMedium(n){n===void 0&&(n={});var o=innerCreateMedium(null);return o.options=__assign$2({async:!0,ssr:!1},n),o}var mediumFocus=createMedium({},function(n){var o=n.target,e=n.currentTarget;return{target:o,currentTarget:e}}),mediumBlur=createMedium(),mediumEffect=createMedium(),mediumSidecar=createSidecarMedium({async:!0,ssr:typeof document<"u"}),focusScope=reactExports.createContext(void 0),emptyArray=[],FocusLock=reactExports.forwardRef(function n(o,e){var t,c=reactExports.useState(),p=c[0],h=c[1],y=reactExports.useRef(),g=reactExports.useRef(!1),$=reactExports.useRef(null),E=reactExports.useState({}),A=E[1],N=o.children,H=o.disabled,Z=H===void 0?!1:H,X=o.noFocusGuards,be=X===void 0?!1:X,we=o.persistentFocus,$e=we===void 0?!1:we,Ce=o.crossFrame,Ie=Ce===void 0?!0:Ce,Ne=o.autoFocus,Fe=Ne===void 0?!0:Ne;o.allowTextSelection;var Be=o.group,Ge=o.className,je=o.whiteList,De=o.hasPositiveIndices,Ue=o.shards,Je=Ue===void 0?emptyArray:Ue,Xe=o.as,Ke=Xe===void 0?"div":Xe,ze=o.lockProps,nt=ze===void 0?{}:ze,ct=o.sideCar,at=o.returnFocus,dt=at===void 0?!1:at,Me=o.focusOptions,We=o.onActivation,tt=o.onDeactivation,Ve=reactExports.useState({}),vt=Ve[0],xt=reactExports.useCallback(function(qt){var zt=qt.captureFocusRestore;if(!$.current){var Jt,jt=(Jt=document)==null?void 0:Jt.activeElement;$.current=jt,jt!==document.body&&($.current=zt(jt))}y.current&&We&&We(y.current),g.current=!0,A()},[We]),Qe=reactExports.useCallback(function(){g.current=!1,tt&&tt(y.current),A()},[tt]),St=reactExports.useCallback(function(qt){var zt=$.current;if(zt){var Jt=(typeof zt=="function"?zt():zt)||document.body,jt=typeof dt=="function"?dt(Jt):dt;if(jt){var Yt=typeof jt=="object"?jt:void 0;$.current=null,qt?Promise.resolve().then(function(){return Jt.focus(Yt)}):Jt.focus(Yt)}}},[dt]),pt=reactExports.useCallback(function(qt){g.current&&mediumFocus.useMedium(qt)},[]),wt=mediumBlur.useMedium,Ft=reactExports.useCallback(function(qt){y.current!==qt&&(y.current=qt,h(qt))},[]),Ht=_extends$C((t={},t[FOCUS_DISABLED]=Z&&"disabled",t[FOCUS_GROUP]=Be,t),nt),on=be!==!0,en=on&&be!=="tail",Wt=useMergeRefs([e,Ft]),an=reactExports.useMemo(function(){return{observed:y,shards:Je,enabled:!Z,active:g.current}},[Z,g.current,Je,p]);return reactExports.createElement(reactExports.Fragment,null,on&&[reactExports.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:Z?-1:0,style:hiddenGuard}),De?reactExports.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:Z?-1:1,style:hiddenGuard}):null],!Z&&reactExports.createElement(ct,{id:vt,sideCar:mediumSidecar,observed:p,disabled:Z,persistentFocus:$e,crossFrame:Ie,autoFocus:Fe,whiteList:je,shards:Je,onActivation:xt,onDeactivation:Qe,returnFocus:St,focusOptions:Me,noFocusGuards:be}),reactExports.createElement(Ke,_extends$C({ref:Wt},Ht,{className:Ge,onBlur:wt,onFocus:pt}),reactExports.createElement(focusScope.Provider,{value:an},N)),en&&reactExports.createElement("div",{"data-focus-guard":!0,tabIndex:Z?-1:0,style:hiddenGuard}))});FocusLock.propTypes={};function _setPrototypeOf$e(n,o){return _setPrototypeOf$e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf$e(n,o)}function _inheritsLoose(n,o){n.prototype=Object.create(o.prototype),n.prototype.constructor=n,_setPrototypeOf$e(n,o)}function _typeof$g(n){"@babel/helpers - typeof";return _typeof$g=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$g(n)}function toPrimitive$2(n,o){if(_typeof$g(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,o);if(_typeof$g(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}function toPropertyKey$2(n){var o=toPrimitive$2(n,"string");return _typeof$g(o)=="symbol"?o:o+""}function _defineProperty$u(n,o,e){return(o=toPropertyKey$2(o))in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}function withSideEffect(n,o){function e(t){return t.displayName||t.name||"Component"}return function(c){var p=[],h;function y(){h=n(p.map(function($){return $.props})),o(h)}var g=function($){_inheritsLoose(E,$);function E(){return $.apply(this,arguments)||this}E.peek=function(){return h};var A=E.prototype;return A.componentDidMount=function(){p.push(this),y()},A.componentDidUpdate=function(){y()},A.componentWillUnmount=function(){var H=p.indexOf(this);p.splice(H,1),y()},A.render=function(){return React.createElement(c,this.props)},E}(reactExports.PureComponent);return _defineProperty$u(g,"displayName","SideEffect("+e(c)+")"),g}}var toArray$1=function(n){for(var o=Array(n.length),e=0;e<n.length;++e)o[e]=n[e];return o},asArray=function(n){return Array.isArray(n)?n:[n]},getFirst=function(n){return Array.isArray(n)?n[0]:n},isElementHidden=function(n){if(n.nodeType!==Node.ELEMENT_NODE)return!1;var o=window.getComputedStyle(n,null);return!o||!o.getPropertyValue?!1:o.getPropertyValue("display")==="none"||o.getPropertyValue("visibility")==="hidden"},getParentNode=function(n){return n.parentNode&&n.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n.parentNode.host:n.parentNode},isTopNode=function(n){return n===document||n&&n.nodeType===Node.DOCUMENT_NODE},isInert=function(n){return n.hasAttribute("inert")},isVisibleUncached=function(n,o){return!n||isTopNode(n)||!isElementHidden(n)&&!isInert(n)&&o(getParentNode(n))},isVisibleCached=function(n,o){var e=n.get(o);if(e!==void 0)return e;var t=isVisibleUncached(o,isVisibleCached.bind(void 0,n));return n.set(o,t),t},isAutoFocusAllowedUncached=function(n,o){return n&&!isTopNode(n)?isAutoFocusAllowed(n)?o(getParentNode(n)):!1:!0},isAutoFocusAllowedCached=function(n,o){var e=n.get(o);if(e!==void 0)return e;var t=isAutoFocusAllowedUncached(o,isAutoFocusAllowedCached.bind(void 0,n));return n.set(o,t),t},getDataset=function(n){return n.dataset},isHTMLButtonElement=function(n){return n.tagName==="BUTTON"},isHTMLInputElement=function(n){return n.tagName==="INPUT"},isRadioElement=function(n){return isHTMLInputElement(n)&&n.type==="radio"},notHiddenInput=function(n){return!((isHTMLInputElement(n)||isHTMLButtonElement(n))&&(n.type==="hidden"||n.disabled))},isAutoFocusAllowed=function(n){var o=n.getAttribute(FOCUS_NO_AUTOFOCUS);return![!0,"true",""].includes(o)},isGuard=function(n){var o;return!!(n&&(!((o=getDataset(n))===null||o===void 0)&&o.focusGuard))},isNotAGuard=function(n){return!isGuard(n)},isDefined=function(n){return!!n},tabSort=function(n,o){var e=Math.max(0,n.tabIndex),t=Math.max(0,o.tabIndex),c=e-t,p=n.index-o.index;if(c){if(!e)return 1;if(!t)return-1}return c||p},getTabIndex=function(n){return n.tabIndex<0&&!n.hasAttribute("tabindex")?0:n.tabIndex},orderByTabIndex=function(n,o,e){return toArray$1(n).map(function(t,c){var p=getTabIndex(t);return{node:t,index:c,tabIndex:e&&p===-1?(t.dataset||{}).focusGuard?0:-1:p}}).filter(function(t){return!o||t.tabIndex>=0}).sort(tabSort)},tabbables=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],queryTabbables=tabbables.join(","),queryGuardTabbables="".concat(queryTabbables,", [data-focus-guard]"),getFocusablesWithShadowDom=function(n,o){return toArray$1((n.shadowRoot||n).children).reduce(function(e,t){return e.concat(t.matches(o?queryGuardTabbables:queryTabbables)?[t]:[],getFocusablesWithShadowDom(t))},[])},getFocusablesWithIFrame=function(n,o){var e;return n instanceof HTMLIFrameElement&&(!((e=n.contentDocument)===null||e===void 0)&&e.body)?getFocusables([n.contentDocument.body],o):[n]},getFocusables=function(n,o){return n.reduce(function(e,t){var c,p=getFocusablesWithShadowDom(t,o),h=(c=[]).concat.apply(c,p.map(function(y){return getFocusablesWithIFrame(y,o)}));return e.concat(h,t.parentNode?toArray$1(t.parentNode.querySelectorAll(queryTabbables)).filter(function(y){return y===t}):[])},[])},getParentAutofocusables=function(n){var o=n.querySelectorAll("[".concat(FOCUS_AUTO,"]"));return toArray$1(o).map(function(e){return getFocusables([e])}).reduce(function(e,t){return e.concat(t)},[])},filterFocusable=function(n,o){return toArray$1(n).filter(function(e){return isVisibleCached(o,e)}).filter(function(e){return notHiddenInput(e)})},filterAutoFocusable=function(n,o){return o===void 0&&(o=new Map),toArray$1(n).filter(function(e){return isAutoFocusAllowedCached(o,e)})},getTabbableNodes=function(n,o,e){return orderByTabIndex(filterFocusable(getFocusables(n,e),o),!0,e)},getFocusableNodes=function(n,o){return orderByTabIndex(filterFocusable(getFocusables(n),o),!1)},parentAutofocusables=function(n,o){return filterFocusable(getParentAutofocusables(n),o)},contains=function(n,o){return n.shadowRoot?contains(n.shadowRoot,o):Object.getPrototypeOf(n).contains!==void 0&&Object.getPrototypeOf(n).contains.call(n,o)?!0:toArray$1(n.children).some(function(e){var t;if(e instanceof HTMLIFrameElement){var c=(t=e.contentDocument)===null||t===void 0?void 0:t.body;return c?contains(c,o):!1}return contains(e,o)})},filterNested=function(n){for(var o=new Set,e=n.length,t=0;t<e;t+=1)for(var c=t+1;c<e;c+=1){var p=n[t].compareDocumentPosition(n[c]);(p&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&o.add(c),(p&Node.DOCUMENT_POSITION_CONTAINS)>0&&o.add(t)}return n.filter(function(h,y){return!o.has(y)})},getTopParent=function(n){return n.parentNode?getTopParent(n.parentNode):n},getAllAffectedNodes=function(n){var o=asArray(n);return o.filter(Boolean).reduce(function(e,t){var c=t.getAttribute(FOCUS_GROUP);return e.push.apply(e,c?filterNested(toArray$1(getTopParent(t).querySelectorAll("[".concat(FOCUS_GROUP,'="').concat(c,'"]:not([').concat(FOCUS_DISABLED,'="disabled"])')))):[t]),e},[])},safeProbe=function(n){try{return n()}catch{return}},getActiveElement=function(n){if(n===void 0&&(n=document),!(!n||!n.activeElement)){var o=n.activeElement;return o.shadowRoot?getActiveElement(o.shadowRoot):o instanceof HTMLIFrameElement&&safeProbe(function(){return o.contentWindow.document})?getActiveElement(o.contentWindow.document):o}},focusInFrame=function(n,o){return n===o},focusInsideIframe=function(n,o){return!!toArray$1(n.querySelectorAll("iframe")).some(function(e){return focusInFrame(e,o)})},focusInside=function(n,o){return o===void 0&&(o=getActiveElement(getFirst(n).ownerDocument)),!o||o.dataset&&o.dataset.focusGuard?!1:getAllAffectedNodes(n).some(function(e){return contains(e,o)||focusInsideIframe(e,o)})},focusIsHidden=function(n){n===void 0&&(n=document);var o=getActiveElement(n);return o?toArray$1(n.querySelectorAll("[".concat(FOCUS_ALLOW,"]"))).some(function(e){return contains(e,o)}):!1},findSelectedRadio=function(n,o){return o.filter(isRadioElement).filter(function(e){return e.name===n.name}).filter(function(e){return e.checked})[0]||n},correctNode=function(n,o){return isRadioElement(n)&&n.name?findSelectedRadio(n,o):n},correctNodes=function(n){var o=new Set;return n.forEach(function(e){return o.add(correctNode(e,n))}),n.filter(function(e){return o.has(e)})},pickFirstFocus=function(n){return n[0]&&n.length>1?correctNode(n[0],n):n[0]},pickFocusable=function(n,o){return n.indexOf(correctNode(o,n))},NEW_FOCUS="NEW_FOCUS",newFocus=function(n,o,e,t,c){var p=n.length,h=n[0],y=n[p-1],g=isGuard(t);if(!(t&&n.indexOf(t)>=0)){var $=t!==void 0?e.indexOf(t):-1,E=c?e.indexOf(c):$,A=c?n.indexOf(c):-1;if($===-1)return A!==-1?A:NEW_FOCUS;if(A===-1)return NEW_FOCUS;var N=$-E,H=e.indexOf(h),Z=e.indexOf(y),X=correctNodes(e),be=t!==void 0?X.indexOf(t):-1,we=be-(c?X.indexOf(c):$);if(!N&&A>=0||o.length===0)return A;var $e=pickFocusable(n,o[0]),Ce=pickFocusable(n,o[o.length-1]);if($<=H&&g&&Math.abs(N)>1)return Ce;if($>=Z&&g&&Math.abs(N)>1)return $e;if(N&&Math.abs(we)>1)return A;if($<=H)return Ce;if($>Z)return $e;if(N)return Math.abs(N)>1?A:(p+A+N)%p}},findAutoFocused=function(n){return function(o){var e,t=(e=getDataset(o))===null||e===void 0?void 0:e.autofocus;return o.autofocus||t!==void 0&&t!=="false"||n.indexOf(o)>=0}},pickAutofocus=function(n,o,e){var t=n.map(function(p){var h=p.node;return h}),c=filterAutoFocusable(t.filter(findAutoFocused(e)));return c&&c.length?pickFirstFocus(c):pickFirstFocus(filterAutoFocusable(o))},getParents=function(n,o){return o===void 0&&(o=[]),o.push(n),n.parentNode&&getParents(n.parentNode.host||n.parentNode,o),o},getCommonParent=function(n,o){for(var e=getParents(n),t=getParents(o),c=0;c<e.length;c+=1){var p=e[c];if(t.indexOf(p)>=0)return p}return!1},getTopCommonParent=function(n,o,e){var t=asArray(n),c=asArray(o),p=t[0],h=!1;return c.filter(Boolean).forEach(function(y){h=getCommonParent(h||y,y)||h,e.filter(Boolean).forEach(function(g){var $=getCommonParent(p,g);$&&(!h||contains($,h)?h=$:h=getCommonParent($,h))})}),h},allParentAutofocusables=function(n,o){return n.reduce(function(e,t){return e.concat(parentAutofocusables(t,o))},[])},reorderNodes=function(n,o){var e=new Map;return o.forEach(function(t){return e.set(t.node,t)}),n.map(function(t){return e.get(t)}).filter(isDefined)},focusSolver=function(n,o){var e=getActiveElement(asArray(n).length>0?document:getFirst(n).ownerDocument),t=getAllAffectedNodes(n).filter(isNotAGuard),c=getTopCommonParent(e||n,n,t),p=new Map,h=getFocusableNodes(t,p),y=h.filter(function(Z){var X=Z.node;return isNotAGuard(X)});if(y[0]){var g=getFocusableNodes([c],p).map(function(Z){var X=Z.node;return X}),$=reorderNodes(g,y),E=$.map(function(Z){var X=Z.node;return X}),A=$.filter(function(Z){var X=Z.tabIndex;return X>=0}).map(function(Z){var X=Z.node;return X}),N=newFocus(E,A,g,e,o);if(N===NEW_FOCUS){var H=pickAutofocus(h,A,allParentAutofocusables(t,p))||pickAutofocus(h,E,allParentAutofocusables(t,p));if(H)return{node:H};console.warn("focus-lock: cannot find any node to move focus into");return}return N===void 0?N:$[N]}},expandFocusableNodes=function(n){var o=getAllAffectedNodes(n).filter(isNotAGuard),e=getTopCommonParent(n,n,o),t=orderByTabIndex(getFocusables([e],!0),!0,!0),c=getFocusables(o,!1);return t.map(function(p){var h=p.node,y=p.index;return{node:h,index:y,lockItem:c.indexOf(h)>=0,guard:isGuard(h)}})},focusOn=function(n,o){n&&("focus"in n&&n.focus(o),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus())},guardCount=0,lockDisabled=!1,moveFocusInside=function(n,o,e){e===void 0&&(e={});var t=focusSolver(n,o);if(!lockDisabled&&t){if(guardCount>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),lockDisabled=!0,setTimeout(function(){lockDisabled=!1},1);return}guardCount++,focusOn(t.node,e.focusOptions),guardCount--}};function weakRef(n){if(!n)return null;if(typeof WeakRef>"u")return function(){return n||null};var o=n?new WeakRef(n):null;return function(){return o?.deref()||null}}var recordElementLocation=function(n){if(!n)return null;for(var o=[],e=n;e&&e!==document.body;)o.push({current:weakRef(e),parent:weakRef(e.parentElement),left:weakRef(e.previousElementSibling),right:weakRef(e.nextElementSibling)}),e=e.parentElement;return{element:weakRef(n),stack:o,ownerDocument:n.ownerDocument}},restoreFocusTo=function(n){var o,e,t,c,p;if(n)for(var h=n.stack,y=n.ownerDocument,g=new Map,$=0,E=h;$<E.length;$++){var A=E[$],N=(o=A.parent)===null||o===void 0?void 0:o.call(A);if(N&&y.contains(N)){for(var H=(e=A.left)===null||e===void 0?void 0:e.call(A),Z=A.current(),X=N.contains(Z)?Z:void 0,be=(t=A.right)===null||t===void 0?void 0:t.call(A),we=getTabbableNodes([N],g),$e=(p=(c=X??H?.nextElementSibling)!==null&&c!==void 0?c:be)!==null&&p!==void 0?p:H;$e;){for(var Ce=0,Ie=we;Ce<Ie.length;Ce++){var Ne=Ie[Ce];if($e?.contains(Ne.node))return Ne.node}$e=$e.nextElementSibling}if(we.length)return we[0].node}}},captureFocusRestore=function(n){var o=recordElementLocation(n);return function(){return restoreFocusTo(o)}},getRelativeFocusable=function(n,o,e){if(!n||!o)return console.error("no element or scope given"),{};var t=asArray(o);if(t.every(function(h){return!contains(h,n)}))return console.error("Active element is not contained in the scope"),{};var c=e?getTabbableNodes(t,new Map):getFocusableNodes(t,new Map),p=c.findIndex(function(h){var y=h.node;return y===n});if(p!==-1)return{prev:c[p-1],next:c[p+1],first:c[0],last:c[c.length-1]}},getBoundary=function(n,o){var e=o?getTabbableNodes(asArray(n),new Map):getFocusableNodes(asArray(n),new Map);return{first:e[0],last:e[e.length-1]}},defaultOptions=function(n){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},n)},moveFocus=function(n,o,e){o===void 0&&(o={});var t=defaultOptions(o),c=getRelativeFocusable(n,t.scope,t.onlyTabbable);if(c){var p=e(c,t.cycle);p&&focusOn(p.node,t.focusOptions)}},focusNextElement=function(n,o){o===void 0&&(o={}),moveFocus(n,o,function(e,t){var c=e.next,p=e.first;return c||t&&p})},focusPrevElement=function(n,o){o===void 0&&(o={}),moveFocus(n,o,function(e,t){var c=e.prev,p=e.last;return c||t&&p})},pickBoundary=function(n,o,e){var t,c=getBoundary(n,(t=o.onlyTabbable)!==null&&t!==void 0?t:!0),p=c[e];p&&focusOn(p.node,o.focusOptions)},focusFirstElement=function(n,o){o===void 0&&(o={}),pickBoundary(n,o,"first")},focusLastElement=function(n,o){o===void 0&&(o={}),pickBoundary(n,o,"last")};function deferAction(n){setTimeout(n,1)}var inlineProp=function n(o,e){var t={};return t[o]=e,t},extractRef=function n(o){return o&&"current"in o?o.current:o},focusOnBody=function n(){return document&&document.activeElement===document.body},isFreeFocus=function n(){return focusOnBody()||focusIsHidden()},lastActiveTrap=null,lastActiveFocus=null,tryRestoreFocus=function n(){return null},lastPortaledElement=null,focusWasOutsideWindow=!1,windowFocused=!1,defaultWhitelist=function n(){return!0},focusWhitelisted=function n(o){return(lastActiveTrap.whiteList||defaultWhitelist)(o)},recordPortal=function n(o,e){lastPortaledElement={observerNode:o,portaledElement:e}},focusIsPortaledPair=function n(o){return lastPortaledElement&&lastPortaledElement.portaledElement===o};function autoGuard(n,o,e,t){var c=null,p=n;do{var h=t[p];if(h.guard)h.node.dataset.focusAutoGuard&&(c=h);else if(h.lockItem){if(p!==n)return;c=null}else break}while((p+=e)!==o);c&&(c.node.tabIndex=0)}var focusWasOutside=function n(o){return o?!!focusWasOutsideWindow:focusWasOutsideWindow==="meanwhile"},checkInHost=function n(o,e,t){return e&&(e.host===o&&(!e.activeElement||t.contains(e.activeElement))||e.parentNode&&n(o,e.parentNode,t))},withinHost=function n(o,e){return e.some(function(t){return checkInHost(o,t,t)})},getNodeFocusables=function n(o){return getFocusableNodes(o,new Map)},isNotFocusable=function n(o){return!getNodeFocusables([o.parentNode]).some(function(e){return e.node===o})},activateTrap=function n(){var o=!1;if(lastActiveTrap){var e=lastActiveTrap,t=e.observed,c=e.persistentFocus,p=e.autoFocus,h=e.shards,y=e.crossFrame,g=e.focusOptions,$=e.noFocusGuards,E=t||lastPortaledElement&&lastPortaledElement.portaledElement;if(focusOnBody()&&lastActiveFocus&&(!document.body.contains(lastActiveFocus)||isNotFocusable(lastActiveFocus))){lastActiveFocus=null;var A=tryRestoreFocus();A&&A.focus()}var N=document&&document.activeElement;if(E){var H=[E].concat(h.map(extractRef).filter(Boolean)),Z=function(){if(!focusWasOutside(y)||!$||!lastActiveFocus||windowFocused)return!1;var Ce=getNodeFocusables(H),Ie=Ce.findIndex(function(Ne){var Fe=Ne.node;return Fe===lastActiveFocus});return Ie===0||Ie===Ce.length-1};if((!N||focusWhitelisted(N))&&(c||Z()||!isFreeFocus()||!lastActiveFocus&&p)&&(E&&!(focusInside(H)||N&&withinHost(N,H)||focusIsPortaledPair(N))&&(document&&!lastActiveFocus&&N&&!p?(N.blur&&N.blur(),document.body.focus()):(o=moveFocusInside(H,lastActiveFocus,{focusOptions:g}),lastPortaledElement={})),focusWasOutsideWindow=!1,lastActiveFocus=document&&document.activeElement,tryRestoreFocus=captureFocusRestore(lastActiveFocus)),document&&N!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var X=document&&document.activeElement,be=expandFocusableNodes(H),we=be.map(function($e){var Ce=$e.node;return Ce}).indexOf(X);we>-1&&(be.filter(function($e){var Ce=$e.guard,Ie=$e.node;return Ce&&Ie.dataset.focusAutoGuard}).forEach(function($e){var Ce=$e.node;return Ce.removeAttribute("tabIndex")}),autoGuard(we,be.length,1,be),autoGuard(we,-1,-1,be))}}}return o},onTrap=function n(o){activateTrap()&&o&&(o.stopPropagation(),o.preventDefault())},onBlur=function n(){return deferAction(activateTrap)},onFocus=function n(o){var e=o.target,t=o.currentTarget;t.contains(e)||recordPortal(t,e)},FocusWatcher=function n(){return null},onWindowFocus=function n(){windowFocused=!0},onWindowBlur=function n(){windowFocused=!1,focusWasOutsideWindow="just",deferAction(function(){focusWasOutsideWindow="meanwhile"})},attachHandler=function n(){document.addEventListener("focusin",onTrap),document.addEventListener("focusout",onBlur),window.addEventListener("focus",onWindowFocus),window.addEventListener("blur",onWindowBlur)},detachHandler=function n(){document.removeEventListener("focusin",onTrap),document.removeEventListener("focusout",onBlur),window.removeEventListener("focus",onWindowFocus),window.removeEventListener("blur",onWindowBlur)};function reducePropsToState(n){return n.filter(function(o){var e=o.disabled;return!e})}var focusLockAPI={moveFocusInside,focusInside,focusNextElement,focusPrevElement,focusFirstElement,focusLastElement,captureFocusRestore};function handleStateChangeOnClient(n){var o=n.slice(-1)[0];o&&!lastActiveTrap&&attachHandler();var e=lastActiveTrap,t=e&&o&&o.id===e.id;lastActiveTrap=o,e&&!t&&(e.onDeactivation(),n.filter(function(c){var p=c.id;return p===e.id}).length||e.returnFocus(!o)),o?(lastActiveFocus=null,(!t||e.observed!==o.observed)&&o.onActivation(focusLockAPI),activateTrap(),deferAction(activateTrap)):(detachHandler(),lastActiveFocus=null)}mediumFocus.assignSyncMedium(onFocus);mediumBlur.assignMedium(onBlur);mediumEffect.assignMedium(function(n){return n(focusLockAPI)});const FocusTrap=withSideEffect(reducePropsToState,handleStateChangeOnClient)(FocusWatcher);var FocusLockCombination=reactExports.forwardRef(function n(o,e){return reactExports.createElement(FocusLock,_extends$C({sideCar:FocusTrap,ref:e},o))}),_ref=FocusLock.propTypes||{};_ref.sideCar;_objectWithoutPropertiesLoose$q(_ref,["sideCar"]);FocusLockCombination.propTypes={};var useFocusInside=function n(o){reactExports.useEffect(function(){var e=!0;return mediumEffect.useMedium(function(t){var c=o&&o.current;e&&c&&(t.focusInside(c)||t.moveFocusInside(c,null))}),function(){e=!1}},[o])};function MoveFocusInside(n){var o=n.disabled,e=o===void 0?!1:o,t=n.className,c=n.children,p=reactExports.useRef(null);return useFocusInside(e?void 0:p),reactExports.createElement("div",_extends$C({},inlineProp(FOCUS_AUTO,!e),{ref:p,className:t}),c)}MoveFocusInside.propTypes={};var SIZE$2={default:"default",full:"full",auto:"auto"},SIZE_WIDTHS={default:"500px",full:"100%",auto:"auto"},ROLE={dialog:"dialog"},CLOSE_SOURCE={closeButton:"closeButton",backdrop:"backdrop",escape:"escape"};function ownKeys$p(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$n(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$p(Object(e),!0).forEach(function(t){_defineProperty$t(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$p(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$t(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}function getSizeStyles(n){var o={maxWidth:"100%",width:null};return typeof n=="number"?o.width="".concat(n,"px"):SIZE$2[n]?o.width=SIZE_WIDTHS[n]:typeof n=="string"&&(o.width=n),n===SIZE$2.full&&(o.alignSelf="stretch"),o}var Root$3=styled$1("div",function(n){var o=n.$isOpen;return{position:"fixed",overflow:"auto",right:0,bottom:0,top:0,left:0,pointerEvents:o?"auto":"none"}});Root$3.displayName="Root";Root$3.displayName="Root";var DialogContainer=styled$1("div",function(n){var o=n.$animate,e=n.$isOpen,t=n.$isVisible,c=n.$theme,p={transitionProperty:"opacity",transitionDuration:c.animation.timing400,transitionTimingFunction:c.animation.easeOutCurve};return _objectSpread$n({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",minHeight:"100%",userSelect:"none",pointerEvents:"auto",backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",opacity:t&&e?1:0},o?p:null)});DialogContainer.displayName="DialogContainer";DialogContainer.displayName="DialogContainer";var Dialog$2=styled$1("div",function(n){var o=n.$animate,e=n.$isOpen,t=n.$isVisible,c=n.$size,p=n.$theme;return _objectSpread$n(_objectSpread$n(_objectSpread$n({position:"relative",backgroundColor:p.colors.backgroundPrimary,borderTopLeftRadius:p.borders.radius500,borderTopRightRadius:p.borders.radius500,borderBottomRightRadius:p.borders.radius500,borderBottomLeftRadius:p.borders.radius500,marginLeft:p.sizing.scale600,marginTop:p.sizing.scale600,marginRight:p.sizing.scale600,marginBottom:p.sizing.scale600},getSizeStyles(c)),{},{opacity:t&&e?1:0,transform:t?"translateY(0)":"translateY(20px)"},o?{transitionProperty:"opacity, transform",transitionDuration:p.animation.timing400,transitionTimingFunction:p.animation.easeOutCurve}:null),{},{userSelect:"text",pointerEvents:e?"all":"none",":focus":{outline:"none"}})});Dialog$2.displayName="Dialog";Dialog$2.displayName="Dialog";var Close=styled$1("button",function(n){var o,e=n.$theme,t=n.$isFocusVisible,c=e.direction==="rtl"?"left":"right";return o={background:"transparent",outline:0,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,color:e.colors.modalCloseColor,transitionProperty:"color, border-color",transitionDuration:e.animation.timing200,borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftColor:"transparent",borderRightColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",":hover":{color:e.colors.modalCloseColorHover},":focus":{outline:t?"3px solid ".concat(e.colors.accent):"none"},position:"absolute",top:e.sizing.scale500},_defineProperty$t(o,c,e.sizing.scale500),_defineProperty$t(o,"width",e.sizing.scale800),_defineProperty$t(o,"height",e.sizing.scale800),_defineProperty$t(o,"display","flex"),_defineProperty$t(o,"justifyContent","center"),_defineProperty$t(o,"alignItems","center"),_defineProperty$t(o,"cursor","pointer"),o});Close.displayName="Close";Close.displayName="Close";var ModalHeader$1=styled$1("div",function(n){var o,e=n.$theme,t=e.direction==="rtl"?"marginRight":"marginLeft",c=e.direction==="rtl"?"marginLeft":"marginRight";return _objectSpread$n(_objectSpread$n({},e.typography.font550),{},(o={color:e.colors.contentPrimary,marginTop:e.sizing.scale900,marginBottom:e.sizing.scale600},_defineProperty$t(o,t,e.sizing.scale800),_defineProperty$t(o,c,e.sizing.scale900),o))});ModalHeader$1.displayName="ModalHeader";ModalHeader$1.displayName="ModalHeader";var ModalBody$2=styled$1("div",function(n){var o=n.$theme;return _objectSpread$n(_objectSpread$n({},o.typography.font200),{},{color:o.colors.contentSecondary,marginTop:o.sizing.scale600,marginLeft:o.sizing.scale800,marginRight:o.sizing.scale800,marginBottom:o.sizing.scale700})});ModalBody$2.displayName="ModalBody";ModalBody$2.displayName="ModalBody";var ModalFooter$1=styled$1("div",function(n){var o=n.$theme;return _objectSpread$n(_objectSpread$n({},o.typography.font200),{},{marginTop:o.sizing.scale700,marginLeft:o.sizing.scale800,marginRight:o.sizing.scale800,paddingTop:o.sizing.scale500,paddingBottom:o.sizing.scale500,textAlign:o.direction==="rtl"?"left":"right"})});ModalFooter$1.displayName="ModalFooter";ModalFooter$1.displayName="ModalFooter";function CloseIcon(){return reactExports.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",style:{stroke:"currentColor"},xmlns:"http://www.w3.org/2000/svg"},reactExports.createElement("path",{d:"M9 1L5 5M1 9L5 5M5 5L1 1M5 5L9 9",strokeWidth:"2",strokeLinecap:"round"}))}function _typeof$f(n){"@babel/helpers - typeof";return _typeof$f=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$f(n)}function _extends$v(){return _extends$v=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$v.apply(this,arguments)}function _slicedToArray$k(n,o){return _arrayWithHoles$k(n)||_iterableToArrayLimit$k(n,o)||_unsupportedIterableToArray$k(n,o)||_nonIterableRest$k()}function _nonIterableRest$k(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
46
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$l(n,o){if(n){if(typeof n=="string")return _arrayLikeToArray$l(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$l(n,o)}}function _iterableToArray$3(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function _arrayWithoutHoles$3(n){if(Array.isArray(n))return _arrayLikeToArray$l(n)}function _arrayLikeToArray$l(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 _classCallCheck$g(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$g(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$g(n,o,e){return o&&_defineProperties$g(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$g(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$h(n,o)}function _setPrototypeOf$h(n,o){return _setPrototypeOf$h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$h(n,o)}function _createSuper$g(n){var o=_isNativeReflectConstruct$g();return function(){var t=_getPrototypeOf$g(n),c;if(o){var p=_getPrototypeOf$g(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$g(this,c)}}function _possibleConstructorReturn$g(n,o){if(o&&(_typeof$j(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$h(n)}function _assertThisInitialized$h(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$g(){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$g(n){return _getPrototypeOf$g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$g(n)}function _defineProperty$x(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var StyledAppContainer=styled$1("div",{});StyledAppContainer.displayName="StyledAppContainer";var StyledLayersContainer=styled$1("div",{});StyledLayersContainer.displayName="StyledLayersContainer";function defaultEventHandlerFn(){}var LayersContext=reactExports.createContext({addEscapeHandler:defaultEventHandlerFn,removeEscapeHandler:defaultEventHandlerFn,addKeyDownHandler:defaultEventHandlerFn,removeKeyDownHandler:defaultEventHandlerFn,addKeyUpHandler:defaultEventHandlerFn,removeKeyUpHandler:defaultEventHandlerFn,addKeyPressHandler:defaultEventHandlerFn,removeKeyPressHandler:defaultEventHandlerFn,addDocClickHandler:defaultEventHandlerFn,removeDocClickHandler:defaultEventHandlerFn,host:void 0,zIndex:void 0}),Provider=LayersContext.Provider,Consumer=LayersContext.Consumer,LayersManager=function(n){_inherits$g(e,n);var o=_createSuper$g(e);function e(t){var c;return _classCallCheck$g(this,e),c=o.call(this,t),_defineProperty$x(_assertThisInitialized$h(c),"host",reactExports.createRef()),_defineProperty$x(_assertThisInitialized$h(c),"containerRef",reactExports.createRef()),_defineProperty$x(_assertThisInitialized$h(c),"onDocumentClick",function(p){var h=c.state.docClickHandlers[c.state.docClickHandlers.length-1];h&&h(p)}),_defineProperty$x(_assertThisInitialized$h(c),"onKeyDown",function(p){var h=c.state.keyDownHandlers[c.state.keyDownHandlers.length-1];h&&h(p)}),_defineProperty$x(_assertThisInitialized$h(c),"onKeyUp",function(p){if(p.key==="Escape"){var h=c.state.escapeKeyHandlers[c.state.escapeKeyHandlers.length-1];h&&h()}var y=c.state.keyUpHandlers[c.state.keyUpHandlers.length-1];y&&y(p)}),_defineProperty$x(_assertThisInitialized$h(c),"onKeyPress",function(p){var h=c.state.keyPressHandlers[c.state.keyPressHandlers.length-1];h&&h(p)}),_defineProperty$x(_assertThisInitialized$h(c),"onAddEscapeHandler",function(p){c.setState(function(h){return{escapeKeyHandlers:[].concat(_toConsumableArray$3(h.escapeKeyHandlers),[p])}})}),_defineProperty$x(_assertThisInitialized$h(c),"onRemoveEscapeHandler",function(p){c.setState(function(h){return{escapeKeyHandlers:h.escapeKeyHandlers.filter(function(y){return y!==p})}})}),_defineProperty$x(_assertThisInitialized$h(c),"onAddKeyDownHandler",function(p){c.setState(function(h){return{keyDownHandlers:[].concat(_toConsumableArray$3(h.keyDownHandlers),[p])}})}),_defineProperty$x(_assertThisInitialized$h(c),"onRemoveKeyDownHandler",function(p){c.setState(function(h){return{keyDownHandlers:h.keyDownHandlers.filter(function(y){return y!==p})}})}),_defineProperty$x(_assertThisInitialized$h(c),"onAddKeyUpHandler",function(p){c.setState(function(h){return{keyUpHandlers:[].concat(_toConsumableArray$3(h.keyUpHandlers),[p])}})}),_defineProperty$x(_assertThisInitialized$h(c),"onRemoveKeyUpHandler",function(p){c.setState(function(h){return{keyUpHandlers:h.keyUpHandlers.filter(function(y){return y!==p})}})}),_defineProperty$x(_assertThisInitialized$h(c),"onAddKeyPressHandler",function(p){c.setState(function(h){return{keyPressHandlers:[].concat(_toConsumableArray$3(h.keyPressHandlers),[p])}})}),_defineProperty$x(_assertThisInitialized$h(c),"onRemoveKeyPressHandler",function(p){c.setState(function(h){return{keyPressHandlers:h.keyPressHandlers.filter(function(y){return y!==p})}})}),_defineProperty$x(_assertThisInitialized$h(c),"onAddDocClickHandler",function(p){c.setState(function(h){return{docClickHandlers:[].concat(_toConsumableArray$3(h.docClickHandlers),[p])}})}),_defineProperty$x(_assertThisInitialized$h(c),"onRemoveDocClickHandler",function(p){c.setState(function(h){return{docClickHandlers:h.docClickHandlers.filter(function(y){return y!==p})}})}),c.state={escapeKeyHandlers:[],keyDownHandlers:[],keyUpHandlers:[],keyPressHandlers:[],docClickHandlers:[]},c}return _createClass$g(e,[{key:"componentDidMount",value:function(){this.forceUpdate(),initFocusVisible(this.containerRef.current),typeof document<"u"&&(document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("keypress",this.onKeyPress),document.addEventListener("mousedown",this.onDocumentClick))}},{key:"componentWillUnmount",value:function(){typeof document<"u"&&(document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("keypress",this.onKeyPress),document.removeEventListener("mousedown",this.onDocumentClick))}},{key:"render",value:function(){var c=this,p=this.props.overrides,h=p===void 0?{}:p,y=getOverrides(h.AppContainer,StyledAppContainer),g=_slicedToArray$l(y,2),$=g[0],E=g[1],A=getOverrides(h.LayersContainer,StyledLayersContainer),N=_slicedToArray$l(A,2),H=N[0],Z=N[1];return reactExports.createElement(Consumer,null,function(X){var be=X.host;return reactExports.createElement(Provider,{value:{host:be||c.host.current,zIndex:c.props.zIndex,addEscapeHandler:c.onAddEscapeHandler,removeEscapeHandler:c.onRemoveEscapeHandler,addKeyDownHandler:c.onAddKeyDownHandler,removeKeyDownHandler:c.onRemoveKeyDownHandler,addKeyUpHandler:c.onAddKeyUpHandler,removeKeyUpHandler:c.onRemoveKeyUpHandler,addKeyPressHandler:c.onAddKeyPressHandler,removeKeyPressHandler:c.onRemoveKeyPressHandler,addDocClickHandler:c.onAddDocClickHandler,removeDocClickHandler:c.onRemoveDocClickHandler}},reactExports.createElement($,_extends$y({},E,{ref:c.containerRef}),c.props.children),reactExports.createElement(H,_extends$y({},Z,{ref:c.host})))})}}]),e}(reactExports.Component),reactDomExports=requireReactDom();const ReactDOM=getDefaultExportFromCjs(reactDomExports);function _typeof$i(n){"@babel/helpers - typeof";return _typeof$i=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$i(n)}function _extends$x(){return _extends$x=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$x.apply(this,arguments)}function _classCallCheck$f(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$f(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$f(n,o,e){return o&&_defineProperties$f(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$f(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$g(n,o)}function _setPrototypeOf$g(n,o){return _setPrototypeOf$g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$g(n,o)}function _createSuper$f(n){var o=_isNativeReflectConstruct$f();return function(){var t=_getPrototypeOf$f(n),c;if(o){var p=_getPrototypeOf$f(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$f(this,c)}}function _possibleConstructorReturn$f(n,o){if(o&&(_typeof$i(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$g(n)}function _assertThisInitialized$g(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$f(){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$f(n){return _getPrototypeOf$f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$f(n)}function _defineProperty$w(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var Container=styled$1("div",function(n){var o=n.$zIndex;return{position:"absolute",top:0,left:0,right:0,zIndex:o||null}});Container.displayName="Container";var LayerComponent=function(n){_inherits$f(e,n);var o=_createSuper$f(e);function e(){var t;_classCallCheck$f(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$w(_assertThisInitialized$g(t),"state",{container:null}),_defineProperty$w(_assertThisInitialized$g(t),"onEscape",function(){t.props.onEscape&&t.props.onEscape()}),_defineProperty$w(_assertThisInitialized$g(t),"onKeyDown",function(y){t.props.onKeyDown&&t.props.onKeyDown(y)}),_defineProperty$w(_assertThisInitialized$g(t),"onKeyUp",function(y){t.props.onKeyUp&&t.props.onKeyUp(y)}),_defineProperty$w(_assertThisInitialized$g(t),"onKeyPress",function(y){t.props.onKeyPress&&t.props.onKeyPress(y)}),_defineProperty$w(_assertThisInitialized$g(t),"onDocumentClick",function(y){t.props.onDocumentClick&&t.props.onDocumentClick(y)}),t}return _createClass$f(e,[{key:"componentDidMount",value:function(){this.context.addEscapeHandler(this.onEscape),this.context.addKeyDownHandler(this.onKeyDown),this.context.addKeyUpHandler(this.onKeyUp),this.context.addKeyPressHandler(this.onKeyPress),this.props.isHoverLayer||this.context.addDocClickHandler(this.onDocumentClick);var c=this.props,p=c.onMount,h=c.mountNode,y=c.host;if(h){p&&p();return}var g=y!==void 0,$=g?y:document.body;$&&this.addContainer($)}},{key:"componentDidUpdate",value:function(c){var p=this.props,h=p.host,y=p.mountNode;y||(h&&h!==c.host&&c.host===null&&this.addContainer(h),c.isHoverLayer!=this.props.isHoverLayer&&(this.props.isHoverLayer?this.context.removeDocClickHandler(this.onDocumentClick):this.context.addDocClickHandler(this.onDocumentClick)))}},{key:"componentWillUnmount",value:function(){this.context.removeEscapeHandler(this.onEscape),this.context.removeKeyDownHandler(this.onKeyDown),this.context.removeKeyUpHandler(this.onKeyUp),this.context.removeKeyPressHandler(this.onKeyPress),this.context.removeDocClickHandler(this.onDocumentClick),this.props.onUnmount&&this.props.onUnmount();var c=this.props.host,p=this.state.container;c&&p&&c.contains(p)&&c.removeChild(p)}},{key:"addContainer",value:function(c){var p=this.props,h=p.index,y=p.mountNode,g=p.onMount;if(!y&&c){var $=c.ownerDocument.createElement("div"),E=typeof h=="number"?c.children[h]:null;E?c.insertBefore($,E):c.appendChild($),this.setState({container:$},function(){g&&g()})}}},{key:"render",value:function(){var c=this.state.container,p=this.props,h=p.children,y=p.mountNode,g=p.zIndex,$=g?reactExports.createElement(Container,{$zIndex:g},h):h;return typeof document<"u"?y?ReactDOM.createPortal($,y):c?ReactDOM.createPortal($,c):null:null}}]),e}(reactExports.Component);_defineProperty$w(LayerComponent,"contextType",LayersContext);function Layer(n){return reactExports.createElement(Consumer,null,function(o){var e=o.host,t=o.zIndex;return reactExports.createElement(LayerComponent,_extends$x({},n,{host:e,zIndex:t}))})}var isBrowser$1=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",timeoutDuration=function(){for(var n=["Edge","Trident","Firefox"],o=0;o<n.length;o+=1)if(isBrowser$1&&navigator.userAgent.indexOf(n[o])>=0)return 1;return 0}();function microtaskDebounce(n){var o=!1;return function(){o||(o=!0,window.Promise.resolve().then(function(){o=!1,n()}))}}function taskDebounce(n){var o=!1;return function(){o||(o=!0,setTimeout(function(){o=!1,n()},timeoutDuration))}}var supportsMicroTasks=isBrowser$1&&window.Promise,debounce$1=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction(n){var o={};return n&&o.toString.call(n)==="[object Function]"}function getStyleComputedProperty(n,o){if(n.nodeType!==1)return[];var e=n.ownerDocument.defaultView,t=e.getComputedStyle(n,null);return o?t[o]:t}function getParentNode$1(n){return n.nodeName==="HTML"?n:n.parentNode||n.host}function getScrollParent(n){if(!n)return document.body;switch(n.nodeName){case"HTML":case"BODY":return n.ownerDocument.body;case"#document":return n.body}var o=getStyleComputedProperty(n),e=o.overflow,t=o.overflowX,c=o.overflowY;return/(auto|scroll|overlay)/.test(e+c+t)?n:getScrollParent(getParentNode$1(n))}function getReferenceNode(n){return n&&n.referenceNode?n.referenceNode:n}var isIE11=isBrowser$1&&!!(window.MSInputMethodContext&&document.documentMode),isIE10=isBrowser$1&&/MSIE 10/.test(navigator.userAgent);function isIE(n){return n===11?isIE11:n===10?isIE10:isIE11||isIE10}function getOffsetParent(n){if(!n)return document.documentElement;for(var o=isIE(10)?document.body:null,e=n.offsetParent||null;e===o&&n.nextElementSibling;)e=(n=n.nextElementSibling).offsetParent;var t=e&&e.nodeName;return!t||t==="BODY"||t==="HTML"?n?n.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(e.nodeName)!==-1&&getStyleComputedProperty(e,"position")==="static"?getOffsetParent(e):e}function isOffsetContainer(n){var o=n.nodeName;return o==="BODY"?!1:o==="HTML"||getOffsetParent(n.firstElementChild)===n}function getRoot(n){return n.parentNode!==null?getRoot(n.parentNode):n}function findCommonOffsetParent(n,o){if(!n||!n.nodeType||!o||!o.nodeType)return document.documentElement;var e=n.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING,t=e?n:o,c=e?o:n,p=document.createRange();p.setStart(t,0),p.setEnd(c,0);var h=p.commonAncestorContainer;if(n!==h&&o!==h||t.contains(c))return isOffsetContainer(h)?h:getOffsetParent(h);var y=getRoot(n);return y.host?findCommonOffsetParent(y.host,o):findCommonOffsetParent(n,getRoot(o).host)}function getScroll(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",e=o==="top"?"scrollTop":"scrollLeft",t=n.nodeName;if(t==="BODY"||t==="HTML"){var c=n.ownerDocument.documentElement,p=n.ownerDocument.scrollingElement||c;return p[e]}return n[e]}function includeScroll(n,o){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=getScroll(o,"top"),c=getScroll(o,"left"),p=e?-1:1;return n.top+=t*p,n.bottom+=t*p,n.left+=c*p,n.right+=c*p,n}function getBordersSize$1(n,o){var e=o==="x"?"Left":"Top",t=e==="Left"?"Right":"Bottom";return parseFloat(n["border"+e+"Width"])+parseFloat(n["border"+t+"Width"])}function getSize(n,o,e,t){return Math.max(o["offset"+n],o["scroll"+n],e["client"+n],e["offset"+n],e["scroll"+n],isIE(10)?parseInt(e["offset"+n])+parseInt(t["margin"+(n==="Height"?"Top":"Left")])+parseInt(t["margin"+(n==="Height"?"Bottom":"Right")]):0)}function getWindowSizes(n){var o=n.body,e=n.documentElement,t=isIE(10)&&getComputedStyle(e);return{height:getSize("Height",o,e,t),width:getSize("Width",o,e,t)}}var classCallCheck=function(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")},createClass=function(){function n(o,e){for(var t=0;t<e.length;t++){var c=e[t];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(o,c.key,c)}}return function(o,e,t){return e&&n(o.prototype,e),t&&n(o,t),o}}(),defineProperty=function(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n},_extends$w=Object.assign||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};function getClientRect(n){return _extends$w({},n,{right:n.left+n.width,bottom:n.top+n.height})}function getBoundingClientRect(n){var o={};try{if(isIE(10)){o=n.getBoundingClientRect();var e=getScroll(n,"top"),t=getScroll(n,"left");o.top+=e,o.left+=t,o.bottom+=e,o.right+=t}else o=n.getBoundingClientRect()}catch{}var c={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},p=n.nodeName==="HTML"?getWindowSizes(n.ownerDocument):{},h=p.width||n.clientWidth||c.width,y=p.height||n.clientHeight||c.height,g=n.offsetWidth-h,$=n.offsetHeight-y;if(g||$){var E=getStyleComputedProperty(n);g-=getBordersSize$1(E,"x"),$-=getBordersSize$1(E,"y"),c.width-=g,c.height-=$}return getClientRect(c)}function getOffsetRectRelativeToArbitraryNode(n,o){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=isIE(10),c=o.nodeName==="HTML",p=getBoundingClientRect(n),h=getBoundingClientRect(o),y=getScrollParent(n),g=getStyleComputedProperty(o),$=parseFloat(g.borderTopWidth),E=parseFloat(g.borderLeftWidth);e&&c&&(h.top=Math.max(h.top,0),h.left=Math.max(h.left,0));var A=getClientRect({top:p.top-h.top-$,left:p.left-h.left-E,width:p.width,height:p.height});if(A.marginTop=0,A.marginLeft=0,!t&&c){var N=parseFloat(g.marginTop),H=parseFloat(g.marginLeft);A.top-=$-N,A.bottom-=$-N,A.left-=E-H,A.right-=E-H,A.marginTop=N,A.marginLeft=H}return(t&&!e?o.contains(y):o===y&&y.nodeName!=="BODY")&&(A=includeScroll(A,o)),A}function getViewportOffsetRectRelativeToArtbitraryNode(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=n.ownerDocument.documentElement,t=getOffsetRectRelativeToArbitraryNode(n,e),c=Math.max(e.clientWidth,window.innerWidth||0),p=Math.max(e.clientHeight,window.innerHeight||0),h=o?0:getScroll(e),y=o?0:getScroll(e,"left"),g={top:h-t.top+t.marginTop,left:y-t.left+t.marginLeft,width:c,height:p};return getClientRect(g)}function isFixed$1(n){var o=n.nodeName;if(o==="BODY"||o==="HTML")return!1;if(getStyleComputedProperty(n,"position")==="fixed")return!0;var e=getParentNode$1(n);return e?isFixed$1(e):!1}function getFixedPositionOffsetParent(n){if(!n||!n.parentElement||isIE())return document.documentElement;for(var o=n.parentElement;o&&getStyleComputedProperty(o,"transform")==="none";)o=o.parentElement;return o||document.documentElement}function getBoundaries(n,o,e,t){var c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,p={top:0,left:0},h=c?getFixedPositionOffsetParent(n):findCommonOffsetParent(n,getReferenceNode(o));if(t==="viewport")p=getViewportOffsetRectRelativeToArtbitraryNode(h,c);else{var y=void 0;t==="scrollParent"?(y=getScrollParent(getParentNode$1(o)),y.nodeName==="BODY"&&(y=n.ownerDocument.documentElement)):t==="window"?y=n.ownerDocument.documentElement:y=t;var g=getOffsetRectRelativeToArbitraryNode(y,h,c);if(y.nodeName==="HTML"&&!isFixed$1(h)){var $=getWindowSizes(n.ownerDocument),E=$.height,A=$.width;p.top+=g.top-g.marginTop,p.bottom=E+g.top,p.left+=g.left-g.marginLeft,p.right=A+g.left}else p=g}e=e||0;var N=typeof e=="number";return p.left+=N?e:e.left||0,p.top+=N?e:e.top||0,p.right-=N?e:e.right||0,p.bottom-=N?e:e.bottom||0,p}function getArea(n){var o=n.width,e=n.height;return o*e}function computeAutoPlacement(n,o,e,t,c){var p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(n.indexOf("auto")===-1)return n;var h=getBoundaries(e,t,p,c),y={top:{width:h.width,height:o.top-h.top},right:{width:h.right-o.right,height:h.height},bottom:{width:h.width,height:h.bottom-o.bottom},left:{width:o.left-h.left,height:h.height}},g=Object.keys(y).map(function(N){return _extends$w({key:N},y[N],{area:getArea(y[N])})}).sort(function(N,H){return H.area-N.area}),$=g.filter(function(N){var H=N.width,Z=N.height;return H>=e.clientWidth&&Z>=e.clientHeight}),E=$.length>0?$[0].key:g[0].key,A=n.split("-")[1];return E+(A?"-"+A:"")}function getReferenceOffsets(n,o,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,c=t?getFixedPositionOffsetParent(o):findCommonOffsetParent(o,getReferenceNode(e));return getOffsetRectRelativeToArbitraryNode(e,c,t)}function getOuterSizes(n){var o=n.ownerDocument.defaultView,e=o.getComputedStyle(n),t=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),c=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0),p={width:n.offsetWidth+c,height:n.offsetHeight+t};return p}function getOppositePlacement(n){var o={left:"right",right:"left",bottom:"top",top:"bottom"};return n.replace(/left|right|bottom|top/g,function(e){return o[e]})}function getPopperOffsets(n,o,e){e=e.split("-")[0];var t=getOuterSizes(n),c={width:t.width,height:t.height},p=["right","left"].indexOf(e)!==-1,h=p?"top":"left",y=p?"left":"top",g=p?"height":"width",$=p?"width":"height";return c[h]=o[h]+o[g]/2-t[g]/2,e===y?c[y]=o[y]-t[$]:c[y]=o[getOppositePlacement(y)],c}function find$1(n,o){return Array.prototype.find?n.find(o):n.filter(o)[0]}function findIndex(n,o,e){if(Array.prototype.findIndex)return n.findIndex(function(c){return c[o]===e});var t=find$1(n,function(c){return c[o]===e});return n.indexOf(t)}function runModifiers(n,o,e){var t=e===void 0?n:n.slice(0,findIndex(n,"name",e));return t.forEach(function(c){c.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var p=c.function||c.fn;c.enabled&&isFunction(p)&&(o.offsets.popper=getClientRect(o.offsets.popper),o.offsets.reference=getClientRect(o.offsets.reference),o=p(o,c))}),o}function update(){if(!this.state.isDestroyed){var n={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};n.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed),n.placement=computeAutoPlacement(this.options.placement,n.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),n.originalPlacement=n.placement,n.positionFixed=this.options.positionFixed,n.offsets.popper=getPopperOffsets(this.popper,n.offsets.reference,n.placement),n.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",n=runModifiers(this.modifiers,n),this.state.isCreated?this.options.onUpdate(n):(this.state.isCreated=!0,this.options.onCreate(n))}}function isModifierEnabled(n,o){return n.some(function(e){var t=e.name,c=e.enabled;return c&&t===o})}function getSupportedPropertyName(n){for(var o=[!1,"ms","Webkit","Moz","O"],e=n.charAt(0).toUpperCase()+n.slice(1),t=0;t<o.length;t++){var c=o[t],p=c?""+c+e:n;if(typeof document.body.style[p]<"u")return p}return null}function destroy(){return this.state.isDestroyed=!0,isModifierEnabled(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[getSupportedPropertyName("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function getWindow(n){var o=n.ownerDocument;return o?o.defaultView:window}function attachToScrollParents(n,o,e,t){var c=n.nodeName==="BODY",p=c?n.ownerDocument.defaultView:n;p.addEventListener(o,e,{passive:!0}),c||attachToScrollParents(getScrollParent(p.parentNode),o,e,t),t.push(p)}function setupEventListeners(n,o,e,t){e.updateBound=t,getWindow(n).addEventListener("resize",e.updateBound,{passive:!0});var c=getScrollParent(n);return attachToScrollParents(c,"scroll",e.updateBound,e.scrollParents),e.scrollElement=c,e.eventsEnabled=!0,e}function enableEventListeners(){this.state.eventsEnabled||(this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners(n,o){return getWindow(n).removeEventListener("resize",o.updateBound),o.scrollParents.forEach(function(e){e.removeEventListener("scroll",o.updateBound)}),o.updateBound=null,o.scrollParents=[],o.scrollElement=null,o.eventsEnabled=!1,o}function disableEventListeners(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners(this.reference,this.state))}function isNumeric(n){return n!==""&&!isNaN(parseFloat(n))&&isFinite(n)}function setStyles(n,o){Object.keys(o).forEach(function(e){var t="";["width","height","top","right","bottom","left"].indexOf(e)!==-1&&isNumeric(o[e])&&(t="px"),n.style[e]=o[e]+t})}function setAttributes(n,o){Object.keys(o).forEach(function(e){var t=o[e];t!==!1?n.setAttribute(e,o[e]):n.removeAttribute(e)})}function applyStyle(n){return setStyles(n.instance.popper,n.styles),setAttributes(n.instance.popper,n.attributes),n.arrowElement&&Object.keys(n.arrowStyles).length&&setStyles(n.arrowElement,n.arrowStyles),n}function applyStyleOnLoad(n,o,e,t,c){var p=getReferenceOffsets(c,o,n,e.positionFixed),h=computeAutoPlacement(e.placement,p,o,n,e.modifiers.flip.boundariesElement,e.modifiers.flip.padding);return o.setAttribute("x-placement",h),setStyles(o,{position:e.positionFixed?"fixed":"absolute"}),e}function getRoundedOffsets(n,o){var e=n.offsets,t=e.popper,c=e.reference,p=Math.round,h=Math.floor,y=function(we){return we},g=p(c.width),$=p(t.width),E=["left","right"].indexOf(n.placement)!==-1,A=n.placement.indexOf("-")!==-1,N=g%2===$%2,H=g%2===1&&$%2===1,Z=o?E||A||N?p:h:y,X=o?p:y;return{left:Z(H&&!A&&o?t.left-1:t.left),top:X(t.top),bottom:X(t.bottom),right:Z(t.right)}}var isFirefox=isBrowser$1&&/Firefox/i.test(navigator.userAgent);function computeStyle(n,o){var e=o.x,t=o.y,c=n.offsets.popper,p=find$1(n.instance.modifiers,function(Ce){return Ce.name==="applyStyle"}).gpuAcceleration;p!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var h=p!==void 0?p:o.gpuAcceleration,y=getOffsetParent(n.instance.popper),g=getBoundingClientRect(y),$={position:c.position},E=getRoundedOffsets(n,window.devicePixelRatio<2||!isFirefox),A=e==="bottom"?"top":"bottom",N=t==="right"?"left":"right",H=getSupportedPropertyName("transform"),Z=void 0,X=void 0;if(A==="bottom"?y.nodeName==="HTML"?X=-y.clientHeight+E.bottom:X=-g.height+E.bottom:X=E.top,N==="right"?y.nodeName==="HTML"?Z=-y.clientWidth+E.right:Z=-g.width+E.right:Z=E.left,h&&H)$[H]="translate3d("+Z+"px, "+X+"px, 0)",$[A]=0,$[N]=0,$.willChange="transform";else{var be=A==="bottom"?-1:1,we=N==="right"?-1:1;$[A]=X*be,$[N]=Z*we,$.willChange=A+", "+N}var $e={"x-placement":n.placement};return n.attributes=_extends$w({},$e,n.attributes),n.styles=_extends$w({},$,n.styles),n.arrowStyles=_extends$w({},n.offsets.arrow,n.arrowStyles),n}function isModifierRequired(n,o,e){var t=find$1(n,function(y){var g=y.name;return g===o}),c=!!t&&n.some(function(y){return y.name===e&&y.enabled&&y.order<t.order});if(!c){var p="`"+o+"`",h="`"+e+"`";console.warn(h+" modifier is required by "+p+" modifier in order to work, be sure to include it before "+p+"!")}return c}function arrow(n,o){var e;if(!isModifierRequired(n.instance.modifiers,"arrow","keepTogether"))return n;var t=o.element;if(typeof t=="string"){if(t=n.instance.popper.querySelector(t),!t)return n}else if(!n.instance.popper.contains(t))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),n;var c=n.placement.split("-")[0],p=n.offsets,h=p.popper,y=p.reference,g=["left","right"].indexOf(c)!==-1,$=g?"height":"width",E=g?"Top":"Left",A=E.toLowerCase(),N=g?"left":"top",H=g?"bottom":"right",Z=getOuterSizes(t)[$];y[H]-Z<h[A]&&(n.offsets.popper[A]-=h[A]-(y[H]-Z)),y[A]+Z>h[H]&&(n.offsets.popper[A]+=y[A]+Z-h[H]),n.offsets.popper=getClientRect(n.offsets.popper);var X=y[A]+y[$]/2-Z/2,be=getStyleComputedProperty(n.instance.popper),we=parseFloat(be["margin"+E]),$e=parseFloat(be["border"+E+"Width"]),Ce=X-n.offsets.popper[A]-we-$e;return Ce=Math.max(Math.min(h[$]-Z,Ce),0),n.arrowElement=t,n.offsets.arrow=(e={},defineProperty(e,A,Math.round(Ce)),defineProperty(e,N,""),e),n}function getOppositeVariation(n){return n==="end"?"start":n==="start"?"end":n}var placements=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],validPlacements=placements.slice(3);function clockwise(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=validPlacements.indexOf(n),t=validPlacements.slice(e+1).concat(validPlacements.slice(0,e));return o?t.reverse():t}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip(n,o){if(isModifierEnabled(n.instance.modifiers,"inner")||n.flipped&&n.placement===n.originalPlacement)return n;var e=getBoundaries(n.instance.popper,n.instance.reference,o.padding,o.boundariesElement,n.positionFixed),t=n.placement.split("-")[0],c=getOppositePlacement(t),p=n.placement.split("-")[1]||"",h=[];switch(o.behavior){case BEHAVIORS.FLIP:h=[t,c];break;case BEHAVIORS.CLOCKWISE:h=clockwise(t);break;case BEHAVIORS.COUNTERCLOCKWISE:h=clockwise(t,!0);break;default:h=o.behavior}return h.forEach(function(y,g){if(t!==y||h.length===g+1)return n;t=n.placement.split("-")[0],c=getOppositePlacement(t);var $=n.offsets.popper,E=n.offsets.reference,A=Math.floor,N=t==="left"&&A($.right)>A(E.left)||t==="right"&&A($.left)<A(E.right)||t==="top"&&A($.bottom)>A(E.top)||t==="bottom"&&A($.top)<A(E.bottom),H=A($.left)<A(e.left),Z=A($.right)>A(e.right),X=A($.top)<A(e.top),be=A($.bottom)>A(e.bottom),we=t==="left"&&H||t==="right"&&Z||t==="top"&&X||t==="bottom"&&be,$e=["top","bottom"].indexOf(t)!==-1,Ce=!!o.flipVariations&&($e&&p==="start"&&H||$e&&p==="end"&&Z||!$e&&p==="start"&&X||!$e&&p==="end"&&be),Ie=!!o.flipVariationsByContent&&($e&&p==="start"&&Z||$e&&p==="end"&&H||!$e&&p==="start"&&be||!$e&&p==="end"&&X),Ne=Ce||Ie;(N||we||Ne)&&(n.flipped=!0,(N||we)&&(t=h[g+1]),Ne&&(p=getOppositeVariation(p)),n.placement=t+(p?"-"+p:""),n.offsets.popper=_extends$w({},n.offsets.popper,getPopperOffsets(n.instance.popper,n.offsets.reference,n.placement)),n=runModifiers(n.instance.modifiers,n,"flip"))}),n}function keepTogether(n){var o=n.offsets,e=o.popper,t=o.reference,c=n.placement.split("-")[0],p=Math.floor,h=["top","bottom"].indexOf(c)!==-1,y=h?"right":"bottom",g=h?"left":"top",$=h?"width":"height";return e[y]<p(t[g])&&(n.offsets.popper[g]=p(t[g])-e[$]),e[g]>p(t[y])&&(n.offsets.popper[g]=p(t[y])),n}function toValue(n,o,e,t){var c=n.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),p=+c[1],h=c[2];if(!p)return n;if(h.indexOf("%")===0){var y=void 0;switch(h){case"%p":y=e;break;case"%":case"%r":default:y=t}var g=getClientRect(y);return g[o]/100*p}else if(h==="vh"||h==="vw"){var $=void 0;return h==="vh"?$=Math.max(document.documentElement.clientHeight,window.innerHeight||0):$=Math.max(document.documentElement.clientWidth,window.innerWidth||0),$/100*p}else return p}function parseOffset(n,o,e,t){var c=[0,0],p=["right","left"].indexOf(t)!==-1,h=n.split(/(\+|\-)/).map(function(E){return E.trim()}),y=h.indexOf(find$1(h,function(E){return E.search(/,|\s/)!==-1}));h[y]&&h[y].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var g=/\s*,\s*|\s+/,$=y!==-1?[h.slice(0,y).concat([h[y].split(g)[0]]),[h[y].split(g)[1]].concat(h.slice(y+1))]:[h];return $=$.map(function(E,A){var N=(A===1?!p:p)?"height":"width",H=!1;return E.reduce(function(Z,X){return Z[Z.length-1]===""&&["+","-"].indexOf(X)!==-1?(Z[Z.length-1]=X,H=!0,Z):H?(Z[Z.length-1]+=X,H=!1,Z):Z.concat(X)},[]).map(function(Z){return toValue(Z,N,o,e)})}),$.forEach(function(E,A){E.forEach(function(N,H){isNumeric(N)&&(c[A]+=N*(E[H-1]==="-"?-1:1))})}),c}function offset(n,o){var e=o.offset,t=n.placement,c=n.offsets,p=c.popper,h=c.reference,y=t.split("-")[0],g=void 0;return isNumeric(+e)?g=[+e,0]:g=parseOffset(e,p,h,y),y==="left"?(p.top+=g[0],p.left-=g[1]):y==="right"?(p.top+=g[0],p.left+=g[1]):y==="top"?(p.left+=g[0],p.top-=g[1]):y==="bottom"&&(p.left+=g[0],p.top+=g[1]),n.popper=p,n}function preventOverflow(n,o){var e=o.boundariesElement||getOffsetParent(n.instance.popper);n.instance.reference===e&&(e=getOffsetParent(e));var t=getSupportedPropertyName("transform"),c=n.instance.popper.style,p=c.top,h=c.left,y=c[t];c.top="",c.left="",c[t]="";var g=getBoundaries(n.instance.popper,n.instance.reference,o.padding,e,n.positionFixed);c.top=p,c.left=h,c[t]=y,o.boundaries=g;var $=o.priority,E=n.offsets.popper,A={primary:function(H){var Z=E[H];return E[H]<g[H]&&!o.escapeWithReference&&(Z=Math.max(E[H],g[H])),defineProperty({},H,Z)},secondary:function(H){var Z=H==="right"?"left":"top",X=E[Z];return E[H]>g[H]&&!o.escapeWithReference&&(X=Math.min(E[Z],g[H]-(H==="right"?E.width:E.height))),defineProperty({},Z,X)}};return $.forEach(function(N){var H=["left","top"].indexOf(N)!==-1?"primary":"secondary";E=_extends$w({},E,A[H](N))}),n.offsets.popper=E,n}function shift(n){var o=n.placement,e=o.split("-")[0],t=o.split("-")[1];if(t){var c=n.offsets,p=c.reference,h=c.popper,y=["bottom","top"].indexOf(e)!==-1,g=y?"left":"top",$=y?"width":"height",E={start:defineProperty({},g,p[g]),end:defineProperty({},g,p[g]+p[$]-h[$])};n.offsets.popper=_extends$w({},h,E[t])}return n}function hide(n){if(!isModifierRequired(n.instance.modifiers,"hide","preventOverflow"))return n;var o=n.offsets.reference,e=find$1(n.instance.modifiers,function(t){return t.name==="preventOverflow"}).boundaries;if(o.bottom<e.top||o.left>e.right||o.top>e.bottom||o.right<e.left){if(n.hide===!0)return n;n.hide=!0,n.attributes["x-out-of-boundaries"]=""}else{if(n.hide===!1)return n;n.hide=!1,n.attributes["x-out-of-boundaries"]=!1}return n}function inner(n){var o=n.placement,e=o.split("-")[0],t=n.offsets,c=t.popper,p=t.reference,h=["left","right"].indexOf(e)!==-1,y=["top","left"].indexOf(e)===-1;return c[h?"left":"top"]=p[e]-(y?c[h?"width":"height"]:0),n.placement=getOppositePlacement(o),n.offsets.popper=getClientRect(c),n}var modifiers={shift:{order:100,enabled:!0,fn:shift},offset:{order:200,enabled:!0,fn:offset,offset:0},preventOverflow:{order:300,enabled:!0,fn:preventOverflow,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:keepTogether},arrow:{order:500,enabled:!0,fn:arrow,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:flip,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:inner},hide:{order:800,enabled:!0,fn:hide},computeStyle:{order:850,enabled:!0,fn:computeStyle,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:void 0}},Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function n(){},onUpdate:function n(){},modifiers},Popper=function(){function n(o,e){var t=this,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};classCallCheck(this,n),this.scheduleUpdate=function(){return requestAnimationFrame(t.update)},this.update=debounce$1(this.update.bind(this)),this.options=_extends$w({},n.Defaults,c),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=o&&o.jquery?o[0]:o,this.popper=e&&e.jquery?e[0]:e,this.options.modifiers={},Object.keys(_extends$w({},n.Defaults.modifiers,c.modifiers)).forEach(function(h){t.options.modifiers[h]=_extends$w({},n.Defaults.modifiers[h]||{},c.modifiers?c.modifiers[h]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(h){return _extends$w({name:h},t.options.modifiers[h])}).sort(function(h,y){return h.order-y.order}),this.modifiers.forEach(function(h){h.enabled&&isFunction(h.onLoad)&&h.onLoad(t.reference,t.popper,t.options,h,t.state)}),this.update();var p=this.options.eventsEnabled;p&&this.enableEventListeners(),this.state.eventsEnabled=p}return createClass(n,[{key:"update",value:function(){return update.call(this)}},{key:"destroy",value:function(){return destroy.call(this)}},{key:"enableEventListeners",value:function(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function(){return disableEventListeners.call(this)}}]),n}();Popper.Utils=(typeof window<"u"?window:global).PopperUtils;Popper.placements=placements;Popper.Defaults=Defaults;function toPopperPlacement(n){return n.replace(/(Top|Left)$/,"-start").replace(/(Right|Bottom)$/,"-end")}function parsePopperOffset(n){return{top:Math.floor(n.top||0),left:Math.floor(n.left||0)}}var TETHER_PLACEMENT={auto:"auto"};function _typeof$h(n){"@babel/helpers - typeof";return _typeof$h=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$h(n)}var _excluded$p=["modifiers"];function ownKeys$q(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$o(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$q(Object(e),!0).forEach(function(t){_defineProperty$v(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$q(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _objectWithoutProperties$r(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$r(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$r(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 _classCallCheck$e(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(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$e(n,o,e){return o&&_defineProperties$e(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$e(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$f(n,o)}function _setPrototypeOf$f(n,o){return _setPrototypeOf$f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$f(n,o)}function _createSuper$e(n){var o=_isNativeReflectConstruct$e();return function(){var t=_getPrototypeOf$e(n),c;if(o){var p=_getPrototypeOf$e(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$e(this,c)}}function _possibleConstructorReturn$e(n,o){if(o&&(_typeof$h(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$f(n)}function _assertThisInitialized$f(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$e(){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$e(n){return _getPrototypeOf$e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$e(n)}function _defineProperty$v(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var Tether=function(n){_inherits$e(e,n);var o=_createSuper$e(e);function e(){var t;_classCallCheck$e(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$v(_assertThisInitialized$f(t),"popper",void 0),_defineProperty$v(_assertThisInitialized$f(t),"popperHeight",0),_defineProperty$v(_assertThisInitialized$f(t),"popperWidth",0),_defineProperty$v(_assertThisInitialized$f(t),"anchorHeight",0),_defineProperty$v(_assertThisInitialized$f(t),"anchorWidth",0),_defineProperty$v(_assertThisInitialized$f(t),"state",{isMounted:!1}),_defineProperty$v(_assertThisInitialized$f(t),"onPopperUpdate",function(y){var g={popper:parsePopperOffset(y.offsets.popper),arrow:y.offsets.arrow?parsePopperOffset(y.offsets.arrow):{top:0,left:0}};t.props.onPopperUpdate(g,y)}),t}return _createClass$e(e,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(c,p){if(this.props.anchorRef){var h=this.props.anchorRef.getBoundingClientRect(),y=h.height,g=h.width;(this.anchorHeight!==y||this.anchorWidth!==g)&&(this.anchorHeight=y,this.anchorWidth=g,this.popper&&this.popper.scheduleUpdate())}if(this.props.popperRef){var $=this.props.popperRef.getBoundingClientRect(),E=$.height,A=$.width;(this.popperHeight!==E||this.popperWidth!==A)&&(this.popperHeight=E,this.popperWidth=A,this.popper&&this.popper.scheduleUpdate()),this.state.isMounted!==p.isMounted&&this.props.anchorRef&&this.initializePopper()}}},{key:"componentWillUnmount",value:function(){this.destroyPopover()}},{key:"initializePopper",value:function(){var c=this.props,p=c.placement,h=c.popperOptions,y=h.modifiers,g=_objectWithoutProperties$r(h,_excluded$p);!this.props.anchorRef||!this.props.popperRef||(this.popper=new Popper(this.props.anchorRef,this.props.popperRef,_objectSpread$o({placement:toPopperPlacement(p),modifiers:_objectSpread$o({arrow:{element:this.props.arrowRef,enabled:!!this.props.arrowRef},computeStyle:{gpuAcceleration:!1},applyStyle:{enabled:!1},applyReactStyle:{enabled:!0,fn:this.onPopperUpdate,order:900},preventOverflow:{enabled:!0}},y)},g)))}},{key:"destroyPopover",value:function(){this.popper&&(this.popper.destroy(),delete this.popper)}},{key:"render",value:function(){return this.props.children||null}}]),e}(reactExports.Component);_defineProperty$v(Tether,"defaultProps",{anchorRef:null,onPopperUpdate:function n(){return null},placement:TETHER_PLACEMENT.auto,popperRef:null,popperOptions:{}});var BaseProvider=function n(o){var e=o.children,t=o.overrides,c=o.theme,p=o.zIndex;return reactExports.createElement(LayersManager,{zIndex:p,overrides:t},reactExports.createElement(UIDReset,{prefix:"bui"},reactExports.createElement(ThemeProvider$1,{theme:c},e)))};const createBaseUiThemePrimitives=(n,o)=>{const{colors:e,genericFonts:t}=o;return{...n,primaryFontFamily:t.bodyFont,primary100:e.primary,primary200:e.primary,primary300:e.primary,primary400:e.primary,primary500:e.primary,primary600:e.primary,primary700:e.primary,mono100:e.bgColor,mono200:e.secondaryBg,mono300:e.gray30,mono400:e.gray30,mono500:e.gray60,mono600:e.fadedText40,mono700:e.gray60,mono800:e.bodyText,mono900:e.bodyText,mono1000:e.black}},createBaseUiThemeOverrides=n=>{const{inSidebar:o,colors:e,genericFonts:t,fontSizes:c,lineHeights:p,radii:h}=n,y={fontFamily:t.bodyFont,fontSize:c.md,fontSizeSm:c.sm,fontWeight:"normal",lineHeight:p.base,lineHeightTight:p.tight},g=e.secondaryBg,$=o?e.secondaryBg:e.bgColor,E=o?e.bgColor:e.secondaryBg;return{borders:{radius100:h.default,radius200:h.default,radius300:h.default,radius400:h.default,radius500:h.default,useRoundedCorners:!0,buttonBorderRadiusMini:h.md,buttonBorderRadius:h.default,checkboxBorderRadius:`min(${h.md}, ${h.maxCheckbox})`,inputBorderRadiusMini:h.md,inputBorderRadius:h.default,popoverBorderRadius:h.default,surfaceBorderRadius:h.default,tagBorderRadius:h.md},typography:{font100:{},font150:{...y},font200:{},font250:{},font300:{...y},font350:{...y},font400:{...y},font450:{...y},font460:{...y},font470:{...y},font500:{...y},font600:{},LabelXSmall:{...y},LabelSmall:{...y},LabelMedium:{...y},LabelLarge:{...y},ParagraphSmall:{...y}},colors:{white:e.white,black:e.black,primary:e.primary,primaryA:e.primary,backgroundPrimary:e.bgColor,backgroundSecondary:g,backgroundTertiary:e.bgColor,borderOpaque:e.darkenedBgMix25,accent:transparentize(e.primary,.5),tagPrimarySolidBackground:e.primary,tagPrimaryFontDisabled:e.fadedText40,tagPrimaryOutlinedDisabled:e.transparent,borderSelected:e.primary,contentPrimary:e.bodyText,inputPlaceholder:e.fadedText60,tickFillDisabled:e.fadedText40,tickMarkFill:e.gray20,tickFillSelected:e.primary,datepickerBackground:$,calendarBackground:$,calendarForeground:e.bodyText,calendarDayForegroundPseudoSelected:e.bodyText,calendarHeaderBackground:E,calendarHeaderBackgroundActive:E,calendarHeaderForeground:e.bodyText,calendarHeaderForegroundDisabled:e.gray40,calendarDayBackgroundSelected:e.primary,calendarDayBackgroundSelectedHighlighted:e.primary,calendarDayForegroundSelected:e.white,calendarDayForegroundSelectedHighlighted:e.white,calendarDayForegroundPseudoSelectedHighlighted:e.bodyText,menuFontHighlighted:e.bodyText,menuFontSelected:e.bodyText,modalCloseColor:e.bodyText,notificationInfoBackground:e.blueBackgroundColor,notificationInfoText:e.blueTextColor,notificationPositiveBackground:e.greenBackgroundColor,notificationPositiveText:e.greenTextColor,notificationWarningBackground:e.yellowBackgroundColor,notificationWarningText:e.yellowTextColor,notificationNegativeBackground:e.redBackgroundColor,notificationNegativeText:e.redTextColor,progressbarTrackFill:g,tickFill:e.lightenedBg05,tickMarkFillDisabled:e.lightenedBg05,menuFill:$,buttonDisabledFill:e.lightenedBg05,tickFillHover:g,inputFillDisabled:g,inputFillActive:g,toggleTrackFillDisabled:g,tickFillActive:g,sliderTrackFillDisabled:g,inputBorder:e.widgetBorderColor||g,inputFill:g,inputEnhanceFill:g,inputEnhancerFillDisabled:g,buttonDisabledSpinnerBackground:e.gray40,toggleTrackFill:e.gray40,sliderTrackFill:e.gray40,sliderHandleInnerFill:e.gray40,sliderHandleInnerFillDisabled:e.gray40}}},createBaseUiTheme=(n,o=primitives)=>createLightTheme(createBaseUiThemePrimitives(o,n),createBaseUiThemeOverrides(n)),computeDerivedColors=n=>{const{bodyText:o,secondaryBg:e,bgColor:t}=n,c=getLuminance(t)>.5,p=transparentize(o,.9),h=transparentize(o,.8),y=transparentize(o,.7),g=transparentize(o,.6),$=transparentize(o,.4),E=mix$1(t,e,.5),A=c?darken(E,.3):lighten(E,.6),N=transparentize(A,.75),H=transparentize(A,.85),Z=lighten(t,.025);return{fadedText05:p,fadedText10:h,fadedText20:y,fadedText40:g,fadedText60:$,bgMix:E,darkenedBgMix100:A,darkenedBgMix25:N,darkenedBgMix15:H,lightenedBg05:Z}};function _isLightBackground(n){return getLuminance(n)>.5}function hasLightBackgroundColor(n){return _isLightBackground(n.colors.bgColor)}const createEmotionColors=n=>{const o=computeDerivedColors(n),e=defaultCategoricalColorsArray(n),t=defaultSequentialColorsArray(n);return{...n,...o,link:n.blueTextColor,codeTextColor:n.greenTextColor,codeBackgroundColor:o.bgMix,borderColor:o.fadedText10,borderColorLight:o.fadedText05,dataframeBorderColor:o.fadedText05,dataframeHeaderBackgroundColor:o.bgMix,headingColor:n.bodyText,chartCategoricalColors:e,chartSequentialColors:t}};function getDividerColors(n){const{redColor:o,orangeColor:e,yellowColor:t,blueColor:c,greenColor:p,violetColor:h,grayColor:y}=n.colors;return{red:o,orange:e,yellow:t,blue:c,green:p,violet:h,gray:y,grey:y,rainbow:`linear-gradient(to right, ${o}, ${e}, ${t}, ${p}, ${c}, ${h})`}}function getMetricColor(n,o){switch(o){case Metric$1.MetricColor.RED:return n.colors.redColor;case Metric$1.MetricColor.GREEN:return n.colors.greenColor;default:return n.colors.grayColor}}function getMarkdownBgColors(n){const o=hasLightBackgroundColor(n),e=n.colors;return{redbg:e.redBackgroundColor,orangebg:e.orangeBackgroundColor,yellowbg:e.yellowBackgroundColor,bluebg:e.blueBackgroundColor,greenbg:e.greenBackgroundColor,violetbg:e.violetBackgroundColor,purplebg:transparentize(e[o?"purple90":"purple80"],o?.9:.7),graybg:e.grayBackgroundColor,primarybg:transparentize(e.primary,o?.9:.7)}}function getMetricBackgroundColor(n,o){switch(o){case Metric$1.MetricColor.RED:return n.colors.redBackgroundColor;case Metric$1.MetricColor.GREEN:return n.colors.greenBackgroundColor;default:return n.colors.grayBackgroundColor}}function getMarkdownTextColors(n){const o=hasLightBackgroundColor(n),e=n.colors,t=e.primary,c=e.redTextColor,p=e.orangeTextColor,h=e.yellowTextColor,y=e.blueTextColor,g=e.greenTextColor,$=e.violetTextColor,E=o?e.purple100:e.purple80,A=e.grayTextColor;return{red:c,orange:p,yellow:h,green:g,blue:y,violet:$,purple:E,gray:A,primary:t}}function getMetricTextColor(n,o){switch(o){case Metric$1.MetricColor.RED:return n.colors.redTextColor;case Metric$1.MetricColor.GREEN:return n.colors.greenTextColor;default:return n.colors.grayTextColor}}function getGray70(n){return hasLightBackgroundColor(n)?n.colors.gray70:n.colors.gray30}function getGray30(n){return hasLightBackgroundColor(n)?n.colors.gray30:n.colors.gray85}function getGray90(n){return hasLightBackgroundColor(n)?n.colors.gray90:n.colors.gray10}function getBlue80(n){return hasLightBackgroundColor(n)?n.colors.blue80:n.colors.blue40}function getBlueArrayAsc(n){return[n.blue10,n.blue20,n.blue30,n.blue40,n.blue50,n.blue60,n.blue70,n.blue80,n.blue90,n.blue100]}function getBlueArrayDesc(n){return[n.blue100,n.blue90,n.blue80,n.blue70,n.blue60,n.blue50,n.blue40,n.blue30,n.blue20,n.blue10]}function getDivergingColorsArray(n){const{colors:o}=n;return[o.red100,o.red90,o.red70,o.red50,o.red30,o.blue30,o.blue50,o.blue70,o.blue90,o.blue100]}function defaultSequentialColorsArray(n){return _isLightBackground(n.bgColor)?getBlueArrayAsc(n):getBlueArrayDesc(n)}function defaultCategoricalColorsArray(n){return _isLightBackground(n.bgColor)?[n.blue80,n.blue40,n.red80,n.red40,n.blueGreen80,n.green40,n.orange80,n.orange50,n.purple80,n.gray40]:[n.blue40,n.blue80,n.red40,n.red80,n.green40,n.blueGreen80,n.orange50,n.orange80,n.purple80,n.gray40]}function getDecreasingRed(n){return hasLightBackgroundColor(n)?n.colors.red80:n.colors.red40}function getIncreasingGreen(n){return hasLightBackgroundColor(n)?n.colors.blueGreen80:n.colors.green40}const breakpoints={hideWidgetDetails:180,hideNumberInputControls:120,sm:"576px",columns:"640px",md:"768px"},colors={transparent:"transparent",black:"#000000",white:"#ffffff",gray10:"#fafafa",gray20:"#f0f2f6",gray30:"#e6eaf1",gray40:"#d5dae5",gray50:"#bfc5d3",gray60:"#a3a8b8",gray70:"#808495",gray80:"#555867",gray85:"#31333F",gray90:"#262730",gray100:"#0e1117",red10:"#fff0f0",red20:"#ffdede",red30:"#ffc7c7",red40:"#ffabab",red50:"#ff8c8c",red60:"#ff6c6c",red70:"#ff4b4b",red80:"#ff2b2b",red90:"#bd4043",red100:"#7d353b",orange10:"#fffae8",orange20:"#fff6d0",orange30:"#ffecb0",orange40:"#ffe08e",orange50:"#ffd16a",orange60:"#ffbd45",orange70:"#ffa421",orange80:"#ff8700",orange90:"#ed6f13",orange95:"#e2660c",orange100:"#d95a00",yellow10:"#ffffe1",yellow20:"#ffffc2",yellow30:"#ffffa0",yellow40:"#ffff7d",yellow50:"#ffff59",yellow60:"#fff835",yellow65:"#ffff12",yellow70:"#ffe312",yellow80:"#faca2b",yellow90:"#edbb16",yellow100:"#dea816",yellow110:"#916e10",yellow115:"#926c05",green10:"#dffde9",green20:"#c0fcd3",green30:"#9ef6bb",green40:"#7defa1",green50:"#5ce488",green60:"#3dd56d",green70:"#21c354",green80:"#09ab3b",green90:"#158237",green100:"#177233",blueGreen10:"#dcfffb",blueGreen20:"#bafff7",blueGreen30:"#93ffee",blueGreen40:"#6bfde3",blueGreen50:"#45f4d5",blueGreen60:"#20e7c5",blueGreen70:"#00d4b1",blueGreen80:"#29b09d",blueGreen90:"#2c867c",blueGreen100:"#246e69",lightBlue10:"#e0feff",lightBlue20:"#bffdff",lightBlue30:"#9af8ff",lightBlue40:"#73efff",lightBlue50:"#4be4ff",lightBlue60:"#24d4ff",lightBlue70:"#00c0f2",lightBlue80:"#00a4d4",lightBlue90:"#0d8cb5",lightBlue100:"#15799e",blue10:"#e4f5ff",blue20:"#c7ebff",blue30:"#a6dcff",blue40:"#83c9ff",blue50:"#60b4ff",blue60:"#3d9df3",blue65:"#1c83ff",blue70:"#1c83e1",blue80:"#0068c9",blue90:"#0054a3",blue100:"#004280",purple10:"#f5ebff",purple20:"#ebd6ff",purple30:"#dbbbff",purple40:"#c89dff",purple50:"#b27eff",purple60:"#9a5dff",purple70:"#803df5",purple80:"#6d3fc0",purple90:"#583f84",purple100:"#3f3163"},iconSizes={xs:"0.5rem",sm:"0.75rem",md:"0.9rem",base:"1rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.8rem",threeXL:"2.3rem"},radii={md:"0.25rem",default:"0.5rem",xl:"0.75rem",xxl:"1rem",button:"0.5rem",chatInput:"1.25rem",full:"9999px",maxCheckbox:"0.35rem"},sizes={full:"100%",headerHeight:"3.75rem",fullScreenHeaderHeight:"2.875rem",sidebarTopSpace:"6rem",toastWidth:"21rem",contentMaxWidth:"736px",maxChartTooltipWidth:"30rem",checkbox:"1rem",borderWidth:"1px",smallElementHeight:"1.5rem",minElementHeight:"2.5rem",largestElementHeight:"4.25rem",smallLogoHeight:"1.25rem",defaultLogoHeight:"1.5rem",largeLogoHeight:"2rem",sliderThumb:"0.75rem",wideSidePadding:"5rem",headerDecorationHeight:"0.125rem",appRunningMen:"1.6rem",appStatusMaxWidth:"20rem",spinnerSize:"1.375rem",spinnerThickness:"0.125rem",tabHeight:"2.5rem",minPopupWidth:"20rem",maxTooltipHeight:"18.75rem",chatAvatarSize:"2rem",clearIconSize:"1.5em",numberInputControlsWidth:"2rem",emptyDropdownHeight:"5.625rem",dropdownItemHeight:"2.5rem",maxDropdownHeight:"18.75rem",appDefaultBottomPadding:"3.5rem",defaultMapHeight:"31.25rem",defaultChartHeight:"21.875rem",defaultChartWidth:"25rem",minMenuWidth:"8rem",minChatInputFileListHeight:"3rem",headerItemHeight:"1.75rem",headerRightContentMaxWidth:"12.5rem"},spacing={px:"1px",none:"0",threeXS:"0.125rem",twoXS:"0.25rem",xs:"0.375rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.25rem",twoXL:"1.5rem",threeXL:"2rem",fourXL:"4rem"},fonts={sansSerif:'"Source Sans", sans-serif',monospace:'"Source Code Pro", monospace',serif:'"Source Serif", serif',materialIcons:"Material Symbols Rounded"},genericFonts={bodyFont:fonts.sansSerif,codeFont:fonts.monospace,headingFont:fonts.sansSerif,iconFont:fonts.materialIcons},fontSizes={baseFontSize:16,twoSm:"0.75rem",sm:"0.875rem",md:"1rem",mdLg:"1.125rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.75rem",threeXL:"2.25rem",fourXL:"2.75rem",codeFontSize:"0.875rem",inlineCodeFontSize:"0.75em",h1FontSize:"2.75rem",h2FontSize:"2.25rem",h3FontSize:"1.75rem",h4FontSize:"1.5rem",h5FontSize:"1.25rem",h6FontSize:"1rem"},fontWeights={normal:400,semiBold:500,bold:600,extrabold:700,code:400,codeBold:600,codeExtraBold:700,h1FontWeight:700,h2FontWeight:600,h3FontWeight:600,h4FontWeight:600,h5FontWeight:600,h6FontWeight:600},lineHeights={none:1,headings:1.2,tight:1.25,inputWidget:1.4,small:1.5,base:1.6,menuItem:2},sidebar=100,menuButton=sidebar+10,balloons=1e6,header=balloons-10,bottom=sidebar-1,sidebarMobile=balloons-5,fullscreenWrapper=balloons+50,headerDecoration=balloons-1,popup=fullscreenWrapper+10,tablePortal=fullscreenWrapper+60,cacheSpinner=sidebar+1,toast=popup+1,zIndices={hide:-1,auto:"auto",base:0,priority:1,sidebar,menuButton,balloons,header,sidebarMobile,popup,fullscreenWrapper,tablePortal,bottom,cacheSpinner,toast,headerDecoration},requiredThemeColors={bgColor:colors.white,secondaryBg:colors.gray20,bodyText:colors.gray85,primary:colors.red70,secondary:colors.blue70,redColor:colors.red70,orangeColor:colors.orange70,yellowColor:colors.yellow80,blueColor:colors.blue70,greenColor:colors.green70,violetColor:colors.purple70,grayColor:colors.gray60,redBackgroundColor:transparentize(colors.red80,.9),orangeBackgroundColor:transparentize(colors.orange70,.9),yellowBackgroundColor:transparentize(colors.yellow65,.9),blueBackgroundColor:transparentize(colors.blue65,.9),greenBackgroundColor:transparentize(colors.green70,.9),violetBackgroundColor:transparentize(colors.purple60,.9),grayBackgroundColor:transparentize(colors.gray85,.9),redTextColor:colors.red90,orangeTextColor:colors.orange95,yellowTextColor:colors.yellow115,blueTextColor:colors.blue90,greenTextColor:colors.green90,violetTextColor:colors.purple90,grayTextColor:transparentize(colors.gray85,.4)},optionalThemeColors={},themeColors={...colors,...requiredThemeColors,...optionalThemeColors},emotionBaseTheme={inSidebar:!1,showSidebarBorder:!1,linkUnderline:!0,breakpoints,colors:createEmotionColors(themeColors),fonts,fontSizes,fontWeights,genericFonts,iconSizes,lineHeights,radii,sizes,spacing,zIndices},genericColors$1={...colors,bgColor:colors.gray100,bodyText:colors.gray10,primary:colors.red70,secondaryBg:colors.gray90,redColor:colors.red80,orangeColor:colors.orange80,yellowColor:colors.yellow70,blueColor:colors.blue80,greenColor:colors.green80,violetColor:colors.purple70,grayColor:colors.gray80,redBackgroundColor:transparentize(colors.red60,.8),orangeBackgroundColor:transparentize(colors.orange80,.8),yellowBackgroundColor:transparentize(colors.yellow65,.8),blueBackgroundColor:transparentize(colors.blue60,.8),greenBackgroundColor:transparentize(colors.green60,.8),violetBackgroundColor:transparentize(colors.purple60,.8),grayBackgroundColor:transparentize(colors.gray70,.8),redTextColor:colors.red60,orangeTextColor:colors.orange60,yellowTextColor:colors.yellow20,blueTextColor:colors.blue60,greenTextColor:colors.green50,violetTextColor:colors.purple50,grayTextColor:transparentize(colors.gray10,.4)},emotionDarkTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors$1})},genericColors={...colors},emotionLightTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors})},baseuiLightTheme=createBaseUiTheme(emotionLightTheme,primitives),baseuiDarkTheme=createBaseUiTheme(emotionDarkTheme,primitives$1),globalStyles=n=>css("html{font-size:",n.fontSizes.baseFontSize,"px;}@media print{html{height:100%;print-color-adjust:exact;-webkit-print-color-adjust:exact;}}*,*::before,*::after{box-sizing:border-box;}body{margin:0;font-family:",n.genericFonts.bodyFont,";font-weight:",n.fontWeights.normal,";line-height:",n.lineHeights.base,";color:",n.colors.bodyText,";background-color:",n.colors.bgColor,";-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:",transparentize(n.colors.black,1),';-webkit-font-smoothing:auto;}body.embedded{overflow:hidden;}body.embedded:hover{overflow:auto;}[tabindex="-1"]:focus:not(:focus-visible){outline:0 !important;}p,ol,ul,dl{margin:0 0 1rem 0;padding:0;font-size:1rem;font-weight:',n.fontWeights.normal,';}ol ol,ul ul,ol ul,ul ol{margin-bottom:0;}a:not([href]):not([class]){&,&:hover{color:inherit;text-decoration:none;}}img,svg{vertical-align:middle;}input,button,select,optgroup,textarea{margin:0;font-family:inherit;line-height:inherit;font-size:inherit;}button,input{overflow:visible;}button,[role="button"]{&:not(:disabled){cursor:pointer;}}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button;}[hidden]{display:none !important;}@supports (scrollbar-color:transparent transparent){*{scrollbar-width:thin;scrollbar-color:transparent transparent;}*:hover{scrollbar-color:',n.colors.fadedText40," transparent;}}@supports not (scrollbar-color:transparent transparent){::-webkit-scrollbar{background:transparent;border-radius:",n.radii.full,";height:6px;width:6px;}::-webkit-scrollbar:active{background:",n.colors.fadedText10,";}:hover::-webkit-scrollbar-thumb:vertical,:hover::-webkit-scrollbar-thumb:horizontal{background:",n.colors.fadedText40,";border-radius:",n.radii.full,";}}"),baseTheme={name:"base",emotion:emotionBaseTheme,basewebTheme:baseuiLightTheme,primitives},darkTheme={name:"Dark",emotion:emotionDarkTheme,basewebTheme:baseuiDarkTheme,primitives:primitives$1},lightTheme={name:"Light",emotion:emotionLightTheme,basewebTheme:baseuiLightTheme,primitives},STALE_TRANSITION_PARAMS="1s ease-in 0.5s",STALE_STYLES={opacity:.33,transition:`opacity ${STALE_TRANSITION_PARAMS}`},CACHED_THEME_VERSION=1,CACHED_THEME_BASE_KEY=`stActiveTheme-${window.location.pathname}`,LocalStore={CACHED_THEME_VERSION,CACHED_THEME_BASE_KEY,ACTIVE_THEME:`${CACHED_THEME_BASE_KEY}-v${CACHED_THEME_VERSION}`},AUTO_THEME_NAME="Use system setting",CUSTOM_THEME_NAME="Custom Theme",CUSTOM_THEME_LIGHT_NAME="Custom Theme Light",CUSTOM_THEME_DARK_NAME="Custom Theme Dark",CUSTOM_THEME_AUTO_NAME="Custom Theme Auto",LOG$h=loglevelExports.getLogger("theme:utils");function sortThemeInputKeys(n){if(n==null)return n;if(Array.isArray(n))return n.map(o=>sortThemeInputKeys(o));if(typeof n=="object"){const o={};return Object.keys(n).sort().forEach(e=>{o[e]=sortThemeInputKeys(n[e])}),o}return n}function mergeTheme(n,o){if(o&&isObject$1(o)){const e=new CustomThemeConfig(o);return createTheme(n.name,e,n)}return n}const getMergedLightTheme=once(()=>mergeTheme(lightTheme,window.__streamlit?.LIGHT_THEME)),getMergedDarkTheme=once(()=>mergeTheme(darkTheme,window.__streamlit?.DARK_THEME)),getSystemThemePreference=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",getSystemTheme=()=>getSystemThemePreference()==="dark"?getMergedDarkTheme():getMergedLightTheme(),createAutoTheme=()=>({...getSystemTheme(),name:AUTO_THEME_NAME}),createPresetThemes=()=>[createAutoTheme(),getMergedLightTheme(),getMergedDarkTheme()],isPresetTheme=n=>createPresetThemes().map(e=>e.name).includes(n.name),bgColorToBaseString=n=>n===void 0||getLuminance(n)>.5?"light":"dark",isColor=n=>{const o=new Option().style;return o.color=n,o.color!==""},roundFontSizeToNearestEighth=n=>Math.round(n*8)/8,parseFont=(n,o=fonts.sansSerif)=>{const e=n.trim();if(!e)return o;const t={"sans-serif":fonts.sansSerif,serif:fonts.serif,monospace:fonts.monospace},c=e.toLowerCase().replaceAll(" ","-");return c in t?t[c]:`${e}, ${o}`},parseColor=(n,o,e=!1)=>{if(isColor(n))return n;if(isColor(`#${n}`))return`#${n}`;if(o.toLowerCase().includes("color")){const c=e?"theme.sidebar":"theme";LOG$h.warn(`Invalid color passed for ${o} in ${c}: "${n}"`)}},resolveBgColor=(n,o,e,t)=>n||(o?transparentize(o,t?.9:.8):e),resolveTextColor=(n,o,e,t)=>n||(o?t?darken(o,.15):lighten(o,.15):e),setBackgroundColors=(n,o)=>{const e={...n},t={redBackgroundColor:{main:o.redColor,background:o.redBackgroundColor},orangeBackgroundColor:{main:o.orangeColor,background:o.orangeBackgroundColor},yellowBackgroundColor:{main:o.yellowColor,background:o.yellowBackgroundColor},blueBackgroundColor:{main:o.blueColor,background:o.blueBackgroundColor},greenBackgroundColor:{main:o.greenColor,background:o.greenBackgroundColor},violetBackgroundColor:{main:o.violetColor,background:o.violetBackgroundColor},grayBackgroundColor:{main:o.grayColor,background:o.grayBackgroundColor}},c=getLuminance(e.bgColor)>.5;return Object.entries(t).forEach(([p,{main:h,background:y}])=>{const g=p;e[g]=resolveBgColor(y,h,n[g],c)}),e},setTextColors=(n,o)=>{const e={...n},t={redTextColor:{main:o.redColor,text:o.redTextColor},orangeTextColor:{main:o.orangeColor,text:o.orangeTextColor},yellowTextColor:{main:o.yellowColor,text:o.yellowTextColor},blueTextColor:{main:o.blueColor,text:o.blueTextColor},greenTextColor:{main:o.greenColor,text:o.greenTextColor},violetTextColor:{main:o.violetColor,text:o.violetTextColor},grayTextColor:{main:o.grayColor,text:o.grayTextColor}},c=getLuminance(e.bgColor)>.5;return Object.entries(t).forEach(([p,{main:h,text:y}])=>{const g=p;e[g]=resolveTextColor(y,h,n[g],c)}),e},parseRadius=n=>{let o="rem",e;const t=n.trim().toLowerCase();return t==="none"?e=0:t==="small"?e=.35:t==="medium"?e=.5:t==="large"?e=1:t==="full"?e=1.4:t.endsWith("rem")?e=parseFloat(t):t.endsWith("px")?(e=parseFloat(t),o="px"):isNaN(parseFloat(t))||(e=parseFloat(t),o="px"),[e,o]},parseFontSize=(n,o,e)=>{const t=e?"theme.sidebar":"theme";if(typeof o=="string"){const c=o.trim().toLowerCase(),p=parseFloat(c);if(p&&(c.endsWith("rem")||c.endsWith("px")))return c;if(p.toString()===c)return`${c}px`}LOG$h.warn(`Invalid size passed for ${n} in ${t}: ${o}. Falling back to default ${n}.`)},isValidFontWeight=(n,o,e,t,c)=>{const p=c?"theme.sidebar":"theme";if(notNullOrUndefined(o)){const h=Number.isInteger(o),y=o%100===0,g=o>=e&&o<=t;return!h||!y||!g?(LOG$h.warn(`Invalid ${n}: ${o} in ${p}. The ${n} must be an integer ${e}-${t}, and an increment of 100. Falling back to default font weight.`),!1):!0}return!1},convertHeadingFontSizeToRem=(n,o,e,t)=>{const c=parseFontSize(n,o,t);if(c?.endsWith("rem"))return c;if(c?.endsWith("px"))return`${parseFloat(c)/e}rem`},setHeadingFontSizes=(n,o,e,t)=>{const c={...n};return t&&t.forEach((p,h)=>{const y=`h${h+1}FontSize`,g=convertHeadingFontSizeToRem(`${y} in headingFontSizes`,p,e,o);g&&(c[y]=g)}),c},setFontWeights=(n,o,e,t,c)=>{const p={...n,h1FontWeight:o?600:n.h1FontWeight};return e&&isValidFontWeight("baseFontWeight",e,100,600)&&(p.normal=e,p.semiBold=e+100,p.bold=e+200,p.extrabold=e+300,p.code=e,p.codeBold=e+200,p.codeExtraBold=e+300),t&&isValidFontWeight("codeFontWeight",t,100,600)&&(p.code=t,p.codeBold=t+200,p.codeExtraBold=t+300),c&&c.forEach((h,y)=>{const g=`h${y+1}FontWeight`;isValidFontWeight(`${g} in headingFontWeights`,h,100,900,o)&&(p[g]=h)}),p},validateChartColors=(n,o)=>o.map(e=>parseColor(e,n)).filter(e=>e!==void 0),createEmotionTheme=(n,o=baseTheme)=>{const{colors:e,genericFonts:t,inSidebar:c}=o.emotion,{baseFontSize:p,baseFontWeight:h,baseRadius:y,buttonRadius:g,codeFontSize:$,codeFontWeight:E,showWidgetBorder:A,headingFont:N,headingFontSizes:H,headingFontWeights:Z,bodyFont:X,codeFont:be,showSidebarBorder:we,linkUnderline:$e,chartCategoricalColors:Ce,chartSequentialColors:Ie,...Ne}=n,Fe=Object.entries(Ne).reduce((pt,[wt,Ft])=>{const Ht=parseColor(Ft,wt,c);return Ht&&(pt[wt]=Ht),pt},{}),{secondaryBackgroundColor:Be,backgroundColor:Ge,primaryColor:je,textColor:De,dataframeBorderColor:Ue,dataframeHeaderBackgroundColor:Je,widgetBorderColor:Xe,borderColor:Ke,linkColor:ze,codeTextColor:nt,codeBackgroundColor:ct,redColor:at,orangeColor:dt,yellowColor:Me,blueColor:We,greenColor:tt,violetColor:Ve,grayColor:vt}=Fe,xt={...e,primary:je??e.primary,bodyText:De??e.bodyText,secondaryBg:Be??e.secondaryBg,bgColor:Ge??e.bgColor,redColor:at??e.redColor,orangeColor:dt??e.orangeColor,yellowColor:Me??e.yellowColor,blueColor:We??e.blueColor,greenColor:tt??e.greenColor,violetColor:Ve??e.violetColor,grayColor:vt??e.grayColor,secondary:je??e.primary},Qe={colors:{...createEmotionColors(xt)},showSidebarBorder:we??o.emotion.showSidebarBorder,linkUnderline:$e??o.emotion.linkUnderline,radii:{...o.emotion.radii},fontSizes:{...o.emotion.fontSizes},fontWeights:{...o.emotion.fontWeights}};if(Qe.colors.codeBackgroundColor=ct??e.codeBackgroundColor,Qe.colors.dataframeHeaderBackgroundColor=Je??e.dataframeHeaderBackgroundColor,notNullOrUndefined(Ke)){Qe.colors.borderColor=Ke;const pt=transparentize(Ke,.55);Qe.colors.borderColorLight=pt,Qe.colors.dataframeBorderColor=pt}if(notNullOrUndefined(Ue)&&(Qe.colors.dataframeBorderColor=Ue),(A||Xe)&&(Qe.colors.widgetBorderColor=Xe||Qe.colors.borderColor),Qe.colors=setBackgroundColors(Qe.colors,Fe),Qe.colors=setTextColors(Qe.colors,Fe),Qe.colors.link=ze??Qe.colors.blueTextColor,Qe.colors.codeTextColor=nt??Qe.colors.greenTextColor,notNullOrUndefined(Ce)&&Ce.length>0){const pt=validateChartColors("chartCategoricalColors",Ce);pt.length>0&&(Qe.colors.chartCategoricalColors=pt)}if(notNullOrUndefined(Ie)&&Ie.length>0){const pt=validateChartColors("chartSequentialColors",Ie);pt.length===10?Qe.colors.chartSequentialColors=pt:LOG$h.warn(`Invalid chartSequentialColors: ${Ie.toString()}. Falling back to default chartSequentialColors.`)}if(notNullOrUndefined(y)){const[pt,wt]=parseRadius(y);if(notNullOrUndefined(pt)&&!isNaN(pt)){const Ft=addCssUnit(pt,wt);Qe.radii.default=Ft,Qe.radii.button=Ft,Qe.radii.md=addCssUnit(roundToTwoDecimals(pt*.5),wt),Qe.radii.xl=addCssUnit(roundToTwoDecimals(pt*1.5),wt),Qe.radii.xxl=addCssUnit(roundToTwoDecimals(pt*2),wt)}else LOG$h.warn(`Invalid base radius: ${y}. Falling back to default base radius.`)}if(notNullOrUndefined(g)){const[pt,wt]=parseRadius(g);notNullOrUndefined(pt)&&!isNaN(pt)?Qe.radii.button=addCssUnit(pt,wt):LOG$h.warn(`Invalid button radius: ${g}. Falling back to default button radius.`)}if(p&&p>0&&(Qe.fontSizes.baseFontSize=p),$){const pt=parseFontSize("codeFontSize",$,c);pt&&(Qe.fontSizes.codeFontSize=pt)}Qe.fontSizes=setHeadingFontSizes(Qe.fontSizes,c,Qe.fontSizes.baseFontSize,H),Qe.fontWeights=setFontWeights(o.emotion.fontWeights,c,h,E,Z);const St={...t,bodyFont:X?parseFont(X,fonts.sansSerif):t.bodyFont,codeFont:be?parseFont(be,fonts.monospace):t.codeFont,headingFont:N?parseFont(N,fonts.sansSerif):t.headingFont};return X&&!N&&(St.headingFont=parseFont(X,fonts.sansSerif)),{...o.emotion,genericFonts:St,...Qe}},toThemeInput=n=>{const{colors:o}=n;return{primaryColor:o.primary,backgroundColor:o.bgColor,secondaryBackgroundColor:o.secondaryBg,textColor:o.bodyText,bodyFont:n.genericFonts.bodyFont}},toExportedTheme=n=>{const{colors:o}=n,e=toThemeInput(n);return{primaryColor:e.primaryColor,backgroundColor:e.backgroundColor,secondaryBackgroundColor:e.secondaryBackgroundColor,textColor:e.textColor,bodyFont:e.bodyFont,base:bgColorToBaseString(e.backgroundColor),...computeDerivedColors(o)}},completeThemeInput=(n,o)=>new CustomThemeConfig({...toThemeInput(o.emotion),...n}),createTheme=(n,o,e,t=!1)=>{let c;e?c=completeThemeInput(o,e):o.base===CustomThemeConfig.BaseTheme.DARK?c=completeThemeInput(o,darkTheme):c=completeThemeInput(o,lightTheme);const p=c.backgroundColor,h=merge$1(cloneDeep(e||(getLuminance(p)>.5?lightTheme:darkTheme)),{emotion:{inSidebar:t}}),y=createEmotionTheme(c,h),g=cloneDeep(createBaseUiTheme(y,h.primitives));return{...h,name:n,emotion:y,basewebTheme:g,themeInput:o}},getCachedTheme=()=>{if(!localStorageAvailable())return null;const n=window.localStorage.getItem(LocalStore.ACTIVE_THEME);if(!n)return null;const{name:o,themeInput:e}=JSON.parse(n);switch(o){case lightTheme.name:return getMergedLightTheme();case darkTheme.name:return getMergedDarkTheme();case CUSTOM_THEME_LIGHT_NAME:return{...createTheme(o,e),displayName:"Light"};case CUSTOM_THEME_DARK_NAME:return{...createTheme(o,e),displayName:"Dark"};default:return createTheme(o,e)}},deleteOldCachedThemes=()=>{const{CACHED_THEME_VERSION:n,CACHED_THEME_BASE_KEY:o}=LocalStore,{localStorage:e}=window;e.removeItem("stActiveTheme"),e.removeItem(o);for(let t=1;t<=n;t++)e.removeItem(`${o}-v${t}`)},setCachedTheme=n=>{if(!localStorageAvailable()||(deleteOldCachedThemes(),isLightThemeInQueryParams()||isDarkThemeInQueryParams()))return;const o={name:n.name,...!isPresetTheme(n)&&{themeInput:toThemeInput(n.emotion)}};window.localStorage.setItem(LocalStore.ACTIVE_THEME,JSON.stringify(o))},removeCachedTheme=()=>{localStorageAvailable()&&window.localStorage.removeItem(LocalStore.ACTIVE_THEME)},getHostSpecifiedTheme=()=>isLightThemeInQueryParams()?getMergedLightTheme():isDarkThemeInQueryParams()?getMergedDarkTheme():createAutoTheme(),getDefaultTheme=()=>{const n=getCachedTheme();return n&&n.name!==AUTO_THEME_NAME?n:getHostSpecifiedTheme()},whiteSpace=/\s+/;function computeSpacingStyle(n,o){return n===""?"":n.split(whiteSpace).map(e=>e==="0"?o.spacing.none:e in o.spacing?o.spacing[e]:(LOG$h.error(`Invalid spacing value: ${e}`),o.spacing.none)).join(" ")}function addCssUnit(n,o){return`${n}${o}`}function roundToTwoDecimals(n){return parseFloat(n.toFixed(2))}function blend(n,o){if(o===void 0)return n;const[e,t,c,p]=parseToRgba(n);if(p===1)return n;const[h,y,g,$]=parseToRgba(o),E=p+$*(1-p),A=Math.round((p*e+$*h*(1-p))/E),N=Math.round((p*t+$*y*(1-p))/E),H=Math.round((p*c+$*g*(1-p))/E);return toHex(`rgba(${A}, ${N}, ${H}, ${E})`)}const convertRemToPx=n=>parseFloat(n.replace(/rem$/,""))*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16),skipProtobufDefaults=(n,o)=>{if(o===""||o===null||Array.isArray(o)&&o.length===0)return n},handleSectionInheritance=(n,o)=>{const e=o==="light",t=e?CustomThemeConfig.BaseTheme.LIGHT:CustomThemeConfig.BaseTheme.DARK,{light:c,dark:p,sidebar:h,...y}=n,g=e?c:p,{sidebar:$,...E}=g||{},A=mergeWith({},y,E,{base:t},skipProtobufDefaults);return(h||$)&&(A.sidebar=mergeWith({},h,$,skipProtobufDefaults)),A},hasThemeSectionConfigs=n=>{if(!n)return!1;const o=e=>e==null?!1:Array.isArray(e)?e.length>0:typeof e=="object"?Object.values(e).some(o):!0;return Object.values(n).some(o)},createCustomThemes=n=>{const o=hasThemeSectionConfigs(n.light),e=hasThemeSectionConfigs(n.dark),t=[];if(o||e){const c=handleSectionInheritance(n,"light"),p={...createTheme(CUSTOM_THEME_LIGHT_NAME,c),displayName:"Light"},h=handleSectionInheritance(n,"dark"),y={...createTheme(CUSTOM_THEME_DARK_NAME,h),displayName:"Dark"},$={...getSystemThemePreference()==="dark"?y:p,displayName:AUTO_THEME_NAME,name:CUSTOM_THEME_AUTO_NAME};t.push(p,y,$)}else{const c=createTheme(CUSTOM_THEME_NAME,n);t.push(c)}return t},setSidebarHeadingFontSizes=n=>merge$1([],["1.5rem","1.25rem","1.125rem","1rem","0.875rem","0.75rem"],n||[]),createSidebarTheme=n=>{const o=n.themeInput?.sidebar,{bgColor:e,secondaryBg:t}=n.emotion.colors,c=o?.backgroundColor||t,p=o?.secondaryBackgroundColor||e,h=setSidebarHeadingFontSizes(o?.headingFontSizes);let y=getLuminance(c)>.5?CustomThemeConfig.BaseTheme.LIGHT:CustomThemeConfig.BaseTheme.DARK;n.name===CUSTOM_THEME_LIGHT_NAME?y=CustomThemeConfig.BaseTheme.LIGHT:n.name===CUSTOM_THEME_DARK_NAME&&(y=CustomThemeConfig.BaseTheme.DARK);const g=mergeWith({},n.themeInput,o,{base:y,backgroundColor:c,secondaryBackgroundColor:p,headingFontSizes:h},skipProtobufDefaults);return createTheme("Sidebar",g,void 0,!0)},THEME_MAPPING={[lightTheme.name]:CUSTOM_THEME_LIGHT_NAME,[darkTheme.name]:CUSTOM_THEME_DARK_NAME,[CUSTOM_THEME_LIGHT_NAME]:lightTheme.name,[CUSTOM_THEME_DARK_NAME]:darkTheme.name},mapCachedThemeToAvailableTheme=(n,o)=>{if(!n)return null;const e=o.find(c=>c.name===n.name);if(e)return e;const t=THEME_MAPPING[n.name];return t?o.find(c=>c.name===t)??null:null},isPositiveNumber=n=>typeof n=="number"&&n>=0&&!isNaN(n),isNonZeroPositiveNumber=n=>typeof n=="number"&&n>0&&!isNaN(n),getWidth=(n,o)=>{if(o?.useContainerWidth)return{type:"stretch"};const e=n.widthConfig?.useStretch||o?.widthConfig?.useStretch,t=n?.widthConfig?.useContent||o?.widthConfig?.useContent,c=n?.widthConfig?.pixelWidth||o?.widthConfig?.pixelWidth||n.widthConfig?.pixelWidth===0,p=n.widthConfig?.remWidth;return e?{type:"stretch"}:t?{type:"content"}:p&&isPositiveNumber(n.widthConfig?.remWidth)?{type:"rem",rem:n.widthConfig.remWidth}:c&&isPositiveNumber(n.widthConfig?.pixelWidth)?{type:"pixel",pixels:n.widthConfig.pixelWidth}:c&&isPositiveNumber(o?.widthConfig?.pixelWidth)?{type:"pixel",pixels:o.widthConfig.pixelWidth}:isNonZeroPositiveNumber(o?.width)&&!n.widthConfig?{type:"pixel",pixels:o.width}:{type:"auto"}},getHeight=(n,o)=>{const e=!!n.heightConfig?.useStretch,t=!!n.heightConfig?.useContent,c=!!n.heightConfig?.pixelHeight||n.heightConfig?.pixelHeight===0,p=n.heightConfig?.remHeight;return e?{type:"stretch"}:t?{type:"content"}:p&&isPositiveNumber(n.heightConfig?.remHeight)?{type:"rem",rem:n.heightConfig.remHeight}:c&&isPositiveNumber(n.heightConfig?.pixelHeight)?{type:"pixel",pixels:n.heightConfig.pixelHeight}:isNonZeroPositiveNumber(o?.height)&&!n.heightConfig?{type:"pixel",pixels:o.height}:{type:"auto"}},getFlex=(n,o,e,t)=>{if(e===Direction.HORIZONTAL)switch(n.type){case"pixel":return`0 0 ${n.pixels}px`;case"rem":return`0 0 ${n.rem}rem`;case"content":return"0 0 fit-content";case"stretch":return`1 1 ${t??"fit-content"}`;case"auto":return;default:assertNever(n)}else if(e===Direction.VERTICAL)switch(o.type){case"pixel":return`0 0 ${o.pixels}px`;case"rem":return`0 0 ${o.rem}rem`;case"content":case"stretch":case"auto":return;default:assertNever(o)}},getDirection=n=>n?.direction,calculateMinWidthWithParentConstraint=(n,o,e=32)=>{if(o===void 0||n===void 0||n==="fit-content")return n;const t=convertRemToPx(n);return o<t&&o>e?`${o-e}px`:n},useLayoutStyles=({element:n,subElement:o,styleOverrides:e,minStretchBehavior:t})=>{const c=reactExports.useContext(FlexContext);return reactExports.useMemo(()=>{if(!n)return{width:"auto",height:"auto",overflow:"visible"};const h=getWidth(n,o);let y,g;switch(h.type){case"stretch":y="100%";break;case"rem":y=`${h.rem}rem`;break;case"pixel":y=`${h.pixels}px`;break;case"content":y="fit-content";break;case"auto":y="auto";break;default:assertNever(h)}const $=getDirection(c);c?.isInContentWidthContainer&&h.type==="stretch"&&t!==void 0&&(g=calculateMinWidthWithParentConstraint(t,c?.parentWidth));const E=getHeight(n,o);let A,N="visible";switch(E.type){case"stretch":A="100%";break;case"content":A="auto";break;case"rem":A=`${E.rem}rem`;break;case"pixel":A=`${E.pixels}px`,N="auto";break;case"auto":A="auto";break;default:assertNever(E)}const H=getFlex(h,E,$,t),Z=getTextAlignmentStyle("textAlignmentConfig"in n?n.textAlignmentConfig:void 0);return{...{width:y,height:A,overflow:N,flex:H,minWidth:g,textAlign:Z},...e}},[n,o,e,c,t])};var ScriptRunState=function(n){return n.NOT_RUNNING="notRunning",n.RUNNING="running",n.RERUN_REQUESTED="rerunRequested",n.STOP_REQUESTED="stopRequested",n.COMPILATION_ERROR="compilationError",n}({});const ScriptRunContext=reactExports.createContext({scriptRunState:ScriptRunState.NOT_RUNNING,scriptRunId:"<null>",fragmentIdsThisRun:[]});ScriptRunContext.displayName="ScriptRunContext";var reactPropsRegex$1=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid$1=memoize$1(function(n){return reactPropsRegex$1.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid=memoize$1(function(n){return reactPropsRegex.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function n(o){return o!=="theme"},getDefaultShouldForwardProp=function n(o){return typeof o=="string"&&o.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function n(o,e,t){var c;if(e){var p=e.shouldForwardProp;c=o.__emotion_forwardProp&&p?function(h){return o.__emotion_forwardProp(h)&&p(h)}:p}return typeof c!="function"&&t&&(c=o.__emotion_forwardProp),c},Insertion=function n(o){var e=o.cache,t=o.serialized,c=o.isStringTag;return registerStyles(e,t,c),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(e,t,c)}),null},createStyled=function n(o,e){var t=o.__emotion_real===o,c=t&&o.__emotion_base||o,p,h;e!==void 0&&(p=e.label,h=e.target);var y=composeShouldForwardProps(o,e,t),g=y||getDefaultShouldForwardProp(c),$=!g("as");return function(){var E=arguments,A=t&&o.__emotion_styles!==void 0?o.__emotion_styles.slice(0):[];if(p!==void 0&&A.push("label:"+p+";"),E[0]==null||E[0].raw===void 0)A.push.apply(A,E);else{var N=E[0];A.push(N[0]);for(var H=E.length,Z=1;Z<H;Z++)A.push(E[Z],N[Z])}var X=withEmotionCache(function(be,we,$e){var Ce=$&&be.as||c,Ie="",Ne=[],Fe=be;if(be.theme==null){Fe={};for(var Be in be)Fe[Be]=be[Be];Fe.theme=reactExports.useContext(ThemeContext$2)}typeof be.className=="string"?Ie=getRegisteredStyles(we.registered,Ne,be.className):be.className!=null&&(Ie=be.className+" ");var Ge=serializeStyles(A.concat(Ne),we.registered,Fe);Ie+=we.key+"-"+Ge.name,h!==void 0&&(Ie+=" "+h);var je=$&&y===void 0?getDefaultShouldForwardProp(Ce):g,De={};for(var Ue in be)$&&Ue==="as"||je(Ue)&&(De[Ue]=be[Ue]);return De.className=Ie,$e&&(De.ref=$e),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:we,serialized:Ge,isStringTag:typeof Ce=="string"}),reactExports.createElement(Ce,De))});return X.displayName=p!==void 0?p:"Styled("+(typeof c=="string"?c:c.displayName||c.name||"Component")+")",X.defaultProps=o.defaultProps,X.__emotion_real=X,X.__emotion_base=c,X.__emotion_styles=A,X.__emotion_forwardProp=y,Object.defineProperty(X,"toString",{value:function(){return"."+h}}),X.withComponent=function(be,we){var $e=n(be,_extends$C({},e,we,{shouldForwardProp:composeShouldForwardProps(X,we,!0)}));return $e.apply(void 0,A)},X}},tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],styled=createStyled.bind(null);tags.forEach(function(n){styled[n]=styled(n)});var SIZE$3={medium:"medium"},spin={from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},StyledSpinner=styled$1("i",function(n){var o=n.$theme,e=n.$color,t=e===void 0?o.colors.contentAccent:e,c=n.$borderWidth,p=n.$size,h=p===void 0?SIZE$3.medium:p,y={large:o.sizing.scale300,medium:o.sizing.scale100,small:o.sizing.scale0}[c||h],g={large:o.sizing.scale1000,medium:o.sizing.scale900,small:o.sizing.scale800}[h];return y||(y=o.sizing[c],y||(y="".concat(parseInt(c),"px"))),g||(g=o.sizing[h],g||(g="".concat(parseInt(h),"px"))),{display:"block",animationName:spin,animationDuration:o.animation.timing1000,animationIterationCount:"infinite",animationTimingFunction:"linear",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderRadius:"50%",borderTopColor:t,borderRightColor:o.colors.backgroundTertiary,borderBottomColor:o.colors.backgroundTertiary,borderLeftColor:o.colors.backgroundTertiary,borderLeftWidth:y,borderRightWidth:y,borderTopWidth:y,borderBottomWidth:y,width:g,height:g,cursor:"wait"}});StyledSpinner.displayName="StyledSpinner";StyledSpinner.displayName="StyledSpinner";const StyledSpinnerIcon=styled(StyledSpinner,{shouldForwardProp:n=>isPropValid$1(n)&&!["size"].includes(n),target:"e1ob5mq00"})(({size:n="lg",margin:o="",padding:e="",theme:t})=>{const c=`calc(${t.iconSizes[n]} * 0.80)`;return{width:c,height:c,fontSize:c,justifyContents:"center",margin:computeSpacingStyle(o,t),padding:computeSpacingStyle(e,t),borderColor:t.colors.fadedText10,borderTopColor:t.colors.bodyText,borderWidth:t.sizes.spinnerThickness,flexGrow:0,flexShrink:0}}),StyledIcon=styled("span",{shouldForwardProp:n=>isPropValid$1(n)&&!["size","as"].includes(n),target:"e1ob5mq01"})(({color:n,size:o,margin:e,padding:t,theme:c})=>({color:n||"inherit",fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:c.iconSizes[o],width:c.iconSizes[o],height:c.iconSizes[o],margin:computeSpacingStyle(e,c),padding:computeSpacingStyle(t,c),flexShrink:0})),StyledDynamicIcon=styled("span",{target:"e1ob5mq02"})(({size:n="lg",margin:o="",padding:e="",theme:t})=>({fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:t.iconSizes[n],width:t.iconSizes[n],height:t.iconSizes[n],margin:computeSpacingStyle(o,t),padding:computeSpacingStyle(e,t),flexShrink:0})),StyledImageIcon=styled("img",{target:"e1ob5mq03"})({width:"100%",height:"100%"}),StyledEmojiIcon=styled("span",{target:"e1ob5mq04"})(({size:n,margin:o,padding:e,theme:t,color:c})=>{const p=`calc(${t.iconSizes[n]} * 0.90)`;return{display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:p,width:p,height:p,margin:computeSpacingStyle(o,t),padding:computeSpacingStyle(e,t),color:c}}),getDefaultProps$1=({size:n,margin:o,padding:e,color:t})=>({size:n||"md",margin:o||"",padding:e||"",color:t||void 0}),Icon$2=({content:n,color:o,size:e,margin:t,padding:c,testid:p})=>jsx$1(StyledIcon,{as:n,"aria-hidden":"true","data-testid":p,...getDefaultProps$1({size:e,margin:t,padding:c,color:o})}),EmojiIcon=({size:n,margin:o,padding:e,children:t,color:c,testid:p})=>(typeof t=="string"&&(t=t.replace(/^emoji:/,"")),jsx$1(StyledEmojiIcon,{"data-testid":p||"stIconEmoji","aria-hidden":"true",...getDefaultProps$1({size:n,margin:o,padding:e,color:c}),children:t})),StyledMaterialIcon=styled("span",{target:"ejhh0er0"})(({size:n,margin:o,padding:e,theme:t,color:c})=>({display:"inline-flex",alignItems:"center",justifyContents:"center",color:c,fontSize:t.iconSizes[n],width:t.iconSizes[n],height:t.iconSizes[n],margin:computeSpacingStyle(o,t),padding:computeSpacingStyle(e,t),userSelect:"none",fontFamily:t.genericFonts.iconFont,fontWeight:t.fontWeights.normal,fontStyle:"normal",lineHeight:t.lineHeights.none,letterSpacing:"normal",textTransform:"none",whiteSpace:"nowrap",wordWrap:"normal",direction:"ltr",fontFeatureSettings:"liga",MozFontFeatureSettings:"liga",WebkitFontFeatureSettings:"liga",WebkitFontSmoothing:"antialiased"})),getDefaultProps=({size:n,margin:o,padding:e,color:t})=>({size:n||"md",margin:o||"",padding:e||"",color:t||"inherit"}),MaterialFontIcon=({iconName:n,...o})=>jsx$1(StyledMaterialIcon,{...getDefaultProps(o),"data-testid":o.testid||"stIconMaterial",translate:"no",children:n});function parseIconPackEntry(n){const o=n.match(/^:(.+)\/(.+):$/);if(o===null)return{pack:"emoji",icon:n};const e=o[1],t=o[2];return{pack:e,icon:t}}function isMaterialIcon(n){if(!n)return!1;const o=parseIconPackEntry(n);return o.pack==="material"&&o.icon!==""}function getFilledStarIconSrc(){return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTg2MF84NDMpIj48cGF0aCBkPSJNOS45OTk5NCAxNC4zOTE2TDEzLjQ1ODMgMTYuNDgzM0MxNC4wOTE2IDE2Ljg2NjYgMTQuODY2NiAxNi4zIDE0LjY5OTkgMTUuNTgzM0wxMy43ODMzIDExLjY1TDE2Ljg0MTYgOC45OTk5N0MxNy4zOTk5IDguNTE2NjMgMTcuMDk5OSA3LjU5OTk3IDE2LjM2NjYgNy41NDE2M0wxMi4zNDE2IDcuMTk5OTdMMTAuNzY2NiAzLjQ4MzNDMTAuNDgzMyAyLjgwODMgOS41MTY2MSAyLjgwODMgOS4yMzMyNyAzLjQ4MzNMNy42NTgyNyA3LjE5MTYzTDMuNjMzMjcgNy41MzMzQzIuODk5OTQgNy41OTE2MyAyLjU5OTk0IDguNTA4MyAzLjE1ODI3IDguOTkxNjNMNi4yMTY2MSAxMS42NDE2TDUuMjk5OTQgMTUuNTc1QzUuMTMzMjcgMTYuMjkxNiA1LjkwODI3IDE2Ljg1ODMgNi41NDE2MSAxNi40NzVMOS45OTk5NCAxNC4zOTE2WiIgZmlsbD0iI0ZBQ0EyQiIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwXzE4NjBfODQzIj48cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9IndoaXRlIi8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+"}const DynamicIconDispatcher=({iconValue:n,...o})=>{if(n==="spinner")return jsx$1(StyledDynamicIcon,{...o,children:jsx$1(StyledSpinnerIcon,{"data-testid":o.testid||"stSpinnerIcon",...o})});const{pack:e,icon:t}=parseIconPackEntry(n);switch(e){case"material":switch(t){case"star_filled":return jsx$1(StyledDynamicIcon,{...o,children:jsx$1(StyledImageIcon,{src:getFilledStarIconSrc(),"data-testid":o.testid||"stImageIcon"})});default:return jsx$1(StyledDynamicIcon,{...o,children:jsx$1(MaterialFontIcon,{pack:e,iconName:t,...o})})}case"emoji":default:return jsx$1(StyledDynamicIcon,{...o,children:jsx$1(EmojiIcon,{...o,children:t})})}},DynamicIcon=n=>jsx$1(reactExports.Suspense,{fallback:jsx$1(StyledDynamicIcon,{...n,children:jsx$1(EmojiIcon,{...n,children:" "})}),children:jsx$1(DynamicIconDispatcher,{...n})},n.iconValue),LibConfigContext=reactExports.createContext({locale:window.navigator.language,mapboxToken:void 0,enforceDownloadInNewTab:void 0,resourceCrossOriginMode:void 0});LibConfigContext.displayName="LibConfigContext";var Pe=Object.defineProperty,a$1=(n,o)=>Pe(n,"name",{value:o,configurable:!0}),P=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(n,o,e,t,c,p){this.type=n,this.name=o,this.prefix=e,this.value=t,this.suffix=c,this.modifier=p}hasCustomName(){return this.name!==""&&typeof this.name!="number"}};a$1(P,"Part");var Re=/[$_\p{ID_Start}]/u,Ee=/[$_\u200C\u200D\p{ID_Continue}]/u,v=".*";function Oe(n,o){return(o?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(n)}a$1(Oe,"isASCII");function D(n,o=!1){let e=[],t=0;for(;t<n.length;){let c=n[t],p=a$1(function(h){if(!o)throw new TypeError(h);e.push({type:"INVALID_CHAR",index:t,value:n[t++]})},"ErrorOrInvalid");if(c==="*"){e.push({type:"ASTERISK",index:t,value:n[t++]});continue}if(c==="+"||c==="?"){e.push({type:"OTHER_MODIFIER",index:t,value:n[t++]});continue}if(c==="\\"){e.push({type:"ESCAPED_CHAR",index:t++,value:n[t++]});continue}if(c==="{"){e.push({type:"OPEN",index:t,value:n[t++]});continue}if(c==="}"){e.push({type:"CLOSE",index:t,value:n[t++]});continue}if(c===":"){let h="",y=t+1;for(;y<n.length;){let g=n.substr(y,1);if(y===t+1&&Re.test(g)||y!==t+1&&Ee.test(g)){h+=n[y++];continue}break}if(!h){p(`Missing parameter name at ${t}`);continue}e.push({type:"NAME",index:t,value:h}),t=y;continue}if(c==="("){let h=1,y="",g=t+1,$=!1;if(n[g]==="?"){p(`Pattern cannot start with "?" at ${g}`);continue}for(;g<n.length;){if(!Oe(n[g],!1)){p(`Invalid character '${n[g]}' at ${g}.`),$=!0;break}if(n[g]==="\\"){y+=n[g++]+n[g++];continue}if(n[g]===")"){if(h--,h===0){g++;break}}else if(n[g]==="("&&(h++,n[g+1]!=="?")){p(`Capturing groups are not allowed at ${g}`),$=!0;break}y+=n[g++]}if($)continue;if(h){p(`Unbalanced pattern at ${t}`);continue}if(!y){p(`Missing pattern at ${t}`);continue}e.push({type:"REGEX",index:t,value:y}),t=g;continue}e.push({type:"CHAR",index:t,value:n[t++]})}return e.push({type:"END",index:t,value:""}),e}a$1(D,"lexer");function F(n,o={}){let e=D(n);o.delimiter??="/#?",o.prefixes??="./";let t=`[^${x(o.delimiter)}]+?`,c=[],p=0,h=0,y=new Set,g=a$1($e=>{if(h<e.length&&e[h].type===$e)return e[h++].value},"tryConsume"),$=a$1(()=>g("OTHER_MODIFIER")??g("ASTERISK"),"tryConsumeModifier"),E=a$1($e=>{let Ce=g($e);if(Ce!==void 0)return Ce;let{type:Ie,index:Ne}=e[h];throw new TypeError(`Unexpected ${Ie} at ${Ne}, expected ${$e}`)},"mustConsume"),A=a$1(()=>{let $e="",Ce;for(;Ce=g("CHAR")??g("ESCAPED_CHAR");)$e+=Ce;return $e},"consumeText"),N=a$1($e=>$e,"DefaultEncodePart"),H=o.encodePart||N,Z="",X=a$1($e=>{Z+=$e},"appendToPendingFixedValue"),be=a$1(()=>{Z.length&&(c.push(new P(3,"","",H(Z),"",3)),Z="")},"maybeAddPartFromPendingFixedValue"),we=a$1(($e,Ce,Ie,Ne,Fe)=>{let Be=3;switch(Fe){case"?":Be=1;break;case"*":Be=0;break;case"+":Be=2;break}if(!Ce&&!Ie&&Be===3){X($e);return}if(be(),!Ce&&!Ie){if(!$e)return;c.push(new P(3,"","",H($e),"",Be));return}let Ge;Ie?Ie==="*"?Ge=v:Ge=Ie:Ge=t;let je=2;Ge===t?(je=1,Ge=""):Ge===v&&(je=0,Ge="");let De;if(Ce?De=Ce:Ie&&(De=p++),y.has(De))throw new TypeError(`Duplicate name '${De}'.`);y.add(De),c.push(new P(je,De,H($e),Ge,H(Ne),Be))},"addPart");for(;h<e.length;){let $e=g("CHAR"),Ce=g("NAME"),Ie=g("REGEX");if(!Ce&&!Ie&&(Ie=g("ASTERISK")),Ce||Ie){let Fe=$e??"";o.prefixes.indexOf(Fe)===-1&&(X(Fe),Fe=""),be();let Be=$();we(Fe,Ce,Ie,"",Be);continue}let Ne=$e??g("ESCAPED_CHAR");if(Ne){X(Ne);continue}if(g("OPEN")){let Fe=A(),Be=g("NAME"),Ge=g("REGEX");!Be&&!Ge&&(Ge=g("ASTERISK"));let je=A();E("CLOSE");let De=$();we(Fe,Be,Ge,je,De);continue}be(),E("END")}return c}a$1(F,"parse");function x(n){return n.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}a$1(x,"escapeString");function B(n){return n&&n.ignoreCase?"ui":"u"}a$1(B,"flags");function q(n,o,e){return W(F(n,e),o,e)}a$1(q,"stringToRegexp");function T(n){switch(n){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}a$1(T,"modifierToString");function W(n,o,e={}){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=!1,e.strict??=!1,e.end??=!0,e.start??=!0,e.endsWith="";let t=e.start?"^":"";for(let y of n){if(y.type===3){y.modifier===3?t+=x(y.value):t+=`(?:${x(y.value)})${T(y.modifier)}`;continue}o&&o.push(y.name);let g=`[^${x(e.delimiter)}]+?`,$=y.value;if(y.type===1?$=g:y.type===0&&($=v),!y.prefix.length&&!y.suffix.length){y.modifier===3||y.modifier===1?t+=`(${$})${T(y.modifier)}`:t+=`((?:${$})${T(y.modifier)})`;continue}if(y.modifier===3||y.modifier===1){t+=`(?:${x(y.prefix)}(${$})${x(y.suffix)})`,t+=T(y.modifier);continue}t+=`(?:${x(y.prefix)}`,t+=`((?:${$})(?:`,t+=x(y.suffix),t+=x(y.prefix),t+=`(?:${$}))*)${x(y.suffix)})`,y.modifier===0&&(t+="?")}let c=`[${x(e.endsWith)}]|$`,p=`[${x(e.delimiter)}]`;if(e.end)return e.strict||(t+=`${p}?`),e.endsWith.length?t+=`(?=${c})`:t+="$",new RegExp(t,B(e));e.strict||(t+=`(?:${p}(?=${c}))?`);let h=!1;if(n.length){let y=n[n.length-1];y.type===3&&y.modifier===3&&(h=e.delimiter.indexOf(y)>-1)}return h||(t+=`(?=${p}|${c})`),new RegExp(t,B(e))}a$1(W,"partsToRegexp");var b={delimiter:"",prefixes:"",sensitive:!0,strict:!0},J={delimiter:".",prefixes:"",sensitive:!0,strict:!0},Q={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function ee(n,o){return n.length?n[0]==="/"?!0:!o||n.length<2?!1:(n[0]=="\\"||n[0]=="{")&&n[1]=="/":!1}a$1(ee,"isAbsolutePathname");function te(n,o){return n.startsWith(o)?n.substring(o.length,n.length):n}a$1(te,"maybeStripPrefix");function ke(n,o){return n.endsWith(o)?n.substr(0,n.length-o.length):n}a$1(ke,"maybeStripSuffix");function _(n){return!n||n.length<2?!1:n[0]==="["||(n[0]==="\\"||n[0]==="{")&&n[1]==="["}a$1(_,"treatAsIPv6Hostname");var re$1=["ftp","file","http","https","ws","wss"];function U(n){if(!n)return!0;for(let o of re$1)if(n.test(o))return!0;return!1}a$1(U,"isSpecialScheme");function ne(n,o){if(n=te(n,"#"),o||n==="")return n;let e=new URL("https://example.com");return e.hash=n,e.hash?e.hash.substring(1,e.hash.length):""}a$1(ne,"canonicalizeHash");function se(n,o){if(n=te(n,"?"),o||n==="")return n;let e=new URL("https://example.com");return e.search=n,e.search?e.search.substring(1,e.search.length):""}a$1(se,"canonicalizeSearch");function ie(n,o){return o||n===""?n:_(n)?K(n):j(n)}a$1(ie,"canonicalizeHostname");function ae(n,o){if(o||n==="")return n;let e=new URL("https://example.com");return e.password=n,e.password}a$1(ae,"canonicalizePassword");function oe(n,o){if(o||n==="")return n;let e=new URL("https://example.com");return e.username=n,e.username}a$1(oe,"canonicalizeUsername");function ce(n,o,e){if(e||n==="")return n;if(o&&!re$1.includes(o))return new URL(`${o}:${n}`).pathname;let t=n[0]=="/";return n=new URL(t?n:"/-"+n,"https://example.com").pathname,t||(n=n.substring(2,n.length)),n}a$1(ce,"canonicalizePathname");function le(n,o,e){return z(o)===n&&(n=""),e||n===""?n:G(n)}a$1(le,"canonicalizePort");function fe(n,o){return n=ke(n,":"),o||n===""?n:w(n)}a$1(fe,"canonicalizeProtocol");function z(n){switch(n){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}a$1(z,"defaultPortForProtocol");function w(n){if(n==="")return n;if(/^[-+.A-Za-z0-9]*$/.test(n))return n.toLowerCase();throw new TypeError(`Invalid protocol '${n}'.`)}a$1(w,"protocolEncodeCallback");function he(n){if(n==="")return n;let o=new URL("https://example.com");return o.username=n,o.username}a$1(he,"usernameEncodeCallback");function ue(n){if(n==="")return n;let o=new URL("https://example.com");return o.password=n,o.password}a$1(ue,"passwordEncodeCallback");function j(n){if(n==="")return n;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(n))throw new TypeError(`Invalid hostname '${n}'`);let o=new URL("https://example.com");return o.hostname=n,o.hostname}a$1(j,"hostnameEncodeCallback");function K(n){if(n==="")return n;if(/[^0-9a-fA-F[\]:]/g.test(n))throw new TypeError(`Invalid IPv6 hostname '${n}'`);return n.toLowerCase()}a$1(K,"ipv6HostnameEncodeCallback");function G(n){if(n===""||/^[0-9]*$/.test(n)&&parseInt(n)<=65535)return n;throw new TypeError(`Invalid port '${n}'.`)}a$1(G,"portEncodeCallback");function de(n){if(n==="")return n;let o=new URL("https://example.com");return o.pathname=n[0]!=="/"?"/-"+n:n,n[0]!=="/"?o.pathname.substring(2,o.pathname.length):o.pathname}a$1(de,"standardURLPathnameEncodeCallback");function pe(n){return n===""?n:new URL(`data:${n}`).pathname}a$1(pe,"pathURLPathnameEncodeCallback");function ge(n){if(n==="")return n;let o=new URL("https://example.com");return o.search=n,o.search.substring(1,o.search.length)}a$1(ge,"searchEncodeCallback");function me(n){if(n==="")return n;let o=new URL("https://example.com");return o.hash=n,o.hash.substring(1,o.hash.length)}a$1(me,"hashEncodeCallback");var C=class{#o;#r=[];#t={};#e=0;#i=1;#u=0;#l=0;#p=0;#h=0;#y=!1;constructor(n){this.#o=n}get result(){return this.#t}parse(){for(this.#r=D(this.#o,!0);this.#e<this.#r.length;this.#e+=this.#i){if(this.#i=1,this.#r[this.#e].type==="END"){if(this.#l===0){this.#v(),this.#c()?this.#n(9,1):this.#d()?this.#n(8,1):this.#n(7,0);continue}else if(this.#l===2){this.#f(5);continue}this.#n(10,0);break}if(this.#p>0)if(this.#T())this.#p-=1;else continue;if(this.#x()){this.#p+=1;continue}switch(this.#l){case 0:this.#S()&&this.#f(1);break;case 1:if(this.#S()){this.#E();let n=7,o=1;this.#w()?(n=2,o=3):this.#y&&(n=2),this.#n(n,o)}break;case 2:this.#m()?this.#f(3):(this.#b()||this.#d()||this.#c())&&this.#f(5);break;case 3:this.#_()?this.#n(4,1):this.#m()&&this.#n(5,1);break;case 4:this.#m()&&this.#n(5,1);break;case 5:this.#C()?this.#h+=1:this.#k()&&(this.#h-=1),this.#$()&&!this.#h?this.#n(6,1):this.#b()?this.#n(7,0):this.#d()?this.#n(8,1):this.#c()&&this.#n(9,1);break;case 6:this.#b()?this.#n(7,0):this.#d()?this.#n(8,1):this.#c()&&this.#n(9,1);break;case 7:this.#d()?this.#n(8,1):this.#c()&&this.#n(9,1);break;case 8:this.#c()&&this.#n(9,1);break}}this.#t.hostname!==void 0&&this.#t.port===void 0&&(this.#t.port="")}#n(n,o){switch(this.#l){case 0:break;case 1:this.#t.protocol=this.#s();break;case 2:break;case 3:this.#t.username=this.#s();break;case 4:this.#t.password=this.#s();break;case 5:this.#t.hostname=this.#s();break;case 6:this.#t.port=this.#s();break;case 7:this.#t.pathname=this.#s();break;case 8:this.#t.search=this.#s();break;case 9:this.#t.hash=this.#s();break}this.#l!==0&&n!==10&&([1,2,3,4].includes(this.#l)&&[6,7,8,9].includes(n)&&(this.#t.hostname??=""),[1,2,3,4,5,6].includes(this.#l)&&[8,9].includes(n)&&(this.#t.pathname??=this.#y?"/":""),[1,2,3,4,5,6,7].includes(this.#l)&&n===9&&(this.#t.search??="")),this.#O(n,o)}#O(n,o){this.#l=n,this.#u=this.#e+o,this.#e+=o,this.#i=0}#v(){this.#e=this.#u,this.#i=0}#f(n){this.#v(),this.#l=n}#g(n){return n<0&&(n=this.#r.length-n),n<this.#r.length?this.#r[n]:this.#r[this.#r.length-1]}#a(n,o){let e=this.#g(n);return e.value===o&&(e.type==="CHAR"||e.type==="ESCAPED_CHAR"||e.type==="INVALID_CHAR")}#S(){return this.#a(this.#e,":")}#w(){return this.#a(this.#e+1,"/")&&this.#a(this.#e+2,"/")}#m(){return this.#a(this.#e,"@")}#_(){return this.#a(this.#e,":")}#$(){return this.#a(this.#e,":")}#b(){return this.#a(this.#e,"/")}#d(){if(this.#a(this.#e,"?"))return!0;if(this.#r[this.#e].value!=="?")return!1;let n=this.#g(this.#e-1);return n.type!=="NAME"&&n.type!=="REGEX"&&n.type!=="CLOSE"&&n.type!=="ASTERISK"}#c(){return this.#a(this.#e,"#")}#x(){return this.#r[this.#e].type=="OPEN"}#T(){return this.#r[this.#e].type=="CLOSE"}#C(){return this.#a(this.#e,"[")}#k(){return this.#a(this.#e,"]")}#s(){let n=this.#r[this.#e],o=this.#g(this.#u).index;return this.#o.substring(o,n.index)}#E(){let n={};Object.assign(n,b),n.encodePart=w;let o=q(this.#s(),void 0,n);this.#y=U(o)}};a$1(C,"Parser");var V=["protocol","username","password","hostname","port","pathname","search","hash"],O="*";function Se(n,o){if(typeof n!="string")throw new TypeError("parameter 1 is not of type 'string'.");let e=new URL(n,o);return{protocol:e.protocol.substring(0,e.protocol.length-1),username:e.username,password:e.password,hostname:e.hostname,port:e.port,pathname:e.pathname,search:e.search!==""?e.search.substring(1,e.search.length):void 0,hash:e.hash!==""?e.hash.substring(1,e.hash.length):void 0}}a$1(Se,"extractValues");function R(n,o){return o?I(n):n}a$1(R,"processBaseURLString");function L(n,o,e){let t;if(typeof o.baseURL=="string")try{t=new URL(o.baseURL),o.protocol===void 0&&(n.protocol=R(t.protocol.substring(0,t.protocol.length-1),e)),!e&&o.protocol===void 0&&o.hostname===void 0&&o.port===void 0&&o.username===void 0&&(n.username=R(t.username,e)),!e&&o.protocol===void 0&&o.hostname===void 0&&o.port===void 0&&o.username===void 0&&o.password===void 0&&(n.password=R(t.password,e)),o.protocol===void 0&&o.hostname===void 0&&(n.hostname=R(t.hostname,e)),o.protocol===void 0&&o.hostname===void 0&&o.port===void 0&&(n.port=R(t.port,e)),o.protocol===void 0&&o.hostname===void 0&&o.port===void 0&&o.pathname===void 0&&(n.pathname=R(t.pathname,e)),o.protocol===void 0&&o.hostname===void 0&&o.port===void 0&&o.pathname===void 0&&o.search===void 0&&(n.search=R(t.search.substring(1,t.search.length),e)),o.protocol===void 0&&o.hostname===void 0&&o.port===void 0&&o.pathname===void 0&&o.search===void 0&&o.hash===void 0&&(n.hash=R(t.hash.substring(1,t.hash.length),e))}catch{throw new TypeError(`invalid baseURL '${o.baseURL}'.`)}if(typeof o.protocol=="string"&&(n.protocol=fe(o.protocol,e)),typeof o.username=="string"&&(n.username=oe(o.username,e)),typeof o.password=="string"&&(n.password=ae(o.password,e)),typeof o.hostname=="string"&&(n.hostname=ie(o.hostname,e)),typeof o.port=="string"&&(n.port=le(o.port,n.protocol,e)),typeof o.pathname=="string"){if(n.pathname=o.pathname,t&&!ee(n.pathname,e)){let c=t.pathname.lastIndexOf("/");c>=0&&(n.pathname=R(t.pathname.substring(0,c+1),e)+n.pathname)}n.pathname=ce(n.pathname,n.protocol,e)}return typeof o.search=="string"&&(n.search=se(o.search,e)),typeof o.hash=="string"&&(n.hash=ne(o.hash,e)),n}a$1(L,"applyInit");function I(n){return n.replace(/([+*?:{}()\\])/g,"\\$1")}a$1(I,"escapePatternString");function Te(n){return n.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}a$1(Te,"escapeRegexpString");function Ae(n,o){o.delimiter??="/#?",o.prefixes??="./",o.sensitive??=!1,o.strict??=!1,o.end??=!0,o.start??=!0,o.endsWith="";let e=".*",t=`[^${Te(o.delimiter)}]+?`,c=/[$_\u200C\u200D\p{ID_Continue}]/u,p="";for(let h=0;h<n.length;++h){let y=n[h];if(y.type===3){if(y.modifier===3){p+=I(y.value);continue}p+=`{${I(y.value)}}${T(y.modifier)}`;continue}let g=y.hasCustomName(),$=!!y.suffix.length||!!y.prefix.length&&(y.prefix.length!==1||!o.prefixes.includes(y.prefix)),E=h>0?n[h-1]:null,A=h<n.length-1?n[h+1]:null;if(!$&&g&&y.type===1&&y.modifier===3&&A&&!A.prefix.length&&!A.suffix.length)if(A.type===3){let N=A.value.length>0?A.value[0]:"";$=c.test(N)}else $=!A.hasCustomName();if(!$&&!y.prefix.length&&E&&E.type===3){let N=E.value[E.value.length-1];$=o.prefixes.includes(N)}$&&(p+="{"),p+=I(y.prefix),g&&(p+=`:${y.name}`),y.type===2?p+=`(${y.value})`:y.type===1?g||(p+=`(${t})`):y.type===0&&(!g&&(!E||E.type===3||E.modifier!==3||$||y.prefix!=="")?p+="*":p+=`(${e})`),y.type===1&&g&&y.suffix.length&&c.test(y.suffix[0])&&(p+="\\"),p+=I(y.suffix),$&&(p+="}"),y.modifier!==3&&(p+=T(y.modifier))}return p}a$1(Ae,"partsToPattern");var Y=class{#o;#r={};#t={};#e={};#i={};#u=!1;constructor(n={},o,e){try{let t;if(typeof o=="string"?t=o:e=o,typeof n=="string"){let y=new C(n);if(y.parse(),n=y.result,t===void 0&&typeof n.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");n.baseURL=t}else{if(!n||typeof n!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(t)throw new TypeError("parameter 1 is not of type 'string'.")}typeof e>"u"&&(e={ignoreCase:!1});let c={ignoreCase:e.ignoreCase===!0},p={pathname:O,protocol:O,username:O,password:O,hostname:O,port:O,search:O,hash:O};this.#o=L(p,n,!0),z(this.#o.protocol)===this.#o.port&&(this.#o.port="");let h;for(h of V){if(!(h in this.#o))continue;let y={},g=this.#o[h];switch(this.#t[h]=[],h){case"protocol":Object.assign(y,b),y.encodePart=w;break;case"username":Object.assign(y,b),y.encodePart=he;break;case"password":Object.assign(y,b),y.encodePart=ue;break;case"hostname":Object.assign(y,J),_(g)?y.encodePart=K:y.encodePart=j;break;case"port":Object.assign(y,b),y.encodePart=G;break;case"pathname":U(this.#r.protocol)?(Object.assign(y,Q,c),y.encodePart=de):(Object.assign(y,b,c),y.encodePart=pe);break;case"search":Object.assign(y,b,c),y.encodePart=ge;break;case"hash":Object.assign(y,b,c),y.encodePart=me;break}try{this.#i[h]=F(g,y),this.#r[h]=W(this.#i[h],this.#t[h],y),this.#e[h]=Ae(this.#i[h],y),this.#u=this.#u||this.#i[h].some($=>$.type===2)}catch{throw new TypeError(`invalid ${h} pattern '${this.#o[h]}'.`)}}}catch(t){throw new TypeError(`Failed to construct 'URLPattern': ${t.message}`)}}get[Symbol.toStringTag](){return"URLPattern"}test(n={},o){let e={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof n!="string"&&o)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof n>"u")return!1;try{typeof n=="object"?e=L(e,n,!1):e=L(e,Se(n,o),!1)}catch{return!1}let t;for(t of V)if(!this.#r[t].exec(e[t]))return!1;return!0}exec(n={},o){let e={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof n!="string"&&o)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof n>"u")return;try{typeof n=="object"?e=L(e,n,!1):e=L(e,Se(n,o),!1)}catch{return null}let t={};o?t.inputs=[n,o]:t.inputs=[n];let c;for(c of V){let p=this.#r[c].exec(e[c]);if(!p)return null;let h={};for(let[y,g]of this.#t[c].entries())if(typeof g=="string"||typeof g=="number"){let $=p[y+1];h[g]=$}t[c]={input:e[c]??"",groups:h}}return t}static compareComponent(n,o,e){let t=a$1((y,g)=>{for(let $ of["type","modifier","prefix","value","suffix"]){if(y[$]<g[$])return-1;if(y[$]!==g[$])return 1}return 0},"comparePart"),c=new P(3,"","","","",3),p=new P(0,"","","","",3),h=a$1((y,g)=>{let $=0;for(;$<Math.min(y.length,g.length);++$){let E=t(y[$],g[$]);if(E)return E}return y.length===g.length?0:t(y[$]??c,g[$]??c)},"comparePartList");return!o.#e[n]&&!e.#e[n]?0:o.#e[n]&&!e.#e[n]?h(o.#i[n],[p]):!o.#e[n]&&e.#e[n]?h([p],e.#i[n]):h(o.#i[n],e.#i[n])}get protocol(){return this.#e.protocol}get username(){return this.#e.username}get password(){return this.#e.password}get hostname(){return this.#e.hostname}get port(){return this.#e.port}get pathname(){return this.#e.pathname}get search(){return this.#e.search}get hash(){return this.#e.hash}get hasRegExpGroups(){return this.#u}};a$1(Y,"URLPattern");globalThis.URLPattern||(globalThis.URLPattern=Y);function isValidOrigin(n,o){let e,t,c;try{e=new URLPattern(n),t=new URLPattern({protocol:e.protocol,hostname:e.hostname}),c=new URL(o)}catch{return!1}return c.hostname==="localhost"&&t.test(c)?!0:e.test(c)}function getCrossOriginAttribute(n,o){if(o)try{const e=new URL(o);return window.__streamlit?.BACKEND_BASE_URL&&e.origin===new URL(window.__streamlit?.BACKEND_BASE_URL).origin?n:void 0}catch{return window.__streamlit?.BACKEND_BASE_URL?n:void 0}}const useCrossOriginAttribute=n=>{const{resourceCrossOriginMode:o}=reactExports.useContext(LibConfigContext);if(n)return getCrossOriginAttribute(o,n)},useEmotionTheme=()=>useTheme(),StyledChatMessageContainer=styled("div",{target:"e1ypd8m70"})(({theme:n,background:o})=>{const e=hasLightBackgroundColor(n);return{width:"100%",display:"flex",alignItems:"flex-start",gap:n.spacing.sm,padding:n.spacing.lg,paddingRight:o?n.spacing.lg:0,borderRadius:n.radii.default,...o?{backgroundColor:transparentize(e?n.colors.gray20:n.colors.gray90,.5)}:{}}}),StyledMessageContent=styled("div",{target:"e1ypd8m71"})(({theme:n})=>({color:n.colors.bodyText,margin:"auto",flexGrow:1,minWidth:0})),StyledAvatarBackground=styled("div",{target:"e1ypd8m72"})(({theme:n})=>{const o=hasLightBackgroundColor(n);return{display:"flex",border:`${n.sizes.borderWidth} solid ${o?n.colors.gray40:n.colors.gray85}`,backgroundColor:o?n.colors.white:n.colors.gray100,color:o?n.colors.gray90:n.colors.white,lineHeight:n.lineHeights.none,fontSize:n.fontSizes.md,flexShrink:0,width:n.sizes.chatAvatarSize,height:n.sizes.chatAvatarSize,borderRadius:n.radii.default,alignItems:"center",justifyContent:"center"}}),StyledAvatarIcon=styled("div",{target:"e1ypd8m73"})(({theme:n,background:o})=>{const e=hasLightBackgroundColor(n);return{display:"flex",width:n.sizes.chatAvatarSize,height:n.sizes.chatAvatarSize,flexShrink:0,borderRadius:n.radii.default,alignItems:"center",justifyContent:"center",backgroundColor:o,color:e?n.colors.white:n.colors.gray100}}),StyledAvatarImage=styled("img",{target:"e1ypd8m74"})(({theme:n})=>({width:n.sizes.chatAvatarSize,height:n.sizes.chatAvatarSize,flexShrink:0,borderRadius:n.radii.default,objectFit:"cover",display:"flex"}));function ChatMessageAvatar(n){const{avatar:o,avatarType:e,name:t,endpoints:c}=n,p=useEmotionTheme(),h=useCrossOriginAttribute(o);if(o)switch(e){case Block$1.ChatMessage.AvatarType.IMAGE:return jsx$1(StyledAvatarImage,{src:c.buildMediaURL(o),alt:`${t} avatar`,crossOrigin:h});case Block$1.ChatMessage.AvatarType.EMOJI:return jsx$1(StyledAvatarBackground,{children:o});case Block$1.ChatMessage.AvatarType.ICON:if(o==="user")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarUser",background:p.colors.redColor,children:jsx$1(DynamicIcon,{size:"lg",iconValue:":material/face:"})});if(o==="assistant")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarAssistant",background:p.colors.orangeColor,children:jsx$1(DynamicIcon,{size:"lg",iconValue:":material/smart_toy:"})});if(o.startsWith(":material"))return jsx$1(StyledAvatarBackground,{"data-testid":"stChatMessageAvatarCustom",children:jsx$1(DynamicIcon,{size:"lg",iconValue:o,color:p.colors.bodyText})})}return jsx$1(StyledAvatarBackground,{children:t?t.charAt(0).toUpperCase():"🧑‍💻"})}const ChatMessage=({endpoints:n,element:o,children:e})=>{const{avatar:t,avatarType:c,name:p}=o;return jsxs(StyledChatMessageContainer,{className:"stChatMessage","data-testid":"stChatMessage",background:["user","human"].includes(p.toLowerCase()),children:[jsx$1(ChatMessageAvatar,{name:p,avatar:t,avatarType:c,endpoints:n}),jsx$1(StyledMessageContent,{"data-testid":"stChatMessageContent","aria-label":`Chat message from ${p}`,children:e})]})},ChatMessage$1=reactExports.memo(ChatMessage),IsDialogContext=reactExports.createContext(!1);IsDialogContext.displayName="IsDialogContext";function _objectWithoutPropertiesLoose$q(n,o){if(n==null)return{};var e={};for(var t in n)if({}.hasOwnProperty.call(n,t)){if(o.indexOf(t)!==-1)continue;e[t]=n[t]}return e}var propTypes={exports:{}},ReactPropTypesSecret_1,hasRequiredReactPropTypesSecret;function requireReactPropTypesSecret(){if(hasRequiredReactPropTypesSecret)return ReactPropTypesSecret_1;hasRequiredReactPropTypesSecret=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ReactPropTypesSecret_1=n,ReactPropTypesSecret_1}var factoryWithThrowingShims,hasRequiredFactoryWithThrowingShims;function requireFactoryWithThrowingShims(){if(hasRequiredFactoryWithThrowingShims)return factoryWithThrowingShims;hasRequiredFactoryWithThrowingShims=1;var n=requireReactPropTypesSecret();function o(){}function e(){}return e.resetWarningCache=o,factoryWithThrowingShims=function(){function t(h,y,g,$,E,A){if(A!==n){var N=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw N.name="Invariant Violation",N}}t.isRequired=t;function c(){return t}var p={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:c,element:t,elementType:t,instanceOf:c,node:t,objectOf:c,oneOf:c,oneOfType:c,shape:c,exact:c,checkPropTypes:e,resetWarningCache:o};return p.PropTypes=p,p},factoryWithThrowingShims}var hasRequiredPropTypes;function requirePropTypes(){return hasRequiredPropTypes||(hasRequiredPropTypes=1,propTypes.exports=requireFactoryWithThrowingShims()()),propTypes.exports}var propTypesExports=requirePropTypes();const PropTypes=getDefaultExportFromCjs(propTypesExports);var FOCUS_GROUP="data-focus-lock",FOCUS_DISABLED="data-focus-lock-disabled",FOCUS_ALLOW="data-no-focus-lock",FOCUS_AUTO="data-autofocus-inside",FOCUS_NO_AUTOFOCUS="data-no-autofocus";function assignRef(n,o){return typeof n=="function"?n(o):n&&(n.current=o),n}function useCallbackRef(n,o){var e=reactExports.useState(function(){return{value:n,callback:o,facade:{get current(){return e.value},set current(t){var c=e.value;c!==t&&(e.value=t,e.callback(t,c))}}}})[0];return e.callback=o,e.facade}var useIsomorphicLayoutEffect=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,currentValues=new WeakMap;function useMergeRefs(n,o){var e=useCallbackRef(null,function(t){return n.forEach(function(c){return assignRef(c,t)})});return useIsomorphicLayoutEffect(function(){var t=currentValues.get(e);if(t){var c=new Set(t),p=new Set(n),h=e.current;c.forEach(function(y){p.has(y)||assignRef(y,null)}),p.forEach(function(y){c.has(y)||assignRef(y,h)})}currentValues.set(e,n)},[n]),e}var hiddenGuard={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function ItoI(n){return n}function innerCreateMedium(n,o){o===void 0&&(o=ItoI);var e=[],t=!1,c={read:function(){if(t)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return e.length?e[e.length-1]:n},useMedium:function(p){var h=o(p,t);return e.push(h),function(){e=e.filter(function(y){return y!==h})}},assignSyncMedium:function(p){for(t=!0;e.length;){var h=e;e=[],h.forEach(p)}e={push:function(y){return p(y)},filter:function(){return e}}},assignMedium:function(p){t=!0;var h=[];if(e.length){var y=e;e=[],y.forEach(p),h=e}var g=function(){var E=h;h=[],E.forEach(p)},$=function(){return Promise.resolve().then(g)};$(),e={push:function(E){h.push(E),$()},filter:function(E){return h=h.filter(E),e}}}};return c}function createMedium(n,o){return o===void 0&&(o=ItoI),innerCreateMedium(n,o)}function createSidecarMedium(n){n===void 0&&(n={});var o=innerCreateMedium(null);return o.options=__assign$2({async:!0,ssr:!1},n),o}var mediumFocus=createMedium({},function(n){var o=n.target,e=n.currentTarget;return{target:o,currentTarget:e}}),mediumBlur=createMedium(),mediumEffect=createMedium(),mediumSidecar=createSidecarMedium({async:!0,ssr:typeof document<"u"}),focusScope=reactExports.createContext(void 0),emptyArray=[],FocusLock=reactExports.forwardRef(function n(o,e){var t,c=reactExports.useState(),p=c[0],h=c[1],y=reactExports.useRef(),g=reactExports.useRef(!1),$=reactExports.useRef(null),E=reactExports.useState({}),A=E[1],N=o.children,H=o.disabled,Z=H===void 0?!1:H,X=o.noFocusGuards,be=X===void 0?!1:X,we=o.persistentFocus,$e=we===void 0?!1:we,Ce=o.crossFrame,Ie=Ce===void 0?!0:Ce,Ne=o.autoFocus,Fe=Ne===void 0?!0:Ne;o.allowTextSelection;var Be=o.group,Ge=o.className,je=o.whiteList,De=o.hasPositiveIndices,Ue=o.shards,Je=Ue===void 0?emptyArray:Ue,Xe=o.as,Ke=Xe===void 0?"div":Xe,ze=o.lockProps,nt=ze===void 0?{}:ze,ct=o.sideCar,at=o.returnFocus,dt=at===void 0?!1:at,Me=o.focusOptions,We=o.onActivation,tt=o.onDeactivation,Ve=reactExports.useState({}),vt=Ve[0],xt=reactExports.useCallback(function(qt){var zt=qt.captureFocusRestore;if(!$.current){var Jt,jt=(Jt=document)==null?void 0:Jt.activeElement;$.current=jt,jt!==document.body&&($.current=zt(jt))}y.current&&We&&We(y.current),g.current=!0,A()},[We]),Qe=reactExports.useCallback(function(){g.current=!1,tt&&tt(y.current),A()},[tt]),St=reactExports.useCallback(function(qt){var zt=$.current;if(zt){var Jt=(typeof zt=="function"?zt():zt)||document.body,jt=typeof dt=="function"?dt(Jt):dt;if(jt){var Yt=typeof jt=="object"?jt:void 0;$.current=null,qt?Promise.resolve().then(function(){return Jt.focus(Yt)}):Jt.focus(Yt)}}},[dt]),pt=reactExports.useCallback(function(qt){g.current&&mediumFocus.useMedium(qt)},[]),wt=mediumBlur.useMedium,Ft=reactExports.useCallback(function(qt){y.current!==qt&&(y.current=qt,h(qt))},[]),Ht=_extends$C((t={},t[FOCUS_DISABLED]=Z&&"disabled",t[FOCUS_GROUP]=Be,t),nt),on=be!==!0,en=on&&be!=="tail",Wt=useMergeRefs([e,Ft]),an=reactExports.useMemo(function(){return{observed:y,shards:Je,enabled:!Z,active:g.current}},[Z,g.current,Je,p]);return reactExports.createElement(reactExports.Fragment,null,on&&[reactExports.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:Z?-1:0,style:hiddenGuard}),De?reactExports.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:Z?-1:1,style:hiddenGuard}):null],!Z&&reactExports.createElement(ct,{id:vt,sideCar:mediumSidecar,observed:p,disabled:Z,persistentFocus:$e,crossFrame:Ie,autoFocus:Fe,whiteList:je,shards:Je,onActivation:xt,onDeactivation:Qe,returnFocus:St,focusOptions:Me,noFocusGuards:be}),reactExports.createElement(Ke,_extends$C({ref:Wt},Ht,{className:Ge,onBlur:wt,onFocus:pt}),reactExports.createElement(focusScope.Provider,{value:an},N)),en&&reactExports.createElement("div",{"data-focus-guard":!0,tabIndex:Z?-1:0,style:hiddenGuard}))});FocusLock.propTypes={};function _setPrototypeOf$e(n,o){return _setPrototypeOf$e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf$e(n,o)}function _inheritsLoose(n,o){n.prototype=Object.create(o.prototype),n.prototype.constructor=n,_setPrototypeOf$e(n,o)}function _typeof$g(n){"@babel/helpers - typeof";return _typeof$g=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$g(n)}function toPrimitive$2(n,o){if(_typeof$g(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,o);if(_typeof$g(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}function toPropertyKey$2(n){var o=toPrimitive$2(n,"string");return _typeof$g(o)=="symbol"?o:o+""}function _defineProperty$u(n,o,e){return(o=toPropertyKey$2(o))in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}function withSideEffect(n,o){function e(t){return t.displayName||t.name||"Component"}return function(c){var p=[],h;function y(){h=n(p.map(function($){return $.props})),o(h)}var g=function($){_inheritsLoose(E,$);function E(){return $.apply(this,arguments)||this}E.peek=function(){return h};var A=E.prototype;return A.componentDidMount=function(){p.push(this),y()},A.componentDidUpdate=function(){y()},A.componentWillUnmount=function(){var H=p.indexOf(this);p.splice(H,1),y()},A.render=function(){return React.createElement(c,this.props)},E}(reactExports.PureComponent);return _defineProperty$u(g,"displayName","SideEffect("+e(c)+")"),g}}var toArray$1=function(n){for(var o=Array(n.length),e=0;e<n.length;++e)o[e]=n[e];return o},asArray=function(n){return Array.isArray(n)?n:[n]},getFirst=function(n){return Array.isArray(n)?n[0]:n},isElementHidden=function(n){if(n.nodeType!==Node.ELEMENT_NODE)return!1;var o=window.getComputedStyle(n,null);return!o||!o.getPropertyValue?!1:o.getPropertyValue("display")==="none"||o.getPropertyValue("visibility")==="hidden"},getParentNode=function(n){return n.parentNode&&n.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n.parentNode.host:n.parentNode},isTopNode=function(n){return n===document||n&&n.nodeType===Node.DOCUMENT_NODE},isInert=function(n){return n.hasAttribute("inert")},isVisibleUncached=function(n,o){return!n||isTopNode(n)||!isElementHidden(n)&&!isInert(n)&&o(getParentNode(n))},isVisibleCached=function(n,o){var e=n.get(o);if(e!==void 0)return e;var t=isVisibleUncached(o,isVisibleCached.bind(void 0,n));return n.set(o,t),t},isAutoFocusAllowedUncached=function(n,o){return n&&!isTopNode(n)?isAutoFocusAllowed(n)?o(getParentNode(n)):!1:!0},isAutoFocusAllowedCached=function(n,o){var e=n.get(o);if(e!==void 0)return e;var t=isAutoFocusAllowedUncached(o,isAutoFocusAllowedCached.bind(void 0,n));return n.set(o,t),t},getDataset=function(n){return n.dataset},isHTMLButtonElement=function(n){return n.tagName==="BUTTON"},isHTMLInputElement=function(n){return n.tagName==="INPUT"},isRadioElement=function(n){return isHTMLInputElement(n)&&n.type==="radio"},notHiddenInput=function(n){return!((isHTMLInputElement(n)||isHTMLButtonElement(n))&&(n.type==="hidden"||n.disabled))},isAutoFocusAllowed=function(n){var o=n.getAttribute(FOCUS_NO_AUTOFOCUS);return![!0,"true",""].includes(o)},isGuard=function(n){var o;return!!(n&&(!((o=getDataset(n))===null||o===void 0)&&o.focusGuard))},isNotAGuard=function(n){return!isGuard(n)},isDefined=function(n){return!!n},tabSort=function(n,o){var e=Math.max(0,n.tabIndex),t=Math.max(0,o.tabIndex),c=e-t,p=n.index-o.index;if(c){if(!e)return 1;if(!t)return-1}return c||p},getTabIndex=function(n){return n.tabIndex<0&&!n.hasAttribute("tabindex")?0:n.tabIndex},orderByTabIndex=function(n,o,e){return toArray$1(n).map(function(t,c){var p=getTabIndex(t);return{node:t,index:c,tabIndex:e&&p===-1?(t.dataset||{}).focusGuard?0:-1:p}}).filter(function(t){return!o||t.tabIndex>=0}).sort(tabSort)},tabbables=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],queryTabbables=tabbables.join(","),queryGuardTabbables="".concat(queryTabbables,", [data-focus-guard]"),getFocusablesWithShadowDom=function(n,o){return toArray$1((n.shadowRoot||n).children).reduce(function(e,t){return e.concat(t.matches(o?queryGuardTabbables:queryTabbables)?[t]:[],getFocusablesWithShadowDom(t))},[])},getFocusablesWithIFrame=function(n,o){var e;return n instanceof HTMLIFrameElement&&(!((e=n.contentDocument)===null||e===void 0)&&e.body)?getFocusables([n.contentDocument.body],o):[n]},getFocusables=function(n,o){return n.reduce(function(e,t){var c,p=getFocusablesWithShadowDom(t,o),h=(c=[]).concat.apply(c,p.map(function(y){return getFocusablesWithIFrame(y,o)}));return e.concat(h,t.parentNode?toArray$1(t.parentNode.querySelectorAll(queryTabbables)).filter(function(y){return y===t}):[])},[])},getParentAutofocusables=function(n){var o=n.querySelectorAll("[".concat(FOCUS_AUTO,"]"));return toArray$1(o).map(function(e){return getFocusables([e])}).reduce(function(e,t){return e.concat(t)},[])},filterFocusable=function(n,o){return toArray$1(n).filter(function(e){return isVisibleCached(o,e)}).filter(function(e){return notHiddenInput(e)})},filterAutoFocusable=function(n,o){return o===void 0&&(o=new Map),toArray$1(n).filter(function(e){return isAutoFocusAllowedCached(o,e)})},getTabbableNodes=function(n,o,e){return orderByTabIndex(filterFocusable(getFocusables(n,e),o),!0,e)},getFocusableNodes=function(n,o){return orderByTabIndex(filterFocusable(getFocusables(n),o),!1)},parentAutofocusables=function(n,o){return filterFocusable(getParentAutofocusables(n),o)},contains=function(n,o){return n.shadowRoot?contains(n.shadowRoot,o):Object.getPrototypeOf(n).contains!==void 0&&Object.getPrototypeOf(n).contains.call(n,o)?!0:toArray$1(n.children).some(function(e){var t;if(e instanceof HTMLIFrameElement){var c=(t=e.contentDocument)===null||t===void 0?void 0:t.body;return c?contains(c,o):!1}return contains(e,o)})},filterNested=function(n){for(var o=new Set,e=n.length,t=0;t<e;t+=1)for(var c=t+1;c<e;c+=1){var p=n[t].compareDocumentPosition(n[c]);(p&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&o.add(c),(p&Node.DOCUMENT_POSITION_CONTAINS)>0&&o.add(t)}return n.filter(function(h,y){return!o.has(y)})},getTopParent=function(n){return n.parentNode?getTopParent(n.parentNode):n},getAllAffectedNodes=function(n){var o=asArray(n);return o.filter(Boolean).reduce(function(e,t){var c=t.getAttribute(FOCUS_GROUP);return e.push.apply(e,c?filterNested(toArray$1(getTopParent(t).querySelectorAll("[".concat(FOCUS_GROUP,'="').concat(c,'"]:not([').concat(FOCUS_DISABLED,'="disabled"])')))):[t]),e},[])},safeProbe=function(n){try{return n()}catch{return}},getActiveElement=function(n){if(n===void 0&&(n=document),!(!n||!n.activeElement)){var o=n.activeElement;return o.shadowRoot?getActiveElement(o.shadowRoot):o instanceof HTMLIFrameElement&&safeProbe(function(){return o.contentWindow.document})?getActiveElement(o.contentWindow.document):o}},focusInFrame=function(n,o){return n===o},focusInsideIframe=function(n,o){return!!toArray$1(n.querySelectorAll("iframe")).some(function(e){return focusInFrame(e,o)})},focusInside=function(n,o){return o===void 0&&(o=getActiveElement(getFirst(n).ownerDocument)),!o||o.dataset&&o.dataset.focusGuard?!1:getAllAffectedNodes(n).some(function(e){return contains(e,o)||focusInsideIframe(e,o)})},focusIsHidden=function(n){n===void 0&&(n=document);var o=getActiveElement(n);return o?toArray$1(n.querySelectorAll("[".concat(FOCUS_ALLOW,"]"))).some(function(e){return contains(e,o)}):!1},findSelectedRadio=function(n,o){return o.filter(isRadioElement).filter(function(e){return e.name===n.name}).filter(function(e){return e.checked})[0]||n},correctNode=function(n,o){return isRadioElement(n)&&n.name?findSelectedRadio(n,o):n},correctNodes=function(n){var o=new Set;return n.forEach(function(e){return o.add(correctNode(e,n))}),n.filter(function(e){return o.has(e)})},pickFirstFocus=function(n){return n[0]&&n.length>1?correctNode(n[0],n):n[0]},pickFocusable=function(n,o){return n.indexOf(correctNode(o,n))},NEW_FOCUS="NEW_FOCUS",newFocus=function(n,o,e,t,c){var p=n.length,h=n[0],y=n[p-1],g=isGuard(t);if(!(t&&n.indexOf(t)>=0)){var $=t!==void 0?e.indexOf(t):-1,E=c?e.indexOf(c):$,A=c?n.indexOf(c):-1;if($===-1)return A!==-1?A:NEW_FOCUS;if(A===-1)return NEW_FOCUS;var N=$-E,H=e.indexOf(h),Z=e.indexOf(y),X=correctNodes(e),be=t!==void 0?X.indexOf(t):-1,we=be-(c?X.indexOf(c):$);if(!N&&A>=0||o.length===0)return A;var $e=pickFocusable(n,o[0]),Ce=pickFocusable(n,o[o.length-1]);if($<=H&&g&&Math.abs(N)>1)return Ce;if($>=Z&&g&&Math.abs(N)>1)return $e;if(N&&Math.abs(we)>1)return A;if($<=H)return Ce;if($>Z)return $e;if(N)return Math.abs(N)>1?A:(p+A+N)%p}},findAutoFocused=function(n){return function(o){var e,t=(e=getDataset(o))===null||e===void 0?void 0:e.autofocus;return o.autofocus||t!==void 0&&t!=="false"||n.indexOf(o)>=0}},pickAutofocus=function(n,o,e){var t=n.map(function(p){var h=p.node;return h}),c=filterAutoFocusable(t.filter(findAutoFocused(e)));return c&&c.length?pickFirstFocus(c):pickFirstFocus(filterAutoFocusable(o))},getParents=function(n,o){return o===void 0&&(o=[]),o.push(n),n.parentNode&&getParents(n.parentNode.host||n.parentNode,o),o},getCommonParent=function(n,o){for(var e=getParents(n),t=getParents(o),c=0;c<e.length;c+=1){var p=e[c];if(t.indexOf(p)>=0)return p}return!1},getTopCommonParent=function(n,o,e){var t=asArray(n),c=asArray(o),p=t[0],h=!1;return c.filter(Boolean).forEach(function(y){h=getCommonParent(h||y,y)||h,e.filter(Boolean).forEach(function(g){var $=getCommonParent(p,g);$&&(!h||contains($,h)?h=$:h=getCommonParent($,h))})}),h},allParentAutofocusables=function(n,o){return n.reduce(function(e,t){return e.concat(parentAutofocusables(t,o))},[])},reorderNodes=function(n,o){var e=new Map;return o.forEach(function(t){return e.set(t.node,t)}),n.map(function(t){return e.get(t)}).filter(isDefined)},focusSolver=function(n,o){var e=getActiveElement(asArray(n).length>0?document:getFirst(n).ownerDocument),t=getAllAffectedNodes(n).filter(isNotAGuard),c=getTopCommonParent(e||n,n,t),p=new Map,h=getFocusableNodes(t,p),y=h.filter(function(Z){var X=Z.node;return isNotAGuard(X)});if(y[0]){var g=getFocusableNodes([c],p).map(function(Z){var X=Z.node;return X}),$=reorderNodes(g,y),E=$.map(function(Z){var X=Z.node;return X}),A=$.filter(function(Z){var X=Z.tabIndex;return X>=0}).map(function(Z){var X=Z.node;return X}),N=newFocus(E,A,g,e,o);if(N===NEW_FOCUS){var H=pickAutofocus(h,A,allParentAutofocusables(t,p))||pickAutofocus(h,E,allParentAutofocusables(t,p));if(H)return{node:H};console.warn("focus-lock: cannot find any node to move focus into");return}return N===void 0?N:$[N]}},expandFocusableNodes=function(n){var o=getAllAffectedNodes(n).filter(isNotAGuard),e=getTopCommonParent(n,n,o),t=orderByTabIndex(getFocusables([e],!0),!0,!0),c=getFocusables(o,!1);return t.map(function(p){var h=p.node,y=p.index;return{node:h,index:y,lockItem:c.indexOf(h)>=0,guard:isGuard(h)}})},focusOn=function(n,o){n&&("focus"in n&&n.focus(o),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus())},guardCount=0,lockDisabled=!1,moveFocusInside=function(n,o,e){e===void 0&&(e={});var t=focusSolver(n,o);if(!lockDisabled&&t){if(guardCount>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),lockDisabled=!0,setTimeout(function(){lockDisabled=!1},1);return}guardCount++,focusOn(t.node,e.focusOptions),guardCount--}};function weakRef(n){if(!n)return null;if(typeof WeakRef>"u")return function(){return n||null};var o=n?new WeakRef(n):null;return function(){return o?.deref()||null}}var recordElementLocation=function(n){if(!n)return null;for(var o=[],e=n;e&&e!==document.body;)o.push({current:weakRef(e),parent:weakRef(e.parentElement),left:weakRef(e.previousElementSibling),right:weakRef(e.nextElementSibling)}),e=e.parentElement;return{element:weakRef(n),stack:o,ownerDocument:n.ownerDocument}},restoreFocusTo=function(n){var o,e,t,c,p;if(n)for(var h=n.stack,y=n.ownerDocument,g=new Map,$=0,E=h;$<E.length;$++){var A=E[$],N=(o=A.parent)===null||o===void 0?void 0:o.call(A);if(N&&y.contains(N)){for(var H=(e=A.left)===null||e===void 0?void 0:e.call(A),Z=A.current(),X=N.contains(Z)?Z:void 0,be=(t=A.right)===null||t===void 0?void 0:t.call(A),we=getTabbableNodes([N],g),$e=(p=(c=X??H?.nextElementSibling)!==null&&c!==void 0?c:be)!==null&&p!==void 0?p:H;$e;){for(var Ce=0,Ie=we;Ce<Ie.length;Ce++){var Ne=Ie[Ce];if($e?.contains(Ne.node))return Ne.node}$e=$e.nextElementSibling}if(we.length)return we[0].node}}},captureFocusRestore=function(n){var o=recordElementLocation(n);return function(){return restoreFocusTo(o)}},getRelativeFocusable=function(n,o,e){if(!n||!o)return console.error("no element or scope given"),{};var t=asArray(o);if(t.every(function(h){return!contains(h,n)}))return console.error("Active element is not contained in the scope"),{};var c=e?getTabbableNodes(t,new Map):getFocusableNodes(t,new Map),p=c.findIndex(function(h){var y=h.node;return y===n});if(p!==-1)return{prev:c[p-1],next:c[p+1],first:c[0],last:c[c.length-1]}},getBoundary=function(n,o){var e=o?getTabbableNodes(asArray(n),new Map):getFocusableNodes(asArray(n),new Map);return{first:e[0],last:e[e.length-1]}},defaultOptions=function(n){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},n)},moveFocus=function(n,o,e){o===void 0&&(o={});var t=defaultOptions(o),c=getRelativeFocusable(n,t.scope,t.onlyTabbable);if(c){var p=e(c,t.cycle);p&&focusOn(p.node,t.focusOptions)}},focusNextElement=function(n,o){o===void 0&&(o={}),moveFocus(n,o,function(e,t){var c=e.next,p=e.first;return c||t&&p})},focusPrevElement=function(n,o){o===void 0&&(o={}),moveFocus(n,o,function(e,t){var c=e.prev,p=e.last;return c||t&&p})},pickBoundary=function(n,o,e){var t,c=getBoundary(n,(t=o.onlyTabbable)!==null&&t!==void 0?t:!0),p=c[e];p&&focusOn(p.node,o.focusOptions)},focusFirstElement=function(n,o){o===void 0&&(o={}),pickBoundary(n,o,"first")},focusLastElement=function(n,o){o===void 0&&(o={}),pickBoundary(n,o,"last")};function deferAction(n){setTimeout(n,1)}var inlineProp=function n(o,e){var t={};return t[o]=e,t},extractRef=function n(o){return o&&"current"in o?o.current:o},focusOnBody=function n(){return document&&document.activeElement===document.body},isFreeFocus=function n(){return focusOnBody()||focusIsHidden()},lastActiveTrap=null,lastActiveFocus=null,tryRestoreFocus=function n(){return null},lastPortaledElement=null,focusWasOutsideWindow=!1,windowFocused=!1,defaultWhitelist=function n(){return!0},focusWhitelisted=function n(o){return(lastActiveTrap.whiteList||defaultWhitelist)(o)},recordPortal=function n(o,e){lastPortaledElement={observerNode:o,portaledElement:e}},focusIsPortaledPair=function n(o){return lastPortaledElement&&lastPortaledElement.portaledElement===o};function autoGuard(n,o,e,t){var c=null,p=n;do{var h=t[p];if(h.guard)h.node.dataset.focusAutoGuard&&(c=h);else if(h.lockItem){if(p!==n)return;c=null}else break}while((p+=e)!==o);c&&(c.node.tabIndex=0)}var focusWasOutside=function n(o){return o?!!focusWasOutsideWindow:focusWasOutsideWindow==="meanwhile"},checkInHost=function n(o,e,t){return e&&(e.host===o&&(!e.activeElement||t.contains(e.activeElement))||e.parentNode&&n(o,e.parentNode,t))},withinHost=function n(o,e){return e.some(function(t){return checkInHost(o,t,t)})},getNodeFocusables=function n(o){return getFocusableNodes(o,new Map)},isNotFocusable=function n(o){return!getNodeFocusables([o.parentNode]).some(function(e){return e.node===o})},activateTrap=function n(){var o=!1;if(lastActiveTrap){var e=lastActiveTrap,t=e.observed,c=e.persistentFocus,p=e.autoFocus,h=e.shards,y=e.crossFrame,g=e.focusOptions,$=e.noFocusGuards,E=t||lastPortaledElement&&lastPortaledElement.portaledElement;if(focusOnBody()&&lastActiveFocus&&(!document.body.contains(lastActiveFocus)||isNotFocusable(lastActiveFocus))){lastActiveFocus=null;var A=tryRestoreFocus();A&&A.focus()}var N=document&&document.activeElement;if(E){var H=[E].concat(h.map(extractRef).filter(Boolean)),Z=function(){if(!focusWasOutside(y)||!$||!lastActiveFocus||windowFocused)return!1;var Ce=getNodeFocusables(H),Ie=Ce.findIndex(function(Ne){var Fe=Ne.node;return Fe===lastActiveFocus});return Ie===0||Ie===Ce.length-1};if((!N||focusWhitelisted(N))&&(c||Z()||!isFreeFocus()||!lastActiveFocus&&p)&&(E&&!(focusInside(H)||N&&withinHost(N,H)||focusIsPortaledPair(N))&&(document&&!lastActiveFocus&&N&&!p?(N.blur&&N.blur(),document.body.focus()):(o=moveFocusInside(H,lastActiveFocus,{focusOptions:g}),lastPortaledElement={})),focusWasOutsideWindow=!1,lastActiveFocus=document&&document.activeElement,tryRestoreFocus=captureFocusRestore(lastActiveFocus)),document&&N!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var X=document&&document.activeElement,be=expandFocusableNodes(H),we=be.map(function($e){var Ce=$e.node;return Ce}).indexOf(X);we>-1&&(be.filter(function($e){var Ce=$e.guard,Ie=$e.node;return Ce&&Ie.dataset.focusAutoGuard}).forEach(function($e){var Ce=$e.node;return Ce.removeAttribute("tabIndex")}),autoGuard(we,be.length,1,be),autoGuard(we,-1,-1,be))}}}return o},onTrap=function n(o){activateTrap()&&o&&(o.stopPropagation(),o.preventDefault())},onBlur=function n(){return deferAction(activateTrap)},onFocus=function n(o){var e=o.target,t=o.currentTarget;t.contains(e)||recordPortal(t,e)},FocusWatcher=function n(){return null},onWindowFocus=function n(){windowFocused=!0},onWindowBlur=function n(){windowFocused=!1,focusWasOutsideWindow="just",deferAction(function(){focusWasOutsideWindow="meanwhile"})},attachHandler=function n(){document.addEventListener("focusin",onTrap),document.addEventListener("focusout",onBlur),window.addEventListener("focus",onWindowFocus),window.addEventListener("blur",onWindowBlur)},detachHandler=function n(){document.removeEventListener("focusin",onTrap),document.removeEventListener("focusout",onBlur),window.removeEventListener("focus",onWindowFocus),window.removeEventListener("blur",onWindowBlur)};function reducePropsToState(n){return n.filter(function(o){var e=o.disabled;return!e})}var focusLockAPI={moveFocusInside,focusInside,focusNextElement,focusPrevElement,focusFirstElement,focusLastElement,captureFocusRestore};function handleStateChangeOnClient(n){var o=n.slice(-1)[0];o&&!lastActiveTrap&&attachHandler();var e=lastActiveTrap,t=e&&o&&o.id===e.id;lastActiveTrap=o,e&&!t&&(e.onDeactivation(),n.filter(function(c){var p=c.id;return p===e.id}).length||e.returnFocus(!o)),o?(lastActiveFocus=null,(!t||e.observed!==o.observed)&&o.onActivation(focusLockAPI),activateTrap(),deferAction(activateTrap)):(detachHandler(),lastActiveFocus=null)}mediumFocus.assignSyncMedium(onFocus);mediumBlur.assignMedium(onBlur);mediumEffect.assignMedium(function(n){return n(focusLockAPI)});const FocusTrap=withSideEffect(reducePropsToState,handleStateChangeOnClient)(FocusWatcher);var FocusLockCombination=reactExports.forwardRef(function n(o,e){return reactExports.createElement(FocusLock,_extends$C({sideCar:FocusTrap,ref:e},o))}),_ref=FocusLock.propTypes||{};_ref.sideCar;_objectWithoutPropertiesLoose$q(_ref,["sideCar"]);FocusLockCombination.propTypes={};var useFocusInside=function n(o){reactExports.useEffect(function(){var e=!0;return mediumEffect.useMedium(function(t){var c=o&&o.current;e&&c&&(t.focusInside(c)||t.moveFocusInside(c,null))}),function(){e=!1}},[o])};function MoveFocusInside(n){var o=n.disabled,e=o===void 0?!1:o,t=n.className,c=n.children,p=reactExports.useRef(null);return useFocusInside(e?void 0:p),reactExports.createElement("div",_extends$C({},inlineProp(FOCUS_AUTO,!e),{ref:p,className:t}),c)}MoveFocusInside.propTypes={};var SIZE$2={default:"default",full:"full",auto:"auto"},SIZE_WIDTHS={default:"500px",full:"100%",auto:"auto"},ROLE={dialog:"dialog"},CLOSE_SOURCE={closeButton:"closeButton",backdrop:"backdrop",escape:"escape"};function ownKeys$p(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$n(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$p(Object(e),!0).forEach(function(t){_defineProperty$t(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$p(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$t(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}function getSizeStyles(n){var o={maxWidth:"100%",width:null};return typeof n=="number"?o.width="".concat(n,"px"):SIZE$2[n]?o.width=SIZE_WIDTHS[n]:typeof n=="string"&&(o.width=n),n===SIZE$2.full&&(o.alignSelf="stretch"),o}var Root$3=styled$1("div",function(n){var o=n.$isOpen;return{position:"fixed",overflow:"auto",right:0,bottom:0,top:0,left:0,pointerEvents:o?"auto":"none"}});Root$3.displayName="Root";Root$3.displayName="Root";var DialogContainer=styled$1("div",function(n){var o=n.$animate,e=n.$isOpen,t=n.$isVisible,c=n.$theme,p={transitionProperty:"opacity",transitionDuration:c.animation.timing400,transitionTimingFunction:c.animation.easeOutCurve};return _objectSpread$n({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",minHeight:"100%",userSelect:"none",pointerEvents:"auto",backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",opacity:t&&e?1:0},o?p:null)});DialogContainer.displayName="DialogContainer";DialogContainer.displayName="DialogContainer";var Dialog$2=styled$1("div",function(n){var o=n.$animate,e=n.$isOpen,t=n.$isVisible,c=n.$size,p=n.$theme;return _objectSpread$n(_objectSpread$n(_objectSpread$n({position:"relative",backgroundColor:p.colors.backgroundPrimary,borderTopLeftRadius:p.borders.radius500,borderTopRightRadius:p.borders.radius500,borderBottomRightRadius:p.borders.radius500,borderBottomLeftRadius:p.borders.radius500,marginLeft:p.sizing.scale600,marginTop:p.sizing.scale600,marginRight:p.sizing.scale600,marginBottom:p.sizing.scale600},getSizeStyles(c)),{},{opacity:t&&e?1:0,transform:t?"translateY(0)":"translateY(20px)"},o?{transitionProperty:"opacity, transform",transitionDuration:p.animation.timing400,transitionTimingFunction:p.animation.easeOutCurve}:null),{},{userSelect:"text",pointerEvents:e?"all":"none",":focus":{outline:"none"}})});Dialog$2.displayName="Dialog";Dialog$2.displayName="Dialog";var Close=styled$1("button",function(n){var o,e=n.$theme,t=n.$isFocusVisible,c=e.direction==="rtl"?"left":"right";return o={background:"transparent",outline:0,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,color:e.colors.modalCloseColor,transitionProperty:"color, border-color",transitionDuration:e.animation.timing200,borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftColor:"transparent",borderRightColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",":hover":{color:e.colors.modalCloseColorHover},":focus":{outline:t?"3px solid ".concat(e.colors.accent):"none"},position:"absolute",top:e.sizing.scale500},_defineProperty$t(o,c,e.sizing.scale500),_defineProperty$t(o,"width",e.sizing.scale800),_defineProperty$t(o,"height",e.sizing.scale800),_defineProperty$t(o,"display","flex"),_defineProperty$t(o,"justifyContent","center"),_defineProperty$t(o,"alignItems","center"),_defineProperty$t(o,"cursor","pointer"),o});Close.displayName="Close";Close.displayName="Close";var ModalHeader$1=styled$1("div",function(n){var o,e=n.$theme,t=e.direction==="rtl"?"marginRight":"marginLeft",c=e.direction==="rtl"?"marginLeft":"marginRight";return _objectSpread$n(_objectSpread$n({},e.typography.font550),{},(o={color:e.colors.contentPrimary,marginTop:e.sizing.scale900,marginBottom:e.sizing.scale600},_defineProperty$t(o,t,e.sizing.scale800),_defineProperty$t(o,c,e.sizing.scale900),o))});ModalHeader$1.displayName="ModalHeader";ModalHeader$1.displayName="ModalHeader";var ModalBody$2=styled$1("div",function(n){var o=n.$theme;return _objectSpread$n(_objectSpread$n({},o.typography.font200),{},{color:o.colors.contentSecondary,marginTop:o.sizing.scale600,marginLeft:o.sizing.scale800,marginRight:o.sizing.scale800,marginBottom:o.sizing.scale700})});ModalBody$2.displayName="ModalBody";ModalBody$2.displayName="ModalBody";var ModalFooter$1=styled$1("div",function(n){var o=n.$theme;return _objectSpread$n(_objectSpread$n({},o.typography.font200),{},{marginTop:o.sizing.scale700,marginLeft:o.sizing.scale800,marginRight:o.sizing.scale800,paddingTop:o.sizing.scale500,paddingBottom:o.sizing.scale500,textAlign:o.direction==="rtl"?"left":"right"})});ModalFooter$1.displayName="ModalFooter";ModalFooter$1.displayName="ModalFooter";function CloseIcon(){return reactExports.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",style:{stroke:"currentColor"},xmlns:"http://www.w3.org/2000/svg"},reactExports.createElement("path",{d:"M9 1L5 5M1 9L5 5M5 5L1 1M5 5L9 9",strokeWidth:"2",strokeLinecap:"round"}))}function _typeof$f(n){"@babel/helpers - typeof";return _typeof$f=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$f(n)}function _extends$v(){return _extends$v=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$v.apply(this,arguments)}function _slicedToArray$k(n,o){return _arrayWithHoles$k(n)||_iterableToArrayLimit$k(n,o)||_unsupportedIterableToArray$k(n,o)||_nonIterableRest$k()}function _nonIterableRest$k(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
47
47
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$k(n,o){if(n){if(typeof n=="string")return _arrayLikeToArray$k(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$k(n,o)}}function _arrayLikeToArray$k(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$k(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$k(n){if(Array.isArray(n))return n}function _classCallCheck$d(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties$d(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$d(n,o,e){return o&&_defineProperties$d(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$d(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$d(n,o)}function _setPrototypeOf$d(n,o){return _setPrototypeOf$d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,c){return t.__proto__=c,t},_setPrototypeOf$d(n,o)}function _createSuper$d(n){var o=_isNativeReflectConstruct$d();return function(){var t=_getPrototypeOf$d(n),c;if(o){var p=_getPrototypeOf$d(this).constructor;c=Reflect.construct(t,arguments,p)}else c=t.apply(this,arguments);return _possibleConstructorReturn$d(this,c)}}function _possibleConstructorReturn$d(n,o){if(o&&(_typeof$f(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$e(n)}function _assertThisInitialized$e(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$d(){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$d(n){return _getPrototypeOf$d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$d(n)}function _defineProperty$s(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var Modal$1=function(n){_inherits$d(e,n);var o=_createSuper$d(e);function e(){var t;_classCallCheck$d(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$s(_assertThisInitialized$e(t),"animateOutTimer",void 0),_defineProperty$s(_assertThisInitialized$e(t),"animateStartTimer",void 0),_defineProperty$s(_assertThisInitialized$e(t),"dialogContainerRef",reactExports.createRef()),_defineProperty$s(_assertThisInitialized$e(t),"lastFocus",null),_defineProperty$s(_assertThisInitialized$e(t),"lastMountNodeOverflowStyle",null),_defineProperty$s(_assertThisInitialized$e(t),"rootRef",reactExports.createRef()),_defineProperty$s(_assertThisInitialized$e(t),"state",{isVisible:!1,mounted:!1,isFocusVisible:!1}),_defineProperty$s(_assertThisInitialized$e(t),"handleFocus",function(y){isFocusVisible(y)&&t.setState({isFocusVisible:!0})}),_defineProperty$s(_assertThisInitialized$e(t),"handleBlur",function(y){t.state.isFocusVisible!==!1&&t.setState({isFocusVisible:!1})}),_defineProperty$s(_assertThisInitialized$e(t),"onEscape",function(){t.props.closeable&&t.triggerClose(CLOSE_SOURCE.escape)}),_defineProperty$s(_assertThisInitialized$e(t),"onDocumentClick",function(y){y.target&&y.target instanceof HTMLElement&&y.target.contains(t.dialogContainerRef.current)&&t.onBackdropClick()}),_defineProperty$s(_assertThisInitialized$e(t),"onBackdropClick",function(){t.props.closeable&&t.triggerClose(CLOSE_SOURCE.backdrop)}),_defineProperty$s(_assertThisInitialized$e(t),"onCloseClick",function(){t.triggerClose(CLOSE_SOURCE.closeButton)}),_defineProperty$s(_assertThisInitialized$e(t),"animateOutComplete",function(){t.setState({isVisible:!1})}),t}return _createClass$d(e,[{key:"componentDidMount",value:function(){this.setState({mounted:!0})}},{key:"componentWillUnmount",value:function(){this.resetMountNodeScroll(),this.clearTimers()}},{key:"componentDidUpdate",value:function(c,p){var h=this.props.isOpen;(h!==c.isOpen||h&&this.state.mounted&&!p.mounted)&&(h?this.didOpen():this.didClose())}},{key:"disableMountNodeScroll",value:function(){var c=this.getMountNode();this.lastMountNodeOverflowStyle=c.style.overflow||"",c.style.overflow="hidden"}},{key:"resetMountNodeScroll",value:function(){var c=this.getMountNode(),p=this.lastMountNodeOverflowStyle;c&&p!==null&&(c.style.overflow==="hidden"&&(c.style.overflow=p||""),this.lastMountNodeOverflowStyle=null)}},{key:"clearTimers",value:function(){this.animateOutTimer&&clearTimeout(this.animateOutTimer),this.animateStartTimer&&cancelAnimationFrame(this.animateStartTimer)}},{key:"didOpen",value:function(){var c=this,p=this.rootRef.current;p&&(p.scrollTop=0),this.clearTimers(),this.disableMountNodeScroll(),this.animateStartTimer=requestAnimationFrame(function(){c.setState({isVisible:!0})})}},{key:"didClose",value:function(){this.resetMountNodeScroll(),this.animateOutTimer=setTimeout(this.animateOutComplete,500)}},{key:"triggerClose",value:function(c){this.props.onClose&&c&&this.props.onClose({closeSource:c})}},{key:"getSharedProps",value:function(){var c=this.props,p=c.animate,h=c.isOpen,y=c.size,g=c.role,$=c.closeable;return{$animate:p,$isVisible:this.state.isVisible,$isOpen:!!h,$size:y,$role:g,$closeable:!!$,$isFocusVisible:this.state.isFocusVisible}}},{key:"getMountNode",value:function(){var c=this.props.mountNode;return c||document.body}},{key:"getChildren",value:function(){var c=this.props.children;return typeof c=="function"?c():c}},{key:"renderModal",value:function(){var c=this,p=this.props,h=p.overrides,y=h===void 0?{}:h,g=p.closeable,$=p.role,E=p.autoFocus,A=p.focusLock,N=p.returnFocus,H=y.Root,Z=y.Dialog,X=y.DialogContainer,be=y.Close,we=getOverrides(H,Root$3),$e=_slicedToArray$k(we,2),Ce=$e[0],Ie=$e[1],Ne=getOverrides(X,DialogContainer),Fe=_slicedToArray$k(Ne,2),Be=Fe[0],Ge=Fe[1],je=getOverrides(Z,Dialog$2),De=_slicedToArray$k(je,2),Ue=De[0],Je=De[1],Xe=getOverrides(be,Close),Ke=_slicedToArray$k(Xe,2),ze=Ke[0],nt=Ke[1],ct=this.getSharedProps(),at=this.getChildren();return reactExports.createElement(LocaleContext.Consumer,null,function(dt){return reactExports.createElement(FocusLockCombination,{disabled:!A,crossFrame:!1,returnFocus:N,autoFocus:E},reactExports.createElement(Ce,_extends$v({"data-baseweb":"modal",ref:c.rootRef},ct,Ie),reactExports.createElement(Be,_extends$v({ref:c.dialogContainerRef},ct,Ge),reactExports.createElement(Ue,_extends$v({tabIndex:-1,"aria-modal":!0,"aria-label":"dialog",role:$},ct,Je),at,g?reactExports.createElement(ze,_extends$v({"aria-label":dt.modal.close,onClick:c.onCloseClick},ct,nt,{onFocus:forkFocus(nt,c.handleFocus),onBlur:forkBlur(nt,c.handleBlur)}),reactExports.createElement(CloseIcon,null)):null))))})}},{key:"render",value:function(){return!this.state.mounted||!this.props.isOpen&&!this.state.isVisible?null:reactExports.createElement(Layer,{onEscape:this.onEscape,onDocumentClick:this.onDocumentClick,mountNode:this.props.mountNode},this.renderModal())}}]),e}(reactExports.Component);_defineProperty$s(Modal$1,"defaultProps",{animate:!0,autoFocus:!0,focusLock:!0,returnFocus:!0,closeable:!0,name:"dialog",isOpen:!1,overrides:{},role:ROLE.dialog,size:SIZE$2.default});const scriptRel="modulepreload",assetsURL=function(n,o){return new URL(n,o).href},seen={},__vitePreload=function n(o,e,t){let c=Promise.resolve();if(e&&e.length>0){let $=function(E){return Promise.all(E.map(A=>Promise.resolve(A).then(N=>({status:"fulfilled",value:N}),N=>({status:"rejected",reason:N}))))};const h=document.getElementsByTagName("link"),y=document.querySelector("meta[property=csp-nonce]"),g=y?.nonce||y?.getAttribute("nonce");c=$(e.map(E=>{if(E=assetsURL(E,t),E in seen)return;seen[E]=!0;const A=E.endsWith(".css"),N=A?'[rel="stylesheet"]':"";if(t)for(let Z=h.length-1;Z>=0;Z--){const X=h[Z];if(X.href===E&&(!A||X.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${E}"]${N}`))return;const H=document.createElement("link");if(H.rel=A?"stylesheet":scriptRel,A||(H.as="script"),H.crossOrigin="",H.href=E,g&&H.setAttribute("nonce",g),document.head.appendChild(H),A)return new Promise((Z,X)=>{H.addEventListener("load",Z),H.addEventListener("error",()=>X(new Error(`Unable to preload CSS for ${E}`)))})}))}function p(h){const y=new Event("vite:preloadError",{cancelable:!0});if(y.payload=h,window.dispatchEvent(y),!y.defaultPrevented)throw h}return c.then(h=>{for(const y of h||[])y.status==="rejected"&&p(y.reason);return o().catch(p)})};function escapeStringRegexp$1(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const replacements=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ə","A"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ō","O"],["Ő","O"],["Ø","O"],["Œ","OE"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ə","a"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ō","o"],["ő","o"],["ø","o"],["œ","oe"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","a"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ‎","a"],["ُ","u"],["ِ‎","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ու","u"],["ՈՒ","U"],["Ու","U"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","k"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","O"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(c)"],["ⓓ","(d)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"],["−","-"],["⁓","-"]],danishNorwegianReplacements=[["æ","ae"],["Æ","Ae"],["ø","oe"],["Ø","Oe"],["å","aa"],["Å","Aa"]],localeReplacements={sv:[["ä","a"],["Ä","A"],["ö","o"],["Ö","O"],["å","a"],["Å","A"]],da:danishNorwegianReplacements,nb:danishNorwegianReplacements,de:[["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["ß","ss"],["ẞ","Ss"]],tr:[["â","a"],["Â","A"],["ö","o"],["Ö","O"],["ü","u"],["Ü","U"]],hu:[["ű","u"],["Ű","U"],["ö","o"],["Ö","O"],["ü","u"],["Ü","U"],["á","a"],["Á","A"],["é","e"],["É","E"],["í","i"],["Í","I"],["ó","o"],["Ó","O"],["ú","u"],["Ú","U"]],sr:[["ђ","dj"],["Ђ","Dj"],["џ","dz"],["Џ","Dz"],["љ","lj"],["Љ","Lj"],["њ","nj"],["Њ","Nj"],["ћ","c"],["Ћ","C"],["ч","ch"],["Ч","Ch"],["ш","sh"],["Ш","Sh"],["ж","zh"],["Ж","Zh"]]},doCustomReplacements=(n,o)=>{for(const[e,t]of o)n=n.replaceAll(e,t);return n},getLocaleReplacements=n=>{if(!n)return[];const o=n.toLowerCase().replace(/^no(-|$)/,"nb$1");return localeReplacements[o]||localeReplacements[o.split("-")[0]]||[]};function transliterate(n,o){if(typeof n!="string")throw new TypeError(`Expected a string, got \`${typeof n}\``);o={customReplacements:[],...o};const e=getLocaleReplacements(o.locale),t=new Map([...replacements,...e,...o.customReplacements]);return n=n.normalize(),n=doCustomReplacements(n,t),n=n.normalize("NFD").replaceAll(new RegExp("\\p{Diacritic}","gu"),"").normalize(),n=n.replaceAll(new RegExp("\\p{Dash_Punctuation}","gu"),"-"),n}const overridableReplacements=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],decamelize=n=>n.replaceAll(/([A-Z]{2,})(\d+)/g,"$1 $2").replaceAll(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replaceAll(/([a-z\d])([A-Z])/g,"$1 $2").replaceAll(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2"),removeMootSeparators=(n,o)=>{const e=escapeStringRegexp$1(o);return n.replaceAll(new RegExp(`(?:${e}){2,}`,"g"),o).replaceAll(new RegExp(`^(?:${e})|(?:${e})$`,"g"),"")},buildPatternSlug=n=>{let o=String.raw`a-z\d`;if(o+=n.lowercase?"":"A-Z",n.transliterate===!1&&(o+=String.raw`\p{L}\p{N}`),n.preserveCharacters.length>0)for(const t of n.preserveCharacters){if(t===n.separator)throw new Error(`The separator character \`${n.separator}\` cannot be included in preserved characters: ${n.preserveCharacters}`);o+=escapeStringRegexp$1(t)}const e=n.transliterate?"g":"gu";return new RegExp(`[^${o}]+`,e)};function slugify(n,o){if(typeof n!="string")throw new TypeError(`Expected a string, got \`${typeof n}\``);o={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],transliterate:!0,...o};const e=o.preserveLeadingUnderscore&&n.startsWith("_"),t=o.preserveTrailingDash&&n.endsWith("-");if(o.transliterate){const p=new Map([...overridableReplacements,...o.customReplacements]);n=transliterate(n,{customReplacements:p,locale:o.locale})}else if(o.customReplacements.length>0)for(const[p,h]of o.customReplacements)n=n.replaceAll(p,h);o.decamelize&&(n=decamelize(n));const c=buildPatternSlug(o);return o.lowercase&&(n=o.locale?n.toLocaleLowerCase(o.locale):n.toLowerCase()),n=n.replaceAll(/([a-zA-Z\d]+)['\u2019]([ts])(\s|$)/g,"$1$2$3"),n=n.replace(c,o.separator),n=n.replaceAll("\\",""),o.separator&&(n=removeMootSeparators(n,o.separator)),e&&(n=`_${n}`),t&&(n=`${n}-`),n}function escapeStringRegexp(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const convert=function(n){if(n==null)return ok$1;if(typeof n=="function")return castFactory(n);if(typeof n=="object")return Array.isArray(n)?anyFactory(n):propsFactory(n);if(typeof n=="string")return typeFactory(n);throw new Error("Expected function, string, or object as test")};function anyFactory(n){const o=[];let e=-1;for(;++e<n.length;)o[e]=convert(n[e]);return castFactory(t);function t(...c){let p=-1;for(;++p<o.length;)if(o[p].apply(this,c))return!0;return!1}}function propsFactory(n){const o=n;return castFactory(e);function e(t){const c=t;let p;for(p in n)if(c[p]!==o[p])return!1;return!0}}function typeFactory(n){return castFactory(o);function o(e){return e&&e.type===n}}function castFactory(n){return o;function o(e,t,c){return!!(looksLikeANode(e)&&n.call(this,e,typeof t=="number"?t:void 0,c||void 0))}}function ok$1(){return!0}function looksLikeANode(n){return n!==null&&typeof n=="object"&&"type"in n}function color(n){return n}const empty$1=[],CONTINUE=!0,EXIT=!1,SKIP="skip";function visitParents(n,o,e,t){let c;typeof o=="function"&&typeof e!="function"?(t=e,e=o):c=o;const p=convert(c),h=t?-1:1;y(n,void 0,[])();function y(g,$,E){const A=g&&typeof g=="object"?g:{};if(typeof A.type=="string"){const H=typeof A.tagName=="string"?A.tagName:typeof A.name=="string"?A.name:void 0;Object.defineProperty(N,"name",{value:"node ("+(g.type+(H?"<"+H+">":""))+")"})}return N;function N(){let H=empty$1,Z,X,be;if((!o||p(g,$,E[E.length-1]||void 0))&&(H=toResult(e(g,E)),H[0]===EXIT))return H;if("children"in g&&g.children){const we=g;if(we.children&&H[0]!==SKIP)for(X=(t?we.children.length:-1)+h,be=E.concat(we);X>-1&&X<we.children.length;){const $e=we.children[X];if(Z=y($e,X,be)(),Z[0]===EXIT)return Z;X=typeof Z[1]=="number"?Z[1]:X+h}}return H}}}function toResult(n){return Array.isArray(n)?n:typeof n=="number"?[CONTINUE,n]:n==null?empty$1:[n]}function findAndReplace(n,o,e){const c=convert((e||{}).ignore||[]),p=toPairs(o);let h=-1;for(;++h<p.length;)visitParents(n,"text",y);function y($,E){let A=-1,N;for(;++A<E.length;){const H=E[A],Z=N?N.children:void 0;if(c(H,Z?Z.indexOf(H):void 0,N))return;N=H}if(N)return g($,E)}function g($,E){const A=E[E.length-1],N=p[h][0],H=p[h][1];let Z=0;const be=A.children.indexOf($);let we=!1,$e=[];N.lastIndex=0;let Ce=N.exec($.value);for(;Ce;){const Ie=Ce.index,Ne={index:Ce.index,input:Ce.input,stack:[...E,$]};let Fe=H(...Ce,Ne);if(typeof Fe=="string"&&(Fe=Fe.length>0?{type:"text",value:Fe}:void 0),Fe===!1?N.lastIndex=Ie+1:(Z!==Ie&&$e.push({type:"text",value:$.value.slice(Z,Ie)}),Array.isArray(Fe)?$e.push(...Fe):Fe&&$e.push(Fe),Z=Ie+Ce[0].length,we=!0),!N.global)break;Ce=N.exec($.value)}return we?(Z<$.value.length&&$e.push({type:"text",value:$.value.slice(Z)}),A.children.splice(be,1,...$e)):$e=[$],be+$e.length}}function toPairs(n){const o=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const e=!n[0]||Array.isArray(n[0])?n:[n];let t=-1;for(;++t<e.length;){const c=e[t];o.push([toExpression(c[0]),toFunction(c[1])])}return o}function toExpression(n){return typeof n=="string"?new RegExp(escapeStringRegexp(n),"g"):n}function toFunction(n){return typeof n=="function"?n:function(){return n}}function _extends$u(){return _extends$u=Object.assign||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$u.apply(this,arguments)}function _objectWithoutProperties$q(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$p(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$p(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}var Check=reactExports.forwardRef(function(n,o){var e=n.color,t=e===void 0?"currentColor":e,c=n.size,p=c===void 0?24:c,h=_objectWithoutProperties$q(n,["color","size"]);return React.createElement("svg",_extends$u({ref:o,xmlns:"http://www.w3.org/2000/svg",width:p,height:p,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},h),React.createElement("polyline",{points:"20 6 9 17 4 12"}))});Check.propTypes={color:PropTypes.string,size:PropTypes.oneOfType([PropTypes.string,PropTypes.number])};Check.displayName="Check";function _extends$t(){return _extends$t=Object.assign||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$t.apply(this,arguments)}function _objectWithoutProperties$p(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$o(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$o(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}var Copy=reactExports.forwardRef(function(n,o){var e=n.color,t=e===void 0?"currentColor":e,c=n.size,p=c===void 0?24:c,h=_objectWithoutProperties$p(n,["color","size"]);return React.createElement("svg",_extends$t({ref:o,xmlns:"http://www.w3.org/2000/svg",width:p,height:p,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},h),React.createElement("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),React.createElement("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}))});Copy.propTypes={color:PropTypes.string,size:PropTypes.oneOfType([PropTypes.string,PropTypes.number])};Copy.displayName="Copy";function _extends$s(){return _extends$s=Object.assign||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$s.apply(this,arguments)}function _objectWithoutProperties$o(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$n(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$n(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}var HelpCircle=reactExports.forwardRef(function(n,o){var e=n.color,t=e===void 0?"currentColor":e,c=n.size,p=c===void 0?24:c,h=_objectWithoutProperties$o(n,["color","size"]);return React.createElement("svg",_extends$s({ref:o,xmlns:"http://www.w3.org/2000/svg",width:p,height:p,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},h),React.createElement("circle",{cx:"12",cy:"12",r:"10"}),React.createElement("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),React.createElement("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"}))});HelpCircle.propTypes={color:PropTypes.string,size:PropTypes.oneOfType([PropTypes.string,PropTypes.number])};HelpCircle.displayName="HelpCircle";function _extends$r(){return _extends$r=Object.assign||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$r.apply(this,arguments)}function _objectWithoutProperties$n(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$m(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$m(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}var Link2=reactExports.forwardRef(function(n,o){var e=n.color,t=e===void 0?"currentColor":e,c=n.size,p=c===void 0?24:c,h=_objectWithoutProperties$n(n,["color","size"]);return React.createElement("svg",_extends$r({ref:o,xmlns:"http://www.w3.org/2000/svg",width:p,height:p,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},h),React.createElement("path",{d:"M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"}),React.createElement("line",{x1:"8",y1:"12",x2:"16",y2:"12"}))});Link2.propTypes={color:PropTypes.string,size:PropTypes.oneOfType([PropTypes.string,PropTypes.number])};Link2.displayName="Link2";function ok(){}function unreachable(){}function parse$2(n){const o=[],e=String(n||"");let t=e.indexOf(","),c=0,p=!1;for(;!p;){t===-1&&(t=e.length,p=!0);const h=e.slice(c,t).trim();(h||!p)&&o.push(h),c=t+1,t=e.indexOf(",",c)}return o}function stringify$1(n,o){const e={};return(n[n.length-1]===""?[...n,""]:n).join((e.padRight?" ":"")+","+(e.padLeft===!1?"":" ")).trim()}const nameRe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nameReJsx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,emptyOptions$5={};function name(n,o){return(emptyOptions$5.jsx?nameReJsx:nameRe).test(n)}const re=/[ \t\n\f\r]/g;function whitespace(n){return typeof n=="object"?n.type==="text"?empty(n.value):!1:empty(n)}function empty(n){return n.replace(re,"")===""}class Schema{constructor(o,e,t){this.normal=e,this.property=o,t&&(this.space=t)}}Schema.prototype.normal={};Schema.prototype.property={};Schema.prototype.space=void 0;function merge(n,o){const e={},t={};for(const c of n)Object.assign(e,c.property),Object.assign(t,c.normal);return new Schema(e,t,o)}function normalize$1(n){return n.toLowerCase()}class Info{constructor(o,e){this.attribute=e,this.property=o}}Info.prototype.attribute="";Info.prototype.booleanish=!1;Info.prototype.boolean=!1;Info.prototype.commaOrSpaceSeparated=!1;Info.prototype.commaSeparated=!1;Info.prototype.defined=!1;Info.prototype.mustUseProperty=!1;Info.prototype.number=!1;Info.prototype.overloadedBoolean=!1;Info.prototype.property="";Info.prototype.spaceSeparated=!1;Info.prototype.space=void 0;let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const types$1=Object.freeze(Object.defineProperty({__proto__:null,boolean,booleanish,commaOrSpaceSeparated,commaSeparated,number,overloadedBoolean,spaceSeparated},Symbol.toStringTag,{value:"Module"})),checks=Object.keys(types$1);class DefinedInfo extends Info{constructor(o,e,t,c){let p=-1;if(super(o,e),mark$1(this,"space",c),typeof t=="number")for(;++p<checks.length;){const h=checks[p];mark$1(this,checks[p],(t&types$1[h])===types$1[h])}}}DefinedInfo.prototype.defined=!0;function mark$1(n,o,e){e&&(n[o]=e)}function create(n){const o={},e={};for(const[t,c]of Object.entries(n.properties)){const p=new DefinedInfo(t,n.transform(n.attributes||{},t),c,n.space);n.mustUseProperty&&n.mustUseProperty.includes(t)&&(p.mustUseProperty=!0),o[t]=p,e[normalize$1(t)]=t,e[normalize$1(p.attribute)]=t}return new Schema(o,e,n.space)}const aria=create({properties:{ariaActiveDescendant:null,ariaAtomic:booleanish,ariaAutoComplete:null,ariaBusy:booleanish,ariaChecked:booleanish,ariaColCount:number,ariaColIndex:number,ariaColSpan:number,ariaControls:spaceSeparated,ariaCurrent:null,ariaDescribedBy:spaceSeparated,ariaDetails:null,ariaDisabled:booleanish,ariaDropEffect:spaceSeparated,ariaErrorMessage:null,ariaExpanded:booleanish,ariaFlowTo:spaceSeparated,ariaGrabbed:booleanish,ariaHasPopup:null,ariaHidden:booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated,ariaLevel:number,ariaLive:null,ariaModal:booleanish,ariaMultiLine:booleanish,ariaMultiSelectable:booleanish,ariaOrientation:null,ariaOwns:spaceSeparated,ariaPlaceholder:null,ariaPosInSet:number,ariaPressed:booleanish,ariaReadOnly:booleanish,ariaRelevant:null,ariaRequired:booleanish,ariaRoleDescription:spaceSeparated,ariaRowCount:number,ariaRowIndex:number,ariaRowSpan:number,ariaSelected:booleanish,ariaSetSize:number,ariaSort:null,ariaValueMax:number,ariaValueMin:number,ariaValueNow:number,ariaValueText:null,role:null},transform(n,o){return o==="role"?o:"aria-"+o.slice(4).toLowerCase()}});function caseSensitiveTransform(n,o){return o in n?n[o]:o}function caseInsensitiveTransform(n,o){return caseSensitiveTransform(n,o.toLowerCase())}const html$3=create({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated,acceptCharset:spaceSeparated,accessKey:spaceSeparated,action:null,allow:null,allowFullScreen:boolean,allowPaymentRequest:boolean,allowUserMedia:boolean,alt:null,as:null,async:boolean,autoCapitalize:null,autoComplete:spaceSeparated,autoFocus:boolean,autoPlay:boolean,blocking:spaceSeparated,capture:null,charSet:null,checked:boolean,cite:null,className:spaceSeparated,cols:number,colSpan:null,content:null,contentEditable:booleanish,controls:boolean,controlsList:spaceSeparated,coords:number|commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean,defer:boolean,dir:null,dirName:null,disabled:boolean,download:overloadedBoolean,draggable:booleanish,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean,formTarget:null,headers:spaceSeparated,height:number,hidden:overloadedBoolean,high:number,href:null,hrefLang:null,htmlFor:spaceSeparated,httpEquiv:spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inert:boolean,inputMode:null,integrity:null,is:null,isMap:boolean,itemId:null,itemProp:spaceSeparated,itemRef:spaceSeparated,itemScope:boolean,itemType:spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean,low:number,manifest:null,max:null,maxLength:number,media:null,method:null,min:null,minLength:number,multiple:boolean,muted:boolean,name:null,nonce:null,noModule:boolean,noValidate:boolean,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:boolean,optimum:number,pattern:null,ping:spaceSeparated,placeholder:null,playsInline:boolean,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:boolean,referrerPolicy:null,rel:spaceSeparated,required:boolean,reversed:boolean,rows:number,rowSpan:number,sandbox:spaceSeparated,scope:null,scoped:boolean,seamless:boolean,selected:boolean,shadowRootClonable:boolean,shadowRootDelegatesFocus:boolean,shadowRootMode:null,shape:null,size:number,sizes:null,slot:null,span:number,spellCheck:booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:number,step:null,style:null,tabIndex:number,target:null,title:null,translate:null,type:null,typeMustMatch:boolean,useMap:null,value:booleanish,width:number,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number,borderColor:null,bottomMargin:number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number,leftMargin:number,link:null,longDesc:null,lowSrc:null,marginHeight:number,marginWidth:number,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean,disableRemotePlayback:boolean,prefix:null,property:null,results:number,security:null,unselectable:null},space:"html",transform:caseInsensitiveTransform}),svg$1=create({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:commaOrSpaceSeparated,accentHeight:number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number,amplitude:number,arabicForm:null,ascent:number,attributeName:null,attributeType:null,azimuth:number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number,by:null,calcMode:null,capHeight:number,className:spaceSeparated,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:number,diffuseConstant:number,direction:null,display:null,dur:null,divisor:number,dominantBaseline:null,download:boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:number,enableBackground:null,end:null,event:null,exponent:number,externalResourcesRequired:null,fill:null,fillOpacity:number,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:commaSeparated,g2:commaSeparated,glyphName:commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number,horizOriginX:number,horizOriginY:number,id:null,ideographic:number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number,k:number,k1:number,k2:number,k3:number,k4:number,kernelMatrix:commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number,overlineThickness:number,paintOrder:null,panose1:null,path:null,pathLength:number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number,pointsAtY:number,pointsAtZ:number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated,rev:commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated,requiredFeatures:commaOrSpaceSeparated,requiredFonts:commaOrSpaceSeparated,requiredFormats:commaOrSpaceSeparated,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:number,specularExponent:number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number,strikethroughThickness:number,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number,strokeOpacity:number,strokeWidth:null,style:null,surfaceScale:number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated,tabIndex:number,tableValues:null,target:null,targetX:number,targetY:number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:number,underlineThickness:number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number,values:null,vAlphabetic:number,vMathematical:number,vectorEffect:null,vHanging:number,vIdeographic:number,version:null,vertAdvY:number,vertOriginX:number,vertOriginY:number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:caseSensitiveTransform}),xlink=create({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,o){return"xlink:"+o.slice(5).toLowerCase()}}),xmlns=create({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:caseInsensitiveTransform}),xml=create({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,o){return"xml:"+o.slice(3).toLowerCase()}}),hastToReact={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},cap$1=/[A-Z]/g,dash=/-[a-z]/g,valid=/^data[-\w.:]+$/i;function find(n,o){const e=normalize$1(o);let t=o,c=Info;if(e in n.normal)return n.property[n.normal[e]];if(e.length>4&&e.slice(0,4)==="data"&&valid.test(o)){if(o.charAt(4)==="-"){const p=o.slice(5).replace(dash,camelcase);t="data"+p.charAt(0).toUpperCase()+p.slice(1)}else{const p=o.slice(4);if(!dash.test(p)){let h=p.replace(cap$1,kebab);h.charAt(0)!=="-"&&(h="-"+h),o="data"+h}}c=DefinedInfo}return new c(t,o)}function kebab(n){return"-"+n.toLowerCase()}function camelcase(n){return n.charAt(1).toUpperCase()}const html$2=merge([aria,html$3,xlink,xmlns,xml],"html"),svg=merge([aria,svg$1,xlink,xmlns,xml],"svg");function parse$1(n){const o=String(n||"").trim();return o?o.split(/[ \t\n\r\f]+/g):[]}function stringify(n){return n.join(" ").trim()}var cjs$1={},inlineStyleParser,hasRequiredInlineStyleParser;function requireInlineStyleParser(){if(hasRequiredInlineStyleParser)return inlineStyleParser;hasRequiredInlineStyleParser=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,o=/\n/g,e=/^\s*/,t=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,c=/^:\s*/,p=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,h=/^[;\s]*/,y=/^\s+|\s+$/g,g=`
48
48
  `,$="/",E="*",A="",N="comment",H="declaration";inlineStyleParser=function(X,be){if(typeof X!="string")throw new TypeError("First argument must be a string");if(!X)return[];be=be||{};var we=1,$e=1;function Ce(Xe){var Ke=Xe.match(o);Ke&&(we+=Ke.length);var ze=Xe.lastIndexOf(g);$e=~ze?Xe.length-ze:$e+Xe.length}function Ie(){var Xe={line:we,column:$e};return function(Ke){return Ke.position=new Ne(Xe),Ge(),Ke}}function Ne(Xe){this.start=Xe,this.end={line:we,column:$e},this.source=be.source}Ne.prototype.content=X;function Fe(Xe){var Ke=new Error(be.source+":"+we+":"+$e+": "+Xe);if(Ke.reason=Xe,Ke.filename=be.source,Ke.line=we,Ke.column=$e,Ke.source=X,!be.silent)throw Ke}function Be(Xe){var Ke=Xe.exec(X);if(Ke){var ze=Ke[0];return Ce(ze),X=X.slice(ze.length),Ke}}function Ge(){Be(e)}function je(Xe){var Ke;for(Xe=Xe||[];Ke=De();)Ke!==!1&&Xe.push(Ke);return Xe}function De(){var Xe=Ie();if(!($!=X.charAt(0)||E!=X.charAt(1))){for(var Ke=2;A!=X.charAt(Ke)&&(E!=X.charAt(Ke)||$!=X.charAt(Ke+1));)++Ke;if(Ke+=2,A===X.charAt(Ke-1))return Fe("End of comment missing");var ze=X.slice(2,Ke-2);return $e+=2,Ce(ze),X=X.slice(Ke),$e+=2,Xe({type:N,comment:ze})}}function Ue(){var Xe=Ie(),Ke=Be(t);if(Ke){if(De(),!Be(c))return Fe("property missing ':'");var ze=Be(p),nt=Xe({type:H,property:Z(Ke[0].replace(n,A)),value:ze?Z(ze[0].replace(n,A)):A});return Be(h),nt}}function Je(){var Xe=[];je(Xe);for(var Ke;Ke=Ue();)Ke!==!1&&(Xe.push(Ke),je(Xe));return Xe}return Ge(),Je()};function Z(X){return X?X.replace(y,A):A}return inlineStyleParser}var hasRequiredCjs$1;function requireCjs$1(){if(hasRequiredCjs$1)return cjs$1;hasRequiredCjs$1=1;var n=cjs$1&&cjs$1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cjs$1,"__esModule",{value:!0}),cjs$1.default=e;var o=n(requireInlineStyleParser());function e(t,c){var p=null;if(!t||typeof t!="string")return p;var h=(0,o.default)(t),y=typeof c=="function";return h.forEach(function(g){if(g.type==="declaration"){var $=g.property,E=g.value;y?c($,E,g):E&&(p=p||{},p[$]=E)}}),p}return cjs$1}var utilities={},hasRequiredUtilities;function requireUtilities(){if(hasRequiredUtilities)return utilities;hasRequiredUtilities=1,Object.defineProperty(utilities,"__esModule",{value:!0}),utilities.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,o=/-([a-z])/g,e=/^[^-]+$/,t=/^-(webkit|moz|ms|o|khtml)-/,c=/^-(ms)-/,p=function($){return!$||e.test($)||n.test($)},h=function($,E){return E.toUpperCase()},y=function($,E){return"".concat(E,"-")},g=function($,E){return E===void 0&&(E={}),p($)?$:($=$.toLowerCase(),E.reactCompat?$=$.replace(c,y):$=$.replace(t,y),$.replace(o,h))};return utilities.camelCase=g,utilities}var cjs,hasRequiredCjs;function requireCjs(){if(hasRequiredCjs)return cjs;hasRequiredCjs=1;var n=cjs&&cjs.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},o=n(requireCjs$1()),e=requireUtilities();function t(c,p){var h={};return!c||typeof c!="string"||(0,o.default)(c,function(y,g){y&&g&&(h[(0,e.camelCase)(y,p)]=g)}),h}return t.default=t,cjs=t,cjs}var cjsExports=requireCjs();const styleToJs=getDefaultExportFromCjs(cjsExports),pointEnd=point$2("end"),pointStart=point$2("start");function point$2(n){return o;function o(e){const t=e&&e.position&&e.position[n]||{};if(typeof t.line=="number"&&t.line>0&&typeof t.column=="number"&&t.column>0)return{line:t.line,column:t.column,offset:typeof t.offset=="number"&&t.offset>-1?t.offset:void 0}}}function position$1(n){const o=pointStart(n),e=pointEnd(n);if(o&&e)return{start:o,end:e}}function stringifyPosition(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?position(n.position):"start"in n||"end"in n?position(n):"line"in n||"column"in n?point$1(n):""}function point$1(n){return index$1(n&&n.line)+":"+index$1(n&&n.column)}function position(n){return point$1(n&&n.start)+"-"+point$1(n&&n.end)}function index$1(n){return n&&typeof n=="number"?n:1}class VFileMessage extends Error{constructor(o,e,t){super(),typeof e=="string"&&(t=e,e=void 0);let c="",p={},h=!1;if(e&&("line"in e&&"column"in e?p={place:e}:"start"in e&&"end"in e?p={place:e}:"type"in e?p={ancestors:[e],place:e.position}:p={...e}),typeof o=="string"?c=o:!p.cause&&o&&(h=!0,c=o.message,p.cause=o),!p.ruleId&&!p.source&&typeof t=="string"){const g=t.indexOf(":");g===-1?p.ruleId=t:(p.source=t.slice(0,g),p.ruleId=t.slice(g+1))}if(!p.place&&p.ancestors&&p.ancestors){const g=p.ancestors[p.ancestors.length-1];g&&(p.place=g.position)}const y=p.place&&"start"in p.place?p.place.start:p.place;this.ancestors=p.ancestors||void 0,this.cause=p.cause||void 0,this.column=y?y.column:void 0,this.fatal=void 0,this.file,this.message=c,this.line=y?y.line:void 0,this.name=stringifyPosition(p.place)||"1:1",this.place=p.place||void 0,this.reason=this.message,this.ruleId=p.ruleId||void 0,this.source=p.source||void 0,this.stack=h&&p.cause&&typeof p.cause.stack=="string"?p.cause.stack:"",this.actual,this.expected,this.note,this.url}}VFileMessage.prototype.file="";VFileMessage.prototype.name="";VFileMessage.prototype.reason="";VFileMessage.prototype.message="";VFileMessage.prototype.stack="";VFileMessage.prototype.column=void 0;VFileMessage.prototype.line=void 0;VFileMessage.prototype.ancestors=void 0;VFileMessage.prototype.cause=void 0;VFileMessage.prototype.fatal=void 0;VFileMessage.prototype.place=void 0;VFileMessage.prototype.ruleId=void 0;VFileMessage.prototype.source=void 0;const own$4={}.hasOwnProperty,emptyMap=new Map,cap=/[A-Z]/g,tableElements=new Set(["table","tbody","thead","tfoot","tr"]),tableCellElement=new Set(["td","th"]),docs="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function toJsxRuntime(n,o){if(!o||o.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const e=o.filePath||void 0;let t;if(o.development){if(typeof o.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");t=developmentCreate(e,o.jsxDEV)}else{if(typeof o.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof o.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");t=productionCreate(e,o.jsx,o.jsxs)}const c={Fragment:o.Fragment,ancestors:[],components:o.components||{},create:t,elementAttributeNameCase:o.elementAttributeNameCase||"react",evaluater:o.createEvaluater?o.createEvaluater():void 0,filePath:e,ignoreInvalidStyle:o.ignoreInvalidStyle||!1,passKeys:o.passKeys!==!1,passNode:o.passNode||!1,schema:o.space==="svg"?svg:html$2,stylePropertyNameCase:o.stylePropertyNameCase||"dom",tableCellAlignToStyle:o.tableCellAlignToStyle!==!1},p=one$1(c,n,void 0);return p&&typeof p!="string"?p:c.create(n,c.Fragment,{children:p||void 0},void 0)}function one$1(n,o,e){if(o.type==="element")return element$1(n,o,e);if(o.type==="mdxFlowExpression"||o.type==="mdxTextExpression")return mdxExpression(n,o);if(o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement")return mdxJsxElement(n,o,e);if(o.type==="mdxjsEsm")return mdxEsm(n,o);if(o.type==="root")return root$3(n,o,e);if(o.type==="text")return text$5(n,o)}function element$1(n,o,e){const t=n.schema;let c=t;o.tagName.toLowerCase()==="svg"&&t.space==="html"&&(c=svg,n.schema=c),n.ancestors.push(o);const p=findComponentFromName(n,o.tagName,!1),h=createElementProps(n,o);let y=createChildren(n,o);return tableElements.has(o.tagName)&&(y=y.filter(function(g){return typeof g=="string"?!whitespace(g):!0})),addNode(n,h,p,o),addChildren(h,y),n.ancestors.pop(),n.schema=t,n.create(o,p,h,e)}function mdxExpression(n,o){if(o.data&&o.data.estree&&n.evaluater){const t=o.data.estree.body[0];return t.type,n.evaluater.evaluateExpression(t.expression)}crashEstree(n,o.position)}function mdxEsm(n,o){if(o.data&&o.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(o.data.estree);crashEstree(n,o.position)}function mdxJsxElement(n,o,e){const t=n.schema;let c=t;o.name==="svg"&&t.space==="html"&&(c=svg,n.schema=c),n.ancestors.push(o);const p=o.name===null?n.Fragment:findComponentFromName(n,o.name,!0),h=createJsxElementProps(n,o),y=createChildren(n,o);return addNode(n,h,p,o),addChildren(h,y),n.ancestors.pop(),n.schema=t,n.create(o,p,h,e)}function root$3(n,o,e){const t={};return addChildren(t,createChildren(n,o)),n.create(o,n.Fragment,t,e)}function text$5(n,o){return o.value}function addNode(n,o,e,t){typeof e!="string"&&e!==n.Fragment&&n.passNode&&(o.node=t)}function addChildren(n,o){if(o.length>0){const e=o.length>1?o:o[0];e&&(n.children=e)}}function productionCreate(n,o,e){return t;function t(c,p,h,y){const $=Array.isArray(h.children)?e:o;return y?$(p,h,y):$(p,h)}}function developmentCreate(n,o){return e;function e(t,c,p,h){const y=Array.isArray(p.children),g=pointStart(t);return o(c,p,h,y,{columnNumber:g?g.column-1:void 0,fileName:n,lineNumber:g?g.line:void 0},void 0)}}function createElementProps(n,o){const e={};let t,c;for(c in o.properties)if(c!=="children"&&own$4.call(o.properties,c)){const p=createProperty(n,c,o.properties[c]);if(p){const[h,y]=p;n.tableCellAlignToStyle&&h==="align"&&typeof y=="string"&&tableCellElement.has(o.tagName)?t=y:e[h]=y}}if(t){const p=e.style||(e.style={});p[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=t}return e}function createJsxElementProps(n,o){const e={};for(const t of o.attributes)if(t.type==="mdxJsxExpressionAttribute")if(t.data&&t.data.estree&&n.evaluater){const p=t.data.estree.body[0];p.type;const h=p.expression;h.type;const y=h.properties[0];y.type,Object.assign(e,n.evaluater.evaluateExpression(y.argument))}else crashEstree(n,o.position);else{const c=t.name;let p;if(t.value&&typeof t.value=="object")if(t.value.data&&t.value.data.estree&&n.evaluater){const y=t.value.data.estree.body[0];y.type,p=n.evaluater.evaluateExpression(y.expression)}else crashEstree(n,o.position);else p=t.value===null?!0:t.value;e[c]=p}return e}function createChildren(n,o){const e=[];let t=-1;const c=n.passKeys?new Map:emptyMap;for(;++t<o.children.length;){const p=o.children[t];let h;if(n.passKeys){const g=p.type==="element"?p.tagName:p.type==="mdxJsxFlowElement"||p.type==="mdxJsxTextElement"?p.name:void 0;if(g){const $=c.get(g)||0;h=g+"-"+$,c.set(g,$+1)}}const y=one$1(n,p,h);y!==void 0&&e.push(y)}return e}function createProperty(n,o,e){const t=find(n.schema,o);if(!(e==null||typeof e=="number"&&Number.isNaN(e))){if(Array.isArray(e)&&(e=t.commaSeparated?stringify$1(e):stringify(e)),t.property==="style"){let c=typeof e=="object"?e:parseStyle(n,String(e));return n.stylePropertyNameCase==="css"&&(c=transformStylesToCssCasing(c)),["style",c]}return[n.elementAttributeNameCase==="react"&&t.space?hastToReact[t.property]||t.property:t.attribute,e]}}function parseStyle(n,o){try{return styleToJs(o,{reactCompat:!0})}catch(e){if(n.ignoreInvalidStyle)return{};const t=e,c=new VFileMessage("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw c.file=n.filePath||void 0,c.url=docs+"#cannot-parse-style-attribute",c}}function findComponentFromName(n,o,e){let t;if(!e)t={type:"Literal",value:o};else if(o.includes(".")){const c=o.split(".");let p=-1,h;for(;++p<c.length;){const y=name(c[p])?{type:"Identifier",name:c[p]}:{type:"Literal",value:c[p]};h=h?{type:"MemberExpression",object:h,property:y,computed:!!(p&&y.type==="Literal"),optional:!1}:y}t=h}else t=name(o)&&!/^[a-z]/.test(o)?{type:"Identifier",name:o}:{type:"Literal",value:o};if(t.type==="Literal"){const c=t.value;return own$4.call(n.components,c)?n.components[c]:c}if(n.evaluater)return n.evaluater.evaluateExpression(t);crashEstree(n)}function crashEstree(n,o){const e=new VFileMessage("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:o,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw e.file=n.filePath||void 0,e.url=docs+"#cannot-handle-mdx-estrees-without-createevaluater",e}function transformStylesToCssCasing(n){const o={};let e;for(e in n)own$4.call(n,e)&&(o[transformStyleToCssCasing(e)]=n[e]);return o}function transformStyleToCssCasing(n){let o=n.replace(cap,toDash);return o.slice(0,3)==="ms-"&&(o="-"+o),o}function toDash(n){return"-"+n.toLowerCase()}const urlAttributes={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},emptyOptions$4={};function toString$1(n,o){const e=emptyOptions$4,t=typeof e.includeImageAlt=="boolean"?e.includeImageAlt:!0,c=typeof e.includeHtml=="boolean"?e.includeHtml:!0;return one(n,t,c)}function one(n,o,e){if(node(n)){if("value"in n)return n.type==="html"&&!e?"":n.value;if(o&&"alt"in n&&n.alt)return n.alt;if("children"in n)return all(n.children,o,e)}return Array.isArray(n)?all(n,o,e):""}function all(n,o,e){const t=[];let c=-1;for(;++c<n.length;)t[c]=one(n[c],o,e);return t.join("")}function node(n){return!!(n&&typeof n=="object")}const element=document.createElement("i");function decodeNamedCharacterReference(n){const o="&"+n+";";element.innerHTML=o;const e=element.textContent;return e.charCodeAt(e.length-1)===59&&n!=="semi"||e===o?!1:e}function splice(n,o,e,t){const c=n.length;let p=0,h;if(o<0?o=-o>c?0:c+o:o=o>c?c:o,e=e>0?e:0,t.length<1e4)h=Array.from(t),h.unshift(o,e),n.splice(...h);else for(e&&n.splice(o,e);p<t.length;)h=t.slice(p,p+1e4),h.unshift(o,0),n.splice(...h),p+=1e4,o+=1e4}function push(n,o){return n.length>0?(splice(n,n.length,0,o),n):o}const hasOwnProperty={}.hasOwnProperty;function combineExtensions(n){const o={};let e=-1;for(;++e<n.length;)syntaxExtension(o,n[e]);return o}function syntaxExtension(n,o){let e;for(e in o){const c=(hasOwnProperty.call(n,e)?n[e]:void 0)||(n[e]={}),p=o[e];let h;if(p)for(h in p){hasOwnProperty.call(c,h)||(c[h]=[]);const y=p[h];constructs(c[h],Array.isArray(y)?y:y?[y]:[])}}}function constructs(n,o){let e=-1;const t=[];for(;++e<o.length;)(o[e].add==="after"?n:t).push(o[e]);splice(n,0,0,t)}function decodeNumericCharacterReference(n,o){const e=Number.parseInt(n,o);return e<9||e===11||e>13&&e<32||e>126&&e<160||e>55295&&e<57344||e>64975&&e<65008||(e&65535)===65535||(e&65535)===65534||e>1114111?"�":String.fromCodePoint(e)}function normalizeIdentifier(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const asciiAlpha=regexCheck(/[A-Za-z]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(n){return n!==null&&(n<32||n===127)}const asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(n){return n!==null&&n<-2}function markdownLineEndingOrSpace(n){return n!==null&&(n<0||n===32)}function markdownSpace(n){return n===-2||n===-1||n===32}const unicodePunctuation=regexCheck(new RegExp("\\p{P}|\\p{S}","u")),unicodeWhitespace=regexCheck(/\s/);function regexCheck(n){return o;function o(e){return e!==null&&e>-1&&n.test(String.fromCharCode(e))}}function normalizeUri(n){const o=[];let e=-1,t=0,c=0;for(;++e<n.length;){const p=n.charCodeAt(e);let h="";if(p===37&&asciiAlphanumeric(n.charCodeAt(e+1))&&asciiAlphanumeric(n.charCodeAt(e+2)))c=2;else if(p<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(p))||(h=String.fromCharCode(p));else if(p>55295&&p<57344){const y=n.charCodeAt(e+1);p<56320&&y>56319&&y<57344?(h=String.fromCharCode(p,y),c=1):h="�"}else h=String.fromCharCode(p);h&&(o.push(n.slice(t,e),encodeURIComponent(h)),t=e+c+1,h=""),c&&(e+=c,c=0)}return o.join("")+n.slice(t)}function factorySpace(n,o,e,t){const c=t?t-1:Number.POSITIVE_INFINITY;let p=0;return h;function h(g){return markdownSpace(g)?(n.enter(e),y(g)):o(g)}function y(g){return markdownSpace(g)&&p++<c?(n.consume(g),y):(n.exit(e),o(g))}}const content$1={tokenize:initializeContent};function initializeContent(n){const o=n.attempt(this.parser.constructs.contentInitial,t,c);let e;return o;function t(y){if(y===null){n.consume(y);return}return n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),factorySpace(n,o,"linePrefix")}function c(y){return n.enter("paragraph"),p(y)}function p(y){const g=n.enter("chunkText",{contentType:"text",previous:e});return e&&(e.next=g),e=g,h(y)}function h(y){if(y===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(y);return}return markdownLineEnding(y)?(n.consume(y),n.exit("chunkText"),p):(n.consume(y),h)}}const document$2={tokenize:initializeDocument},containerConstruct={tokenize:tokenizeContainer};function initializeDocument(n){const o=this,e=[];let t=0,c,p,h;return y;function y(Ce){if(t<e.length){const Ie=e[t];return o.containerState=Ie[1],n.attempt(Ie[0].continuation,g,$)(Ce)}return $(Ce)}function g(Ce){if(t++,o.containerState._closeFlow){o.containerState._closeFlow=void 0,c&&$e();const Ie=o.events.length;let Ne=Ie,Fe;for(;Ne--;)if(o.events[Ne][0]==="exit"&&o.events[Ne][1].type==="chunkFlow"){Fe=o.events[Ne][1].end;break}we(t);let Be=Ie;for(;Be<o.events.length;)o.events[Be][1].end={...Fe},Be++;return splice(o.events,Ne+1,0,o.events.slice(Ie)),o.events.length=Be,$(Ce)}return y(Ce)}function $(Ce){if(t===e.length){if(!c)return N(Ce);if(c.currentConstruct&&c.currentConstruct.concrete)return Z(Ce);o.interrupt=!!(c.currentConstruct&&!c._gfmTableDynamicInterruptHack)}return o.containerState={},n.check(containerConstruct,E,A)(Ce)}function E(Ce){return c&&$e(),we(t),N(Ce)}function A(Ce){return o.parser.lazy[o.now().line]=t!==e.length,h=o.now().offset,Z(Ce)}function N(Ce){return o.containerState={},n.attempt(containerConstruct,H,Z)(Ce)}function H(Ce){return t++,e.push([o.currentConstruct,o.containerState]),N(Ce)}function Z(Ce){if(Ce===null){c&&$e(),we(0),n.consume(Ce);return}return c=c||o.parser.flow(o.now()),n.enter("chunkFlow",{_tokenizer:c,contentType:"flow",previous:p}),X(Ce)}function X(Ce){if(Ce===null){be(n.exit("chunkFlow"),!0),we(0),n.consume(Ce);return}return markdownLineEnding(Ce)?(n.consume(Ce),be(n.exit("chunkFlow")),t=0,o.interrupt=void 0,y):(n.consume(Ce),X)}function be(Ce,Ie){const Ne=o.sliceStream(Ce);if(Ie&&Ne.push(null),Ce.previous=p,p&&(p.next=Ce),p=Ce,c.defineSkip(Ce.start),c.write(Ne),o.parser.lazy[Ce.start.line]){let Fe=c.events.length;for(;Fe--;)if(c.events[Fe][1].start.offset<h&&(!c.events[Fe][1].end||c.events[Fe][1].end.offset>h))return;const Be=o.events.length;let Ge=Be,je,De;for(;Ge--;)if(o.events[Ge][0]==="exit"&&o.events[Ge][1].type==="chunkFlow"){if(je){De=o.events[Ge][1].end;break}je=!0}for(we(t),Fe=Be;Fe<o.events.length;)o.events[Fe][1].end={...De},Fe++;splice(o.events,Ge+1,0,o.events.slice(Be)),o.events.length=Fe}}function we(Ce){let Ie=e.length;for(;Ie-- >Ce;){const Ne=e[Ie];o.containerState=Ne[1],Ne[0].exit.call(o,n)}e.length=Ce}function $e(){c.write([null]),p=void 0,c=void 0,o.containerState._closeFlow=void 0}}function tokenizeContainer(n,o,e){return factorySpace(n,n.attempt(this.parser.constructs.document,o,e),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function classifyCharacter(n){if(n===null||markdownLineEndingOrSpace(n)||unicodeWhitespace(n))return 1;if(unicodePunctuation(n))return 2}function resolveAll(n,o,e){const t=[];let c=-1;for(;++c<n.length;){const p=n[c].resolveAll;p&&!t.includes(p)&&(o=p(o,e),t.push(p))}return o}const attention={name:"attention",resolveAll:resolveAllAttention,tokenize:tokenizeAttention};function resolveAllAttention(n,o){let e=-1,t,c,p,h,y,g,$,E;for(;++e<n.length;)if(n[e][0]==="enter"&&n[e][1].type==="attentionSequence"&&n[e][1]._close){for(t=e;t--;)if(n[t][0]==="exit"&&n[t][1].type==="attentionSequence"&&n[t][1]._open&&o.sliceSerialize(n[t][1]).charCodeAt(0)===o.sliceSerialize(n[e][1]).charCodeAt(0)){if((n[t][1]._close||n[e][1]._open)&&(n[e][1].end.offset-n[e][1].start.offset)%3&&!((n[t][1].end.offset-n[t][1].start.offset+n[e][1].end.offset-n[e][1].start.offset)%3))continue;g=n[t][1].end.offset-n[t][1].start.offset>1&&n[e][1].end.offset-n[e][1].start.offset>1?2:1;const A={...n[t][1].end},N={...n[e][1].start};movePoint(A,-g),movePoint(N,g),h={type:g>1?"strongSequence":"emphasisSequence",start:A,end:{...n[t][1].end}},y={type:g>1?"strongSequence":"emphasisSequence",start:{...n[e][1].start},end:N},p={type:g>1?"strongText":"emphasisText",start:{...n[t][1].end},end:{...n[e][1].start}},c={type:g>1?"strong":"emphasis",start:{...h.start},end:{...y.end}},n[t][1].end={...h.start},n[e][1].start={...y.end},$=[],n[t][1].end.offset-n[t][1].start.offset&&($=push($,[["enter",n[t][1],o],["exit",n[t][1],o]])),$=push($,[["enter",c,o],["enter",h,o],["exit",h,o],["enter",p,o]]),$=push($,resolveAll(o.parser.constructs.insideSpan.null,n.slice(t+1,e),o)),$=push($,[["exit",p,o],["enter",y,o],["exit",y,o],["exit",c,o]]),n[e][1].end.offset-n[e][1].start.offset?(E=2,$=push($,[["enter",n[e][1],o],["exit",n[e][1],o]])):E=0,splice(n,t-1,e-t+3,$),e=t+$.length-E-2;break}}for(e=-1;++e<n.length;)n[e][1].type==="attentionSequence"&&(n[e][1].type="data");return n}function tokenizeAttention(n,o){const e=this.parser.constructs.attentionMarkers.null,t=this.previous,c=classifyCharacter(t);let p;return h;function h(g){return p=g,n.enter("attentionSequence"),y(g)}function y(g){if(g===p)return n.consume(g),y;const $=n.exit("attentionSequence"),E=classifyCharacter(g),A=!E||E===2&&c||e.includes(g),N=!c||c===2&&E||e.includes(t);return $._open=!!(p===42?A:A&&(c||!N)),$._close=!!(p===42?N:N&&(E||!A)),o(g)}}function movePoint(n,o){n.column+=o,n.offset+=o,n._bufferIndex+=o}const autolink={name:"autolink",tokenize:tokenizeAutolink};function tokenizeAutolink(n,o,e){let t=0;return c;function c(H){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(H),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),p}function p(H){return asciiAlpha(H)?(n.consume(H),h):H===64?e(H):$(H)}function h(H){return H===43||H===45||H===46||asciiAlphanumeric(H)?(t=1,y(H)):$(H)}function y(H){return H===58?(n.consume(H),t=0,g):(H===43||H===45||H===46||asciiAlphanumeric(H))&&t++<32?(n.consume(H),y):(t=0,$(H))}function g(H){return H===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(H),n.exit("autolinkMarker"),n.exit("autolink"),o):H===null||H===32||H===60||asciiControl(H)?e(H):(n.consume(H),g)}function $(H){return H===64?(n.consume(H),E):asciiAtext(H)?(n.consume(H),$):e(H)}function E(H){return asciiAlphanumeric(H)?A(H):e(H)}function A(H){return H===46?(n.consume(H),t=0,E):H===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(H),n.exit("autolinkMarker"),n.exit("autolink"),o):N(H)}function N(H){if((H===45||asciiAlphanumeric(H))&&t++<63){const Z=H===45?N:A;return n.consume(H),Z}return e(H)}}const blankLine={partial:!0,tokenize:tokenizeBlankLine};function tokenizeBlankLine(n,o,e){return t;function t(p){return markdownSpace(p)?factorySpace(n,c,"linePrefix")(p):c(p)}function c(p){return p===null||markdownLineEnding(p)?o(p):e(p)}}const blockQuote={continuation:{tokenize:tokenizeBlockQuoteContinuation},exit:exit$2,name:"blockQuote",tokenize:tokenizeBlockQuoteStart};function tokenizeBlockQuoteStart(n,o,e){const t=this;return c;function c(h){if(h===62){const y=t.containerState;return y.open||(n.enter("blockQuote",{_container:!0}),y.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(h),n.exit("blockQuoteMarker"),p}return e(h)}function p(h){return markdownSpace(h)?(n.enter("blockQuotePrefixWhitespace"),n.consume(h),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),o):(n.exit("blockQuotePrefix"),o(h))}}function tokenizeBlockQuoteContinuation(n,o,e){const t=this;return c;function c(h){return markdownSpace(h)?factorySpace(n,p,"linePrefix",t.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):p(h)}function p(h){return n.attempt(blockQuote,o,e)(h)}}function exit$2(n){n.exit("blockQuote")}const characterEscape={name:"characterEscape",tokenize:tokenizeCharacterEscape};function tokenizeCharacterEscape(n,o,e){return t;function t(p){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(p),n.exit("escapeMarker"),c}function c(p){return asciiPunctuation(p)?(n.enter("characterEscapeValue"),n.consume(p),n.exit("characterEscapeValue"),n.exit("characterEscape"),o):e(p)}}const characterReference={name:"characterReference",tokenize:tokenizeCharacterReference};function tokenizeCharacterReference(n,o,e){const t=this;let c=0,p,h;return y;function y(A){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(A),n.exit("characterReferenceMarker"),g}function g(A){return A===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(A),n.exit("characterReferenceMarkerNumeric"),$):(n.enter("characterReferenceValue"),p=31,h=asciiAlphanumeric,E(A))}function $(A){return A===88||A===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(A),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),p=6,h=asciiHexDigit,E):(n.enter("characterReferenceValue"),p=7,h=asciiDigit,E(A))}function E(A){if(A===59&&c){const N=n.exit("characterReferenceValue");return h===asciiAlphanumeric&&!decodeNamedCharacterReference(t.sliceSerialize(N))?e(A):(n.enter("characterReferenceMarker"),n.consume(A),n.exit("characterReferenceMarker"),n.exit("characterReference"),o)}return h(A)&&c++<p?(n.consume(A),E):e(A)}}const nonLazyContinuation$1={partial:!0,tokenize:tokenizeNonLazyContinuation$1},codeFenced={concrete:!0,name:"codeFenced",tokenize:tokenizeCodeFenced};function tokenizeCodeFenced(n,o,e){const t=this,c={partial:!0,tokenize:Ne};let p=0,h=0,y;return g;function g(Fe){return $(Fe)}function $(Fe){const Be=t.events[t.events.length-1];return p=Be&&Be[1].type==="linePrefix"?Be[2].sliceSerialize(Be[1],!0).length:0,y=Fe,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),E(Fe)}function E(Fe){return Fe===y?(h++,n.consume(Fe),E):h<3?e(Fe):(n.exit("codeFencedFenceSequence"),markdownSpace(Fe)?factorySpace(n,A,"whitespace")(Fe):A(Fe))}function A(Fe){return Fe===null||markdownLineEnding(Fe)?(n.exit("codeFencedFence"),t.interrupt?o(Fe):n.check(nonLazyContinuation$1,X,Ie)(Fe)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),N(Fe))}function N(Fe){return Fe===null||markdownLineEnding(Fe)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),A(Fe)):markdownSpace(Fe)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),factorySpace(n,H,"whitespace")(Fe)):Fe===96&&Fe===y?e(Fe):(n.consume(Fe),N)}function H(Fe){return Fe===null||markdownLineEnding(Fe)?A(Fe):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),Z(Fe))}function Z(Fe){return Fe===null||markdownLineEnding(Fe)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),A(Fe)):Fe===96&&Fe===y?e(Fe):(n.consume(Fe),Z)}function X(Fe){return n.attempt(c,Ie,be)(Fe)}function be(Fe){return n.enter("lineEnding"),n.consume(Fe),n.exit("lineEnding"),we}function we(Fe){return p>0&&markdownSpace(Fe)?factorySpace(n,$e,"linePrefix",p+1)(Fe):$e(Fe)}function $e(Fe){return Fe===null||markdownLineEnding(Fe)?n.check(nonLazyContinuation$1,X,Ie)(Fe):(n.enter("codeFlowValue"),Ce(Fe))}function Ce(Fe){return Fe===null||markdownLineEnding(Fe)?(n.exit("codeFlowValue"),$e(Fe)):(n.consume(Fe),Ce)}function Ie(Fe){return n.exit("codeFenced"),o(Fe)}function Ne(Fe,Be,Ge){let je=0;return De;function De(ze){return Fe.enter("lineEnding"),Fe.consume(ze),Fe.exit("lineEnding"),Ue}function Ue(ze){return Fe.enter("codeFencedFence"),markdownSpace(ze)?factorySpace(Fe,Je,"linePrefix",t.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ze):Je(ze)}function Je(ze){return ze===y?(Fe.enter("codeFencedFenceSequence"),Xe(ze)):Ge(ze)}function Xe(ze){return ze===y?(je++,Fe.consume(ze),Xe):je>=h?(Fe.exit("codeFencedFenceSequence"),markdownSpace(ze)?factorySpace(Fe,Ke,"whitespace")(ze):Ke(ze)):Ge(ze)}function Ke(ze){return ze===null||markdownLineEnding(ze)?(Fe.exit("codeFencedFence"),Be(ze)):Ge(ze)}}}function tokenizeNonLazyContinuation$1(n,o,e){const t=this;return c;function c(h){return h===null?e(h):(n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),p)}function p(h){return t.parser.lazy[t.now().line]?e(h):o(h)}}const codeIndented={name:"codeIndented",tokenize:tokenizeCodeIndented},furtherStart={partial:!0,tokenize:tokenizeFurtherStart};function tokenizeCodeIndented(n,o,e){const t=this;return c;function c($){return n.enter("codeIndented"),factorySpace(n,p,"linePrefix",5)($)}function p($){const E=t.events[t.events.length-1];return E&&E[1].type==="linePrefix"&&E[2].sliceSerialize(E[1],!0).length>=4?h($):e($)}function h($){return $===null?g($):markdownLineEnding($)?n.attempt(furtherStart,h,g)($):(n.enter("codeFlowValue"),y($))}function y($){return $===null||markdownLineEnding($)?(n.exit("codeFlowValue"),h($)):(n.consume($),y)}function g($){return n.exit("codeIndented"),o($)}}function tokenizeFurtherStart(n,o,e){const t=this;return c;function c(h){return t.parser.lazy[t.now().line]?e(h):markdownLineEnding(h)?(n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),c):factorySpace(n,p,"linePrefix",5)(h)}function p(h){const y=t.events[t.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?o(h):markdownLineEnding(h)?c(h):e(h)}}const codeText={name:"codeText",previous:previous$3,resolve:resolveCodeText,tokenize:tokenizeCodeText};function resolveCodeText(n){let o=n.length-4,e=3,t,c;if((n[e][1].type==="lineEnding"||n[e][1].type==="space")&&(n[o][1].type==="lineEnding"||n[o][1].type==="space")){for(t=e;++t<o;)if(n[t][1].type==="codeTextData"){n[e][1].type="codeTextPadding",n[o][1].type="codeTextPadding",e+=2,o-=2;break}}for(t=e-1,o++;++t<=o;)c===void 0?t!==o&&n[t][1].type!=="lineEnding"&&(c=t):(t===o||n[t][1].type==="lineEnding")&&(n[c][1].type="codeTextData",t!==c+2&&(n[c][1].end=n[t-1][1].end,n.splice(c+2,t-c-2),o-=t-c-2,t=c+2),c=void 0);return n}function previous$3(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function tokenizeCodeText(n,o,e){let t=0,c,p;return h;function h(A){return n.enter("codeText"),n.enter("codeTextSequence"),y(A)}function y(A){return A===96?(n.consume(A),t++,y):(n.exit("codeTextSequence"),g(A))}function g(A){return A===null?e(A):A===32?(n.enter("space"),n.consume(A),n.exit("space"),g):A===96?(p=n.enter("codeTextSequence"),c=0,E(A)):markdownLineEnding(A)?(n.enter("lineEnding"),n.consume(A),n.exit("lineEnding"),g):(n.enter("codeTextData"),$(A))}function $(A){return A===null||A===32||A===96||markdownLineEnding(A)?(n.exit("codeTextData"),g(A)):(n.consume(A),$)}function E(A){return A===96?(n.consume(A),c++,E):c===t?(n.exit("codeTextSequence"),n.exit("codeText"),o(A)):(p.type="codeTextData",$(A))}}class SpliceBuffer{constructor(o){this.left=o?[...o]:[],this.right=[]}get(o){if(o<0||o>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+o+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return o<this.left.length?this.left[o]:this.right[this.right.length-o+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(o,e){const t=e??Number.POSITIVE_INFINITY;return t<this.left.length?this.left.slice(o,t):o>this.left.length?this.right.slice(this.right.length-t+this.left.length,this.right.length-o+this.left.length).reverse():this.left.slice(o).concat(this.right.slice(this.right.length-t+this.left.length).reverse())}splice(o,e,t){const c=e||0;this.setCursor(Math.trunc(o));const p=this.right.splice(this.right.length-c,Number.POSITIVE_INFINITY);return t&&chunkedPush(this.left,t),p.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(o){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(o)}pushMany(o){this.setCursor(Number.POSITIVE_INFINITY),chunkedPush(this.left,o)}unshift(o){this.setCursor(0),this.right.push(o)}unshiftMany(o){this.setCursor(0),chunkedPush(this.right,o.reverse())}setCursor(o){if(!(o===this.left.length||o>this.left.length&&this.right.length===0||o<0&&this.left.length===0))if(o<this.left.length){const e=this.left.splice(o,Number.POSITIVE_INFINITY);chunkedPush(this.right,e.reverse())}else{const e=this.right.splice(this.left.length+this.right.length-o,Number.POSITIVE_INFINITY);chunkedPush(this.left,e.reverse())}}}function chunkedPush(n,o){let e=0;if(o.length<1e4)n.push(...o);else for(;e<o.length;)n.push(...o.slice(e,e+1e4)),e+=1e4}function subtokenize(n){const o={};let e=-1,t,c,p,h,y,g,$;const E=new SpliceBuffer(n);for(;++e<E.length;){for(;e in o;)e=o[e];if(t=E.get(e),e&&t[1].type==="chunkFlow"&&E.get(e-1)[1].type==="listItemPrefix"&&(g=t[1]._tokenizer.events,p=0,p<g.length&&g[p][1].type==="lineEndingBlank"&&(p+=2),p<g.length&&g[p][1].type==="content"))for(;++p<g.length&&g[p][1].type!=="content";)g[p][1].type==="chunkText"&&(g[p][1]._isInFirstContentOfListItem=!0,p++);if(t[0]==="enter")t[1].contentType&&(Object.assign(o,subcontent(E,e)),e=o[e],$=!0);else if(t[1]._container){for(p=e,c=void 0;p--;)if(h=E.get(p),h[1].type==="lineEnding"||h[1].type==="lineEndingBlank")h[0]==="enter"&&(c&&(E.get(c)[1].type="lineEndingBlank"),h[1].type="lineEnding",c=p);else if(h[1].type!=="linePrefix")break;c&&(t[1].end={...E.get(c)[1].start},y=E.slice(c,e),y.unshift(t),E.splice(c,e-c+1,y))}}return splice(n,0,Number.POSITIVE_INFINITY,E.slice(0)),!$}function subcontent(n,o){const e=n.get(o)[1],t=n.get(o)[2];let c=o-1;const p=[],h=e._tokenizer||t.parser[e.contentType](e.start),y=h.events,g=[],$={};let E,A,N=-1,H=e,Z=0,X=0;const be=[X];for(;H;){for(;n.get(++c)[1]!==H;);p.push(c),H._tokenizer||(E=t.sliceStream(H),H.next||E.push(null),A&&h.defineSkip(H.start),H._isInFirstContentOfListItem&&(h._gfmTasklistFirstContentOfListItem=!0),h.write(E),H._isInFirstContentOfListItem&&(h._gfmTasklistFirstContentOfListItem=void 0)),A=H,H=H.next}for(H=e;++N<y.length;)y[N][0]==="exit"&&y[N-1][0]==="enter"&&y[N][1].type===y[N-1][1].type&&y[N][1].start.line!==y[N][1].end.line&&(X=N+1,be.push(X),H._tokenizer=void 0,H.previous=void 0,H=H.next);for(h.events=[],H?(H._tokenizer=void 0,H.previous=void 0):be.pop(),N=be.length;N--;){const we=y.slice(be[N],be[N+1]),$e=p.pop();g.push([$e,$e+we.length-1]),n.splice($e,2,we)}for(g.reverse(),N=-1;++N<g.length;)$[Z+g[N][0]]=Z+g[N][1],Z+=g[N][1]-g[N][0]-1;return $}const content={resolve:resolveContent,tokenize:tokenizeContent},continuationConstruct={partial:!0,tokenize:tokenizeContinuation};function resolveContent(n){return subtokenize(n),n}function tokenizeContent(n,o){let e;return t;function t(y){return n.enter("content"),e=n.enter("chunkContent",{contentType:"content"}),c(y)}function c(y){return y===null?p(y):markdownLineEnding(y)?n.check(continuationConstruct,h,p)(y):(n.consume(y),c)}function p(y){return n.exit("chunkContent"),n.exit("content"),o(y)}function h(y){return n.consume(y),n.exit("chunkContent"),e.next=n.enter("chunkContent",{contentType:"content",previous:e}),e=e.next,c}}function tokenizeContinuation(n,o,e){const t=this;return c;function c(h){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),factorySpace(n,p,"linePrefix")}function p(h){if(h===null||markdownLineEnding(h))return e(h);const y=t.events[t.events.length-1];return!t.parser.constructs.disable.null.includes("codeIndented")&&y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?o(h):n.interrupt(t.parser.constructs.flow,e,o)(h)}}function factoryDestination(n,o,e,t,c,p,h,y,g){const $=g||Number.POSITIVE_INFINITY;let E=0;return A;function A(we){return we===60?(n.enter(t),n.enter(c),n.enter(p),n.consume(we),n.exit(p),N):we===null||we===32||we===41||asciiControl(we)?e(we):(n.enter(t),n.enter(h),n.enter(y),n.enter("chunkString",{contentType:"string"}),X(we))}function N(we){return we===62?(n.enter(p),n.consume(we),n.exit(p),n.exit(c),n.exit(t),o):(n.enter(y),n.enter("chunkString",{contentType:"string"}),H(we))}function H(we){return we===62?(n.exit("chunkString"),n.exit(y),N(we)):we===null||we===60||markdownLineEnding(we)?e(we):(n.consume(we),we===92?Z:H)}function Z(we){return we===60||we===62||we===92?(n.consume(we),H):H(we)}function X(we){return!E&&(we===null||we===41||markdownLineEndingOrSpace(we))?(n.exit("chunkString"),n.exit(y),n.exit(h),n.exit(t),o(we)):E<$&&we===40?(n.consume(we),E++,X):we===41?(n.consume(we),E--,X):we===null||we===32||we===40||asciiControl(we)?e(we):(n.consume(we),we===92?be:X)}function be(we){return we===40||we===41||we===92?(n.consume(we),X):X(we)}}function factoryLabel$1(n,o,e,t,c,p){const h=this;let y=0,g;return $;function $(H){return n.enter(t),n.enter(c),n.consume(H),n.exit(c),n.enter(p),E}function E(H){return y>999||H===null||H===91||H===93&&!g||H===94&&!y&&"_hiddenFootnoteSupport"in h.parser.constructs?e(H):H===93?(n.exit(p),n.enter(c),n.consume(H),n.exit(c),n.exit(t),o):markdownLineEnding(H)?(n.enter("lineEnding"),n.consume(H),n.exit("lineEnding"),E):(n.enter("chunkString",{contentType:"string"}),A(H))}function A(H){return H===null||H===91||H===93||markdownLineEnding(H)||y++>999?(n.exit("chunkString"),E(H)):(n.consume(H),g||(g=!markdownSpace(H)),H===92?N:A)}function N(H){return H===91||H===92||H===93?(n.consume(H),y++,A):A(H)}}function factoryTitle(n,o,e,t,c,p){let h;return y;function y(N){return N===34||N===39||N===40?(n.enter(t),n.enter(c),n.consume(N),n.exit(c),h=N===40?41:N,g):e(N)}function g(N){return N===h?(n.enter(c),n.consume(N),n.exit(c),n.exit(t),o):(n.enter(p),$(N))}function $(N){return N===h?(n.exit(p),g(h)):N===null?e(N):markdownLineEnding(N)?(n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),factorySpace(n,$,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),E(N))}function E(N){return N===h||N===null||markdownLineEnding(N)?(n.exit("chunkString"),$(N)):(n.consume(N),N===92?A:E)}function A(N){return N===h||N===92?(n.consume(N),E):E(N)}}function factoryWhitespace(n,o){let e;return t;function t(c){return markdownLineEnding(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),e=!0,t):markdownSpace(c)?factorySpace(n,t,e?"linePrefix":"lineSuffix")(c):o(c)}}const definition$1={name:"definition",tokenize:tokenizeDefinition},titleBefore={partial:!0,tokenize:tokenizeTitleBefore};function tokenizeDefinition(n,o,e){const t=this;let c;return p;function p(H){return n.enter("definition"),h(H)}function h(H){return factoryLabel$1.call(t,n,y,e,"definitionLabel","definitionLabelMarker","definitionLabelString")(H)}function y(H){return c=normalizeIdentifier(t.sliceSerialize(t.events[t.events.length-1][1]).slice(1,-1)),H===58?(n.enter("definitionMarker"),n.consume(H),n.exit("definitionMarker"),g):e(H)}function g(H){return markdownLineEndingOrSpace(H)?factoryWhitespace(n,$)(H):$(H)}function $(H){return factoryDestination(n,E,e,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(H)}function E(H){return n.attempt(titleBefore,A,A)(H)}function A(H){return markdownSpace(H)?factorySpace(n,N,"whitespace")(H):N(H)}function N(H){return H===null||markdownLineEnding(H)?(n.exit("definition"),t.parser.defined.push(c),o(H)):e(H)}}function tokenizeTitleBefore(n,o,e){return t;function t(y){return markdownLineEndingOrSpace(y)?factoryWhitespace(n,c)(y):e(y)}function c(y){return factoryTitle(n,p,e,"definitionTitle","definitionTitleMarker","definitionTitleString")(y)}function p(y){return markdownSpace(y)?factorySpace(n,h,"whitespace")(y):h(y)}function h(y){return y===null||markdownLineEnding(y)?o(y):e(y)}}const hardBreakEscape={name:"hardBreakEscape",tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(n,o,e){return t;function t(p){return n.enter("hardBreakEscape"),n.consume(p),c}function c(p){return markdownLineEnding(p)?(n.exit("hardBreakEscape"),o(p)):e(p)}}const headingAtx={name:"headingAtx",resolve:resolveHeadingAtx,tokenize:tokenizeHeadingAtx};function resolveHeadingAtx(n,o){let e=n.length-2,t=3,c,p;return n[t][1].type==="whitespace"&&(t+=2),e-2>t&&n[e][1].type==="whitespace"&&(e-=2),n[e][1].type==="atxHeadingSequence"&&(t===e-1||e-4>t&&n[e-2][1].type==="whitespace")&&(e-=t+1===e?2:4),e>t&&(c={type:"atxHeadingText",start:n[t][1].start,end:n[e][1].end},p={type:"chunkText",start:n[t][1].start,end:n[e][1].end,contentType:"text"},splice(n,t,e-t+1,[["enter",c,o],["enter",p,o],["exit",p,o],["exit",c,o]])),n}function tokenizeHeadingAtx(n,o,e){let t=0;return c;function c(E){return n.enter("atxHeading"),p(E)}function p(E){return n.enter("atxHeadingSequence"),h(E)}function h(E){return E===35&&t++<6?(n.consume(E),h):E===null||markdownLineEndingOrSpace(E)?(n.exit("atxHeadingSequence"),y(E)):e(E)}function y(E){return E===35?(n.enter("atxHeadingSequence"),g(E)):E===null||markdownLineEnding(E)?(n.exit("atxHeading"),o(E)):markdownSpace(E)?factorySpace(n,y,"whitespace")(E):(n.enter("atxHeadingText"),$(E))}function g(E){return E===35?(n.consume(E),g):(n.exit("atxHeadingSequence"),y(E))}function $(E){return E===null||E===35||markdownLineEndingOrSpace(E)?(n.exit("atxHeadingText"),y(E)):(n.consume(E),$)}}const htmlBlockNames=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],htmlRawNames=["pre","script","style","textarea"],htmlFlow={concrete:!0,name:"htmlFlow",resolveTo:resolveToHtmlFlow,tokenize:tokenizeHtmlFlow},blankLineBefore={partial:!0,tokenize:tokenizeBlankLineBefore},nonLazyContinuationStart={partial:!0,tokenize:tokenizeNonLazyContinuationStart};function resolveToHtmlFlow(n){let o=n.length;for(;o--&&!(n[o][0]==="enter"&&n[o][1].type==="htmlFlow"););return o>1&&n[o-2][1].type==="linePrefix"&&(n[o][1].start=n[o-2][1].start,n[o+1][1].start=n[o-2][1].start,n.splice(o-2,2)),n}function tokenizeHtmlFlow(n,o,e){const t=this;let c,p,h,y,g;return $;function $(Ve){return E(Ve)}function E(Ve){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(Ve),A}function A(Ve){return Ve===33?(n.consume(Ve),N):Ve===47?(n.consume(Ve),p=!0,X):Ve===63?(n.consume(Ve),c=3,t.interrupt?o:Me):asciiAlpha(Ve)?(n.consume(Ve),h=String.fromCharCode(Ve),be):e(Ve)}function N(Ve){return Ve===45?(n.consume(Ve),c=2,H):Ve===91?(n.consume(Ve),c=5,y=0,Z):asciiAlpha(Ve)?(n.consume(Ve),c=4,t.interrupt?o:Me):e(Ve)}function H(Ve){return Ve===45?(n.consume(Ve),t.interrupt?o:Me):e(Ve)}function Z(Ve){const vt="CDATA[";return Ve===vt.charCodeAt(y++)?(n.consume(Ve),y===vt.length?t.interrupt?o:Je:Z):e(Ve)}function X(Ve){return asciiAlpha(Ve)?(n.consume(Ve),h=String.fromCharCode(Ve),be):e(Ve)}function be(Ve){if(Ve===null||Ve===47||Ve===62||markdownLineEndingOrSpace(Ve)){const vt=Ve===47,xt=h.toLowerCase();return!vt&&!p&&htmlRawNames.includes(xt)?(c=1,t.interrupt?o(Ve):Je(Ve)):htmlBlockNames.includes(h.toLowerCase())?(c=6,vt?(n.consume(Ve),we):t.interrupt?o(Ve):Je(Ve)):(c=7,t.interrupt&&!t.parser.lazy[t.now().line]?e(Ve):p?$e(Ve):Ce(Ve))}return Ve===45||asciiAlphanumeric(Ve)?(n.consume(Ve),h+=String.fromCharCode(Ve),be):e(Ve)}function we(Ve){return Ve===62?(n.consume(Ve),t.interrupt?o:Je):e(Ve)}function $e(Ve){return markdownSpace(Ve)?(n.consume(Ve),$e):De(Ve)}function Ce(Ve){return Ve===47?(n.consume(Ve),De):Ve===58||Ve===95||asciiAlpha(Ve)?(n.consume(Ve),Ie):markdownSpace(Ve)?(n.consume(Ve),Ce):De(Ve)}function Ie(Ve){return Ve===45||Ve===46||Ve===58||Ve===95||asciiAlphanumeric(Ve)?(n.consume(Ve),Ie):Ne(Ve)}function Ne(Ve){return Ve===61?(n.consume(Ve),Fe):markdownSpace(Ve)?(n.consume(Ve),Ne):Ce(Ve)}function Fe(Ve){return Ve===null||Ve===60||Ve===61||Ve===62||Ve===96?e(Ve):Ve===34||Ve===39?(n.consume(Ve),g=Ve,Be):markdownSpace(Ve)?(n.consume(Ve),Fe):Ge(Ve)}function Be(Ve){return Ve===g?(n.consume(Ve),g=null,je):Ve===null||markdownLineEnding(Ve)?e(Ve):(n.consume(Ve),Be)}function Ge(Ve){return Ve===null||Ve===34||Ve===39||Ve===47||Ve===60||Ve===61||Ve===62||Ve===96||markdownLineEndingOrSpace(Ve)?Ne(Ve):(n.consume(Ve),Ge)}function je(Ve){return Ve===47||Ve===62||markdownSpace(Ve)?Ce(Ve):e(Ve)}function De(Ve){return Ve===62?(n.consume(Ve),Ue):e(Ve)}function Ue(Ve){return Ve===null||markdownLineEnding(Ve)?Je(Ve):markdownSpace(Ve)?(n.consume(Ve),Ue):e(Ve)}function Je(Ve){return Ve===45&&c===2?(n.consume(Ve),nt):Ve===60&&c===1?(n.consume(Ve),ct):Ve===62&&c===4?(n.consume(Ve),We):Ve===63&&c===3?(n.consume(Ve),Me):Ve===93&&c===5?(n.consume(Ve),dt):markdownLineEnding(Ve)&&(c===6||c===7)?(n.exit("htmlFlowData"),n.check(blankLineBefore,tt,Xe)(Ve)):Ve===null||markdownLineEnding(Ve)?(n.exit("htmlFlowData"),Xe(Ve)):(n.consume(Ve),Je)}function Xe(Ve){return n.check(nonLazyContinuationStart,Ke,tt)(Ve)}function Ke(Ve){return n.enter("lineEnding"),n.consume(Ve),n.exit("lineEnding"),ze}function ze(Ve){return Ve===null||markdownLineEnding(Ve)?Xe(Ve):(n.enter("htmlFlowData"),Je(Ve))}function nt(Ve){return Ve===45?(n.consume(Ve),Me):Je(Ve)}function ct(Ve){return Ve===47?(n.consume(Ve),h="",at):Je(Ve)}function at(Ve){if(Ve===62){const vt=h.toLowerCase();return htmlRawNames.includes(vt)?(n.consume(Ve),We):Je(Ve)}return asciiAlpha(Ve)&&h.length<8?(n.consume(Ve),h+=String.fromCharCode(Ve),at):Je(Ve)}function dt(Ve){return Ve===93?(n.consume(Ve),Me):Je(Ve)}function Me(Ve){return Ve===62?(n.consume(Ve),We):Ve===45&&c===2?(n.consume(Ve),Me):Je(Ve)}function We(Ve){return Ve===null||markdownLineEnding(Ve)?(n.exit("htmlFlowData"),tt(Ve)):(n.consume(Ve),We)}function tt(Ve){return n.exit("htmlFlow"),o(Ve)}}function tokenizeNonLazyContinuationStart(n,o,e){const t=this;return c;function c(h){return markdownLineEnding(h)?(n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),p):e(h)}function p(h){return t.parser.lazy[t.now().line]?e(h):o(h)}}function tokenizeBlankLineBefore(n,o,e){return t;function t(c){return n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),n.attempt(blankLine,o,e)}}const htmlText={name:"htmlText",tokenize:tokenizeHtmlText};function tokenizeHtmlText(n,o,e){const t=this;let c,p,h;return y;function y(Me){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(Me),g}function g(Me){return Me===33?(n.consume(Me),$):Me===47?(n.consume(Me),Ne):Me===63?(n.consume(Me),Ce):asciiAlpha(Me)?(n.consume(Me),Ge):e(Me)}function $(Me){return Me===45?(n.consume(Me),E):Me===91?(n.consume(Me),p=0,Z):asciiAlpha(Me)?(n.consume(Me),$e):e(Me)}function E(Me){return Me===45?(n.consume(Me),H):e(Me)}function A(Me){return Me===null?e(Me):Me===45?(n.consume(Me),N):markdownLineEnding(Me)?(h=A,ct(Me)):(n.consume(Me),A)}function N(Me){return Me===45?(n.consume(Me),H):A(Me)}function H(Me){return Me===62?nt(Me):Me===45?N(Me):A(Me)}function Z(Me){const We="CDATA[";return Me===We.charCodeAt(p++)?(n.consume(Me),p===We.length?X:Z):e(Me)}function X(Me){return Me===null?e(Me):Me===93?(n.consume(Me),be):markdownLineEnding(Me)?(h=X,ct(Me)):(n.consume(Me),X)}function be(Me){return Me===93?(n.consume(Me),we):X(Me)}function we(Me){return Me===62?nt(Me):Me===93?(n.consume(Me),we):X(Me)}function $e(Me){return Me===null||Me===62?nt(Me):markdownLineEnding(Me)?(h=$e,ct(Me)):(n.consume(Me),$e)}function Ce(Me){return Me===null?e(Me):Me===63?(n.consume(Me),Ie):markdownLineEnding(Me)?(h=Ce,ct(Me)):(n.consume(Me),Ce)}function Ie(Me){return Me===62?nt(Me):Ce(Me)}function Ne(Me){return asciiAlpha(Me)?(n.consume(Me),Fe):e(Me)}function Fe(Me){return Me===45||asciiAlphanumeric(Me)?(n.consume(Me),Fe):Be(Me)}function Be(Me){return markdownLineEnding(Me)?(h=Be,ct(Me)):markdownSpace(Me)?(n.consume(Me),Be):nt(Me)}function Ge(Me){return Me===45||asciiAlphanumeric(Me)?(n.consume(Me),Ge):Me===47||Me===62||markdownLineEndingOrSpace(Me)?je(Me):e(Me)}function je(Me){return Me===47?(n.consume(Me),nt):Me===58||Me===95||asciiAlpha(Me)?(n.consume(Me),De):markdownLineEnding(Me)?(h=je,ct(Me)):markdownSpace(Me)?(n.consume(Me),je):nt(Me)}function De(Me){return Me===45||Me===46||Me===58||Me===95||asciiAlphanumeric(Me)?(n.consume(Me),De):Ue(Me)}function Ue(Me){return Me===61?(n.consume(Me),Je):markdownLineEnding(Me)?(h=Ue,ct(Me)):markdownSpace(Me)?(n.consume(Me),Ue):je(Me)}function Je(Me){return Me===null||Me===60||Me===61||Me===62||Me===96?e(Me):Me===34||Me===39?(n.consume(Me),c=Me,Xe):markdownLineEnding(Me)?(h=Je,ct(Me)):markdownSpace(Me)?(n.consume(Me),Je):(n.consume(Me),Ke)}function Xe(Me){return Me===c?(n.consume(Me),c=void 0,ze):Me===null?e(Me):markdownLineEnding(Me)?(h=Xe,ct(Me)):(n.consume(Me),Xe)}function Ke(Me){return Me===null||Me===34||Me===39||Me===60||Me===61||Me===96?e(Me):Me===47||Me===62||markdownLineEndingOrSpace(Me)?je(Me):(n.consume(Me),Ke)}function ze(Me){return Me===47||Me===62||markdownLineEndingOrSpace(Me)?je(Me):e(Me)}function nt(Me){return Me===62?(n.consume(Me),n.exit("htmlTextData"),n.exit("htmlText"),o):e(Me)}function ct(Me){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(Me),n.exit("lineEnding"),at}function at(Me){return markdownSpace(Me)?factorySpace(n,dt,"linePrefix",t.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Me):dt(Me)}function dt(Me){return n.enter("htmlTextData"),h(Me)}}const labelEnd={name:"labelEnd",resolveAll:resolveAllLabelEnd,resolveTo:resolveToLabelEnd,tokenize:tokenizeLabelEnd},resourceConstruct={tokenize:tokenizeResource},referenceFullConstruct={tokenize:tokenizeReferenceFull},referenceCollapsedConstruct={tokenize:tokenizeReferenceCollapsed};function resolveAllLabelEnd(n){let o=-1;const e=[];for(;++o<n.length;){const t=n[o][1];if(e.push(n[o]),t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd"){const c=t.type==="labelImage"?4:2;t.type="data",o+=c}}return n.length!==e.length&&splice(n,0,n.length,e),n}function resolveToLabelEnd(n,o){let e=n.length,t=0,c,p,h,y;for(;e--;)if(c=n[e][1],p){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;n[e][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(h){if(n[e][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(p=e,c.type!=="labelLink")){t=2;break}}else c.type==="labelEnd"&&(h=e);const g={type:n[p][1].type==="labelLink"?"link":"image",start:{...n[p][1].start},end:{...n[n.length-1][1].end}},$={type:"label",start:{...n[p][1].start},end:{...n[h][1].end}},E={type:"labelText",start:{...n[p+t+2][1].end},end:{...n[h-2][1].start}};return y=[["enter",g,o],["enter",$,o]],y=push(y,n.slice(p+1,p+t+3)),y=push(y,[["enter",E,o]]),y=push(y,resolveAll(o.parser.constructs.insideSpan.null,n.slice(p+t+4,h-3),o)),y=push(y,[["exit",E,o],n[h-2],n[h-1],["exit",$,o]]),y=push(y,n.slice(h+1)),y=push(y,[["exit",g,o]]),splice(n,p,n.length,y),n}function tokenizeLabelEnd(n,o,e){const t=this;let c=t.events.length,p,h;for(;c--;)if((t.events[c][1].type==="labelImage"||t.events[c][1].type==="labelLink")&&!t.events[c][1]._balanced){p=t.events[c][1];break}return y;function y(N){return p?p._inactive?A(N):(h=t.parser.defined.includes(normalizeIdentifier(t.sliceSerialize({start:p.end,end:t.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(N),n.exit("labelMarker"),n.exit("labelEnd"),g):e(N)}function g(N){return N===40?n.attempt(resourceConstruct,E,h?E:A)(N):N===91?n.attempt(referenceFullConstruct,E,h?$:A)(N):h?E(N):A(N)}function $(N){return n.attempt(referenceCollapsedConstruct,E,A)(N)}function E(N){return o(N)}function A(N){return p._balanced=!0,e(N)}}function tokenizeResource(n,o,e){return t;function t(A){return n.enter("resource"),n.enter("resourceMarker"),n.consume(A),n.exit("resourceMarker"),c}function c(A){return markdownLineEndingOrSpace(A)?factoryWhitespace(n,p)(A):p(A)}function p(A){return A===41?E(A):factoryDestination(n,h,y,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(A)}function h(A){return markdownLineEndingOrSpace(A)?factoryWhitespace(n,g)(A):E(A)}function y(A){return e(A)}function g(A){return A===34||A===39||A===40?factoryTitle(n,$,e,"resourceTitle","resourceTitleMarker","resourceTitleString")(A):E(A)}function $(A){return markdownLineEndingOrSpace(A)?factoryWhitespace(n,E)(A):E(A)}function E(A){return A===41?(n.enter("resourceMarker"),n.consume(A),n.exit("resourceMarker"),n.exit("resource"),o):e(A)}}function tokenizeReferenceFull(n,o,e){const t=this;return c;function c(y){return factoryLabel$1.call(t,n,p,h,"reference","referenceMarker","referenceString")(y)}function p(y){return t.parser.defined.includes(normalizeIdentifier(t.sliceSerialize(t.events[t.events.length-1][1]).slice(1,-1)))?o(y):e(y)}function h(y){return e(y)}}function tokenizeReferenceCollapsed(n,o,e){return t;function t(p){return n.enter("reference"),n.enter("referenceMarker"),n.consume(p),n.exit("referenceMarker"),c}function c(p){return p===93?(n.enter("referenceMarker"),n.consume(p),n.exit("referenceMarker"),n.exit("reference"),o):e(p)}}const labelStartImage={name:"labelStartImage",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartImage};function tokenizeLabelStartImage(n,o,e){const t=this;return c;function c(y){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(y),n.exit("labelImageMarker"),p}function p(y){return y===91?(n.enter("labelMarker"),n.consume(y),n.exit("labelMarker"),n.exit("labelImage"),h):e(y)}function h(y){return y===94&&"_hiddenFootnoteSupport"in t.parser.constructs?e(y):o(y)}}const labelStartLink={name:"labelStartLink",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartLink};function tokenizeLabelStartLink(n,o,e){const t=this;return c;function c(h){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(h),n.exit("labelMarker"),n.exit("labelLink"),p}function p(h){return h===94&&"_hiddenFootnoteSupport"in t.parser.constructs?e(h):o(h)}}const lineEnding={name:"lineEnding",tokenize:tokenizeLineEnding};function tokenizeLineEnding(n,o){return e;function e(t){return n.enter("lineEnding"),n.consume(t),n.exit("lineEnding"),factorySpace(n,o,"linePrefix")}}const thematicBreak$2={name:"thematicBreak",tokenize:tokenizeThematicBreak};function tokenizeThematicBreak(n,o,e){let t=0,c;return p;function p($){return n.enter("thematicBreak"),h($)}function h($){return c=$,y($)}function y($){return $===c?(n.enter("thematicBreakSequence"),g($)):t>=3&&($===null||markdownLineEnding($))?(n.exit("thematicBreak"),o($)):e($)}function g($){return $===c?(n.consume($),t++,g):(n.exit("thematicBreakSequence"),markdownSpace($)?factorySpace(n,y,"whitespace")($):y($))}}const list$2={continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd,name:"list",tokenize:tokenizeListStart},listItemPrefixWhitespaceConstruct={partial:!0,tokenize:tokenizeListItemPrefixWhitespace},indentConstruct={partial:!0,tokenize:tokenizeIndent$1};function tokenizeListStart(n,o,e){const t=this,c=t.events[t.events.length-1];let p=c&&c[1].type==="linePrefix"?c[2].sliceSerialize(c[1],!0).length:0,h=0;return y;function y(H){const Z=t.containerState.type||(H===42||H===43||H===45?"listUnordered":"listOrdered");if(Z==="listUnordered"?!t.containerState.marker||H===t.containerState.marker:asciiDigit(H)){if(t.containerState.type||(t.containerState.type=Z,n.enter(Z,{_container:!0})),Z==="listUnordered")return n.enter("listItemPrefix"),H===42||H===45?n.check(thematicBreak$2,e,$)(H):$(H);if(!t.interrupt||H===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),g(H)}return e(H)}function g(H){return asciiDigit(H)&&++h<10?(n.consume(H),g):(!t.interrupt||h<2)&&(t.containerState.marker?H===t.containerState.marker:H===41||H===46)?(n.exit("listItemValue"),$(H)):e(H)}function $(H){return n.enter("listItemMarker"),n.consume(H),n.exit("listItemMarker"),t.containerState.marker=t.containerState.marker||H,n.check(blankLine,t.interrupt?e:E,n.attempt(listItemPrefixWhitespaceConstruct,N,A))}function E(H){return t.containerState.initialBlankLine=!0,p++,N(H)}function A(H){return markdownSpace(H)?(n.enter("listItemPrefixWhitespace"),n.consume(H),n.exit("listItemPrefixWhitespace"),N):e(H)}function N(H){return t.containerState.size=p+t.sliceSerialize(n.exit("listItemPrefix"),!0).length,o(H)}}function tokenizeListContinuation(n,o,e){const t=this;return t.containerState._closeFlow=void 0,n.check(blankLine,c,p);function c(y){return t.containerState.furtherBlankLines=t.containerState.furtherBlankLines||t.containerState.initialBlankLine,factorySpace(n,o,"listItemIndent",t.containerState.size+1)(y)}function p(y){return t.containerState.furtherBlankLines||!markdownSpace(y)?(t.containerState.furtherBlankLines=void 0,t.containerState.initialBlankLine=void 0,h(y)):(t.containerState.furtherBlankLines=void 0,t.containerState.initialBlankLine=void 0,n.attempt(indentConstruct,o,h)(y))}function h(y){return t.containerState._closeFlow=!0,t.interrupt=void 0,factorySpace(n,n.attempt(list$2,o,e),"linePrefix",t.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y)}}function tokenizeIndent$1(n,o,e){const t=this;return factorySpace(n,c,"listItemIndent",t.containerState.size+1);function c(p){const h=t.events[t.events.length-1];return h&&h[1].type==="listItemIndent"&&h[2].sliceSerialize(h[1],!0).length===t.containerState.size?o(p):e(p)}}function tokenizeListEnd(n){n.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(n,o,e){const t=this;return factorySpace(n,c,"listItemPrefixWhitespace",t.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function c(p){const h=t.events[t.events.length-1];return!markdownSpace(p)&&h&&h[1].type==="listItemPrefixWhitespace"?o(p):e(p)}}const setextUnderline={name:"setextUnderline",resolveTo:resolveToSetextUnderline,tokenize:tokenizeSetextUnderline};function resolveToSetextUnderline(n,o){let e=n.length,t,c,p;for(;e--;)if(n[e][0]==="enter"){if(n[e][1].type==="content"){t=e;break}n[e][1].type==="paragraph"&&(c=e)}else n[e][1].type==="content"&&n.splice(e,1),!p&&n[e][1].type==="definition"&&(p=e);const h={type:"setextHeading",start:{...n[c][1].start},end:{...n[n.length-1][1].end}};return n[c][1].type="setextHeadingText",p?(n.splice(c,0,["enter",h,o]),n.splice(p+1,0,["exit",n[t][1],o]),n[t][1].end={...n[p][1].end}):n[t][1]=h,n.push(["exit",h,o]),n}function tokenizeSetextUnderline(n,o,e){const t=this;let c;return p;function p($){let E=t.events.length,A;for(;E--;)if(t.events[E][1].type!=="lineEnding"&&t.events[E][1].type!=="linePrefix"&&t.events[E][1].type!=="content"){A=t.events[E][1].type==="paragraph";break}return!t.parser.lazy[t.now().line]&&(t.interrupt||A)?(n.enter("setextHeadingLine"),c=$,h($)):e($)}function h($){return n.enter("setextHeadingLineSequence"),y($)}function y($){return $===c?(n.consume($),y):(n.exit("setextHeadingLineSequence"),markdownSpace($)?factorySpace(n,g,"lineSuffix")($):g($))}function g($){return $===null||markdownLineEnding($)?(n.exit("setextHeadingLine"),o($)):e($)}}const flow$1={tokenize:initializeFlow};function initializeFlow(n){const o=this,e=n.attempt(blankLine,t,n.attempt(this.parser.constructs.flowInitial,c,factorySpace(n,n.attempt(this.parser.constructs.flow,c,n.attempt(content,c)),"linePrefix")));return e;function t(p){if(p===null){n.consume(p);return}return n.enter("lineEndingBlank"),n.consume(p),n.exit("lineEndingBlank"),o.currentConstruct=void 0,e}function c(p){if(p===null){n.consume(p);return}return n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),o.currentConstruct=void 0,e}}const resolver={resolveAll:createResolver()},string$1=initializeFactory("string"),text$4=initializeFactory("text");function initializeFactory(n){return{resolveAll:createResolver(n==="text"?resolveAllLineSuffixes:void 0),tokenize:o};function o(e){const t=this,c=this.parser.constructs[n],p=e.attempt(c,h,y);return h;function h(E){return $(E)?p(E):y(E)}function y(E){if(E===null){e.consume(E);return}return e.enter("data"),e.consume(E),g}function g(E){return $(E)?(e.exit("data"),p(E)):(e.consume(E),g)}function $(E){if(E===null)return!0;const A=c[E];let N=-1;if(A)for(;++N<A.length;){const H=A[N];if(!H.previous||H.previous.call(t,t.previous))return!0}return!1}}}function createResolver(n){return o;function o(e,t){let c=-1,p;for(;++c<=e.length;)p===void 0?e[c]&&e[c][1].type==="data"&&(p=c,c++):(!e[c]||e[c][1].type!=="data")&&(c!==p+2&&(e[p][1].end=e[c-1][1].end,e.splice(p+2,c-p-2),c=p+2),p=void 0);return n?n(e,t):e}}function resolveAllLineSuffixes(n,o){let e=0;for(;++e<=n.length;)if((e===n.length||n[e][1].type==="lineEnding")&&n[e-1][1].type==="data"){const t=n[e-1][1],c=o.sliceStream(t);let p=c.length,h=-1,y=0,g;for(;p--;){const $=c[p];if(typeof $=="string"){for(h=$.length;$.charCodeAt(h-1)===32;)y++,h--;if(h)break;h=-1}else if($===-2)g=!0,y++;else if($!==-1){p++;break}}if(y){const $={type:e===n.length||g||y<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:p?h:t.start._bufferIndex+h,_index:t.start._index+p,line:t.end.line,column:t.end.column-y,offset:t.end.offset-y},end:{...t.end}};t.end={...$.start},t.start.offset===t.end.offset?Object.assign(t,$):(n.splice(e,0,["enter",$,o],["exit",$,o]),e+=2)}e++}return n}const document$1={42:list$2,43:list$2,45:list$2,48:list$2,49:list$2,50:list$2,51:list$2,52:list$2,53:list$2,54:list$2,55:list$2,56:list$2,57:list$2,62:blockQuote},contentInitial={91:definition$1},flowInitial={[-2]:codeIndented,[-1]:codeIndented,32:codeIndented},flow={35:headingAtx,42:thematicBreak$2,45:[setextUnderline,thematicBreak$2],60:htmlFlow,61:setextUnderline,95:thematicBreak$2,96:codeFenced,126:codeFenced},string={38:characterReference,92:characterEscape},text$3={[-5]:lineEnding,[-4]:lineEnding,[-3]:lineEnding,33:labelStartImage,38:characterReference,42:attention,60:[autolink,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={null:[]},defaultConstructs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers,contentInitial,disable,document:document$1,flow,flowInitial,insideSpan,string,text:text$3},Symbol.toStringTag,{value:"Module"}));function createTokenizer(n,o,e){let t={_bufferIndex:-1,_index:0,line:e&&e.line||1,column:e&&e.column||1,offset:e&&e.offset||0};const c={},p=[];let h=[],y=[];const g={attempt:Be(Ne),check:Be(Fe),consume:$e,enter:Ce,exit:Ie,interrupt:Be(Fe,{interrupt:!0})},$={code:null,containerState:{},defineSkip:X,events:[],now:Z,parser:n,previous:null,sliceSerialize:N,sliceStream:H,write:A};let E=o.tokenize.call($,g);return o.resolveAll&&p.push(o),$;function A(Ue){return h=push(h,Ue),be(),h[h.length-1]!==null?[]:(Ge(o,0),$.events=resolveAll(p,$.events,$),$.events)}function N(Ue,Je){return serializeChunks(H(Ue),Je)}function H(Ue){return sliceChunks(h,Ue)}function Z(){const{_bufferIndex:Ue,_index:Je,line:Xe,column:Ke,offset:ze}=t;return{_bufferIndex:Ue,_index:Je,line:Xe,column:Ke,offset:ze}}function X(Ue){c[Ue.line]=Ue.column,De()}function be(){let Ue;for(;t._index<h.length;){const Je=h[t._index];if(typeof Je=="string")for(Ue=t._index,t._bufferIndex<0&&(t._bufferIndex=0);t._index===Ue&&t._bufferIndex<Je.length;)we(Je.charCodeAt(t._bufferIndex));else we(Je)}}function we(Ue){E=E(Ue)}function $e(Ue){markdownLineEnding(Ue)?(t.line++,t.column=1,t.offset+=Ue===-3?2:1,De()):Ue!==-1&&(t.column++,t.offset++),t._bufferIndex<0?t._index++:(t._bufferIndex++,t._bufferIndex===h[t._index].length&&(t._bufferIndex=-1,t._index++)),$.previous=Ue}function Ce(Ue,Je){const Xe=Je||{};return Xe.type=Ue,Xe.start=Z(),$.events.push(["enter",Xe,$]),y.push(Xe),Xe}function Ie(Ue){const Je=y.pop();return Je.end=Z(),$.events.push(["exit",Je,$]),Je}function Ne(Ue,Je){Ge(Ue,Je.from)}function Fe(Ue,Je){Je.restore()}function Be(Ue,Je){return Xe;function Xe(Ke,ze,nt){let ct,at,dt,Me;return Array.isArray(Ke)?tt(Ke):"tokenize"in Ke?tt([Ke]):We(Ke);function We(Qe){return St;function St(pt){const wt=pt!==null&&Qe[pt],Ft=pt!==null&&Qe.null,Ht=[...Array.isArray(wt)?wt:wt?[wt]:[],...Array.isArray(Ft)?Ft:Ft?[Ft]:[]];return tt(Ht)(pt)}}function tt(Qe){return ct=Qe,at=0,Qe.length===0?nt:Ve(Qe[at])}function Ve(Qe){return St;function St(pt){return Me=je(),dt=Qe,Qe.partial||($.currentConstruct=Qe),Qe.name&&$.parser.constructs.disable.null.includes(Qe.name)?xt():Qe.tokenize.call(Je?Object.assign(Object.create($),Je):$,g,vt,xt)(pt)}}function vt(Qe){return Ue(dt,Me),ze}function xt(Qe){return Me.restore(),++at<ct.length?Ve(ct[at]):nt}}}function Ge(Ue,Je){Ue.resolveAll&&!p.includes(Ue)&&p.push(Ue),Ue.resolve&&splice($.events,Je,$.events.length-Je,Ue.resolve($.events.slice(Je),$)),Ue.resolveTo&&($.events=Ue.resolveTo($.events,$))}function je(){const Ue=Z(),Je=$.previous,Xe=$.currentConstruct,Ke=$.events.length,ze=Array.from(y);return{from:Ke,restore:nt};function nt(){t=Ue,$.previous=Je,$.currentConstruct=Xe,$.events.length=Ke,y=ze,De()}}function De(){t.line in c&&t.column<2&&(t.column=c[t.line],t.offset+=c[t.line]-1)}}function sliceChunks(n,o){const e=o.start._index,t=o.start._bufferIndex,c=o.end._index,p=o.end._bufferIndex;let h;if(e===c)h=[n[e].slice(t,p)];else{if(h=n.slice(e,c),t>-1){const y=h[0];typeof y=="string"?h[0]=y.slice(t):h.shift()}p>0&&h.push(n[c].slice(0,p))}return h}function serializeChunks(n,o){let e=-1;const t=[];let c;for(;++e<n.length;){const p=n[e];let h;if(typeof p=="string")h=p;else switch(p){case-5:{h="\r";break}case-4:{h=`
49
49
  `;break}case-3:{h=`\r
@@ -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.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,
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.Dou8UoAD.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.DRgFBrOW.js"),__vite__mapDeps([2,1]),import.meta.url),loadRemarkEmoji=()=>__vitePreload(()=>import("./index.CinPJsaI.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.DU42g8NY.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})},HelpTextContext=React.createContext(void 0);HelpTextContext.displayName="HelpTextContext";const CustomHelpIcon=({children:n})=>{const e=reactExports.useContext(HelpTextContext)||(typeof n=="string"?n:"");return jsx$1(StyledHelpIconWrapper,{children:jsx$1(InlineTooltipIcon,{content:e})})},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;
@@ -99,7 +99,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
99
99
  vertical-align: bottom;
100
100
  white-space: nowrap;
101
101
  word-wrap: normal;
102
- `},hChildren:[{type:"text",value:c}]}}}return findAndReplace(o,[[/:material_(\w+):/g,e]]),o}}function createRemarkStreamlitLogo(){return()=>n=>{function o(){return{type:"text",value:"",data:{hName:"img",hProperties:{src:streamlitLogo,alt:"Streamlit logo",style:"display: inline-block; user-select: none; height: 0.75em; vertical-align: baseline; margin-bottom: -0.05ex;"}}}}return findAndReplace(n,[[/:streamlit:/g,o]]),n}}function createRemarkTypographicalSymbols(){return()=>n=>(visit(n,(o,e,t)=>{if(!(t&&(t.type==="link"||t.type==="linkReference"))&&o.type==="text"&&o.value){const c=[[/(^|\s)<->(\s|$)/g,"$1↔$2"],[/(^|\s)->(\s|$)/g,"$1→$2"],[/(^|\s)<-(\s|$)/g,"$1←$2"],[/(^|\s)--(\s|$)/g,"$1—$2"],[/(^|\s)>=(\s|$)/g,"$1≥$2"],[/(^|\s)<=(\s|$)/g,"$1≤$2"],[/(^|\s)~=(\s|$)/g,"$1≈$2"]];let p=o.value;for(const[h,y]of c)p=p.replace(h,y);p!==o.value&&(o.value=p)}}),n)}const BASE_REMARK_PLUGINS=[remarkMath,remarkGfm,remarkDirective,createRemarkHelpIcon(),createRemarkStreamlitLogo(),createRemarkTypographicalSymbols()],LABEL_DISALLOWED_ELEMENTS=["table","thead","tbody","tr","th","td","h1","h2","h3","h4","h5","h6","ul","ol","li","input","hr","blockquote"],LINKS_DISALLOWED_ELEMENTS=[...LABEL_DISALLOWED_ELEMENTS,"a"];function LinkWithTargetBlank(n){const{href:o}=n;if(o?.startsWith("#")){const{children:y,...g}=n;return jsx$1("a",{...omit(g,"node"),children:y})}const{title:e,children:t,target:c,rel:p,...h}=n;return jsx$1("a",{href:o,title:e,target:c||"_blank",rel:p||"noopener noreferrer",...omit(h,"node"),children:t})}const RenderedMarkdown=reactExports.memo(function n({allowHTML:o,source:e,overrideComponents:t,isLabel:c,disableLinks:p}){const h=useEmotionTheme(),y=reactExports.useMemo(()=>containsMathSyntax(e),[e]),g=reactExports.useMemo(()=>containsEmojiShortcodes(e),[e]),$=useLazyPlugin({key:"katex",needed:y,load:loadKatexPlugin,pluginName:"rehype-katex",onBeforeLoad:loadKatexStyles}),E=useLazyPlugin({key:"raw",needed:o,load:loadRehypeRaw,pluginName:"rehype-raw"}),A=useLazyPlugin({key:"emoji",needed:g,load:loadRemarkEmoji,pluginName:"remark-emoji"}),N=reactExports.useMemo(()=>createColorMapping(h),[h]),H=reactExports.useMemo(()=>isLoadedPlugin($)?wrapRehypePlugin($,"rehype-katex"):null,[$]),Z=reactExports.useMemo(()=>isLoadedPlugin(E)?wrapRehypePlugin(E,"rehype-raw"):null,[E]),X=reactExports.useMemo(()=>isLoadedPlugin(A)?wrapRemarkPlugin(A,"remark-emoji"):null,[A]),be=reactExports.useMemo(()=>{const Fe=[...BASE_REMARK_PLUGINS,createRemarkColoringAndSmall(h,N),createRemarkMaterialIcons(h)];return g&&X&&Fe.push(X),Fe},[h,N,g,X]),we=reactExports.useMemo(()=>{const Fe=[];return y&&H&&Fe.push(H),o&&Z&&Fe.push(Z),Fe.push(rehypeSetCodeInlineProperty),Fe},[o,y,H,Z]),$e=reactExports.useMemo(()=>({...BASE_RENDERERS,a:LinkWithTargetBlank,...t||{}}),[t]),Ce=reactExports.useMemo(()=>e.replaceAll(":material/",":material_"),[e]),Ie=reactExports.useMemo(()=>c?p?LINKS_DISALLOWED_ELEMENTS:LABEL_DISALLOWED_ELEMENTS:[],[c,p]);return y&&$===null||o&&E===null||g&&A===null?jsx$1(ErrorBoundary,{children:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})})}):jsx$1(ErrorBoundary,{children:jsx$1(Markdown$2,{remarkPlugins:be,rehypePlugins:we,components:$e,urlTransform:transformLinkUri,disallowedElements:Ie,unwrapDisallowed:!0,children:Ce})})}),StreamlitMarkdown=({source:n,allowHTML:o,style:e,isCaption:t,isLabel:c,boldLabel:p,largerLabel:h,disableLinks:y,isToast:g,inheritFont:$})=>{const E=reactExports.useContext(IsDialogContext);return jsx$1(StyledStreamlitMarkdown,{isCaption:!!t,isInDialog:E,isLabel:c,inheritFont:$,boldLabel:p,largerLabel:h,isToast:g,style:e,"data-testid":t?"stCaptionContainer":"stMarkdownContainer",children:jsx$1(RenderedMarkdown,{source:n,allowHTML:o,isLabel:c,disableLinks:y})})},StreamlitMarkdown$1=reactExports.memo(StreamlitMarkdown),isff=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function addEvent(n,o,e,t){n.addEventListener?n.addEventListener(o,e,t):n.attachEvent&&n.attachEvent("on".concat(o),e)}function removeEvent(n,o,e,t){n.removeEventListener?n.removeEventListener(o,e,t):n.detachEvent&&n.detachEvent("on".concat(o),e)}function getMods(n,o){const e=o.slice(0,o.length-1);for(let t=0;t<e.length;t++)e[t]=n[e[t].toLowerCase()];return e}function getKeys(n){typeof n!="string"&&(n=""),n=n.replace(/\s/g,"");const o=n.split(",");let e=o.lastIndexOf("");for(;e>=0;)o[e-1]+=",",o.splice(e,1),e=o.lastIndexOf("");return o}function compareArray(n,o){const e=n.length>=o.length?n:o,t=n.length>=o.length?o:n;let c=!0;for(let p=0;p<e.length;p++)t.indexOf(e[p])===-1&&(c=!1);return c}const _keyMap={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":isff?173:189,"=":isff?61:187,";":isff?59:186,"'":222,"[":219,"]":221,"\\":220},_modifier={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},modifierMap={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},_mods={16:!1,18:!1,17:!1,91:!1},_handlers={};for(let n=1;n<20;n++)_keyMap["f".concat(n)]=111+n;let _downKeys=[],winListendFocus=null,_scope="all";const elementEventMap=new Map,code=n=>_keyMap[n.toLowerCase()]||_modifier[n.toLowerCase()]||n.toUpperCase().charCodeAt(0),getKey=n=>Object.keys(_keyMap).find(o=>_keyMap[o]===n),getModifier=n=>Object.keys(_modifier).find(o=>_modifier[o]===n);function setScope(n){_scope=n||"all"}function getScope(){return _scope||"all"}function getPressedKeyCodes(){return _downKeys.slice(0)}function getPressedKeyString(){return _downKeys.map(n=>getKey(n)||getModifier(n)||String.fromCharCode(n))}function getAllKeyCodes(){const n=[];return Object.keys(_handlers).forEach(o=>{_handlers[o].forEach(e=>{let{key:t,scope:c,mods:p,shortcut:h}=e;n.push({scope:c,shortcut:h,mods:p,keys:t.split("+").map(y=>code(y))})})}),n}function filter(n){const o=n.target||n.srcElement,{tagName:e}=o;let t=!0;const c=e==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(o.type);return(o.isContentEditable||(c||e==="TEXTAREA"||e==="SELECT")&&!o.readOnly)&&(t=!1),t}function isPressed(n){return typeof n=="string"&&(n=code(n)),_downKeys.indexOf(n)!==-1}function deleteScope(n,o){let e,t;n||(n=getScope());for(const c in _handlers)if(Object.prototype.hasOwnProperty.call(_handlers,c))for(e=_handlers[c],t=0;t<e.length;)e[t].scope===n?e.splice(t,1).forEach(h=>{let{element:y}=h;return removeKeyEvent(y)}):t++;getScope()===n&&setScope(o||"all")}function clearModifier(n){let o=n.keyCode||n.which||n.charCode;const e=_downKeys.indexOf(o);if(e>=0&&_downKeys.splice(e,1),n.key&&n.key.toLowerCase()==="meta"&&_downKeys.splice(0,_downKeys.length),(o===93||o===224)&&(o=91),o in _mods){_mods[o]=!1;for(const t in _modifier)_modifier[t]===o&&(hotkeys[t]=!1)}}function unbind(n){if(typeof n>"u")Object.keys(_handlers).forEach(c=>{Array.isArray(_handlers[c])&&_handlers[c].forEach(p=>eachUnbind(p)),delete _handlers[c]}),removeKeyEvent(null);else if(Array.isArray(n))n.forEach(c=>{c.key&&eachUnbind(c)});else if(typeof n=="object")n.key&&eachUnbind(n);else if(typeof n=="string"){for(var o=arguments.length,e=new Array(o>1?o-1:0),t=1;t<o;t++)e[t-1]=arguments[t];let[c,p]=e;typeof c=="function"&&(p=c,c=""),eachUnbind({key:n,scope:c,method:p,splitKey:"+"})}}const eachUnbind=n=>{let{key:o,scope:e,method:t,splitKey:c="+"}=n;getKeys(o).forEach(h=>{const y=h.split(c),g=y.length,$=y[g-1],E=$==="*"?"*":code($);if(!_handlers[E])return;e||(e=getScope());const A=g>1?getMods(_modifier,y):[],N=[];_handlers[E]=_handlers[E].filter(H=>{const X=(t?H.method===t:!0)&&H.scope===e&&compareArray(H.mods,A);return X&&N.push(H.element),!X}),N.forEach(H=>removeKeyEvent(H))})};function eventHandler(n,o,e,t){if(o.element!==t)return;let c;if(o.scope===e||o.scope==="all"){c=o.mods.length>0;for(const p in _mods)Object.prototype.hasOwnProperty.call(_mods,p)&&(!_mods[p]&&o.mods.indexOf(+p)>-1||_mods[p]&&o.mods.indexOf(+p)===-1)&&(c=!1);(o.mods.length===0&&!_mods[16]&&!_mods[18]&&!_mods[17]&&!_mods[91]||c||o.shortcut==="*")&&(o.keys=[],o.keys=o.keys.concat(_downKeys),o.method(n,o)===!1&&(n.preventDefault?n.preventDefault():n.returnValue=!1,n.stopPropagation&&n.stopPropagation(),n.cancelBubble&&(n.cancelBubble=!0)))}}function dispatch(n,o){const e=_handlers["*"];let t=n.keyCode||n.which||n.charCode;if(!hotkeys.filter.call(this,n))return;if((t===93||t===224)&&(t=91),_downKeys.indexOf(t)===-1&&t!==229&&_downKeys.push(t),["ctrlKey","altKey","shiftKey","metaKey"].forEach(y=>{const g=modifierMap[y];n[y]&&_downKeys.indexOf(g)===-1?_downKeys.push(g):!n[y]&&_downKeys.indexOf(g)>-1?_downKeys.splice(_downKeys.indexOf(g),1):y==="metaKey"&&n[y]&&_downKeys.length===3&&(n.ctrlKey||n.shiftKey||n.altKey||(_downKeys=_downKeys.slice(_downKeys.indexOf(g))))}),t in _mods){_mods[t]=!0;for(const y in _modifier)_modifier[y]===t&&(hotkeys[y]=!0);if(!e)return}for(const y in _mods)Object.prototype.hasOwnProperty.call(_mods,y)&&(_mods[y]=n[modifierMap[y]]);n.getModifierState&&!(n.altKey&&!n.ctrlKey)&&n.getModifierState("AltGraph")&&(_downKeys.indexOf(17)===-1&&_downKeys.push(17),_downKeys.indexOf(18)===-1&&_downKeys.push(18),_mods[17]=!0,_mods[18]=!0);const c=getScope();if(e)for(let y=0;y<e.length;y++)e[y].scope===c&&(n.type==="keydown"&&e[y].keydown||n.type==="keyup"&&e[y].keyup)&&eventHandler(n,e[y],c,o);if(!(t in _handlers))return;const p=_handlers[t],h=p.length;for(let y=0;y<h;y++)if((n.type==="keydown"&&p[y].keydown||n.type==="keyup"&&p[y].keyup)&&p[y].key){const g=p[y],{splitKey:$}=g,E=g.key.split($),A=[];for(let N=0;N<E.length;N++)A.push(code(E[N]));A.sort().join("")===_downKeys.sort().join("")&&eventHandler(n,g,c,o)}}function hotkeys(n,o,e){_downKeys=[];const t=getKeys(n);let c=[],p="all",h=document,y=0,g=!1,$=!0,E="+",A=!1,N=!1;for(e===void 0&&typeof o=="function"&&(e=o),Object.prototype.toString.call(o)==="[object Object]"&&(o.scope&&(p=o.scope),o.element&&(h=o.element),o.keyup&&(g=o.keyup),o.keydown!==void 0&&($=o.keydown),o.capture!==void 0&&(A=o.capture),typeof o.splitKey=="string"&&(E=o.splitKey),o.single===!0&&(N=!0)),typeof o=="string"&&(p=o),N&&unbind(n,p);y<t.length;y++)n=t[y].split(E),c=[],n.length>1&&(c=getMods(_modifier,n)),n=n[n.length-1],n=n==="*"?"*":code(n),n in _handlers||(_handlers[n]=[]),_handlers[n].push({keyup:g,keydown:$,scope:p,mods:c,shortcut:t[y],method:e,key:t[y],splitKey:E,element:h});if(typeof h<"u"&&window){if(!elementEventMap.has(h)){const H=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return dispatch(X,h)},Z=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;dispatch(X,h),clearModifier(X)};elementEventMap.set(h,{keydownListener:H,keyupListenr:Z,capture:A}),addEvent(h,"keydown",H,A),addEvent(h,"keyup",Z,A)}if(!winListendFocus){const H=()=>{_downKeys=[]};winListendFocus={listener:H,capture:A},addEvent(window,"focus",H,A)}}}function trigger(n){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(_handlers).forEach(e=>{_handlers[e].filter(c=>c.scope===o&&c.shortcut===n).forEach(c=>{c&&c.method&&c.method()})})}function removeKeyEvent(n){const o=Object.values(_handlers).flat();if(o.findIndex(t=>{let{element:c}=t;return c===n})<0){const{keydownListener:t,keyupListenr:c,capture:p}=elementEventMap.get(n)||{};t&&c&&(removeEvent(n,"keyup",c,p),removeEvent(n,"keydown",t,p),elementEventMap.delete(n))}if((o.length<=0||elementEventMap.size<=0)&&(Object.keys(elementEventMap).forEach(c=>{const{keydownListener:p,keyupListenr:h,capture:y}=elementEventMap.get(c)||{};p&&h&&(removeEvent(c,"keyup",h,y),removeEvent(c,"keydown",p,y),elementEventMap.delete(c))}),elementEventMap.clear(),Object.keys(_handlers).forEach(c=>delete _handlers[c]),winListendFocus)){const{listener:c,capture:p}=winListendFocus;removeEvent(window,"focus",c,p),winListendFocus=null}}const _api={getPressedKeyString,setScope,getScope,deleteScope,getPressedKeyCodes,getAllKeyCodes,isPressed,filter,trigger,unbind,keyMap:_keyMap,modifier:_modifier,modifierMap};for(const n in _api)Object.prototype.hasOwnProperty.call(_api,n)&&(hotkeys[n]=_api[n]);if(typeof window<"u"){const n=window.hotkeys;hotkeys.noConflict=o=>(o&&window.hotkeys===hotkeys&&(window.hotkeys=n),hotkeys),window.hotkeys=hotkeys}const EDITABLE_TAGS=new Set(["INPUT","TEXTAREA","SELECT"]),MODIFIER_TOKENS=new Set(["ctrl","cmd","alt","shift","mod"]),SYSTEM_MODIFIERS=new Set(["ctrl","cmd","alt","mod"]),MODIFIER_ORDER=["ctrl","cmd","alt","shift","mod"],MODIFIER_DISPLAY={ctrl:"Ctrl",cmd:"⌘",alt:"Alt",shift:"Shift",mod:"Mod"},KEY_DISPLAY={enter:"Enter",space:"Space",tab:"Tab",escape:"Esc",backspace:"Backspace",delete:"Delete",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",left:"←",right:"→",up:"↑",down:"↓"},NAVIGATION_KEYS=new Set(["left","right","up","down","home","end","pageup","pagedown","backspace","delete"]);let filterConfigured=!1;function ensureHotkeysFilterConfigured(){filterConfigured||(hotkeys.filter=n=>{const o=n.target||n.srcElement;if(!o)return!0;const e=o.tagName;if(!(EDITABLE_TAGS.has(e)||!!o.isContentEditable)||n.key==="Escape"||n.ctrlKey||n.metaKey||n.altKey)return!0;if(n.shiftKey){const c=n.key??"";if(c.length>1&&!/^[a-z0-9]$/i.test(c))return!0}return!1},filterConfigured=!0)}function parseShortcutString(n){if(!n)return;const o=n.split("+").map(c=>c.trim().toLowerCase()).filter(Boolean);if(o.length===0)return;let e;for(let c=o.length-1;c>=0;c-=1){const p=o[c];if(!MODIFIER_TOKENS.has(p)){e=p;break}}const t=o.some(c=>SYSTEM_MODIFIERS.has(c));return{tokens:o,baseKey:e,hasSystemModifier:t}}function shouldBlockShortcutInInput(n,o){const e=o.target||o.srcElement;if(!e||!(EDITABLE_TAGS.has(e.tagName)||!!e.isContentEditable)||n.hasSystemModifier)return!1;const c=n.baseKey;return!!(!c||c.length===1&&/^[a-z0-9]$/i.test(c)||c==="space"||c==="tab"||c==="enter"||NAVIGATION_KEYS.has(c))}function toHotkeysSequenceFromTokens(n){return n.map(o=>o==="cmd"?"command":o).join("+")}function buildSequences(n){if(!n)return[];const{tokens:o}=n,t=isFromMac()?"cmd":"ctrl",c=o.map(h=>h==="cmd"||h==="ctrl"||h==="mod"?t:h),p=Array.from(new Set(c));return[toHotkeysSequenceFromTokens(p)]}function getModifierLabel(n,o){return n==="cmd"||n==="ctrl"||n==="mod"?o?MODIFIER_DISPLAY.cmd:MODIFIER_DISPLAY.ctrl:n==="alt"&&o?"⌥":MODIFIER_DISPLAY[n]}function getKeyLabel(n){return KEY_DISPLAY[n]?KEY_DISPLAY[n]:(n.length===1||n.startsWith("f")&&/^\d+$/.test(n.slice(1)),n.toUpperCase())}function formatShortcutForDisplay(n,o){const e=parseShortcutString(n);if(!e)return;const t=o?.isMac??!1,c=[];if(MODIFIER_ORDER.forEach(p=>{if(e.tokens.includes(p)){const h=getModifierLabel(p,t);h&&c.push(h)}}),e.baseKey&&c.push(getKeyLabel(e.baseKey)),c.length!==0)return c.join(" + ")}function useRegisterShortcut({shortcut:n,disabled:o=!1,onActivate:e}){const t=reactExports.useMemo(()=>parseShortcutString(n),[n]),c=reactExports.useMemo(()=>buildSequences(t),[t]);reactExports.useEffect(()=>{if(!t||c.length===0||o)return;const p=(h,y)=>{o||shouldBlockShortcutInInput(t,h)||(h.preventDefault(),e())};return c.forEach(h=>{hotkeys(h,p)}),()=>{c.forEach(h=>{hotkeys.unbind(h,p)})}},[t,c,o,e])}var BaseButtonKind=function(n){return n.PRIMARY="primary",n.SECONDARY="secondary",n.TERTIARY="tertiary",n.GHOST="ghost",n.BORDERLESS_ICON="borderlessIcon",n.BORDERLESS_ICON_ACTIVE="borderlessIconActive",n.MINIMAL="minimal",n.PRIMARY_FORM_SUBMIT="primaryFormSubmit",n.SECONDARY_FORM_SUBMIT="secondaryFormSubmit",n.TERTIARY_FORM_SUBMIT="tertiaryFormSubmit",n.HEADER_BUTTON="header",n.HEADER_NO_PADDING="headerNoPadding",n.ELEMENT_TOOLBAR="elementToolbar",n.PILLS="pills",n.PILLS_ACTIVE="pillsActive",n.SEGMENTED_CONTROL="segmented_control",n.SEGMENTED_CONTROL_ACTIVE="segmented_controlActive",n}({}),BaseButtonSize=function(n){return n.XSMALL="xsmall",n.SMALL="small",n.MEDIUM="medium",n.LARGE="large",n}({});function getSizeStyle(n,o){switch(n){case"xsmall":return{padding:`${o.spacing.twoXS} ${o.spacing.sm}`,fontSize:o.fontSizes.sm};case"small":return{padding:`${o.spacing.twoXS} ${o.spacing.md}`};case"large":return{padding:`${o.spacing.md} ${o.spacing.md}`};default:return{padding:`${o.spacing.xs} ${o.spacing.md}`}}}const StyledBaseButton=styled("button",{target:"e1q4kxr40"})(({containerWidth:n,size:o,theme:e})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:e.fontWeights.normal,padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radii.button,minHeight:e.sizes.minElementHeight,margin:e.spacing.none,lineHeight:e.lineHeights.base,textTransform:"none",fontSize:"inherit",fontFamily:"inherit",color:"inherit",width:n?"100%":"auto",cursor:"pointer",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${transparentize(e.colors.primary,.5)}`},...getSizeStyle(o,e)})),StyledPrimaryButton=styled(StyledBaseButton,{target:"e1q4kxr41"})(({theme:n})=>({backgroundColor:n.colors.primary,color:n.colors.white,border:`${n.sizes.borderWidth} solid ${n.colors.primary}`,"&:hover, &:focus-visible":{backgroundColor:darken(n.colors.primary,.15),borderColor:darken(n.colors.primary,.15)},"&:active":{backgroundColor:n.colors.primary,borderColor:darken(n.colors.primary,.15)},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.transparent,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledSecondaryButton=styled(StyledBaseButton,{target:"e1q4kxr42"})(({theme:n})=>({backgroundColor:n.colors.lightenedBg05,border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,"&:hover, &:focus-visible":{backgroundColor:n.colors.darkenedBgMix15},"&:active":{backgroundColor:n.colors.darkenedBgMix25},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.transparent,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledTertiaryButton=styled(StyledBaseButton,{target:"e1q4kxr43"})(({theme:n})=>({padding:n.spacing.none,backgroundColor:n.colors.transparent,border:"none","&:hover, &:focus-visible":{color:n.colors.primary},"&:hover:not(:disabled), &:focus-visible:not(:disabled)":{"span.stMarkdownColoredText":{color:"inherit !important"}},"&:active":{color:darken(n.colors.primary,.25)},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:n.colors.transparent,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledGhostButton=styled(StyledBaseButton,{target:"e1q4kxr44"})(({theme:n})=>({backgroundColor:n.colors.transparent,border:`${n.sizes.borderWidth} solid ${n.colors.transparent}`,"&:hover, &:focus-visible":{borderColor:n.colors.transparent,color:n.colors.primary},"&:active":{color:n.colors.primary,borderColor:n.colors.transparent,backgroundColor:n.colors.transparent},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:n.colors.gray30,borderColor:n.colors.transparent,color:n.colors.gray60}})),StyledMinimalButton=styled(StyledBaseButton,{target:"e1q4kxr45"})(({theme:n})=>({backgroundColor:n.colors.transparent,border:"none",boxShadow:"none",padding:n.spacing.none,"&:hover, &:active, &:focus-visible":{color:n.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledPrimaryFormSubmitButton=styled(StyledPrimaryButton,{target:"e1q4kxr46"})(),StyledSecondaryFormSubmitButton=styled(StyledSecondaryButton,{target:"e1q4kxr47"})(),StyledTertiaryFormSubmitButton=styled(StyledTertiaryButton,{target:"e1q4kxr48"})(),StyledButtonGroupBaseButton=styled(StyledBaseButton,{target:"e1q4kxr49"})(({theme:n})=>({background:n.colors.bgColor,border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,fontSize:n.fontSizes.sm,lineHeight:n.lineHeights.base,fontWeight:n.fontWeights.normal,height:n.sizes.largeLogoHeight,minHeight:n.sizes.largeLogoHeight,maxWidth:n.sizes.contentMaxWidth,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&:hover, &:focus-visible":{backgroundColor:n.colors.darkenedBgMix15},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.transparent,color:n.colors.fadedText40,cursor:"not-allowed"},"& div":{textOverflow:"ellipsis",overflow:"hidden"},"& p":{textOverflow:"ellipsis",overflow:"hidden"}})),StyledPillsButton=styled(StyledButtonGroupBaseButton,{target:"e1q4kxr410"})(({theme:n,containerWidth:o})=>({borderRadius:n.radii.full,padding:`${n.spacing.twoXS} ${n.spacing.md}`,flex:o?"1 1 fit-content":""})),StyledPillsButtonActive=styled(StyledPillsButton,{target:"e1q4kxr411"})(({theme:n})=>({backgroundColor:transparentize(n.colors.primary,.9),borderColor:n.colors.primary,color:n.colors.primary,"&:hover, &:focus-visible":{backgroundColor:transparentize(n.colors.primary,.8),borderColor:n.colors.primary,color:n.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.fadedText05,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledSegmentedControlButton=styled(StyledButtonGroupBaseButton,{target:"e1q4kxr412"})(({theme:n,containerWidth:o})=>({padding:`${n.spacing.twoXS} ${n.spacing.lg}`,borderRadius:"0",flex:o?"1 1 fit-content":"",maxWidth:"100%",marginRight:`-${n.sizes.borderWidth}`,"&:first-child":{borderTopLeftRadius:n.radii.button,borderBottomLeftRadius:n.radii.button},"&:last-child":{borderTopRightRadius:n.radii.button,borderBottomRightRadius:n.radii.button,marginRight:n.spacing.none},"&:focus-visible":{zIndex:n.zIndices.priority}})),StyledSegmentedControlButtonActive=styled(StyledSegmentedControlButton,{target:"e1q4kxr413"})(({theme:n})=>({backgroundColor:transparentize(n.colors.primary,.9),borderColor:n.colors.primary,color:n.colors.primary,zIndex:n.zIndices.priority,"&:hover, &:focus-visible":{backgroundColor:transparentize(n.colors.primary,.8)},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.fadedText05,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledHeaderButton=styled(StyledBaseButton,{target:"e1q4kxr414"})(({theme:n})=>({backgroundColor:n.colors.transparent,border:"none",padding:`0 ${n.spacing.sm}`,fontSize:n.fontSizes.sm,marginLeft:n.spacing.threeXS,marginRight:n.spacing.threeXS,lineHeight:n.lineHeights.none,minWidth:n.sizes.headerItemHeight,minHeight:n.sizes.headerItemHeight,"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${transparentize(n.colors.gray90,.8)}`},"&:hover":{backgroundColor:n.colors.darkenedBgMix15},"&:active":{backgroundColor:n.colors.darkenedBgMix25},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:n.colors.gray30,borderColor:n.colors.transparent,color:n.colors.gray60}})),StyledHeaderNoPaddingButton=styled(StyledHeaderButton,{target:"e1q4kxr415"})(()=>({padding:0})),StyledBorderlessIconButton=styled(StyledBaseButton,{target:"e1q4kxr416"})(({size:n,theme:o})=>{const e={xsmall:o.spacing.threeXS,small:o.spacing.twoXS,medium:o.spacing.md,large:o.spacing.lg};return{backgroundColor:o.colors.transparent,color:o.colors.fadedText60,padding:e[n],marginLeft:o.spacing.none,marginRight:o.spacing.none,flex:"0 0 fit-content",border:"none",display:"flex",minHeight:"unset","&:focus":{boxShadow:"none",outline:"none"},"&:hover":{color:o.colors.bodyText},"&:disabled, &:disabled:hover, &:disabled:active":{color:o.colors.fadedText10,cursor:"not-allowed",img:{opacity:.4}}}}),StyledBorderlessIconButtonActive=styled(StyledBorderlessIconButton,{target:"e1q4kxr417"})(({theme:n})=>({color:n.colors.bodyText,"&:disabled, &:disabled:hover, &:disabled:active":{color:n.colors.fadedText40}})),StyledTooltipNormal=styled("div",{target:"e1q4kxr418"})(({theme:n})=>({display:"block",[`@media (max-width: ${n.breakpoints.sm})`]:{display:"none"}})),StyledTooltipMobile=styled("div",{target:"e1q4kxr419"})(({theme:n})=>({display:"none",[`@media (max-width: ${n.breakpoints.sm})`]:{display:"block"}})),StyledElementToolbarButton=styled(StyledBaseButton,{target:"e1q4kxr420"})(({theme:n})=>({backgroundColor:n.colors.transparent,border:"none",padding:n.spacing.twoXS,fontSize:n.fontSizes.twoSm,marginLeft:n.spacing.none,marginRight:n.spacing.none,display:"flex",gap:n.spacing.xs,alignItems:"center",minHeight:"unset",lineHeight:n.iconSizes.md,width:"auto","&:focus":{outline:"none",border:"none",boxShadow:"none"},"&:focus-visible":{outline:"none",border:"none",boxShadow:"none",backgroundColor:n.colors.darkenedBgMix25},"&:hover":{backgroundColor:n.colors.darkenedBgMix15},"&:active":{backgroundColor:n.colors.darkenedBgMix25},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:n.colors.gray30,borderColor:n.colors.transparent,color:n.colors.gray60}})),StyledButtonGroup=styled("div",{target:"e1q4kxr421"})(({containerWidth:n})=>({width:n?"100%":"auto"})),StyledButtonLabel=styled("div",{target:"e1q4kxr422"})(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),StyledButtonMainLabel=styled("span",{target:"e1q4kxr423"})(({theme:n})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",gap:n.spacing.sm,minWidth:0})),StyledButtonShortcut=styled("kbd",{target:"e1q4kxr424"})(({theme:n})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:n.fontSizes.sm,opacity:.6,fontFamily:"inherit",lineHeight:n.lineHeights.tight,letterSpacing:"0.01em"})),DynamicButtonLabel=({icon:n,label:o,iconSize:e,useSmallerFont:t=!1,shortcut:c})=>{const p=reactExports.useMemo(()=>formatShortcutForDisplay(c,{isMac:isFromMac()}),[c]);return jsx$1(StyledButtonLabel,{children:jsxs(StyledButtonMainLabel,{"data-has-shortcut":!!p,children:[n&&jsx$1(DynamicIcon,{size:e??"lg",iconValue:n}),o&&jsx$1(StreamlitMarkdown$1,{source:o,allowHTML:!1,isLabel:!0,largerLabel:!t,disableLinks:!0}),p&&jsx$1(StyledButtonShortcut,{"aria-label":`Shortcut ${p}`,children:p})]})})};function BaseButton(n){const{kind:o,size:e,disabled:t,onClick:c,containerWidth:p,children:h,autoFocus:y}=n;let g=StyledPrimaryButton;return o===BaseButtonKind.SECONDARY?g=StyledSecondaryButton:o===BaseButtonKind.TERTIARY?g=StyledTertiaryButton:o===BaseButtonKind.GHOST?g=StyledGhostButton:o===BaseButtonKind.PILLS?g=StyledPillsButton:o===BaseButtonKind.PILLS_ACTIVE?g=StyledPillsButtonActive:o===BaseButtonKind.SEGMENTED_CONTROL?g=StyledSegmentedControlButton:o===BaseButtonKind.SEGMENTED_CONTROL_ACTIVE?g=StyledSegmentedControlButtonActive:o===BaseButtonKind.BORDERLESS_ICON?g=StyledBorderlessIconButton:o===BaseButtonKind.BORDERLESS_ICON_ACTIVE?g=StyledBorderlessIconButtonActive:o===BaseButtonKind.MINIMAL?g=StyledMinimalButton:o===BaseButtonKind.PRIMARY_FORM_SUBMIT?g=StyledPrimaryFormSubmitButton:o===BaseButtonKind.SECONDARY_FORM_SUBMIT?g=StyledSecondaryFormSubmitButton:o===BaseButtonKind.TERTIARY_FORM_SUBMIT?g=StyledTertiaryFormSubmitButton:o===BaseButtonKind.HEADER_BUTTON?g=StyledHeaderButton:o===BaseButtonKind.HEADER_NO_PADDING?g=StyledHeaderNoPaddingButton:o===BaseButtonKind.ELEMENT_TOOLBAR&&(g=StyledElementToolbarButton),jsx$1(g,{kind:o,size:e??BaseButtonSize.MEDIUM,containerWidth:p||!1,disabled:t||!1,onClick:c||(()=>{}),autoFocus:y||!1,"data-testid":n["data-testid"]??`stBaseButton-${o}`,"aria-label":n["aria-label"]??"",children:h})}function BaseButtonTooltip({children:n,help:o,placement:e,containerWidth:t}){return o?jsxs(Fragment,{children:[jsx$1(StyledTooltipNormal,{children:jsx$1(TooltipIcon,{content:o,placement:e||Placement.TOP,containerWidth:t,children:n})}),jsx$1(StyledTooltipMobile,{children:n})]}):n}const StyledModalButton=styled("span",{target:"egf28ua0"})(({theme:n})=>({marginRight:n.spacing.twoXS}));function ModalHeader({children:n,overrides:o}){const{genericFonts:e,fontSizes:t,spacing:c,fontWeights:p,lineHeights:h}=useEmotionTheme();return jsx$1(ModalHeader$1,{style:{marginTop:c.none,marginLeft:c.none,marginRight:c.none,marginBottom:c.none,paddingTop:c.twoXL,paddingRight:c.twoXL,paddingBottom:c.md,paddingLeft:c.twoXL,fontFamily:e.bodyFont,fontSize:t.xl,fontWeight:p.bold,margin:c.none,lineHeight:h.small,textTransform:"none",display:"flex",alignItems:"center",maxHeight:"80vh",flexDirection:"row",...o},children:n})}function ModalBody$1({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.twoXL,paddingBottom:t.twoXL,paddingLeft:t.twoXL,color:o.bodyText,fontSize:e.md},children:n})}function ModalFooter({children:n}){const{spacing:o}=useEmotionTheme();return jsx$1(ModalFooter$1,{style:{marginTop:o.none,marginLeft:o.none,marginRight:o.none,marginBottom:o.none,paddingTop:o.md,paddingRight:o.md,paddingBottom:o.md,paddingLeft:o.md},children:jsx$1("div",{children:n})})}const ModalButton=n=>jsx$1(StyledModalButton,{children:jsx$1(BaseButton,{...n})});function calculateModalSize(n,o,e){return n==="large"?"80rem":n==="medium"&&o&&e?`calc(${o} + ${e})`:n==="auto"?SIZE$2.auto:SIZE$2.default}function Modal(n){const{spacing:o,radii:e,colors:t,sizes:c}=useEmotionTheme(),p={Root:{style:{background:t.darkenedBgMix25},props:{className:"stDialog","data-testid":"stDialog"}},DialogContainer:{style:{alignItems:"start",paddingTop:o.threeXL}},Dialog:{style:{borderBottomRightRadius:e.xxl,borderBottomLeftRadius:e.xxl,borderTopRightRadius:e.xxl,borderTopLeftRadius:e.xxl,minWidth:c.minPopupWidth}},Close:{style:{top:`calc(${o.twoXL} + .375rem)`,right:o.twoXL}}},h=calculateModalSize(n.size,c.contentMaxWidth,o.lg),y=merge$1(p,n.overrides),g={...n,size:h};return jsx$1(Modal$1,{...g,overrides:y})}const StyledDialogTitle=styled("div",{target:"e10pldce0"})(({theme:n})=>({marginRight:n.spacing.threeXL}));function mapDialogWidthToModalSize(n){switch(n){case Block$1.Dialog.DialogWidth.MEDIUM:return"medium";case Block$1.Dialog.DialogWidth.LARGE:return"large";case Block$1.Dialog.DialogWidth.SMALL:return"default";default:return assertNever(n),"default"}}const Dialog=({element:n,deltaMsgReceivedAt:o,children:e,widgetMgr:t,fragmentId:c})=>{const{title:p,dismissible:h,width:y,isOpen:g,id:$}=n,[E,A]=reactExports.useState(!1);reactExports.useEffect(()=>{notNullOrUndefined(g)&&A(g)},[g,o]);const N=reactExports.useCallback(()=>{A(!1),$&&t&&t.setTriggerValue({id:$,formId:""},{fromUi:!0},c)},[$,t,c]),H=reactExports.useCallback(Z=>{if(E&&Z.key.toLowerCase()==="r"&&!n.dismissible){const X=Z.target;if(X&&(X.isContentEditable||X.tagName==="INPUT"||X.tagName==="TEXTAREA"||X.tagName==="SELECT"))return;Z.preventDefault(),Z.stopPropagation()}},[E,n.dismissible]);return reactExports.useEffect(()=>{if(E&&!n.dismissible)return document.addEventListener("keydown",H,!0),()=>{document.removeEventListener("keydown",H,!0)}},[E,n.dismissible,H]),E?jsxs(Modal,{isOpen:!0,closeable:h,onClose:N,size:mapDialogWidthToModalSize(y),children:[jsx$1(ModalHeader,{children:jsx$1(StyledDialogTitle,{children:jsx$1(StreamlitMarkdown$1,{source:p,allowHTML:!1,isLabel:!0,inheritFont:!0})})}),jsx$1(ModalBody$1,{children:e})]}):jsx$1(Fragment,{})};function DialogWithProvider(n){return jsx$1(IsDialogContext.Provider,{value:!0,children:jsx$1(Dialog,{...n})})}const Dialog$1=reactExports.memo(DialogWithProvider),StyledExpandableContainer=styled("div",{target:"ef5ck4x0"})({width:"100%"}),BORDER_SIZE=1,StyledDetails=styled("details",{target:"ef5ck4x1"})(({isStale:n,theme:o})=>({marginBottom:0,marginTop:0,width:"100%",borderStyle:"solid",borderWidth:o.sizes.borderWidth,borderColor:o.colors.borderColor,borderRadius:o.radii.default,...n?{borderColor:o.colors.borderColorLight,transition:`border ${STALE_TRANSITION_PARAMS}`}:{}})),StyledSummaryHeading=styled("span",{target:"ef5ck4x2"})(({theme:n})=>({display:"flex",alignItems:"center",flexGrow:1,minWidth:0,width:"100%",maxWidth:"100%",overflow:"hidden",gap:n.spacing.sm})),StyledSummaryLabelWrapper=styled("div",{target:"ef5ck4x3"})({display:"flex",width:"100%",flexGrow:1,overflow:"hidden"}),StyledSummary=styled("summary",{target:"ef5ck4x4"})(({theme:n,isStale:o,expanded:e})=>({position:"relative",display:"flex",width:"100%",minWidth:0,overflow:"hidden","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${transparentize(n.colors.primary,.5)}`},fontSize:"inherit",paddingLeft:n.spacing.md,paddingRight:n.spacing.md,paddingTop:n.spacing.twoXS,paddingBottom:n.spacing.twoXS,minHeight:`calc(${n.sizes.minElementHeight} - 2 * ${n.sizes.borderWidth})`,alignItems:"center",cursor:"pointer",listStyleType:"none","&::-webkit-details-marker":{display:"none"},backgroundColor:e?n.colors.bgMix:"transparent",borderRadius:e?`${n.radii.default} ${n.radii.default} 0 0`:n.radii.default,transition:e?"border-radius 200ms cubic-bezier(0.23, 1, 0.32, 1), background-color 150ms ease":"border-radius 200ms cubic-bezier(0.23, 1, 0.32, 1) 300ms, background-color 150ms ease","&:hover, &:focus-visible":{backgroundColor:n.colors.darkenedBgMix15},"&:active":{backgroundColor:n.colors.darkenedBgMix25},...o&&STALE_STYLES})),StyledDetailsPanel=styled("div",{target:"ef5ck4x5"})(({theme:n})=>({padding:n.spacing.lg,borderTop:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`})),ExpanderIcon=n=>{const{icon:o}=n;return o?jsx$1(DynamicIcon,{size:"lg",iconValue:o,testid:{":material/check:":"stExpanderIconCheck",":material/error:":"stExpanderIconError",spinner:"stExpanderIconSpinner"}[o]||"stExpanderIcon"}):jsx$1(Fragment,{})},Expander=({element:n,isStale:o,children:e})=>{const{label:t,expanded:c}=n,[p,h]=reactExports.useState(c||!1),[y,g]=reactExports.useState(!1),$=reactExports.useRef(null),E=reactExports.useRef(null),A=reactExports.useRef(null),N=reactExports.useRef(null),H=reactExports.useRef(null);reactExports.useEffect(()=>{notNullOrUndefined(c)&&(h(c),$.current&&($.current.open=c))},[t,c]);const Z=Ne=>{$.current&&($.current.open=Ne,A.current=null,$.current.style.height="",$.current.style.overflow="")},X=(Ne,Fe,Be)=>{const Ge=Be>Fe;A.current&&(A.current.cancel(),N.current&&(clearTimeout(N.current),N.current=null));const je=Ne.animate({height:[`${Fe}px`,`${Be}px`]},{duration:500,easing:"cubic-bezier(0.23, 1, 0.32, 1)"});je.addEventListener("finish",()=>Z(Ge)),A.current=je},be=Ne=>{Ne.preventDefault(),h(!p);const Fe=$.current;if(!Fe||!E.current)return;Fe.style.overflow="hidden";const Be=Fe.getBoundingClientRect().height,Ge=E.current.getBoundingClientRect().height;p?X(Fe,Be,Ge+2*BORDER_SIZE):(Fe.style.height=`${Be}px`,Fe.open=!0,window.requestAnimationFrame(()=>{X(Fe,Be,Ge+2*BORDER_SIZE+5),N.current=setTimeout(()=>{if(!H.current)return;const je=H.current.getBoundingClientRect().height;X(Fe,Be,Ge+je+2*BORDER_SIZE)},100)}))},we=()=>{g(!0)},$e=()=>{g(!1)},Ce=!n.icon||y,Ie=n.icon&&!y;return jsx$1(StyledExpandableContainer,{className:"stExpander","data-testid":"stExpander",children:jsxs(StyledDetails,{isStale:o,ref:$,onMouseEnter:we,onMouseLeave:$e,children:[jsx$1(StyledSummary,{onClick:be,ref:E,isStale:o,expanded:p,children:jsxs(StyledSummaryHeading,{children:[Ce&&jsx$1(DynamicIcon,{iconValue:p?":material/keyboard_arrow_down:":":material/keyboard_arrow_right:",size:"lg"}),Ie&&jsx$1(ExpanderIcon,{icon:n.icon}),jsx$1(StyledSummaryLabelWrapper,{children:jsx$1(StreamlitMarkdown$1,{source:t,allowHTML:!1,isLabel:!0,largerLabel:!0})})]})}),jsx$1(StyledDetailsPanel,{"data-testid":"stExpanderDetails",ref:H,children:e})]})})},Expander$1=reactExports.memo(Expander),Box=styled("div",{target:"e7ygq4y0"})(({width:n="100%",height:o})=>({width:n,height:o})),getBorderColor=(n,o)=>{let e=n.widgetBorderColor??n.secondaryBg;return o&&(e=n.primary),e},useResizeObserver=(n,o=[])=>{const e=reactExports.useRef(null),[t,c]=reactExports.useState([]),p=reactExports.useCallback(()=>{if(!e.current)return[];const h=e.current.getBoundingClientRect();return n.map(y=>h[y])},[n]);return reactExports.useEffect(()=>{if(!e.current)return;c(p());let h;const y=new ResizeObserver(()=>{h=window.requestAnimationFrame(()=>{c(p())})});return y.observe(e.current),()=>{y.disconnect(),h&&cancelAnimationFrame(h)}},[n,p,...o]),{values:t,elementRef:e}},useCalculatedDimensions=(n=[],o=-1)=>{const{values:[e,t],elementRef:c}=useResizeObserver(reactExports.useMemo(()=>["width","height"],[]),n);return{width:e||o,height:t||o,elementRef:c}},StyledPopoverLabelContainer=styled("div",{target:"emnxg9p0"})(({theme:n})=>({display:"flex",alignItems:"center",gap:n.spacing.threeXS,marginRight:`calc(-${n.iconSizes.lg} * 0.25)`})),StyledPopoverExpansionIcon=styled("div",{target:"emnxg9p1"})(({theme:n})=>({display:"inline-flex",marginTop:n.spacing.threeXS})),Popover=({element:n,empty:o,children:e,stretchWidth:t})=>{const[c,p]=reactExports.useState(!1),h=reactExports.useContext(IsSidebarContext),y=useEmotionTheme(),g=hasLightBackgroundColor(y),{width:$,elementRef:E}=useCalculatedDimensions();let A=BaseButtonKind.SECONDARY;return n.type==="primary"?A=BaseButtonKind.PRIMARY:n.type==="tertiary"&&(A=BaseButtonKind.TERTIARY),jsx$1(Box,{"data-testid":"stPopover",className:"stPopover",ref:E,children:jsx$1(Popover$2,{triggerType:TRIGGER_TYPE.click,placement:PLACEMENT.bottomLeft,content:()=>e,isOpen:c,onClickOutside:()=>p(!1),onClick:()=>c?p(!1):void 0,onEsc:()=>p(!1),ignoreBoundary:h,renderAll:!0,overrides:{Body:{props:{"data-testid":"stPopoverBody"},style:()=>({marginRight:y.spacing.lg,marginBottom:y.spacing.lg,maxHeight:"70vh",overflow:"auto",maxWidth:`calc(${y.sizes.contentMaxWidth} - 2*${y.spacing.lg})`,minWidth:t?`${Math.max($,160)}px`:y.sizes.minPopupWidth,[`@media (max-width: ${y.breakpoints.sm})`]:{maxWidth:`calc(100% - ${y.spacing.threeXL})`},borderTopLeftRadius:y.radii.xl,borderTopRightRadius:y.radii.xl,borderBottomRightRadius:y.radii.xl,borderBottomLeftRadius:y.radii.xl,borderLeftWidth:y.sizes.borderWidth,borderRightWidth:y.sizes.borderWidth,borderTopWidth:y.sizes.borderWidth,borderBottomWidth:y.sizes.borderWidth,paddingRight:`calc(${y.spacing.twoXL} - ${y.sizes.borderWidth})`,paddingLeft:`calc(${y.spacing.twoXL} - ${y.sizes.borderWidth})`,paddingBottom:`calc(${y.spacing.twoXL} - ${y.sizes.borderWidth})`,paddingTop:`calc(${y.spacing.twoXL} - ${y.sizes.borderWidth})`,borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftColor:y.colors.borderColor,borderRightColor:y.colors.borderColor,borderTopColor:y.colors.borderColor,borderBottomColor:y.colors.borderColor,boxShadow:g?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"})}},children:jsx$1("div",{children:jsx$1(BaseButtonTooltip,{help:n.help,containerWidth:!0,children:jsx$1(BaseButton,{"data-testid":"stPopoverButton",kind:A,size:BaseButtonSize.SMALL,disabled:o||n.disabled,containerWidth:!0,onClick:()=>p(!c),children:jsxs(StyledPopoverLabelContainer,{children:[jsx$1(DynamicButtonLabel,{icon:n.icon,label:n.label}),jsx$1(StyledPopoverExpansionIcon,{children:jsx$1(DynamicIcon,{iconValue:c?":material/expand_less:":":material/expand_more:",size:"lg"})})]})})})})})})},Popover$1=reactExports.memo(Popover);var ORIENTATION={vertical:"vertical",horizontal:"horizontal"},FILL={fixed:"fixed",intrinsic:"intrinsic"},getTabId=function n(o,e){return"tabs-".concat(o,"-tab-").concat(e)},getTabPanelId=function n(o,e){return"tabs-".concat(o,"-tabpanel-").concat(e)},isHorizontal=function n(o){return o===ORIENTATION.horizontal},isVertical=function n(o){return o===ORIENTATION.vertical},isRTL=function n(o){return o==="rtl"},isIntrinsic=function n(o){return o===FILL.intrinsic},isFixed=function n(o){return o===FILL.fixed};function ownKeys$e(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$c(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$e(Object(e),!0).forEach(function(t){_defineProperty$f(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$e(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$f(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var StyledRoot$1=styled$1("div",function(n){n.$theme;var o=n.$orientation,e=o===void 0?ORIENTATION.horizontal:o,t={transform:"scale(1)"};return isVertical(e)&&(t.display="flex"),t});StyledRoot$1.displayName="StyledRoot";StyledRoot$1.displayName="StyledRoot";var StyledTabBar=styled$1("div",function(n){var o=n.$hasEndEnhancer,e=n.$orientation;return o||!isHorizontal(e)?{display:"flex"}:{}});StyledTabBar.displayName="StyledTabBar";StyledTabBar.displayName="StyledTabBar";var StyledTabList=styled$1("div",function(n){var o=n.$theme,e=n.$fill,t=e===void 0?FILL.intrinsic:e,c=n.$orientation,p=c===void 0?ORIENTATION.horizontal:c,h={position:"relative",display:"flex",flexWrap:"nowrap",flexGrow:1};return isHorizontal(p)?(h.flexDirection="row",h.paddingBottom="5px",h.marginBottom="-5px"):(h.flexDirection="column",isRTL(o.direction)?(h.paddingLeft="5px",h.marginLeft="-5px"):(h.paddingRight="5px",h.marginRight="-5px")),isIntrinsic(t)&&(h["::-webkit-scrollbar"]={display:"none"},h["-ms-overflow-style"]="none",h.scrollbarWidth="none",isHorizontal(p)?h.overflowX="scroll":h.overflowY="scroll"),h});StyledTabList.displayName="StyledTabList";StyledTabList.displayName="StyledTabList";var StyledTab=styled$1("button",function(n){var o=n.$theme,e=n.$orientation,t=e===void 0?ORIENTATION.horizontal:e,c=n.$fill,p=c===void 0?FILL.intrinsic:c,h=n.$focusVisible,y=h===void 0?!1:h;n.$isActive;var g=_objectSpread$c({cursor:"pointer",WebkitAppearance:"none",marginLeft:"0",marginRight:"0",marginTop:"0",marginBottom:"0",boxSizing:"border-box",display:"inline-flex",alignItems:"center",paddingLeft:o.sizing.scale600,paddingTop:o.sizing.scale600,paddingRight:o.sizing.scale600,paddingBottom:o.sizing.scale600,borderLeftWidth:0,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",color:o.colors.contentPrimary,background:o.colors.backgroundPrimary,transitionProperty:"background",transitionDuration:o.animation.timing200,transitionTimingFunction:o.animation.linearCurve,outline:"none",outlineOffset:"-3px",":disabled":{cursor:"not-allowed",color:o.colors.contentStateDisabled},":hover":{background:o.colors.backgroundSecondary},":disabled:hover":{background:"none"}},o.typography.LabelSmall);return y&&(g.outline="3px solid ".concat(o.colors.accent)),isFixed(p)&&(g.flexGrow=1,g.flexBasis=0),isHorizontal(t)?g.justifyContent="center":g.justifyContent="flex-end",g});StyledTab.displayName="StyledTab";StyledTab.displayName="StyledTab";var StyledEndEnhancerContainer=styled$1("div",function(n){var o=n.$theme,e=o.direction==="rtl"?"marginRight":"marginLeft";return _defineProperty$f({display:"flex",alignItems:"center",justifyContent:"flex-end"},e,o.sizing.scale600)});StyledEndEnhancerContainer.displayName="StyledEndEnhancerContainer";StyledEndEnhancerContainer.displayName="StyledEndEnhancerContainer";var StyledArtworkContainer=styled$1("div",function(n){var o=n.$theme;n.$orientation;var e={display:"flex"};return isRTL(o.direction)?e.marginLeft=o.sizing.scale300:e.marginRight=o.sizing.scale300,e});StyledArtworkContainer.displayName="StyledArtworkContainer";StyledArtworkContainer.displayName="StyledArtworkContainer";var StyledTabBorder=styled$1("div",function(n){var o=n.$theme,e=n.$orientation,t=e===void 0?ORIENTATION.horizontal:e,c={backgroundColor:o.colors.borderOpaque,position:"relative"};return isHorizontal(t)?c.height="5px":c.width="5px",c});StyledTabBorder.displayName="StyledTabBorder";StyledTabBorder.displayName="StyledTabBorder";var StyledTabHighlight=styled$1("div",function(n){var o=n.$theme,e=n.$orientation,t=e===void 0?ORIENTATION.horizontal:e,c=n.$length,p=c===void 0?0:c,h=n.$distance,y=h===void 0?0:h,g=n.$animate,$=g===void 0?!1:g,E={backgroundColor:o.colors.borderSelected,position:"absolute",zIndex:1};return isHorizontal(t)?(E.bottom="0px",E.left="0px",E.height="5px",E.width="".concat(p,"px"),E.transform="translateX(".concat(y,"px)")):(E.transform="translateY(".concat(y,"px)"),E.width="5px",E.height="".concat(p,"px"),isRTL(o.direction)?E.left="0px":E.right="0px"),$&&(E.transitionProperty="all",E.transitionDuration=o.animation.timing400,E.transitionTimingFunction=o.animation.easeInOutQuinticCurve),E});StyledTabHighlight.displayName="StyledTabHighlight";StyledTabHighlight.displayName="StyledTabHighlight";var StyledTabPanel=styled$1("div",function(n){var o=n.$theme,e=n.$pad,t=e===void 0?!0:e,c={flexGrow:1,outline:"none"};return t&&(c.paddingTop=o.sizing.scale600,c.paddingRight=o.sizing.scale600,c.paddingBottom=o.sizing.scale600,c.paddingLeft=o.sizing.scale600),c});StyledTabPanel.displayName="StyledTabPanel";StyledTabPanel.displayName="StyledTabPanel";var _excluded$j=["childKey","childIndex","activeKey","orientation","activeTabRef","updateHighlight","parseKeyDown","activateOnFocus","uid","disabled","sharedStylingProps","onChange"],_excluded2$4=["artwork","overrides","tabRef","onClick","title"],_excluded3$1=["childKey","childIndex","activeKey","uid","sharedStylingProps","renderAll"];function ownKeys$d(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$b(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$d(Object(e),!0).forEach(function(t){_defineProperty$e(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$d(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$e(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}function _toConsumableArray$1(n){return _arrayWithoutHoles$1(n)||_iterableToArray$1(n)||_unsupportedIterableToArray$e(n)||_nonIterableSpread$1()}function _nonIterableSpread$1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
102
+ `},hChildren:[{type:"text",value:c}]}}}return findAndReplace(o,[[/:material_(\w+):/g,e]]),o}}function createRemarkStreamlitLogo(){return()=>n=>{function o(){return{type:"text",value:"",data:{hName:"img",hProperties:{src:streamlitLogo,alt:"Streamlit logo",style:"display: inline-block; user-select: none; height: 0.75em; vertical-align: baseline; margin-bottom: -0.05ex;"}}}}return findAndReplace(n,[[/:streamlit:/g,o]]),n}}function createRemarkTypographicalSymbols(){return()=>n=>(visit(n,(o,e,t)=>{if(!(t&&(t.type==="link"||t.type==="linkReference"))&&o.type==="text"&&o.value){const c=[[/(^|\s)<->(\s|$)/g,"$1↔$2"],[/(^|\s)->(\s|$)/g,"$1→$2"],[/(^|\s)<-(\s|$)/g,"$1←$2"],[/(^|\s)--(\s|$)/g,"$1—$2"],[/(^|\s)>=(\s|$)/g,"$1≥$2"],[/(^|\s)<=(\s|$)/g,"$1≤$2"],[/(^|\s)~=(\s|$)/g,"$1≈$2"]];let p=o.value;for(const[h,y]of c)p=p.replace(h,y);p!==o.value&&(o.value=p)}}),n)}const BASE_REMARK_PLUGINS=[remarkMath,remarkGfm,remarkDirective,createRemarkHelpIcon(),createRemarkStreamlitLogo(),createRemarkTypographicalSymbols()],LABEL_DISALLOWED_ELEMENTS=["table","thead","tbody","tr","th","td","h1","h2","h3","h4","h5","h6","ul","ol","li","input","hr","blockquote"],LINKS_DISALLOWED_ELEMENTS=[...LABEL_DISALLOWED_ELEMENTS,"a"];function LinkWithTargetBlank(n){const{href:o}=n;if(o?.startsWith("#")){const{children:y,...g}=n;return jsx$1("a",{...omit(g,"node"),children:y})}const{title:e,children:t,target:c,rel:p,...h}=n;return jsx$1("a",{href:o,title:e,target:c||"_blank",rel:p||"noopener noreferrer",...omit(h,"node"),children:t})}const RenderedMarkdown=reactExports.memo(function n({allowHTML:o,source:e,overrideComponents:t,isLabel:c,disableLinks:p,helpText:h}){const y=useEmotionTheme(),g=reactExports.useMemo(()=>containsMathSyntax(e),[e]),$=reactExports.useMemo(()=>containsEmojiShortcodes(e),[e]),E=useLazyPlugin({key:"katex",needed:g,load:loadKatexPlugin,pluginName:"rehype-katex",onBeforeLoad:loadKatexStyles}),A=useLazyPlugin({key:"raw",needed:o,load:loadRehypeRaw,pluginName:"rehype-raw"}),N=useLazyPlugin({key:"emoji",needed:$,load:loadRemarkEmoji,pluginName:"remark-emoji"}),H=reactExports.useMemo(()=>createColorMapping(y),[y]),Z=reactExports.useMemo(()=>isLoadedPlugin(E)?wrapRehypePlugin(E,"rehype-katex"):null,[E]),X=reactExports.useMemo(()=>isLoadedPlugin(A)?wrapRehypePlugin(A,"rehype-raw"):null,[A]),be=reactExports.useMemo(()=>isLoadedPlugin(N)?wrapRemarkPlugin(N,"remark-emoji"):null,[N]),we=reactExports.useMemo(()=>{const Be=[...BASE_REMARK_PLUGINS,createRemarkColoringAndSmall(y,H),createRemarkMaterialIcons(y)];return $&&be&&Be.push(be),Be},[y,H,$,be]),$e=reactExports.useMemo(()=>{const Be=[];return g&&Z&&Be.push(Z),o&&X&&Be.push(X),Be.push(rehypeSetCodeInlineProperty),Be},[o,g,Z,X]),Ce=reactExports.useMemo(()=>({...BASE_RENDERERS,a:LinkWithTargetBlank,...t||{}}),[t]),Ie=reactExports.useMemo(()=>e.replaceAll(":material/",":material_"),[e]),Ne=reactExports.useMemo(()=>c?p?LINKS_DISALLOWED_ELEMENTS:LABEL_DISALLOWED_ELEMENTS:[],[c,p]);return g&&E===null||o&&A===null||$&&N===null?jsx$1(ErrorBoundary,{children:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})})}):jsx$1(HelpTextContext.Provider,{value:h,children:jsx$1(ErrorBoundary,{children:jsx$1(Markdown$2,{remarkPlugins:we,rehypePlugins:$e,components:Ce,urlTransform:transformLinkUri,disallowedElements:Ne,unwrapDisallowed:!0,children:Ie})})})}),StreamlitMarkdown=({source:n,allowHTML:o,style:e,isCaption:t,isLabel:c,boldLabel:p,largerLabel:h,disableLinks:y,isToast:g,inheritFont:$,helpText:E})=>{const A=reactExports.useContext(IsDialogContext);return jsx$1(StyledStreamlitMarkdown,{isCaption:!!t,isInDialog:A,isLabel:c,inheritFont:$,boldLabel:p,largerLabel:h,isToast:g,style:e,"data-testid":t?"stCaptionContainer":"stMarkdownContainer",children:jsx$1(RenderedMarkdown,{source:n,allowHTML:o,isLabel:c,disableLinks:y,helpText:E})})},StreamlitMarkdown$1=reactExports.memo(StreamlitMarkdown),isff=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function addEvent(n,o,e,t){n.addEventListener?n.addEventListener(o,e,t):n.attachEvent&&n.attachEvent("on".concat(o),e)}function removeEvent(n,o,e,t){n.removeEventListener?n.removeEventListener(o,e,t):n.detachEvent&&n.detachEvent("on".concat(o),e)}function getMods(n,o){const e=o.slice(0,o.length-1);for(let t=0;t<e.length;t++)e[t]=n[e[t].toLowerCase()];return e}function getKeys(n){typeof n!="string"&&(n=""),n=n.replace(/\s/g,"");const o=n.split(",");let e=o.lastIndexOf("");for(;e>=0;)o[e-1]+=",",o.splice(e,1),e=o.lastIndexOf("");return o}function compareArray(n,o){const e=n.length>=o.length?n:o,t=n.length>=o.length?o:n;let c=!0;for(let p=0;p<e.length;p++)t.indexOf(e[p])===-1&&(c=!1);return c}const _keyMap={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":isff?173:189,"=":isff?61:187,";":isff?59:186,"'":222,"[":219,"]":221,"\\":220},_modifier={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},modifierMap={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},_mods={16:!1,18:!1,17:!1,91:!1},_handlers={};for(let n=1;n<20;n++)_keyMap["f".concat(n)]=111+n;let _downKeys=[],winListendFocus=null,_scope="all";const elementEventMap=new Map,code=n=>_keyMap[n.toLowerCase()]||_modifier[n.toLowerCase()]||n.toUpperCase().charCodeAt(0),getKey=n=>Object.keys(_keyMap).find(o=>_keyMap[o]===n),getModifier=n=>Object.keys(_modifier).find(o=>_modifier[o]===n);function setScope(n){_scope=n||"all"}function getScope(){return _scope||"all"}function getPressedKeyCodes(){return _downKeys.slice(0)}function getPressedKeyString(){return _downKeys.map(n=>getKey(n)||getModifier(n)||String.fromCharCode(n))}function getAllKeyCodes(){const n=[];return Object.keys(_handlers).forEach(o=>{_handlers[o].forEach(e=>{let{key:t,scope:c,mods:p,shortcut:h}=e;n.push({scope:c,shortcut:h,mods:p,keys:t.split("+").map(y=>code(y))})})}),n}function filter(n){const o=n.target||n.srcElement,{tagName:e}=o;let t=!0;const c=e==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(o.type);return(o.isContentEditable||(c||e==="TEXTAREA"||e==="SELECT")&&!o.readOnly)&&(t=!1),t}function isPressed(n){return typeof n=="string"&&(n=code(n)),_downKeys.indexOf(n)!==-1}function deleteScope(n,o){let e,t;n||(n=getScope());for(const c in _handlers)if(Object.prototype.hasOwnProperty.call(_handlers,c))for(e=_handlers[c],t=0;t<e.length;)e[t].scope===n?e.splice(t,1).forEach(h=>{let{element:y}=h;return removeKeyEvent(y)}):t++;getScope()===n&&setScope(o||"all")}function clearModifier(n){let o=n.keyCode||n.which||n.charCode;const e=_downKeys.indexOf(o);if(e>=0&&_downKeys.splice(e,1),n.key&&n.key.toLowerCase()==="meta"&&_downKeys.splice(0,_downKeys.length),(o===93||o===224)&&(o=91),o in _mods){_mods[o]=!1;for(const t in _modifier)_modifier[t]===o&&(hotkeys[t]=!1)}}function unbind(n){if(typeof n>"u")Object.keys(_handlers).forEach(c=>{Array.isArray(_handlers[c])&&_handlers[c].forEach(p=>eachUnbind(p)),delete _handlers[c]}),removeKeyEvent(null);else if(Array.isArray(n))n.forEach(c=>{c.key&&eachUnbind(c)});else if(typeof n=="object")n.key&&eachUnbind(n);else if(typeof n=="string"){for(var o=arguments.length,e=new Array(o>1?o-1:0),t=1;t<o;t++)e[t-1]=arguments[t];let[c,p]=e;typeof c=="function"&&(p=c,c=""),eachUnbind({key:n,scope:c,method:p,splitKey:"+"})}}const eachUnbind=n=>{let{key:o,scope:e,method:t,splitKey:c="+"}=n;getKeys(o).forEach(h=>{const y=h.split(c),g=y.length,$=y[g-1],E=$==="*"?"*":code($);if(!_handlers[E])return;e||(e=getScope());const A=g>1?getMods(_modifier,y):[],N=[];_handlers[E]=_handlers[E].filter(H=>{const X=(t?H.method===t:!0)&&H.scope===e&&compareArray(H.mods,A);return X&&N.push(H.element),!X}),N.forEach(H=>removeKeyEvent(H))})};function eventHandler(n,o,e,t){if(o.element!==t)return;let c;if(o.scope===e||o.scope==="all"){c=o.mods.length>0;for(const p in _mods)Object.prototype.hasOwnProperty.call(_mods,p)&&(!_mods[p]&&o.mods.indexOf(+p)>-1||_mods[p]&&o.mods.indexOf(+p)===-1)&&(c=!1);(o.mods.length===0&&!_mods[16]&&!_mods[18]&&!_mods[17]&&!_mods[91]||c||o.shortcut==="*")&&(o.keys=[],o.keys=o.keys.concat(_downKeys),o.method(n,o)===!1&&(n.preventDefault?n.preventDefault():n.returnValue=!1,n.stopPropagation&&n.stopPropagation(),n.cancelBubble&&(n.cancelBubble=!0)))}}function dispatch(n,o){const e=_handlers["*"];let t=n.keyCode||n.which||n.charCode;if(!hotkeys.filter.call(this,n))return;if((t===93||t===224)&&(t=91),_downKeys.indexOf(t)===-1&&t!==229&&_downKeys.push(t),["ctrlKey","altKey","shiftKey","metaKey"].forEach(y=>{const g=modifierMap[y];n[y]&&_downKeys.indexOf(g)===-1?_downKeys.push(g):!n[y]&&_downKeys.indexOf(g)>-1?_downKeys.splice(_downKeys.indexOf(g),1):y==="metaKey"&&n[y]&&_downKeys.length===3&&(n.ctrlKey||n.shiftKey||n.altKey||(_downKeys=_downKeys.slice(_downKeys.indexOf(g))))}),t in _mods){_mods[t]=!0;for(const y in _modifier)_modifier[y]===t&&(hotkeys[y]=!0);if(!e)return}for(const y in _mods)Object.prototype.hasOwnProperty.call(_mods,y)&&(_mods[y]=n[modifierMap[y]]);n.getModifierState&&!(n.altKey&&!n.ctrlKey)&&n.getModifierState("AltGraph")&&(_downKeys.indexOf(17)===-1&&_downKeys.push(17),_downKeys.indexOf(18)===-1&&_downKeys.push(18),_mods[17]=!0,_mods[18]=!0);const c=getScope();if(e)for(let y=0;y<e.length;y++)e[y].scope===c&&(n.type==="keydown"&&e[y].keydown||n.type==="keyup"&&e[y].keyup)&&eventHandler(n,e[y],c,o);if(!(t in _handlers))return;const p=_handlers[t],h=p.length;for(let y=0;y<h;y++)if((n.type==="keydown"&&p[y].keydown||n.type==="keyup"&&p[y].keyup)&&p[y].key){const g=p[y],{splitKey:$}=g,E=g.key.split($),A=[];for(let N=0;N<E.length;N++)A.push(code(E[N]));A.sort().join("")===_downKeys.sort().join("")&&eventHandler(n,g,c,o)}}function hotkeys(n,o,e){_downKeys=[];const t=getKeys(n);let c=[],p="all",h=document,y=0,g=!1,$=!0,E="+",A=!1,N=!1;for(e===void 0&&typeof o=="function"&&(e=o),Object.prototype.toString.call(o)==="[object Object]"&&(o.scope&&(p=o.scope),o.element&&(h=o.element),o.keyup&&(g=o.keyup),o.keydown!==void 0&&($=o.keydown),o.capture!==void 0&&(A=o.capture),typeof o.splitKey=="string"&&(E=o.splitKey),o.single===!0&&(N=!0)),typeof o=="string"&&(p=o),N&&unbind(n,p);y<t.length;y++)n=t[y].split(E),c=[],n.length>1&&(c=getMods(_modifier,n)),n=n[n.length-1],n=n==="*"?"*":code(n),n in _handlers||(_handlers[n]=[]),_handlers[n].push({keyup:g,keydown:$,scope:p,mods:c,shortcut:t[y],method:e,key:t[y],splitKey:E,element:h});if(typeof h<"u"&&window){if(!elementEventMap.has(h)){const H=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return dispatch(X,h)},Z=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;dispatch(X,h),clearModifier(X)};elementEventMap.set(h,{keydownListener:H,keyupListenr:Z,capture:A}),addEvent(h,"keydown",H,A),addEvent(h,"keyup",Z,A)}if(!winListendFocus){const H=()=>{_downKeys=[]};winListendFocus={listener:H,capture:A},addEvent(window,"focus",H,A)}}}function trigger(n){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(_handlers).forEach(e=>{_handlers[e].filter(c=>c.scope===o&&c.shortcut===n).forEach(c=>{c&&c.method&&c.method()})})}function removeKeyEvent(n){const o=Object.values(_handlers).flat();if(o.findIndex(t=>{let{element:c}=t;return c===n})<0){const{keydownListener:t,keyupListenr:c,capture:p}=elementEventMap.get(n)||{};t&&c&&(removeEvent(n,"keyup",c,p),removeEvent(n,"keydown",t,p),elementEventMap.delete(n))}if((o.length<=0||elementEventMap.size<=0)&&(Object.keys(elementEventMap).forEach(c=>{const{keydownListener:p,keyupListenr:h,capture:y}=elementEventMap.get(c)||{};p&&h&&(removeEvent(c,"keyup",h,y),removeEvent(c,"keydown",p,y),elementEventMap.delete(c))}),elementEventMap.clear(),Object.keys(_handlers).forEach(c=>delete _handlers[c]),winListendFocus)){const{listener:c,capture:p}=winListendFocus;removeEvent(window,"focus",c,p),winListendFocus=null}}const _api={getPressedKeyString,setScope,getScope,deleteScope,getPressedKeyCodes,getAllKeyCodes,isPressed,filter,trigger,unbind,keyMap:_keyMap,modifier:_modifier,modifierMap};for(const n in _api)Object.prototype.hasOwnProperty.call(_api,n)&&(hotkeys[n]=_api[n]);if(typeof window<"u"){const n=window.hotkeys;hotkeys.noConflict=o=>(o&&window.hotkeys===hotkeys&&(window.hotkeys=n),hotkeys),window.hotkeys=hotkeys}const EDITABLE_TAGS=new Set(["INPUT","TEXTAREA","SELECT"]),MODIFIER_TOKENS=new Set(["ctrl","cmd","alt","shift","mod"]),SYSTEM_MODIFIERS=new Set(["ctrl","cmd","alt","mod"]),MODIFIER_ORDER=["ctrl","cmd","alt","shift","mod"],MODIFIER_DISPLAY={ctrl:"Ctrl",cmd:"⌘",alt:"Alt",shift:"Shift",mod:"Mod"},KEY_DISPLAY={enter:"Enter",space:"Space",tab:"Tab",escape:"Esc",backspace:"Backspace",delete:"Delete",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",left:"←",right:"→",up:"↑",down:"↓"},NAVIGATION_KEYS=new Set(["left","right","up","down","home","end","pageup","pagedown","backspace","delete"]);let filterConfigured=!1;function getEditableEventTarget(n){const o=n.composedPath?.();if(o?.length){for(const t of o){const c=t;if(c?.tagName&&(EDITABLE_TAGS.has(c.tagName)||c.isContentEditable||c.getAttribute("contenteditable")==="true"))return c}return null}const e=n.target||n.srcElement;return e?.tagName&&(EDITABLE_TAGS.has(e.tagName)||e.isContentEditable||e.getAttribute("contenteditable")==="true")?e:null}function isKeyboardEventFromEditableTarget(n){return n?!!getEditableEventTarget(n):!1}function ensureHotkeysFilterConfigured(){filterConfigured||(hotkeys.filter=n=>{if(!getEditableEventTarget(n)||n.key==="Escape"||n.ctrlKey||n.metaKey||n.altKey)return!0;if(n.shiftKey){const e=n.key??"";if(e.length>1&&!/^[a-z0-9]$/i.test(e))return!0}return!1},filterConfigured=!0)}function parseShortcutString(n){if(!n)return;const o=n.split("+").map(c=>c.trim().toLowerCase()).filter(Boolean);if(o.length===0)return;let e;for(let c=o.length-1;c>=0;c-=1){const p=o[c];if(!MODIFIER_TOKENS.has(p)){e=p;break}}const t=o.some(c=>SYSTEM_MODIFIERS.has(c));return{tokens:o,baseKey:e,hasSystemModifier:t}}function shouldBlockShortcutInInput(n,o){if(!getEditableEventTarget(o)||n.hasSystemModifier)return!1;const t=n.baseKey;return!!(!t||t.length===1&&/^[a-z0-9]$/i.test(t)||t==="space"||t==="tab"||t==="enter"||NAVIGATION_KEYS.has(t))}function toHotkeysSequenceFromTokens(n){return n.map(o=>o==="cmd"?"command":o).join("+")}function buildSequences(n){if(!n)return[];const{tokens:o}=n,t=isFromMac()?"cmd":"ctrl",c=o.map(h=>h==="cmd"||h==="ctrl"||h==="mod"?t:h),p=Array.from(new Set(c));return[toHotkeysSequenceFromTokens(p)]}function getModifierLabel(n,o){return n==="cmd"||n==="ctrl"||n==="mod"?o?MODIFIER_DISPLAY.cmd:MODIFIER_DISPLAY.ctrl:n==="alt"&&o?"⌥":MODIFIER_DISPLAY[n]}function getKeyLabel(n){return KEY_DISPLAY[n]?KEY_DISPLAY[n]:(n.length===1||n.startsWith("f")&&/^\d+$/.test(n.slice(1)),n.toUpperCase())}function formatShortcutForDisplay(n,o){const e=parseShortcutString(n);if(!e)return;const t=o?.isMac??!1,c=[];if(MODIFIER_ORDER.forEach(p=>{if(e.tokens.includes(p)){const h=getModifierLabel(p,t);h&&c.push(h)}}),e.baseKey&&c.push(getKeyLabel(e.baseKey)),c.length!==0)return c.join(" + ")}function useRegisterShortcut({shortcut:n,disabled:o=!1,onActivate:e}){const t=reactExports.useMemo(()=>parseShortcutString(n),[n]),c=reactExports.useMemo(()=>buildSequences(t),[t]);reactExports.useEffect(()=>{if(!t||c.length===0||o)return;const p=(h,y)=>{o||shouldBlockShortcutInInput(t,h)||(h.preventDefault(),e())};return c.forEach(h=>{hotkeys(h,p)}),()=>{c.forEach(h=>{hotkeys.unbind(h,p)})}},[t,c,o,e])}var BaseButtonKind=function(n){return n.PRIMARY="primary",n.SECONDARY="secondary",n.TERTIARY="tertiary",n.GHOST="ghost",n.BORDERLESS_ICON="borderlessIcon",n.BORDERLESS_ICON_ACTIVE="borderlessIconActive",n.MINIMAL="minimal",n.PRIMARY_FORM_SUBMIT="primaryFormSubmit",n.SECONDARY_FORM_SUBMIT="secondaryFormSubmit",n.TERTIARY_FORM_SUBMIT="tertiaryFormSubmit",n.HEADER_BUTTON="header",n.HEADER_NO_PADDING="headerNoPadding",n.ELEMENT_TOOLBAR="elementToolbar",n.PILLS="pills",n.PILLS_ACTIVE="pillsActive",n.SEGMENTED_CONTROL="segmented_control",n.SEGMENTED_CONTROL_ACTIVE="segmented_controlActive",n}({}),BaseButtonSize=function(n){return n.XSMALL="xsmall",n.SMALL="small",n.MEDIUM="medium",n.LARGE="large",n}({});function getSizeStyle(n,o){switch(n){case"xsmall":return{padding:`${o.spacing.twoXS} ${o.spacing.sm}`,fontSize:o.fontSizes.sm};case"small":return{padding:`${o.spacing.twoXS} ${o.spacing.md}`};case"large":return{padding:`${o.spacing.md} ${o.spacing.md}`};default:return{padding:`${o.spacing.xs} ${o.spacing.md}`}}}const StyledBaseButton=styled("button",{target:"e1q4kxr40"})(({containerWidth:n,size:o,theme:e})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:e.fontWeights.normal,padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radii.button,minHeight:e.sizes.minElementHeight,margin:e.spacing.none,lineHeight:e.lineHeights.base,textTransform:"none",fontSize:"inherit",fontFamily:"inherit",color:"inherit",width:n?"100%":"auto",cursor:"pointer",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${transparentize(e.colors.primary,.5)}`},...getSizeStyle(o,e)})),StyledPrimaryButton=styled(StyledBaseButton,{target:"e1q4kxr41"})(({theme:n})=>({backgroundColor:n.colors.primary,color:n.colors.white,border:`${n.sizes.borderWidth} solid ${n.colors.primary}`,"&:hover, &:focus-visible":{backgroundColor:darken(n.colors.primary,.15),borderColor:darken(n.colors.primary,.15)},"&:active":{backgroundColor:n.colors.primary,borderColor:darken(n.colors.primary,.15)},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.transparent,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledSecondaryButton=styled(StyledBaseButton,{target:"e1q4kxr42"})(({theme:n})=>({backgroundColor:n.colors.lightenedBg05,border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,"&:hover, &:focus-visible":{backgroundColor:n.colors.darkenedBgMix15},"&:active":{backgroundColor:n.colors.darkenedBgMix25},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.transparent,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledTertiaryButton=styled(StyledBaseButton,{target:"e1q4kxr43"})(({theme:n})=>({padding:n.spacing.none,backgroundColor:n.colors.transparent,border:"none","&:hover, &:focus-visible":{color:n.colors.primary},"&:hover:not(:disabled), &:focus-visible:not(:disabled)":{"span.stMarkdownColoredText":{color:"inherit !important"}},"&:active":{color:darken(n.colors.primary,.25)},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:n.colors.transparent,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledGhostButton=styled(StyledBaseButton,{target:"e1q4kxr44"})(({theme:n})=>({backgroundColor:n.colors.transparent,border:`${n.sizes.borderWidth} solid ${n.colors.transparent}`,"&:hover, &:focus-visible":{borderColor:n.colors.transparent,color:n.colors.primary},"&:active":{color:n.colors.primary,borderColor:n.colors.transparent,backgroundColor:n.colors.transparent},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:n.colors.gray30,borderColor:n.colors.transparent,color:n.colors.gray60}})),StyledMinimalButton=styled(StyledBaseButton,{target:"e1q4kxr45"})(({theme:n})=>({backgroundColor:n.colors.transparent,border:"none",boxShadow:"none",padding:n.spacing.none,"&:hover, &:active, &:focus-visible":{color:n.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledPrimaryFormSubmitButton=styled(StyledPrimaryButton,{target:"e1q4kxr46"})(),StyledSecondaryFormSubmitButton=styled(StyledSecondaryButton,{target:"e1q4kxr47"})(),StyledTertiaryFormSubmitButton=styled(StyledTertiaryButton,{target:"e1q4kxr48"})(),StyledButtonGroupBaseButton=styled(StyledBaseButton,{target:"e1q4kxr49"})(({theme:n})=>({background:n.colors.bgColor,border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,fontSize:n.fontSizes.sm,lineHeight:n.lineHeights.base,fontWeight:n.fontWeights.normal,height:n.sizes.largeLogoHeight,minHeight:n.sizes.largeLogoHeight,maxWidth:n.sizes.contentMaxWidth,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&:hover, &:focus-visible":{backgroundColor:n.colors.darkenedBgMix15},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.transparent,color:n.colors.fadedText40,cursor:"not-allowed"},"& div":{textOverflow:"ellipsis",overflow:"hidden"},"& p":{textOverflow:"ellipsis",overflow:"hidden"}})),StyledPillsButton=styled(StyledButtonGroupBaseButton,{target:"e1q4kxr410"})(({theme:n,containerWidth:o})=>({borderRadius:n.radii.full,padding:`${n.spacing.twoXS} ${n.spacing.md}`,flex:o?"1 1 fit-content":""})),StyledPillsButtonActive=styled(StyledPillsButton,{target:"e1q4kxr411"})(({theme:n})=>({backgroundColor:transparentize(n.colors.primary,.9),borderColor:n.colors.primary,color:n.colors.primary,"&:hover, &:focus-visible":{backgroundColor:transparentize(n.colors.primary,.8),borderColor:n.colors.primary,color:n.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.fadedText05,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledSegmentedControlButton=styled(StyledButtonGroupBaseButton,{target:"e1q4kxr412"})(({theme:n,containerWidth:o})=>({padding:`${n.spacing.twoXS} ${n.spacing.lg}`,borderRadius:"0",flex:o?"1 1 fit-content":"",maxWidth:"100%",marginRight:`-${n.sizes.borderWidth}`,"&:first-child":{borderTopLeftRadius:n.radii.button,borderBottomLeftRadius:n.radii.button},"&:last-child":{borderTopRightRadius:n.radii.button,borderBottomRightRadius:n.radii.button,marginRight:n.spacing.none},"&:focus-visible":{zIndex:n.zIndices.priority}})),StyledSegmentedControlButtonActive=styled(StyledSegmentedControlButton,{target:"e1q4kxr413"})(({theme:n})=>({backgroundColor:transparentize(n.colors.primary,.9),borderColor:n.colors.primary,color:n.colors.primary,zIndex:n.zIndices.priority,"&:hover, &:focus-visible":{backgroundColor:transparentize(n.colors.primary,.8)},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.fadedText05,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledHeaderButton=styled(StyledBaseButton,{target:"e1q4kxr414"})(({theme:n})=>({backgroundColor:n.colors.transparent,border:"none",padding:`0 ${n.spacing.sm}`,fontSize:n.fontSizes.sm,marginLeft:n.spacing.threeXS,marginRight:n.spacing.threeXS,lineHeight:n.lineHeights.none,minWidth:n.sizes.headerItemHeight,minHeight:n.sizes.headerItemHeight,"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${transparentize(n.colors.gray90,.8)}`},"&:hover":{backgroundColor:n.colors.darkenedBgMix15},"&:active":{backgroundColor:n.colors.darkenedBgMix25},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:n.colors.gray30,borderColor:n.colors.transparent,color:n.colors.gray60}})),StyledHeaderNoPaddingButton=styled(StyledHeaderButton,{target:"e1q4kxr415"})(()=>({padding:0})),StyledBorderlessIconButton=styled(StyledBaseButton,{target:"e1q4kxr416"})(({size:n,theme:o})=>{const e={xsmall:o.spacing.threeXS,small:o.spacing.twoXS,medium:o.spacing.md,large:o.spacing.lg};return{backgroundColor:o.colors.transparent,color:o.colors.fadedText60,padding:e[n],marginLeft:o.spacing.none,marginRight:o.spacing.none,flex:"0 0 fit-content",border:"none",display:"flex",minHeight:"unset","&:focus":{boxShadow:"none",outline:"none"},"&:hover":{color:o.colors.bodyText},"&:disabled, &:disabled:hover, &:disabled:active":{color:o.colors.fadedText10,cursor:"not-allowed",img:{opacity:.4}}}}),StyledBorderlessIconButtonActive=styled(StyledBorderlessIconButton,{target:"e1q4kxr417"})(({theme:n})=>({color:n.colors.bodyText,"&:disabled, &:disabled:hover, &:disabled:active":{color:n.colors.fadedText40}})),StyledTooltipNormal=styled("div",{target:"e1q4kxr418"})(({theme:n})=>({display:"block",[`@media (max-width: ${n.breakpoints.sm})`]:{display:"none"}})),StyledTooltipMobile=styled("div",{target:"e1q4kxr419"})(({theme:n})=>({display:"none",[`@media (max-width: ${n.breakpoints.sm})`]:{display:"block"}})),StyledElementToolbarButton=styled(StyledBaseButton,{target:"e1q4kxr420"})(({theme:n})=>({backgroundColor:n.colors.transparent,border:"none",padding:n.spacing.twoXS,fontSize:n.fontSizes.twoSm,marginLeft:n.spacing.none,marginRight:n.spacing.none,display:"flex",gap:n.spacing.xs,alignItems:"center",minHeight:"unset",lineHeight:n.iconSizes.md,width:"auto","&:focus":{outline:"none",border:"none",boxShadow:"none"},"&:focus-visible":{outline:"none",border:"none",boxShadow:"none",backgroundColor:n.colors.darkenedBgMix25},"&:hover":{backgroundColor:n.colors.darkenedBgMix15},"&:active":{backgroundColor:n.colors.darkenedBgMix25},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:n.colors.gray30,borderColor:n.colors.transparent,color:n.colors.gray60}})),StyledButtonGroup=styled("div",{target:"e1q4kxr421"})(({containerWidth:n})=>({width:n?"100%":"auto"})),StyledButtonLabel=styled("div",{target:"e1q4kxr422"})(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),StyledButtonMainLabel=styled("span",{target:"e1q4kxr423"})(({theme:n})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",gap:n.spacing.sm,minWidth:0})),StyledButtonShortcut=styled("kbd",{target:"e1q4kxr424"})(({theme:n})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:n.fontSizes.sm,opacity:.6,fontFamily:"inherit",lineHeight:n.lineHeights.tight,letterSpacing:"0.01em"})),DynamicButtonLabel=({icon:n,label:o,iconSize:e,useSmallerFont:t=!1,shortcut:c})=>{const p=reactExports.useMemo(()=>formatShortcutForDisplay(c,{isMac:isFromMac()}),[c]);return jsx$1(StyledButtonLabel,{children:jsxs(StyledButtonMainLabel,{"data-has-shortcut":!!p,children:[n&&jsx$1(DynamicIcon,{size:e??"lg",iconValue:n}),o&&jsx$1(StreamlitMarkdown$1,{source:o,allowHTML:!1,isLabel:!0,largerLabel:!t,disableLinks:!0}),p&&jsx$1(StyledButtonShortcut,{"aria-label":`Shortcut ${p}`,children:p})]})})};function BaseButton(n){const{kind:o,size:e,disabled:t,onClick:c,containerWidth:p,children:h,autoFocus:y}=n;let g=StyledPrimaryButton;return o===BaseButtonKind.SECONDARY?g=StyledSecondaryButton:o===BaseButtonKind.TERTIARY?g=StyledTertiaryButton:o===BaseButtonKind.GHOST?g=StyledGhostButton:o===BaseButtonKind.PILLS?g=StyledPillsButton:o===BaseButtonKind.PILLS_ACTIVE?g=StyledPillsButtonActive:o===BaseButtonKind.SEGMENTED_CONTROL?g=StyledSegmentedControlButton:o===BaseButtonKind.SEGMENTED_CONTROL_ACTIVE?g=StyledSegmentedControlButtonActive:o===BaseButtonKind.BORDERLESS_ICON?g=StyledBorderlessIconButton:o===BaseButtonKind.BORDERLESS_ICON_ACTIVE?g=StyledBorderlessIconButtonActive:o===BaseButtonKind.MINIMAL?g=StyledMinimalButton:o===BaseButtonKind.PRIMARY_FORM_SUBMIT?g=StyledPrimaryFormSubmitButton:o===BaseButtonKind.SECONDARY_FORM_SUBMIT?g=StyledSecondaryFormSubmitButton:o===BaseButtonKind.TERTIARY_FORM_SUBMIT?g=StyledTertiaryFormSubmitButton:o===BaseButtonKind.HEADER_BUTTON?g=StyledHeaderButton:o===BaseButtonKind.HEADER_NO_PADDING?g=StyledHeaderNoPaddingButton:o===BaseButtonKind.ELEMENT_TOOLBAR&&(g=StyledElementToolbarButton),jsx$1(g,{kind:o,size:e??BaseButtonSize.MEDIUM,containerWidth:p||!1,disabled:t||!1,onClick:c||(()=>{}),autoFocus:y||!1,"data-testid":n["data-testid"]??`stBaseButton-${o}`,"aria-label":n["aria-label"]??"",children:h})}function BaseButtonTooltip({children:n,help:o,placement:e,containerWidth:t}){return o?jsxs(Fragment,{children:[jsx$1(StyledTooltipNormal,{children:jsx$1(TooltipIcon,{content:o,placement:e||Placement.TOP,containerWidth:t,children:n})}),jsx$1(StyledTooltipMobile,{children:n})]}):n}const StyledModalButton=styled("span",{target:"egf28ua0"})(({theme:n})=>({marginRight:n.spacing.twoXS}));function ModalHeader({children:n,overrides:o}){const{genericFonts:e,fontSizes:t,spacing:c,fontWeights:p,lineHeights:h}=useEmotionTheme();return jsx$1(ModalHeader$1,{style:{marginTop:c.none,marginLeft:c.none,marginRight:c.none,marginBottom:c.none,paddingTop:c.twoXL,paddingRight:c.twoXL,paddingBottom:c.md,paddingLeft:c.twoXL,fontFamily:e.bodyFont,fontSize:t.xl,fontWeight:p.bold,margin:c.none,lineHeight:h.small,textTransform:"none",display:"flex",alignItems:"center",maxHeight:"80vh",flexDirection:"row",...o},children:n})}function ModalBody$1({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.twoXL,paddingBottom:t.twoXL,paddingLeft:t.twoXL,color:o.bodyText,fontSize:e.md},children:n})}function ModalFooter({children:n}){const{spacing:o}=useEmotionTheme();return jsx$1(ModalFooter$1,{style:{marginTop:o.none,marginLeft:o.none,marginRight:o.none,marginBottom:o.none,paddingTop:o.md,paddingRight:o.md,paddingBottom:o.md,paddingLeft:o.md},children:jsx$1("div",{children:n})})}const ModalButton=n=>jsx$1(StyledModalButton,{children:jsx$1(BaseButton,{...n})});function calculateModalSize(n,o,e){return n==="large"?"80rem":n==="medium"&&o&&e?`calc(${o} + ${e})`:n==="auto"?SIZE$2.auto:SIZE$2.default}function Modal(n){const{spacing:o,radii:e,colors:t,sizes:c}=useEmotionTheme(),p={Root:{style:{background:t.darkenedBgMix25},props:{className:"stDialog","data-testid":"stDialog"}},DialogContainer:{style:{alignItems:"start",paddingTop:o.threeXL}},Dialog:{style:{borderBottomRightRadius:e.xxl,borderBottomLeftRadius:e.xxl,borderTopRightRadius:e.xxl,borderTopLeftRadius:e.xxl,minWidth:c.minPopupWidth}},Close:{style:{top:`calc(${o.twoXL} + .375rem)`,right:o.twoXL}}},h=calculateModalSize(n.size,c.contentMaxWidth,o.lg),y=merge$1(p,n.overrides),g={...n,size:h};return jsx$1(Modal$1,{...g,overrides:y})}const StyledDialogTitle=styled("div",{target:"e10pldce0"})(({theme:n})=>({marginRight:n.spacing.threeXL}));function mapDialogWidthToModalSize(n){switch(n){case Block$1.Dialog.DialogWidth.MEDIUM:return"medium";case Block$1.Dialog.DialogWidth.LARGE:return"large";case Block$1.Dialog.DialogWidth.SMALL:return"default";default:return assertNever(n),"default"}}const Dialog=({element:n,deltaMsgReceivedAt:o,children:e,widgetMgr:t,fragmentId:c})=>{const{title:p,dismissible:h,width:y,isOpen:g,id:$}=n,[E,A]=reactExports.useState(!1);reactExports.useEffect(()=>{notNullOrUndefined(g)&&A(g)},[g,o]);const N=reactExports.useCallback(()=>{A(!1),$&&t&&t.setTriggerValue({id:$,formId:""},{fromUi:!0},c)},[$,t,c]),H=reactExports.useCallback(Z=>{if(E&&Z.key.toLowerCase()==="r"&&!n.dismissible){const X=Z.target;if(X&&(X.isContentEditable||X.tagName==="INPUT"||X.tagName==="TEXTAREA"||X.tagName==="SELECT"))return;Z.preventDefault(),Z.stopPropagation()}},[E,n.dismissible]);return reactExports.useEffect(()=>{if(E&&!n.dismissible)return document.addEventListener("keydown",H,!0),()=>{document.removeEventListener("keydown",H,!0)}},[E,n.dismissible,H]),E?jsxs(Modal,{isOpen:!0,closeable:h,onClose:N,size:mapDialogWidthToModalSize(y),children:[jsx$1(ModalHeader,{children:jsx$1(StyledDialogTitle,{children:jsx$1(StreamlitMarkdown$1,{source:p,allowHTML:!1,isLabel:!0,inheritFont:!0})})}),jsx$1(ModalBody$1,{children:e})]}):jsx$1(Fragment,{})};function DialogWithProvider(n){return jsx$1(IsDialogContext.Provider,{value:!0,children:jsx$1(Dialog,{...n})})}const Dialog$1=reactExports.memo(DialogWithProvider),StyledExpandableContainer=styled("div",{target:"ef5ck4x0"})({width:"100%"}),BORDER_SIZE=1,StyledDetails=styled("details",{target:"ef5ck4x1"})(({isStale:n,theme:o})=>({marginBottom:0,marginTop:0,width:"100%",borderStyle:"solid",borderWidth:o.sizes.borderWidth,borderColor:o.colors.borderColor,borderRadius:o.radii.default,...n?{borderColor:o.colors.borderColorLight,transition:`border ${STALE_TRANSITION_PARAMS}`}:{}})),StyledSummaryHeading=styled("span",{target:"ef5ck4x2"})(({theme:n})=>({display:"flex",alignItems:"center",flexGrow:1,minWidth:0,width:"100%",maxWidth:"100%",overflow:"hidden",gap:n.spacing.sm})),StyledSummaryLabelWrapper=styled("div",{target:"ef5ck4x3"})({display:"flex",width:"100%",flexGrow:1,overflow:"hidden"}),StyledSummary=styled("summary",{target:"ef5ck4x4"})(({theme:n,isStale:o,expanded:e})=>({position:"relative",display:"flex",width:"100%",minWidth:0,overflow:"hidden","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${transparentize(n.colors.primary,.5)}`},fontSize:"inherit",paddingLeft:n.spacing.md,paddingRight:n.spacing.md,paddingTop:n.spacing.twoXS,paddingBottom:n.spacing.twoXS,minHeight:`calc(${n.sizes.minElementHeight} - 2 * ${n.sizes.borderWidth})`,alignItems:"center",cursor:"pointer",listStyleType:"none","&::-webkit-details-marker":{display:"none"},backgroundColor:e?n.colors.bgMix:"transparent",borderRadius:e?`${n.radii.default} ${n.radii.default} 0 0`:n.radii.default,transition:e?"border-radius 200ms cubic-bezier(0.23, 1, 0.32, 1), background-color 150ms ease":"border-radius 200ms cubic-bezier(0.23, 1, 0.32, 1) 300ms, background-color 150ms ease","&:hover, &:focus-visible":{backgroundColor:n.colors.darkenedBgMix15},"&:active":{backgroundColor:n.colors.darkenedBgMix25},...o&&STALE_STYLES})),StyledDetailsPanel=styled("div",{target:"ef5ck4x5"})(({theme:n})=>({padding:n.spacing.lg,borderTop:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`})),ExpanderIcon=n=>{const{icon:o}=n;return o?jsx$1(DynamicIcon,{size:"lg",iconValue:o,testid:{":material/check:":"stExpanderIconCheck",":material/error:":"stExpanderIconError",spinner:"stExpanderIconSpinner"}[o]||"stExpanderIcon"}):jsx$1(Fragment,{})},Expander=({element:n,isStale:o,children:e})=>{const{label:t,expanded:c}=n,[p,h]=reactExports.useState(c||!1),[y,g]=reactExports.useState(!1),$=reactExports.useRef(null),E=reactExports.useRef(null),A=reactExports.useRef(null),N=reactExports.useRef(null),H=reactExports.useRef(null);reactExports.useEffect(()=>{notNullOrUndefined(c)&&(h(c),$.current&&($.current.open=c))},[t,c]);const Z=Ne=>{$.current&&($.current.open=Ne,A.current=null,$.current.style.height="",$.current.style.overflow="")},X=(Ne,Fe,Be)=>{const Ge=Be>Fe;A.current&&(A.current.cancel(),N.current&&(clearTimeout(N.current),N.current=null));const je=Ne.animate({height:[`${Fe}px`,`${Be}px`]},{duration:500,easing:"cubic-bezier(0.23, 1, 0.32, 1)"});je.addEventListener("finish",()=>Z(Ge)),A.current=je},be=Ne=>{Ne.preventDefault(),h(!p);const Fe=$.current;if(!Fe||!E.current)return;Fe.style.overflow="hidden";const Be=Fe.getBoundingClientRect().height,Ge=E.current.getBoundingClientRect().height;p?X(Fe,Be,Ge+2*BORDER_SIZE):(Fe.style.height=`${Be}px`,Fe.open=!0,window.requestAnimationFrame(()=>{X(Fe,Be,Ge+2*BORDER_SIZE+5),N.current=setTimeout(()=>{if(!H.current)return;const je=H.current.getBoundingClientRect().height;X(Fe,Be,Ge+je+2*BORDER_SIZE)},100)}))},we=()=>{g(!0)},$e=()=>{g(!1)},Ce=!n.icon||y,Ie=n.icon&&!y;return jsx$1(StyledExpandableContainer,{className:"stExpander","data-testid":"stExpander",children:jsxs(StyledDetails,{isStale:o,ref:$,onMouseEnter:we,onMouseLeave:$e,children:[jsx$1(StyledSummary,{onClick:be,ref:E,isStale:o,expanded:p,children:jsxs(StyledSummaryHeading,{children:[Ce&&jsx$1(DynamicIcon,{iconValue:p?":material/keyboard_arrow_down:":":material/keyboard_arrow_right:",size:"lg"}),Ie&&jsx$1(ExpanderIcon,{icon:n.icon}),jsx$1(StyledSummaryLabelWrapper,{children:jsx$1(StreamlitMarkdown$1,{source:t,allowHTML:!1,isLabel:!0,largerLabel:!0})})]})}),jsx$1(StyledDetailsPanel,{"data-testid":"stExpanderDetails",ref:H,children:e})]})})},Expander$1=reactExports.memo(Expander),Box=styled("div",{target:"e7ygq4y0"})(({width:n="100%",height:o})=>({width:n,height:o})),getBorderColor=(n,o)=>{let e=n.widgetBorderColor??n.secondaryBg;return o&&(e=n.primary),e},useResizeObserver=(n,o=[])=>{const e=reactExports.useRef(null),[t,c]=reactExports.useState([]),p=reactExports.useCallback(()=>{if(!e.current)return[];const h=e.current.getBoundingClientRect();return n.map(y=>h[y])},[n]);return reactExports.useEffect(()=>{if(!e.current)return;c(p());let h;const y=new ResizeObserver(()=>{h=window.requestAnimationFrame(()=>{c(p())})});return y.observe(e.current),()=>{y.disconnect(),h&&cancelAnimationFrame(h)}},[n,p,...o]),{values:t,elementRef:e}},useCalculatedDimensions=(n=[],o=-1)=>{const{values:[e,t],elementRef:c}=useResizeObserver(reactExports.useMemo(()=>["width","height"],[]),n);return{width:e||o,height:t||o,elementRef:c}},StyledPopoverLabelContainer=styled("div",{target:"emnxg9p0"})(({theme:n})=>({display:"flex",alignItems:"center",gap:n.spacing.threeXS,marginRight:`calc(-${n.iconSizes.lg} * 0.25)`})),StyledPopoverExpansionIcon=styled("div",{target:"emnxg9p1"})(({theme:n})=>({display:"inline-flex",marginTop:n.spacing.threeXS})),Popover=({element:n,empty:o,children:e,stretchWidth:t})=>{const[c,p]=reactExports.useState(!1),h=reactExports.useContext(IsSidebarContext),y=useEmotionTheme(),g=hasLightBackgroundColor(y),{width:$,elementRef:E}=useCalculatedDimensions();let A=BaseButtonKind.SECONDARY;return n.type==="primary"?A=BaseButtonKind.PRIMARY:n.type==="tertiary"&&(A=BaseButtonKind.TERTIARY),jsx$1(Box,{"data-testid":"stPopover",className:"stPopover",ref:E,children:jsx$1(Popover$2,{triggerType:TRIGGER_TYPE.click,placement:PLACEMENT.bottomLeft,content:()=>e,isOpen:c,onClickOutside:()=>p(!1),onClick:()=>c?p(!1):void 0,onEsc:()=>p(!1),ignoreBoundary:h,renderAll:!0,overrides:{Body:{props:{"data-testid":"stPopoverBody"},style:()=>({marginRight:y.spacing.lg,marginBottom:y.spacing.lg,maxHeight:"70vh",overflow:"auto",maxWidth:`calc(${y.sizes.contentMaxWidth} - 2*${y.spacing.lg})`,minWidth:t?`${Math.max($,160)}px`:y.sizes.minPopupWidth,[`@media (max-width: ${y.breakpoints.sm})`]:{maxWidth:`calc(100% - ${y.spacing.threeXL})`},borderTopLeftRadius:y.radii.xl,borderTopRightRadius:y.radii.xl,borderBottomRightRadius:y.radii.xl,borderBottomLeftRadius:y.radii.xl,borderLeftWidth:y.sizes.borderWidth,borderRightWidth:y.sizes.borderWidth,borderTopWidth:y.sizes.borderWidth,borderBottomWidth:y.sizes.borderWidth,paddingRight:`calc(${y.spacing.twoXL} - ${y.sizes.borderWidth})`,paddingLeft:`calc(${y.spacing.twoXL} - ${y.sizes.borderWidth})`,paddingBottom:`calc(${y.spacing.twoXL} - ${y.sizes.borderWidth})`,paddingTop:`calc(${y.spacing.twoXL} - ${y.sizes.borderWidth})`,borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftColor:y.colors.borderColor,borderRightColor:y.colors.borderColor,borderTopColor:y.colors.borderColor,borderBottomColor:y.colors.borderColor,boxShadow:g?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"})}},children:jsx$1("div",{children:jsx$1(BaseButtonTooltip,{help:n.help,containerWidth:!0,children:jsx$1(BaseButton,{"data-testid":"stPopoverButton",kind:A,size:BaseButtonSize.SMALL,disabled:o||n.disabled,containerWidth:!0,onClick:()=>p(!c),children:jsxs(StyledPopoverLabelContainer,{children:[jsx$1(DynamicButtonLabel,{icon:n.icon,label:n.label}),jsx$1(StyledPopoverExpansionIcon,{children:jsx$1(DynamicIcon,{iconValue:c?":material/expand_less:":":material/expand_more:",size:"lg"})})]})})})})})})},Popover$1=reactExports.memo(Popover);var ORIENTATION={vertical:"vertical",horizontal:"horizontal"},FILL={fixed:"fixed",intrinsic:"intrinsic"},getTabId=function n(o,e){return"tabs-".concat(o,"-tab-").concat(e)},getTabPanelId=function n(o,e){return"tabs-".concat(o,"-tabpanel-").concat(e)},isHorizontal=function n(o){return o===ORIENTATION.horizontal},isVertical=function n(o){return o===ORIENTATION.vertical},isRTL=function n(o){return o==="rtl"},isIntrinsic=function n(o){return o===FILL.intrinsic},isFixed=function n(o){return o===FILL.fixed};function ownKeys$e(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$c(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$e(Object(e),!0).forEach(function(t){_defineProperty$f(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$e(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$f(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var StyledRoot$1=styled$1("div",function(n){n.$theme;var o=n.$orientation,e=o===void 0?ORIENTATION.horizontal:o,t={transform:"scale(1)"};return isVertical(e)&&(t.display="flex"),t});StyledRoot$1.displayName="StyledRoot";StyledRoot$1.displayName="StyledRoot";var StyledTabBar=styled$1("div",function(n){var o=n.$hasEndEnhancer,e=n.$orientation;return o||!isHorizontal(e)?{display:"flex"}:{}});StyledTabBar.displayName="StyledTabBar";StyledTabBar.displayName="StyledTabBar";var StyledTabList=styled$1("div",function(n){var o=n.$theme,e=n.$fill,t=e===void 0?FILL.intrinsic:e,c=n.$orientation,p=c===void 0?ORIENTATION.horizontal:c,h={position:"relative",display:"flex",flexWrap:"nowrap",flexGrow:1};return isHorizontal(p)?(h.flexDirection="row",h.paddingBottom="5px",h.marginBottom="-5px"):(h.flexDirection="column",isRTL(o.direction)?(h.paddingLeft="5px",h.marginLeft="-5px"):(h.paddingRight="5px",h.marginRight="-5px")),isIntrinsic(t)&&(h["::-webkit-scrollbar"]={display:"none"},h["-ms-overflow-style"]="none",h.scrollbarWidth="none",isHorizontal(p)?h.overflowX="scroll":h.overflowY="scroll"),h});StyledTabList.displayName="StyledTabList";StyledTabList.displayName="StyledTabList";var StyledTab=styled$1("button",function(n){var o=n.$theme,e=n.$orientation,t=e===void 0?ORIENTATION.horizontal:e,c=n.$fill,p=c===void 0?FILL.intrinsic:c,h=n.$focusVisible,y=h===void 0?!1:h;n.$isActive;var g=_objectSpread$c({cursor:"pointer",WebkitAppearance:"none",marginLeft:"0",marginRight:"0",marginTop:"0",marginBottom:"0",boxSizing:"border-box",display:"inline-flex",alignItems:"center",paddingLeft:o.sizing.scale600,paddingTop:o.sizing.scale600,paddingRight:o.sizing.scale600,paddingBottom:o.sizing.scale600,borderLeftWidth:0,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",color:o.colors.contentPrimary,background:o.colors.backgroundPrimary,transitionProperty:"background",transitionDuration:o.animation.timing200,transitionTimingFunction:o.animation.linearCurve,outline:"none",outlineOffset:"-3px",":disabled":{cursor:"not-allowed",color:o.colors.contentStateDisabled},":hover":{background:o.colors.backgroundSecondary},":disabled:hover":{background:"none"}},o.typography.LabelSmall);return y&&(g.outline="3px solid ".concat(o.colors.accent)),isFixed(p)&&(g.flexGrow=1,g.flexBasis=0),isHorizontal(t)?g.justifyContent="center":g.justifyContent="flex-end",g});StyledTab.displayName="StyledTab";StyledTab.displayName="StyledTab";var StyledEndEnhancerContainer=styled$1("div",function(n){var o=n.$theme,e=o.direction==="rtl"?"marginRight":"marginLeft";return _defineProperty$f({display:"flex",alignItems:"center",justifyContent:"flex-end"},e,o.sizing.scale600)});StyledEndEnhancerContainer.displayName="StyledEndEnhancerContainer";StyledEndEnhancerContainer.displayName="StyledEndEnhancerContainer";var StyledArtworkContainer=styled$1("div",function(n){var o=n.$theme;n.$orientation;var e={display:"flex"};return isRTL(o.direction)?e.marginLeft=o.sizing.scale300:e.marginRight=o.sizing.scale300,e});StyledArtworkContainer.displayName="StyledArtworkContainer";StyledArtworkContainer.displayName="StyledArtworkContainer";var StyledTabBorder=styled$1("div",function(n){var o=n.$theme,e=n.$orientation,t=e===void 0?ORIENTATION.horizontal:e,c={backgroundColor:o.colors.borderOpaque,position:"relative"};return isHorizontal(t)?c.height="5px":c.width="5px",c});StyledTabBorder.displayName="StyledTabBorder";StyledTabBorder.displayName="StyledTabBorder";var StyledTabHighlight=styled$1("div",function(n){var o=n.$theme,e=n.$orientation,t=e===void 0?ORIENTATION.horizontal:e,c=n.$length,p=c===void 0?0:c,h=n.$distance,y=h===void 0?0:h,g=n.$animate,$=g===void 0?!1:g,E={backgroundColor:o.colors.borderSelected,position:"absolute",zIndex:1};return isHorizontal(t)?(E.bottom="0px",E.left="0px",E.height="5px",E.width="".concat(p,"px"),E.transform="translateX(".concat(y,"px)")):(E.transform="translateY(".concat(y,"px)"),E.width="5px",E.height="".concat(p,"px"),isRTL(o.direction)?E.left="0px":E.right="0px"),$&&(E.transitionProperty="all",E.transitionDuration=o.animation.timing400,E.transitionTimingFunction=o.animation.easeInOutQuinticCurve),E});StyledTabHighlight.displayName="StyledTabHighlight";StyledTabHighlight.displayName="StyledTabHighlight";var StyledTabPanel=styled$1("div",function(n){var o=n.$theme,e=n.$pad,t=e===void 0?!0:e,c={flexGrow:1,outline:"none"};return t&&(c.paddingTop=o.sizing.scale600,c.paddingRight=o.sizing.scale600,c.paddingBottom=o.sizing.scale600,c.paddingLeft=o.sizing.scale600),c});StyledTabPanel.displayName="StyledTabPanel";StyledTabPanel.displayName="StyledTabPanel";var _excluded$j=["childKey","childIndex","activeKey","orientation","activeTabRef","updateHighlight","parseKeyDown","activateOnFocus","uid","disabled","sharedStylingProps","onChange"],_excluded2$4=["artwork","overrides","tabRef","onClick","title"],_excluded3$1=["childKey","childIndex","activeKey","uid","sharedStylingProps","renderAll"];function ownKeys$d(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$b(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys$d(Object(e),!0).forEach(function(t){_defineProperty$e(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$d(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$e(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}function _toConsumableArray$1(n){return _arrayWithoutHoles$1(n)||_iterableToArray$1(n)||_unsupportedIterableToArray$e(n)||_nonIterableSpread$1()}function _nonIterableSpread$1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
103
103
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArray$1(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function _arrayWithoutHoles$1(n){if(Array.isArray(n))return _arrayLikeToArray$e(n)}function _objectWithoutProperties$h(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose$g(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$g(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 _extends$j(){return _extends$j=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$j.apply(this,arguments)}function _slicedToArray$e(n,o){return _arrayWithHoles$e(n)||_iterableToArrayLimit$e(n,o)||_unsupportedIterableToArray$e(n,o)||_nonIterableRest$e()}function _nonIterableRest$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
104
104
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$e(n,o){if(n){if(typeof n=="string")return _arrayLikeToArray$e(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$e(n,o)}}function _arrayLikeToArray$e(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$e(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$e(n){if(Array.isArray(n))return n}var KEYBOARD_ACTION={next:"next",previous:"previous"},getLayoutParams=function n(o,e){return o?isVertical(e)?{length:o.clientHeight,distance:o.offsetTop}:{length:o.clientWidth,distance:o.offsetLeft}:{length:0,distance:0}},scrollParentToCentreTarget=function n(o){var e=o.parentNode.getBoundingClientRect(),t=e.x,c=e.y,p=e.width,h=e.height,y=o.getBoundingClientRect(),g=y.x,$=y.y,E=y.width,A=y.height,N={x:g-t+E/2,y:$-c+A/2},H=o.parentNode,Z=H.scrollLeft,X=H.scrollTop,be={x:Z+N.x-p/2,y:X+N.y-h/2};o.parentNode.scroll(be.x,be.y)};function RenderEnhancer(n){var o=n.Enhancer;return typeof o=="string"?o:reactIsExports$1.isValidElementType(o)?reactExports.createElement(o,null):o}function Tabs$2(n){var o=n.activeKey,e=o===void 0?"0":o,t=n.disabled,c=t===void 0?!1:t,p=n.children,h=n.fill,y=h===void 0?FILL.intrinsic:h,g=n.activateOnFocus,$=g===void 0?!0:g,E=n.onChange,A=n.orientation,N=A===void 0?ORIENTATION.horizontal:A,H=n.overrides,Z=H===void 0?{}:H,X=n.renderAll,be=X===void 0?!1:X,we=n.uid,$e=we===void 0?null:we,Ce=n.endEnhancer,Ie=useUID(),Ne=$e||Ie,Fe=Z.Root,Be=Z.TabList,Ge=Z.TabHighlight,je=Z.TabBorder,De=getOverrides(Fe,StyledRoot$1),Ue=_slicedToArray$e(De,2),Je=Ue[0],Xe=Ue[1],Ke=getOverrides(Be,StyledTabList),ze=_slicedToArray$e(Ke,2),nt=ze[0],ct=ze[1],at=getOverrides(Ge,StyledTabHighlight),dt=_slicedToArray$e(at,2),Me=dt[0],We=dt[1],tt=getOverrides(je,StyledTabBorder),Ve=_slicedToArray$e(tt,2),vt=Ve[0],xt=Ve[1],Qe=getOverrides(Z.EndEnhancerContainer,StyledEndEnhancerContainer),St=_slicedToArray$e(Qe,2),pt=St[0],wt=St[1],Ft=reactExports.useState(0),Ht=_slicedToArray$e(Ft,2),on=Ht[0],en=Ht[1];reactExports.useEffect(function(){en(on+1)},[e]);var Wt=reactExports.useRef(),an=reactExports.useState({length:0,distance:0}),qt=_slicedToArray$e(an,2),zt=qt[0],Jt=qt[1],jt=reactExports.useCallback(function(){Wt.current&&Jt(getLayoutParams(Wt.current,N))},[Wt.current,N]);reactExports.useEffect(jt,[Wt.current,N]),reactExports.useEffect(function(){Wt.current&&(isHorizontal(N)?Wt.current.parentNode.scrollWidth>Wt.current.parentNode.clientWidth:Wt.current.parentNode.scrollHeight>Wt.current.parentNode.clientHeight)&&(on>1?Wt.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}):scrollParentToCentreTarget(Wt.current))},[Wt.current]);var Yt={$orientation:N,$fill:y},yn=useStyletron(),vn=_slicedToArray$e(yn,2),nn=vn[1],pn=reactExports.useCallback(function(Ut){if(isHorizontal(N))if(isRTL(nn.direction))switch(Ut.keyCode){case 39:return KEYBOARD_ACTION.previous;case 37:return KEYBOARD_ACTION.next;default:return null}else switch(Ut.keyCode){case 37:return KEYBOARD_ACTION.previous;case 39:return KEYBOARD_ACTION.next;default:return null}else switch(Ut.keyCode){case 38:return KEYBOARD_ACTION.previous;case 40:return KEYBOARD_ACTION.next;default:return null}},[N,nn.direction]);return reactExports.createElement(Je,_extends$j({},Yt,Xe),reactExports.createElement(StyledTabBar,{$hasEndEnhancer:!!Ce,$orientation:N},reactExports.createElement(nt,_extends$j({"data-baseweb":"tab-list",role:"tablist","aria-orientation":N},Yt,ct),reactExports.Children.map(p,function(Ut,it){if(Ut)return reactExports.createElement(InternalTab,_extends$j({childKey:Ut.key,childIndex:it,activeKey:e,orientation:N,activeTabRef:Wt,updateHighlight:jt,parseKeyDown:pn,activateOnFocus:$,uid:Ne,disabled:c,sharedStylingProps:Yt,onChange:E},Ut.props))}),reactExports.createElement(Me,_extends$j({"data-baseweb":"tab-highlight",$length:zt.length,$distance:zt.distance,$animate:on>1,"aria-hidden":"true",role:"presentation"},Yt,We))),N===ORIENTATION.horizontal&&Ce!==null&&Ce!==void 0&&reactExports.createElement(pt,_extends$j({},wt,{$orientation:N}),reactExports.createElement(RenderEnhancer,{Enhancer:Ce}))),reactExports.createElement(vt,_extends$j({"data-baseweb":"tab-border","aria-hidden":"true",role:"presentation"},Yt,xt)),reactExports.Children.map(p,function(Ut,it){if(Ut)return reactExports.createElement(InternalTabPanel,_extends$j({childKey:Ut.key,childIndex:it,activeKey:e,uid:Ne,sharedStylingProps:Yt,renderAll:be},Ut.props))}))}function InternalTab(n){var o=n.childKey,e=n.childIndex,t=n.activeKey,c=n.orientation,p=n.activeTabRef,h=n.updateHighlight,y=n.parseKeyDown,g=n.activateOnFocus,$=n.uid,E=n.disabled,A=n.sharedStylingProps,N=n.onChange,H=_objectWithoutProperties$h(n,_excluded$j),Z=o||String(e),X=Z==t,be=H.artwork,we=H.overrides,$e=we===void 0?{}:we,Ce=H.tabRef,Ie=H.onClick,Ne=H.title,Fe=_objectWithoutProperties$h(H,_excluded2$4),Be=reactExports.useRef();reactExports.useImperativeHandle(Ce,function(){return X?p.current:Be.current});var Ge=reactExports.useRef({length:0,distance:0});reactExports.useEffect(function(){Ge.current=getLayoutParams(X?p.current:Be.current,c)}),reactExports.useEffect(function(){if(window.ResizeObserver){var Qe=new window.ResizeObserver(function(St){if(St[0]&&St[0].target){var pt=getLayoutParams(St[0].target,c);(pt.length!==Ge.current.length||pt.distance!==Ge.current.distance)&&h()}});return Qe.observe(X?p.current:Be.current),function(){Qe.disconnect()}}},[t,c]),reactExports.useEffect(h,[Ne]);var je=$e.Tab,De=$e.ArtworkContainer,Ue=getOverrides(je,StyledTab),Je=_slicedToArray$e(Ue,2),Xe=Je[0],Ke=Je[1],ze=getOverrides(De,StyledArtworkContainer),nt=_slicedToArray$e(ze,2),ct=nt[0],at=nt[1],dt=reactExports.useState(!1),Me=_slicedToArray$e(dt,2),We=Me[0],tt=Me[1],Ve=reactExports.useCallback(function(Qe){isFocusVisible(Qe)&&tt(!0)},[]),vt=reactExports.useCallback(function(Qe){We!==!1&&tt(!1)},[We]),xt=reactExports.useCallback(function(Qe){var St=_toConsumableArray$1(Qe.target.parentNode.childNodes).filter(function(Ht){return!Ht.disabled&&Ht.getAttribute("role")==="tab"});if(St.length!==1){var pt=St.indexOf(Qe.target),wt=y(Qe);if(wt){var Ft;wt===KEYBOARD_ACTION.previous?St[pt-1]?Ft=St[pt-1]:Ft=St[St.length-1]:wt===KEYBOARD_ACTION.next&&(St[pt+1]?Ft=St[pt+1]:Ft=St[0]),Ft&&(Ft.focus(),g&&Ft.click()),isVertical(c)&&Qe.preventDefault()}}});return reactExports.createElement(Xe,_extends$j({"data-baseweb":"tab",key:Z,id:getTabId($,Z),role:"tab",onKeyDown:xt,"aria-selected":X,"aria-controls":getTabPanelId($,Z),tabIndex:X?"0":"-1",ref:X?p:Be,disabled:!X&&E,type:"button",$focusVisible:We,$isActive:X},A,Fe,Ke,{onClick:function(St){typeof N=="function"&&N({activeKey:Z}),typeof Ie=="function"&&Ie(St)},onFocus:forkFocus(_objectSpread$b(_objectSpread$b({},Fe),Ke),Ve),onBlur:forkBlur(_objectSpread$b(_objectSpread$b({},Fe),Ke),vt)}),be?reactExports.createElement(ct,_extends$j({"data-baseweb":"artwork-container"},A,at),reactExports.createElement(be,{size:20,color:"contentPrimary"})):null,Ne||Z)}function InternalTabPanel(n){var o=n.childKey,e=n.childIndex,t=n.activeKey,c=n.uid,p=n.sharedStylingProps,h=n.renderAll,y=_objectWithoutProperties$h(n,_excluded3$1),g=o||String(e),$=g==t,E=y.overrides,A=E===void 0?{}:E,N=y.children,H=A.TabPanel,Z=getOverrides(H,StyledTabPanel),X=_slicedToArray$e(Z,2),be=X[0],we=X[1];return reactExports.createElement(be,_extends$j({"data-baseweb":"tab-panel",key:g,role:"tabpanel",id:getTabPanelId(c,g),"aria-labelledby":getTabId(c,g),hidden:!$},p,we),$||h?N:null)}function Tab(n){return null}function getClassnamePrefix(n){return n===Direction.HORIZONTAL?"stHorizontalBlock":"stVerticalBlock"}function shouldComponentBeEnabled(n,o){return n!=="empty"||o!==ScriptRunState.RUNNING}function isElementStale(n,o,e,t){return o===ScriptRunState.RERUN_REQUESTED?!0:o===ScriptRunState.RUNNING?t?.length?!!(n.fragmentId&&t.includes(n.fragmentId)&&n.scriptRunId!==e):n.scriptRunId!==e:!1}function isComponentStale(n,o,e,t,c){return!n||isElementStale(o,e,t,c)}function assignDividerColor(n,o){const e=getDividerColors(o),t=Object.keys(e),{blue:c,green:p,orange:h,red:y,violet:g,yellow:$}=e,E={blue:c,green:p,orange:h,red:y,violet:g,yellow:$},A=Object.keys(E);let N=0;for(const H of ElementsSetVisitor.collectElements(n)){const Z=H.heading?.divider;if(H.type==="heading"&&Z)if(Z==="auto"){const X=A[N];H.heading.divider=E[X],N+=1,N===A.length&&(N=0)}else t.includes(Z)&&(H.heading.divider=e[Z])}}function convertKeyToClassName(n){return n?"st-key-"+n.trim().replace(/[^a-zA-Z0-9_-]/g,"-"):""}function getKeyFromId(n){if(!n||!isValidElementId(n))return;const e=n.split("-").slice(2).join("-");return e==="None"?void 0:e}function backwardsCompatibleColumnGapSize(n){if(n.gapConfig?.gapSize)return n.gapConfig.gapSize;if(n.gap){if(n.gap==="small")return streamlit.GapSize.SMALL;if(n.gap==="medium")return streamlit.GapSize.MEDIUM;if(n.gap==="large")return streamlit.GapSize.LARGE}return streamlit.GapSize.SMALL}function checkFlexContainerBackwardsCompatibile(n){return!!(n.flexContainer||n.vertical||n.horizontal)}function getActivateScrollToBottomBackwardsCompatible(n){return!!((n.deltaBlock.heightConfig?.pixelHeight||n.deltaBlock.vertical?.height)&&n.children.some(e=>e instanceof BlockNode&&e.deltaBlock.type==="chatMessage"))}function getBorderBackwardsCompatible(n){return n.flexContainer?.border||n.vertical?.border||!1}const StyledTabContainer=styled("div",{target:"e1mp0uwq0"})(({theme:n,isOverflowing:o,tabHeight:e,width:t,flex:c})=>({...o?{position:"relative","::after":{content:'" "',position:"absolute",zIndex:n.zIndices.priority,top:0,right:0,pointerEvents:"none",backgroundImage:`linear-gradient(to right, ${transparentize(n.colors.bgColor,1)}, ${n.colors.bgColor})`,width:n.spacing.lg,height:e}}:{},...t&&{width:t},...c&&{flex:c}}));function Tabs(n){const{widgetsDisabled:o,node:e,isStale:t,width:c,flex:p}=n,{scriptRunState:h,scriptRunId:y,fragmentIdsThisRun:g}=reactExports.useContext(ScriptRunContext),$=e.deltaBlock?.tabContainer?.defaultTabIndex??0;let E=[];const[A,N]=reactExports.useState($),[H,Z]=reactExports.useState(()=>e.children[$]?.deltaBlock?.tab?.label??"0"),X=reactExports.useRef(null),be=useEmotionTheme(),[we,$e]=reactExports.useState(!1);reactExports.useEffect(()=>{E.indexOf(H)===-1&&(N($),Z(E[$]))},[E]),reactExports.useEffect(()=>{if(X.current){const{scrollWidth:Fe,clientWidth:Be}=X.current;$e(Fe>Be)}const Ne=E.indexOf(H);Ne!==-1?(N(Ne),Z(E[Ne])):(N($),Z(E[$]))},[e.children.length]);const Ce=be.sizes.tabHeight,Ie=be.spacing.threeXS;return jsx$1(StyledTabContainer,{className:"stTabs","data-testid":"stTabs",isOverflowing:we,tabHeight:Ce,width:c,flex:p,children:jsx$1(Tabs$2,{activateOnFocus:!0,activeKey:A,onChange:({activeKey:Ne})=>{N(Ne),Z(E[Ne])},renderAll:!0,overrides:{TabHighlight:{style:()=>({backgroundColor:be.colors.primary,height:Ie})},TabBorder:{style:()=>({backgroundColor:be.colors.borderColorLight,height:Ie})},TabList:{props:{ref:X},style:()=>({gap:be.spacing.lg,marginBottom:`-${Ie}`,paddingBottom:Ie,overflowY:"hidden",...t&&STALE_STYLES})},Root:{style:()=>({transform:"none"})}},children:e.children.map((Ne,Fe)=>{Fe===0&&(E=[]);const Be=isElementStale(Ne,h,y,g),Ge={...n,isStale:t||Be,widgetsDisabled:o,node:Ne};let je=Fe.toString();Ge.node.deltaBlock?.tab?.label&&(je=Ge.node.deltaBlock.tab.label),E[Fe]=je;const De=A.toString()===Fe.toString(),Ue=Fe===e.children.length-1;return jsx$1(Tab,{"data-testid":"stTab",title:jsx$1(StreamlitMarkdown$1,{source:je,allowHTML:!1,isLabel:!0}),disabled:!t&&Be,overrides:{TabPanel:{style:()=>({paddingLeft:be.spacing.none,paddingRight:be.spacing.none,paddingBottom:be.spacing.none,paddingTop:be.spacing.lg})},Tab:{style:()=>({height:Ce,whiteSpace:"nowrap",paddingLeft:be.spacing.none,paddingRight:be.spacing.none,paddingTop:be.spacing.none,paddingBottom:be.spacing.none,fontSize:be.fontSizes.sm,background:"transparent",color:be.colors.bodyText,":focus":{outline:"none",color:be.colors.primary,background:"none"},":hover":{color:be.colors.primary,background:"none"},...De?{color:be.colors.primary}:{},...we&&Ue?{paddingRight:`calc(${be.spacing.lg} * 0.6)`}:{},...!t&&Be&&STALE_STYLES})}},children:n.renderTabContent(Ge)},Fe)})})})}const Tabs$1=reactExports.memo(Tabs),FormsContext=reactExports.createContext(null);FormsContext.displayName="FormsContext";const useRequiredContext=n=>{const o=reactExports.useContext(n);if(o==null)throw new Error(`useRequiredContext: ${n.displayName??"context"} not found`);return o},StyledFormSubmitContent=styled("div",{target:"emjbblw0"})({display:"flex"}),StyledForm=styled("div",{target:"emjbblw1"})(({theme:n,border:o,overflow:e})=>({...o&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`},width:"100%",height:"100%",overflow:e})),StyledErrorContainer=styled("div",{target:"emjbblw2"})(({theme:n})=>({marginTop:n.spacing.lg})),StyledAlertContent=styled("div",{target:"e1c3b9fy0"})(({theme:n})=>({display:"flex",gap:n.spacing.sm,width:"100%",[`${StyledCodeBlock} code`]:{paddingRight:n.spacing.lg}})),StyledAlertIcon=styled("div",{target:"e1c3b9fy1"})(({theme:n})=>({position:"relative",top:n.spacing.threeXS}));function AlertElement({icon:n,body:o,kind:e}){const t=useEmotionTheme(),c={width:n?`calc(100% - (${t.iconSizes.lg} + ${t.spacing.sm}))`:"100%"};return jsx$1("div",{className:"stAlert","data-testid":"stAlert",children:jsx$1(AlertContainer,{kind:e,children:jsxs(StyledAlertContent,{children:[n&&jsx$1(StyledAlertIcon,{children:jsx$1(DynamicIcon,{iconValue:n,size:"lg",testid:"stAlertDynamicIcon"})}),jsx$1(StreamlitMarkdown$1,{source:o,allowHTML:!1,style:c})]})})})}const AlertElement$1=reactExports.memo(AlertElement);function getAlertElementKind(n){switch(n){case Alert.Format.ERROR:return Kind.ERROR;case Alert.Format.INFO:return Kind.INFO;case Alert.Format.SUCCESS:return Kind.SUCCESS;case Alert.Format.WARNING:return Kind.WARNING;default:throw new Error(`Unexpected alert type: ${n}`)}}const MISSING_SUBMIT_BUTTON_WARNING=`**Missing Submit Button**
105
105
 
@@ -110,9 +110,9 @@ To create a submit button, use the \`st.form_submit_button()\` function.
110
110
  For more information, refer to the [documentation for forms](https://docs.streamlit.io/develop/api-reference/execution-flow/st.form).`;function Form(n){const{formId:o,widgetMgr:e,children:t,clearOnSubmit:c,enterToSubmit:p,border:h,overflow:y}=n,{formsData:g}=useRequiredContext(FormsContext),$=g.submitButtons.get(o),E=$!==void 0&&$.length>0,{scriptRunState:A}=reactExports.useContext(ScriptRunContext),N=A===ScriptRunState.NOT_RUNNING;reactExports.useEffect(()=>{e.setFormSubmitBehaviors(o,c,p)},[e,o,c,p]);const[H,Z]=reactExports.useState(!1);E&&H?Z(!1):!E&&!H&&N&&Z(!0);let X;return H&&(X=jsx$1(StyledErrorContainer,{children:jsx$1(AlertElement$1,{body:MISSING_SUBMIT_BUTTON_WARNING,kind:Kind.ERROR})})),jsxs(StyledForm,{className:"stForm","data-testid":"stForm",border:h,overflow:y,children:[t,X]})}const Form$1=reactExports.memo(Form);function squareStepper(n,o){const e=Math.sign(o-n),t=Math.sqrt(Math.abs(o-n)),c=n+t*e;return e>0?Math.min(o,c):Math.max(o,c)}function step(n,o,e,t){let c=n;for(let p=0;p<t;p++)c=e(c,o);return c}function useScrollAnimation(n,o,e,t){const c=reactExports.useRef(0),p=reactExports.useCallback((y,g,$=Date.now())=>{cancelAnimationFrame(c.current),c.current=requestAnimationFrame(()=>{if(n){const E=n.scrollHeight-n.offsetHeight;let A=step(y,E,squareStepper,(Date.now()-$)/5);Math.abs(E-A)<1.5&&(A=E),n.scrollTop=A,E===A?o():p(y,g+1,$)}})},[c,o,n]),h=reactExports.useCallback(()=>{cancelAnimationFrame(c.current),o()},[o]);reactExports.useLayoutEffect(()=>{if(!(!n||!e||!t))return p(n.scrollTop,1),n?(n.addEventListener("pointerdown",h,{passive:!0}),n.addEventListener("wheel",h,{passive:!0}),()=>{n.removeEventListener("pointerdown",h),n.removeEventListener("wheel",h),cancelAnimationFrame(c.current)}):()=>cancelAnimationFrame(c.current)},[p,c,h,n,e,t])}function debounce(n,o){let e=0,t=null;return(...c)=>{const p=Date.now();p-e>o?(n(...c),e=p):(t&&clearTimeout(t),t=setTimeout(()=>{n(...c),e=Date.now()},Math.max(0,o-p+e)))}}const DEFAULT_DEBOUNCE_MS=100;function useScrollSpy(n,o,e){const t=reactExports.useRef(o),c=reactExports.useMemo(()=>debounce(h=>{t.current(h)},DEFAULT_DEBOUNCE_MS),[t]),p=reactExports.useCallback(h=>{h.timeStampLow=Date.now(),c(h)},[c]);reactExports.useLayoutEffect(()=>!n||!e?()=>{}:(n.addEventListener("scroll",p,{passive:!0}),p({target:n}),()=>n.removeEventListener("scroll",p)),[p,n,e])}function useStateRef(n){const[o,e]=reactExports.useState(n),t=reactExports.useRef(n);return t.current=o,[o,e,t]}const DEFAULT_BOTTOM_THRESHOLD=1,SCROLL_DECISION_DURATION=34,MIN_CHECK_INTERVAL=17;function setImmediateInterval(n,o){return n(),setInterval(n,o)}function isAtBottom({scrollHeight:n,offsetHeight:o,scrollTop:e}){return n-e-o<DEFAULT_BOTTOM_THRESHOLD}function useScrollToBottom(n){const o=reactExports.useRef(null),[e,t,c]=useStateRef(!1),[p,h,y]=useStateRef(!0);reactExports.useEffect(()=>{t(!0)},[t]);const g=reactExports.useRef(0),$=reactExports.useRef(0),E=reactExports.useRef(0),A=reactExports.useCallback(()=>{g.current=Date.now(),y.current||t(!1),h(!1)},[g,y,h,t]),N=reactExports.useCallback(({timeStampLow:H})=>{const{current:Z}=o,X=y.current;if(H<=g.current||!Z)return;const be=isAtBottom(Z),{offsetHeight:we,scrollHeight:$e}=Z,{current:Ce}=$,{current:Ie}=E,Ne=we!==Ce,Fe=$e!==Ie;if(Ne&&($.current=we),Fe&&(E.current=$e),!Ne&&!Fe){const Be=X||be;c.current!==Be&&t(Be)}else c.current&&(h(!0),t(!0))},[g,$,E,y,c,h,t]);return reactExports.useEffect(()=>{if(o.current&&n){let H=0;const Z=setImmediateInterval(()=>{const{current:X}=o,be=y.current;c.current&&X?isAtBottom(X)?H=0:H?Date.now()-H>SCROLL_DECISION_DURATION&&(be||(h(!0),t(!0)),H=0):H=Date.now():X&&X.scrollHeight<=X.offsetHeight&&!c.current&&t(!0)},MIN_CHECK_INTERVAL);return()=>clearInterval(Z)}},[o,e,p,y,c,t,h,n]),reactExports.useEffect(()=>{const H=o.current;if(H&&n){const Z=()=>{E.current=H.scrollHeight};return H.addEventListener("focus",Z,{capture:!0,passive:!0}),()=>{H.removeEventListener("focus",Z,{capture:!0})}}},[o,n]),useScrollSpy(o.current,N,n),useScrollAnimation(o.current,A,p,n),o}const Maybe=reactExports.memo(function n({children:o}){return jsx$1(Fragment,{children:o})},(n,o)=>!(n.enable||o.enable)),ViewStateContext=reactExports.createContext({isFullScreen:!1,setFullScreen:()=>{}});ViewStateContext.displayName="ViewStateContext";const StyledDocSummary=styled("span",{target:"e1rz36mz0"})(({theme:n})=>({"& > *":{marginRight:n.spacing.sm}})),StyledDocName=styled("span",{target:"e1rz36mz1"})(({theme:n})=>({fontWeight:n.fontWeights.codeBold})),StyledDocType=styled("span",{target:"e1rz36mz2"})(({theme:n})=>({color:n.colors.codeTextColor})),StyledDocValue=styled("span",{target:"e1rz36mz3"})(),StyledDocContainer=styled("span",{target:"e1rz36mz4"})(({theme:n})=>({display:"flex",flexDirection:"column",borderRadius:n.radii.default,border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,fontFamily:n.genericFonts.codeFont,fontSize:n.fontSizes.codeFontSize,fontWeight:n.fontWeights.code})),StyledDocHeader=styled("div",{target:"e1rz36mz5"})(({theme:n})=>({padding:`${n.spacing.sm} ${n.spacing.lg}`,backgroundColor:n.colors.bgMix,borderBottom:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderTopLeftRadius:n.radii.default,borderTopRightRadius:n.radii.default,fontSize:n.fontSizes.codeFontSize,overflow:"auto"})),StyledDocString=styled("div",{target:"e1rz36mz6"})(({theme:n})=>({whiteSpace:"pre",overflow:"auto",maxHeight:"30.5rem",padding:`${n.spacing.sm} ${n.spacing.lg}`,fontSize:n.fontSizes.codeFontSize,"&:not(:last-child)":{borderBottom:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`}})),StyledMembersTable=styled("table",{target:"e1rz36mz7"})(({theme:n})=>({width:"100%",fontSize:n.fontSizes.codeFontSize,backgroundColor:n.colors.bgMix,tableLayout:"fixed",borderCollapse:"collapse",borderBottomLeftRadius:n.radii.default,borderBottomRightRadius:n.radii.default})),StyledMembersRow=styled("tr",{target:"e1rz36mz8"})(({theme:n})=>({"&:not(:last-child)":{borderBottom:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`}})),StyledMembersSummaryCell=styled("td",{target:"e1rz36mz9"})(({theme:n})=>({width:"30%",overflow:"auto",padding:`${n.spacing.sm} ${n.spacing.lg}`,"& > *":{marginRight:n.spacing.sm}})),StyledMembersDetailsCell=styled("td",{target:"e1rz36mz10"})(({theme:n})=>({width:"70%",overflow:"auto",padding:`${n.spacing.sm} ${n.spacing.lg}`}));function DocString({element:n}){const{name:o,type:e,value:t,docString:c,members:p}=n;return jsxs(StyledDocContainer,{className:"stHelp","data-testid":"stHelp",children:[jsx$1(StyledDocHeader,{children:jsxs(StyledDocSummary,{children:[o?jsx$1(StyledDocName,{"data-testid":"stHelpName",children:o}):null,e?jsx$1(StyledDocType,{"data-testid":"stHelpType",children:e}):null,t?jsx$1(StyledDocValue,{"data-testid":"stHelpValue",children:t}):null]})}),jsx$1(StyledDocString,{"data-testid":"stHelpDoc",children:c||"No docs available"}),p.length>0?jsx$1(StyledMembersTable,{"data-testid":"stHelpMembersTable",children:p.map(h=>jsx$1(Member,{member:h},h.name))}):null]})}function Member({member:n}){const{name:o,type:e,value:t,docString:c}=n;return jsxs(StyledMembersRow,{"data-testid":"stHelpMember",children:[jsxs(StyledMembersSummaryCell,{children:[o?jsx$1(StyledDocName,{"data-testid":"stHelpMemberDocName",children:o}):null,e?jsx$1(StyledDocType,{"data-testid":"stHelpMemberDocType",children:e}):null]}),jsx$1(StyledMembersDetailsCell,{children:t?jsx$1(StyledDocValue,{"data-testid":"stHelpMemberDocValue",children:t}):jsx$1(StyledDocValue,{"data-testid":"stHelpMemberDocString",children:c||"No docs available"})})]})}const DocString$1=reactExports.memo(DocString);function useTimeout(n,o){const e=reactExports.useRef(null),t=reactExports.useRef(n);reactExports.useEffect(()=>{t.current=n},[n]);const c=reactExports.useCallback(()=>{e.current&&(clearTimeout(e.current),e.current=null),o!==null&&(e.current=setTimeout(()=>{t.current()},o))},[o]);reactExports.useEffect(()=>(c(),()=>{e.current&&(clearTimeout(e.current),e.current=null)}),[c]);const p=reactExports.useCallback(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),h=reactExports.useCallback(()=>{c()},[c]);return{clear:p,restart:h}}const LOG$f=loglevelExports.getLogger("useCopyToClipboard"),useCopyToClipboard=({timeout:n=2e3}={})=>{const[o,e]=reactExports.useState(!1),{restart:t}=useTimeout(reactExports.useCallback(()=>{e(!1)},[]),o?n:null),c=reactExports.useCallback(h=>{(async()=>{try{await navigator.clipboard.writeText(h),e(!0),t()}catch(g){LOG$f.error("Failed to copy text to clipboard:",g),e(!1)}})()},[t]);return{isCopied:o,copyToClipboard:c,label:o?"Copied":"Copy to clipboard"}},StyledStackTraceRow=styled("div",{target:"e1wpre4k0"})(({theme:n})=>({marginTop:n.spacing.sm,"&:first-of-type":{marginTop:0}})),StyledMessageType=styled("span",{target:"e1wpre4k1"})(({theme:n})=>({fontWeight:n.fontWeights.bold})),StyledStackTraceTitle=styled("div",{target:"e1wpre4k2"})(({theme:n})=>({marginBottom:n.spacing.sm})),StyledStackTraceContent=styled("div",{target:"e1wpre4k3"})({display:"inline-block",minWidth:"100%"}),StyledExceptionMessage=styled("div",{target:"e1wpre4k4"})({wordWrap:"break-word"}),StyledExceptionLinks=styled("div",{target:"e1wpre4k5"})(({theme:n})=>({fontSize:n.fontSizes.sm,display:"flex",gap:n.spacing.md,justifyContent:"flex-end",underline:!0})),StyledExceptionCopyButton=styled("button",{target:"e1wpre4k6"})({all:"unset",font:"inherit",textDecoration:"underline"}),StyledExceptionWrapper=styled("div",{target:"e1wpre4k7"})(({theme:n})=>({display:"flex",flexDirection:"column",gap:n.spacing.lg}));loglevelExports.getLogger("ExceptionElement");function isNonEmptyString(n){return notNullOrUndefined(n)&&n!==""}function ExceptionMessage({type:n,message:o,messageIsMarkdown:e}){if(e){let t=o??"";return n.length!==0&&(t=`**${n}**: ${t}`),jsx$1(StreamlitMarkdown$1,{source:t,allowHTML:!1})}return jsxs(Fragment,{children:[jsx$1(StyledMessageType,{children:n}),n.length!==0&&": ",isNonEmptyString(o)?o:null]})}function StackTrace({stackTrace:n}){return jsxs("div",{children:[jsx$1(StyledStackTraceTitle,{children:"Traceback:"}),jsx$1(StyledStackTrace,{children:jsx$1(StyledStackTraceContent,{children:jsx$1(StyledCode,{wrapLines:!1,children:n.map((o,e)=>jsx$1(StyledStackTraceRow,{"data-testid":"stExceptionTraceRow",children:o},e))})})})]})}function ExceptionElement({element:n}){const o=`${n.type}: ${n.message}`,e=`${o}
111
111
 
112
112
  ${n.stackTrace?.join(`
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(`
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[]`:e;g=jsx$1(StyledLabelHelpWrapper,{isLatex:h,children:jsx$1(StreamlitMarkdown$1,{isCaption:p,source:$,allowHTML:o,helpText:c})})}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.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.
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.CTssS8CY.js"),__vite__mapDeps([5,6,7,8]),import.meta.url)),ArrowVegaLiteChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dt4MKWrN.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.BuO127Fv.js"),[],import.meta.url)),Balloons=reactExports.lazy(()=>__vitePreload(()=>import("./index.C4SaLgc9.js"),__vite__mapDeps([30,31]),import.meta.url)),DeckGlJsonChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.DATGLwZn.js"),__vite__mapDeps([32,20,21,10,11,15,33,13,27,28,34]),import.meta.url)),GraphVizChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.BSC_e7mC.js"),__vite__mapDeps([35,29,28,10,11]),import.meta.url)),Html=reactExports.lazy(()=>__vitePreload(()=>import("./index.CLw67zQa.js"),[],import.meta.url)),IFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.BNH1O6vW.js"),__vite__mapDeps([36,37]),import.meta.url)),ImageList=reactExports.lazy(()=>__vitePreload(()=>import("./index.CJdAAsMS.js"),__vite__mapDeps([38,10,11]),import.meta.url)),Json=reactExports.lazy(()=>__vitePreload(()=>import("./index.Cys-qREe.js"),__vite__mapDeps([39,15,16]),import.meta.url)),LinkButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.B1br6-J8.js"),[],import.meta.url)),Metric=reactExports.lazy(()=>__vitePreload(()=>import("./index.BK8LGuo5.js"),__vite__mapDeps([40,26,27,28,29]),import.meta.url)),PageLink=reactExports.lazy(()=>__vitePreload(()=>import("./index.C9ZwaDT3.js"),[],import.meta.url)),PlotlyChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.DmaExHyk.js"),__vite__mapDeps([41,10,13]),import.meta.url)),Progress=reactExports.lazy(()=>__vitePreload(()=>import("./index.OW6D7CJ5.js"),__vite__mapDeps([42,43]),import.meta.url)),Snow=reactExports.lazy(()=>__vitePreload(()=>import("./index.xg87JKI8.js"),__vite__mapDeps([44,31]),import.meta.url)),Spinner=reactExports.lazy(()=>__vitePreload(()=>import("./index.CPVPS6MS.js"),[],import.meta.url)),StreamlitSyntaxHighlighter=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.DU42g8NY.js"),[],import.meta.url)),Toast=reactExports.lazy(()=>__vitePreload(()=>import("./index.BDyX78eQ.js"),[],import.meta.url)),Video=reactExports.lazy(()=>__vitePreload(()=>import("./index.M-iumICI.js"),[],import.meta.url)),AudioInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.19XigCCW.js"),__vite__mapDeps([45,46,11,13,19,47,23]),import.meta.url)),ArrowDataFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.DDuPBAVu.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.CQRv0Buu.js"),[],import.meta.url)),ButtonGroup=reactExports.lazy(()=>__vitePreload(()=>import("./index.CaMDX02c.js"),__vite__mapDeps([48,33,13]),import.meta.url)),ComponentInstance=reactExports.lazy(()=>__vitePreload(()=>import("./index.BSsyTGMU.js"),__vite__mapDeps([49,50,47,37]),import.meta.url).then(n=>({default:n.ComponentInstance}))),CameraInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BtT26h8D.js"),__vite__mapDeps([51,50,52,13,43,47]),import.meta.url)),ChatInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CVgZcb-2.js"),__vite__mapDeps([53,54,52,46,55,56,57,58,59]),import.meta.url)),Checkbox=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dc27IuI8.js"),__vite__mapDeps([60,33,13,18]),import.meta.url)),ColorPicker=reactExports.lazy(()=>__vitePreload(()=>import("./index.BNJ18Gvk.js"),__vite__mapDeps([61,33,13,17]),import.meta.url)),DateInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CV56Xzvw.js"),__vite__mapDeps([62,7,33,13,63,64,21,22,65,57,59]),import.meta.url)),DateTimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.NjN0yaAC.js"),__vite__mapDeps([66,7,63,64,21,22,65,57,33,13,67,59]),import.meta.url)),DownloadButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.CccNGpyY.js"),__vite__mapDeps([68,19]),import.meta.url)),FileUploader=reactExports.lazy(()=>__vitePreload(()=>import("./index.DN77pJCq.js"),__vite__mapDeps([69,13,54,52,43]),import.meta.url)),FormSubmitContent=reactExports.lazy(()=>__vitePreload(()=>import("./index.COYdue8P.js"),__vite__mapDeps([70,13]),import.meta.url).then(n=>({default:n.FormSubmitContent}))),Multiselect=reactExports.lazy(()=>__vitePreload(()=>import("./index.BTeFWqxT.js"),__vite__mapDeps([71,33,13,24,8]),import.meta.url)),NumberInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CCH6P_Oz.js"),__vite__mapDeps([72,55,13,14,73,65,57]),import.meta.url)),Radio=reactExports.lazy(()=>__vitePreload(()=>import("./index.C6PG_WI2.js"),__vite__mapDeps([74,33,13]),import.meta.url)),Selectbox$1=reactExports.lazy(()=>__vitePreload(()=>import("./index.Cc0FyOvj.js"),__vite__mapDeps([75,33,13]),import.meta.url)),Slider=reactExports.lazy(()=>__vitePreload(()=>import("./index.DmQGepo0.js"),__vite__mapDeps([76,7,14,50,33,13]),import.meta.url)),TextArea=reactExports.lazy(()=>__vitePreload(()=>import("./index.DdjNqo0t.js"),__vite__mapDeps([77,55,33,13,78,58,56,57,73]),import.meta.url)),TextInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.0CGAg_-3.js"),__vite__mapDeps([79,55,33,13,78,58,73,65,57]),import.meta.url)),TimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.SnIe8o_F.js"),__vite__mapDeps([80,33,13,67,64,21,22]),import.meta.url)),BidiComponent=reactExports.lazy(()=>__vitePreload(()=>import("./index.BVQ-x0jB.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.BGGsxMsK.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.
@@ -144,8 +144,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
144
144
 
145
145
  If you are trying to access a Streamlit app running on another server, this could be due to the app's [CORS](${CORS_ERROR_MESSAGE_DOCUMENTATION_LINK}) settings.`})},we=Ce=>{let Ie="DoInitPings";if(Ce)try{Ie=new URL(Ce).pathname}catch{LOG$7.error(`unrecognized url: ${Ce}`)}return Ie};return N=()=>{const Ce=n[E],Ie=f(Ce,SERVER_PING_PATH),Ne=typeof window<"u"?window.__streamlit?.HOST_CONFIG_BASE_URL:void 0,Fe=Ne?parseUriIntoBaseParts(Ne):Ce,Be=f(Fe,HOST_CONFIG_PATH);LOG$7.info(`Attempting to connect to ${Ie}.`),E===0&&$++,Promise.all([fetchWithTimeout(Ie,PING_TIMEOUT_MS),fetchWithTimeout(Be,PING_TIMEOUT_MS)]).then(([Ge,je])=>{p(je.data),y(E)}).catch(Ge=>{const je=$>=MAX_RETRIES_BEFORE_CLIENT_ERROR;if(Ge.isTimeout){if(je){const De=we(Ge.url);LOG$7.error("Client error: DoInitPings timed out"),c("DoInitPings timed out","Connection timed out - ECONNABORTED",De)}return Z({message:"Connection timed out."})}if(Ge.response){const{data:De,status:Ue,statusText:Je}=Ge.response,Xe=we(Ge.url);if(Ue===0)return je&&(LOG$7.error(`Client Error: response received with status ${Ue} when attempting to reach ${Xe}`),c(`Response received with status ${Ue}`,Je,Xe)),X();if(Ue===403)return je&&(LOG$7.error(`Client Error: response received with status ${Ue} when attempting to reach ${Xe}`),c(Ue,Je,Xe)),be();je&&(LOG$7.error(`Client Error: response received with status ${Ue} when attempting to reach ${Xe}`),c(Ue,Je,Xe));const Ke=serializeForDisplay(De);return Z({message:`Connection failed with status ${Ue}${Ke?", and response:":"."}`,...Ke&&{codeBlock:Ke}})}if(Ge.isNetworkError){if(je){const De=we(Ge.url);LOG$7.error(`Client Error in reaching server endpoint - No response received when attempting to reach ${De}`),c("No response received from server","Network error",De)}return X()}if(je){const De=we(Ge.url);LOG$7.error(`Client Error in reaching server endpoint - error in setting up request when attempting to reach ${De}`),c("Error setting up request to server",Ge.message??"",De)}return Z({message:Ge.message})})},N(),{promise:h,cancel:()=>{m(A)&&globalThis.clearTimeout(A),g(new PingCancelledError)}}}const LOG$6=loglevelExports.getLogger("ForwardMessageCache");class CacheEntry{constructor(o,e,t){this.scriptRunCount=0,this.encodedMsg=o,this.scriptRunCount=e,this.fragmentId=t}getAge(o){return o-this.scriptRunCount}}class ForwardMsgCache{constructor(){this.messages=new Map,this.scriptRunCount=0}incrementRunCount(o,e){this.scriptRunCount+=1,this.messages.forEach((t,c)=>{e.length>0&&(!t.fragmentId||!e.includes(t.fragmentId))||t.getAge(this.scriptRunCount)>o&&(LOG$6.info(`Removing expired ForwardMsg [hash=${c}]`),this.messages.delete(c))})}getCachedMessageHashes(){return Array.from(this.messages.keys())}async processMessagePayload(o,e){if(this.maybeCacheMessage(o,e),o.type!=="refHash")return o;const t=this.getCachedMessage(o.refHash,!0);if(m(t))LOG$6.info(`Cached ForwardMsg HIT [hash=${o.refHash}]`);else throw new Error(`Cached ForwardMsg MISS [hash=${o.refHash}]. This is not expected to happen. Please [report this bug](https://github.com/streamlit/streamlit/issues).`);if(!o.metadata)throw new Error("Reference ForwardMsg has no metadata. This is not expected to happen. Please [report this bug](https://github.com/streamlit/streamlit/issues).");return t.metadata=ForwardMsg.decode(e).metadata,t}maybeCacheMessage(o,e){if(o.type!=="refHash"&&o.metadata?.cacheable){if(!o.hash){LOG$6.error("ForwardMsg has no hash. This is not expected to happen, please report this bug.",o);return}this.getCachedMessage(o.hash,!0)===void 0&&(LOG$6.info(`Caching ForwardMsg [hash=${o.hash}]`),this.messages.set(o.hash,new CacheEntry(e,this.scriptRunCount,o.delta?.fragmentId??void 0)))}}getCachedMessage(o,e){const t=this.messages.get(o);if(!d(t))return e&&(t.scriptRunCount=this.scriptRunCount),ForwardMsg.decode(t.encodedMsg)}}const LOG$5=loglevelExports.getLogger("WebsocketConnection");class WebsocketConnection{constructor(o){this.uriIndex=0,this.lastDispatchedMessageIndex=-1,this.nextMessageIndex=0,this.messageQueue={},this.state=ConnectionState.INITIAL,this.args=o,this.cache=new ForwardMsgCache,this.stepFsm("INITIALIZED")}getBaseUriParts(){if(this.state===ConnectionState.CONNECTED)return this.args.baseUriPartsList[this.uriIndex]}disconnect(){this.setFsmState(ConnectionState.DISCONNECTED_FOREVER)}setFsmState(o,e){switch(LOG$5.info(`New state: ${o}`),this.state=o,this.state){case ConnectionState.PINGING_SERVER:this.pingServer();break}switch(this.args.onConnectionStateChange(o,e),this.state){case ConnectionState.CONNECTING:this.connectToWebSocket();break;case ConnectionState.DISCONNECTED_FOREVER:this.closeConnection();break}}stepFsm(o,e){if(LOG$5.info(`State: ${this.state}; Event: ${o}`),o==="FATAL_ERROR"&&this.state!==ConnectionState.DISCONNECTED_FOREVER){LOG$5.error(`Client Error: Websocket connection encountered fatal error - ${e}`),this.args.sendClientError("Websocket connection fatal error encountered",e,"Websocket Connection"),this.setFsmState(ConnectionState.DISCONNECTED_FOREVER,{message:e||"Unknown error"});return}switch(this.state){case ConnectionState.INITIAL:if(o==="INITIALIZED"){this.setFsmState(ConnectionState.PINGING_SERVER);return}break;case ConnectionState.CONNECTING:if(o==="CONNECTION_SUCCEEDED"){this.setFsmState(ConnectionState.CONNECTED);return}if(o==="CONNECTION_TIMED_OUT"||o==="CONNECTION_ERROR"||o==="CONNECTION_CLOSED"){this.setFsmState(ConnectionState.PINGING_SERVER);return}break;case ConnectionState.CONNECTED:if(o==="CONNECTION_CLOSED"||o==="CONNECTION_ERROR"){this.setFsmState(ConnectionState.PINGING_SERVER);return}break;case ConnectionState.PINGING_SERVER:if(o==="SERVER_PING_SUCCEEDED"){this.setFsmState(ConnectionState.CONNECTING);return}break;case ConnectionState.DISCONNECTED_FOREVER:LOG$5.warn(`Discarding ${o} while in ${ConnectionState.DISCONNECTED_FOREVER}`);return}throw new Error(`Unsupported state transition.
146
146
  State: ${this.state}
147
- Event: ${o}`)}async pingServer(){this.pingRequest=doInitPings(this.args.baseUriPartsList,PING_MINIMUM_RETRY_PERIOD_MS,PING_MAXIMUM_RETRY_PERIOD_MS,this.args.onRetry,this.args.sendClientError,this.args.onHostConfigResp);try{this.uriIndex=await this.pingRequest.promise,this.pingRequest=void 0,this.stepFsm("SERVER_PING_SUCCEEDED")}catch(o){o instanceof PingCancelledError?LOG$5.info("Ping cancelled"):this.stepFsm("FATAL_ERROR",o instanceof Error?o.message:String(o))}finally{this.pingRequest=void 0}}async getSessionTokens(){const o=await this.args.claimHostAuthToken(),e=u("_streamlit_xsrf");this.args.resetHostAuthToken();const t=this.args.getLastSessionId();return[o??e??"PLACEHOLDER_AUTH_TOKEN",...t?[t]:[]]}async connectToWebSocket(){const o=buildWsUri(this.args.baseUriPartsList[this.uriIndex],WEBSOCKET_STREAM_PATH);if(m(this.websocket))throw new Error("Websocket already exists");LOG$5.info("creating WebSocket");const e=await this.getSessionTokens();this.websocket=new WebSocket(o,["streamlit",...e]),this.websocket.binaryType="arraybuffer",this.setConnectionTimeout(o);const t=this.websocket,c=()=>t===this.websocket;this.websocket.addEventListener("message",p=>{c()&&this.handleMessage(p.data).catch(h=>{const y=`Failed to process a Websocket message. ${h}`;LOG$5.error(y),this.stepFsm("FATAL_ERROR",y)})}),this.websocket.addEventListener("open",()=>{c()&&(LOG$5.info("WebSocket onopen"),this.stepFsm("CONNECTION_SUCCEEDED"))}),this.websocket.addEventListener("close",()=>{c()&&(LOG$5.warn("WebSocket onclose"),this.closeConnection(),this.stepFsm("CONNECTION_CLOSED"))}),this.websocket.addEventListener("error",p=>{c()&&(LOG$5.error("Client Error: WebSocket onerror"),this.args.sendClientError("Websocket connection onerror triggered",`Error: ${p}`,"Websocket Connection"),this.closeConnection(),this.stepFsm("CONNECTION_ERROR"))})}setConnectionTimeout(o){if(m(this.wsConnectionTimeout))throw new Error("WS timeout is already set");const e=this.websocket;this.wsConnectionTimeout=globalThis.setTimeout(()=>{if(e===this.websocket){if(d(this.wsConnectionTimeout)){LOG$5.warn("Timeout fired after cancellation");return}if(d(this.websocket)){this.closeConnection(),this.stepFsm("FATAL_ERROR","Null Websocket in setConnectionTimeout");return}this.websocket.readyState===0&&(LOG$5.info(`Client error: ${o} timed out`),this.args.sendClientError("Websocket connection timed out",`${o} timed out`,"Websocket Connection"),this.closeConnection(),this.stepFsm("CONNECTION_TIMED_OUT"))}},WEBSOCKET_TIMEOUT_MS),LOG$5.info(`Set WS timeout ${Number(this.wsConnectionTimeout)}`)}closeConnection(){this.websocket&&(this.websocket.close(),this.websocket=void 0),m(this.wsConnectionTimeout)&&(LOG$5.info(`Clearing WS timeout ${Number(this.wsConnectionTimeout)}`),globalThis.clearTimeout(this.wsConnectionTimeout),this.wsConnectionTimeout=void 0),this.pingRequest&&(this.pingRequest.cancel(),this.pingRequest=void 0)}sendMessage(o){if(!this.websocket)return;const e=BackMsg.create(o),t=BackMsg.encode(e).finish();this.websocket.send(t)}incrementMessageCacheRunCount(o,e){this.cache.incrementRunCount(o,e)}getCachedMessageHashes(){return this.cache.getCachedMessageHashes()}async handleMessage(o){const e=this.nextMessageIndex;this.nextMessageIndex+=1;const t=new Uint8Array(o),c=ForwardMsg.decode(t);for(this.messageQueue[e]=await this.cache.processMessagePayload(c,t);this.lastDispatchedMessageIndex+1 in this.messageQueue;){const p=this.lastDispatchedMessageIndex+1;this.args.onMessage(this.messageQueue[p]),delete this.messageQueue[p],this.lastDispatchedMessageIndex=p}}}const LOG$4=loglevelExports.getLogger("ConnectionManager");class ConnectionManager{constructor(o){this.connectionState=ConnectionState.INITIAL,this.setConnectionState=(e,t)=>{this.connectionState!==e&&(this.connectionState=e,this.props.connectionStateChanged(e)),t&&this.props.onConnectionError(t)},this.showRetryError=(e,t,c)=>{e>=MAX_RETRIES_BEFORE_CLIENT_ERROR&&this.props.onConnectionError(t)},this.props=o,this.connect()}isConnected(){return this.connectionState===ConnectionState.CONNECTED}getBaseUriParts(){if(this.websocketConnection instanceof WebsocketConnection)return this.websocketConnection.getBaseUriParts()}sendMessage(o){this.websocketConnection instanceof WebsocketConnection&&this.isConnected()?this.websocketConnection.sendMessage(o):LOG$4.error(`Cannot send message when server is disconnected: ${o}`)}incrementMessageCacheRunCount(o,e){this.websocketConnection instanceof WebsocketConnection&&this.websocketConnection.incrementMessageCacheRunCount(o,e)}getCachedMessageHashes(){return this.websocketConnection instanceof WebsocketConnection?this.websocketConnection?.getCachedMessageHashes()??[]:[]}checkStaticConnection(){return new URLSearchParams(document.location.search).get("staticAppId")}async connect(){const o=this.checkStaticConnection();if(o)establishStaticConnection(o,this.setConnectionState,this.props.onMessage,this.props.onConnectionError,this.props.endpoints),this.websocketConnection=null;else try{this.websocketConnection=await this.connectToRunningServer()}catch(e){const t=e instanceof Error?e:new Error(`${e}`);LOG$4.error(`Client Error: Websocket connection - ${t.message}`),this.props.sendClientError("Failed to establish websocket connection",t.message,"Connection Manager"),this.setConnectionState(ConnectionState.DISCONNECTED_FOREVER,{message:t.message})}}disconnect(){this.websocketConnection?.disconnect()}connectToRunningServer(){const o=getPossibleBaseUris();return new WebsocketConnection({getLastSessionId:this.props.getLastSessionId,endpoints:this.props.endpoints,baseUriPartsList:o,onMessage:this.props.onMessage,onConnectionStateChange:this.setConnectionState,onRetry:this.showRetryError,claimHostAuthToken:this.props.claimHostAuthToken,resetHostAuthToken:this.props.resetHostAuthToken,sendClientError:this.props.sendClientError,onHostConfigResp:this.props.onHostConfigResp})}}const LOG$3=loglevelExports.getLogger("DefaultStreamlitEndpoints"),MEDIA_ENDPOINT="/media",UPLOAD_FILE_ENDPOINT="/_stcore/upload_file",COMPONENT_ENDPOINT_BASE="/component",BIDI_COMPONENT_ENDPOINT_BASE="/_stcore/bidi-components";class DefaultStreamlitEndpoints{constructor(o){this.getServerUri=o.getServerUri,this.csrfEnabled=o.csrfEnabled,this.sendClientError=o.sendClientError,this.staticConfigUrl=null}setStaticConfigUrl(o){this.staticConfigUrl=o}sendClientErrorToHost(o,e,t,c,p){this.sendClientError(o,e,t,c,p)}async checkSourceUrlResponse(o,e,t){const c=t?`${e} ${t}`:e;try{const p=await fetch(o);p.ok||(LOG$3.error(`Client Error: ${c} source error - ${p.status}`),this.sendClientErrorToHost(e,p.status,p.statusText,o,t))}catch(p){const h=p instanceof Error?p.message:"Unknown Error";LOG$3.error(`Client Error: ${c} fetch error - ${h}`),this.sendClientErrorToHost(e,"Error fetching source",h,o,t)}}buildComponentURL(o,e){return f(this.requireServerUri(),`${COMPONENT_ENDPOINT_BASE}/${o}/${e}`)}buildBidiComponentURL(o,e){return f(this.requireServerUri(),`${BIDI_COMPONENT_ENDPOINT_BASE}/${o}/${e}`)}setFileUploadClientConfig({prefix:o,headers:e}){this.fileUploadClientConfig={prefix:o,headers:e}}buildStaticUrl(o){const t=new URLSearchParams(document.location.search).get("staticAppId");return`${this.staticConfigUrl}/${t}${o}`}buildMediaURL(o){return this.staticConfigUrl&&o.startsWith(MEDIA_ENDPOINT)?this.buildStaticUrl(o):o.startsWith(MEDIA_ENDPOINT)?f(this.requireServerUri(),o):o}buildDownloadUrl(o){if(!o.startsWith(MEDIA_ENDPOINT))return o;const e=window.__streamlit?.DOWNLOAD_ASSETS_BASE_URL;return f(e?parseUriIntoBaseParts(e):this.requireServerUri(),o)}buildFileUploadURL(o){return this.fileUploadClientConfig?s(this.fileUploadClientConfig.prefix,o):o.startsWith(UPLOAD_FILE_ENDPOINT)?f(this.requireServerUri(),o):o}buildAppPageURL(o,e){const t=e.urlPathname,c=e.isDefault?"":t;if(typeof o=="string"&&o.length>0)return`${o}/${c}`;const{port:p,protocol:h}=window.location,{pathname:y,hostname:g}=this.requireServerUri(),$=p?`:${p}`:"",E=y==="/"?"/":`${y}/`;return`${h}//${g}${$}${E}${c}`}async uploadFileUploaderFile(o,e,t,c,p){const h=new FormData,{name:y,webkitRelativePath:g}=e,$=g||y;h.append(y,e,$);const E=this.getAdditionalHeaders(),A=this.buildFileUploadURL(o);try{await this.csrfRequest(A,{signal:p,method:"PUT",data:h,responseType:"text",headers:E,onUploadProgress:c})}catch(N){LOG$3.error(`Client Error: File uploader error on file upload - ${N}`);const H=N instanceof Error?N.message:"Unknown Error";throw this.sendClientErrorToHost("File Uploader","Error uploading file",H,A),N}}getAdditionalHeaders(){let o={};return this.fileUploadClientConfig&&(o={...o,...this.fileUploadClientConfig.headers}),o}async deleteFileAtURL(o,e){const t=this.getAdditionalHeaders(),c=this.buildFileUploadURL(o);try{await this.csrfRequest(c,{method:"DELETE",data:{sessionId:e},headers:t})}catch(p){LOG$3.error(`Client Error: File uploader error on file delete - ${p}`);const h=p instanceof Error?p.message:"Unknown Error";throw this.sendClientErrorToHost("File Uploader","Error deleting file",h,c),p}}requireServerUri(){const o=this.getServerUri();if(m(o))return this.cachedServerUri=o,o;if(m(this.cachedServerUri))return this.cachedServerUri;throw new Error("not connected to a server!")}async csrfRequest(o,e){if(e.url=o,this.csrfEnabled){const c=u("_streamlit_xsrf");m(c)&&(e.headers={"X-Xsrftoken":c,...e.headers||{}},e.withCredentials=!0)}const{default:t}=await __vitePreload(async()=>{const{default:c}=await import("./index.B0yp3bM1.js");return{default:c}},[],import.meta.url);return t.request(e)}}var Ellipses=reactExports.forwardRef(function(n,o){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$C({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},n,{ref:o}),reactExports.createElement("path",{d:"M0 3v2h2V3H0zm3 0v2h2V3H3zm3 0v2h2V3H6z"}))});Ellipses.displayName="Ellipses";var Warning=reactExports.forwardRef(function(n,o){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$C({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},n,{ref:o}),reactExports.createElement("path",{d:"M3.09 0c-.06 0-.1.04-.13.09L.02 6.9c-.02.05-.03.13-.03.19v.81c0 .05.04.09.09.09h6.81c.05 0 .09-.04.09-.09v-.81c0-.05-.01-.14-.03-.19L4.01.09A.142.142 0 003.88 0h-.81zM3 3h1v2H3V3zm0 3h1v1H3V6z"}))});Warning.displayName="Warning";const CONNECTING_LABEL="Connecting",CONNECTING_TOOLTIP_TEXT="Connecting to Streamlit server",CONNECTING_STATIC_TOOLTIP_TEXT="Connecting to static app",ERROR_LABEL="Error",ERROR_TOOLTIP_TEXT="Unable to connect to Streamlit server";function getConnectionStateUI(n){switch(n){case ConnectionState.INITIAL:case ConnectionState.PINGING_SERVER:case ConnectionState.CONNECTING:return{icon:Ellipses,label:CONNECTING_LABEL,tooltip:CONNECTING_TOOLTIP_TEXT};case ConnectionState.CONNECTED:return;case ConnectionState.STATIC_CONNECTING:return{icon:Ellipses,label:CONNECTING_LABEL,tooltip:CONNECTING_STATIC_TOOLTIP_TEXT};case ConnectionState.STATIC_CONNECTED:return;case ConnectionState.DISCONNECTED_FOREVER:default:return{icon:Warning,label:ERROR_LABEL,tooltip:ERROR_TOOLTIP_TEXT}}}const newYearsRunning=""+new URL("../media/fireworks.B4d-_KUe.gif",import.meta.url).href,StyledConnectionStatus=styled("div",{target:"erv3yhi0"})(({theme:n})=>({display:"flex",alignItems:"center",justifyContent:"center",color:n.colors.gray60})),StyledConnectionStatusLabel=styled("label",{target:"erv3yhi1"})(({theme:n})=>({fontSize:n.fontSizes.sm,color:n.colors.gray60,textTransform:"uppercase",marginTop:n.spacing.none,marginRight:n.spacing.lg,marginBottom:n.spacing.none,marginLeft:n.spacing.sm,whiteSpace:"nowrap",maxWidth:n.sizes.appStatusMaxWidth,lineHeight:n.lineHeights.none})),StyledAppStatus=styled("div",{target:"erv3yhi2"})(({theme:n})=>({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:n.radii.md,margin:`0 ${n.spacing.sm} 0 0`,paddingLeft:n.spacing.sm,height:n.sizes.appRunningMen})),StyledAppStatusLabel=styled("label",{target:"erv3yhi3"})(({isPrompt:n,theme:o})=>({fontSize:o.fontSizes.sm,color:n?o.colors.bodyText:o.colors.gray60,textTransform:n?"none":"uppercase",margin:`0 0 0 ${o.spacing.sm}`,whiteSpace:"nowrap",maxWidth:o.sizes.appStatusMaxWidth,borderRadius:n?o.radii.md:void 0})),StyledAppButtonContainer=styled("span",{target:"erv3yhi4"})(({theme:n})=>({marginLeft:n.spacing.md,whiteSpace:"nowrap",color:n.colors.bodyText})),StyledAppRunningIcon=styled("div",{target:"erv3yhi5"})(({isNewYears:n,theme:o})=>({width:n?"2.2rem":o.sizes.appRunningMen,height:n?"2.2rem":o.sizes.appRunningMen,marginRight:`-${o.spacing.sm}`,display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 0.3s ease-in-out",cursor:"wait"})),StyledStatusWidget=styled("div",{target:"erv3yhi6"})({"&.StatusWidget-appear":{opacity:0},"&.StatusWidget-appear-active":{opacity:1,transition:"opacity 200ms ease-out"},"&.StatusWidget-enter":{opacity:0},"&.StatusWidget-enter-active":{opacity:1,transition:"opacity 200ms ease-out"},"&.StatusWidget-exit":{opacity:1},"&.StatusWidget-exit-active":{opacity:0,transition:"opacity 200ms ease-out"}}),StyledShortcutLabel=styled("div",{target:"erv3yhi7"})({"&::first-letter":{textDecoration:"underline"}}),icons=[{component:AccessibleForward,name:"accessible-forward"},{component:AccessibilityNew,name:"accessibility-new"},{component:DirectionsBike,name:"directions-bike"},{component:DirectionsRun,name:"directions-run"},{component:Pool,name:"pool"},{component:Rowing,name:"rowing"}],isNewYears=()=>{const n=new Date,o=n.getMonth(),e=n.getDate();return o===11&&e===31||o===0&&e<=6},DEFAULT_SPEED=200,IconRunning=()=>{const[n,o]=reactExports.useState(0),e=useEmotionTheme(),t=reactExports.useMemo(()=>isNewYears(),[]);reactExports.useEffect(()=>{if(t)return;const h=setInterval(()=>{o(y=>(y+1)%icons.length)},DEFAULT_SPEED);return()=>clearInterval(h)},[t]);const p=icons[n].component;return jsx$1(StyledAppRunningIcon,{isNewYears:t,"aria-label":"Running...",role:"img","data-testid":"stStatusWidgetRunningIcon",children:t?jsx$1("img",{src:newYearsRunning,alt:"New Year's Celebration",style:{width:"100%",height:"100%",objectFit:"contain"},"data-testid":"stStatusWidgetNewYearsIcon"}):jsx$1(p,{color:e.colors.fadedText60,"aria-hidden":"true","data-testid":"stStatusWidgetRunningManIcon",style:{width:e.sizes.appRunningMen,height:e.sizes.appRunningMen}})})},RUNNING_MAN_DISPLAY_DELAY_TIME_MS=500,PromptButton=n=>jsx$1(StyledAppButtonContainer,{children:jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_BUTTON,disabled:n.disabled,containerWidth:!0,onClick:n.onClick,children:n.title})}),StatusWidget=({connectionState:n,scriptRunState:o,rerunScript:e,stopScript:t,allowRunOnSave:c,showScriptChangedActions:p})=>{const[h,y]=reactExports.useState(!1),g=reactExports.useRef(null),$=reactExports.useRef(null),E=useEmotionTheme(),A=()=>{c&&e(!0)},N=je=>{je==="a"&&A()},H=n===ConnectionState.CONNECTED,Z=reactExports.useCallback(je=>{$.current!==null&&$.current.setTimeout(()=>{y(!0)},je)},[]),X=()=>{t()},be=()=>{e(!1)};reactExports.useEffect(()=>{g.current===null&&(g.current=new Timer),$.current===null&&($.current=new Timer);const je=g.current,De=g.current;return()=>{je.cancel(),De.cancel()}},[]),reactExports.useEffect(()=>{H&&(o===ScriptRunState.RUNNING||o===ScriptRunState.RERUN_REQUESTED)&&Z(RUNNING_MAN_DISPLAY_DELAY_TIME_MS),o===ScriptRunState.NOT_RUNNING&&y(!1)},[o,Z,H]);const we=()=>{const je=o===ScriptRunState.STOP_REQUESTED;return h?jsxs(StyledAppStatus,{children:[jsx$1(IconRunning,{}),jsx$1(PromptButton,{title:je?"Stopping...":"Stop",disabled:je,onClick:X})]}):jsx$1(Fragment,{})},$e=()=>{const je=o===ScriptRunState.RERUN_REQUESTED;return jsx$1(ReactHotkeys,{keyName:"a",onKeyDown:N,children:jsxs(StyledAppStatus,{children:[jsx$1(DynamicIcon,{size:"lg",iconValue:":material/info:",color:E.colors.fadedText60}),jsx$1(StyledAppStatusLabel,{isPrompt:!0,children:"File change."}),jsx$1(PromptButton,{title:jsx$1(StyledShortcutLabel,{children:"Rerun"}),disabled:je,onClick:be}),c&&jsx$1(PromptButton,{title:jsx$1(StyledShortcutLabel,{children:"Always rerun"}),disabled:je,onClick:A})]})})},Ce=()=>{const je=getConnectionStateUI(n);return je===void 0?null:jsx$1(Tooltip$1,{content:je.tooltip,placement:Placement.BOTTOM,children:jsxs(StyledConnectionStatus,{className:"stConnectionStatus","data-testid":"stConnectionStatus",children:[jsx$1(Icon$2,{size:"sm",content:je.icon}),jsx$1(StyledConnectionStatusLabel,{children:je.label})]})})},Ie=()=>{if(H){if(o===ScriptRunState.RUNNING||o===ScriptRunState.RERUN_REQUESTED)return we();if(p)return $e()}return Ce()},Ne=reactExports.useRef(),Fe=Ne.current;if(Ne.current=Ie(),isNullOrUndefined(Ne.current)&&isNullOrUndefined(Fe))return jsx$1(Fragment,{});let Be,Ge;return notNullOrUndefined(Ne.current)?(Be=!0,Ge=Ne.current):(Be=!1,Ge=Fe),jsx$1(CSSTransition,{appear:!0,in:Be,timeout:200,unmountOnExit:!0,classNames:"StatusWidget",children:jsx$1(StyledStatusWidget,{className:"stStatusWidget","data-testid":"stStatusWidget",children:Ge},"StatusWidget")})},StreamlitContextProvider=({isFullScreen:n,setFullScreen:o,locale:e,mapboxToken:t,enforceDownloadInNewTab:c,resourceCrossOriginMode:p,pageLinkBaseUrl:h,currentPageScriptHash:y,onPageChange:g,navSections:$,appPages:E,initialSidebarState:A,appLogo:N,sidebarChevronDownshift:H,expandSidebarNav:Z,hideSidebarNav:X,activeTheme:be,setTheme:we,availableThemes:$e,scriptRunState:Ce,scriptRunId:Ie,fragmentIdsThisRun:Ne,formsData:Fe,requestDeferredFile:Be,children:Ge})=>{const je=reactExports.useMemo(()=>({locale:e,mapboxToken:t,enforceDownloadInNewTab:c,resourceCrossOriginMode:p}),[e,t,c,p]),De=reactExports.useMemo(()=>({initialSidebarState:A,appLogo:N,sidebarChevronDownshift:H,expandSidebarNav:Z,hideSidebarNav:X}),[A,N,H,Z,X]),Ue=reactExports.useMemo(()=>({activeTheme:be,setTheme:we,availableThemes:$e}),[be,we,$e]),Je=reactExports.useMemo(()=>({pageLinkBaseUrl:h,currentPageScriptHash:y,onPageChange:g,navSections:$,appPages:E}),[h,y,g,$,E]),Xe=reactExports.useMemo(()=>({isFullScreen:n,setFullScreen:o}),[n,o]),Ke=reactExports.useMemo(()=>({scriptRunState:Ce,scriptRunId:Ie,fragmentIdsThisRun:Ne}),[Ce,Ie,Ne]),ze={formsData:Fe},nt=reactExports.useMemo(()=>({requestDeferredFile:Be}),[Be]);return jsx$1(LibConfigContext.Provider,{value:je,children:jsx$1(SidebarConfigContext.Provider,{value:De,children:jsx$1(ThemeContext.Provider,{value:Ue,children:jsx$1(NavigationContext.Provider,{value:Je,children:jsx$1(DownloadContext.Provider,{value:nt,children:jsx$1(ViewStateContext.Provider,{value:Xe,children:jsx$1(ScriptRunContext.Provider,{value:Ke,children:jsx$1(FormsContext.Provider,{value:ze,children:Ge})})})})})})})})},StreamlitContextProvider$1=reactExports.memo(StreamlitContextProvider);var DialogType=function(n){return n.ABOUT="about",n.CLEAR_CACHE="clearCache",n.CONNECTION_ERROR="connectionError",n.SETTINGS="settings",n.SCRIPT_COMPILE_ERROR="scriptCompileError",n.THEME_CREATOR="themeCreator",n.WARNING="warning",n.DEPLOY_ERROR="deployError",n.DEPLOY_DIALOG="deployDialog",n}({}),LevelContext=reactExports.createContext(0);function ownKeys(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(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys(Object(e),!0).forEach(function(t){_defineProperty(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var Action=styled$1("div",function(n){var o=n.$theme;return _objectSpread({},o.typography.LabelMedium)});Action.displayName="Action";Action.displayName="Action";var Body=styled$1("div",function(n){var o=n.$theme;return _objectSpread({marginBottom:o.sizing.scale600,color:o.colors.contentPrimary},o.typography.ParagraphMedium)});Body.displayName="Body";Body.displayName="Body";var Contents=styled$1("div",function(n){var o=n.$theme;return{marginLeft:o.sizing.scale600,marginTop:o.sizing.scale600,marginRight:o.sizing.scale600,marginBottom:o.sizing.scale600}});Contents.displayName="Contents";Contents.displayName="Contents";var HeaderImage=styled$1("img",function(n){var o=n.$theme;return{borderTopLeftRadius:o.borders.surfaceBorderRadius,borderTopRightRadius:o.borders.surfaceBorderRadius,objectFit:"contain",maxWidth:"100%"}});HeaderImage.displayName="HeaderImage";HeaderImage.displayName="HeaderImage";var Root=styled$1("section",function(n){var o=n.$theme;return{borderLeftWidth:"2px",borderTopWidth:"2px",borderRightWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftColor:o.colors.borderOpaque,borderRightColor:o.colors.borderOpaque,borderTopColor:o.colors.borderOpaque,borderBottomColor:o.colors.borderOpaque,borderTopLeftRadius:o.borders.radius400,borderTopRightRadius:o.borders.radius400,borderBottomLeftRadius:o.borders.radius400,borderBottomRightRadius:o.borders.radius400,backgroundColor:o.colors.backgroundPrimary,overflow:"hidden"}});Root.displayName="Root";Root.displayName="Root";var Thumbnail=styled$1("img",function(n){var o=n.$theme;return _objectSpread(_objectSpread({float:"right",height:o.sizing.scale2400,width:o.sizing.scale2400,objectFit:"cover",borderTopLeftRadius:o.borders.surfaceBorderRadius,borderTopRightRadius:o.borders.surfaceBorderRadius,borderBottomLeftRadius:o.borders.surfaceBorderRadius,borderBottomRightRadius:o.borders.surfaceBorderRadius},expandBorderStyles(o.borders.border200)),{},{margin:"0 0 ".concat(o.sizing.scale500," ").concat(o.sizing.scale500)})});Thumbnail.displayName="Thumbnail";Thumbnail.displayName="Thumbnail";var Title=styled$1("h1",function(n){var o=n.$theme;return _objectSpread(_objectSpread({},o.typography.HeadingSmall),{},{color:o.colors.contentPrimary,marginLeft:0,marginTop:0,marginRight:0,marginBottom:o.sizing.scale500,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0})});Title.displayName="Title";Title.displayName="Title";var _excluded=["children"],_excluded2=["action","children","hasThumbnail","headerImage","thumbnail","title","overrides"];function _extends(){return _extends=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.apply(this,arguments)}function _objectWithoutProperties(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose(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(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 hasThumbnail(n){return!!n.thumbnail}var SemanticTitle=function n(o){var e=o.children,t=_objectWithoutProperties(o,_excluded),c=["","h1","h2","h3","h4","h5","h6"];return reactExports.createElement(LevelContext.Consumer,null,function(p){return reactExports.createElement(Title,_extends({$as:c[p]},t),e)})};function Card(n){var o=n.action,e=n.children,t=n.hasThumbnail,c=n.headerImage,p=n.thumbnail,h=n.title,y=n.overrides,g=_objectWithoutProperties(n,_excluded2),$=y.Action,E=y.Body,A=y.Contents,N=y.HeaderImage,H=y.Root,Z=y.Thumbnail,X=y.Title,be=getOverride($)||Action,we=getOverride(E)||Body,$e=getOverride(A)||Contents,Ce=getOverride(N)||HeaderImage,Ie=getOverride(H)||Root,Ne=getOverride(Z)||Thumbnail,Fe=getOverride(X)||SemanticTitle,Be=typeof c=="string"?{src:c}:c,Ge=t(n);return reactExports.createElement(Ie,_extends({"data-baseweb":"card"},g,getOverrideProps(H)),c&&reactExports.createElement(Ce,_extends({},Be,getOverrideProps(N))),reactExports.createElement($e,getOverrideProps(A),p&&reactExports.createElement(Ne,_extends({src:p},getOverrideProps(Z))),h&&reactExports.createElement(Fe,_extends({$hasThumbnail:Ge},getOverrideProps(X)),h),reactExports.createElement(we,getOverrideProps(E),e),o&&reactExports.createElement(be,getOverrideProps($),o)))}Card.defaultProps={action:null,children:null,hasThumbnail,overrides:{}};const StreamlitLogo="data:image/svg+xml,%3csvg%20width='32'%20height='19'%20viewBox='0%200%2032%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%202'%3e%3cpath%20id='path3858'%20d='M15.998%2011.078L10.3882%208.04522L0.650371%202.78157C0.641482%202.77247%200.623705%202.77248%200.614816%202.77248C0.259259%202.59975%20-0.105186%202.96338%200.0281476%203.32702L4.98994%2016.2698L4.99083%2016.2725C4.99616%2016.2852%205.00061%2016.298%205.00594%2016.3107C5.2095%2016.7934%205.65394%2017.0916%206.1375%2017.2089C6.17839%2017.218%206.20764%2017.2262%206.25673%2017.2362C6.30559%2017.2473%206.37394%2017.2625%206.43261%2017.2671C6.44239%2017.268%206.45128%2017.268%206.46106%2017.2689H6.46817C6.47528%2017.2698%206.48239%2017.2698%206.4895%2017.2707H6.49928C6.5055%2017.2716%206.51261%2017.2716%206.51883%2017.2716H6.53039C6.5375%2017.2725%206.54461%2017.2725%206.55172%2017.2725C12.8348%2017.9731%2019.1763%2017.9731%2025.4593%2017.2725C25.5349%2017.2725%2025.6087%2017.2689%2025.6798%2017.2616C25.7029%2017.2589%2025.7251%2017.2562%2025.7473%2017.2534C25.75%2017.2525%2025.7536%2017.2525%2025.7562%2017.2516C25.7713%2017.2498%2025.7864%2017.2471%2025.8016%2017.2443C25.8238%2017.2416%2025.846%2017.2371%2025.8682%2017.2325C25.9127%2017.2225%2025.9329%2017.2152%2025.9932%2017.194C26.0535%2017.1729%2026.1536%2017.1358%2026.2163%2017.1049C26.279%2017.074%2026.3224%2017.0443%2026.3749%2017.0107C26.4398%2016.9689%2026.5015%2016.9261%2026.5641%2016.8781C26.5911%2016.8569%2026.6096%2016.8434%2026.6291%2016.8243L26.6184%2016.818L15.998%2011.078Z'%20fill='%23FF2B2B'/%3e%3cpath%20id='path5063'%20d='M31.3616%202.78158H31.3527L21.6113%208.04524L27.0265%2016.2935L31.9758%203.32704V3.30886C32.1003%202.92704%2031.7181%202.58158%2031.3616%202.78158Z'%20fill='%237D353B'/%3e%3cpath%20id='path5101'%20d='M16.5171%200.278788C16.2682%20-0.0930318%2015.726%20-0.0930318%2015.486%200.278788L10.3882%208.04518L15.998%2011.0779L26.6291%2016.8242C26.6959%2016.7574%2026.7494%2016.6922%2026.806%2016.6234C26.886%2016.5225%2026.9607%2016.4143%2027.0265%2016.2934L21.6113%208.04518L16.5171%200.278788Z'%20fill='%23BD4043'/%3e%3c/g%3e%3c/svg%3e",Rocket="data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Frame'%3e%3cpath%20id='Vector'%20d='M5.95077%2010.7642L8.09076%2011.6685C8.34683%2011.157%208.61204%2010.6637%208.8864%2010.1887C9.16076%209.71374%209.46256%209.23875%209.79179%208.76376L8.25538%208.46232L5.95077%2010.7642ZM9.84666%2013.0387L12.9743%2016.1352C13.7426%2015.8429%2014.5656%2015.3954%2015.4436%2014.7925C16.3215%2014.1896%2017.1446%2013.5045%2017.9128%2012.7372C19.1931%2011.4584%2020.1946%2010.038%2020.917%208.47602C21.6395%206.91403%2021.955%205.47536%2021.8636%204.16C20.5466%204.06866%2019.1017%204.38379%2017.5287%205.10541C15.9557%205.82703%2014.529%206.82726%2013.2487%208.10608C12.4805%208.87337%2011.7946%209.69547%2011.191%2010.5724C10.5874%2011.4493%2010.1393%2012.2714%209.84666%2013.0387ZM14.7302%2011.2575C14.3096%2010.8373%2014.0992%2010.3212%2014.0992%209.70917C14.0992%209.09716%2014.3096%208.58107%2014.7302%208.16088C15.1509%207.7407%2015.6722%207.53061%2016.2941%207.53061C16.916%207.53061%2017.4373%207.7407%2017.8579%208.16088C18.2786%208.58107%2018.489%209.09716%2018.489%209.70917C18.489%2010.3212%2018.2786%2010.8373%2017.8579%2011.2575C17.4373%2011.6776%2016.916%2011.8877%2016.2941%2011.8877C15.6722%2011.8877%2015.1509%2011.6776%2014.7302%2011.2575ZM15.2515%2020.0539L17.5561%2017.752L17.2543%2016.2175C16.7788%2016.5463%2016.3032%2016.8432%2015.8277%2017.1081C15.3521%2017.373%2014.8583%2017.6333%2014.3461%2017.8891L15.2515%2020.0539ZM23.839%202.15956C24.1865%204.37009%2023.9716%206.52125%2023.1942%208.61304C22.4169%2010.7048%2021.0771%2012.7007%2019.1749%2014.6007L19.7236%2017.3136C19.7967%2017.679%2019.7784%2018.0352%2019.6687%2018.3823C19.559%2018.7294%2019.3761%2019.0309%2019.12%2019.2866L14.5108%2023.8904L12.2061%2018.4919L7.51461%2013.806L2.10974%2011.5041L6.69153%206.90033C6.9476%206.64457%207.25397%206.46188%207.61064%206.35227C7.9673%206.24265%208.32854%206.22438%208.69435%206.29746L11.4105%206.84553C13.3127%204.94556%2015.3064%203.6028%2017.3915%202.81724C19.4767%202.03168%2021.6258%201.81245%2023.839%202.15956ZM4.05769%2017.2862C4.69786%2016.6468%205.47978%2016.3225%206.40346%2016.3134C7.32713%2016.3042%208.10905%2016.6194%208.74922%2017.2588C9.38939%2017.8982%209.70491%2018.6792%209.69576%2019.6018C9.68662%2020.5243%209.36196%2021.3053%208.72179%2021.9448C8.26452%2022.4015%207.50089%2022.7943%206.43089%2023.1231C5.36089%2023.4519%203.88393%2023.7442%202%2024C2.25607%2022.1183%202.54872%2020.6431%202.87795%2019.5744C3.20718%2018.5056%203.60043%2017.7429%204.05769%2017.2862ZM5.62154%2018.8208C5.43863%2019.0035%205.25572%2019.3369%205.07282%2019.821C4.88991%2020.3051%204.76188%2020.7938%204.68872%2021.2871C5.18256%2021.214%205.67183%2021.0907%206.15653%2020.9171C6.64123%2020.7436%206.97504%2020.5655%207.15794%2020.3828C7.37743%2020.1635%207.49632%2019.8986%207.51461%2019.5881C7.5329%2019.2775%207.4323%2019.0126%207.21282%2018.7934C6.99333%2018.5741%206.72812%2018.4691%206.41718%2018.4782C6.10624%2018.4874%205.84102%2018.6015%205.62154%2018.8208Z'%20fill='%23A3A8B8'/%3e%3c/g%3e%3c/svg%3e",Snowflake=""+new URL("../media/snowflake.JU2jBHL8.svg",import.meta.url).href;function DetachedHead(){return{title:"Unable to deploy",body:jsxs(Fragment,{children:[jsx$1("p",{children:"This Git tree is in a detached HEAD state."}),jsx$1("p",{children:"Please commit the latest changes and push to GitHub to continue."})]})}}function ModuleIsNotAdded(n){return{title:"Unable to deploy",body:jsx$1(StreamlitMarkdown$1,{source:`
147
+ Event: ${o}`)}async pingServer(){this.pingRequest=doInitPings(this.args.baseUriPartsList,PING_MINIMUM_RETRY_PERIOD_MS,PING_MAXIMUM_RETRY_PERIOD_MS,this.args.onRetry,this.args.sendClientError,this.args.onHostConfigResp);try{this.uriIndex=await this.pingRequest.promise,this.pingRequest=void 0,this.stepFsm("SERVER_PING_SUCCEEDED")}catch(o){o instanceof PingCancelledError?LOG$5.info("Ping cancelled"):this.stepFsm("FATAL_ERROR",o instanceof Error?o.message:String(o))}finally{this.pingRequest=void 0}}async getSessionTokens(){const o=await this.args.claimHostAuthToken(),e=u("_streamlit_xsrf");this.args.resetHostAuthToken();const t=this.args.getLastSessionId();return[o??e??"PLACEHOLDER_AUTH_TOKEN",...t?[t]:[]]}async connectToWebSocket(){const o=buildWsUri(this.args.baseUriPartsList[this.uriIndex],WEBSOCKET_STREAM_PATH);if(m(this.websocket))throw new Error("Websocket already exists");LOG$5.info("creating WebSocket");const e=await this.getSessionTokens();this.websocket=new WebSocket(o,["streamlit",...e]),this.websocket.binaryType="arraybuffer",this.setConnectionTimeout(o);const t=this.websocket,c=()=>t===this.websocket;this.websocket.addEventListener("message",p=>{c()&&this.handleMessage(p.data).catch(h=>{const y=`Failed to process a Websocket message. ${h}`;LOG$5.error(y),this.stepFsm("FATAL_ERROR",y)})}),this.websocket.addEventListener("open",()=>{c()&&(LOG$5.info("WebSocket onopen"),this.stepFsm("CONNECTION_SUCCEEDED"))}),this.websocket.addEventListener("close",()=>{c()&&(LOG$5.warn("WebSocket onclose"),this.closeConnection(),this.stepFsm("CONNECTION_CLOSED"))}),this.websocket.addEventListener("error",p=>{c()&&(LOG$5.error("Client Error: WebSocket onerror"),this.args.sendClientError("Websocket connection onerror triggered",`Error: ${p}`,"Websocket Connection"),this.closeConnection(),this.stepFsm("CONNECTION_ERROR"))})}setConnectionTimeout(o){if(m(this.wsConnectionTimeout))throw new Error("WS timeout is already set");const e=this.websocket;this.wsConnectionTimeout=globalThis.setTimeout(()=>{if(e===this.websocket){if(d(this.wsConnectionTimeout)){LOG$5.warn("Timeout fired after cancellation");return}if(d(this.websocket)){this.closeConnection(),this.stepFsm("FATAL_ERROR","Null Websocket in setConnectionTimeout");return}this.websocket.readyState===0&&(LOG$5.info(`Client error: ${o} timed out`),this.args.sendClientError("Websocket connection timed out",`${o} timed out`,"Websocket Connection"),this.closeConnection(),this.stepFsm("CONNECTION_TIMED_OUT"))}},WEBSOCKET_TIMEOUT_MS),LOG$5.info(`Set WS timeout ${Number(this.wsConnectionTimeout)}`)}closeConnection(){this.websocket&&(this.websocket.close(),this.websocket=void 0),m(this.wsConnectionTimeout)&&(LOG$5.info(`Clearing WS timeout ${Number(this.wsConnectionTimeout)}`),globalThis.clearTimeout(this.wsConnectionTimeout),this.wsConnectionTimeout=void 0),this.pingRequest&&(this.pingRequest.cancel(),this.pingRequest=void 0)}sendMessage(o){if(!this.websocket)return;const e=BackMsg.create(o),t=BackMsg.encode(e).finish();this.websocket.send(t)}incrementMessageCacheRunCount(o,e){this.cache.incrementRunCount(o,e)}getCachedMessageHashes(){return this.cache.getCachedMessageHashes()}async handleMessage(o){const e=this.nextMessageIndex;this.nextMessageIndex+=1;const t=new Uint8Array(o),c=ForwardMsg.decode(t);for(this.messageQueue[e]=await this.cache.processMessagePayload(c,t);this.lastDispatchedMessageIndex+1 in this.messageQueue;){const p=this.lastDispatchedMessageIndex+1;this.args.onMessage(this.messageQueue[p]),delete this.messageQueue[p],this.lastDispatchedMessageIndex=p}}}const LOG$4=loglevelExports.getLogger("ConnectionManager");class ConnectionManager{constructor(o){this.connectionState=ConnectionState.INITIAL,this.setConnectionState=(e,t)=>{this.connectionState!==e&&(this.connectionState=e,this.props.connectionStateChanged(e)),t&&this.props.onConnectionError(t)},this.showRetryError=(e,t,c)=>{e>=MAX_RETRIES_BEFORE_CLIENT_ERROR&&this.props.onConnectionError(t)},this.props=o,this.connect()}isConnected(){return this.connectionState===ConnectionState.CONNECTED}getBaseUriParts(){if(this.websocketConnection instanceof WebsocketConnection)return this.websocketConnection.getBaseUriParts()}sendMessage(o){this.websocketConnection instanceof WebsocketConnection&&this.isConnected()?this.websocketConnection.sendMessage(o):LOG$4.error(`Cannot send message when server is disconnected: ${o}`)}incrementMessageCacheRunCount(o,e){this.websocketConnection instanceof WebsocketConnection&&this.websocketConnection.incrementMessageCacheRunCount(o,e)}getCachedMessageHashes(){return this.websocketConnection instanceof WebsocketConnection?this.websocketConnection?.getCachedMessageHashes()??[]:[]}checkStaticConnection(){return new URLSearchParams(document.location.search).get("staticAppId")}async connect(){const o=this.checkStaticConnection();if(o)establishStaticConnection(o,this.setConnectionState,this.props.onMessage,this.props.onConnectionError,this.props.endpoints),this.websocketConnection=null;else try{this.websocketConnection=await this.connectToRunningServer()}catch(e){const t=e instanceof Error?e:new Error(`${e}`);LOG$4.error(`Client Error: Websocket connection - ${t.message}`),this.props.sendClientError("Failed to establish websocket connection",t.message,"Connection Manager"),this.setConnectionState(ConnectionState.DISCONNECTED_FOREVER,{message:t.message})}}disconnect(){this.websocketConnection?.disconnect()}connectToRunningServer(){const o=getPossibleBaseUris();return new WebsocketConnection({getLastSessionId:this.props.getLastSessionId,endpoints:this.props.endpoints,baseUriPartsList:o,onMessage:this.props.onMessage,onConnectionStateChange:this.setConnectionState,onRetry:this.showRetryError,claimHostAuthToken:this.props.claimHostAuthToken,resetHostAuthToken:this.props.resetHostAuthToken,sendClientError:this.props.sendClientError,onHostConfigResp:this.props.onHostConfigResp})}}const LOG$3=loglevelExports.getLogger("DefaultStreamlitEndpoints"),MEDIA_ENDPOINT="/media",UPLOAD_FILE_ENDPOINT="/_stcore/upload_file",COMPONENT_ENDPOINT_BASE="/component",BIDI_COMPONENT_ENDPOINT_BASE="/_stcore/bidi-components";class DefaultStreamlitEndpoints{constructor(o){this.getServerUri=o.getServerUri,this.csrfEnabled=o.csrfEnabled,this.sendClientError=o.sendClientError,this.staticConfigUrl=null}setStaticConfigUrl(o){this.staticConfigUrl=o}sendClientErrorToHost(o,e,t,c,p){this.sendClientError(o,e,t,c,p)}async checkSourceUrlResponse(o,e,t){const c=t?`${e} ${t}`:e;try{const p=await fetch(o);p.ok||(LOG$3.error(`Client Error: ${c} source error - ${p.status}`),this.sendClientErrorToHost(e,p.status,p.statusText,o,t))}catch(p){const h=p instanceof Error?p.message:"Unknown Error";LOG$3.error(`Client Error: ${c} fetch error - ${h}`),this.sendClientErrorToHost(e,"Error fetching source",h,o,t)}}buildComponentURL(o,e){return f(this.requireServerUri(),`${COMPONENT_ENDPOINT_BASE}/${o}/${e}`)}buildBidiComponentURL(o,e){return f(this.requireServerUri(),`${BIDI_COMPONENT_ENDPOINT_BASE}/${o}/${e}`)}setFileUploadClientConfig({prefix:o,headers:e}){this.fileUploadClientConfig={prefix:o,headers:e}}buildStaticUrl(o){const t=new URLSearchParams(document.location.search).get("staticAppId");return`${this.staticConfigUrl}/${t}${o}`}buildMediaURL(o){return this.staticConfigUrl&&o.startsWith(MEDIA_ENDPOINT)?this.buildStaticUrl(o):o.startsWith(MEDIA_ENDPOINT)?f(this.requireServerUri(),o):o}buildDownloadUrl(o){if(!o.startsWith(MEDIA_ENDPOINT))return o;const e=window.__streamlit?.DOWNLOAD_ASSETS_BASE_URL;return f(e?parseUriIntoBaseParts(e):this.requireServerUri(),o)}buildFileUploadURL(o){return this.fileUploadClientConfig?s(this.fileUploadClientConfig.prefix,o):o.startsWith(UPLOAD_FILE_ENDPOINT)?f(this.requireServerUri(),o):o}buildAppPageURL(o,e){const t=e.urlPathname,c=e.isDefault?"":t;if(typeof o=="string"&&o.length>0)return`${o}/${c}`;const{port:p,protocol:h}=window.location,{pathname:y,hostname:g}=this.requireServerUri(),$=p?`:${p}`:"",E=y==="/"?"/":`${y}/`;return`${h}//${g}${$}${E}${c}`}async uploadFileUploaderFile(o,e,t,c,p){const h=new FormData,{name:y,webkitRelativePath:g}=e,$=g||y;h.append(y,e,$);const E=this.getAdditionalHeaders(),A=this.buildFileUploadURL(o);try{await this.csrfRequest(A,{signal:p,method:"PUT",data:h,responseType:"text",headers:E,onUploadProgress:c})}catch(N){LOG$3.error(`Client Error: File uploader error on file upload - ${N}`);const H=N instanceof Error?N.message:"Unknown Error";throw this.sendClientErrorToHost("File Uploader","Error uploading file",H,A),N}}getAdditionalHeaders(){let o={};return this.fileUploadClientConfig&&(o={...o,...this.fileUploadClientConfig.headers}),o}async deleteFileAtURL(o,e){const t=this.getAdditionalHeaders(),c=this.buildFileUploadURL(o);try{await this.csrfRequest(c,{method:"DELETE",data:{sessionId:e},headers:t})}catch(p){LOG$3.error(`Client Error: File uploader error on file delete - ${p}`);const h=p instanceof Error?p.message:"Unknown Error";throw this.sendClientErrorToHost("File Uploader","Error deleting file",h,c),p}}requireServerUri(){const o=this.getServerUri();if(m(o))return this.cachedServerUri=o,o;if(m(this.cachedServerUri))return this.cachedServerUri;throw new Error("not connected to a server!")}async csrfRequest(o,e){if(e.url=o,this.csrfEnabled){const c=u("_streamlit_xsrf");m(c)&&(e.headers={"X-Xsrftoken":c,...e.headers||{}},e.withCredentials=!0)}const{default:t}=await __vitePreload(async()=>{const{default:c}=await import("./index.B0yp3bM1.js");return{default:c}},[],import.meta.url);return t.request(e)}}var Ellipses=reactExports.forwardRef(function(n,o){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$C({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},n,{ref:o}),reactExports.createElement("path",{d:"M0 3v2h2V3H0zm3 0v2h2V3H3zm3 0v2h2V3H6z"}))});Ellipses.displayName="Ellipses";var Warning=reactExports.forwardRef(function(n,o){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$C({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},n,{ref:o}),reactExports.createElement("path",{d:"M3.09 0c-.06 0-.1.04-.13.09L.02 6.9c-.02.05-.03.13-.03.19v.81c0 .05.04.09.09.09h6.81c.05 0 .09-.04.09-.09v-.81c0-.05-.01-.14-.03-.19L4.01.09A.142.142 0 003.88 0h-.81zM3 3h1v2H3V3zm0 3h1v1H3V6z"}))});Warning.displayName="Warning";const CONNECTING_LABEL="Connecting",CONNECTING_TOOLTIP_TEXT="Connecting to Streamlit server",CONNECTING_STATIC_TOOLTIP_TEXT="Connecting to static app",ERROR_LABEL="Error",ERROR_TOOLTIP_TEXT="Unable to connect to Streamlit server";function getConnectionStateUI(n){switch(n){case ConnectionState.INITIAL:case ConnectionState.PINGING_SERVER:case ConnectionState.CONNECTING:return{icon:Ellipses,label:CONNECTING_LABEL,tooltip:CONNECTING_TOOLTIP_TEXT};case ConnectionState.CONNECTED:return;case ConnectionState.STATIC_CONNECTING:return{icon:Ellipses,label:CONNECTING_LABEL,tooltip:CONNECTING_STATIC_TOOLTIP_TEXT};case ConnectionState.STATIC_CONNECTED:return;case ConnectionState.DISCONNECTED_FOREVER:default:return{icon:Warning,label:ERROR_LABEL,tooltip:ERROR_TOOLTIP_TEXT}}}const newYearsRunning=""+new URL("../media/fireworks.B4d-_KUe.gif",import.meta.url).href,StyledConnectionStatus=styled("div",{target:"erv3yhi0"})(({theme:n})=>({display:"flex",alignItems:"center",justifyContent:"center",color:n.colors.gray60})),StyledConnectionStatusLabel=styled("label",{target:"erv3yhi1"})(({theme:n})=>({fontSize:n.fontSizes.sm,color:n.colors.gray60,textTransform:"uppercase",marginTop:n.spacing.none,marginRight:n.spacing.lg,marginBottom:n.spacing.none,marginLeft:n.spacing.sm,whiteSpace:"nowrap",maxWidth:n.sizes.appStatusMaxWidth,lineHeight:n.lineHeights.none})),StyledAppStatus=styled("div",{target:"erv3yhi2"})(({theme:n})=>({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:n.radii.md,margin:`0 ${n.spacing.sm} 0 0`,paddingLeft:n.spacing.sm,height:n.sizes.appRunningMen})),StyledAppStatusLabel=styled("label",{target:"erv3yhi3"})(({isPrompt:n,theme:o})=>({fontSize:o.fontSizes.sm,color:n?o.colors.bodyText:o.colors.gray60,textTransform:n?"none":"uppercase",margin:`0 0 0 ${o.spacing.sm}`,whiteSpace:"nowrap",maxWidth:o.sizes.appStatusMaxWidth,borderRadius:n?o.radii.md:void 0})),StyledAppButtonContainer=styled("span",{target:"erv3yhi4"})(({theme:n})=>({marginLeft:n.spacing.md,whiteSpace:"nowrap",color:n.colors.bodyText})),StyledAppRunningIcon=styled("div",{target:"erv3yhi5"})(({isNewYears:n,theme:o})=>({width:n?"2.2rem":o.sizes.appRunningMen,height:n?"2.2rem":o.sizes.appRunningMen,marginRight:`-${o.spacing.sm}`,display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 0.3s ease-in-out",cursor:"wait"})),StyledStatusWidget=styled("div",{target:"erv3yhi6"})({"&.StatusWidget-appear":{opacity:0},"&.StatusWidget-appear-active":{opacity:1,transition:"opacity 200ms ease-out"},"&.StatusWidget-enter":{opacity:0},"&.StatusWidget-enter-active":{opacity:1,transition:"opacity 200ms ease-out"},"&.StatusWidget-exit":{opacity:1},"&.StatusWidget-exit-active":{opacity:0,transition:"opacity 200ms ease-out"}}),StyledShortcutLabel=styled("div",{target:"erv3yhi7"})({"&::first-letter":{textDecoration:"underline"}}),icons=[{component:AccessibleForward,name:"accessible-forward"},{component:AccessibilityNew,name:"accessibility-new"},{component:DirectionsBike,name:"directions-bike"},{component:DirectionsRun,name:"directions-run"},{component:Pool,name:"pool"},{component:Rowing,name:"rowing"}],isNewYears=()=>{const n=new Date,o=n.getMonth(),e=n.getDate();return o===11&&e===31||o===0&&e<=6},DEFAULT_SPEED=200,IconRunning=()=>{const[n,o]=reactExports.useState(0),e=useEmotionTheme(),t=reactExports.useMemo(()=>isNewYears(),[]);reactExports.useEffect(()=>{if(t)return;const h=setInterval(()=>{o(y=>(y+1)%icons.length)},DEFAULT_SPEED);return()=>clearInterval(h)},[t]);const p=icons[n].component;return jsx$1(StyledAppRunningIcon,{isNewYears:t,"aria-label":"Running...",role:"img","data-testid":"stStatusWidgetRunningIcon",children:t?jsx$1("img",{src:newYearsRunning,alt:"New Year's Celebration",style:{width:"100%",height:"100%",objectFit:"contain"},"data-testid":"stStatusWidgetNewYearsIcon"}):jsx$1(p,{color:e.colors.fadedText60,"aria-hidden":"true","data-testid":"stStatusWidgetRunningManIcon",style:{width:e.sizes.appRunningMen,height:e.sizes.appRunningMen}})})},RUNNING_MAN_DISPLAY_DELAY_TIME_MS=500,PromptButton=n=>jsx$1(StyledAppButtonContainer,{children:jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_BUTTON,disabled:n.disabled,containerWidth:!0,onClick:n.onClick,children:n.title})}),StatusWidget=({connectionState:n,scriptRunState:o,rerunScript:e,stopScript:t,allowRunOnSave:c,showScriptChangedActions:p})=>{const[h,y]=reactExports.useState(!1),g=reactExports.useRef(null),$=reactExports.useRef(null),E=useEmotionTheme(),A=()=>{c&&e(!0)},N=(je,De)=>{je==="a"&&!isKeyboardEventFromEditableTarget(De)&&A()},H=n===ConnectionState.CONNECTED,Z=reactExports.useCallback(je=>{$.current!==null&&$.current.setTimeout(()=>{y(!0)},je)},[]),X=()=>{t()},be=()=>{e(!1)};reactExports.useEffect(()=>{g.current===null&&(g.current=new Timer),$.current===null&&($.current=new Timer);const je=g.current,De=g.current;return()=>{je.cancel(),De.cancel()}},[]),reactExports.useEffect(()=>{H&&(o===ScriptRunState.RUNNING||o===ScriptRunState.RERUN_REQUESTED)&&Z(RUNNING_MAN_DISPLAY_DELAY_TIME_MS),o===ScriptRunState.NOT_RUNNING&&y(!1)},[o,Z,H]);const we=()=>{const je=o===ScriptRunState.STOP_REQUESTED;return h?jsxs(StyledAppStatus,{children:[jsx$1(IconRunning,{}),jsx$1(PromptButton,{title:je?"Stopping...":"Stop",disabled:je,onClick:X})]}):jsx$1(Fragment,{})},$e=()=>{const je=o===ScriptRunState.RERUN_REQUESTED;return jsx$1(ReactHotkeys,{keyName:"a",onKeyDown:N,children:jsxs(StyledAppStatus,{children:[jsx$1(DynamicIcon,{size:"lg",iconValue:":material/info:",color:E.colors.fadedText60}),jsx$1(StyledAppStatusLabel,{isPrompt:!0,children:"File change."}),jsx$1(PromptButton,{title:jsx$1(StyledShortcutLabel,{children:"Rerun"}),disabled:je,onClick:be}),c&&jsx$1(PromptButton,{title:jsx$1(StyledShortcutLabel,{children:"Always rerun"}),disabled:je,onClick:A})]})})},Ce=()=>{const je=getConnectionStateUI(n);return je===void 0?null:jsx$1(Tooltip$1,{content:je.tooltip,placement:Placement.BOTTOM,children:jsxs(StyledConnectionStatus,{className:"stConnectionStatus","data-testid":"stConnectionStatus",children:[jsx$1(Icon$2,{size:"sm",content:je.icon}),jsx$1(StyledConnectionStatusLabel,{children:je.label})]})})},Ie=()=>{if(H){if(o===ScriptRunState.RUNNING||o===ScriptRunState.RERUN_REQUESTED)return we();if(p)return $e()}return Ce()},Ne=reactExports.useRef(),Fe=Ne.current;if(Ne.current=Ie(),isNullOrUndefined(Ne.current)&&isNullOrUndefined(Fe))return jsx$1(Fragment,{});let Be,Ge;return notNullOrUndefined(Ne.current)?(Be=!0,Ge=Ne.current):(Be=!1,Ge=Fe),jsx$1(CSSTransition,{appear:!0,in:Be,timeout:200,unmountOnExit:!0,classNames:"StatusWidget",children:jsx$1(StyledStatusWidget,{className:"stStatusWidget","data-testid":"stStatusWidget",children:Ge},"StatusWidget")})},StreamlitContextProvider=({isFullScreen:n,setFullScreen:o,locale:e,mapboxToken:t,enforceDownloadInNewTab:c,resourceCrossOriginMode:p,pageLinkBaseUrl:h,currentPageScriptHash:y,onPageChange:g,navSections:$,appPages:E,initialSidebarState:A,appLogo:N,sidebarChevronDownshift:H,expandSidebarNav:Z,hideSidebarNav:X,activeTheme:be,setTheme:we,availableThemes:$e,scriptRunState:Ce,scriptRunId:Ie,fragmentIdsThisRun:Ne,formsData:Fe,requestDeferredFile:Be,children:Ge})=>{const je=reactExports.useMemo(()=>({locale:e,mapboxToken:t,enforceDownloadInNewTab:c,resourceCrossOriginMode:p}),[e,t,c,p]),De=reactExports.useMemo(()=>({initialSidebarState:A,appLogo:N,sidebarChevronDownshift:H,expandSidebarNav:Z,hideSidebarNav:X}),[A,N,H,Z,X]),Ue=reactExports.useMemo(()=>({activeTheme:be,setTheme:we,availableThemes:$e}),[be,we,$e]),Je=reactExports.useMemo(()=>({pageLinkBaseUrl:h,currentPageScriptHash:y,onPageChange:g,navSections:$,appPages:E}),[h,y,g,$,E]),Xe=reactExports.useMemo(()=>({isFullScreen:n,setFullScreen:o}),[n,o]),Ke=reactExports.useMemo(()=>({scriptRunState:Ce,scriptRunId:Ie,fragmentIdsThisRun:Ne}),[Ce,Ie,Ne]),ze={formsData:Fe},nt=reactExports.useMemo(()=>({requestDeferredFile:Be}),[Be]);return jsx$1(LibConfigContext.Provider,{value:je,children:jsx$1(SidebarConfigContext.Provider,{value:De,children:jsx$1(ThemeContext.Provider,{value:Ue,children:jsx$1(NavigationContext.Provider,{value:Je,children:jsx$1(DownloadContext.Provider,{value:nt,children:jsx$1(ViewStateContext.Provider,{value:Xe,children:jsx$1(ScriptRunContext.Provider,{value:Ke,children:jsx$1(FormsContext.Provider,{value:ze,children:Ge})})})})})})})})},StreamlitContextProvider$1=reactExports.memo(StreamlitContextProvider);var DialogType=function(n){return n.ABOUT="about",n.CLEAR_CACHE="clearCache",n.CONNECTION_ERROR="connectionError",n.SETTINGS="settings",n.SCRIPT_COMPILE_ERROR="scriptCompileError",n.THEME_CREATOR="themeCreator",n.WARNING="warning",n.DEPLOY_ERROR="deployError",n.DEPLOY_DIALOG="deployDialog",n}({}),LevelContext=reactExports.createContext(0);function ownKeys(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(n){for(var o=1;o<arguments.length;o++){var e=arguments[o]!=null?arguments[o]:{};o%2?ownKeys(Object(e),!0).forEach(function(t){_defineProperty(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty(n,o,e){return o in n?Object.defineProperty(n,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[o]=e,n}var Action=styled$1("div",function(n){var o=n.$theme;return _objectSpread({},o.typography.LabelMedium)});Action.displayName="Action";Action.displayName="Action";var Body=styled$1("div",function(n){var o=n.$theme;return _objectSpread({marginBottom:o.sizing.scale600,color:o.colors.contentPrimary},o.typography.ParagraphMedium)});Body.displayName="Body";Body.displayName="Body";var Contents=styled$1("div",function(n){var o=n.$theme;return{marginLeft:o.sizing.scale600,marginTop:o.sizing.scale600,marginRight:o.sizing.scale600,marginBottom:o.sizing.scale600}});Contents.displayName="Contents";Contents.displayName="Contents";var HeaderImage=styled$1("img",function(n){var o=n.$theme;return{borderTopLeftRadius:o.borders.surfaceBorderRadius,borderTopRightRadius:o.borders.surfaceBorderRadius,objectFit:"contain",maxWidth:"100%"}});HeaderImage.displayName="HeaderImage";HeaderImage.displayName="HeaderImage";var Root=styled$1("section",function(n){var o=n.$theme;return{borderLeftWidth:"2px",borderTopWidth:"2px",borderRightWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftColor:o.colors.borderOpaque,borderRightColor:o.colors.borderOpaque,borderTopColor:o.colors.borderOpaque,borderBottomColor:o.colors.borderOpaque,borderTopLeftRadius:o.borders.radius400,borderTopRightRadius:o.borders.radius400,borderBottomLeftRadius:o.borders.radius400,borderBottomRightRadius:o.borders.radius400,backgroundColor:o.colors.backgroundPrimary,overflow:"hidden"}});Root.displayName="Root";Root.displayName="Root";var Thumbnail=styled$1("img",function(n){var o=n.$theme;return _objectSpread(_objectSpread({float:"right",height:o.sizing.scale2400,width:o.sizing.scale2400,objectFit:"cover",borderTopLeftRadius:o.borders.surfaceBorderRadius,borderTopRightRadius:o.borders.surfaceBorderRadius,borderBottomLeftRadius:o.borders.surfaceBorderRadius,borderBottomRightRadius:o.borders.surfaceBorderRadius},expandBorderStyles(o.borders.border200)),{},{margin:"0 0 ".concat(o.sizing.scale500," ").concat(o.sizing.scale500)})});Thumbnail.displayName="Thumbnail";Thumbnail.displayName="Thumbnail";var Title=styled$1("h1",function(n){var o=n.$theme;return _objectSpread(_objectSpread({},o.typography.HeadingSmall),{},{color:o.colors.contentPrimary,marginLeft:0,marginTop:0,marginRight:0,marginBottom:o.sizing.scale500,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0})});Title.displayName="Title";Title.displayName="Title";var _excluded=["children"],_excluded2=["action","children","hasThumbnail","headerImage","thumbnail","title","overrides"];function _extends(){return _extends=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.apply(this,arguments)}function _objectWithoutProperties(n,o){if(n==null)return{};var e=_objectWithoutPropertiesLoose(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(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 hasThumbnail(n){return!!n.thumbnail}var SemanticTitle=function n(o){var e=o.children,t=_objectWithoutProperties(o,_excluded),c=["","h1","h2","h3","h4","h5","h6"];return reactExports.createElement(LevelContext.Consumer,null,function(p){return reactExports.createElement(Title,_extends({$as:c[p]},t),e)})};function Card(n){var o=n.action,e=n.children,t=n.hasThumbnail,c=n.headerImage,p=n.thumbnail,h=n.title,y=n.overrides,g=_objectWithoutProperties(n,_excluded2),$=y.Action,E=y.Body,A=y.Contents,N=y.HeaderImage,H=y.Root,Z=y.Thumbnail,X=y.Title,be=getOverride($)||Action,we=getOverride(E)||Body,$e=getOverride(A)||Contents,Ce=getOverride(N)||HeaderImage,Ie=getOverride(H)||Root,Ne=getOverride(Z)||Thumbnail,Fe=getOverride(X)||SemanticTitle,Be=typeof c=="string"?{src:c}:c,Ge=t(n);return reactExports.createElement(Ie,_extends({"data-baseweb":"card"},g,getOverrideProps(H)),c&&reactExports.createElement(Ce,_extends({},Be,getOverrideProps(N))),reactExports.createElement($e,getOverrideProps(A),p&&reactExports.createElement(Ne,_extends({src:p},getOverrideProps(Z))),h&&reactExports.createElement(Fe,_extends({$hasThumbnail:Ge},getOverrideProps(X)),h),reactExports.createElement(we,getOverrideProps(E),e),o&&reactExports.createElement(be,getOverrideProps($),o)))}Card.defaultProps={action:null,children:null,hasThumbnail,overrides:{}};const StreamlitLogo="data:image/svg+xml,%3csvg%20width='32'%20height='19'%20viewBox='0%200%2032%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%202'%3e%3cpath%20id='path3858'%20d='M15.998%2011.078L10.3882%208.04522L0.650371%202.78157C0.641482%202.77247%200.623705%202.77248%200.614816%202.77248C0.259259%202.59975%20-0.105186%202.96338%200.0281476%203.32702L4.98994%2016.2698L4.99083%2016.2725C4.99616%2016.2852%205.00061%2016.298%205.00594%2016.3107C5.2095%2016.7934%205.65394%2017.0916%206.1375%2017.2089C6.17839%2017.218%206.20764%2017.2262%206.25673%2017.2362C6.30559%2017.2473%206.37394%2017.2625%206.43261%2017.2671C6.44239%2017.268%206.45128%2017.268%206.46106%2017.2689H6.46817C6.47528%2017.2698%206.48239%2017.2698%206.4895%2017.2707H6.49928C6.5055%2017.2716%206.51261%2017.2716%206.51883%2017.2716H6.53039C6.5375%2017.2725%206.54461%2017.2725%206.55172%2017.2725C12.8348%2017.9731%2019.1763%2017.9731%2025.4593%2017.2725C25.5349%2017.2725%2025.6087%2017.2689%2025.6798%2017.2616C25.7029%2017.2589%2025.7251%2017.2562%2025.7473%2017.2534C25.75%2017.2525%2025.7536%2017.2525%2025.7562%2017.2516C25.7713%2017.2498%2025.7864%2017.2471%2025.8016%2017.2443C25.8238%2017.2416%2025.846%2017.2371%2025.8682%2017.2325C25.9127%2017.2225%2025.9329%2017.2152%2025.9932%2017.194C26.0535%2017.1729%2026.1536%2017.1358%2026.2163%2017.1049C26.279%2017.074%2026.3224%2017.0443%2026.3749%2017.0107C26.4398%2016.9689%2026.5015%2016.9261%2026.5641%2016.8781C26.5911%2016.8569%2026.6096%2016.8434%2026.6291%2016.8243L26.6184%2016.818L15.998%2011.078Z'%20fill='%23FF2B2B'/%3e%3cpath%20id='path5063'%20d='M31.3616%202.78158H31.3527L21.6113%208.04524L27.0265%2016.2935L31.9758%203.32704V3.30886C32.1003%202.92704%2031.7181%202.58158%2031.3616%202.78158Z'%20fill='%237D353B'/%3e%3cpath%20id='path5101'%20d='M16.5171%200.278788C16.2682%20-0.0930318%2015.726%20-0.0930318%2015.486%200.278788L10.3882%208.04518L15.998%2011.0779L26.6291%2016.8242C26.6959%2016.7574%2026.7494%2016.6922%2026.806%2016.6234C26.886%2016.5225%2026.9607%2016.4143%2027.0265%2016.2934L21.6113%208.04518L16.5171%200.278788Z'%20fill='%23BD4043'/%3e%3c/g%3e%3c/svg%3e",Rocket="data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Frame'%3e%3cpath%20id='Vector'%20d='M5.95077%2010.7642L8.09076%2011.6685C8.34683%2011.157%208.61204%2010.6637%208.8864%2010.1887C9.16076%209.71374%209.46256%209.23875%209.79179%208.76376L8.25538%208.46232L5.95077%2010.7642ZM9.84666%2013.0387L12.9743%2016.1352C13.7426%2015.8429%2014.5656%2015.3954%2015.4436%2014.7925C16.3215%2014.1896%2017.1446%2013.5045%2017.9128%2012.7372C19.1931%2011.4584%2020.1946%2010.038%2020.917%208.47602C21.6395%206.91403%2021.955%205.47536%2021.8636%204.16C20.5466%204.06866%2019.1017%204.38379%2017.5287%205.10541C15.9557%205.82703%2014.529%206.82726%2013.2487%208.10608C12.4805%208.87337%2011.7946%209.69547%2011.191%2010.5724C10.5874%2011.4493%2010.1393%2012.2714%209.84666%2013.0387ZM14.7302%2011.2575C14.3096%2010.8373%2014.0992%2010.3212%2014.0992%209.70917C14.0992%209.09716%2014.3096%208.58107%2014.7302%208.16088C15.1509%207.7407%2015.6722%207.53061%2016.2941%207.53061C16.916%207.53061%2017.4373%207.7407%2017.8579%208.16088C18.2786%208.58107%2018.489%209.09716%2018.489%209.70917C18.489%2010.3212%2018.2786%2010.8373%2017.8579%2011.2575C17.4373%2011.6776%2016.916%2011.8877%2016.2941%2011.8877C15.6722%2011.8877%2015.1509%2011.6776%2014.7302%2011.2575ZM15.2515%2020.0539L17.5561%2017.752L17.2543%2016.2175C16.7788%2016.5463%2016.3032%2016.8432%2015.8277%2017.1081C15.3521%2017.373%2014.8583%2017.6333%2014.3461%2017.8891L15.2515%2020.0539ZM23.839%202.15956C24.1865%204.37009%2023.9716%206.52125%2023.1942%208.61304C22.4169%2010.7048%2021.0771%2012.7007%2019.1749%2014.6007L19.7236%2017.3136C19.7967%2017.679%2019.7784%2018.0352%2019.6687%2018.3823C19.559%2018.7294%2019.3761%2019.0309%2019.12%2019.2866L14.5108%2023.8904L12.2061%2018.4919L7.51461%2013.806L2.10974%2011.5041L6.69153%206.90033C6.9476%206.64457%207.25397%206.46188%207.61064%206.35227C7.9673%206.24265%208.32854%206.22438%208.69435%206.29746L11.4105%206.84553C13.3127%204.94556%2015.3064%203.6028%2017.3915%202.81724C19.4767%202.03168%2021.6258%201.81245%2023.839%202.15956ZM4.05769%2017.2862C4.69786%2016.6468%205.47978%2016.3225%206.40346%2016.3134C7.32713%2016.3042%208.10905%2016.6194%208.74922%2017.2588C9.38939%2017.8982%209.70491%2018.6792%209.69576%2019.6018C9.68662%2020.5243%209.36196%2021.3053%208.72179%2021.9448C8.26452%2022.4015%207.50089%2022.7943%206.43089%2023.1231C5.36089%2023.4519%203.88393%2023.7442%202%2024C2.25607%2022.1183%202.54872%2020.6431%202.87795%2019.5744C3.20718%2018.5056%203.60043%2017.7429%204.05769%2017.2862ZM5.62154%2018.8208C5.43863%2019.0035%205.25572%2019.3369%205.07282%2019.821C4.88991%2020.3051%204.76188%2020.7938%204.68872%2021.2871C5.18256%2021.214%205.67183%2021.0907%206.15653%2020.9171C6.64123%2020.7436%206.97504%2020.5655%207.15794%2020.3828C7.37743%2020.1635%207.49632%2019.8986%207.51461%2019.5881C7.5329%2019.2775%207.4323%2019.0126%207.21282%2018.7934C6.99333%2018.5741%206.72812%2018.4691%206.41718%2018.4782C6.10624%2018.4874%205.84102%2018.6015%205.62154%2018.8208Z'%20fill='%23A3A8B8'/%3e%3c/g%3e%3c/svg%3e",Snowflake=""+new URL("../media/snowflake.JU2jBHL8.svg",import.meta.url).href;function DetachedHead(){return{title:"Unable to deploy",body:jsxs(Fragment,{children:[jsx$1("p",{children:"This Git tree is in a detached HEAD state."}),jsx$1("p",{children:"Please commit the latest changes and push to GitHub to continue."})]})}}function ModuleIsNotAdded(n){return{title:"Unable to deploy",body:jsx$1(StreamlitMarkdown$1,{source:`
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.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};
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.2"};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=(e,t,c)=>{const p={type:DialogType.DEPLOY_ERROR,title:e,msg:t,onContinue:c,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg};this.openDialog(p)},this.handleThemeMessage=(e,t)=>{const[,c,p]=createPresetThemes(),h=isPresetTheme(this.props.theme.activeTheme);e===c.name&&h?this.props.theme.setTheme(c):e===p.name&&h?this.props.theme.setTheme(p):t&&this.props.theme.setImportedTheme(t)},this.handleConnectionStateChanged=e=>{if(LOG.info(`Connection state changed from ${this.state.connectionState} to ${e}`),e===ConnectionState.CONNECTED){LOG.info("Reconnected to server."),this.state.connectionErrorDismissed&&this.setState({connectionErrorDismissed:!1});const t=this.state.scriptRunState===ScriptRunState.RUNNING,c=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED;!this.sessionInfo.last||t||c||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:e!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.disconnect();this.isInitializingConnectionManager?this.setState({connectionState:e}):reactDomExports.flushSync(()=>{this.setState({connectionState:e})})},this.handleGitInfoChanged=e=>{this.setState({gitInfo:e})},this.handleCustomParentMessage=e=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:e.message}):LOG.error("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=e=>{const t=(c,p,h)=>{const y=c[p];if(y in h)return h[y](c[y]);throw new Error(`Cannot handle ${p} "${y}".`)};try{t(e,"type",{newSession:c=>this.handleNewSession(c),sessionStatusChanged:c=>this.handleSessionStatusChanged(c),sessionEvent:c=>this.handleSessionEvent(c),delta:c=>this.handleDeltaMsg(c,e.metadata),pageConfigChanged:c=>this.handlePageConfigChanged(c),pageInfoChanged:c=>this.handlePageInfoChanged(c),pagesChanged:c=>{},pageNotFound:c=>this.handlePageNotFound(c),gitInfoChanged:c=>this.handleGitInfoChanged(c),scriptFinished:c=>this.handleScriptFinished(c),pageProfile:c=>this.handlePageProfileMsg(c),autoRerun:c=>this.handleAutoRerun(c),fileUrlsResponse:c=>this.uploadClient.onFileURLsResponse(c),deferredFileResponse:c=>this.handleDeferredFileResponse(c),parentMessage:c=>this.handleCustomParentMessage(c),logo:c=>this.handleLogo(c,e.metadata),navigation:c=>this.handleNavigation(c),authRedirect:c=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:c.url}):window.location.href=c.url}})}catch(c){const p=ensureError(c);LOG.error(p),this.showError("Bad message format",{message:p.message})}},this.handleLogo=(e,t)=>{this.setState(c=>({elements:c.elements.appRootWithLogo(e,{activeScriptHash:t.activeScriptHash,scriptRunId:c.scriptRunId})}))},this.handlePageConfigChanged=e=>{const{title:t,favicon:c,layout:p,initialSidebarState:h,menuItems:y}=e;this.appNavigation.handlePageConfigChanged(e),t&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:t}),document.title=t),c&&this.onPageIconChanged(c),p!==this.state.layout&&p!==PageConfig.Layout.LAYOUT_UNSET&&this.setState(g=>({layout:p,userSettings:{...g.userSettings,wideMode:p===PageConfig.Layout.WIDE}})),h!==this.state.initialSidebarState&&h!==PageConfig.SidebarState.SIDEBAR_UNSET&&this.setState(()=>({initialSidebarState:h})),y&&this.setState(g=>(y.clearAboutMd&&(y.aboutSectionMd=""),{menuItems:{...g.menuItems,...y}}))},this.handlePageInfoChanged=e=>{const{queryString:t}=e,c=document.location.pathname+(t?`?${t}`:"");window.history.pushState({},"",c),this.setState({queryParams:t}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:t?`?${t}`:""})},this.onPageNotFound=e=>{const t=e?`You have requested page /${e}, 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:`${t}. Running the app's main page.`})},this.handlePageNotFound=e=>{const{pageName:t}=e;this.maybeSetState(this.appNavigation.handlePageNotFound(t))},this.onPageIconChanged=e=>{handleFavicon(e,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handleNavigation=e=>{this.setState({navigationPosition:e.position}),this.maybeSetState(this.appNavigation.handleNavigation(e))},this.handlePageProfileMsg=e=>{const t=PageProfile.toObject(e),c=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...t,isFragmentRun:!!t.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:c})},this.handleAutoRerun=e=>{const t=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(e.fragmentId,!0)},e.interval*1e3);this.setState(c=>({autoReruns:[...c.autoReruns,t]}))},this.handleSessionStatusChanged=e=>{this.setState(t=>{let{scriptRunState:c}=t,{dialog:p}=t;return e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.STOP_REQUESTED?(c=ScriptRunState.RUNNING,notNullOrUndefined(p)&&p.type===DialogType.SCRIPT_COMPILE_ERROR&&(p=void 0)):!e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&t.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(c=ScriptRunState.NOT_RUNNING),{userSettings:{...t.userSettings,runOnSave:!!e.runOnSave},dialog:p,scriptRunState:c,scriptChangedOnDisk:e.scriptIsRunning?!1:t.scriptChangedOnDisk}})},this.handleSessionEvent=e=>{if(this.sessionEventDispatcher.handleSessionEventMsg(e),e.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const t={type:DialogType.SCRIPT_COMPILE_ERROR,exception:e.scriptCompilationException,onClose:()=>{}};this.maybeShowErrorDialog(t,e.scriptCompilationException?.message??"No message")}else e.type==="scriptChangedOnDisk"&&this.setState({scriptChangedOnDisk:!0})},this.maybeUpdatePageUrl=(e,t,c)=>{const p=this.getBaseUriParts();if(p){let h;window.__streamlit?.MAIN_PAGE_BASE_URL?h=parseUriIntoBaseParts(window.__streamlit.MAIN_PAGE_BASE_URL).pathname:h=p.pathname;const y=extractPageNameFromPathName(document.location.pathname,h);if((y===""?e:y)!==t){const $=c?"":t,E=this.state.queryParams||preserveEmbedQueryParams(),A=E?`?${E}`:"",H=`${h==="/"?"":h}/${$}${A}`;window.history.pushState({},"",H)}}},this.handleNewSession=e=>{const t=e.initialize;if(this.hasStreamlitVersionChanged(t)){window.location.reload();return}this.hasReceivedNewSession=!0,(!this.sessionInfo.isSet||!this.sessionInfo.current.isConnected)&&this.handleInitialization(e);const{appHash:c,currentPageScriptHash:p}=this.state,{scriptRunId:h,name:y,mainScriptPath:g,fragmentIdsThisRun:$,pageScriptHash:E,mainScriptHash:A}=e;if($.length)this.setState({fragmentIdsThisRun:$,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const H=e.config,Z=e.customTheme;this.processThemeInput(Z),this.setState({allowRunOnSave:H.allowRunOnSave,hideTopBar:H.hideTopBar,toolbarMode:H.toolbarMode,latestRunTime:performance.now(),mainScriptHash:A,fragmentIdsThisRun:$}),this.maybeSetState(this.appNavigation.handleNewSession(e)),!this.appNavigation.hasSetDefaultFavicon&&!this.appNavigation.isPageIconSet&&(this.appNavigation.hasSetDefaultFavicon=!0,this.onPageIconChanged("./favicon.png"))}const N=hashString(this.sessionInfo.current.installationId+g);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(N),this.metricsMgr.enqueue("updateReport"),c===N&&p===E?this.setState({scriptRunId:h}):this.clearAppState(N,h,y,A)},this.handleInitialization=e=>{const t=e.initialize,c=e.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(e)),this.metricsMgr.initialize({gatherUsageStats:c.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(t.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:e}=this.state,t=this.appNavigation.findPageByUrlPath(document.location.pathname),c=document.location.toString().includes("#"),p=t?.pageScriptHash===e;isNullOrUndefined(t)||c&&p||this.onPageChange(t.pageScriptHash,void 0,!0)},this.setAndSendTheme=e=>{this.props.theme.setTheme(e),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(e.emotion)})},this.createThemeHash=e=>{if(!e)return"hash_for_undefined_custom_theme";const t=JSON.parse(JSON.stringify(e)),c=sortThemeInputKeys(t);return hashString(JSON.stringify(c))},this.closeDialog=()=>{this.state.dialog?.type===DialogType.CONNECTION_ERROR?this.setState({dialog:void 0,connectionErrorDismissed:!0}):this.setState({dialog:void 0})},this.saveSettings=e=>{const{runOnSave:t}=this.state.userSettings,{runOnSave:c}=e;if(this.setState({userSettings:e}),t!==c&&this.isServerConnected()){const p=new BackMsg({setRunOnSave:c});p.type="setRunOnSave",this.sendBackMsg(p)}},this.handleDeltaMsg=(e,t)=>{this.setState(c=>({elements:c.elements.applyDelta(c.scriptRunId,e,t)}))},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const e=new BackMsg({debugShutdownRuntime:!0});e.type="debugShutdownRuntime",this.sendBackMsg(e)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const e=new BackMsg({debugDisconnectWebsocket:!0});e.type="debugDisconnectWebsocket",this.sendBackMsg(e)}},this.debugClearForwardMsgCache=()=>{isLocalhost()&&this.connectionManager?.websocketConnection?.cache.messages.clear()},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(e=>{clearInterval(e)}),this.setState({autoReruns:[]})},this.rerunScript=(e=!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}),e===!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=(e,t,c)=>{const{elements:p,mainScriptHash:h}=this.state;this.cleanupAutoReruns();const y=this.appNavigation.clearPageElements(p,h),g=new Set(Array.from(y.getElements()).map($=>getElementId($)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(g),void 0,e,void 0,t,c)},this.isAppInReadyState=e=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&e.scriptRunState===ScriptRunState.RUNNING&&e.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(e,t,c,p,h,y)=>{const g=this.getBaseUriParts();if(!g){LOG.error("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:$}=this.state;let E=h??this.getQueryString(),A="";const N={timezone:getTimezone$1(),timezoneOffset:getTimezoneOffset(),locale:getLocaleLanguage(),url:getUrl(),isEmbedded:isEmbed(),colorScheme:this.getThemeColorScheme()};if(c){if(c!==$&&!y){const Z=preserveEmbedQueryParams();E=getQueryString(h,Z),this.setState({queryParams:E}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:E})}}else if($)c=$;else{let Z;window.__streamlit?.MAIN_PAGE_BASE_URL?Z=parseUriIntoBaseParts(window.__streamlit.MAIN_PAGE_BASE_URL).pathname:Z=g.pathname,A=extractPageNameFromPathName(document.location.pathname,Z),c=""}const H=this.connectionManager?.getCachedMessageHashes()??[];this.sendBackMsg(new BackMsg({rerunScript:{queryString:E,widgetStates:e,pageScriptHash:c,pageName:A,fragmentId:t,isAutoRerun:p,cachedMessageHashes:H,contextInfo:N}})),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 e=new BackMsg({stopScript:!0});e.type="stopScript",this.sendBackMsg(e),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const e={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{const e={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(e)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const e=new BackMsg({clearCache:!0});e.type="clearCache",this.sendBackMsg(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const e=new BackMsg({appHeartbeat:!0});e.type="appHeartbeat",this.sendBackMsg(e)}else LOG.error("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=e=>{this.connectionManager?(LOG.info(e),this.connectionManager.sendMessage(e)):LOG.error(`Not connected. Cannot send back message: ${e}`)},this.handleConnectionError=e=>{this.state.connectionErrorDismissed||this.showError("Connection error",e,DialogType.CONNECTION_ERROR)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(e=!0)=>{const t={type:DialogType.SETTINGS,sessionInfo:this.sessionInfo,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},animateModal:e,metricsMgr:this.metricsMgr};this.openDialog(t)},this.aboutCallback=()=>{const{menuItems:e}=this.state,t={type:DialogType.ABOUT,onClose:this.closeDialog,aboutSectionMd:e?.aboutSectionMd};this.openDialog(t)},this.printCallback=()=>{const{scriptRunState:e}=this.state;if(e!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let t;try{const c=getIFrameEnclosingApp(this.embeddingId);c?.contentWindow?t=c.contentWindow.window:t=window}catch{t=window}finally{t||(t=window),t.print()}},this.screencastCallback=()=>{const{scriptName:e}=this.state,{startRecording:t}=this.props.screenCast,c=getScreencastTimestamp();t(`streamlit-${e}-${c}`)},this.handleFullScreen=e=>{this.setState({isFullScreen:e})},this.setLibConfig=e=>{this.setState({libConfig:e})},this.setAppConfig=e=>{this.setState({appConfig:e})},this.addScriptFinishedHandler=e=>{this.setState((t,c)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.concat(e)}))},this.removeScriptFinishedHandler=e=>{this.setState((t,c)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.filter(p=>p!==e)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:e}=this.state,t=e&&e.length>0?e:document.location.search;return t.startsWith("?")?t.substring(1):t},this.getThemeColorScheme=()=>{const{activeTheme:e}=this.props.theme;return hasLightBackgroundColor(e.emotion)?"light":"dark"},this.isInCloudEnvironment=()=>{const{hostMenuItems:e}=this.state;return e&&e?.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=(e,t)=>{const c=this.isServerConnected(),p=this.sessionInfo.isSet;if(c&&p){const h=new BackMsg({fileUrlsRequest:{requestId:e,fileNames:t.map(y=>y.name),sessionId:this.sessionInfo.current.sessionId}});h.type="fileUrlsRequest",this.sendBackMsg(h)}else LOG.warn(`Cannot request file URLs (isServerConnected: ${c}, isSessionInfoSet: ${p})`),this.uploadClient.onFileURLsResponse({responseId:e,errorMsg:"Connection lost. Please wait for the app to reconnect, then try again."})},this.requestDeferredFile=e=>{const t=this.isServerConnected(),c=this.sessionInfo.isSet;if(!t||!c)return Promise.reject(new Error("Not connected to server or session not initialized"));const p=Promise.withResolvers(),h=this.deferredFileListeners.get(e)??new Set,y=$=>{h.delete(y),p.resolve($)};h.add(y),this.deferredFileListeners.set(e,h);const g=new BackMsg({deferredFileRequest:{fileId:e,sessionId:this.sessionInfo.current.sessionId}});return g.type="deferredFileRequest",this.sendBackMsg(g),p.promise},this.handleDeferredFileResponse=e=>{const t=this.deferredFileListeners.get(e.fileId);if(!(!t||t.size===0)){for(const c of Array.from(t))try{c(e)}catch{}this.deferredFileListeners.delete(e.fileId)}},this.handleKeyDown=(e,t)=>{if(!((e==="c"||e==="r")&&isKeyboardEventFromEditableTarget(t)))switch(e){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=e=>{e==="esc"&&this.props.screenCast.stopRecording()},this.hasAppDefinedMenuItems=()=>{const{menuItems:e}=this.state;return!!(e?.aboutSectionMd||e?.getHelpUrl&&!e?.hideGetHelp||e?.reportABugUrl&&!e?.hideReportABug)},this.shouldShowToolbar=(e,t)=>{const c=!isEmbed()||isToolbarDisplayed();let p;return this.state.toolbarMode===Config.ToolbarMode.MINIMAL?p=e.length>0||t.length>0||this.hasAppDefinedMenuItems():p=!0,c&&p},ensureHotkeysFilterConfigured(),enablePatches(),enableMapSet(),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:"",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:e=>this.setState({formsData:e})}),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:e=>{this.setState({inputsDisabled:e})},themeChanged:this.handleThemeMessage,pageChanged:e=>this.onPageChange(e),isOwnerChanged:e=>this.setState({isOwner:e}),fileUploadClientConfigChanged:e=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(e)},hostMenuItemsChanged:e=>{this.setState({hostMenuItems:e})},hostToolbarItemsChanged:e=>{this.setState({hostToolbarItems:e})},hostHideSidebarNavChanged:e=>{this.setState({hostHideSidebarNav:e})},sidebarChevronDownshiftChanged:e=>{this.setState({sidebarChevronDownshift:e})},pageLinkBaseUrlChanged:e=>{this.setState({pageLinkBaseUrl:e})},queryParamsChanged:e=>{this.setState({queryParams:e})},deployedAppMetadataChanged:e=>{this.setState({deployedAppMetadata:e})},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:(e,t,c,p,h)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:e,error:t,message:c,source:p,customComponentName:h})}}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:e=>this.widgetMgr.setFormsWithUploadsInProgress(e),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.DM7vAi8H.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);this.props.theme.addThemes(c,{keepPresetThemes:!1});const p=getCachedTheme(),h=mapCachedThemeToAvailableTheme(p,c);if(h)this.setAndSendTheme(h);else if(c.length>1){const y=c.findIndex(g=>g.name===CUSTOM_THEME_AUTO_NAME);this.setAndSendTheme(c[y])}else this.setAndSendTheme(c[0])}else if(this.props.theme.addThemes([]),t){const c=getCachedTheme(),h=mapCachedThemeToAvailableTheme(c,[lightTheme,darkTheme]);h?this.setAndSendTheme(h):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};