streamlit-nightly 1.41.2.dev20250105__py2.py3-none-any.whl → 1.41.2.dev20250106__py2.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 (70) hide show
  1. streamlit/static/index.html +1 -1
  2. streamlit/static/static/js/{FileDownload.esm.hzusuo1b.js → FileDownload.esm.BfiuyXfu.js} +1 -1
  3. streamlit/static/static/js/{FormClearHelper.YHWCggTS.js → FormClearHelper.BIe6FN2Y.js} +1 -1
  4. streamlit/static/static/js/{Hooks.Bs4Ve5LI.js → Hooks.CHslqKt4.js} +1 -1
  5. streamlit/static/static/js/{InputInstructions.BLn5uLvO.js → InputInstructions.BMT8dg5S.js} +1 -1
  6. streamlit/static/static/js/{ProgressBar.syQAAKS_.js → ProgressBar.VmrIzSqo.js} +1 -1
  7. streamlit/static/static/js/{RenderInPortalIfExists.CH7OWBaV.js → RenderInPortalIfExists.B2NAzO0r.js} +1 -1
  8. streamlit/static/static/js/{Toolbar.BytO0Vjs.js → Toolbar.DbmFapWn.js} +1 -1
  9. streamlit/static/static/js/{base-input.CsYjr-Mv.js → base-input.B1a61Ojd.js} +1 -1
  10. streamlit/static/static/js/{createSuper.DdedKqOK.js → createSuper.DuLZrute.js} +1 -1
  11. streamlit/static/static/js/{data-grid-overlay-editor.HI85rFWc.js → data-grid-overlay-editor.BkcxIt6O.js} +1 -1
  12. streamlit/static/static/js/{downloader.DTiZHQMC.js → downloader.BVrmPJui.js} +1 -1
  13. streamlit/static/static/js/{es6.oT7UuwOI.js → es6.44cVHEXS.js} +2 -2
  14. streamlit/static/static/js/{getPrototypeOf.CfOrwPYw.js → getPrototypeOf.bvOEi7fo.js} +1 -1
  15. streamlit/static/static/js/{iframeResizer.contentWindow.C4V1QE40.js → iframeResizer.contentWindow.Bd3a4rtP.js} +1 -1
  16. streamlit/static/static/js/{index.I1VZoGQK.js → index.0AR3jk4J.js} +1 -1
  17. streamlit/static/static/js/{index.DgYh-jV7.js → index.1fq50cer.js} +1 -1
  18. streamlit/static/static/js/{index.BlDvA0Pm.js → index.3p3iyxFl.js} +1 -1
  19. streamlit/static/static/js/{index.Dq0mtJUi.js → index.3qE-vjOX.js} +6 -6
  20. streamlit/static/static/js/{index.CgwMN8Xv.js → index.6ZeP-L28.js} +1 -1
  21. streamlit/static/static/js/{index.CSkOy9Ie.js → index.75EUE6su.js} +1 -1
  22. streamlit/static/static/js/{index.CWgiCNwz.js → index.8Bq56lcM.js} +1 -1
  23. streamlit/static/static/js/{index.C7m2u1Hi.js → index.BF04V0db.js} +1 -1
  24. streamlit/static/static/js/{index.DKS2m2dW.js → index.BRjwQabs.js} +1 -1
  25. streamlit/static/static/js/{index.DJaNJkBl.js → index.BSgVnwxN.js} +1 -1
  26. streamlit/static/static/js/{index.IkCWa6ie.js → index.B_nF-WE5.js} +1 -1
  27. streamlit/static/static/js/{index.D2jry5bi.js → index.BdfmpndH.js} +1 -1
  28. streamlit/static/static/js/{index.BwNWvULL.js → index.BfjxH33Q.js} +1 -1
  29. streamlit/static/static/js/{index.B00Rrwlo.js → index.C-fIpagH.js} +1 -1
  30. streamlit/static/static/js/{index.CKLsExlx.js → index.C3rcPpxm.js} +1 -1
  31. streamlit/static/static/js/{index.Cd1M1khv.js → index.C9YRT0fo.js} +1 -1
  32. streamlit/static/static/js/{index.U0queCso.js → index.CIMJL36S.js} +1 -1
  33. streamlit/static/static/js/{index.BLsk_Naj.js → index.CgSymxeL.js} +1 -1
  34. streamlit/static/static/js/{index.BE3Oy0-w.js → index.CkxcnfCr.js} +1 -1
  35. streamlit/static/static/js/{index.qDaxAO86.js → index.CmHLY_aM.js} +1 -1
  36. streamlit/static/static/js/{index.DokSVIB2.js → index.CzhhqwJO.js} +1 -1
  37. streamlit/static/static/js/{index.DSToQbfG.js → index.D277ro6Y.js} +1 -1
  38. streamlit/static/static/js/index.D6WGxtqm.js +1 -0
  39. streamlit/static/static/js/{index.BceNwBQ7.js → index.D_cUCQty.js} +1 -1
  40. streamlit/static/static/js/{index.D2sEk90l.js → index.DaJKYvsa.js} +5 -5
  41. streamlit/static/static/js/{index.BtyW8_Lq.js → index.GNEDK2sZ.js} +1 -1
  42. streamlit/static/static/js/{index.wXwVYako.js → index.KOla1gMY.js} +1 -1
  43. streamlit/static/static/js/{index.e2mIXcY7.js → index.KmZ5vhVN.js} +1 -1
  44. streamlit/static/static/js/{index.yge1jSoD.js → index.KnCHOP8N.js} +1 -1
  45. streamlit/static/static/js/{index.Bo90e_Uc.js → index.PqkLl1t0.js} +1 -1
  46. streamlit/static/static/js/{index.cf6LJRuO.js → index.Q2CKSyfz.js} +1 -1
  47. streamlit/static/static/js/{index.Bw-My5yL.js → index.SOQTU-r_.js} +1 -1
  48. streamlit/static/static/js/{index.BFuk3D-a.js → index.WrhWPW-4.js} +1 -1
  49. streamlit/static/static/js/{index.BozobE_y.js → index.dgKFPPrX.js} +1 -1
  50. streamlit/static/static/js/{index.BOcbB1Se.js → index.drbticTq.js} +1 -1
  51. streamlit/static/static/js/{index.D3_j16sc.js → index.lvhOjMEi.js} +1 -1
  52. streamlit/static/static/js/{index.BEtyBSSz.js → index.vp4vsBFK.js} +1 -1
  53. streamlit/static/static/js/{input.BZL_gOdc.js → input.mrdmFJfU.js} +1 -1
  54. streamlit/static/static/js/{memory.DMPJKDWA.js → memory.BjfNr0ig.js} +1 -1
  55. streamlit/static/static/js/{number-overlay-editor.DgxZowLy.js → number-overlay-editor.WosTCRC_.js} +1 -1
  56. streamlit/static/static/js/{sandbox.DUM1HsOb.js → sandbox.oLnJKv78.js} +1 -1
  57. streamlit/static/static/js/{slicedToArray.B6rsNbE6.js → slicedToArray.BzQ82qu6.js} +1 -1
  58. streamlit/static/static/js/{textarea.BEHsDT2-.js → textarea.Da3YV5aR.js} +1 -1
  59. streamlit/static/static/js/{timepicker.D7ARfySh.js → timepicker.BAT5exrW.js} +1 -1
  60. streamlit/static/static/js/{uniqueId.r-l9CNmZ.js → uniqueId.C8z92sBf.js} +1 -1
  61. streamlit/static/static/js/{useBasicWidgetState.yEDDcbjV.js → useBasicWidgetState.CH5oDGQl.js} +1 -1
  62. streamlit/static/static/js/{useOnInputChange.MQgT3jRx.js → useOnInputChange.Bo325HzD.js} +1 -1
  63. streamlit/static/static/js/{withFullScreenWrapper.CkGbHkwr.js → withFullScreenWrapper.C7zDWu4g.js} +1 -1
  64. {streamlit_nightly-1.41.2.dev20250105.dist-info → streamlit_nightly-1.41.2.dev20250106.dist-info}/METADATA +1 -1
  65. {streamlit_nightly-1.41.2.dev20250105.dist-info → streamlit_nightly-1.41.2.dev20250106.dist-info}/RECORD +69 -69
  66. streamlit/static/static/js/index.ln_0INpA.js +0 -1
  67. {streamlit_nightly-1.41.2.dev20250105.data → streamlit_nightly-1.41.2.dev20250106.data}/scripts/streamlit.cmd +0 -0
  68. {streamlit_nightly-1.41.2.dev20250105.dist-info → streamlit_nightly-1.41.2.dev20250106.dist-info}/WHEEL +0 -0
  69. {streamlit_nightly-1.41.2.dev20250105.dist-info → streamlit_nightly-1.41.2.dev20250106.dist-info}/entry_points.txt +0 -0
  70. {streamlit_nightly-1.41.2.dev20250105.dist-info → streamlit_nightly-1.41.2.dev20250106.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.yge1jSoD.js","./RenderInPortalIfExists.CH7OWBaV.js","./index.CgwMN8Xv.js","./index.D2sEk90l.js","./FormClearHelper.YHWCggTS.js","./withFullScreenWrapper.CkGbHkwr.js","./Toolbar.BytO0Vjs.js","./sprintf.C-r3gIuM.js","./createDownloadLinkElement.DZMwyjvU.js","./slicedToArray.B6rsNbE6.js","./getPrototypeOf.CfOrwPYw.js","./createSuper.DdedKqOK.js","./FileDownload.esm.hzusuo1b.js","../css/index.B26BQfSF.css","./index.BLsk_Naj.js","./threshold.skajmqVB.js","./string.Bl9OLDCw.js","./timer.DwZfkapc.js","./index.BEtyBSSz.js","./useBasicWidgetState.yEDDcbjV.js","./_commonjs-dynamic-modules.TDtrdbi3.js","../css/index.CG16XVnL.css","./index.e2mIXcY7.js","./index.CWgiCNwz.js","./index.cf6LJRuO.js","./index.Bo90e_Uc.js","./Hooks.Bs4Ve5LI.js","./index.qDaxAO86.js","./index.I1VZoGQK.js","./index.IkCWa6ie.js","./UploadFileInfo.C-jY39rj.js","./ProgressBar.syQAAKS_.js","./index.BFuk3D-a.js","./InputInstructions.BLn5uLvO.js","./inputUtils.CQWz5UKz.js","./textarea.BEHsDT2-.js","./base-input.CsYjr-Mv.js","./index.B00Rrwlo.js","./index.BwNWvULL.js","./index.BlDvA0Pm.js","./timepicker.D7ARfySh.js","./input.BZL_gOdc.js","./index.ln_0INpA.js","./index.Bw-My5yL.js","./index.Cd1M1khv.js","./index.CSkOy9Ie.js","./index.CKLsExlx.js","./index.DgYh-jV7.js","./index.DJaNJkBl.js","./uniqueId.r-l9CNmZ.js","./useOnInputChange.MQgT3jRx.js","./index.wXwVYako.js","./index.U0queCso.js","./index.D2jry5bi.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.KnCHOP8N.js","./RenderInPortalIfExists.B2NAzO0r.js","./index.6ZeP-L28.js","./index.DaJKYvsa.js","./FormClearHelper.BIe6FN2Y.js","./withFullScreenWrapper.C7zDWu4g.js","./Toolbar.DbmFapWn.js","./sprintf.C-r3gIuM.js","./createDownloadLinkElement.DZMwyjvU.js","./slicedToArray.BzQ82qu6.js","./getPrototypeOf.bvOEi7fo.js","./createSuper.DuLZrute.js","./FileDownload.esm.BfiuyXfu.js","../css/index.B26BQfSF.css","./index.CgSymxeL.js","./threshold.skajmqVB.js","./string.Bl9OLDCw.js","./timer.DwZfkapc.js","./index.vp4vsBFK.js","./useBasicWidgetState.CH5oDGQl.js","./_commonjs-dynamic-modules.TDtrdbi3.js","../css/index.CG16XVnL.css","./index.KmZ5vhVN.js","./index.8Bq56lcM.js","./index.Q2CKSyfz.js","./index.PqkLl1t0.js","./Hooks.CHslqKt4.js","./index.CmHLY_aM.js","./index.0AR3jk4J.js","./index.B_nF-WE5.js","./UploadFileInfo.C-jY39rj.js","./ProgressBar.VmrIzSqo.js","./index.WrhWPW-4.js","./InputInstructions.BMT8dg5S.js","./inputUtils.CQWz5UKz.js","./textarea.Da3YV5aR.js","./base-input.B1a61Ojd.js","./index.C-fIpagH.js","./index.BfjxH33Q.js","./index.3p3iyxFl.js","./timepicker.BAT5exrW.js","./input.mrdmFJfU.js","./index.D6WGxtqm.js","./index.SOQTU-r_.js","./index.C9YRT0fo.js","./index.75EUE6su.js","./index.C3rcPpxm.js","./index.1fq50cer.js","./index.BSgVnwxN.js","./uniqueId.C8z92sBf.js","./useOnInputChange.Bo325HzD.js","./index.KOla1gMY.js","./index.CIMJL36S.js","./index.BdfmpndH.js"])))=>i.map(i=>d[i]);
2
2
  var sr=Object.defineProperty;var Wn=tt=>{throw TypeError(tt)};var ur=(tt,nt,et)=>nt in tt?sr(tt,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):tt[nt]=et;var T1=(tt,nt,et)=>ur(tt,typeof nt!="symbol"?nt+"":nt,et),Rn=(tt,nt,et)=>nt.has(tt)||Wn("Cannot "+et);var _0=(tt,nt,et)=>(Rn(tt,nt,"read from private field"),et?et.call(tt):nt.get(tt)),Q0=(tt,nt,et)=>nt.has(tt)?Wn("Cannot add the same private member more than once"):nt instanceof WeakSet?nt.add(tt):nt.set(tt,et),K0=(tt,nt,et,rt)=>(Rn(tt,nt,"write to private field"),rt?rt.call(tt,et):nt.set(tt,et),et),$0=(tt,nt,et)=>(Rn(tt,nt,"access private method"),et);function _mergeNamespaces(tt,nt){for(var et=0;et<nt.length;et++){const rt=nt[et];if(typeof rt!="string"&&!Array.isArray(rt)){for(const ot in rt)if(ot!=="default"&&!(ot in tt)){const at=Object.getOwnPropertyDescriptor(rt,ot);at&&Object.defineProperty(tt,ot,at.get?at:{enumerable:!0,get:()=>rt[ot]})}}}return Object.freeze(Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"}))}(function(){const nt=document.createElement("link").relList;if(nt&&nt.supports&&nt.supports("modulepreload"))return;for(const ot of document.querySelectorAll('link[rel="modulepreload"]'))rt(ot);new MutationObserver(ot=>{for(const at of ot)if(at.type==="childList")for(const st of at.addedNodes)st.tagName==="LINK"&&st.rel==="modulepreload"&&rt(st)}).observe(document,{childList:!0,subtree:!0});function et(ot){const at={};return ot.integrity&&(at.integrity=ot.integrity),ot.referrerPolicy&&(at.referrerPolicy=ot.referrerPolicy),ot.crossOrigin==="use-credentials"?at.credentials="include":ot.crossOrigin==="anonymous"?at.credentials="omit":at.credentials="same-origin",at}function rt(ot){if(ot.ep)return;ot.ep=!0;const at=et(ot);fetch(ot.href,at)}})();var commonjsGlobal$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(tt){return tt&&tt.__esModule&&Object.prototype.hasOwnProperty.call(tt,"default")?tt.default:tt}function getAugmentedNamespace(tt){if(tt.__esModule)return tt;var nt=tt.default;if(typeof nt=="function"){var et=function rt(){return this instanceof rt?Reflect.construct(nt,arguments,this.constructor):nt.apply(this,arguments)};et.prototype=nt.prototype}else et={};return Object.defineProperty(et,"__esModule",{value:!0}),Object.keys(tt).forEach(function(rt){var ot=Object.getOwnPropertyDescriptor(tt,rt);Object.defineProperty(et,rt,ot.get?ot:{enumerable:!0,get:function(){return tt[rt]}})}),et}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -96,7 +96,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
96
96
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
97
97
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
98
98
  * SOFTWARE.
99
- */var isBrowser$1=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",timeoutDuration=function(){for(var tt=["Edge","Trident","Firefox"],nt=0;nt<tt.length;nt+=1)if(isBrowser$1&&navigator.userAgent.indexOf(tt[nt])>=0)return 1;return 0}();function microtaskDebounce(tt){var nt=!1;return function(){nt||(nt=!0,window.Promise.resolve().then(function(){nt=!1,tt()}))}}function taskDebounce(tt){var nt=!1;return function(){nt||(nt=!0,setTimeout(function(){nt=!1,tt()},timeoutDuration))}}var supportsMicroTasks=isBrowser$1&&window.Promise,debounce$3=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction$4(tt){var nt={};return tt&&nt.toString.call(tt)==="[object Function]"}function getStyleComputedProperty(tt,nt){if(tt.nodeType!==1)return[];var et=tt.ownerDocument.defaultView,rt=et.getComputedStyle(tt,null);return nt?rt[nt]:rt}function getParentNode$1(tt){return tt.nodeName==="HTML"?tt:tt.parentNode||tt.host}function getScrollParent(tt){if(!tt)return document.body;switch(tt.nodeName){case"HTML":case"BODY":return tt.ownerDocument.body;case"#document":return tt.body}var nt=getStyleComputedProperty(tt),et=nt.overflow,rt=nt.overflowX,ot=nt.overflowY;return/(auto|scroll|overlay)/.test(et+ot+rt)?tt:getScrollParent(getParentNode$1(tt))}function getReferenceNode(tt){return tt&&tt.referenceNode?tt.referenceNode:tt}var isIE11=isBrowser$1&&!!(window.MSInputMethodContext&&document.documentMode),isIE10=isBrowser$1&&/MSIE 10/.test(navigator.userAgent);function isIE$1(tt){return tt===11?isIE11:tt===10?isIE10:isIE11||isIE10}function getOffsetParent(tt){if(!tt)return document.documentElement;for(var nt=isIE$1(10)?document.body:null,et=tt.offsetParent||null;et===nt&&tt.nextElementSibling;)et=(tt=tt.nextElementSibling).offsetParent;var rt=et&&et.nodeName;return!rt||rt==="BODY"||rt==="HTML"?tt?tt.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(et.nodeName)!==-1&&getStyleComputedProperty(et,"position")==="static"?getOffsetParent(et):et}function isOffsetContainer(tt){var nt=tt.nodeName;return nt==="BODY"?!1:nt==="HTML"||getOffsetParent(tt.firstElementChild)===tt}function getRoot(tt){return tt.parentNode!==null?getRoot(tt.parentNode):tt}function findCommonOffsetParent(tt,nt){if(!tt||!tt.nodeType||!nt||!nt.nodeType)return document.documentElement;var et=tt.compareDocumentPosition(nt)&Node.DOCUMENT_POSITION_FOLLOWING,rt=et?tt:nt,ot=et?nt:tt,at=document.createRange();at.setStart(rt,0),at.setEnd(ot,0);var st=at.commonAncestorContainer;if(tt!==st&&nt!==st||rt.contains(ot))return isOffsetContainer(st)?st:getOffsetParent(st);var ut=getRoot(tt);return ut.host?findCommonOffsetParent(ut.host,nt):findCommonOffsetParent(tt,getRoot(nt).host)}function getScroll(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",et=nt==="top"?"scrollTop":"scrollLeft",rt=tt.nodeName;if(rt==="BODY"||rt==="HTML"){var ot=tt.ownerDocument.documentElement,at=tt.ownerDocument.scrollingElement||ot;return at[et]}return tt[et]}function includeScroll(tt,nt){var et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,rt=getScroll(nt,"top"),ot=getScroll(nt,"left"),at=et?-1:1;return tt.top+=rt*at,tt.bottom+=rt*at,tt.left+=ot*at,tt.right+=ot*at,tt}function getBordersSize(tt,nt){var et=nt==="x"?"Left":"Top",rt=et==="Left"?"Right":"Bottom";return parseFloat(tt["border"+et+"Width"])+parseFloat(tt["border"+rt+"Width"])}function getSize(tt,nt,et,rt){return Math.max(nt["offset"+tt],nt["scroll"+tt],et["client"+tt],et["offset"+tt],et["scroll"+tt],isIE$1(10)?parseInt(et["offset"+tt])+parseInt(rt["margin"+(tt==="Height"?"Top":"Left")])+parseInt(rt["margin"+(tt==="Height"?"Bottom":"Right")]):0)}function getWindowSizes(tt){var nt=tt.body,et=tt.documentElement,rt=isIE$1(10)&&getComputedStyle(et);return{height:getSize("Height",nt,et,rt),width:getSize("Width",nt,et,rt)}}var classCallCheck=function(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")},createClass$1=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}(),defineProperty$3=function(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt},_extends$K=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function getClientRect(tt){return _extends$K({},tt,{right:tt.left+tt.width,bottom:tt.top+tt.height})}function getBoundingClientRect(tt){var nt={};try{if(isIE$1(10)){nt=tt.getBoundingClientRect();var et=getScroll(tt,"top"),rt=getScroll(tt,"left");nt.top+=et,nt.left+=rt,nt.bottom+=et,nt.right+=rt}else nt=tt.getBoundingClientRect()}catch{}var ot={left:nt.left,top:nt.top,width:nt.right-nt.left,height:nt.bottom-nt.top},at=tt.nodeName==="HTML"?getWindowSizes(tt.ownerDocument):{},st=at.width||tt.clientWidth||ot.width,ut=at.height||tt.clientHeight||ot.height,ct=tt.offsetWidth-st,pt=tt.offsetHeight-ut;if(ct||pt){var dt=getStyleComputedProperty(tt);ct-=getBordersSize(dt,"x"),pt-=getBordersSize(dt,"y"),ot.width-=ct,ot.height-=pt}return getClientRect(ot)}function getOffsetRectRelativeToArbitraryNode(tt,nt){var et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,rt=isIE$1(10),ot=nt.nodeName==="HTML",at=getBoundingClientRect(tt),st=getBoundingClientRect(nt),ut=getScrollParent(tt),ct=getStyleComputedProperty(nt),pt=parseFloat(ct.borderTopWidth),dt=parseFloat(ct.borderLeftWidth);et&&ot&&(st.top=Math.max(st.top,0),st.left=Math.max(st.left,0));var ft=getClientRect({top:at.top-st.top-pt,left:at.left-st.left-dt,width:at.width,height:at.height});if(ft.marginTop=0,ft.marginLeft=0,!rt&&ot){var bt=parseFloat(ct.marginTop),ht=parseFloat(ct.marginLeft);ft.top-=pt-bt,ft.bottom-=pt-bt,ft.left-=dt-ht,ft.right-=dt-ht,ft.marginTop=bt,ft.marginLeft=ht}return(rt&&!et?nt.contains(ut):nt===ut&&ut.nodeName!=="BODY")&&(ft=includeScroll(ft,nt)),ft}function getViewportOffsetRectRelativeToArtbitraryNode(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=tt.ownerDocument.documentElement,rt=getOffsetRectRelativeToArbitraryNode(tt,et),ot=Math.max(et.clientWidth,window.innerWidth||0),at=Math.max(et.clientHeight,window.innerHeight||0),st=nt?0:getScroll(et),ut=nt?0:getScroll(et,"left"),ct={top:st-rt.top+rt.marginTop,left:ut-rt.left+rt.marginLeft,width:ot,height:at};return getClientRect(ct)}function isFixed$1(tt){var nt=tt.nodeName;if(nt==="BODY"||nt==="HTML")return!1;if(getStyleComputedProperty(tt,"position")==="fixed")return!0;var et=getParentNode$1(tt);return et?isFixed$1(et):!1}function getFixedPositionOffsetParent(tt){if(!tt||!tt.parentElement||isIE$1())return document.documentElement;for(var nt=tt.parentElement;nt&&getStyleComputedProperty(nt,"transform")==="none";)nt=nt.parentElement;return nt||document.documentElement}function getBoundaries(tt,nt,et,rt){var ot=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,at={top:0,left:0},st=ot?getFixedPositionOffsetParent(tt):findCommonOffsetParent(tt,getReferenceNode(nt));if(rt==="viewport")at=getViewportOffsetRectRelativeToArtbitraryNode(st,ot);else{var ut=void 0;rt==="scrollParent"?(ut=getScrollParent(getParentNode$1(nt)),ut.nodeName==="BODY"&&(ut=tt.ownerDocument.documentElement)):rt==="window"?ut=tt.ownerDocument.documentElement:ut=rt;var ct=getOffsetRectRelativeToArbitraryNode(ut,st,ot);if(ut.nodeName==="HTML"&&!isFixed$1(st)){var pt=getWindowSizes(tt.ownerDocument),dt=pt.height,ft=pt.width;at.top+=ct.top-ct.marginTop,at.bottom=dt+ct.top,at.left+=ct.left-ct.marginLeft,at.right=ft+ct.left}else at=ct}et=et||0;var bt=typeof et=="number";return at.left+=bt?et:et.left||0,at.top+=bt?et:et.top||0,at.right-=bt?et:et.right||0,at.bottom-=bt?et:et.bottom||0,at}function getArea(tt){var nt=tt.width,et=tt.height;return nt*et}function computeAutoPlacement(tt,nt,et,rt,ot){var at=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(tt.indexOf("auto")===-1)return tt;var st=getBoundaries(et,rt,at,ot),ut={top:{width:st.width,height:nt.top-st.top},right:{width:st.right-nt.right,height:st.height},bottom:{width:st.width,height:st.bottom-nt.bottom},left:{width:nt.left-st.left,height:st.height}},ct=Object.keys(ut).map(function(bt){return _extends$K({key:bt},ut[bt],{area:getArea(ut[bt])})}).sort(function(bt,ht){return ht.area-bt.area}),pt=ct.filter(function(bt){var ht=bt.width,Mt=bt.height;return ht>=et.clientWidth&&Mt>=et.clientHeight}),dt=pt.length>0?pt[0].key:ct[0].key,ft=tt.split("-")[1];return dt+(ft?"-"+ft:"")}function getReferenceOffsets(tt,nt,et){var rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,ot=rt?getFixedPositionOffsetParent(nt):findCommonOffsetParent(nt,getReferenceNode(et));return getOffsetRectRelativeToArbitraryNode(et,ot,rt)}function getOuterSizes(tt){var nt=tt.ownerDocument.defaultView,et=nt.getComputedStyle(tt),rt=parseFloat(et.marginTop||0)+parseFloat(et.marginBottom||0),ot=parseFloat(et.marginLeft||0)+parseFloat(et.marginRight||0),at={width:tt.offsetWidth+ot,height:tt.offsetHeight+rt};return at}function getOppositePlacement(tt){var nt={left:"right",right:"left",bottom:"top",top:"bottom"};return tt.replace(/left|right|bottom|top/g,function(et){return nt[et]})}function getPopperOffsets(tt,nt,et){et=et.split("-")[0];var rt=getOuterSizes(tt),ot={width:rt.width,height:rt.height},at=["right","left"].indexOf(et)!==-1,st=at?"top":"left",ut=at?"left":"top",ct=at?"height":"width",pt=at?"width":"height";return ot[st]=nt[st]+nt[ct]/2-rt[ct]/2,et===ut?ot[ut]=nt[ut]-rt[pt]:ot[ut]=nt[getOppositePlacement(ut)],ot}function find$3(tt,nt){return Array.prototype.find?tt.find(nt):tt.filter(nt)[0]}function findIndex(tt,nt,et){if(Array.prototype.findIndex)return tt.findIndex(function(ot){return ot[nt]===et});var rt=find$3(tt,function(ot){return ot[nt]===et});return tt.indexOf(rt)}function runModifiers(tt,nt,et){var rt=et===void 0?tt:tt.slice(0,findIndex(tt,"name",et));return rt.forEach(function(ot){ot.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var at=ot.function||ot.fn;ot.enabled&&isFunction$4(at)&&(nt.offsets.popper=getClientRect(nt.offsets.popper),nt.offsets.reference=getClientRect(nt.offsets.reference),nt=at(nt,ot))}),nt}function update(){if(!this.state.isDestroyed){var tt={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};tt.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed),tt.placement=computeAutoPlacement(this.options.placement,tt.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),tt.originalPlacement=tt.placement,tt.positionFixed=this.options.positionFixed,tt.offsets.popper=getPopperOffsets(this.popper,tt.offsets.reference,tt.placement),tt.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",tt=runModifiers(this.modifiers,tt),this.state.isCreated?this.options.onUpdate(tt):(this.state.isCreated=!0,this.options.onCreate(tt))}}function isModifierEnabled(tt,nt){return tt.some(function(et){var rt=et.name,ot=et.enabled;return ot&&rt===nt})}function getSupportedPropertyName(tt){for(var nt=[!1,"ms","Webkit","Moz","O"],et=tt.charAt(0).toUpperCase()+tt.slice(1),rt=0;rt<nt.length;rt++){var ot=nt[rt],at=ot?""+ot+et:tt;if(typeof document.body.style[at]<"u")return at}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(tt){var nt=tt.ownerDocument;return nt?nt.defaultView:window}function attachToScrollParents(tt,nt,et,rt){var ot=tt.nodeName==="BODY",at=ot?tt.ownerDocument.defaultView:tt;at.addEventListener(nt,et,{passive:!0}),ot||attachToScrollParents(getScrollParent(at.parentNode),nt,et,rt),rt.push(at)}function setupEventListeners(tt,nt,et,rt){et.updateBound=rt,getWindow(tt).addEventListener("resize",et.updateBound,{passive:!0});var ot=getScrollParent(tt);return attachToScrollParents(ot,"scroll",et.updateBound,et.scrollParents),et.scrollElement=ot,et.eventsEnabled=!0,et}function enableEventListeners(){this.state.eventsEnabled||(this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners(tt,nt){return getWindow(tt).removeEventListener("resize",nt.updateBound),nt.scrollParents.forEach(function(et){et.removeEventListener("scroll",nt.updateBound)}),nt.updateBound=null,nt.scrollParents=[],nt.scrollElement=null,nt.eventsEnabled=!1,nt}function disableEventListeners(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners(this.reference,this.state))}function isNumeric(tt){return tt!==""&&!isNaN(parseFloat(tt))&&isFinite(tt)}function setStyles(tt,nt){Object.keys(nt).forEach(function(et){var rt="";["width","height","top","right","bottom","left"].indexOf(et)!==-1&&isNumeric(nt[et])&&(rt="px"),tt.style[et]=nt[et]+rt})}function setAttributes(tt,nt){Object.keys(nt).forEach(function(et){var rt=nt[et];rt!==!1?tt.setAttribute(et,nt[et]):tt.removeAttribute(et)})}function applyStyle(tt){return setStyles(tt.instance.popper,tt.styles),setAttributes(tt.instance.popper,tt.attributes),tt.arrowElement&&Object.keys(tt.arrowStyles).length&&setStyles(tt.arrowElement,tt.arrowStyles),tt}function applyStyleOnLoad(tt,nt,et,rt,ot){var at=getReferenceOffsets(ot,nt,tt,et.positionFixed),st=computeAutoPlacement(et.placement,at,nt,tt,et.modifiers.flip.boundariesElement,et.modifiers.flip.padding);return nt.setAttribute("x-placement",st),setStyles(nt,{position:et.positionFixed?"fixed":"absolute"}),et}function getRoundedOffsets(tt,nt){var et=tt.offsets,rt=et.popper,ot=et.reference,at=Math.round,st=Math.floor,ut=function(zt){return zt},ct=at(ot.width),pt=at(rt.width),dt=["left","right"].indexOf(tt.placement)!==-1,ft=tt.placement.indexOf("-")!==-1,bt=ct%2===pt%2,ht=ct%2===1&&pt%2===1,Mt=nt?dt||ft||bt?at:st:ut,mt=nt?at:ut;return{left:Mt(ht&&!ft&&nt?rt.left-1:rt.left),top:mt(rt.top),bottom:mt(rt.bottom),right:Mt(rt.right)}}var isFirefox$1=isBrowser$1&&/Firefox/i.test(navigator.userAgent);function computeStyle(tt,nt){var et=nt.x,rt=nt.y,ot=tt.offsets.popper,at=find$3(tt.instance.modifiers,function(vt){return vt.name==="applyStyle"}).gpuAcceleration;at!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var st=at!==void 0?at:nt.gpuAcceleration,ut=getOffsetParent(tt.instance.popper),ct=getBoundingClientRect(ut),pt={position:ot.position},dt=getRoundedOffsets(tt,window.devicePixelRatio<2||!isFirefox$1),ft=et==="bottom"?"top":"bottom",bt=rt==="right"?"left":"right",ht=getSupportedPropertyName("transform"),Mt=void 0,mt=void 0;if(ft==="bottom"?ut.nodeName==="HTML"?mt=-ut.clientHeight+dt.bottom:mt=-ct.height+dt.bottom:mt=dt.top,bt==="right"?ut.nodeName==="HTML"?Mt=-ut.clientWidth+dt.right:Mt=-ct.width+dt.right:Mt=dt.left,st&&ht)pt[ht]="translate3d("+Mt+"px, "+mt+"px, 0)",pt[ft]=0,pt[bt]=0,pt.willChange="transform";else{var Ot=ft==="bottom"?-1:1,zt=bt==="right"?-1:1;pt[ft]=mt*Ot,pt[bt]=Mt*zt,pt.willChange=ft+", "+bt}var yt={"x-placement":tt.placement};return tt.attributes=_extends$K({},yt,tt.attributes),tt.styles=_extends$K({},pt,tt.styles),tt.arrowStyles=_extends$K({},tt.offsets.arrow,tt.arrowStyles),tt}function isModifierRequired(tt,nt,et){var rt=find$3(tt,function(ut){var ct=ut.name;return ct===nt}),ot=!!rt&&tt.some(function(ut){return ut.name===et&&ut.enabled&&ut.order<rt.order});if(!ot){var at="`"+nt+"`",st="`"+et+"`";console.warn(st+" modifier is required by "+at+" modifier in order to work, be sure to include it before "+at+"!")}return ot}function arrow(tt,nt){var et;if(!isModifierRequired(tt.instance.modifiers,"arrow","keepTogether"))return tt;var rt=nt.element;if(typeof rt=="string"){if(rt=tt.instance.popper.querySelector(rt),!rt)return tt}else if(!tt.instance.popper.contains(rt))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),tt;var ot=tt.placement.split("-")[0],at=tt.offsets,st=at.popper,ut=at.reference,ct=["left","right"].indexOf(ot)!==-1,pt=ct?"height":"width",dt=ct?"Top":"Left",ft=dt.toLowerCase(),bt=ct?"left":"top",ht=ct?"bottom":"right",Mt=getOuterSizes(rt)[pt];ut[ht]-Mt<st[ft]&&(tt.offsets.popper[ft]-=st[ft]-(ut[ht]-Mt)),ut[ft]+Mt>st[ht]&&(tt.offsets.popper[ft]+=ut[ft]+Mt-st[ht]),tt.offsets.popper=getClientRect(tt.offsets.popper);var mt=ut[ft]+ut[pt]/2-Mt/2,Ot=getStyleComputedProperty(tt.instance.popper),zt=parseFloat(Ot["margin"+dt]),yt=parseFloat(Ot["border"+dt+"Width"]),vt=mt-tt.offsets.popper[ft]-zt-yt;return vt=Math.max(Math.min(st[pt]-Mt,vt),0),tt.arrowElement=rt,tt.offsets.arrow=(et={},defineProperty$3(et,ft,Math.round(vt)),defineProperty$3(et,bt,""),et),tt}function getOppositeVariation(tt){return tt==="end"?"start":tt==="start"?"end":tt}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(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=validPlacements.indexOf(tt),rt=validPlacements.slice(et+1).concat(validPlacements.slice(0,et));return nt?rt.reverse():rt}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip$1(tt,nt){if(isModifierEnabled(tt.instance.modifiers,"inner")||tt.flipped&&tt.placement===tt.originalPlacement)return tt;var et=getBoundaries(tt.instance.popper,tt.instance.reference,nt.padding,nt.boundariesElement,tt.positionFixed),rt=tt.placement.split("-")[0],ot=getOppositePlacement(rt),at=tt.placement.split("-")[1]||"",st=[];switch(nt.behavior){case BEHAVIORS.FLIP:st=[rt,ot];break;case BEHAVIORS.CLOCKWISE:st=clockwise(rt);break;case BEHAVIORS.COUNTERCLOCKWISE:st=clockwise(rt,!0);break;default:st=nt.behavior}return st.forEach(function(ut,ct){if(rt!==ut||st.length===ct+1)return tt;rt=tt.placement.split("-")[0],ot=getOppositePlacement(rt);var pt=tt.offsets.popper,dt=tt.offsets.reference,ft=Math.floor,bt=rt==="left"&&ft(pt.right)>ft(dt.left)||rt==="right"&&ft(pt.left)<ft(dt.right)||rt==="top"&&ft(pt.bottom)>ft(dt.top)||rt==="bottom"&&ft(pt.top)<ft(dt.bottom),ht=ft(pt.left)<ft(et.left),Mt=ft(pt.right)>ft(et.right),mt=ft(pt.top)<ft(et.top),Ot=ft(pt.bottom)>ft(et.bottom),zt=rt==="left"&&ht||rt==="right"&&Mt||rt==="top"&&mt||rt==="bottom"&&Ot,yt=["top","bottom"].indexOf(rt)!==-1,vt=!!nt.flipVariations&&(yt&&at==="start"&&ht||yt&&at==="end"&&Mt||!yt&&at==="start"&&mt||!yt&&at==="end"&&Ot),At=!!nt.flipVariationsByContent&&(yt&&at==="start"&&Mt||yt&&at==="end"&&ht||!yt&&at==="start"&&Ot||!yt&&at==="end"&&mt),St=vt||At;(bt||zt||St)&&(tt.flipped=!0,(bt||zt)&&(rt=st[ct+1]),St&&(at=getOppositeVariation(at)),tt.placement=rt+(at?"-"+at:""),tt.offsets.popper=_extends$K({},tt.offsets.popper,getPopperOffsets(tt.instance.popper,tt.offsets.reference,tt.placement)),tt=runModifiers(tt.instance.modifiers,tt,"flip"))}),tt}function keepTogether(tt){var nt=tt.offsets,et=nt.popper,rt=nt.reference,ot=tt.placement.split("-")[0],at=Math.floor,st=["top","bottom"].indexOf(ot)!==-1,ut=st?"right":"bottom",ct=st?"left":"top",pt=st?"width":"height";return et[ut]<at(rt[ct])&&(tt.offsets.popper[ct]=at(rt[ct])-et[pt]),et[ct]>at(rt[ut])&&(tt.offsets.popper[ct]=at(rt[ut])),tt}function toValue(tt,nt,et,rt){var ot=tt.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),at=+ot[1],st=ot[2];if(!at)return tt;if(st.indexOf("%")===0){var ut=void 0;switch(st){case"%p":ut=et;break;case"%":case"%r":default:ut=rt}var ct=getClientRect(ut);return ct[nt]/100*at}else if(st==="vh"||st==="vw"){var pt=void 0;return st==="vh"?pt=Math.max(document.documentElement.clientHeight,window.innerHeight||0):pt=Math.max(document.documentElement.clientWidth,window.innerWidth||0),pt/100*at}else return at}function parseOffset(tt,nt,et,rt){var ot=[0,0],at=["right","left"].indexOf(rt)!==-1,st=tt.split(/(\+|\-)/).map(function(dt){return dt.trim()}),ut=st.indexOf(find$3(st,function(dt){return dt.search(/,|\s/)!==-1}));st[ut]&&st[ut].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var ct=/\s*,\s*|\s+/,pt=ut!==-1?[st.slice(0,ut).concat([st[ut].split(ct)[0]]),[st[ut].split(ct)[1]].concat(st.slice(ut+1))]:[st];return pt=pt.map(function(dt,ft){var bt=(ft===1?!at:at)?"height":"width",ht=!1;return dt.reduce(function(Mt,mt){return Mt[Mt.length-1]===""&&["+","-"].indexOf(mt)!==-1?(Mt[Mt.length-1]=mt,ht=!0,Mt):ht?(Mt[Mt.length-1]+=mt,ht=!1,Mt):Mt.concat(mt)},[]).map(function(Mt){return toValue(Mt,bt,nt,et)})}),pt.forEach(function(dt,ft){dt.forEach(function(bt,ht){isNumeric(bt)&&(ot[ft]+=bt*(dt[ht-1]==="-"?-1:1))})}),ot}function offset$1(tt,nt){var et=nt.offset,rt=tt.placement,ot=tt.offsets,at=ot.popper,st=ot.reference,ut=rt.split("-")[0],ct=void 0;return isNumeric(+et)?ct=[+et,0]:ct=parseOffset(et,at,st,ut),ut==="left"?(at.top+=ct[0],at.left-=ct[1]):ut==="right"?(at.top+=ct[0],at.left+=ct[1]):ut==="top"?(at.left+=ct[0],at.top-=ct[1]):ut==="bottom"&&(at.left+=ct[0],at.top+=ct[1]),tt.popper=at,tt}function preventOverflow(tt,nt){var et=nt.boundariesElement||getOffsetParent(tt.instance.popper);tt.instance.reference===et&&(et=getOffsetParent(et));var rt=getSupportedPropertyName("transform"),ot=tt.instance.popper.style,at=ot.top,st=ot.left,ut=ot[rt];ot.top="",ot.left="",ot[rt]="";var ct=getBoundaries(tt.instance.popper,tt.instance.reference,nt.padding,et,tt.positionFixed);ot.top=at,ot.left=st,ot[rt]=ut,nt.boundaries=ct;var pt=nt.priority,dt=tt.offsets.popper,ft={primary:function(ht){var Mt=dt[ht];return dt[ht]<ct[ht]&&!nt.escapeWithReference&&(Mt=Math.max(dt[ht],ct[ht])),defineProperty$3({},ht,Mt)},secondary:function(ht){var Mt=ht==="right"?"left":"top",mt=dt[Mt];return dt[ht]>ct[ht]&&!nt.escapeWithReference&&(mt=Math.min(dt[Mt],ct[ht]-(ht==="right"?dt.width:dt.height))),defineProperty$3({},Mt,mt)}};return pt.forEach(function(bt){var ht=["left","top"].indexOf(bt)!==-1?"primary":"secondary";dt=_extends$K({},dt,ft[ht](bt))}),tt.offsets.popper=dt,tt}function shift(tt){var nt=tt.placement,et=nt.split("-")[0],rt=nt.split("-")[1];if(rt){var ot=tt.offsets,at=ot.reference,st=ot.popper,ut=["bottom","top"].indexOf(et)!==-1,ct=ut?"left":"top",pt=ut?"width":"height",dt={start:defineProperty$3({},ct,at[ct]),end:defineProperty$3({},ct,at[ct]+at[pt]-st[pt])};tt.offsets.popper=_extends$K({},st,dt[rt])}return tt}function hide(tt){if(!isModifierRequired(tt.instance.modifiers,"hide","preventOverflow"))return tt;var nt=tt.offsets.reference,et=find$3(tt.instance.modifiers,function(rt){return rt.name==="preventOverflow"}).boundaries;if(nt.bottom<et.top||nt.left>et.right||nt.top>et.bottom||nt.right<et.left){if(tt.hide===!0)return tt;tt.hide=!0,tt.attributes["x-out-of-boundaries"]=""}else{if(tt.hide===!1)return tt;tt.hide=!1,tt.attributes["x-out-of-boundaries"]=!1}return tt}function inner$1(tt){var nt=tt.placement,et=nt.split("-")[0],rt=tt.offsets,ot=rt.popper,at=rt.reference,st=["left","right"].indexOf(et)!==-1,ut=["top","left"].indexOf(et)===-1;return ot[st?"left":"top"]=at[et]-(ut?ot[st?"width":"height"]:0),tt.placement=getOppositePlacement(nt),tt.offsets.popper=getClientRect(ot),tt}var modifiers={shift:{order:100,enabled:!0,fn:shift},offset:{order:200,enabled:!0,fn:offset$1,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$1,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:inner$1},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 tt(){},onUpdate:function tt(){},modifiers},Popper=function(){function tt(nt,et){var rt=this,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};classCallCheck(this,tt),this.scheduleUpdate=function(){return requestAnimationFrame(rt.update)},this.update=debounce$3(this.update.bind(this)),this.options=_extends$K({},tt.Defaults,ot),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=nt&&nt.jquery?nt[0]:nt,this.popper=et&&et.jquery?et[0]:et,this.options.modifiers={},Object.keys(_extends$K({},tt.Defaults.modifiers,ot.modifiers)).forEach(function(st){rt.options.modifiers[st]=_extends$K({},tt.Defaults.modifiers[st]||{},ot.modifiers?ot.modifiers[st]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(st){return _extends$K({name:st},rt.options.modifiers[st])}).sort(function(st,ut){return st.order-ut.order}),this.modifiers.forEach(function(st){st.enabled&&isFunction$4(st.onLoad)&&st.onLoad(rt.reference,rt.popper,rt.options,st,rt.state)}),this.update();var at=this.options.eventsEnabled;at&&this.enableEventListeners(),this.state.eventsEnabled=at}return createClass$1(tt,[{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)}}]),tt}();Popper.Utils=(typeof window<"u"?window:global).PopperUtils;Popper.placements=placements;Popper.Defaults=Defaults;function toPopperPlacement(tt){return tt.replace(/(Top|Left)$/,"-start").replace(/(Right|Bottom)$/,"-end")}function parsePopperOffset(tt){return{top:Math.floor(tt.top||0),left:Math.floor(tt.left||0)}}var TETHER_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"};function _typeof$h(tt){"@babel/helpers - typeof";return _typeof$h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(nt){return typeof nt}:function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt},_typeof$h(tt)}var _excluded$n=["modifiers"];function ownKeys$r(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$q(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$r(Object(et),!0).forEach(function(rt){_defineProperty$v(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$r(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}function _objectWithoutProperties$t(tt,nt){if(tt==null)return{};var et=_objectWithoutPropertiesLoose$r(tt,nt),rt,ot;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(tt);for(ot=0;ot<at.length;ot++)rt=at[ot],!(nt.indexOf(rt)>=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(et[rt]=tt[rt])}return et}function _objectWithoutPropertiesLoose$r(tt,nt){if(tt==null)return{};var et={},rt=Object.keys(tt),ot,at;for(at=0;at<rt.length;at++)ot=rt[at],!(nt.indexOf(ot)>=0)&&(et[ot]=tt[ot]);return et}function _classCallCheck$o(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(tt,nt){for(var et=0;et<nt.length;et++){var rt=nt[et];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(tt,rt.key,rt)}}function _createClass$m(tt,nt,et){return nt&&_defineProperties$e(tt.prototype,nt),Object.defineProperty(tt,"prototype",{writable:!1}),tt}function _inherits$o(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function");tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,writable:!0,configurable:!0}}),Object.defineProperty(tt,"prototype",{writable:!1}),nt&&_setPrototypeOf$f(tt,nt)}function _setPrototypeOf$f(tt,nt){return _setPrototypeOf$f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,ot){return rt.__proto__=ot,rt},_setPrototypeOf$f(tt,nt)}function _createSuper$d(tt){var nt=_isNativeReflectConstruct$d();return function(){var rt=_getPrototypeOf$e(tt),ot;if(nt){var at=_getPrototypeOf$e(this).constructor;ot=Reflect.construct(rt,arguments,at)}else ot=rt.apply(this,arguments);return _possibleConstructorReturn$o(this,ot)}}function _possibleConstructorReturn$o(tt,nt){if(nt&&(_typeof$h(nt)==="object"||typeof nt=="function"))return nt;if(nt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$f(tt)}function _assertThisInitialized$f(tt){if(tt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt}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$e(tt){return _getPrototypeOf$e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},_getPrototypeOf$e(tt)}function _defineProperty$v(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}var Tether=function(tt){_inherits$o(et,tt);var nt=_createSuper$d(et);function et(){var rt;_classCallCheck$o(this,et);for(var ot=arguments.length,at=new Array(ot),st=0;st<ot;st++)at[st]=arguments[st];return rt=nt.call.apply(nt,[this].concat(at)),_defineProperty$v(_assertThisInitialized$f(rt),"popper",void 0),_defineProperty$v(_assertThisInitialized$f(rt),"popperHeight",0),_defineProperty$v(_assertThisInitialized$f(rt),"popperWidth",0),_defineProperty$v(_assertThisInitialized$f(rt),"anchorHeight",0),_defineProperty$v(_assertThisInitialized$f(rt),"anchorWidth",0),_defineProperty$v(_assertThisInitialized$f(rt),"state",{isMounted:!1}),_defineProperty$v(_assertThisInitialized$f(rt),"onPopperUpdate",function(ut){var ct={popper:parsePopperOffset(ut.offsets.popper),arrow:ut.offsets.arrow?parsePopperOffset(ut.offsets.arrow):{top:0,left:0}};rt.props.onPopperUpdate(ct,ut)}),rt}return _createClass$m(et,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(ot,at){if(this.props.anchorRef){var st=this.props.anchorRef.getBoundingClientRect(),ut=st.height,ct=st.width;(this.anchorHeight!==ut||this.anchorWidth!==ct)&&(this.anchorHeight=ut,this.anchorWidth=ct,this.popper&&this.popper.scheduleUpdate())}if(this.props.popperRef){var pt=this.props.popperRef.getBoundingClientRect(),dt=pt.height,ft=pt.width;(this.popperHeight!==dt||this.popperWidth!==ft)&&(this.popperHeight=dt,this.popperWidth=ft,this.popper&&this.popper.scheduleUpdate()),this.state.isMounted!==at.isMounted&&this.props.anchorRef&&this.initializePopper()}}},{key:"componentWillUnmount",value:function(){this.destroyPopover()}},{key:"initializePopper",value:function(){var ot=this.props,at=ot.placement,st=ot.popperOptions,ut=st.modifiers,ct=_objectWithoutProperties$t(st,_excluded$n);!this.props.anchorRef||!this.props.popperRef||(this.popper=new Popper(this.props.anchorRef,this.props.popperRef,_objectSpread$q({placement:toPopperPlacement(at),modifiers:_objectSpread$q({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}},ut)},ct)))}},{key:"destroyPopover",value:function(){this.popper&&(this.popper.destroy(),delete this.popper)}},{key:"render",value:function(){return this.props.children||null}}]),et}(reactExports.Component);_defineProperty$v(Tether,"defaultProps",{anchorRef:null,onPopperUpdate:function tt(){return null},placement:TETHER_PLACEMENT.auto,popperRef:null,popperOptions:{}});var BaseProvider=function tt(nt){var et=nt.children,rt=nt.overrides,ot=nt.theme,at=nt.zIndex;return reactExports.createElement(LayersManager,{zIndex:at,overrides:rt},reactExports.createElement(UIDReset,{prefix:"bui"},reactExports.createElement(ThemeProvider$1,{theme:ot},et)))};function guard(tt,nt,et){return Math.min(Math.max(tt,et),nt)}class ColorError extends Error{constructor(nt){super(`Failed to parse color: "${nt}"`)}}var ColorError$1=ColorError;function parseToRgba(tt){if(typeof tt!="string")throw new ColorError$1(tt);if(tt.trim().toLowerCase()==="transparent")return[0,0,0,0];let nt=tt.trim();nt=namedColorRegex.test(tt)?nameToHex(tt):tt;const et=reducedHexRegex.exec(nt);if(et){const st=Array.from(et).slice(1);return[...st.slice(0,3).map(ut=>parseInt(r(ut,2),16)),parseInt(r(st[3]||"f",2),16)/255]}const rt=hexRegex.exec(nt);if(rt){const st=Array.from(rt).slice(1);return[...st.slice(0,3).map(ut=>parseInt(ut,16)),parseInt(st[3]||"ff",16)/255]}const ot=rgbaRegex.exec(nt);if(ot){const st=Array.from(ot).slice(1);return[...st.slice(0,3).map(ut=>parseInt(ut,10)),parseFloat(st[3]||"1")]}const at=hslaRegex.exec(nt);if(at){const[st,ut,ct,pt]=Array.from(at).slice(1).map(parseFloat);if(guard(0,100,ut)!==ut)throw new ColorError$1(tt);if(guard(0,100,ct)!==ct)throw new ColorError$1(tt);return[...hslToRgb$1(st,ut,ct),Number.isNaN(pt)?1:pt]}throw new ColorError$1(tt)}function hash$1(tt){let nt=5381,et=tt.length;for(;et;)nt=nt*33^tt.charCodeAt(--et);return(nt>>>0)%2341}const colorToInt=tt=>parseInt(tt.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((tt,nt)=>{const et=colorToInt(nt.substring(0,3)),rt=colorToInt(nt.substring(3)).toString(16);let ot="";for(let at=0;at<6-rt.length;at++)ot+="0";return tt[et]=`${ot}${rt}`,tt},{});function nameToHex(tt){const nt=tt.toLowerCase().trim(),et=compressedColorMap[hash$1(nt)];if(!et)throw new ColorError$1(tt);return`#${et}`}const r=(tt,nt)=>Array.from(Array(nt)).map(()=>tt).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=tt=>Math.round(tt*255),hslToRgb$1=(tt,nt,et)=>{let rt=et/100;if(nt===0)return[rt,rt,rt].map(roundColor);const ot=(tt%360+360)%360/60,at=(1-Math.abs(2*rt-1))*(nt/100),st=at*(1-Math.abs(ot%2-1));let ut=0,ct=0,pt=0;ot>=0&&ot<1?(ut=at,ct=st):ot>=1&&ot<2?(ut=st,ct=at):ot>=2&&ot<3?(ct=at,pt=st):ot>=3&&ot<4?(ct=st,pt=at):ot>=4&&ot<5?(ut=st,pt=at):ot>=5&&ot<6&&(ut=at,pt=st);const dt=rt-at/2,ft=ut+dt,bt=ct+dt,ht=pt+dt;return[ft,bt,ht].map(roundColor)};function parseToHsla(tt){const[nt,et,rt,ot]=parseToRgba(tt).map((ft,bt)=>bt===3?ft:ft/255),at=Math.max(nt,et,rt),st=Math.min(nt,et,rt),ut=(at+st)/2;if(at===st)return[0,0,ut,ot];const ct=at-st,pt=ut>.5?ct/(2-at-st):ct/(at+st);return[60*(nt===at?(et-rt)/ct+(et<rt?6:0):et===at?(rt-nt)/ct+2:(nt-et)/ct+4),pt,ut,ot]}function hsla(tt,nt,et,rt){return`hsla(${(tt%360).toFixed()}, ${guard(0,100,nt*100).toFixed()}%, ${guard(0,100,et*100).toFixed()}%, ${parseFloat(guard(0,1,rt).toFixed(3))})`}function darken(tt,nt){const[et,rt,ot,at]=parseToHsla(tt);return hsla(et,rt,ot-nt,at)}function getLuminance(tt){if(tt==="transparent")return 0;function nt(at){const st=at/255;return st<=.04045?st/12.92:Math.pow((st+.055)/1.055,2.4)}const[et,rt,ot]=parseToRgba(tt);return .2126*nt(et)+.7152*nt(rt)+.0722*nt(ot)}function rgba$1(tt,nt,et,rt){return`rgba(${guard(0,255,tt).toFixed()}, ${guard(0,255,nt).toFixed()}, ${guard(0,255,et).toFixed()}, ${parseFloat(guard(0,1,rt).toFixed(3))})`}function mix$1(tt,nt,et){const rt=(St,Et)=>Et===3?St:St/255,[ot,at,st,ut]=parseToRgba(tt).map(rt),[ct,pt,dt,ft]=parseToRgba(nt).map(rt),bt=ft-ut,ht=et*2-1,mt=((ht*bt===-1?ht:ht+bt/(1+ht*bt))+1)/2,Ot=1-mt,zt=(ot*Ot+ct*mt)*255,yt=(at*Ot+pt*mt)*255,vt=(st*Ot+dt*mt)*255,At=ft*et+ut*(1-et);return rgba$1(zt,yt,vt,At)}function lighten(tt,nt){return darken(tt,-nt)}function transparentize(tt,nt){const[et,rt,ot,at]=parseToRgba(tt);return rgba$1(et,rt,ot,at-nt)}function toHex(tt){const[nt,et,rt,ot]=parseToRgba(tt);let at=st=>{const ut=guard(0,255,st).toString(16);return ut.length===1?`0${ut}`:ut};return`#${at(nt)}${at(et)}${at(rt)}${ot<1?at(Math.round(ot*255)):""}`}const computeDerivedColors=tt=>{const{bodyText:nt,secondaryBg:et,bgColor:rt}=tt,ot=getLuminance(rt)>.5,at=ot?tt.blue:lighten(tt.blue,.2),st=transparentize(nt,.9),ut=transparentize(nt,.8),ct=transparentize(nt,.7),pt=transparentize(nt,.6),dt=transparentize(nt,.4),ft=ut,bt=st,ht=mix$1(rt,et,.5),Mt=ot?darken(ht,.3):lighten(ht,.6),mt=transparentize(Mt,.75),Ot=transparentize(Mt,.85),zt=lighten(rt,.025);return{linkText:at,fadedText05:st,fadedText10:ut,fadedText20:ct,fadedText40:pt,fadedText60:dt,bgMix:ht,darkenedBgMix100:Mt,darkenedBgMix25:mt,darkenedBgMix15:Ot,lightenedBg05:zt,borderColor:ft,borderColorLight:bt}};function hasLightBackgroundColor(tt){return getLuminance(tt.colors.bgColor)>.5}const createEmotionColors=tt=>{const nt=computeDerivedColors(tt);return{...tt,...nt,codeTextColor:tt.green80,codeHighlightColor:nt.bgMix,metricPositiveDeltaColor:tt.green,metricNegativeDeltaColor:tt.red,metricNeutralDeltaColor:nt.fadedText60,docStringModuleText:tt.bodyText,docStringTypeText:tt.green70,docStringContainerBackground:transparentize(tt.secondaryBg,.6),headingColor:tt.bodyText}};function getDividerColors(tt){const nt=hasLightBackgroundColor(tt),et=nt?tt.colors.blue60:tt.colors.blue90,rt=nt?tt.colors.green60:tt.colors.green90,ot=nt?tt.colors.orange60:tt.colors.orange90,at=nt?tt.colors.red60:tt.colors.red90,st=nt?tt.colors.purple60:tt.colors.purple80,ut=nt?tt.colors.gray40:tt.colors.gray70;return{blue:et,green:rt,orange:ot,red:at,violet:st,gray:ut,grey:ut,rainbow:`linear-gradient(to right, ${at}, ${ot}, ${rt}, ${et}, ${st})`}}function getMarkdownTextColors(tt){const nt=hasLightBackgroundColor(tt),et=nt?tt.colors.red80:tt.colors.red70,rt=nt?tt.colors.orange100:tt.colors.orange60,ot=nt?tt.colors.yellow100:tt.colors.yellow40,at=nt?tt.colors.green90:tt.colors.green60,st=nt?tt.colors.blue80:tt.colors.blue50,ut=nt?tt.colors.purple80:tt.colors.purple50,ct=nt?tt.colors.purple100:tt.colors.purple80,pt=nt?tt.colors.gray80:tt.colors.gray70,dt=tt.colors.primary;return{red:et,orange:rt,yellow:ot,green:at,blue:st,violet:ut,purple:ct,gray:pt,primary:dt}}function getMarkdownBgColors(tt){const nt=hasLightBackgroundColor(tt);return{redbg:transparentize(tt.colors[nt?"red80":"red60"],nt?.9:.7),orangebg:transparentize(tt.colors.yellow70,nt?.9:.7),yellowbg:transparentize(tt.colors[nt?"yellow70":"yellow50"],nt?.9:.7),greenbg:transparentize(tt.colors[nt?"green70":"green60"],nt?.9:.7),bluebg:transparentize(tt.colors[nt?"blue70":"blue60"],nt?.9:.7),violetbg:transparentize(tt.colors[nt?"purple70":"purple60"],nt?.9:.7),purplebg:transparentize(tt.colors[nt?"purple90":"purple80"],nt?.9:.7),graybg:transparentize(tt.colors[nt?"gray70":"gray50"],nt?.9:.7),primarybg:transparentize(tt.colors.primary,nt?.9:.7)}}function getGray70(tt){return hasLightBackgroundColor(tt)?tt.colors.gray70:tt.colors.gray30}function getGray30(tt){return hasLightBackgroundColor(tt)?tt.colors.gray30:tt.colors.gray85}function getGray90(tt){return hasLightBackgroundColor(tt)?tt.colors.gray90:tt.colors.gray10}function getBlue80(tt){return hasLightBackgroundColor(tt)?tt.colors.blue80:tt.colors.blue40}function getBlueArrayAsc(tt){const{colors:nt}=tt;return[nt.blue10,nt.blue20,nt.blue30,nt.blue40,nt.blue50,nt.blue60,nt.blue70,nt.blue80,nt.blue90,nt.blue100]}function getBlueArrayDesc(tt){const{colors:nt}=tt;return[nt.blue100,nt.blue90,nt.blue80,nt.blue70,nt.blue60,nt.blue50,nt.blue40,nt.blue30,nt.blue20,nt.blue10]}function getSequentialColorsArray(tt){return hasLightBackgroundColor(tt)?getBlueArrayAsc(tt):getBlueArrayDesc(tt)}function getDivergingColorsArray(tt){const{colors:nt}=tt;return[nt.red100,nt.red90,nt.red70,nt.red50,nt.red30,nt.blue30,nt.blue50,nt.blue70,nt.blue90,nt.blue100]}function getCategoricalColorsArray(tt){const{colors:nt}=tt;return hasLightBackgroundColor(tt)?[nt.blue80,nt.blue40,nt.red80,nt.red40,nt.blueGreen80,nt.green40,nt.orange80,nt.orange50,nt.purple80,nt.gray40]:[nt.blue40,nt.blue80,nt.red40,nt.red80,nt.green40,nt.blueGreen80,nt.orange50,nt.orange80,nt.purple80,nt.gray40]}function getDecreasingRed(tt){return hasLightBackgroundColor(tt)?tt.colors.red80:tt.colors.red40}function getIncreasingGreen(tt){return hasLightBackgroundColor(tt)?tt.colors.blueGreen80:tt.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",orange100:"#d95a00",yellow10:"#ffffe1",yellow20:"#ffffc2",yellow30:"#ffffa0",yellow40:"#ffff7d",yellow50:"#ffff59",yellow60:"#fff835",yellow70:"#ffe312",yellow80:"#faca2b",yellow90:"#edbb16",yellow100:"#dea816",yellow110:"#916e10",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",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",xxxl:"1.25rem",full:"9999px"},sizes={full:"100%",headerHeight:"3.75rem",fullScreenHeaderHeight:"2.875rem",sidebarTopSpace:"6rem",toastWidth:"21rem",contentMaxWidth:"46rem",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.2rem",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"},spacing$1={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 Pro", sans-serif',monospace:'"Source Code Pro", monospace',serif:'"Source Serif Pro", serif',materialIcons:"Material Symbols Rounded"},genericFonts={bodyFont:fonts.sansSerif,codeFont:fonts.monospace,headingFont:fonts.sansSerif,iconFont:fonts.materialIcons},fontSizeTwoSmall=12,fontSizeSmall=14,fontSizeMedium=16,fontSizes={twoSm:`${fontSizeTwoSmall}px`,sm:`${fontSizeSmall}px`,md:"1rem",mdLg:"1.125rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.75rem",threeXL:"2.25rem",fourXL:"2.75rem",twoSmPx:fontSizeTwoSmall,smPx:fontSizeSmall,mdPx:fontSizeMedium},fontWeights={normal:400,bold:600,extrabold:700},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,popupMenu=balloons+40,fullscreenWrapper=balloons+50,vegaTooltips=fullscreenWrapper+10,tablePortal=fullscreenWrapper+60,cacheSpinner=sidebar+1,toast=bottom+1,zIndices={hide:-1,auto:"auto",base:0,priority:1,sidebar,menuButton,balloons,header,sidebarMobile,popupMenu,fullscreenWrapper,tablePortal,bottom,cacheSpinner,toast,vegaTooltips},requiredThemeColors={bgColor:colors.white,secondaryBg:colors.gray20,bodyText:colors.gray85,warning:colors.yellow110,warningBg:transparentize(colors.yellow80,.8),success:colors.green100,successBg:transparentize(colors.green80,.8),infoBg:transparentize(colors.blue70,.9),info:colors.blue100,danger:colors.red100,dangerBg:transparentize(colors.red70,.8),primary:colors.red70,disabled:colors.gray40,lightestGray:colors.gray20,lightGray:colors.gray30,gray:colors.gray60,darkGray:colors.gray70,red:colors.red80,blue:colors.blue80,green:colors.green80,yellow:colors.yellow80},optionalThemeColors={},themeColors={...colors,...requiredThemeColors,...optionalThemeColors},emotionBaseTheme={inSidebar:!1,breakpoints,colors:createEmotionColors(themeColors),fonts,fontSizes,fontWeights,genericFonts,iconSizes,lineHeights,radii,sizes,spacing:spacing$1,zIndices},genericColors$1={...colors,navTextColor:colors.gray80,navActiveTextColor:colors.gray90,navIconColor:colors.gray60,sidebarControlColor:colors.gray70,warning:"#926C05",warningBg:transparentize(colors.yellow70,.9),successBg:transparentize(colors.green70,.9),danger:colors.red100,dangerBg:transparentize(colors.red80,.91)},emotionLightTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors$1})},genericColors={...colors,bgColor:colors.gray100,secondaryBg:colors.gray90,bodyText:colors.gray10,navTextColor:colors.gray50,navActiveTextColor:colors.gray10,navIconColor:colors.gray70,sidebarControlColor:colors.gray10,warning:colors.yellow20,warningBg:transparentize(colors.yellow70,.8),success:colors.green10,successBg:transparentize(colors.green60,.8),info:colors.blue20,infoBg:transparentize(colors.blue60,.8),danger:colors.red20,dangerBg:transparentize(colors.red60,.8),primary:colors.red70,disabled:colors.gray70},emotionDarkTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors})},createBaseThemePrimitives=(tt,nt)=>{const{colors:et,genericFonts:rt}=nt;return{...tt,primaryFontFamily:rt.bodyFont,primary100:et.primary,primary200:et.primary,primary300:et.primary,primary400:et.primary,primary500:et.primary,primary600:et.primary,primary700:et.primary,mono100:et.bgColor,mono200:et.secondaryBg,mono300:et.lightGray,mono400:et.lightGray,mono500:et.gray,mono600:et.fadedText40,mono700:et.gray,mono800:et.bodyText,mono900:et.bodyText,mono1000:et.black}},createThemeOverrides=tt=>{const{inSidebar:nt,colors:et,genericFonts:rt,fontSizes:ot,lineHeights:at,radii:st}=tt,ut={fontFamily:rt.bodyFont,fontSize:ot.md,fontSizeSm:ot.sm,fontWeight:"normal",lineHeight:at.base,lineHeightTight:at.tight},ct=et.widgetBackgroundColor?et.widgetBackgroundColor:et.secondaryBg,pt=nt?et.secondaryBg:et.bgColor,dt=nt?et.bgColor:et.secondaryBg;return{borders:{radius100:st.default,radius200:st.default,radius300:st.default,radius400:st.default,radius500:st.default,useRoundedCorners:!0,buttonBorderRadiusMini:st.md,buttonBorderRadius:st.default,checkboxBorderRadius:st.md,inputBorderRadiusMini:st.md,inputBorderRadius:st.default,popoverBorderRadius:st.default,surfaceBorderRadius:st.default,tagBorderRadius:st.md},typography:{font100:{},font150:{...ut},font200:{},font250:{},font300:{...ut},font350:{...ut},font400:{...ut},font450:{...ut},font460:{...ut},font470:{...ut},font500:{...ut},font600:{},LabelXSmall:{...ut},LabelSmall:{...ut},LabelMedium:{...ut},LabelLarge:{...ut},ParagraphSmall:{...ut}},colors:{white:et.white,black:et.black,primary:et.primary,primaryA:et.primary,backgroundPrimary:et.bgColor,backgroundSecondary:ct,backgroundTertiary:et.bgColor,borderOpaque:et.darkenedBgMix25,accent:transparentize(et.primary,.5),tagPrimarySolidBackground:et.primary,tagPrimaryFontDisabled:et.fadedText40,tagPrimaryOutlinedDisabled:et.transparent,borderSelected:et.primary,contentPrimary:et.bodyText,inputPlaceholder:et.fadedText60,tickFillDisabled:et.fadedText40,tickMarkFill:et.lightestGray,tickFillSelected:et.primary,datepickerBackground:pt,calendarBackground:pt,calendarForeground:et.bodyText,calendarDayForegroundPseudoSelected:et.bodyText,calendarHeaderBackground:dt,calendarHeaderBackgroundActive:dt,calendarHeaderForeground:et.bodyText,calendarHeaderForegroundDisabled:et.gray40,calendarDayBackgroundSelected:et.primary,calendarDayBackgroundSelectedHighlighted:et.primary,calendarDayForegroundSelected:et.white,calendarDayForegroundSelectedHighlighted:et.white,calendarDayForegroundPseudoSelectedHighlighted:et.bodyText,menuFontHighlighted:et.bodyText,menuFontSelected:et.bodyText,modalCloseColor:et.bodyText,notificationInfoBackground:et.infoBg,notificationInfoText:et.info,notificationPositiveBackground:et.successBg,notificationPositiveText:et.success,notificationWarningBackground:et.warningBg,notificationWarningText:et.warning,notificationNegativeBackground:et.dangerBg,notificationNegativeText:et.danger,progressbarTrackFill:ct,tickFill:et.lightenedBg05,tickMarkFillDisabled:et.lightenedBg05,menuFill:pt,buttonDisabledFill:et.lightenedBg05,tickFillHover:ct,inputFillDisabled:ct,inputFillActive:ct,toggleTrackFillDisabled:ct,tickFillActive:ct,sliderTrackFillDisabled:ct,inputBorder:et.widgetBorderColor||ct,inputFill:ct,inputEnhanceFill:ct,inputEnhancerFillDisabled:ct,buttonDisabledSpinnerBackground:et.gray40,toggleTrackFill:et.gray40,sliderTrackFill:et.gray40,sliderHandleInnerFill:et.gray40,sliderHandleInnerFillDisabled:et.gray40}}},createBaseUiTheme=(tt,nt=primitives)=>createLightTheme(createBaseThemePrimitives(nt,tt),createThemeOverrides(tt)),baseuiLightTheme=createBaseUiTheme(emotionLightTheme,primitives),baseuiDarkTheme=createBaseUiTheme(emotionDarkTheme,primitives$1),globalStyles=tt=>css$2("html{font-size:",tt.fontSizes.mdPx,"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:",tt.genericFonts.bodyFont,";font-weight:",tt.fontWeights.normal,";line-height:",tt.lineHeights.base,";color:",tt.colors.bodyText,";background-color:",tt.colors.bgColor,";-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:",transparentize(tt.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:400;}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;}::-webkit-scrollbar{background:transparent;border-radius:100px;height:6px;width:6px;}::-webkit-scrollbar:active{background:',tt.colors.fadedText10,";}:hover::-webkit-scrollbar-thumb:vertical,:hover::-webkit-scrollbar-thumb:horizontal{background:",tt.colors.fadedText40,";border-radius:100px;}"),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},UPPERCASE=/[\p{Lu}]/u,LOWERCASE=/[\p{Ll}]/u,LEADING_CAPITAL=/^[\p{Lu}](?![\p{Lu}])/gu,IDENTIFIER=/([\p{Alpha}\p{N}_]|$)/u,SEPARATORS=/[_.\- ]+/,LEADING_SEPARATORS=new RegExp("^"+SEPARATORS.source),SEPARATORS_AND_IDENTIFIER=new RegExp(SEPARATORS.source+IDENTIFIER.source,"gu"),NUMBERS_AND_IDENTIFIER=new RegExp("\\d+"+IDENTIFIER.source,"gu"),preserveCamelCase=(tt,nt,et,rt)=>{let ot=!1,at=!1,st=!1,ut=!1;for(let ct=0;ct<tt.length;ct++){const pt=tt[ct];ut=ct>2?tt[ct-3]==="-":!0,ot&&UPPERCASE.test(pt)?(tt=tt.slice(0,ct)+"-"+tt.slice(ct),ot=!1,st=at,at=!0,ct++):at&&st&&LOWERCASE.test(pt)&&(!ut||rt)?(tt=tt.slice(0,ct-1)+"-"+tt.slice(ct-1),st=at,at=!1,ot=!0):(ot=nt(pt)===pt&&et(pt)!==pt,st=at,at=et(pt)===pt&&nt(pt)!==pt)}return tt},preserveConsecutiveUppercase=(tt,nt)=>(LEADING_CAPITAL.lastIndex=0,tt.replace(LEADING_CAPITAL,et=>nt(et))),postProcess=(tt,nt)=>(SEPARATORS_AND_IDENTIFIER.lastIndex=0,NUMBERS_AND_IDENTIFIER.lastIndex=0,tt.replace(SEPARATORS_AND_IDENTIFIER,(et,rt)=>nt(rt)).replace(NUMBERS_AND_IDENTIFIER,et=>nt(et)));function camelCase(tt,nt){if(!(typeof tt=="string"||Array.isArray(tt)))throw new TypeError("Expected the input to be `string | string[]`");if(nt={pascalCase:!1,preserveConsecutiveUppercase:!1,...nt},Array.isArray(tt)?tt=tt.map(at=>at.trim()).filter(at=>at.length).join("-"):tt=tt.trim(),tt.length===0)return"";const et=nt.locale===!1?at=>at.toLowerCase():at=>at.toLocaleLowerCase(nt.locale),rt=nt.locale===!1?at=>at.toUpperCase():at=>at.toLocaleUpperCase(nt.locale);return tt.length===1?SEPARATORS.test(tt)?"":nt.pascalCase?rt(tt):et(tt):(tt!==et(tt)&&(tt=preserveCamelCase(tt,et,rt,nt.preserveConsecutiveUppercase)),tt=tt.replace(LEADING_SEPARATORS,""),tt=nt.preserveConsecutiveUppercase?preserveConsecutiveUppercase(tt,et):et(tt),nt.pascalCase&&(tt=rt(tt.charAt(0))+tt.slice(1)),postProcess(tt,rt))}var ListCache$3=_ListCache;function stackClear$2(){this.__data__=new ListCache$3,this.size=0}var _stackClear=stackClear$2;function stackDelete$2(tt){var nt=this.__data__,et=nt.delete(tt);return this.size=nt.size,et}var _stackDelete=stackDelete$2;function stackGet$2(tt){return this.__data__.get(tt)}var _stackGet=stackGet$2;function stackHas$2(tt){return this.__data__.has(tt)}var _stackHas=stackHas$2,ListCache$2=_ListCache,Map$3=_Map,MapCache$2=_MapCache,LARGE_ARRAY_SIZE$2=200;function stackSet$2(tt,nt){var et=this.__data__;if(et instanceof ListCache$2){var rt=et.__data__;if(!Map$3||rt.length<LARGE_ARRAY_SIZE$2-1)return rt.push([tt,nt]),this.size=++et.size,this;et=this.__data__=new MapCache$2(rt)}return et.set(tt,nt),this.size=et.size,this}var _stackSet=stackSet$2,ListCache$1=_ListCache,stackClear$1=_stackClear,stackDelete$1=_stackDelete,stackGet$1=_stackGet,stackHas$1=_stackHas,stackSet$1=_stackSet;function Stack$5(tt){var nt=this.__data__=new ListCache$1(tt);this.size=nt.size}Stack$5.prototype.clear=stackClear$1;Stack$5.prototype.delete=stackDelete$1;Stack$5.prototype.get=stackGet$1;Stack$5.prototype.has=stackHas$1;Stack$5.prototype.set=stackSet$1;var _Stack=Stack$5;function arrayEach$2(tt,nt){for(var et=-1,rt=tt==null?0:tt.length;++et<rt&&nt(tt[et],et,tt)!==!1;);return tt}var _arrayEach=arrayEach$2,defineProperty$2=_defineProperty$G;function baseAssignValue$6(tt,nt,et){nt=="__proto__"&&defineProperty$2?defineProperty$2(tt,nt,{configurable:!0,enumerable:!0,value:et,writable:!0}):tt[nt]=et}var _baseAssignValue=baseAssignValue$6,baseAssignValue$5=_baseAssignValue,eq$3=eq_1,objectProto$r=Object.prototype,hasOwnProperty$o=objectProto$r.hasOwnProperty;function assignValue$4(tt,nt,et){var rt=tt[nt];(!(hasOwnProperty$o.call(tt,nt)&&eq$3(rt,et))||et===void 0&&!(nt in tt))&&baseAssignValue$5(tt,nt,et)}var _assignValue=assignValue$4,assignValue$3=_assignValue,baseAssignValue$4=_baseAssignValue;function copyObject$7(tt,nt,et,rt){var ot=!et;et||(et={});for(var at=-1,st=nt.length;++at<st;){var ut=nt[at],ct=rt?rt(et[ut],tt[ut],ut,et,tt):void 0;ct===void 0&&(ct=tt[ut]),ot?baseAssignValue$4(et,ut,ct):assignValue$3(et,ut,ct)}return et}var _copyObject=copyObject$7,baseGetTag$5=_baseGetTag,isObjectLike$9=isObjectLike_1,argsTag$6="[object Arguments]";function baseIsArguments$2(tt){return isObjectLike$9(tt)&&baseGetTag$5(tt)==argsTag$6}var _baseIsArguments=baseIsArguments$2,baseIsArguments$1=_baseIsArguments,isObjectLike$8=isObjectLike_1,objectProto$q=Object.prototype,hasOwnProperty$n=objectProto$q.hasOwnProperty,propertyIsEnumerable$3=objectProto$q.propertyIsEnumerable,isArguments$5=baseIsArguments$1(function(){return arguments}())?baseIsArguments$1:function(tt){return isObjectLike$8(tt)&&hasOwnProperty$n.call(tt,"callee")&&!propertyIsEnumerable$3.call(tt,"callee")},isArguments_1=isArguments$5,isBuffer$8={exports:{}};function stubFalse$1(){return!1}var stubFalse_1=stubFalse$1;isBuffer$8.exports;(function(tt,nt){var et=_root,rt=stubFalse_1,ot=nt&&!nt.nodeType&&nt,at=ot&&!0&&tt&&!tt.nodeType&&tt,st=at&&at.exports===ot,ut=st?et.Buffer:void 0,ct=ut?ut.isBuffer:void 0,pt=ct||rt;tt.exports=pt})(isBuffer$8,isBuffer$8.exports);var isBufferExports=isBuffer$8.exports,baseGetTag$4=_baseGetTag,isLength$2=isLength_1,isObjectLike$7=isObjectLike_1,argsTag$5="[object Arguments]",arrayTag$4="[object Array]",boolTag$5="[object Boolean]",dateTag$5="[object Date]",errorTag$4="[object Error]",funcTag$3="[object Function]",mapTag$9="[object Map]",numberTag$5="[object Number]",objectTag$8="[object Object]",regexpTag$5="[object RegExp]",setTag$9="[object Set]",stringTag$6="[object String]",weakMapTag$4="[object WeakMap]",arrayBufferTag$5="[object ArrayBuffer]",dataViewTag$7="[object DataView]",float32Tag$3="[object Float32Array]",float64Tag$3="[object Float64Array]",int8Tag$3="[object Int8Array]",int16Tag$3="[object Int16Array]",int32Tag$3="[object Int32Array]",uint8Tag$3="[object Uint8Array]",uint8ClampedTag$3="[object Uint8ClampedArray]",uint16Tag$3="[object Uint16Array]",uint32Tag$3="[object Uint32Array]",typedArrayTags$1={};typedArrayTags$1[float32Tag$3]=typedArrayTags$1[float64Tag$3]=typedArrayTags$1[int8Tag$3]=typedArrayTags$1[int16Tag$3]=typedArrayTags$1[int32Tag$3]=typedArrayTags$1[uint8Tag$3]=typedArrayTags$1[uint8ClampedTag$3]=typedArrayTags$1[uint16Tag$3]=typedArrayTags$1[uint32Tag$3]=!0;typedArrayTags$1[argsTag$5]=typedArrayTags$1[arrayTag$4]=typedArrayTags$1[arrayBufferTag$5]=typedArrayTags$1[boolTag$5]=typedArrayTags$1[dataViewTag$7]=typedArrayTags$1[dateTag$5]=typedArrayTags$1[errorTag$4]=typedArrayTags$1[funcTag$3]=typedArrayTags$1[mapTag$9]=typedArrayTags$1[numberTag$5]=typedArrayTags$1[objectTag$8]=typedArrayTags$1[regexpTag$5]=typedArrayTags$1[setTag$9]=typedArrayTags$1[stringTag$6]=typedArrayTags$1[weakMapTag$4]=!1;function baseIsTypedArray$2(tt){return isObjectLike$7(tt)&&isLength$2(tt.length)&&!!typedArrayTags$1[baseGetTag$4(tt)]}var _baseIsTypedArray=baseIsTypedArray$2;function baseUnary$6(tt){return function(nt){return tt(nt)}}var _baseUnary=baseUnary$6,_nodeUtil={exports:{}};_nodeUtil.exports;(function(tt,nt){var et=_freeGlobal,rt=nt&&!nt.nodeType&&nt,ot=rt&&!0&&tt&&!tt.nodeType&&tt,at=ot&&ot.exports===rt,st=at&&et.process,ut=function(){try{var ct=ot&&ot.require&&ot.require("util").types;return ct||st&&st.binding&&st.binding("util")}catch{}}();tt.exports=ut})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray$1=_baseIsTypedArray,baseUnary$5=_baseUnary,nodeUtil$3=_nodeUtilExports,nodeIsTypedArray$1=nodeUtil$3&&nodeUtil$3.isTypedArray,isTypedArray$5=nodeIsTypedArray$1?baseUnary$5(nodeIsTypedArray$1):baseIsTypedArray$1,isTypedArray_1=isTypedArray$5,baseTimes$1=_baseTimes,isArguments$4=isArguments_1,isArray$f=isArray_1,isBuffer$7=isBufferExports,isIndex$3=_isIndex,isTypedArray$4=isTypedArray_1,objectProto$p=Object.prototype,hasOwnProperty$m=objectProto$p.hasOwnProperty;function arrayLikeKeys$3(tt,nt){var et=isArray$f(tt),rt=!et&&isArguments$4(tt),ot=!et&&!rt&&isBuffer$7(tt),at=!et&&!rt&&!ot&&isTypedArray$4(tt),st=et||rt||ot||at,ut=st?baseTimes$1(tt.length,String):[],ct=ut.length;for(var pt in tt)(nt||hasOwnProperty$m.call(tt,pt))&&!(st&&(pt=="length"||ot&&(pt=="offset"||pt=="parent")||at&&(pt=="buffer"||pt=="byteLength"||pt=="byteOffset")||isIndex$3(pt,ct)))&&ut.push(pt);return ut}var _arrayLikeKeys=arrayLikeKeys$3,objectProto$o=Object.prototype;function isPrototype$4(tt){var nt=tt&&tt.constructor,et=typeof nt=="function"&&nt.prototype||objectProto$o;return tt===et}var _isPrototype=isPrototype$4;function overArg$3(tt,nt){return function(et){return tt(nt(et))}}var _overArg=overArg$3,overArg$2=_overArg,nativeKeys$2=overArg$2(Object.keys,Object),_nativeKeys=nativeKeys$2,isPrototype$3=_isPrototype,nativeKeys$1=_nativeKeys,objectProto$n=Object.prototype,hasOwnProperty$l=objectProto$n.hasOwnProperty;function baseKeys$2(tt){if(!isPrototype$3(tt))return nativeKeys$1(tt);var nt=[];for(var et in Object(tt))hasOwnProperty$l.call(tt,et)&&et!="constructor"&&nt.push(et);return nt}var _baseKeys=baseKeys$2,arrayLikeKeys$2=_arrayLikeKeys,baseKeys$1=_baseKeys,isArrayLike$5=isArrayLike_1;function keys$9(tt){return isArrayLike$5(tt)?arrayLikeKeys$2(tt):baseKeys$1(tt)}var keys_1=keys$9,copyObject$6=_copyObject,keys$8=keys_1;function baseAssign$1(tt,nt){return tt&&copyObject$6(nt,keys$8(nt),tt)}var _baseAssign=baseAssign$1;function nativeKeysIn$2(tt){var nt=[];if(tt!=null)for(var et in Object(tt))nt.push(et);return nt}var _nativeKeysIn=nativeKeysIn$2,isObject$a=isObject_1,isPrototype$2=_isPrototype,nativeKeysIn$1=_nativeKeysIn,objectProto$m=Object.prototype,hasOwnProperty$k=objectProto$m.hasOwnProperty;function baseKeysIn$2(tt){if(!isObject$a(tt))return nativeKeysIn$1(tt);var nt=isPrototype$2(tt),et=[];for(var rt in tt)rt=="constructor"&&(nt||!hasOwnProperty$k.call(tt,rt))||et.push(rt);return et}var _baseKeysIn=baseKeysIn$2,arrayLikeKeys$1=_arrayLikeKeys,baseKeysIn$1=_baseKeysIn,isArrayLike$4=isArrayLike_1;function keysIn$6(tt){return isArrayLike$4(tt)?arrayLikeKeys$1(tt,!0):baseKeysIn$1(tt)}var keysIn_1=keysIn$6,copyObject$5=_copyObject,keysIn$5=keysIn_1;function baseAssignIn$1(tt,nt){return tt&&copyObject$5(nt,keysIn$5(nt),tt)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};_cloneBuffer.exports;(function(tt,nt){var et=_root,rt=nt&&!nt.nodeType&&nt,ot=rt&&!0&&tt&&!tt.nodeType&&tt,at=ot&&ot.exports===rt,st=at?et.Buffer:void 0,ut=st?st.allocUnsafe:void 0;function ct(pt,dt){if(dt)return pt.slice();var ft=pt.length,bt=ut?ut(ft):new pt.constructor(ft);return pt.copy(bt),bt}tt.exports=ct})(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports;function copyArray$4(tt,nt){var et=-1,rt=tt.length;for(nt||(nt=Array(rt));++et<rt;)nt[et]=tt[et];return nt}var _copyArray=copyArray$4;function stubArray$3(){return[]}var stubArray_1=stubArray$3,arrayFilter$1=_arrayFilter,stubArray$2=stubArray_1,objectProto$l=Object.prototype,propertyIsEnumerable$2=objectProto$l.propertyIsEnumerable,nativeGetSymbols$2=Object.getOwnPropertySymbols,getSymbols$4=nativeGetSymbols$2?function(tt){return tt==null?[]:(tt=Object(tt),arrayFilter$1(nativeGetSymbols$2(tt),function(nt){return propertyIsEnumerable$2.call(tt,nt)}))}:stubArray$2,_getSymbols=getSymbols$4,copyObject$4=_copyObject,getSymbols$3=_getSymbols;function copySymbols$1(tt,nt){return copyObject$4(tt,getSymbols$3(tt),nt)}var _copySymbols=copySymbols$1;function arrayPush$4(tt,nt){for(var et=-1,rt=nt.length,ot=tt.length;++et<rt;)tt[ot+et]=nt[et];return tt}var _arrayPush=arrayPush$4,overArg$1=_overArg,getPrototype$4=overArg$1(Object.getPrototypeOf,Object),_getPrototype=getPrototype$4,arrayPush$3=_arrayPush,getPrototype$3=_getPrototype,getSymbols$2=_getSymbols,stubArray$1=stubArray_1,nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbolsIn$2=nativeGetSymbols$1?function(tt){for(var nt=[];tt;)arrayPush$3(nt,getSymbols$2(tt)),tt=getPrototype$3(tt);return nt}:stubArray$1,_getSymbolsIn=getSymbolsIn$2,copyObject$3=_copyObject,getSymbolsIn$1=_getSymbolsIn;function copySymbolsIn$1(tt,nt){return copyObject$3(tt,getSymbolsIn$1(tt),nt)}var _copySymbolsIn=copySymbolsIn$1,arrayPush$2=_arrayPush,isArray$e=isArray_1;function baseGetAllKeys$3(tt,nt,et){var rt=nt(tt);return isArray$e(tt)?rt:arrayPush$2(rt,et(tt))}var _baseGetAllKeys=baseGetAllKeys$3,baseGetAllKeys$2=_baseGetAllKeys,getSymbols$1=_getSymbols,keys$7=keys_1;function getAllKeys$3(tt){return baseGetAllKeys$2(tt,keys$7,getSymbols$1)}var _getAllKeys=getAllKeys$3,baseGetAllKeys$1=_baseGetAllKeys,getSymbolsIn=_getSymbolsIn,keysIn$4=keysIn_1;function getAllKeysIn$2(tt){return baseGetAllKeys$1(tt,keysIn$4,getSymbolsIn)}var _getAllKeysIn=getAllKeysIn$2,getNative$4=_getNative,root$b=_root,DataView$3=getNative$4(root$b,"DataView"),_DataView=DataView$3,getNative$3=_getNative,root$a=_root,Promise$3=getNative$3(root$a,"Promise"),_Promise=Promise$3,getNative$2=_getNative,root$9=_root,Set$3=getNative$2(root$9,"Set"),_Set=Set$3,getNative$1=_getNative,root$8=_root,WeakMap$3=getNative$1(root$8,"WeakMap"),_WeakMap=WeakMap$3,DataView$2=_DataView,Map$2=_Map,Promise$2=_Promise,Set$2=_Set,WeakMap$2=_WeakMap,baseGetTag$3=_baseGetTag,toSource$1=_toSource,mapTag$8="[object Map]",objectTag$7="[object Object]",promiseTag$1="[object Promise]",setTag$8="[object Set]",weakMapTag$3="[object WeakMap]",dataViewTag$6="[object DataView]",dataViewCtorString$1=toSource$1(DataView$2),mapCtorString$1=toSource$1(Map$2),promiseCtorString$1=toSource$1(Promise$2),setCtorString$1=toSource$1(Set$2),weakMapCtorString$1=toSource$1(WeakMap$2),getTag$6=baseGetTag$3;(DataView$2&&getTag$6(new DataView$2(new ArrayBuffer(1)))!=dataViewTag$6||Map$2&&getTag$6(new Map$2)!=mapTag$8||Promise$2&&getTag$6(Promise$2.resolve())!=promiseTag$1||Set$2&&getTag$6(new Set$2)!=setTag$8||WeakMap$2&&getTag$6(new WeakMap$2)!=weakMapTag$3)&&(getTag$6=function(tt){var nt=baseGetTag$3(tt),et=nt==objectTag$7?tt.constructor:void 0,rt=et?toSource$1(et):"";if(rt)switch(rt){case dataViewCtorString$1:return dataViewTag$6;case mapCtorString$1:return mapTag$8;case promiseCtorString$1:return promiseTag$1;case setCtorString$1:return setTag$8;case weakMapCtorString$1:return weakMapTag$3}return nt});var _getTag=getTag$6,objectProto$k=Object.prototype,hasOwnProperty$j=objectProto$k.hasOwnProperty;function initCloneArray$1(tt){var nt=tt.length,et=new tt.constructor(nt);return nt&&typeof tt[0]=="string"&&hasOwnProperty$j.call(tt,"index")&&(et.index=tt.index,et.input=tt.input),et}var _initCloneArray=initCloneArray$1,root$7=_root,Uint8Array$4=root$7.Uint8Array,_Uint8Array=Uint8Array$4,Uint8Array$3=_Uint8Array;function cloneArrayBuffer$4(tt){var nt=new tt.constructor(tt.byteLength);return new Uint8Array$3(nt).set(new Uint8Array$3(tt)),nt}var _cloneArrayBuffer=cloneArrayBuffer$4,cloneArrayBuffer$3=_cloneArrayBuffer;function cloneDataView$1(tt,nt){var et=nt?cloneArrayBuffer$3(tt.buffer):tt.buffer;return new tt.constructor(et,tt.byteOffset,tt.byteLength)}var _cloneDataView=cloneDataView$1,reFlags=/\w*$/;function cloneRegExp$1(tt){var nt=new tt.constructor(tt.source,reFlags.exec(tt));return nt.lastIndex=tt.lastIndex,nt}var _cloneRegExp=cloneRegExp$1,Symbol$5=_Symbol,symbolProto$3=Symbol$5?Symbol$5.prototype:void 0,symbolValueOf$2=symbolProto$3?symbolProto$3.valueOf:void 0;function cloneSymbol$1(tt){return symbolValueOf$2?Object(symbolValueOf$2.call(tt)):{}}var _cloneSymbol=cloneSymbol$1,cloneArrayBuffer$2=_cloneArrayBuffer;function cloneTypedArray$3(tt,nt){var et=nt?cloneArrayBuffer$2(tt.buffer):tt.buffer;return new tt.constructor(et,tt.byteOffset,tt.length)}var _cloneTypedArray=cloneTypedArray$3,cloneArrayBuffer$1=_cloneArrayBuffer,cloneDataView=_cloneDataView,cloneRegExp=_cloneRegExp,cloneSymbol=_cloneSymbol,cloneTypedArray$2=_cloneTypedArray,boolTag$4="[object Boolean]",dateTag$4="[object Date]",mapTag$7="[object Map]",numberTag$4="[object Number]",regexpTag$4="[object RegExp]",setTag$7="[object Set]",stringTag$5="[object String]",symbolTag$5="[object Symbol]",arrayBufferTag$4="[object ArrayBuffer]",dataViewTag$5="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]";function initCloneByTag$1(tt,nt,et){var rt=tt.constructor;switch(nt){case arrayBufferTag$4:return cloneArrayBuffer$1(tt);case boolTag$4:case dateTag$4:return new rt(+tt);case dataViewTag$5:return cloneDataView(tt,et);case float32Tag$2:case float64Tag$2:case int8Tag$2:case int16Tag$2:case int32Tag$2:case uint8Tag$2:case uint8ClampedTag$2:case uint16Tag$2:case uint32Tag$2:return cloneTypedArray$2(tt,et);case mapTag$7:return new rt;case numberTag$4:case stringTag$5:return new rt(tt);case regexpTag$4:return cloneRegExp(tt);case setTag$7:return new rt;case symbolTag$5:return cloneSymbol(tt)}}var _initCloneByTag=initCloneByTag$1,isObject$9=isObject_1,objectCreate$1=Object.create,baseCreate$2=function(){function tt(){}return function(nt){if(!isObject$9(nt))return{};if(objectCreate$1)return objectCreate$1(nt);tt.prototype=nt;var et=new tt;return tt.prototype=void 0,et}}(),_baseCreate=baseCreate$2,baseCreate$1=_baseCreate,getPrototype$2=_getPrototype,isPrototype$1=_isPrototype;function initCloneObject$3(tt){return typeof tt.constructor=="function"&&!isPrototype$1(tt)?baseCreate$1(getPrototype$2(tt)):{}}var _initCloneObject=initCloneObject$3,getTag$5=_getTag,isObjectLike$6=isObjectLike_1,mapTag$6="[object Map]";function baseIsMap$1(tt){return isObjectLike$6(tt)&&getTag$5(tt)==mapTag$6}var _baseIsMap=baseIsMap$1,baseIsMap=_baseIsMap,baseUnary$4=_baseUnary,nodeUtil$2=_nodeUtilExports,nodeIsMap=nodeUtil$2&&nodeUtil$2.isMap,isMap$1=nodeIsMap?baseUnary$4(nodeIsMap):baseIsMap,isMap_1=isMap$1,getTag$4=_getTag,isObjectLike$5=isObjectLike_1,setTag$6="[object Set]";function baseIsSet$1(tt){return isObjectLike$5(tt)&&getTag$4(tt)==setTag$6}var _baseIsSet=baseIsSet$1,baseIsSet=_baseIsSet,baseUnary$3=_baseUnary,nodeUtil$1=_nodeUtilExports,nodeIsSet=nodeUtil$1&&nodeUtil$1.isSet,isSet$1=nodeIsSet?baseUnary$3(nodeIsSet):baseIsSet,isSet_1=isSet$1,Stack$4=_Stack,arrayEach$1=_arrayEach,assignValue$2=_assignValue,baseAssign=_baseAssign,baseAssignIn=_baseAssignIn,cloneBuffer$2=_cloneBufferExports,copyArray$3=_copyArray,copySymbols=_copySymbols,copySymbolsIn=_copySymbolsIn,getAllKeys$2=_getAllKeys,getAllKeysIn$1=_getAllKeysIn,getTag$3=_getTag,initCloneArray=_initCloneArray,initCloneByTag=_initCloneByTag,initCloneObject$2=_initCloneObject,isArray$d=isArray_1,isBuffer$6=isBufferExports,isMap=isMap_1,isObject$8=isObject_1,isSet=isSet_1,keys$6=keys_1,keysIn$3=keysIn_1,CLONE_DEEP_FLAG$2=1,CLONE_FLAT_FLAG$1=2,CLONE_SYMBOLS_FLAG$2=4,argsTag$4="[object Arguments]",arrayTag$3="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$3="[object Error]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",mapTag$5="[object Map]",numberTag$3="[object Number]",objectTag$6="[object Object]",regexpTag$3="[object RegExp]",setTag$5="[object Set]",stringTag$4="[object String]",symbolTag$4="[object Symbol]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]",cloneableTags={};cloneableTags[argsTag$4]=cloneableTags[arrayTag$3]=cloneableTags[arrayBufferTag$3]=cloneableTags[dataViewTag$4]=cloneableTags[boolTag$3]=cloneableTags[dateTag$3]=cloneableTags[float32Tag$1]=cloneableTags[float64Tag$1]=cloneableTags[int8Tag$1]=cloneableTags[int16Tag$1]=cloneableTags[int32Tag$1]=cloneableTags[mapTag$5]=cloneableTags[numberTag$3]=cloneableTags[objectTag$6]=cloneableTags[regexpTag$3]=cloneableTags[setTag$5]=cloneableTags[stringTag$4]=cloneableTags[symbolTag$4]=cloneableTags[uint8Tag$1]=cloneableTags[uint8ClampedTag$1]=cloneableTags[uint16Tag$1]=cloneableTags[uint32Tag$1]=!0;cloneableTags[errorTag$3]=cloneableTags[funcTag$2]=cloneableTags[weakMapTag$2]=!1;function baseClone$2(tt,nt,et,rt,ot,at){var st,ut=nt&CLONE_DEEP_FLAG$2,ct=nt&CLONE_FLAT_FLAG$1,pt=nt&CLONE_SYMBOLS_FLAG$2;if(et&&(st=ot?et(tt,rt,ot,at):et(tt)),st!==void 0)return st;if(!isObject$8(tt))return tt;var dt=isArray$d(tt);if(dt){if(st=initCloneArray(tt),!ut)return copyArray$3(tt,st)}else{var ft=getTag$3(tt),bt=ft==funcTag$2||ft==genTag$1;if(isBuffer$6(tt))return cloneBuffer$2(tt,ut);if(ft==objectTag$6||ft==argsTag$4||bt&&!ot){if(st=ct||bt?{}:initCloneObject$2(tt),!ut)return ct?copySymbolsIn(tt,baseAssignIn(st,tt)):copySymbols(tt,baseAssign(st,tt))}else{if(!cloneableTags[ft])return ot?tt:{};st=initCloneByTag(tt,ft,ut)}}at||(at=new Stack$4);var ht=at.get(tt);if(ht)return ht;at.set(tt,st),isSet(tt)?tt.forEach(function(Ot){st.add(baseClone$2(Ot,nt,et,Ot,tt,at))}):isMap(tt)&&tt.forEach(function(Ot,zt){st.set(zt,baseClone$2(Ot,nt,et,zt,tt,at))});var Mt=pt?ct?getAllKeysIn$1:getAllKeys$2:ct?keysIn$3:keys$6,mt=dt?void 0:Mt(tt);return arrayEach$1(mt||tt,function(Ot,zt){mt&&(zt=Ot,Ot=tt[zt]),assignValue$2(st,zt,baseClone$2(Ot,nt,et,zt,tt,at))}),st}var _baseClone=baseClone$2,baseClone$1=_baseClone,CLONE_DEEP_FLAG$1=1,CLONE_SYMBOLS_FLAG$1=4;function cloneDeep(tt){return baseClone$1(tt,CLONE_DEEP_FLAG$1|CLONE_SYMBOLS_FLAG$1)}var cloneDeep_1=cloneDeep;const cloneDeep$1=getDefaultExportFromCjs$1(cloneDeep_1);var baseAssignValue$3=_baseAssignValue,eq$2=eq_1;function assignMergeValue$3(tt,nt,et){(et!==void 0&&!eq$2(tt[nt],et)||et===void 0&&!(nt in tt))&&baseAssignValue$3(tt,nt,et)}var _assignMergeValue=assignMergeValue$3;function createBaseFor$2(tt){return function(nt,et,rt){for(var ot=-1,at=Object(nt),st=rt(nt),ut=st.length;ut--;){var ct=st[tt?ut:++ot];if(et(at[ct],ct,at)===!1)break}return nt}}var _createBaseFor=createBaseFor$2,createBaseFor$1=_createBaseFor,baseFor$3=createBaseFor$1(),_baseFor=baseFor$3,baseGetTag$2=_baseGetTag,getPrototype$1=_getPrototype,isObjectLike$4=isObjectLike_1,objectTag$5="[object Object]",funcProto$3=Function.prototype,objectProto$j=Object.prototype,funcToString$3=funcProto$3.toString,hasOwnProperty$i=objectProto$j.hasOwnProperty,objectCtorString$1=funcToString$3.call(Object);function isPlainObject$6(tt){if(!isObjectLike$4(tt)||baseGetTag$2(tt)!=objectTag$5)return!1;var nt=getPrototype$1(tt);if(nt===null)return!0;var et=hasOwnProperty$i.call(nt,"constructor")&&nt.constructor;return typeof et=="function"&&et instanceof et&&funcToString$3.call(et)==objectCtorString$1}var isPlainObject_1=isPlainObject$6;function safeGet$3(tt,nt){if(!(nt==="constructor"&&typeof tt[nt]=="function")&&nt!="__proto__")return tt[nt]}var _safeGet=safeGet$3,copyObject$2=_copyObject,keysIn$2=keysIn_1;function toPlainObject$2(tt){return copyObject$2(tt,keysIn$2(tt))}var toPlainObject_1=toPlainObject$2,assignMergeValue$2=_assignMergeValue,cloneBuffer$1=_cloneBufferExports,cloneTypedArray$1=_cloneTypedArray,copyArray$2=_copyArray,initCloneObject$1=_initCloneObject,isArguments$3=isArguments_1,isArray$c=isArray_1,isArrayLikeObject$2=isArrayLikeObject_1,isBuffer$5=isBufferExports,isFunction$3=isFunction_1,isObject$7=isObject_1,isPlainObject$5=isPlainObject_1,isTypedArray$3=isTypedArray_1,safeGet$2=_safeGet,toPlainObject$1=toPlainObject_1;function baseMergeDeep$2(tt,nt,et,rt,ot,at,st){var ut=safeGet$2(tt,et),ct=safeGet$2(nt,et),pt=st.get(ct);if(pt){assignMergeValue$2(tt,et,pt);return}var dt=at?at(ut,ct,et+"",tt,nt,st):void 0,ft=dt===void 0;if(ft){var bt=isArray$c(ct),ht=!bt&&isBuffer$5(ct),Mt=!bt&&!ht&&isTypedArray$3(ct);dt=ct,bt||ht||Mt?isArray$c(ut)?dt=ut:isArrayLikeObject$2(ut)?dt=copyArray$2(ut):ht?(ft=!1,dt=cloneBuffer$1(ct,!0)):Mt?(ft=!1,dt=cloneTypedArray$1(ct,!0)):dt=[]:isPlainObject$5(ct)||isArguments$3(ct)?(dt=ut,isArguments$3(ut)?dt=toPlainObject$1(ut):(!isObject$7(ut)||isFunction$3(ut))&&(dt=initCloneObject$1(ct))):ft=!1}ft&&(st.set(ct,dt),ot(dt,ct,rt,at,st),st.delete(ct)),assignMergeValue$2(tt,et,dt)}var _baseMergeDeep=baseMergeDeep$2,Stack$3=_Stack,assignMergeValue$1=_assignMergeValue,baseFor$2=_baseFor,baseMergeDeep$1=_baseMergeDeep,isObject$6=isObject_1,keysIn$1=keysIn_1,safeGet$1=_safeGet;function baseMerge$2(tt,nt,et,rt,ot){tt!==nt&&baseFor$2(nt,function(at,st){if(ot||(ot=new Stack$3),isObject$6(at))baseMergeDeep$1(tt,nt,st,et,baseMerge$2,rt,ot);else{var ut=rt?rt(safeGet$1(tt,st),at,st+"",tt,nt,ot):void 0;ut===void 0&&(ut=at),assignMergeValue$1(tt,st,ut)}},keysIn$1)}var _baseMerge=baseMerge$2,baseRest$3=_baseRest,isIterateeCall$2=_isIterateeCall;function createAssigner$2(tt){return baseRest$3(function(nt,et){var rt=-1,ot=et.length,at=ot>1?et[ot-1]:void 0,st=ot>2?et[2]:void 0;for(at=tt.length>3&&typeof at=="function"?(ot--,at):void 0,st&&isIterateeCall$2(et[0],et[1],st)&&(at=ot<3?void 0:at,ot=1),nt=Object(nt);++rt<ot;){var ut=et[rt];ut&&tt(nt,ut,rt,at)}return nt})}var _createAssigner=createAssigner$2,baseMerge$1=_baseMerge,createAssigner$1=_createAssigner,merge$5=createAssigner$1(function(tt,nt,et){baseMerge$1(tt,nt,et)}),merge_1$1=merge$5;const merge$6=getDefaultExportFromCjs$1(merge_1$1);var toFinite=toFinite_1;function toInteger$2(tt){var nt=toFinite(tt),et=nt%1;return nt===nt?et?nt-et:nt:0}var toInteger_1=toInteger$2,toInteger$1=toInteger_1,FUNC_ERROR_TEXT$4="Expected a function";function before$1(tt,nt){var et;if(typeof nt!="function")throw new TypeError(FUNC_ERROR_TEXT$4);return tt=toInteger$1(tt),function(){return--tt>0&&(et=nt.apply(this,arguments)),tt<=1&&(nt=void 0),et}}var before_1=before$1,before=before_1;function once(tt){return before(2,tt)}var once_1=once;const once$1=getDefaultExportFromCjs$1(once_1);function logMessage(...tt){}function logWarning(...tt){}function logError(...tt){console.error(...tt)}function logAlways(...tt){console.log(...tt)}const 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}`},localStorageAvailable=()=>{const tt="testData";try{const{localStorage:nt}=window;nt.setItem(tt,tt),nt.getItem(tt),nt.removeItem(tt)}catch{return!1}return!0},AUTO_THEME_NAME="Use system setting",CUSTOM_THEME_NAME="Custom Theme";function mergeTheme(tt,nt){if(nt&&isObject$h(nt)){const et=new CustomThemeConfig(nt);return createTheme(tt.name,et,tt)}return tt}const getMergedLightTheme=once$1(()=>{var tt;return mergeTheme(lightTheme,(tt=window.__streamlit)==null?void 0:tt.LIGHT_THEME)}),getMergedDarkTheme=once$1(()=>{var tt;return mergeTheme(darkTheme,(tt=window.__streamlit)==null?void 0:tt.DARK_THEME)}),getSystemTheme=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?getMergedDarkTheme():getMergedLightTheme(),createAutoTheme=()=>({...getSystemTheme(),name:AUTO_THEME_NAME}),createPresetThemes=()=>[createAutoTheme(),getMergedLightTheme(),getMergedDarkTheme()],isPresetTheme=tt=>createPresetThemes().map(et=>et.name).includes(tt.name),fontToEnum=tt=>{const nt=Object.keys(fonts).find(rt=>fonts[rt]===tt),et=CustomThemeConfig.FontFamily.SANS_SERIF;if(nt){const rt=decamelize$2(nt).toUpperCase();return rt in CustomThemeConfig.FontFamily?CustomThemeConfig.FontFamily[rt]:et}return et},fontEnumToString=tt=>tt!=null&&tt in CustomThemeConfig.FontFamily?fonts[camelCase(CustomThemeConfig.FontFamily[tt].toString())]:void 0,bgColorToBaseString=tt=>tt===void 0||getLuminance(tt)>.5?"light":"dark",isColor=tt=>{const nt=new Option().style;return nt.color=tt,nt.color!==""},createEmotionTheme=(tt,nt=baseTheme)=>{const{colors:et,genericFonts:rt}=nt.emotion,{font:ot,radii:at,fontSizes:st,...ut}=tt,ct=fontEnumToString(ot),pt=Object.entries(ut).reduce((vt,[At,St])=>(isColor(St)?vt[At]=St:isColor(`#${St}`)&&(vt[At]=`#${St}`),vt),{}),{secondaryBackgroundColor:dt,backgroundColor:ft,primaryColor:bt,textColor:ht,skeletonBackgroundColor:Mt,widgetBackgroundColor:mt,widgetBorderColor:Ot}=pt,zt={...et};bt&&(zt.primary=bt),ht&&(zt.bodyText=ht),dt&&(zt.secondaryBg=dt),ft&&(zt.bgColor=ft),mt&&(zt.widgetBackgroundColor=mt),Ot&&(zt.widgetBorderColor=Ot),Mt&&(zt.skeletonBackgroundColor=Mt);const yt={};return at&&(yt.radii={...nt.emotion.radii},at.checkboxRadius&&(yt.radii.md=addPxUnit(at.checkboxRadius)),at.baseWidgetRadius&&(yt.radii.default=addPxUnit(at.baseWidgetRadius))),st&&(yt.fontSizes={...nt.emotion.fontSizes},st.tinyFontSize&&(yt.fontSizes.twoSm=addPxUnit(st.tinyFontSize),yt.fontSizes.twoSmPx=st.tinyFontSize),st.smallFontSize&&(yt.fontSizes.sm=addPxUnit(st.smallFontSize),yt.fontSizes.smPx=st.smallFontSize),st.baseFontSize&&(yt.fontSizes.md=addPxUnit(st.baseFontSize),yt.fontSizes.mdPx=st.baseFontSize)),{...nt.emotion,colors:createEmotionColors(zt),genericFonts:{...rt,...ct&&{bodyFont:tt.bodyFont?tt.bodyFont:ct,headingFont:tt.bodyFont?tt.bodyFont:ct,codeFont:tt.codeFont?tt.codeFont:rt.codeFont}},...yt}},toThemeInput=tt=>{const{colors:nt,genericFonts:et}=tt;return{primaryColor:nt.primary,backgroundColor:nt.bgColor,secondaryBackgroundColor:nt.secondaryBg,textColor:nt.bodyText,font:fontToEnum(et.bodyFont)}},toExportedTheme=tt=>{const{colors:nt}=tt,et=toThemeInput(tt);return{primaryColor:et.primaryColor,backgroundColor:et.backgroundColor,secondaryBackgroundColor:et.secondaryBackgroundColor,textColor:et.textColor,base:bgColorToBaseString(et.backgroundColor),font:fontEnumToString(et.font),...computeDerivedColors(nt)}},completeThemeInput=(tt,nt)=>new CustomThemeConfig({...toThemeInput(nt.emotion),...tt}),createTheme=(tt,nt,et,rt=!1)=>{et?nt=completeThemeInput(nt,et):nt.base===CustomThemeConfig.BaseTheme.DARK?nt=completeThemeInput(nt,darkTheme):nt=completeThemeInput(nt,lightTheme);const ot=nt.backgroundColor,at=merge$6(cloneDeep$1(et||(getLuminance(ot)>.5?lightTheme:darkTheme)),{emotion:{inSidebar:rt}}),st=createEmotionTheme(nt,at);return{...at,name:tt,emotion:st,basewebTheme:createBaseUiTheme(st,at.primitives)}},getCachedTheme=()=>{if(!localStorageAvailable())return null;const tt=window.localStorage.getItem(LocalStore.ACTIVE_THEME);if(!tt)return null;const{name:nt,themeInput:et}=JSON.parse(tt);switch(nt){case lightTheme.name:return getMergedLightTheme();case darkTheme.name:return getMergedDarkTheme();default:return createTheme(nt,et)}},deleteOldCachedThemes=()=>{const{CACHED_THEME_VERSION:tt,CACHED_THEME_BASE_KEY:nt}=LocalStore,{localStorage:et}=window;et.removeItem("stActiveTheme"),et.removeItem(nt);for(let rt=1;rt<=tt;rt++)et.removeItem(`${nt}-v${rt}`)},setCachedTheme=tt=>{if(!localStorageAvailable()||(deleteOldCachedThemes(),isLightThemeInQueryParams()||isDarkThemeInQueryParams()))return;const nt={name:tt.name,...!isPresetTheme(tt)&&{themeInput:toThemeInput(tt.emotion)}};window.localStorage.setItem(LocalStore.ACTIVE_THEME,JSON.stringify(nt))},removeCachedTheme=()=>{localStorageAvailable()&&window.localStorage.removeItem(LocalStore.ACTIVE_THEME)},getHostSpecifiedTheme=()=>isLightThemeInQueryParams()?getMergedLightTheme():isDarkThemeInQueryParams()?getMergedDarkTheme():createAutoTheme(),getDefaultTheme=()=>{const tt=getCachedTheme();return tt&&tt.name!==AUTO_THEME_NAME?tt:getHostSpecifiedTheme()},whiteSpace$1=/\s+/;function computeSpacingStyle(tt,nt){return tt===""?"":tt.split(whiteSpace$1).map(et=>et==="0"?nt.spacing.none:et in nt.spacing?nt.spacing[et]:(logError(`Invalid spacing value: ${et}`),nt.spacing.none)).join(" ")}function addPxUnit(tt){return`${tt}px`}function blend(tt,nt){if(nt===void 0)return tt;const[et,rt,ot,at]=parseToRgba(tt);if(at===1)return tt;const[st,ut,ct,pt]=parseToRgba(nt),dt=at+pt*(1-at),ft=Math.round((at*et+pt*st*(1-at))/dt),bt=Math.round((at*rt+pt*ut*(1-at))/dt),ht=Math.round((at*ot+pt*ct*(1-at))/dt);return toHex(`rgba(${ft}, ${bt}, ${ht}, ${dt})`)}const convertRemToPx=tt=>parseFloat(tt.replace(/rem$/,""))*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16),LibContext=React$1.createContext({isFullScreen:!1,setFullScreen:()=>{},addScriptFinishedHandler:()=>{},removeScriptFinishedHandler:()=>{},activeTheme:baseTheme,setTheme:()=>{},availableThemes:[],addThemes:()=>{},onPageChange:()=>{},currentPageScriptHash:"",libConfig:{},fragmentIdsThisRun:[],locale:window.navigator.language});var 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$3(function(tt){return reactPropsRegex.test(tt)||tt.charCodeAt(0)===111&&tt.charCodeAt(1)===110&&tt.charCodeAt(2)<91}),isDevelopment=!1,testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function tt(nt){return nt!=="theme"},getDefaultShouldForwardProp=function tt(nt){return typeof nt=="string"&&nt.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function tt(nt,et,rt){var ot;if(et){var at=et.shouldForwardProp;ot=nt.__emotion_forwardProp&&at?function(st){return nt.__emotion_forwardProp(st)&&at(st)}:at}return typeof ot!="function"&&rt&&(ot=nt.__emotion_forwardProp),ot},Insertion=function tt(nt){var et=nt.cache,rt=nt.serialized,ot=nt.isStringTag;return registerStyles(et,rt,ot),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(et,rt,ot)}),null},createStyled=function tt(nt,et){var rt=nt.__emotion_real===nt,ot=rt&&nt.__emotion_base||nt,at,st;et!==void 0&&(at=et.label,st=et.target);var ut=composeShouldForwardProps(nt,et,rt),ct=ut||getDefaultShouldForwardProp(ot),pt=!ct("as");return function(){var dt=arguments,ft=rt&&nt.__emotion_styles!==void 0?nt.__emotion_styles.slice(0):[];if(at!==void 0&&ft.push("label:"+at+";"),dt[0]==null||dt[0].raw===void 0)ft.push.apply(ft,dt);else{var bt=dt[0];ft.push(bt[0]);for(var ht=dt.length,Mt=1;Mt<ht;Mt++)ft.push(dt[Mt],bt[Mt])}var mt=withEmotionCache(function(Ot,zt,yt){var vt=pt&&Ot.as||ot,At="",St=[],Et=Ot;if(Ot.theme==null){Et={};for(var Tt in Ot)Et[Tt]=Ot[Tt];Et.theme=reactExports.useContext(ThemeContext$1)}typeof Ot.className=="string"?At=getRegisteredStyles(zt.registered,St,Ot.className):Ot.className!=null&&(At=Ot.className+" ");var Rt=serializeStyles(ft.concat(St),zt.registered,Et);At+=zt.key+"-"+Rt.name,st!==void 0&&(At+=" "+st);var Ct=pt&&ut===void 0?getDefaultShouldForwardProp(vt):ct,wt={};for(var Lt in Ot)pt&&Lt==="as"||Ct(Lt)&&(wt[Lt]=Ot[Lt]);return wt.className=At,yt&&(wt.ref=yt),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:zt,serialized:Rt,isStringTag:typeof vt=="string"}),reactExports.createElement(vt,wt))});return mt.displayName=at!==void 0?at:"Styled("+(typeof ot=="string"?ot:ot.displayName||ot.name||"Component")+")",mt.defaultProps=nt.defaultProps,mt.__emotion_real=mt,mt.__emotion_base=ot,mt.__emotion_styles=ft,mt.__emotion_forwardProp=ut,Object.defineProperty(mt,"toString",{value:function(){return st===void 0&&isDevelopment?"NO_COMPONENT_SELECTOR":"."+st}}),mt.withComponent=function(Ot,zt){var yt=tt(Ot,_extends$Q({},et,zt,{shouldForwardProp:composeShouldForwardProps(mt,zt,!0)}));return yt.apply(void 0,ft)},mt}},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"],newStyled=createStyled.bind(null);tags.forEach(function(tt){newStyled[tt]=newStyled(tt)});var SIZE$3={small:"small",medium:"medium",large:"large"},spin={from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},StyledSpinner=styled("i",function(tt){var nt=tt.$theme,et=tt.$color,rt=et===void 0?nt.colors.contentAccent:et,ot=tt.$borderWidth,at=tt.$size,st=at===void 0?SIZE$3.medium:at,ut={large:nt.sizing.scale300,medium:nt.sizing.scale100,small:nt.sizing.scale0}[ot||st],ct={large:nt.sizing.scale1000,medium:nt.sizing.scale900,small:nt.sizing.scale800}[st];return ut||(ut=nt.sizing[ot],ut||(ut="".concat(parseInt(ot),"px"))),ct||(ct=nt.sizing[st],ct||(ct="".concat(parseInt(st),"px"))),{display:"block",animationName:spin,animationDuration:nt.animation.timing1000,animationIterationCount:"infinite",animationTimingFunction:"linear",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderRadius:"50%",borderTopColor:rt,borderRightColor:nt.colors.backgroundTertiary,borderBottomColor:nt.colors.backgroundTertiary,borderLeftColor:nt.colors.backgroundTertiary,borderLeftWidth:ut,borderRightWidth:ut,borderTopWidth:ut,borderBottomWidth:ut,width:ct,height:ct,cursor:"wait"}});StyledSpinner.displayName="StyledSpinner";StyledSpinner.displayName="StyledSpinner";const StyledSpinnerIcon=newStyled(StyledSpinner,{shouldForwardProp:tt=>isPropValid(tt)&&!["size"].includes(tt),target:"e14lo1l0"})(({usingCustomTheme:tt,size:nt,margin:et,padding:rt,theme:ot})=>({width:ot.iconSizes[nt],height:ot.iconSizes[nt],fontSize:ot.iconSizes[nt],justifyContents:"center",margin:computeSpacingStyle(et,ot),padding:computeSpacingStyle(rt,ot),borderColor:ot.colors.borderColor,borderTopColor:tt?ot.colors.primary:ot.colors.blue70,borderWidth:ot.sizes.spinnerThickness,flexGrow:0,flexShrink:0})),StyledIcon=newStyled("span",{shouldForwardProp:tt=>isPropValid(tt)&&!["size","as"].includes(tt),target:"e14lo1l1"})(({color:tt,size:nt,margin:et,padding:rt,theme:ot})=>({color:ot.colors[tt],fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:ot.iconSizes[nt],width:ot.iconSizes[nt],height:ot.iconSizes[nt],margin:computeSpacingStyle(et,ot),padding:computeSpacingStyle(rt,ot),flexShrink:0})),StyledDynamicIcon=newStyled("span",{target:"e14lo1l2"})(({size:tt="lg",margin:nt="",padding:et="",theme:rt})=>({fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:rt.iconSizes[tt],width:rt.iconSizes[tt],height:rt.iconSizes[tt],margin:computeSpacingStyle(nt,rt),padding:computeSpacingStyle(et,rt),flexShrink:0})),StyledImageIcon=newStyled("img",{target:"e14lo1l3"})(({})=>({width:"100%",height:"100%"})),StyledEmojiIcon=newStyled("span",{target:"e14lo1l4"})(({size:tt,margin:nt,padding:et,theme:rt})=>({display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:rt.iconSizes[tt],width:rt.iconSizes[tt],height:rt.iconSizes[tt],margin:computeSpacingStyle(nt,rt),padding:computeSpacingStyle(et,rt)})),getDefaultProps$1=({size:tt,margin:nt,padding:et})=>({size:tt||"md",margin:nt||"",padding:et||""}),Icon$2=({content:tt,color:nt,size:et,margin:rt,padding:ot,testid:at})=>jsx$1(StyledIcon,{as:tt,color:nt||"inherit","aria-hidden":"true","data-testid":at,...getDefaultProps$1({size:et,margin:rt,padding:ot})}),EmojiIcon=({size:tt,margin:nt,padding:et,children:rt,testid:ot})=>jsx$1(StyledEmojiIcon,{"data-testid":ot||"stIconEmoji","aria-hidden":"true",...getDefaultProps$1({size:tt,margin:nt,padding:et}),children:rt});function arrayReduce$1(tt,nt,et,rt){var ot=-1,at=tt==null?0:tt.length;for(rt&&at&&(et=tt[++ot]);++ot<at;)et=nt(et,tt[ot],ot,tt);return et}var _arrayReduce=arrayReduce$1;function basePropertyOf$1(tt){return function(nt){return tt==null?void 0:tt[nt]}}var _basePropertyOf=basePropertyOf$1,basePropertyOf=_basePropertyOf,deburredLetters={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},deburrLetter$1=basePropertyOf(deburredLetters),_deburrLetter=deburrLetter$1,deburrLetter=_deburrLetter,toString$6=toString_1,reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsComboMarksRange$3="\\u0300-\\u036f",reComboHalfMarksRange$3="\\ufe20-\\ufe2f",rsComboSymbolsRange$3="\\u20d0-\\u20ff",rsComboRange$3=rsComboMarksRange$3+reComboHalfMarksRange$3+rsComboSymbolsRange$3,rsCombo$2="["+rsComboRange$3+"]",reComboMark=RegExp(rsCombo$2,"g");function deburr$1(tt){return tt=toString$6(tt),tt&&tt.replace(reLatin,deburrLetter).replace(reComboMark,"")}var deburr_1=deburr$1,reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function asciiWords$1(tt){return tt.match(reAsciiWord)||[]}var _asciiWords=asciiWords$1,reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function hasUnicodeWord$1(tt){return reHasUnicodeWord.test(tt)}var _hasUnicodeWord=hasUnicodeWord$1,rsAstralRange$2="\\ud800-\\udfff",rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$2+reComboHalfMarksRange$2+rsComboSymbolsRange$2,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange$2="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange,rsApos$1="['’]",rsBreak="["+rsBreakRange+"]",rsCombo$1="["+rsComboRange$2+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange$2+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz$1="\\ud83c[\\udffb-\\udfff]",rsModifier$1="(?:"+rsCombo$1+"|"+rsFitz$1+")",rsNonAstral$1="[^"+rsAstralRange$2+"]",rsRegional$1="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$1="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ$2="\\u200d",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",rsOptContrLower="(?:"+rsApos$1+"(?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:"+rsApos$1+"(?:D|LL|M|RE|S|T|VE))?",reOptMod$1=rsModifier$1+"?",rsOptVar$1="["+rsVarRange$2+"]?",rsOptJoin$1="(?:"+rsZWJ$2+"(?:"+[rsNonAstral$1,rsRegional$1,rsSurrPair$1].join("|")+")"+rsOptVar$1+reOptMod$1+")*",rsOrdLower="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsOrdUpper="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rsSeq$1=rsOptVar$1+reOptMod$1+rsOptJoin$1,rsEmoji="(?:"+[rsDingbat,rsRegional$1,rsSurrPair$1].join("|")+")"+rsSeq$1,reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptContrLower+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+"+rsOptContrUpper+"(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+"+rsOptContrLower,rsUpper+"+"+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join("|"),"g");function unicodeWords$1(tt){return tt.match(reUnicodeWord)||[]}var _unicodeWords=unicodeWords$1,asciiWords=_asciiWords,hasUnicodeWord=_hasUnicodeWord,toString$5=toString_1,unicodeWords=_unicodeWords;function words$1(tt,nt,et){return tt=toString$5(tt),nt=et?void 0:nt,nt===void 0?hasUnicodeWord(tt)?unicodeWords(tt):asciiWords(tt):tt.match(nt)||[]}var words_1=words$1,arrayReduce=_arrayReduce,deburr=deburr_1,words=words_1,rsApos="['’]",reApos=RegExp(rsApos,"g");function createCompounder$1(tt){return function(nt){return arrayReduce(words(deburr(nt).replace(reApos,"")),tt,"")}}var _createCompounder=createCompounder$1,createCompounder=_createCompounder,snakeCase=createCompounder(function(tt,nt,et){return tt+(et?"_":"")+nt.toLowerCase()}),snakeCase_1=snakeCase;const snakeCase$1=getDefaultExportFromCjs$1(snakeCase_1),StyledMaterialIcon=newStyled("span",{target:"e5a6sq90"})(({size:tt,margin:nt,padding:et,theme:rt,color:ot})=>({display:"inline-flex",alignItems:"center",justifyContents:"center",color:ot,fontSize:rt.iconSizes[tt],width:rt.iconSizes[tt],height:rt.iconSizes[tt],margin:computeSpacingStyle(nt,rt),padding:computeSpacingStyle(et,rt),userSelect:"none",fontFamily:rt.genericFonts.iconFont,fontWeight:rt.fontWeights.normal,fontStyle:"normal",lineHeight:rt.lineHeights.none,letterSpacing:"normal",textTransform:"none",whiteSpace:"nowrap",wordWrap:"normal",direction:"ltr",fontFeatureSettings:"liga",MozFontFeatureSettings:"liga",WebkitFontFeatureSettings:"liga",WebkitFontSmoothing:"antialiased"})),getDefaultProps=({size:tt,margin:nt,padding:et,color:rt})=>({size:tt||"md",margin:nt||"",padding:et||"",color:rt||"inherit"}),MaterialFontIcon=({iconName:tt,...nt})=>jsx$1(StyledMaterialIcon,{...getDefaultProps(nt),"data-testid":nt.testid||"stIconMaterial",children:snakeCase$1(tt)});function parseIconPackEntry(tt){const nt=tt.match(/^:(.+)\/(.+):$/);if(nt===null)return{pack:"emoji",icon:tt};const et=nt[1],rt=nt[2];return{pack:et,icon:rt}}function getFilledStarIconSrc(){return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTg2MF84NDMpIj48cGF0aCBkPSJNOS45OTk5NCAxNC4zOTE2TDEzLjQ1ODMgMTYuNDgzM0MxNC4wOTE2IDE2Ljg2NjYgMTQuODY2NiAxNi4zIDE0LjY5OTkgMTUuNTgzM0wxMy43ODMzIDExLjY1TDE2Ljg0MTYgOC45OTk5N0MxNy4zOTk5IDguNTE2NjMgMTcuMDk5OSA3LjU5OTk3IDE2LjM2NjYgNy41NDE2M0wxMi4zNDE2IDcuMTk5OTdMMTAuNzY2NiAzLjQ4MzNDMTAuNDgzMyAyLjgwODMgOS41MTY2MSAyLjgwODMgOS4yMzMyNyAzLjQ4MzNMNy42NTgyNyA3LjE5MTYzTDMuNjMzMjcgNy41MzMzQzIuODk5OTQgNy41OTE2MyAyLjU5OTk0IDguNTA4MyAzLjE1ODI3IDguOTkxNjNMNi4yMTY2MSAxMS42NDE2TDUuMjk5OTQgMTUuNTc1QzUuMTMzMjcgMTYuMjkxNiA1LjkwODI3IDE2Ljg1ODMgNi41NDE2MSAxNi40NzVMOS45OTk5NCAxNC4zOTE2WiIgZmlsbD0iI0ZBQ0EyQiIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwXzE4NjBfODQzIj48cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9IndoaXRlIi8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+"}const DynamicIconDispatcher=({iconValue:tt,...nt})=>{const{pack:et,icon:rt}=parseIconPackEntry(tt);switch(et){case"material":switch(rt){case"star_filled":return jsx$1(StyledDynamicIcon,{...nt,children:jsx$1(StyledImageIcon,{src:getFilledStarIconSrc(),"data-testid":nt.testid||"stImageIcon"})});default:return jsx$1(StyledDynamicIcon,{...nt,children:jsx$1(MaterialFontIcon,{pack:et,iconName:rt,...nt})})}case"emoji":default:return jsx$1(StyledDynamicIcon,{...nt,children:jsx$1(EmojiIcon,{...nt,children:rt})})}},DynamicIcon=tt=>jsx$1(reactExports.Suspense,{fallback:jsx$1(StyledDynamicIcon,{...tt,children:jsx$1(EmojiIcon,{...tt,children:" "})}),children:jsx$1(DynamicIconDispatcher,{...tt})},tt.iconValue),convert=function(tt){if(tt==null)return ok$1;if(typeof tt=="string")return typeFactory(tt);if(typeof tt=="object")return Array.isArray(tt)?anyFactory$1(tt):propsFactory(tt);if(typeof tt=="function")return castFactory$1(tt);throw new Error("Expected function, string, or object as test")};function anyFactory$1(tt){const nt=[];let et=-1;for(;++et<tt.length;)nt[et]=convert(tt[et]);return castFactory$1(rt);function rt(...ot){let at=-1;for(;++at<nt.length;)if(nt[at].call(this,...ot))return!0;return!1}}function propsFactory(tt){return castFactory$1(nt);function nt(et){let rt;for(rt in tt)if(et[rt]!==tt[rt])return!1;return!0}}function typeFactory(tt){return castFactory$1(nt);function nt(et){return et&&et.type===tt}}function castFactory$1(tt){return nt;function nt(et,...rt){return!!(et&&typeof et=="object"&&"type"in et&&tt.call(this,et,...rt))}}function ok$1(){return!0}function color(tt){return tt}const CONTINUE=!0,EXIT=!1,SKIP="skip",visitParents=function(tt,nt,et,rt){typeof nt=="function"&&typeof et!="function"&&(rt=et,et=nt,nt=null);const ot=convert(nt),at=rt?-1:1;st(tt,void 0,[])();function st(ut,ct,pt){const dt=ut&&typeof ut=="object"?ut:{};if(typeof dt.type=="string"){const bt=typeof dt.tagName=="string"?dt.tagName:typeof dt.name=="string"?dt.name:void 0;Object.defineProperty(ft,"name",{value:"node ("+(ut.type+(bt?"<"+bt+">":""))+")"})}return ft;function ft(){let bt=[],ht,Mt,mt;if((!nt||ot(ut,ct,pt[pt.length-1]||null))&&(bt=toResult(et(ut,pt)),bt[0]===EXIT))return bt;if(ut.children&&bt[0]!==SKIP)for(Mt=(rt?ut.children.length:-1)+at,mt=pt.concat(ut);Mt>-1&&Mt<ut.children.length;){if(ht=st(ut.children[Mt],Mt,mt)(),ht[0]===EXIT)return ht;Mt=typeof ht[1]=="number"?ht[1]:Mt+at}return bt}}};function toResult(tt){return Array.isArray(tt)?tt:typeof tt=="number"?[CONTINUE,tt]:[tt]}const visit=function(tt,nt,et,rt){typeof nt=="function"&&typeof et!="function"&&(rt=et,et=nt,nt=null),visitParents(tt,nt,ot,rt);function ot(at,st){const ut=st[st.length-1];return et(at,ut?ut.children.indexOf(at):null,ut)}},protocols=["http","https","mailto","tel"];function uriTransformer(tt){const nt=(tt||"").trim(),et=nt.charAt(0);if(et==="#"||et==="/")return nt;const rt=nt.indexOf(":");if(rt===-1)return nt;let ot=-1;for(;++ot<protocols.length;){const at=protocols[ot];if(rt===at.length&&nt.slice(0,at.length).toLowerCase()===at)return nt}return ot=nt.indexOf("?"),ot!==-1&&rt>ot||(ot=nt.indexOf("#"),ot!==-1&&rt>ot)?nt:"javascript:void(0)"}/*!
99
+ */var isBrowser$1=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",timeoutDuration=function(){for(var tt=["Edge","Trident","Firefox"],nt=0;nt<tt.length;nt+=1)if(isBrowser$1&&navigator.userAgent.indexOf(tt[nt])>=0)return 1;return 0}();function microtaskDebounce(tt){var nt=!1;return function(){nt||(nt=!0,window.Promise.resolve().then(function(){nt=!1,tt()}))}}function taskDebounce(tt){var nt=!1;return function(){nt||(nt=!0,setTimeout(function(){nt=!1,tt()},timeoutDuration))}}var supportsMicroTasks=isBrowser$1&&window.Promise,debounce$3=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction$4(tt){var nt={};return tt&&nt.toString.call(tt)==="[object Function]"}function getStyleComputedProperty(tt,nt){if(tt.nodeType!==1)return[];var et=tt.ownerDocument.defaultView,rt=et.getComputedStyle(tt,null);return nt?rt[nt]:rt}function getParentNode$1(tt){return tt.nodeName==="HTML"?tt:tt.parentNode||tt.host}function getScrollParent(tt){if(!tt)return document.body;switch(tt.nodeName){case"HTML":case"BODY":return tt.ownerDocument.body;case"#document":return tt.body}var nt=getStyleComputedProperty(tt),et=nt.overflow,rt=nt.overflowX,ot=nt.overflowY;return/(auto|scroll|overlay)/.test(et+ot+rt)?tt:getScrollParent(getParentNode$1(tt))}function getReferenceNode(tt){return tt&&tt.referenceNode?tt.referenceNode:tt}var isIE11=isBrowser$1&&!!(window.MSInputMethodContext&&document.documentMode),isIE10=isBrowser$1&&/MSIE 10/.test(navigator.userAgent);function isIE$1(tt){return tt===11?isIE11:tt===10?isIE10:isIE11||isIE10}function getOffsetParent(tt){if(!tt)return document.documentElement;for(var nt=isIE$1(10)?document.body:null,et=tt.offsetParent||null;et===nt&&tt.nextElementSibling;)et=(tt=tt.nextElementSibling).offsetParent;var rt=et&&et.nodeName;return!rt||rt==="BODY"||rt==="HTML"?tt?tt.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(et.nodeName)!==-1&&getStyleComputedProperty(et,"position")==="static"?getOffsetParent(et):et}function isOffsetContainer(tt){var nt=tt.nodeName;return nt==="BODY"?!1:nt==="HTML"||getOffsetParent(tt.firstElementChild)===tt}function getRoot(tt){return tt.parentNode!==null?getRoot(tt.parentNode):tt}function findCommonOffsetParent(tt,nt){if(!tt||!tt.nodeType||!nt||!nt.nodeType)return document.documentElement;var et=tt.compareDocumentPosition(nt)&Node.DOCUMENT_POSITION_FOLLOWING,rt=et?tt:nt,ot=et?nt:tt,at=document.createRange();at.setStart(rt,0),at.setEnd(ot,0);var st=at.commonAncestorContainer;if(tt!==st&&nt!==st||rt.contains(ot))return isOffsetContainer(st)?st:getOffsetParent(st);var ut=getRoot(tt);return ut.host?findCommonOffsetParent(ut.host,nt):findCommonOffsetParent(tt,getRoot(nt).host)}function getScroll(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",et=nt==="top"?"scrollTop":"scrollLeft",rt=tt.nodeName;if(rt==="BODY"||rt==="HTML"){var ot=tt.ownerDocument.documentElement,at=tt.ownerDocument.scrollingElement||ot;return at[et]}return tt[et]}function includeScroll(tt,nt){var et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,rt=getScroll(nt,"top"),ot=getScroll(nt,"left"),at=et?-1:1;return tt.top+=rt*at,tt.bottom+=rt*at,tt.left+=ot*at,tt.right+=ot*at,tt}function getBordersSize(tt,nt){var et=nt==="x"?"Left":"Top",rt=et==="Left"?"Right":"Bottom";return parseFloat(tt["border"+et+"Width"])+parseFloat(tt["border"+rt+"Width"])}function getSize(tt,nt,et,rt){return Math.max(nt["offset"+tt],nt["scroll"+tt],et["client"+tt],et["offset"+tt],et["scroll"+tt],isIE$1(10)?parseInt(et["offset"+tt])+parseInt(rt["margin"+(tt==="Height"?"Top":"Left")])+parseInt(rt["margin"+(tt==="Height"?"Bottom":"Right")]):0)}function getWindowSizes(tt){var nt=tt.body,et=tt.documentElement,rt=isIE$1(10)&&getComputedStyle(et);return{height:getSize("Height",nt,et,rt),width:getSize("Width",nt,et,rt)}}var classCallCheck=function(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")},createClass$1=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}(),defineProperty$3=function(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt},_extends$K=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function getClientRect(tt){return _extends$K({},tt,{right:tt.left+tt.width,bottom:tt.top+tt.height})}function getBoundingClientRect(tt){var nt={};try{if(isIE$1(10)){nt=tt.getBoundingClientRect();var et=getScroll(tt,"top"),rt=getScroll(tt,"left");nt.top+=et,nt.left+=rt,nt.bottom+=et,nt.right+=rt}else nt=tt.getBoundingClientRect()}catch{}var ot={left:nt.left,top:nt.top,width:nt.right-nt.left,height:nt.bottom-nt.top},at=tt.nodeName==="HTML"?getWindowSizes(tt.ownerDocument):{},st=at.width||tt.clientWidth||ot.width,ut=at.height||tt.clientHeight||ot.height,ct=tt.offsetWidth-st,pt=tt.offsetHeight-ut;if(ct||pt){var dt=getStyleComputedProperty(tt);ct-=getBordersSize(dt,"x"),pt-=getBordersSize(dt,"y"),ot.width-=ct,ot.height-=pt}return getClientRect(ot)}function getOffsetRectRelativeToArbitraryNode(tt,nt){var et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,rt=isIE$1(10),ot=nt.nodeName==="HTML",at=getBoundingClientRect(tt),st=getBoundingClientRect(nt),ut=getScrollParent(tt),ct=getStyleComputedProperty(nt),pt=parseFloat(ct.borderTopWidth),dt=parseFloat(ct.borderLeftWidth);et&&ot&&(st.top=Math.max(st.top,0),st.left=Math.max(st.left,0));var ft=getClientRect({top:at.top-st.top-pt,left:at.left-st.left-dt,width:at.width,height:at.height});if(ft.marginTop=0,ft.marginLeft=0,!rt&&ot){var bt=parseFloat(ct.marginTop),ht=parseFloat(ct.marginLeft);ft.top-=pt-bt,ft.bottom-=pt-bt,ft.left-=dt-ht,ft.right-=dt-ht,ft.marginTop=bt,ft.marginLeft=ht}return(rt&&!et?nt.contains(ut):nt===ut&&ut.nodeName!=="BODY")&&(ft=includeScroll(ft,nt)),ft}function getViewportOffsetRectRelativeToArtbitraryNode(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=tt.ownerDocument.documentElement,rt=getOffsetRectRelativeToArbitraryNode(tt,et),ot=Math.max(et.clientWidth,window.innerWidth||0),at=Math.max(et.clientHeight,window.innerHeight||0),st=nt?0:getScroll(et),ut=nt?0:getScroll(et,"left"),ct={top:st-rt.top+rt.marginTop,left:ut-rt.left+rt.marginLeft,width:ot,height:at};return getClientRect(ct)}function isFixed$1(tt){var nt=tt.nodeName;if(nt==="BODY"||nt==="HTML")return!1;if(getStyleComputedProperty(tt,"position")==="fixed")return!0;var et=getParentNode$1(tt);return et?isFixed$1(et):!1}function getFixedPositionOffsetParent(tt){if(!tt||!tt.parentElement||isIE$1())return document.documentElement;for(var nt=tt.parentElement;nt&&getStyleComputedProperty(nt,"transform")==="none";)nt=nt.parentElement;return nt||document.documentElement}function getBoundaries(tt,nt,et,rt){var ot=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,at={top:0,left:0},st=ot?getFixedPositionOffsetParent(tt):findCommonOffsetParent(tt,getReferenceNode(nt));if(rt==="viewport")at=getViewportOffsetRectRelativeToArtbitraryNode(st,ot);else{var ut=void 0;rt==="scrollParent"?(ut=getScrollParent(getParentNode$1(nt)),ut.nodeName==="BODY"&&(ut=tt.ownerDocument.documentElement)):rt==="window"?ut=tt.ownerDocument.documentElement:ut=rt;var ct=getOffsetRectRelativeToArbitraryNode(ut,st,ot);if(ut.nodeName==="HTML"&&!isFixed$1(st)){var pt=getWindowSizes(tt.ownerDocument),dt=pt.height,ft=pt.width;at.top+=ct.top-ct.marginTop,at.bottom=dt+ct.top,at.left+=ct.left-ct.marginLeft,at.right=ft+ct.left}else at=ct}et=et||0;var bt=typeof et=="number";return at.left+=bt?et:et.left||0,at.top+=bt?et:et.top||0,at.right-=bt?et:et.right||0,at.bottom-=bt?et:et.bottom||0,at}function getArea(tt){var nt=tt.width,et=tt.height;return nt*et}function computeAutoPlacement(tt,nt,et,rt,ot){var at=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(tt.indexOf("auto")===-1)return tt;var st=getBoundaries(et,rt,at,ot),ut={top:{width:st.width,height:nt.top-st.top},right:{width:st.right-nt.right,height:st.height},bottom:{width:st.width,height:st.bottom-nt.bottom},left:{width:nt.left-st.left,height:st.height}},ct=Object.keys(ut).map(function(bt){return _extends$K({key:bt},ut[bt],{area:getArea(ut[bt])})}).sort(function(bt,ht){return ht.area-bt.area}),pt=ct.filter(function(bt){var ht=bt.width,Mt=bt.height;return ht>=et.clientWidth&&Mt>=et.clientHeight}),dt=pt.length>0?pt[0].key:ct[0].key,ft=tt.split("-")[1];return dt+(ft?"-"+ft:"")}function getReferenceOffsets(tt,nt,et){var rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,ot=rt?getFixedPositionOffsetParent(nt):findCommonOffsetParent(nt,getReferenceNode(et));return getOffsetRectRelativeToArbitraryNode(et,ot,rt)}function getOuterSizes(tt){var nt=tt.ownerDocument.defaultView,et=nt.getComputedStyle(tt),rt=parseFloat(et.marginTop||0)+parseFloat(et.marginBottom||0),ot=parseFloat(et.marginLeft||0)+parseFloat(et.marginRight||0),at={width:tt.offsetWidth+ot,height:tt.offsetHeight+rt};return at}function getOppositePlacement(tt){var nt={left:"right",right:"left",bottom:"top",top:"bottom"};return tt.replace(/left|right|bottom|top/g,function(et){return nt[et]})}function getPopperOffsets(tt,nt,et){et=et.split("-")[0];var rt=getOuterSizes(tt),ot={width:rt.width,height:rt.height},at=["right","left"].indexOf(et)!==-1,st=at?"top":"left",ut=at?"left":"top",ct=at?"height":"width",pt=at?"width":"height";return ot[st]=nt[st]+nt[ct]/2-rt[ct]/2,et===ut?ot[ut]=nt[ut]-rt[pt]:ot[ut]=nt[getOppositePlacement(ut)],ot}function find$3(tt,nt){return Array.prototype.find?tt.find(nt):tt.filter(nt)[0]}function findIndex(tt,nt,et){if(Array.prototype.findIndex)return tt.findIndex(function(ot){return ot[nt]===et});var rt=find$3(tt,function(ot){return ot[nt]===et});return tt.indexOf(rt)}function runModifiers(tt,nt,et){var rt=et===void 0?tt:tt.slice(0,findIndex(tt,"name",et));return rt.forEach(function(ot){ot.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var at=ot.function||ot.fn;ot.enabled&&isFunction$4(at)&&(nt.offsets.popper=getClientRect(nt.offsets.popper),nt.offsets.reference=getClientRect(nt.offsets.reference),nt=at(nt,ot))}),nt}function update(){if(!this.state.isDestroyed){var tt={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};tt.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed),tt.placement=computeAutoPlacement(this.options.placement,tt.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),tt.originalPlacement=tt.placement,tt.positionFixed=this.options.positionFixed,tt.offsets.popper=getPopperOffsets(this.popper,tt.offsets.reference,tt.placement),tt.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",tt=runModifiers(this.modifiers,tt),this.state.isCreated?this.options.onUpdate(tt):(this.state.isCreated=!0,this.options.onCreate(tt))}}function isModifierEnabled(tt,nt){return tt.some(function(et){var rt=et.name,ot=et.enabled;return ot&&rt===nt})}function getSupportedPropertyName(tt){for(var nt=[!1,"ms","Webkit","Moz","O"],et=tt.charAt(0).toUpperCase()+tt.slice(1),rt=0;rt<nt.length;rt++){var ot=nt[rt],at=ot?""+ot+et:tt;if(typeof document.body.style[at]<"u")return at}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(tt){var nt=tt.ownerDocument;return nt?nt.defaultView:window}function attachToScrollParents(tt,nt,et,rt){var ot=tt.nodeName==="BODY",at=ot?tt.ownerDocument.defaultView:tt;at.addEventListener(nt,et,{passive:!0}),ot||attachToScrollParents(getScrollParent(at.parentNode),nt,et,rt),rt.push(at)}function setupEventListeners(tt,nt,et,rt){et.updateBound=rt,getWindow(tt).addEventListener("resize",et.updateBound,{passive:!0});var ot=getScrollParent(tt);return attachToScrollParents(ot,"scroll",et.updateBound,et.scrollParents),et.scrollElement=ot,et.eventsEnabled=!0,et}function enableEventListeners(){this.state.eventsEnabled||(this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners(tt,nt){return getWindow(tt).removeEventListener("resize",nt.updateBound),nt.scrollParents.forEach(function(et){et.removeEventListener("scroll",nt.updateBound)}),nt.updateBound=null,nt.scrollParents=[],nt.scrollElement=null,nt.eventsEnabled=!1,nt}function disableEventListeners(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners(this.reference,this.state))}function isNumeric(tt){return tt!==""&&!isNaN(parseFloat(tt))&&isFinite(tt)}function setStyles(tt,nt){Object.keys(nt).forEach(function(et){var rt="";["width","height","top","right","bottom","left"].indexOf(et)!==-1&&isNumeric(nt[et])&&(rt="px"),tt.style[et]=nt[et]+rt})}function setAttributes(tt,nt){Object.keys(nt).forEach(function(et){var rt=nt[et];rt!==!1?tt.setAttribute(et,nt[et]):tt.removeAttribute(et)})}function applyStyle(tt){return setStyles(tt.instance.popper,tt.styles),setAttributes(tt.instance.popper,tt.attributes),tt.arrowElement&&Object.keys(tt.arrowStyles).length&&setStyles(tt.arrowElement,tt.arrowStyles),tt}function applyStyleOnLoad(tt,nt,et,rt,ot){var at=getReferenceOffsets(ot,nt,tt,et.positionFixed),st=computeAutoPlacement(et.placement,at,nt,tt,et.modifiers.flip.boundariesElement,et.modifiers.flip.padding);return nt.setAttribute("x-placement",st),setStyles(nt,{position:et.positionFixed?"fixed":"absolute"}),et}function getRoundedOffsets(tt,nt){var et=tt.offsets,rt=et.popper,ot=et.reference,at=Math.round,st=Math.floor,ut=function(zt){return zt},ct=at(ot.width),pt=at(rt.width),dt=["left","right"].indexOf(tt.placement)!==-1,ft=tt.placement.indexOf("-")!==-1,bt=ct%2===pt%2,ht=ct%2===1&&pt%2===1,Mt=nt?dt||ft||bt?at:st:ut,mt=nt?at:ut;return{left:Mt(ht&&!ft&&nt?rt.left-1:rt.left),top:mt(rt.top),bottom:mt(rt.bottom),right:Mt(rt.right)}}var isFirefox$1=isBrowser$1&&/Firefox/i.test(navigator.userAgent);function computeStyle(tt,nt){var et=nt.x,rt=nt.y,ot=tt.offsets.popper,at=find$3(tt.instance.modifiers,function(vt){return vt.name==="applyStyle"}).gpuAcceleration;at!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var st=at!==void 0?at:nt.gpuAcceleration,ut=getOffsetParent(tt.instance.popper),ct=getBoundingClientRect(ut),pt={position:ot.position},dt=getRoundedOffsets(tt,window.devicePixelRatio<2||!isFirefox$1),ft=et==="bottom"?"top":"bottom",bt=rt==="right"?"left":"right",ht=getSupportedPropertyName("transform"),Mt=void 0,mt=void 0;if(ft==="bottom"?ut.nodeName==="HTML"?mt=-ut.clientHeight+dt.bottom:mt=-ct.height+dt.bottom:mt=dt.top,bt==="right"?ut.nodeName==="HTML"?Mt=-ut.clientWidth+dt.right:Mt=-ct.width+dt.right:Mt=dt.left,st&&ht)pt[ht]="translate3d("+Mt+"px, "+mt+"px, 0)",pt[ft]=0,pt[bt]=0,pt.willChange="transform";else{var Ot=ft==="bottom"?-1:1,zt=bt==="right"?-1:1;pt[ft]=mt*Ot,pt[bt]=Mt*zt,pt.willChange=ft+", "+bt}var yt={"x-placement":tt.placement};return tt.attributes=_extends$K({},yt,tt.attributes),tt.styles=_extends$K({},pt,tt.styles),tt.arrowStyles=_extends$K({},tt.offsets.arrow,tt.arrowStyles),tt}function isModifierRequired(tt,nt,et){var rt=find$3(tt,function(ut){var ct=ut.name;return ct===nt}),ot=!!rt&&tt.some(function(ut){return ut.name===et&&ut.enabled&&ut.order<rt.order});if(!ot){var at="`"+nt+"`",st="`"+et+"`";console.warn(st+" modifier is required by "+at+" modifier in order to work, be sure to include it before "+at+"!")}return ot}function arrow(tt,nt){var et;if(!isModifierRequired(tt.instance.modifiers,"arrow","keepTogether"))return tt;var rt=nt.element;if(typeof rt=="string"){if(rt=tt.instance.popper.querySelector(rt),!rt)return tt}else if(!tt.instance.popper.contains(rt))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),tt;var ot=tt.placement.split("-")[0],at=tt.offsets,st=at.popper,ut=at.reference,ct=["left","right"].indexOf(ot)!==-1,pt=ct?"height":"width",dt=ct?"Top":"Left",ft=dt.toLowerCase(),bt=ct?"left":"top",ht=ct?"bottom":"right",Mt=getOuterSizes(rt)[pt];ut[ht]-Mt<st[ft]&&(tt.offsets.popper[ft]-=st[ft]-(ut[ht]-Mt)),ut[ft]+Mt>st[ht]&&(tt.offsets.popper[ft]+=ut[ft]+Mt-st[ht]),tt.offsets.popper=getClientRect(tt.offsets.popper);var mt=ut[ft]+ut[pt]/2-Mt/2,Ot=getStyleComputedProperty(tt.instance.popper),zt=parseFloat(Ot["margin"+dt]),yt=parseFloat(Ot["border"+dt+"Width"]),vt=mt-tt.offsets.popper[ft]-zt-yt;return vt=Math.max(Math.min(st[pt]-Mt,vt),0),tt.arrowElement=rt,tt.offsets.arrow=(et={},defineProperty$3(et,ft,Math.round(vt)),defineProperty$3(et,bt,""),et),tt}function getOppositeVariation(tt){return tt==="end"?"start":tt==="start"?"end":tt}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(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=validPlacements.indexOf(tt),rt=validPlacements.slice(et+1).concat(validPlacements.slice(0,et));return nt?rt.reverse():rt}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip$1(tt,nt){if(isModifierEnabled(tt.instance.modifiers,"inner")||tt.flipped&&tt.placement===tt.originalPlacement)return tt;var et=getBoundaries(tt.instance.popper,tt.instance.reference,nt.padding,nt.boundariesElement,tt.positionFixed),rt=tt.placement.split("-")[0],ot=getOppositePlacement(rt),at=tt.placement.split("-")[1]||"",st=[];switch(nt.behavior){case BEHAVIORS.FLIP:st=[rt,ot];break;case BEHAVIORS.CLOCKWISE:st=clockwise(rt);break;case BEHAVIORS.COUNTERCLOCKWISE:st=clockwise(rt,!0);break;default:st=nt.behavior}return st.forEach(function(ut,ct){if(rt!==ut||st.length===ct+1)return tt;rt=tt.placement.split("-")[0],ot=getOppositePlacement(rt);var pt=tt.offsets.popper,dt=tt.offsets.reference,ft=Math.floor,bt=rt==="left"&&ft(pt.right)>ft(dt.left)||rt==="right"&&ft(pt.left)<ft(dt.right)||rt==="top"&&ft(pt.bottom)>ft(dt.top)||rt==="bottom"&&ft(pt.top)<ft(dt.bottom),ht=ft(pt.left)<ft(et.left),Mt=ft(pt.right)>ft(et.right),mt=ft(pt.top)<ft(et.top),Ot=ft(pt.bottom)>ft(et.bottom),zt=rt==="left"&&ht||rt==="right"&&Mt||rt==="top"&&mt||rt==="bottom"&&Ot,yt=["top","bottom"].indexOf(rt)!==-1,vt=!!nt.flipVariations&&(yt&&at==="start"&&ht||yt&&at==="end"&&Mt||!yt&&at==="start"&&mt||!yt&&at==="end"&&Ot),At=!!nt.flipVariationsByContent&&(yt&&at==="start"&&Mt||yt&&at==="end"&&ht||!yt&&at==="start"&&Ot||!yt&&at==="end"&&mt),St=vt||At;(bt||zt||St)&&(tt.flipped=!0,(bt||zt)&&(rt=st[ct+1]),St&&(at=getOppositeVariation(at)),tt.placement=rt+(at?"-"+at:""),tt.offsets.popper=_extends$K({},tt.offsets.popper,getPopperOffsets(tt.instance.popper,tt.offsets.reference,tt.placement)),tt=runModifiers(tt.instance.modifiers,tt,"flip"))}),tt}function keepTogether(tt){var nt=tt.offsets,et=nt.popper,rt=nt.reference,ot=tt.placement.split("-")[0],at=Math.floor,st=["top","bottom"].indexOf(ot)!==-1,ut=st?"right":"bottom",ct=st?"left":"top",pt=st?"width":"height";return et[ut]<at(rt[ct])&&(tt.offsets.popper[ct]=at(rt[ct])-et[pt]),et[ct]>at(rt[ut])&&(tt.offsets.popper[ct]=at(rt[ut])),tt}function toValue(tt,nt,et,rt){var ot=tt.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),at=+ot[1],st=ot[2];if(!at)return tt;if(st.indexOf("%")===0){var ut=void 0;switch(st){case"%p":ut=et;break;case"%":case"%r":default:ut=rt}var ct=getClientRect(ut);return ct[nt]/100*at}else if(st==="vh"||st==="vw"){var pt=void 0;return st==="vh"?pt=Math.max(document.documentElement.clientHeight,window.innerHeight||0):pt=Math.max(document.documentElement.clientWidth,window.innerWidth||0),pt/100*at}else return at}function parseOffset(tt,nt,et,rt){var ot=[0,0],at=["right","left"].indexOf(rt)!==-1,st=tt.split(/(\+|\-)/).map(function(dt){return dt.trim()}),ut=st.indexOf(find$3(st,function(dt){return dt.search(/,|\s/)!==-1}));st[ut]&&st[ut].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var ct=/\s*,\s*|\s+/,pt=ut!==-1?[st.slice(0,ut).concat([st[ut].split(ct)[0]]),[st[ut].split(ct)[1]].concat(st.slice(ut+1))]:[st];return pt=pt.map(function(dt,ft){var bt=(ft===1?!at:at)?"height":"width",ht=!1;return dt.reduce(function(Mt,mt){return Mt[Mt.length-1]===""&&["+","-"].indexOf(mt)!==-1?(Mt[Mt.length-1]=mt,ht=!0,Mt):ht?(Mt[Mt.length-1]+=mt,ht=!1,Mt):Mt.concat(mt)},[]).map(function(Mt){return toValue(Mt,bt,nt,et)})}),pt.forEach(function(dt,ft){dt.forEach(function(bt,ht){isNumeric(bt)&&(ot[ft]+=bt*(dt[ht-1]==="-"?-1:1))})}),ot}function offset$1(tt,nt){var et=nt.offset,rt=tt.placement,ot=tt.offsets,at=ot.popper,st=ot.reference,ut=rt.split("-")[0],ct=void 0;return isNumeric(+et)?ct=[+et,0]:ct=parseOffset(et,at,st,ut),ut==="left"?(at.top+=ct[0],at.left-=ct[1]):ut==="right"?(at.top+=ct[0],at.left+=ct[1]):ut==="top"?(at.left+=ct[0],at.top-=ct[1]):ut==="bottom"&&(at.left+=ct[0],at.top+=ct[1]),tt.popper=at,tt}function preventOverflow(tt,nt){var et=nt.boundariesElement||getOffsetParent(tt.instance.popper);tt.instance.reference===et&&(et=getOffsetParent(et));var rt=getSupportedPropertyName("transform"),ot=tt.instance.popper.style,at=ot.top,st=ot.left,ut=ot[rt];ot.top="",ot.left="",ot[rt]="";var ct=getBoundaries(tt.instance.popper,tt.instance.reference,nt.padding,et,tt.positionFixed);ot.top=at,ot.left=st,ot[rt]=ut,nt.boundaries=ct;var pt=nt.priority,dt=tt.offsets.popper,ft={primary:function(ht){var Mt=dt[ht];return dt[ht]<ct[ht]&&!nt.escapeWithReference&&(Mt=Math.max(dt[ht],ct[ht])),defineProperty$3({},ht,Mt)},secondary:function(ht){var Mt=ht==="right"?"left":"top",mt=dt[Mt];return dt[ht]>ct[ht]&&!nt.escapeWithReference&&(mt=Math.min(dt[Mt],ct[ht]-(ht==="right"?dt.width:dt.height))),defineProperty$3({},Mt,mt)}};return pt.forEach(function(bt){var ht=["left","top"].indexOf(bt)!==-1?"primary":"secondary";dt=_extends$K({},dt,ft[ht](bt))}),tt.offsets.popper=dt,tt}function shift(tt){var nt=tt.placement,et=nt.split("-")[0],rt=nt.split("-")[1];if(rt){var ot=tt.offsets,at=ot.reference,st=ot.popper,ut=["bottom","top"].indexOf(et)!==-1,ct=ut?"left":"top",pt=ut?"width":"height",dt={start:defineProperty$3({},ct,at[ct]),end:defineProperty$3({},ct,at[ct]+at[pt]-st[pt])};tt.offsets.popper=_extends$K({},st,dt[rt])}return tt}function hide(tt){if(!isModifierRequired(tt.instance.modifiers,"hide","preventOverflow"))return tt;var nt=tt.offsets.reference,et=find$3(tt.instance.modifiers,function(rt){return rt.name==="preventOverflow"}).boundaries;if(nt.bottom<et.top||nt.left>et.right||nt.top>et.bottom||nt.right<et.left){if(tt.hide===!0)return tt;tt.hide=!0,tt.attributes["x-out-of-boundaries"]=""}else{if(tt.hide===!1)return tt;tt.hide=!1,tt.attributes["x-out-of-boundaries"]=!1}return tt}function inner$1(tt){var nt=tt.placement,et=nt.split("-")[0],rt=tt.offsets,ot=rt.popper,at=rt.reference,st=["left","right"].indexOf(et)!==-1,ut=["top","left"].indexOf(et)===-1;return ot[st?"left":"top"]=at[et]-(ut?ot[st?"width":"height"]:0),tt.placement=getOppositePlacement(nt),tt.offsets.popper=getClientRect(ot),tt}var modifiers={shift:{order:100,enabled:!0,fn:shift},offset:{order:200,enabled:!0,fn:offset$1,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$1,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:inner$1},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 tt(){},onUpdate:function tt(){},modifiers},Popper=function(){function tt(nt,et){var rt=this,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};classCallCheck(this,tt),this.scheduleUpdate=function(){return requestAnimationFrame(rt.update)},this.update=debounce$3(this.update.bind(this)),this.options=_extends$K({},tt.Defaults,ot),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=nt&&nt.jquery?nt[0]:nt,this.popper=et&&et.jquery?et[0]:et,this.options.modifiers={},Object.keys(_extends$K({},tt.Defaults.modifiers,ot.modifiers)).forEach(function(st){rt.options.modifiers[st]=_extends$K({},tt.Defaults.modifiers[st]||{},ot.modifiers?ot.modifiers[st]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(st){return _extends$K({name:st},rt.options.modifiers[st])}).sort(function(st,ut){return st.order-ut.order}),this.modifiers.forEach(function(st){st.enabled&&isFunction$4(st.onLoad)&&st.onLoad(rt.reference,rt.popper,rt.options,st,rt.state)}),this.update();var at=this.options.eventsEnabled;at&&this.enableEventListeners(),this.state.eventsEnabled=at}return createClass$1(tt,[{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)}}]),tt}();Popper.Utils=(typeof window<"u"?window:global).PopperUtils;Popper.placements=placements;Popper.Defaults=Defaults;function toPopperPlacement(tt){return tt.replace(/(Top|Left)$/,"-start").replace(/(Right|Bottom)$/,"-end")}function parsePopperOffset(tt){return{top:Math.floor(tt.top||0),left:Math.floor(tt.left||0)}}var TETHER_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"};function _typeof$h(tt){"@babel/helpers - typeof";return _typeof$h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(nt){return typeof nt}:function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt},_typeof$h(tt)}var _excluded$n=["modifiers"];function ownKeys$r(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$q(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$r(Object(et),!0).forEach(function(rt){_defineProperty$v(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$r(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}function _objectWithoutProperties$t(tt,nt){if(tt==null)return{};var et=_objectWithoutPropertiesLoose$r(tt,nt),rt,ot;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(tt);for(ot=0;ot<at.length;ot++)rt=at[ot],!(nt.indexOf(rt)>=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(et[rt]=tt[rt])}return et}function _objectWithoutPropertiesLoose$r(tt,nt){if(tt==null)return{};var et={},rt=Object.keys(tt),ot,at;for(at=0;at<rt.length;at++)ot=rt[at],!(nt.indexOf(ot)>=0)&&(et[ot]=tt[ot]);return et}function _classCallCheck$o(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(tt,nt){for(var et=0;et<nt.length;et++){var rt=nt[et];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(tt,rt.key,rt)}}function _createClass$m(tt,nt,et){return nt&&_defineProperties$e(tt.prototype,nt),Object.defineProperty(tt,"prototype",{writable:!1}),tt}function _inherits$o(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function");tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,writable:!0,configurable:!0}}),Object.defineProperty(tt,"prototype",{writable:!1}),nt&&_setPrototypeOf$f(tt,nt)}function _setPrototypeOf$f(tt,nt){return _setPrototypeOf$f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,ot){return rt.__proto__=ot,rt},_setPrototypeOf$f(tt,nt)}function _createSuper$d(tt){var nt=_isNativeReflectConstruct$d();return function(){var rt=_getPrototypeOf$e(tt),ot;if(nt){var at=_getPrototypeOf$e(this).constructor;ot=Reflect.construct(rt,arguments,at)}else ot=rt.apply(this,arguments);return _possibleConstructorReturn$o(this,ot)}}function _possibleConstructorReturn$o(tt,nt){if(nt&&(_typeof$h(nt)==="object"||typeof nt=="function"))return nt;if(nt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$f(tt)}function _assertThisInitialized$f(tt){if(tt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt}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$e(tt){return _getPrototypeOf$e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},_getPrototypeOf$e(tt)}function _defineProperty$v(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}var Tether=function(tt){_inherits$o(et,tt);var nt=_createSuper$d(et);function et(){var rt;_classCallCheck$o(this,et);for(var ot=arguments.length,at=new Array(ot),st=0;st<ot;st++)at[st]=arguments[st];return rt=nt.call.apply(nt,[this].concat(at)),_defineProperty$v(_assertThisInitialized$f(rt),"popper",void 0),_defineProperty$v(_assertThisInitialized$f(rt),"popperHeight",0),_defineProperty$v(_assertThisInitialized$f(rt),"popperWidth",0),_defineProperty$v(_assertThisInitialized$f(rt),"anchorHeight",0),_defineProperty$v(_assertThisInitialized$f(rt),"anchorWidth",0),_defineProperty$v(_assertThisInitialized$f(rt),"state",{isMounted:!1}),_defineProperty$v(_assertThisInitialized$f(rt),"onPopperUpdate",function(ut){var ct={popper:parsePopperOffset(ut.offsets.popper),arrow:ut.offsets.arrow?parsePopperOffset(ut.offsets.arrow):{top:0,left:0}};rt.props.onPopperUpdate(ct,ut)}),rt}return _createClass$m(et,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(ot,at){if(this.props.anchorRef){var st=this.props.anchorRef.getBoundingClientRect(),ut=st.height,ct=st.width;(this.anchorHeight!==ut||this.anchorWidth!==ct)&&(this.anchorHeight=ut,this.anchorWidth=ct,this.popper&&this.popper.scheduleUpdate())}if(this.props.popperRef){var pt=this.props.popperRef.getBoundingClientRect(),dt=pt.height,ft=pt.width;(this.popperHeight!==dt||this.popperWidth!==ft)&&(this.popperHeight=dt,this.popperWidth=ft,this.popper&&this.popper.scheduleUpdate()),this.state.isMounted!==at.isMounted&&this.props.anchorRef&&this.initializePopper()}}},{key:"componentWillUnmount",value:function(){this.destroyPopover()}},{key:"initializePopper",value:function(){var ot=this.props,at=ot.placement,st=ot.popperOptions,ut=st.modifiers,ct=_objectWithoutProperties$t(st,_excluded$n);!this.props.anchorRef||!this.props.popperRef||(this.popper=new Popper(this.props.anchorRef,this.props.popperRef,_objectSpread$q({placement:toPopperPlacement(at),modifiers:_objectSpread$q({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}},ut)},ct)))}},{key:"destroyPopover",value:function(){this.popper&&(this.popper.destroy(),delete this.popper)}},{key:"render",value:function(){return this.props.children||null}}]),et}(reactExports.Component);_defineProperty$v(Tether,"defaultProps",{anchorRef:null,onPopperUpdate:function tt(){return null},placement:TETHER_PLACEMENT.auto,popperRef:null,popperOptions:{}});var BaseProvider=function tt(nt){var et=nt.children,rt=nt.overrides,ot=nt.theme,at=nt.zIndex;return reactExports.createElement(LayersManager,{zIndex:at,overrides:rt},reactExports.createElement(UIDReset,{prefix:"bui"},reactExports.createElement(ThemeProvider$1,{theme:ot},et)))};function guard(tt,nt,et){return Math.min(Math.max(tt,et),nt)}class ColorError extends Error{constructor(nt){super(`Failed to parse color: "${nt}"`)}}var ColorError$1=ColorError;function parseToRgba(tt){if(typeof tt!="string")throw new ColorError$1(tt);if(tt.trim().toLowerCase()==="transparent")return[0,0,0,0];let nt=tt.trim();nt=namedColorRegex.test(tt)?nameToHex(tt):tt;const et=reducedHexRegex.exec(nt);if(et){const st=Array.from(et).slice(1);return[...st.slice(0,3).map(ut=>parseInt(r(ut,2),16)),parseInt(r(st[3]||"f",2),16)/255]}const rt=hexRegex.exec(nt);if(rt){const st=Array.from(rt).slice(1);return[...st.slice(0,3).map(ut=>parseInt(ut,16)),parseInt(st[3]||"ff",16)/255]}const ot=rgbaRegex.exec(nt);if(ot){const st=Array.from(ot).slice(1);return[...st.slice(0,3).map(ut=>parseInt(ut,10)),parseFloat(st[3]||"1")]}const at=hslaRegex.exec(nt);if(at){const[st,ut,ct,pt]=Array.from(at).slice(1).map(parseFloat);if(guard(0,100,ut)!==ut)throw new ColorError$1(tt);if(guard(0,100,ct)!==ct)throw new ColorError$1(tt);return[...hslToRgb$1(st,ut,ct),Number.isNaN(pt)?1:pt]}throw new ColorError$1(tt)}function hash$1(tt){let nt=5381,et=tt.length;for(;et;)nt=nt*33^tt.charCodeAt(--et);return(nt>>>0)%2341}const colorToInt=tt=>parseInt(tt.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((tt,nt)=>{const et=colorToInt(nt.substring(0,3)),rt=colorToInt(nt.substring(3)).toString(16);let ot="";for(let at=0;at<6-rt.length;at++)ot+="0";return tt[et]=`${ot}${rt}`,tt},{});function nameToHex(tt){const nt=tt.toLowerCase().trim(),et=compressedColorMap[hash$1(nt)];if(!et)throw new ColorError$1(tt);return`#${et}`}const r=(tt,nt)=>Array.from(Array(nt)).map(()=>tt).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=tt=>Math.round(tt*255),hslToRgb$1=(tt,nt,et)=>{let rt=et/100;if(nt===0)return[rt,rt,rt].map(roundColor);const ot=(tt%360+360)%360/60,at=(1-Math.abs(2*rt-1))*(nt/100),st=at*(1-Math.abs(ot%2-1));let ut=0,ct=0,pt=0;ot>=0&&ot<1?(ut=at,ct=st):ot>=1&&ot<2?(ut=st,ct=at):ot>=2&&ot<3?(ct=at,pt=st):ot>=3&&ot<4?(ct=st,pt=at):ot>=4&&ot<5?(ut=st,pt=at):ot>=5&&ot<6&&(ut=at,pt=st);const dt=rt-at/2,ft=ut+dt,bt=ct+dt,ht=pt+dt;return[ft,bt,ht].map(roundColor)};function parseToHsla(tt){const[nt,et,rt,ot]=parseToRgba(tt).map((ft,bt)=>bt===3?ft:ft/255),at=Math.max(nt,et,rt),st=Math.min(nt,et,rt),ut=(at+st)/2;if(at===st)return[0,0,ut,ot];const ct=at-st,pt=ut>.5?ct/(2-at-st):ct/(at+st);return[60*(nt===at?(et-rt)/ct+(et<rt?6:0):et===at?(rt-nt)/ct+2:(nt-et)/ct+4),pt,ut,ot]}function hsla(tt,nt,et,rt){return`hsla(${(tt%360).toFixed()}, ${guard(0,100,nt*100).toFixed()}%, ${guard(0,100,et*100).toFixed()}%, ${parseFloat(guard(0,1,rt).toFixed(3))})`}function darken(tt,nt){const[et,rt,ot,at]=parseToHsla(tt);return hsla(et,rt,ot-nt,at)}function getLuminance(tt){if(tt==="transparent")return 0;function nt(at){const st=at/255;return st<=.04045?st/12.92:Math.pow((st+.055)/1.055,2.4)}const[et,rt,ot]=parseToRgba(tt);return .2126*nt(et)+.7152*nt(rt)+.0722*nt(ot)}function rgba$1(tt,nt,et,rt){return`rgba(${guard(0,255,tt).toFixed()}, ${guard(0,255,nt).toFixed()}, ${guard(0,255,et).toFixed()}, ${parseFloat(guard(0,1,rt).toFixed(3))})`}function mix$1(tt,nt,et){const rt=(St,Et)=>Et===3?St:St/255,[ot,at,st,ut]=parseToRgba(tt).map(rt),[ct,pt,dt,ft]=parseToRgba(nt).map(rt),bt=ft-ut,ht=et*2-1,mt=((ht*bt===-1?ht:ht+bt/(1+ht*bt))+1)/2,Ot=1-mt,zt=(ot*Ot+ct*mt)*255,yt=(at*Ot+pt*mt)*255,vt=(st*Ot+dt*mt)*255,At=ft*et+ut*(1-et);return rgba$1(zt,yt,vt,At)}function lighten(tt,nt){return darken(tt,-nt)}function transparentize(tt,nt){const[et,rt,ot,at]=parseToRgba(tt);return rgba$1(et,rt,ot,at-nt)}function toHex(tt){const[nt,et,rt,ot]=parseToRgba(tt);let at=st=>{const ut=guard(0,255,st).toString(16);return ut.length===1?`0${ut}`:ut};return`#${at(nt)}${at(et)}${at(rt)}${ot<1?at(Math.round(ot*255)):""}`}const computeDerivedColors=tt=>{const{bodyText:nt,secondaryBg:et,bgColor:rt}=tt,ot=getLuminance(rt)>.5,at=ot?tt.blue:lighten(tt.blue,.2),st=transparentize(nt,.9),ut=transparentize(nt,.8),ct=transparentize(nt,.7),pt=transparentize(nt,.6),dt=transparentize(nt,.4),ft=ut,bt=st,ht=mix$1(rt,et,.5),Mt=ot?darken(ht,.3):lighten(ht,.6),mt=transparentize(Mt,.75),Ot=transparentize(Mt,.85),zt=lighten(rt,.025);return{linkText:at,fadedText05:st,fadedText10:ut,fadedText20:ct,fadedText40:pt,fadedText60:dt,bgMix:ht,darkenedBgMix100:Mt,darkenedBgMix25:mt,darkenedBgMix15:Ot,lightenedBg05:zt,borderColor:ft,borderColorLight:bt}};function hasLightBackgroundColor(tt){return getLuminance(tt.colors.bgColor)>.5}const createEmotionColors=tt=>{const nt=computeDerivedColors(tt);return{...tt,...nt,codeTextColor:tt.green80,codeHighlightColor:nt.bgMix,metricPositiveDeltaColor:tt.green,metricNegativeDeltaColor:tt.red,metricNeutralDeltaColor:nt.fadedText60,docStringModuleText:tt.bodyText,docStringTypeText:tt.green70,docStringContainerBackground:transparentize(tt.secondaryBg,.6),headingColor:tt.bodyText}};function getDividerColors(tt){const nt=hasLightBackgroundColor(tt),et=nt?tt.colors.blue60:tt.colors.blue90,rt=nt?tt.colors.green60:tt.colors.green90,ot=nt?tt.colors.orange60:tt.colors.orange90,at=nt?tt.colors.red60:tt.colors.red90,st=nt?tt.colors.purple60:tt.colors.purple80,ut=nt?tt.colors.gray40:tt.colors.gray70;return{blue:et,green:rt,orange:ot,red:at,violet:st,gray:ut,grey:ut,rainbow:`linear-gradient(to right, ${at}, ${ot}, ${rt}, ${et}, ${st})`}}function getMarkdownTextColors(tt){const nt=hasLightBackgroundColor(tt),et=nt?tt.colors.red80:tt.colors.red70,rt=nt?tt.colors.orange100:tt.colors.orange60,ot=nt?tt.colors.yellow100:tt.colors.yellow40,at=nt?tt.colors.green90:tt.colors.green60,st=nt?tt.colors.blue80:tt.colors.blue50,ut=nt?tt.colors.purple80:tt.colors.purple50,ct=nt?tt.colors.purple100:tt.colors.purple80,pt=nt?tt.colors.gray80:tt.colors.gray70,dt=tt.colors.primary;return{red:et,orange:rt,yellow:ot,green:at,blue:st,violet:ut,purple:ct,gray:pt,primary:dt}}function getMarkdownBgColors(tt){const nt=hasLightBackgroundColor(tt);return{redbg:transparentize(tt.colors[nt?"red80":"red60"],nt?.9:.7),orangebg:transparentize(tt.colors.yellow70,nt?.9:.7),yellowbg:transparentize(tt.colors[nt?"yellow70":"yellow50"],nt?.9:.7),greenbg:transparentize(tt.colors[nt?"green70":"green60"],nt?.9:.7),bluebg:transparentize(tt.colors[nt?"blue70":"blue60"],nt?.9:.7),violetbg:transparentize(tt.colors[nt?"purple70":"purple60"],nt?.9:.7),purplebg:transparentize(tt.colors[nt?"purple90":"purple80"],nt?.9:.7),graybg:transparentize(tt.colors[nt?"gray70":"gray50"],nt?.9:.7),primarybg:transparentize(tt.colors.primary,nt?.9:.7)}}function getGray70(tt){return hasLightBackgroundColor(tt)?tt.colors.gray70:tt.colors.gray30}function getGray30(tt){return hasLightBackgroundColor(tt)?tt.colors.gray30:tt.colors.gray85}function getGray90(tt){return hasLightBackgroundColor(tt)?tt.colors.gray90:tt.colors.gray10}function getBlue80(tt){return hasLightBackgroundColor(tt)?tt.colors.blue80:tt.colors.blue40}function getBlueArrayAsc(tt){const{colors:nt}=tt;return[nt.blue10,nt.blue20,nt.blue30,nt.blue40,nt.blue50,nt.blue60,nt.blue70,nt.blue80,nt.blue90,nt.blue100]}function getBlueArrayDesc(tt){const{colors:nt}=tt;return[nt.blue100,nt.blue90,nt.blue80,nt.blue70,nt.blue60,nt.blue50,nt.blue40,nt.blue30,nt.blue20,nt.blue10]}function getSequentialColorsArray(tt){return hasLightBackgroundColor(tt)?getBlueArrayAsc(tt):getBlueArrayDesc(tt)}function getDivergingColorsArray(tt){const{colors:nt}=tt;return[nt.red100,nt.red90,nt.red70,nt.red50,nt.red30,nt.blue30,nt.blue50,nt.blue70,nt.blue90,nt.blue100]}function getCategoricalColorsArray(tt){const{colors:nt}=tt;return hasLightBackgroundColor(tt)?[nt.blue80,nt.blue40,nt.red80,nt.red40,nt.blueGreen80,nt.green40,nt.orange80,nt.orange50,nt.purple80,nt.gray40]:[nt.blue40,nt.blue80,nt.red40,nt.red80,nt.green40,nt.blueGreen80,nt.orange50,nt.orange80,nt.purple80,nt.gray40]}function getDecreasingRed(tt){return hasLightBackgroundColor(tt)?tt.colors.red80:tt.colors.red40}function getIncreasingGreen(tt){return hasLightBackgroundColor(tt)?tt.colors.blueGreen80:tt.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",orange100:"#d95a00",yellow10:"#ffffe1",yellow20:"#ffffc2",yellow30:"#ffffa0",yellow40:"#ffff7d",yellow50:"#ffff59",yellow60:"#fff835",yellow70:"#ffe312",yellow80:"#faca2b",yellow90:"#edbb16",yellow100:"#dea816",yellow110:"#916e10",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",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",xxxl:"1.25rem",full:"9999px"},sizes={full:"100%",headerHeight:"3.75rem",fullScreenHeaderHeight:"2.875rem",sidebarTopSpace:"6rem",toastWidth:"21rem",contentMaxWidth:"46rem",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.2rem",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"},spacing$1={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 Pro", sans-serif',monospace:'"Source Code Pro", monospace',serif:'"Source Serif Pro", serif',materialIcons:"Material Symbols Rounded"},genericFonts={bodyFont:fonts.sansSerif,codeFont:fonts.monospace,headingFont:fonts.sansSerif,iconFont:fonts.materialIcons},fontSizeTwoSmall=12,fontSizeSmall=14,fontSizeMedium=16,fontSizes={twoSm:`${fontSizeTwoSmall}px`,sm:`${fontSizeSmall}px`,md:"1rem",mdLg:"1.125rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.75rem",threeXL:"2.25rem",fourXL:"2.75rem",twoSmPx:fontSizeTwoSmall,smPx:fontSizeSmall,mdPx:fontSizeMedium},fontWeights={normal:400,bold:600,extrabold:700},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,popupMenu=balloons+40,fullscreenWrapper=balloons+50,vegaTooltips=fullscreenWrapper+10,tablePortal=fullscreenWrapper+60,cacheSpinner=sidebar+1,toast=bottom+1,zIndices={hide:-1,auto:"auto",base:0,priority:1,sidebar,menuButton,balloons,header,sidebarMobile,popupMenu,fullscreenWrapper,tablePortal,bottom,cacheSpinner,toast,vegaTooltips},requiredThemeColors={bgColor:colors.white,secondaryBg:colors.gray20,bodyText:colors.gray85,warning:colors.yellow110,warningBg:transparentize(colors.yellow80,.8),success:colors.green100,successBg:transparentize(colors.green80,.8),infoBg:transparentize(colors.blue70,.9),info:colors.blue100,danger:colors.red100,dangerBg:transparentize(colors.red70,.8),primary:colors.red70,disabled:colors.gray40,lightestGray:colors.gray20,lightGray:colors.gray30,gray:colors.gray60,darkGray:colors.gray70,red:colors.red80,blue:colors.blue80,green:colors.green80,yellow:colors.yellow80},optionalThemeColors={},themeColors={...colors,...requiredThemeColors,...optionalThemeColors},emotionBaseTheme={inSidebar:!1,breakpoints,colors:createEmotionColors(themeColors),fonts,fontSizes,fontWeights,genericFonts,iconSizes,lineHeights,radii,sizes,spacing:spacing$1,zIndices},genericColors$1={...colors,navTextColor:colors.gray80,navActiveTextColor:colors.gray90,navIconColor:colors.gray60,sidebarControlColor:colors.gray70,warning:"#926C05",warningBg:transparentize(colors.yellow70,.9),successBg:transparentize(colors.green70,.9),danger:colors.red100,dangerBg:transparentize(colors.red80,.91)},emotionLightTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors$1})},genericColors={...colors,bgColor:colors.gray100,secondaryBg:colors.gray90,bodyText:colors.gray10,navTextColor:colors.gray50,navActiveTextColor:colors.gray10,navIconColor:colors.gray70,sidebarControlColor:colors.gray10,warning:colors.yellow20,warningBg:transparentize(colors.yellow70,.8),success:colors.green10,successBg:transparentize(colors.green60,.8),info:colors.blue20,infoBg:transparentize(colors.blue60,.8),danger:colors.red20,dangerBg:transparentize(colors.red60,.8),primary:colors.red70,disabled:colors.gray70},emotionDarkTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors})},createBaseThemePrimitives=(tt,nt)=>{const{colors:et,genericFonts:rt}=nt;return{...tt,primaryFontFamily:rt.bodyFont,primary100:et.primary,primary200:et.primary,primary300:et.primary,primary400:et.primary,primary500:et.primary,primary600:et.primary,primary700:et.primary,mono100:et.bgColor,mono200:et.secondaryBg,mono300:et.lightGray,mono400:et.lightGray,mono500:et.gray,mono600:et.fadedText40,mono700:et.gray,mono800:et.bodyText,mono900:et.bodyText,mono1000:et.black}},createThemeOverrides=tt=>{const{inSidebar:nt,colors:et,genericFonts:rt,fontSizes:ot,lineHeights:at,radii:st}=tt,ut={fontFamily:rt.bodyFont,fontSize:ot.md,fontSizeSm:ot.sm,fontWeight:"normal",lineHeight:at.base,lineHeightTight:at.tight},ct=et.widgetBackgroundColor?et.widgetBackgroundColor:et.secondaryBg,pt=nt?et.secondaryBg:et.bgColor,dt=nt?et.bgColor:et.secondaryBg;return{borders:{radius100:st.default,radius200:st.default,radius300:st.default,radius400:st.default,radius500:st.default,useRoundedCorners:!0,buttonBorderRadiusMini:st.md,buttonBorderRadius:st.default,checkboxBorderRadius:st.md,inputBorderRadiusMini:st.md,inputBorderRadius:st.default,popoverBorderRadius:st.default,surfaceBorderRadius:st.default,tagBorderRadius:st.md},typography:{font100:{},font150:{...ut},font200:{},font250:{},font300:{...ut},font350:{...ut},font400:{...ut},font450:{...ut},font460:{...ut},font470:{...ut},font500:{...ut},font600:{},LabelXSmall:{...ut},LabelSmall:{...ut},LabelMedium:{...ut},LabelLarge:{...ut},ParagraphSmall:{...ut}},colors:{white:et.white,black:et.black,primary:et.primary,primaryA:et.primary,backgroundPrimary:et.bgColor,backgroundSecondary:ct,backgroundTertiary:et.bgColor,borderOpaque:et.darkenedBgMix25,accent:transparentize(et.primary,.5),tagPrimarySolidBackground:et.primary,tagPrimaryFontDisabled:et.fadedText40,tagPrimaryOutlinedDisabled:et.transparent,borderSelected:et.primary,contentPrimary:et.bodyText,inputPlaceholder:et.fadedText60,tickFillDisabled:et.fadedText40,tickMarkFill:et.lightestGray,tickFillSelected:et.primary,datepickerBackground:pt,calendarBackground:pt,calendarForeground:et.bodyText,calendarDayForegroundPseudoSelected:et.bodyText,calendarHeaderBackground:dt,calendarHeaderBackgroundActive:dt,calendarHeaderForeground:et.bodyText,calendarHeaderForegroundDisabled:et.gray40,calendarDayBackgroundSelected:et.primary,calendarDayBackgroundSelectedHighlighted:et.primary,calendarDayForegroundSelected:et.white,calendarDayForegroundSelectedHighlighted:et.white,calendarDayForegroundPseudoSelectedHighlighted:et.bodyText,menuFontHighlighted:et.bodyText,menuFontSelected:et.bodyText,modalCloseColor:et.bodyText,notificationInfoBackground:et.infoBg,notificationInfoText:et.info,notificationPositiveBackground:et.successBg,notificationPositiveText:et.success,notificationWarningBackground:et.warningBg,notificationWarningText:et.warning,notificationNegativeBackground:et.dangerBg,notificationNegativeText:et.danger,progressbarTrackFill:ct,tickFill:et.lightenedBg05,tickMarkFillDisabled:et.lightenedBg05,menuFill:pt,buttonDisabledFill:et.lightenedBg05,tickFillHover:ct,inputFillDisabled:ct,inputFillActive:ct,toggleTrackFillDisabled:ct,tickFillActive:ct,sliderTrackFillDisabled:ct,inputBorder:et.widgetBorderColor||ct,inputFill:ct,inputEnhanceFill:ct,inputEnhancerFillDisabled:ct,buttonDisabledSpinnerBackground:et.gray40,toggleTrackFill:et.gray40,sliderTrackFill:et.gray40,sliderHandleInnerFill:et.gray40,sliderHandleInnerFillDisabled:et.gray40}}},createBaseUiTheme=(tt,nt=primitives)=>createLightTheme(createBaseThemePrimitives(nt,tt),createThemeOverrides(tt)),baseuiLightTheme=createBaseUiTheme(emotionLightTheme,primitives),baseuiDarkTheme=createBaseUiTheme(emotionDarkTheme,primitives$1),globalStyles=tt=>css$2("html{font-size:",tt.fontSizes.mdPx,"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:",tt.genericFonts.bodyFont,";font-weight:",tt.fontWeights.normal,";line-height:",tt.lineHeights.base,";color:",tt.colors.bodyText,";background-color:",tt.colors.bgColor,";-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:",transparentize(tt.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:400;}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;}::-webkit-scrollbar{background:transparent;border-radius:100px;height:6px;width:6px;}::-webkit-scrollbar:active{background:',tt.colors.fadedText10,";}:hover::-webkit-scrollbar-thumb:vertical,:hover::-webkit-scrollbar-thumb:horizontal{background:",tt.colors.fadedText40,";border-radius:100px;}"),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},UPPERCASE=/[\p{Lu}]/u,LOWERCASE=/[\p{Ll}]/u,LEADING_CAPITAL=/^[\p{Lu}](?![\p{Lu}])/gu,IDENTIFIER=/([\p{Alpha}\p{N}_]|$)/u,SEPARATORS=/[_.\- ]+/,LEADING_SEPARATORS=new RegExp("^"+SEPARATORS.source),SEPARATORS_AND_IDENTIFIER=new RegExp(SEPARATORS.source+IDENTIFIER.source,"gu"),NUMBERS_AND_IDENTIFIER=new RegExp("\\d+"+IDENTIFIER.source,"gu"),preserveCamelCase=(tt,nt,et,rt)=>{let ot=!1,at=!1,st=!1,ut=!1;for(let ct=0;ct<tt.length;ct++){const pt=tt[ct];ut=ct>2?tt[ct-3]==="-":!0,ot&&UPPERCASE.test(pt)?(tt=tt.slice(0,ct)+"-"+tt.slice(ct),ot=!1,st=at,at=!0,ct++):at&&st&&LOWERCASE.test(pt)&&(!ut||rt)?(tt=tt.slice(0,ct-1)+"-"+tt.slice(ct-1),st=at,at=!1,ot=!0):(ot=nt(pt)===pt&&et(pt)!==pt,st=at,at=et(pt)===pt&&nt(pt)!==pt)}return tt},preserveConsecutiveUppercase=(tt,nt)=>(LEADING_CAPITAL.lastIndex=0,tt.replace(LEADING_CAPITAL,et=>nt(et))),postProcess=(tt,nt)=>(SEPARATORS_AND_IDENTIFIER.lastIndex=0,NUMBERS_AND_IDENTIFIER.lastIndex=0,tt.replace(SEPARATORS_AND_IDENTIFIER,(et,rt)=>nt(rt)).replace(NUMBERS_AND_IDENTIFIER,et=>nt(et)));function camelCase(tt,nt){if(!(typeof tt=="string"||Array.isArray(tt)))throw new TypeError("Expected the input to be `string | string[]`");if(nt={pascalCase:!1,preserveConsecutiveUppercase:!1,...nt},Array.isArray(tt)?tt=tt.map(at=>at.trim()).filter(at=>at.length).join("-"):tt=tt.trim(),tt.length===0)return"";const et=nt.locale===!1?at=>at.toLowerCase():at=>at.toLocaleLowerCase(nt.locale),rt=nt.locale===!1?at=>at.toUpperCase():at=>at.toLocaleUpperCase(nt.locale);return tt.length===1?SEPARATORS.test(tt)?"":nt.pascalCase?rt(tt):et(tt):(tt!==et(tt)&&(tt=preserveCamelCase(tt,et,rt,nt.preserveConsecutiveUppercase)),tt=tt.replace(LEADING_SEPARATORS,""),tt=nt.preserveConsecutiveUppercase?preserveConsecutiveUppercase(tt,et):et(tt),nt.pascalCase&&(tt=rt(tt.charAt(0))+tt.slice(1)),postProcess(tt,rt))}var ListCache$3=_ListCache;function stackClear$2(){this.__data__=new ListCache$3,this.size=0}var _stackClear=stackClear$2;function stackDelete$2(tt){var nt=this.__data__,et=nt.delete(tt);return this.size=nt.size,et}var _stackDelete=stackDelete$2;function stackGet$2(tt){return this.__data__.get(tt)}var _stackGet=stackGet$2;function stackHas$2(tt){return this.__data__.has(tt)}var _stackHas=stackHas$2,ListCache$2=_ListCache,Map$3=_Map,MapCache$2=_MapCache,LARGE_ARRAY_SIZE$2=200;function stackSet$2(tt,nt){var et=this.__data__;if(et instanceof ListCache$2){var rt=et.__data__;if(!Map$3||rt.length<LARGE_ARRAY_SIZE$2-1)return rt.push([tt,nt]),this.size=++et.size,this;et=this.__data__=new MapCache$2(rt)}return et.set(tt,nt),this.size=et.size,this}var _stackSet=stackSet$2,ListCache$1=_ListCache,stackClear$1=_stackClear,stackDelete$1=_stackDelete,stackGet$1=_stackGet,stackHas$1=_stackHas,stackSet$1=_stackSet;function Stack$5(tt){var nt=this.__data__=new ListCache$1(tt);this.size=nt.size}Stack$5.prototype.clear=stackClear$1;Stack$5.prototype.delete=stackDelete$1;Stack$5.prototype.get=stackGet$1;Stack$5.prototype.has=stackHas$1;Stack$5.prototype.set=stackSet$1;var _Stack=Stack$5;function arrayEach$2(tt,nt){for(var et=-1,rt=tt==null?0:tt.length;++et<rt&&nt(tt[et],et,tt)!==!1;);return tt}var _arrayEach=arrayEach$2,defineProperty$2=_defineProperty$G;function baseAssignValue$6(tt,nt,et){nt=="__proto__"&&defineProperty$2?defineProperty$2(tt,nt,{configurable:!0,enumerable:!0,value:et,writable:!0}):tt[nt]=et}var _baseAssignValue=baseAssignValue$6,baseAssignValue$5=_baseAssignValue,eq$3=eq_1,objectProto$r=Object.prototype,hasOwnProperty$o=objectProto$r.hasOwnProperty;function assignValue$4(tt,nt,et){var rt=tt[nt];(!(hasOwnProperty$o.call(tt,nt)&&eq$3(rt,et))||et===void 0&&!(nt in tt))&&baseAssignValue$5(tt,nt,et)}var _assignValue=assignValue$4,assignValue$3=_assignValue,baseAssignValue$4=_baseAssignValue;function copyObject$7(tt,nt,et,rt){var ot=!et;et||(et={});for(var at=-1,st=nt.length;++at<st;){var ut=nt[at],ct=rt?rt(et[ut],tt[ut],ut,et,tt):void 0;ct===void 0&&(ct=tt[ut]),ot?baseAssignValue$4(et,ut,ct):assignValue$3(et,ut,ct)}return et}var _copyObject=copyObject$7,baseGetTag$5=_baseGetTag,isObjectLike$9=isObjectLike_1,argsTag$6="[object Arguments]";function baseIsArguments$2(tt){return isObjectLike$9(tt)&&baseGetTag$5(tt)==argsTag$6}var _baseIsArguments=baseIsArguments$2,baseIsArguments$1=_baseIsArguments,isObjectLike$8=isObjectLike_1,objectProto$q=Object.prototype,hasOwnProperty$n=objectProto$q.hasOwnProperty,propertyIsEnumerable$3=objectProto$q.propertyIsEnumerable,isArguments$5=baseIsArguments$1(function(){return arguments}())?baseIsArguments$1:function(tt){return isObjectLike$8(tt)&&hasOwnProperty$n.call(tt,"callee")&&!propertyIsEnumerable$3.call(tt,"callee")},isArguments_1=isArguments$5,isBuffer$8={exports:{}};function stubFalse$1(){return!1}var stubFalse_1=stubFalse$1;isBuffer$8.exports;(function(tt,nt){var et=_root,rt=stubFalse_1,ot=nt&&!nt.nodeType&&nt,at=ot&&!0&&tt&&!tt.nodeType&&tt,st=at&&at.exports===ot,ut=st?et.Buffer:void 0,ct=ut?ut.isBuffer:void 0,pt=ct||rt;tt.exports=pt})(isBuffer$8,isBuffer$8.exports);var isBufferExports=isBuffer$8.exports,baseGetTag$4=_baseGetTag,isLength$2=isLength_1,isObjectLike$7=isObjectLike_1,argsTag$5="[object Arguments]",arrayTag$4="[object Array]",boolTag$5="[object Boolean]",dateTag$5="[object Date]",errorTag$4="[object Error]",funcTag$3="[object Function]",mapTag$9="[object Map]",numberTag$5="[object Number]",objectTag$8="[object Object]",regexpTag$5="[object RegExp]",setTag$9="[object Set]",stringTag$6="[object String]",weakMapTag$4="[object WeakMap]",arrayBufferTag$5="[object ArrayBuffer]",dataViewTag$7="[object DataView]",float32Tag$3="[object Float32Array]",float64Tag$3="[object Float64Array]",int8Tag$3="[object Int8Array]",int16Tag$3="[object Int16Array]",int32Tag$3="[object Int32Array]",uint8Tag$3="[object Uint8Array]",uint8ClampedTag$3="[object Uint8ClampedArray]",uint16Tag$3="[object Uint16Array]",uint32Tag$3="[object Uint32Array]",typedArrayTags$1={};typedArrayTags$1[float32Tag$3]=typedArrayTags$1[float64Tag$3]=typedArrayTags$1[int8Tag$3]=typedArrayTags$1[int16Tag$3]=typedArrayTags$1[int32Tag$3]=typedArrayTags$1[uint8Tag$3]=typedArrayTags$1[uint8ClampedTag$3]=typedArrayTags$1[uint16Tag$3]=typedArrayTags$1[uint32Tag$3]=!0;typedArrayTags$1[argsTag$5]=typedArrayTags$1[arrayTag$4]=typedArrayTags$1[arrayBufferTag$5]=typedArrayTags$1[boolTag$5]=typedArrayTags$1[dataViewTag$7]=typedArrayTags$1[dateTag$5]=typedArrayTags$1[errorTag$4]=typedArrayTags$1[funcTag$3]=typedArrayTags$1[mapTag$9]=typedArrayTags$1[numberTag$5]=typedArrayTags$1[objectTag$8]=typedArrayTags$1[regexpTag$5]=typedArrayTags$1[setTag$9]=typedArrayTags$1[stringTag$6]=typedArrayTags$1[weakMapTag$4]=!1;function baseIsTypedArray$2(tt){return isObjectLike$7(tt)&&isLength$2(tt.length)&&!!typedArrayTags$1[baseGetTag$4(tt)]}var _baseIsTypedArray=baseIsTypedArray$2;function baseUnary$6(tt){return function(nt){return tt(nt)}}var _baseUnary=baseUnary$6,_nodeUtil={exports:{}};_nodeUtil.exports;(function(tt,nt){var et=_freeGlobal,rt=nt&&!nt.nodeType&&nt,ot=rt&&!0&&tt&&!tt.nodeType&&tt,at=ot&&ot.exports===rt,st=at&&et.process,ut=function(){try{var ct=ot&&ot.require&&ot.require("util").types;return ct||st&&st.binding&&st.binding("util")}catch{}}();tt.exports=ut})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray$1=_baseIsTypedArray,baseUnary$5=_baseUnary,nodeUtil$3=_nodeUtilExports,nodeIsTypedArray$1=nodeUtil$3&&nodeUtil$3.isTypedArray,isTypedArray$5=nodeIsTypedArray$1?baseUnary$5(nodeIsTypedArray$1):baseIsTypedArray$1,isTypedArray_1=isTypedArray$5,baseTimes$1=_baseTimes,isArguments$4=isArguments_1,isArray$f=isArray_1,isBuffer$7=isBufferExports,isIndex$3=_isIndex,isTypedArray$4=isTypedArray_1,objectProto$p=Object.prototype,hasOwnProperty$m=objectProto$p.hasOwnProperty;function arrayLikeKeys$3(tt,nt){var et=isArray$f(tt),rt=!et&&isArguments$4(tt),ot=!et&&!rt&&isBuffer$7(tt),at=!et&&!rt&&!ot&&isTypedArray$4(tt),st=et||rt||ot||at,ut=st?baseTimes$1(tt.length,String):[],ct=ut.length;for(var pt in tt)(nt||hasOwnProperty$m.call(tt,pt))&&!(st&&(pt=="length"||ot&&(pt=="offset"||pt=="parent")||at&&(pt=="buffer"||pt=="byteLength"||pt=="byteOffset")||isIndex$3(pt,ct)))&&ut.push(pt);return ut}var _arrayLikeKeys=arrayLikeKeys$3,objectProto$o=Object.prototype;function isPrototype$4(tt){var nt=tt&&tt.constructor,et=typeof nt=="function"&&nt.prototype||objectProto$o;return tt===et}var _isPrototype=isPrototype$4;function overArg$3(tt,nt){return function(et){return tt(nt(et))}}var _overArg=overArg$3,overArg$2=_overArg,nativeKeys$2=overArg$2(Object.keys,Object),_nativeKeys=nativeKeys$2,isPrototype$3=_isPrototype,nativeKeys$1=_nativeKeys,objectProto$n=Object.prototype,hasOwnProperty$l=objectProto$n.hasOwnProperty;function baseKeys$2(tt){if(!isPrototype$3(tt))return nativeKeys$1(tt);var nt=[];for(var et in Object(tt))hasOwnProperty$l.call(tt,et)&&et!="constructor"&&nt.push(et);return nt}var _baseKeys=baseKeys$2,arrayLikeKeys$2=_arrayLikeKeys,baseKeys$1=_baseKeys,isArrayLike$5=isArrayLike_1;function keys$9(tt){return isArrayLike$5(tt)?arrayLikeKeys$2(tt):baseKeys$1(tt)}var keys_1=keys$9,copyObject$6=_copyObject,keys$8=keys_1;function baseAssign$1(tt,nt){return tt&&copyObject$6(nt,keys$8(nt),tt)}var _baseAssign=baseAssign$1;function nativeKeysIn$2(tt){var nt=[];if(tt!=null)for(var et in Object(tt))nt.push(et);return nt}var _nativeKeysIn=nativeKeysIn$2,isObject$a=isObject_1,isPrototype$2=_isPrototype,nativeKeysIn$1=_nativeKeysIn,objectProto$m=Object.prototype,hasOwnProperty$k=objectProto$m.hasOwnProperty;function baseKeysIn$2(tt){if(!isObject$a(tt))return nativeKeysIn$1(tt);var nt=isPrototype$2(tt),et=[];for(var rt in tt)rt=="constructor"&&(nt||!hasOwnProperty$k.call(tt,rt))||et.push(rt);return et}var _baseKeysIn=baseKeysIn$2,arrayLikeKeys$1=_arrayLikeKeys,baseKeysIn$1=_baseKeysIn,isArrayLike$4=isArrayLike_1;function keysIn$6(tt){return isArrayLike$4(tt)?arrayLikeKeys$1(tt,!0):baseKeysIn$1(tt)}var keysIn_1=keysIn$6,copyObject$5=_copyObject,keysIn$5=keysIn_1;function baseAssignIn$1(tt,nt){return tt&&copyObject$5(nt,keysIn$5(nt),tt)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};_cloneBuffer.exports;(function(tt,nt){var et=_root,rt=nt&&!nt.nodeType&&nt,ot=rt&&!0&&tt&&!tt.nodeType&&tt,at=ot&&ot.exports===rt,st=at?et.Buffer:void 0,ut=st?st.allocUnsafe:void 0;function ct(pt,dt){if(dt)return pt.slice();var ft=pt.length,bt=ut?ut(ft):new pt.constructor(ft);return pt.copy(bt),bt}tt.exports=ct})(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports;function copyArray$4(tt,nt){var et=-1,rt=tt.length;for(nt||(nt=Array(rt));++et<rt;)nt[et]=tt[et];return nt}var _copyArray=copyArray$4;function stubArray$3(){return[]}var stubArray_1=stubArray$3,arrayFilter$1=_arrayFilter,stubArray$2=stubArray_1,objectProto$l=Object.prototype,propertyIsEnumerable$2=objectProto$l.propertyIsEnumerable,nativeGetSymbols$2=Object.getOwnPropertySymbols,getSymbols$4=nativeGetSymbols$2?function(tt){return tt==null?[]:(tt=Object(tt),arrayFilter$1(nativeGetSymbols$2(tt),function(nt){return propertyIsEnumerable$2.call(tt,nt)}))}:stubArray$2,_getSymbols=getSymbols$4,copyObject$4=_copyObject,getSymbols$3=_getSymbols;function copySymbols$1(tt,nt){return copyObject$4(tt,getSymbols$3(tt),nt)}var _copySymbols=copySymbols$1;function arrayPush$4(tt,nt){for(var et=-1,rt=nt.length,ot=tt.length;++et<rt;)tt[ot+et]=nt[et];return tt}var _arrayPush=arrayPush$4,overArg$1=_overArg,getPrototype$4=overArg$1(Object.getPrototypeOf,Object),_getPrototype=getPrototype$4,arrayPush$3=_arrayPush,getPrototype$3=_getPrototype,getSymbols$2=_getSymbols,stubArray$1=stubArray_1,nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbolsIn$2=nativeGetSymbols$1?function(tt){for(var nt=[];tt;)arrayPush$3(nt,getSymbols$2(tt)),tt=getPrototype$3(tt);return nt}:stubArray$1,_getSymbolsIn=getSymbolsIn$2,copyObject$3=_copyObject,getSymbolsIn$1=_getSymbolsIn;function copySymbolsIn$1(tt,nt){return copyObject$3(tt,getSymbolsIn$1(tt),nt)}var _copySymbolsIn=copySymbolsIn$1,arrayPush$2=_arrayPush,isArray$e=isArray_1;function baseGetAllKeys$3(tt,nt,et){var rt=nt(tt);return isArray$e(tt)?rt:arrayPush$2(rt,et(tt))}var _baseGetAllKeys=baseGetAllKeys$3,baseGetAllKeys$2=_baseGetAllKeys,getSymbols$1=_getSymbols,keys$7=keys_1;function getAllKeys$3(tt){return baseGetAllKeys$2(tt,keys$7,getSymbols$1)}var _getAllKeys=getAllKeys$3,baseGetAllKeys$1=_baseGetAllKeys,getSymbolsIn=_getSymbolsIn,keysIn$4=keysIn_1;function getAllKeysIn$2(tt){return baseGetAllKeys$1(tt,keysIn$4,getSymbolsIn)}var _getAllKeysIn=getAllKeysIn$2,getNative$4=_getNative,root$b=_root,DataView$3=getNative$4(root$b,"DataView"),_DataView=DataView$3,getNative$3=_getNative,root$a=_root,Promise$3=getNative$3(root$a,"Promise"),_Promise=Promise$3,getNative$2=_getNative,root$9=_root,Set$3=getNative$2(root$9,"Set"),_Set=Set$3,getNative$1=_getNative,root$8=_root,WeakMap$3=getNative$1(root$8,"WeakMap"),_WeakMap=WeakMap$3,DataView$2=_DataView,Map$2=_Map,Promise$2=_Promise,Set$2=_Set,WeakMap$2=_WeakMap,baseGetTag$3=_baseGetTag,toSource$1=_toSource,mapTag$8="[object Map]",objectTag$7="[object Object]",promiseTag$1="[object Promise]",setTag$8="[object Set]",weakMapTag$3="[object WeakMap]",dataViewTag$6="[object DataView]",dataViewCtorString$1=toSource$1(DataView$2),mapCtorString$1=toSource$1(Map$2),promiseCtorString$1=toSource$1(Promise$2),setCtorString$1=toSource$1(Set$2),weakMapCtorString$1=toSource$1(WeakMap$2),getTag$6=baseGetTag$3;(DataView$2&&getTag$6(new DataView$2(new ArrayBuffer(1)))!=dataViewTag$6||Map$2&&getTag$6(new Map$2)!=mapTag$8||Promise$2&&getTag$6(Promise$2.resolve())!=promiseTag$1||Set$2&&getTag$6(new Set$2)!=setTag$8||WeakMap$2&&getTag$6(new WeakMap$2)!=weakMapTag$3)&&(getTag$6=function(tt){var nt=baseGetTag$3(tt),et=nt==objectTag$7?tt.constructor:void 0,rt=et?toSource$1(et):"";if(rt)switch(rt){case dataViewCtorString$1:return dataViewTag$6;case mapCtorString$1:return mapTag$8;case promiseCtorString$1:return promiseTag$1;case setCtorString$1:return setTag$8;case weakMapCtorString$1:return weakMapTag$3}return nt});var _getTag=getTag$6,objectProto$k=Object.prototype,hasOwnProperty$j=objectProto$k.hasOwnProperty;function initCloneArray$1(tt){var nt=tt.length,et=new tt.constructor(nt);return nt&&typeof tt[0]=="string"&&hasOwnProperty$j.call(tt,"index")&&(et.index=tt.index,et.input=tt.input),et}var _initCloneArray=initCloneArray$1,root$7=_root,Uint8Array$4=root$7.Uint8Array,_Uint8Array=Uint8Array$4,Uint8Array$3=_Uint8Array;function cloneArrayBuffer$4(tt){var nt=new tt.constructor(tt.byteLength);return new Uint8Array$3(nt).set(new Uint8Array$3(tt)),nt}var _cloneArrayBuffer=cloneArrayBuffer$4,cloneArrayBuffer$3=_cloneArrayBuffer;function cloneDataView$1(tt,nt){var et=nt?cloneArrayBuffer$3(tt.buffer):tt.buffer;return new tt.constructor(et,tt.byteOffset,tt.byteLength)}var _cloneDataView=cloneDataView$1,reFlags=/\w*$/;function cloneRegExp$1(tt){var nt=new tt.constructor(tt.source,reFlags.exec(tt));return nt.lastIndex=tt.lastIndex,nt}var _cloneRegExp=cloneRegExp$1,Symbol$5=_Symbol,symbolProto$3=Symbol$5?Symbol$5.prototype:void 0,symbolValueOf$2=symbolProto$3?symbolProto$3.valueOf:void 0;function cloneSymbol$1(tt){return symbolValueOf$2?Object(symbolValueOf$2.call(tt)):{}}var _cloneSymbol=cloneSymbol$1,cloneArrayBuffer$2=_cloneArrayBuffer;function cloneTypedArray$3(tt,nt){var et=nt?cloneArrayBuffer$2(tt.buffer):tt.buffer;return new tt.constructor(et,tt.byteOffset,tt.length)}var _cloneTypedArray=cloneTypedArray$3,cloneArrayBuffer$1=_cloneArrayBuffer,cloneDataView=_cloneDataView,cloneRegExp=_cloneRegExp,cloneSymbol=_cloneSymbol,cloneTypedArray$2=_cloneTypedArray,boolTag$4="[object Boolean]",dateTag$4="[object Date]",mapTag$7="[object Map]",numberTag$4="[object Number]",regexpTag$4="[object RegExp]",setTag$7="[object Set]",stringTag$5="[object String]",symbolTag$5="[object Symbol]",arrayBufferTag$4="[object ArrayBuffer]",dataViewTag$5="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]";function initCloneByTag$1(tt,nt,et){var rt=tt.constructor;switch(nt){case arrayBufferTag$4:return cloneArrayBuffer$1(tt);case boolTag$4:case dateTag$4:return new rt(+tt);case dataViewTag$5:return cloneDataView(tt,et);case float32Tag$2:case float64Tag$2:case int8Tag$2:case int16Tag$2:case int32Tag$2:case uint8Tag$2:case uint8ClampedTag$2:case uint16Tag$2:case uint32Tag$2:return cloneTypedArray$2(tt,et);case mapTag$7:return new rt;case numberTag$4:case stringTag$5:return new rt(tt);case regexpTag$4:return cloneRegExp(tt);case setTag$7:return new rt;case symbolTag$5:return cloneSymbol(tt)}}var _initCloneByTag=initCloneByTag$1,isObject$9=isObject_1,objectCreate$1=Object.create,baseCreate$2=function(){function tt(){}return function(nt){if(!isObject$9(nt))return{};if(objectCreate$1)return objectCreate$1(nt);tt.prototype=nt;var et=new tt;return tt.prototype=void 0,et}}(),_baseCreate=baseCreate$2,baseCreate$1=_baseCreate,getPrototype$2=_getPrototype,isPrototype$1=_isPrototype;function initCloneObject$3(tt){return typeof tt.constructor=="function"&&!isPrototype$1(tt)?baseCreate$1(getPrototype$2(tt)):{}}var _initCloneObject=initCloneObject$3,getTag$5=_getTag,isObjectLike$6=isObjectLike_1,mapTag$6="[object Map]";function baseIsMap$1(tt){return isObjectLike$6(tt)&&getTag$5(tt)==mapTag$6}var _baseIsMap=baseIsMap$1,baseIsMap=_baseIsMap,baseUnary$4=_baseUnary,nodeUtil$2=_nodeUtilExports,nodeIsMap=nodeUtil$2&&nodeUtil$2.isMap,isMap$1=nodeIsMap?baseUnary$4(nodeIsMap):baseIsMap,isMap_1=isMap$1,getTag$4=_getTag,isObjectLike$5=isObjectLike_1,setTag$6="[object Set]";function baseIsSet$1(tt){return isObjectLike$5(tt)&&getTag$4(tt)==setTag$6}var _baseIsSet=baseIsSet$1,baseIsSet=_baseIsSet,baseUnary$3=_baseUnary,nodeUtil$1=_nodeUtilExports,nodeIsSet=nodeUtil$1&&nodeUtil$1.isSet,isSet$1=nodeIsSet?baseUnary$3(nodeIsSet):baseIsSet,isSet_1=isSet$1,Stack$4=_Stack,arrayEach$1=_arrayEach,assignValue$2=_assignValue,baseAssign=_baseAssign,baseAssignIn=_baseAssignIn,cloneBuffer$2=_cloneBufferExports,copyArray$3=_copyArray,copySymbols=_copySymbols,copySymbolsIn=_copySymbolsIn,getAllKeys$2=_getAllKeys,getAllKeysIn$1=_getAllKeysIn,getTag$3=_getTag,initCloneArray=_initCloneArray,initCloneByTag=_initCloneByTag,initCloneObject$2=_initCloneObject,isArray$d=isArray_1,isBuffer$6=isBufferExports,isMap=isMap_1,isObject$8=isObject_1,isSet=isSet_1,keys$6=keys_1,keysIn$3=keysIn_1,CLONE_DEEP_FLAG$2=1,CLONE_FLAT_FLAG$1=2,CLONE_SYMBOLS_FLAG$2=4,argsTag$4="[object Arguments]",arrayTag$3="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$3="[object Error]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",mapTag$5="[object Map]",numberTag$3="[object Number]",objectTag$6="[object Object]",regexpTag$3="[object RegExp]",setTag$5="[object Set]",stringTag$4="[object String]",symbolTag$4="[object Symbol]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]",cloneableTags={};cloneableTags[argsTag$4]=cloneableTags[arrayTag$3]=cloneableTags[arrayBufferTag$3]=cloneableTags[dataViewTag$4]=cloneableTags[boolTag$3]=cloneableTags[dateTag$3]=cloneableTags[float32Tag$1]=cloneableTags[float64Tag$1]=cloneableTags[int8Tag$1]=cloneableTags[int16Tag$1]=cloneableTags[int32Tag$1]=cloneableTags[mapTag$5]=cloneableTags[numberTag$3]=cloneableTags[objectTag$6]=cloneableTags[regexpTag$3]=cloneableTags[setTag$5]=cloneableTags[stringTag$4]=cloneableTags[symbolTag$4]=cloneableTags[uint8Tag$1]=cloneableTags[uint8ClampedTag$1]=cloneableTags[uint16Tag$1]=cloneableTags[uint32Tag$1]=!0;cloneableTags[errorTag$3]=cloneableTags[funcTag$2]=cloneableTags[weakMapTag$2]=!1;function baseClone$2(tt,nt,et,rt,ot,at){var st,ut=nt&CLONE_DEEP_FLAG$2,ct=nt&CLONE_FLAT_FLAG$1,pt=nt&CLONE_SYMBOLS_FLAG$2;if(et&&(st=ot?et(tt,rt,ot,at):et(tt)),st!==void 0)return st;if(!isObject$8(tt))return tt;var dt=isArray$d(tt);if(dt){if(st=initCloneArray(tt),!ut)return copyArray$3(tt,st)}else{var ft=getTag$3(tt),bt=ft==funcTag$2||ft==genTag$1;if(isBuffer$6(tt))return cloneBuffer$2(tt,ut);if(ft==objectTag$6||ft==argsTag$4||bt&&!ot){if(st=ct||bt?{}:initCloneObject$2(tt),!ut)return ct?copySymbolsIn(tt,baseAssignIn(st,tt)):copySymbols(tt,baseAssign(st,tt))}else{if(!cloneableTags[ft])return ot?tt:{};st=initCloneByTag(tt,ft,ut)}}at||(at=new Stack$4);var ht=at.get(tt);if(ht)return ht;at.set(tt,st),isSet(tt)?tt.forEach(function(Ot){st.add(baseClone$2(Ot,nt,et,Ot,tt,at))}):isMap(tt)&&tt.forEach(function(Ot,zt){st.set(zt,baseClone$2(Ot,nt,et,zt,tt,at))});var Mt=pt?ct?getAllKeysIn$1:getAllKeys$2:ct?keysIn$3:keys$6,mt=dt?void 0:Mt(tt);return arrayEach$1(mt||tt,function(Ot,zt){mt&&(zt=Ot,Ot=tt[zt]),assignValue$2(st,zt,baseClone$2(Ot,nt,et,zt,tt,at))}),st}var _baseClone=baseClone$2,baseClone$1=_baseClone,CLONE_DEEP_FLAG$1=1,CLONE_SYMBOLS_FLAG$1=4;function cloneDeep(tt){return baseClone$1(tt,CLONE_DEEP_FLAG$1|CLONE_SYMBOLS_FLAG$1)}var cloneDeep_1=cloneDeep;const cloneDeep$1=getDefaultExportFromCjs$1(cloneDeep_1);var baseAssignValue$3=_baseAssignValue,eq$2=eq_1;function assignMergeValue$3(tt,nt,et){(et!==void 0&&!eq$2(tt[nt],et)||et===void 0&&!(nt in tt))&&baseAssignValue$3(tt,nt,et)}var _assignMergeValue=assignMergeValue$3;function createBaseFor$2(tt){return function(nt,et,rt){for(var ot=-1,at=Object(nt),st=rt(nt),ut=st.length;ut--;){var ct=st[tt?ut:++ot];if(et(at[ct],ct,at)===!1)break}return nt}}var _createBaseFor=createBaseFor$2,createBaseFor$1=_createBaseFor,baseFor$3=createBaseFor$1(),_baseFor=baseFor$3,baseGetTag$2=_baseGetTag,getPrototype$1=_getPrototype,isObjectLike$4=isObjectLike_1,objectTag$5="[object Object]",funcProto$3=Function.prototype,objectProto$j=Object.prototype,funcToString$3=funcProto$3.toString,hasOwnProperty$i=objectProto$j.hasOwnProperty,objectCtorString$1=funcToString$3.call(Object);function isPlainObject$6(tt){if(!isObjectLike$4(tt)||baseGetTag$2(tt)!=objectTag$5)return!1;var nt=getPrototype$1(tt);if(nt===null)return!0;var et=hasOwnProperty$i.call(nt,"constructor")&&nt.constructor;return typeof et=="function"&&et instanceof et&&funcToString$3.call(et)==objectCtorString$1}var isPlainObject_1=isPlainObject$6;function safeGet$3(tt,nt){if(!(nt==="constructor"&&typeof tt[nt]=="function")&&nt!="__proto__")return tt[nt]}var _safeGet=safeGet$3,copyObject$2=_copyObject,keysIn$2=keysIn_1;function toPlainObject$2(tt){return copyObject$2(tt,keysIn$2(tt))}var toPlainObject_1=toPlainObject$2,assignMergeValue$2=_assignMergeValue,cloneBuffer$1=_cloneBufferExports,cloneTypedArray$1=_cloneTypedArray,copyArray$2=_copyArray,initCloneObject$1=_initCloneObject,isArguments$3=isArguments_1,isArray$c=isArray_1,isArrayLikeObject$2=isArrayLikeObject_1,isBuffer$5=isBufferExports,isFunction$3=isFunction_1,isObject$7=isObject_1,isPlainObject$5=isPlainObject_1,isTypedArray$3=isTypedArray_1,safeGet$2=_safeGet,toPlainObject$1=toPlainObject_1;function baseMergeDeep$2(tt,nt,et,rt,ot,at,st){var ut=safeGet$2(tt,et),ct=safeGet$2(nt,et),pt=st.get(ct);if(pt){assignMergeValue$2(tt,et,pt);return}var dt=at?at(ut,ct,et+"",tt,nt,st):void 0,ft=dt===void 0;if(ft){var bt=isArray$c(ct),ht=!bt&&isBuffer$5(ct),Mt=!bt&&!ht&&isTypedArray$3(ct);dt=ct,bt||ht||Mt?isArray$c(ut)?dt=ut:isArrayLikeObject$2(ut)?dt=copyArray$2(ut):ht?(ft=!1,dt=cloneBuffer$1(ct,!0)):Mt?(ft=!1,dt=cloneTypedArray$1(ct,!0)):dt=[]:isPlainObject$5(ct)||isArguments$3(ct)?(dt=ut,isArguments$3(ut)?dt=toPlainObject$1(ut):(!isObject$7(ut)||isFunction$3(ut))&&(dt=initCloneObject$1(ct))):ft=!1}ft&&(st.set(ct,dt),ot(dt,ct,rt,at,st),st.delete(ct)),assignMergeValue$2(tt,et,dt)}var _baseMergeDeep=baseMergeDeep$2,Stack$3=_Stack,assignMergeValue$1=_assignMergeValue,baseFor$2=_baseFor,baseMergeDeep$1=_baseMergeDeep,isObject$6=isObject_1,keysIn$1=keysIn_1,safeGet$1=_safeGet;function baseMerge$2(tt,nt,et,rt,ot){tt!==nt&&baseFor$2(nt,function(at,st){if(ot||(ot=new Stack$3),isObject$6(at))baseMergeDeep$1(tt,nt,st,et,baseMerge$2,rt,ot);else{var ut=rt?rt(safeGet$1(tt,st),at,st+"",tt,nt,ot):void 0;ut===void 0&&(ut=at),assignMergeValue$1(tt,st,ut)}},keysIn$1)}var _baseMerge=baseMerge$2,baseRest$3=_baseRest,isIterateeCall$2=_isIterateeCall;function createAssigner$2(tt){return baseRest$3(function(nt,et){var rt=-1,ot=et.length,at=ot>1?et[ot-1]:void 0,st=ot>2?et[2]:void 0;for(at=tt.length>3&&typeof at=="function"?(ot--,at):void 0,st&&isIterateeCall$2(et[0],et[1],st)&&(at=ot<3?void 0:at,ot=1),nt=Object(nt);++rt<ot;){var ut=et[rt];ut&&tt(nt,ut,rt,at)}return nt})}var _createAssigner=createAssigner$2,baseMerge$1=_baseMerge,createAssigner$1=_createAssigner,merge$5=createAssigner$1(function(tt,nt,et){baseMerge$1(tt,nt,et)}),merge_1$1=merge$5;const merge$6=getDefaultExportFromCjs$1(merge_1$1);var toFinite=toFinite_1;function toInteger$2(tt){var nt=toFinite(tt),et=nt%1;return nt===nt?et?nt-et:nt:0}var toInteger_1=toInteger$2,toInteger$1=toInteger_1,FUNC_ERROR_TEXT$4="Expected a function";function before$1(tt,nt){var et;if(typeof nt!="function")throw new TypeError(FUNC_ERROR_TEXT$4);return tt=toInteger$1(tt),function(){return--tt>0&&(et=nt.apply(this,arguments)),tt<=1&&(nt=void 0),et}}var before_1=before$1,before=before_1;function once(tt){return before(2,tt)}var once_1=once;const once$1=getDefaultExportFromCjs$1(once_1);function logMessage(...tt){}function logWarning(...tt){}function logError(...tt){console.error(...tt)}function logAlways(...tt){console.log(...tt)}const 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}`},localStorageAvailable=()=>{const tt="testData";try{const{localStorage:nt}=window;nt.setItem(tt,tt),nt.getItem(tt),nt.removeItem(tt)}catch{return!1}return!0},AUTO_THEME_NAME="Use system setting",CUSTOM_THEME_NAME="Custom Theme";function mergeTheme(tt,nt){if(nt&&isObject$h(nt)){const et=new CustomThemeConfig(nt);return createTheme(tt.name,et,tt)}return tt}const getMergedLightTheme=once$1(()=>{var tt;return mergeTheme(lightTheme,(tt=window.__streamlit)==null?void 0:tt.LIGHT_THEME)}),getMergedDarkTheme=once$1(()=>{var tt;return mergeTheme(darkTheme,(tt=window.__streamlit)==null?void 0:tt.DARK_THEME)}),getSystemTheme=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?getMergedDarkTheme():getMergedLightTheme(),createAutoTheme=()=>({...getSystemTheme(),name:AUTO_THEME_NAME}),createPresetThemes=()=>[createAutoTheme(),getMergedLightTheme(),getMergedDarkTheme()],isPresetTheme=tt=>createPresetThemes().map(et=>et.name).includes(tt.name),fontToEnum=tt=>{const nt=Object.keys(fonts).find(rt=>fonts[rt]===tt),et=CustomThemeConfig.FontFamily.SANS_SERIF;if(nt){const rt=decamelize$2(nt).toUpperCase();return rt in CustomThemeConfig.FontFamily?CustomThemeConfig.FontFamily[rt]:et}return et},fontEnumToString=tt=>tt!=null&&tt in CustomThemeConfig.FontFamily?fonts[camelCase(CustomThemeConfig.FontFamily[tt].toString())]:void 0,bgColorToBaseString=tt=>tt===void 0||getLuminance(tt)>.5?"light":"dark",isColor=tt=>{const nt=new Option().style;return nt.color=tt,nt.color!==""},createEmotionTheme=(tt,nt=baseTheme)=>{const{colors:et,genericFonts:rt}=nt.emotion,{font:ot,radii:at,fontSizes:st,...ut}=tt,ct=fontEnumToString(ot),pt=Object.entries(ut).reduce((vt,[At,St])=>(isColor(St)?vt[At]=St:isColor(`#${St}`)&&(vt[At]=`#${St}`),vt),{}),{secondaryBackgroundColor:dt,backgroundColor:ft,primaryColor:bt,textColor:ht,skeletonBackgroundColor:Mt,widgetBackgroundColor:mt,widgetBorderColor:Ot}=pt,zt={...et};bt&&(zt.primary=bt),ht&&(zt.bodyText=ht),dt&&(zt.secondaryBg=dt),ft&&(zt.bgColor=ft),mt&&(zt.widgetBackgroundColor=mt),Ot&&(zt.widgetBorderColor=Ot),Mt&&(zt.skeletonBackgroundColor=Mt);const yt={};return at&&(yt.radii={...nt.emotion.radii},at.checkboxRadius&&(yt.radii.md=addPxUnit(at.checkboxRadius)),at.baseWidgetRadius&&(yt.radii.default=addPxUnit(at.baseWidgetRadius))),st&&(yt.fontSizes={...nt.emotion.fontSizes},st.tinyFontSize&&(yt.fontSizes.twoSm=addPxUnit(st.tinyFontSize),yt.fontSizes.twoSmPx=st.tinyFontSize),st.smallFontSize&&(yt.fontSizes.sm=addPxUnit(st.smallFontSize),yt.fontSizes.smPx=st.smallFontSize),st.baseFontSize&&(yt.fontSizes.md=addPxUnit(st.baseFontSize),yt.fontSizes.mdPx=st.baseFontSize)),{...nt.emotion,colors:createEmotionColors(zt),genericFonts:{...rt,...ct&&{bodyFont:tt.bodyFont?tt.bodyFont:ct,headingFont:tt.bodyFont?tt.bodyFont:ct,codeFont:tt.codeFont?tt.codeFont:rt.codeFont}},...yt}},toThemeInput=tt=>{const{colors:nt,genericFonts:et}=tt;return{primaryColor:nt.primary,backgroundColor:nt.bgColor,secondaryBackgroundColor:nt.secondaryBg,textColor:nt.bodyText,font:fontToEnum(et.bodyFont)}},toExportedTheme=tt=>{const{colors:nt}=tt,et=toThemeInput(tt);return{primaryColor:et.primaryColor,backgroundColor:et.backgroundColor,secondaryBackgroundColor:et.secondaryBackgroundColor,textColor:et.textColor,base:bgColorToBaseString(et.backgroundColor),font:fontEnumToString(et.font),...computeDerivedColors(nt)}},completeThemeInput=(tt,nt)=>new CustomThemeConfig({...toThemeInput(nt.emotion),...tt}),createTheme=(tt,nt,et,rt=!1)=>{et?nt=completeThemeInput(nt,et):nt.base===CustomThemeConfig.BaseTheme.DARK?nt=completeThemeInput(nt,darkTheme):nt=completeThemeInput(nt,lightTheme);const ot=nt.backgroundColor,at=merge$6(cloneDeep$1(et||(getLuminance(ot)>.5?lightTheme:darkTheme)),{emotion:{inSidebar:rt}}),st=createEmotionTheme(nt,at);return{...at,name:tt,emotion:st,basewebTheme:createBaseUiTheme(st,at.primitives)}},getCachedTheme=()=>{if(!localStorageAvailable())return null;const tt=window.localStorage.getItem(LocalStore.ACTIVE_THEME);if(!tt)return null;const{name:nt,themeInput:et}=JSON.parse(tt);switch(nt){case lightTheme.name:return getMergedLightTheme();case darkTheme.name:return getMergedDarkTheme();default:return createTheme(nt,et)}},deleteOldCachedThemes=()=>{const{CACHED_THEME_VERSION:tt,CACHED_THEME_BASE_KEY:nt}=LocalStore,{localStorage:et}=window;et.removeItem("stActiveTheme"),et.removeItem(nt);for(let rt=1;rt<=tt;rt++)et.removeItem(`${nt}-v${rt}`)},setCachedTheme=tt=>{if(!localStorageAvailable()||(deleteOldCachedThemes(),isLightThemeInQueryParams()||isDarkThemeInQueryParams()))return;const nt={name:tt.name,...!isPresetTheme(tt)&&{themeInput:toThemeInput(tt.emotion)}};window.localStorage.setItem(LocalStore.ACTIVE_THEME,JSON.stringify(nt))},removeCachedTheme=()=>{localStorageAvailable()&&window.localStorage.removeItem(LocalStore.ACTIVE_THEME)},getHostSpecifiedTheme=()=>isLightThemeInQueryParams()?getMergedLightTheme():isDarkThemeInQueryParams()?getMergedDarkTheme():createAutoTheme(),getDefaultTheme=()=>{const tt=getCachedTheme();return tt&&tt.name!==AUTO_THEME_NAME?tt:getHostSpecifiedTheme()},whiteSpace$1=/\s+/;function computeSpacingStyle(tt,nt){return tt===""?"":tt.split(whiteSpace$1).map(et=>et==="0"?nt.spacing.none:et in nt.spacing?nt.spacing[et]:(logError(`Invalid spacing value: ${et}`),nt.spacing.none)).join(" ")}function addPxUnit(tt){return`${tt}px`}function blend(tt,nt){if(nt===void 0)return tt;const[et,rt,ot,at]=parseToRgba(tt);if(at===1)return tt;const[st,ut,ct,pt]=parseToRgba(nt),dt=at+pt*(1-at),ft=Math.round((at*et+pt*st*(1-at))/dt),bt=Math.round((at*rt+pt*ut*(1-at))/dt),ht=Math.round((at*ot+pt*ct*(1-at))/dt);return toHex(`rgba(${ft}, ${bt}, ${ht}, ${dt})`)}const convertRemToPx=tt=>parseFloat(tt.replace(/rem$/,""))*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16),STALE_TRANSITION_PARAMS="1s ease-in 0.5s",STALE_STYLES={opacity:.33,transition:`opacity ${STALE_TRANSITION_PARAMS}`},LibContext=React$1.createContext({isFullScreen:!1,setFullScreen:()=>{},addScriptFinishedHandler:()=>{},removeScriptFinishedHandler:()=>{},activeTheme:baseTheme,setTheme:()=>{},availableThemes:[],addThemes:()=>{},onPageChange:()=>{},currentPageScriptHash:"",libConfig:{},fragmentIdsThisRun:[],locale:window.navigator.language});var 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$3(function(tt){return reactPropsRegex.test(tt)||tt.charCodeAt(0)===111&&tt.charCodeAt(1)===110&&tt.charCodeAt(2)<91}),isDevelopment=!1,testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function tt(nt){return nt!=="theme"},getDefaultShouldForwardProp=function tt(nt){return typeof nt=="string"&&nt.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function tt(nt,et,rt){var ot;if(et){var at=et.shouldForwardProp;ot=nt.__emotion_forwardProp&&at?function(st){return nt.__emotion_forwardProp(st)&&at(st)}:at}return typeof ot!="function"&&rt&&(ot=nt.__emotion_forwardProp),ot},Insertion=function tt(nt){var et=nt.cache,rt=nt.serialized,ot=nt.isStringTag;return registerStyles(et,rt,ot),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(et,rt,ot)}),null},createStyled=function tt(nt,et){var rt=nt.__emotion_real===nt,ot=rt&&nt.__emotion_base||nt,at,st;et!==void 0&&(at=et.label,st=et.target);var ut=composeShouldForwardProps(nt,et,rt),ct=ut||getDefaultShouldForwardProp(ot),pt=!ct("as");return function(){var dt=arguments,ft=rt&&nt.__emotion_styles!==void 0?nt.__emotion_styles.slice(0):[];if(at!==void 0&&ft.push("label:"+at+";"),dt[0]==null||dt[0].raw===void 0)ft.push.apply(ft,dt);else{var bt=dt[0];ft.push(bt[0]);for(var ht=dt.length,Mt=1;Mt<ht;Mt++)ft.push(dt[Mt],bt[Mt])}var mt=withEmotionCache(function(Ot,zt,yt){var vt=pt&&Ot.as||ot,At="",St=[],Et=Ot;if(Ot.theme==null){Et={};for(var Tt in Ot)Et[Tt]=Ot[Tt];Et.theme=reactExports.useContext(ThemeContext$1)}typeof Ot.className=="string"?At=getRegisteredStyles(zt.registered,St,Ot.className):Ot.className!=null&&(At=Ot.className+" ");var Rt=serializeStyles(ft.concat(St),zt.registered,Et);At+=zt.key+"-"+Rt.name,st!==void 0&&(At+=" "+st);var Ct=pt&&ut===void 0?getDefaultShouldForwardProp(vt):ct,wt={};for(var Lt in Ot)pt&&Lt==="as"||Ct(Lt)&&(wt[Lt]=Ot[Lt]);return wt.className=At,yt&&(wt.ref=yt),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:zt,serialized:Rt,isStringTag:typeof vt=="string"}),reactExports.createElement(vt,wt))});return mt.displayName=at!==void 0?at:"Styled("+(typeof ot=="string"?ot:ot.displayName||ot.name||"Component")+")",mt.defaultProps=nt.defaultProps,mt.__emotion_real=mt,mt.__emotion_base=ot,mt.__emotion_styles=ft,mt.__emotion_forwardProp=ut,Object.defineProperty(mt,"toString",{value:function(){return st===void 0&&isDevelopment?"NO_COMPONENT_SELECTOR":"."+st}}),mt.withComponent=function(Ot,zt){var yt=tt(Ot,_extends$Q({},et,zt,{shouldForwardProp:composeShouldForwardProps(mt,zt,!0)}));return yt.apply(void 0,ft)},mt}},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"],newStyled=createStyled.bind(null);tags.forEach(function(tt){newStyled[tt]=newStyled(tt)});var SIZE$3={small:"small",medium:"medium",large:"large"},spin={from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},StyledSpinner=styled("i",function(tt){var nt=tt.$theme,et=tt.$color,rt=et===void 0?nt.colors.contentAccent:et,ot=tt.$borderWidth,at=tt.$size,st=at===void 0?SIZE$3.medium:at,ut={large:nt.sizing.scale300,medium:nt.sizing.scale100,small:nt.sizing.scale0}[ot||st],ct={large:nt.sizing.scale1000,medium:nt.sizing.scale900,small:nt.sizing.scale800}[st];return ut||(ut=nt.sizing[ot],ut||(ut="".concat(parseInt(ot),"px"))),ct||(ct=nt.sizing[st],ct||(ct="".concat(parseInt(st),"px"))),{display:"block",animationName:spin,animationDuration:nt.animation.timing1000,animationIterationCount:"infinite",animationTimingFunction:"linear",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderRadius:"50%",borderTopColor:rt,borderRightColor:nt.colors.backgroundTertiary,borderBottomColor:nt.colors.backgroundTertiary,borderLeftColor:nt.colors.backgroundTertiary,borderLeftWidth:ut,borderRightWidth:ut,borderTopWidth:ut,borderBottomWidth:ut,width:ct,height:ct,cursor:"wait"}});StyledSpinner.displayName="StyledSpinner";StyledSpinner.displayName="StyledSpinner";const StyledSpinnerIcon=newStyled(StyledSpinner,{shouldForwardProp:tt=>isPropValid(tt)&&!["size"].includes(tt),target:"e14lo1l0"})(({usingCustomTheme:tt,size:nt,margin:et,padding:rt,theme:ot})=>({width:ot.iconSizes[nt],height:ot.iconSizes[nt],fontSize:ot.iconSizes[nt],justifyContents:"center",margin:computeSpacingStyle(et,ot),padding:computeSpacingStyle(rt,ot),borderColor:ot.colors.borderColor,borderTopColor:tt?ot.colors.primary:ot.colors.blue70,borderWidth:ot.sizes.spinnerThickness,flexGrow:0,flexShrink:0})),StyledIcon=newStyled("span",{shouldForwardProp:tt=>isPropValid(tt)&&!["size","as"].includes(tt),target:"e14lo1l1"})(({color:tt,size:nt,margin:et,padding:rt,theme:ot})=>({color:ot.colors[tt],fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:ot.iconSizes[nt],width:ot.iconSizes[nt],height:ot.iconSizes[nt],margin:computeSpacingStyle(et,ot),padding:computeSpacingStyle(rt,ot),flexShrink:0})),StyledDynamicIcon=newStyled("span",{target:"e14lo1l2"})(({size:tt="lg",margin:nt="",padding:et="",theme:rt})=>({fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:rt.iconSizes[tt],width:rt.iconSizes[tt],height:rt.iconSizes[tt],margin:computeSpacingStyle(nt,rt),padding:computeSpacingStyle(et,rt),flexShrink:0})),StyledImageIcon=newStyled("img",{target:"e14lo1l3"})(({})=>({width:"100%",height:"100%"})),StyledEmojiIcon=newStyled("span",{target:"e14lo1l4"})(({size:tt,margin:nt,padding:et,theme:rt})=>({display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:rt.iconSizes[tt],width:rt.iconSizes[tt],height:rt.iconSizes[tt],margin:computeSpacingStyle(nt,rt),padding:computeSpacingStyle(et,rt)})),getDefaultProps$1=({size:tt,margin:nt,padding:et})=>({size:tt||"md",margin:nt||"",padding:et||""}),Icon$2=({content:tt,color:nt,size:et,margin:rt,padding:ot,testid:at})=>jsx$1(StyledIcon,{as:tt,color:nt||"inherit","aria-hidden":"true","data-testid":at,...getDefaultProps$1({size:et,margin:rt,padding:ot})}),EmojiIcon=({size:tt,margin:nt,padding:et,children:rt,testid:ot})=>jsx$1(StyledEmojiIcon,{"data-testid":ot||"stIconEmoji","aria-hidden":"true",...getDefaultProps$1({size:tt,margin:nt,padding:et}),children:rt});function arrayReduce$1(tt,nt,et,rt){var ot=-1,at=tt==null?0:tt.length;for(rt&&at&&(et=tt[++ot]);++ot<at;)et=nt(et,tt[ot],ot,tt);return et}var _arrayReduce=arrayReduce$1;function basePropertyOf$1(tt){return function(nt){return tt==null?void 0:tt[nt]}}var _basePropertyOf=basePropertyOf$1,basePropertyOf=_basePropertyOf,deburredLetters={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},deburrLetter$1=basePropertyOf(deburredLetters),_deburrLetter=deburrLetter$1,deburrLetter=_deburrLetter,toString$6=toString_1,reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsComboMarksRange$3="\\u0300-\\u036f",reComboHalfMarksRange$3="\\ufe20-\\ufe2f",rsComboSymbolsRange$3="\\u20d0-\\u20ff",rsComboRange$3=rsComboMarksRange$3+reComboHalfMarksRange$3+rsComboSymbolsRange$3,rsCombo$2="["+rsComboRange$3+"]",reComboMark=RegExp(rsCombo$2,"g");function deburr$1(tt){return tt=toString$6(tt),tt&&tt.replace(reLatin,deburrLetter).replace(reComboMark,"")}var deburr_1=deburr$1,reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function asciiWords$1(tt){return tt.match(reAsciiWord)||[]}var _asciiWords=asciiWords$1,reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function hasUnicodeWord$1(tt){return reHasUnicodeWord.test(tt)}var _hasUnicodeWord=hasUnicodeWord$1,rsAstralRange$2="\\ud800-\\udfff",rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$2+reComboHalfMarksRange$2+rsComboSymbolsRange$2,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange$2="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange,rsApos$1="['’]",rsBreak="["+rsBreakRange+"]",rsCombo$1="["+rsComboRange$2+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange$2+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz$1="\\ud83c[\\udffb-\\udfff]",rsModifier$1="(?:"+rsCombo$1+"|"+rsFitz$1+")",rsNonAstral$1="[^"+rsAstralRange$2+"]",rsRegional$1="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$1="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ$2="\\u200d",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",rsOptContrLower="(?:"+rsApos$1+"(?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:"+rsApos$1+"(?:D|LL|M|RE|S|T|VE))?",reOptMod$1=rsModifier$1+"?",rsOptVar$1="["+rsVarRange$2+"]?",rsOptJoin$1="(?:"+rsZWJ$2+"(?:"+[rsNonAstral$1,rsRegional$1,rsSurrPair$1].join("|")+")"+rsOptVar$1+reOptMod$1+")*",rsOrdLower="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsOrdUpper="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rsSeq$1=rsOptVar$1+reOptMod$1+rsOptJoin$1,rsEmoji="(?:"+[rsDingbat,rsRegional$1,rsSurrPair$1].join("|")+")"+rsSeq$1,reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptContrLower+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+"+rsOptContrUpper+"(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+"+rsOptContrLower,rsUpper+"+"+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join("|"),"g");function unicodeWords$1(tt){return tt.match(reUnicodeWord)||[]}var _unicodeWords=unicodeWords$1,asciiWords=_asciiWords,hasUnicodeWord=_hasUnicodeWord,toString$5=toString_1,unicodeWords=_unicodeWords;function words$1(tt,nt,et){return tt=toString$5(tt),nt=et?void 0:nt,nt===void 0?hasUnicodeWord(tt)?unicodeWords(tt):asciiWords(tt):tt.match(nt)||[]}var words_1=words$1,arrayReduce=_arrayReduce,deburr=deburr_1,words=words_1,rsApos="['’]",reApos=RegExp(rsApos,"g");function createCompounder$1(tt){return function(nt){return arrayReduce(words(deburr(nt).replace(reApos,"")),tt,"")}}var _createCompounder=createCompounder$1,createCompounder=_createCompounder,snakeCase=createCompounder(function(tt,nt,et){return tt+(et?"_":"")+nt.toLowerCase()}),snakeCase_1=snakeCase;const snakeCase$1=getDefaultExportFromCjs$1(snakeCase_1),StyledMaterialIcon=newStyled("span",{target:"e5a6sq90"})(({size:tt,margin:nt,padding:et,theme:rt,color:ot})=>({display:"inline-flex",alignItems:"center",justifyContents:"center",color:ot,fontSize:rt.iconSizes[tt],width:rt.iconSizes[tt],height:rt.iconSizes[tt],margin:computeSpacingStyle(nt,rt),padding:computeSpacingStyle(et,rt),userSelect:"none",fontFamily:rt.genericFonts.iconFont,fontWeight:rt.fontWeights.normal,fontStyle:"normal",lineHeight:rt.lineHeights.none,letterSpacing:"normal",textTransform:"none",whiteSpace:"nowrap",wordWrap:"normal",direction:"ltr",fontFeatureSettings:"liga",MozFontFeatureSettings:"liga",WebkitFontFeatureSettings:"liga",WebkitFontSmoothing:"antialiased"})),getDefaultProps=({size:tt,margin:nt,padding:et,color:rt})=>({size:tt||"md",margin:nt||"",padding:et||"",color:rt||"inherit"}),MaterialFontIcon=({iconName:tt,...nt})=>jsx$1(StyledMaterialIcon,{...getDefaultProps(nt),"data-testid":nt.testid||"stIconMaterial",children:snakeCase$1(tt)});function parseIconPackEntry(tt){const nt=tt.match(/^:(.+)\/(.+):$/);if(nt===null)return{pack:"emoji",icon:tt};const et=nt[1],rt=nt[2];return{pack:et,icon:rt}}function getFilledStarIconSrc(){return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTg2MF84NDMpIj48cGF0aCBkPSJNOS45OTk5NCAxNC4zOTE2TDEzLjQ1ODMgMTYuNDgzM0MxNC4wOTE2IDE2Ljg2NjYgMTQuODY2NiAxNi4zIDE0LjY5OTkgMTUuNTgzM0wxMy43ODMzIDExLjY1TDE2Ljg0MTYgOC45OTk5N0MxNy4zOTk5IDguNTE2NjMgMTcuMDk5OSA3LjU5OTk3IDE2LjM2NjYgNy41NDE2M0wxMi4zNDE2IDcuMTk5OTdMMTAuNzY2NiAzLjQ4MzNDMTAuNDgzMyAyLjgwODMgOS41MTY2MSAyLjgwODMgOS4yMzMyNyAzLjQ4MzNMNy42NTgyNyA3LjE5MTYzTDMuNjMzMjcgNy41MzMzQzIuODk5OTQgNy41OTE2MyAyLjU5OTk0IDguNTA4MyAzLjE1ODI3IDguOTkxNjNMNi4yMTY2MSAxMS42NDE2TDUuMjk5OTQgMTUuNTc1QzUuMTMzMjcgMTYuMjkxNiA1LjkwODI3IDE2Ljg1ODMgNi41NDE2MSAxNi40NzVMOS45OTk5NCAxNC4zOTE2WiIgZmlsbD0iI0ZBQ0EyQiIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwXzE4NjBfODQzIj48cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9IndoaXRlIi8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+"}const DynamicIconDispatcher=({iconValue:tt,...nt})=>{const{pack:et,icon:rt}=parseIconPackEntry(tt);switch(et){case"material":switch(rt){case"star_filled":return jsx$1(StyledDynamicIcon,{...nt,children:jsx$1(StyledImageIcon,{src:getFilledStarIconSrc(),"data-testid":nt.testid||"stImageIcon"})});default:return jsx$1(StyledDynamicIcon,{...nt,children:jsx$1(MaterialFontIcon,{pack:et,iconName:rt,...nt})})}case"emoji":default:return jsx$1(StyledDynamicIcon,{...nt,children:jsx$1(EmojiIcon,{...nt,children:rt})})}},DynamicIcon=tt=>jsx$1(reactExports.Suspense,{fallback:jsx$1(StyledDynamicIcon,{...tt,children:jsx$1(EmojiIcon,{...tt,children:" "})}),children:jsx$1(DynamicIconDispatcher,{...tt})},tt.iconValue),convert=function(tt){if(tt==null)return ok$1;if(typeof tt=="string")return typeFactory(tt);if(typeof tt=="object")return Array.isArray(tt)?anyFactory$1(tt):propsFactory(tt);if(typeof tt=="function")return castFactory$1(tt);throw new Error("Expected function, string, or object as test")};function anyFactory$1(tt){const nt=[];let et=-1;for(;++et<tt.length;)nt[et]=convert(tt[et]);return castFactory$1(rt);function rt(...ot){let at=-1;for(;++at<nt.length;)if(nt[at].call(this,...ot))return!0;return!1}}function propsFactory(tt){return castFactory$1(nt);function nt(et){let rt;for(rt in tt)if(et[rt]!==tt[rt])return!1;return!0}}function typeFactory(tt){return castFactory$1(nt);function nt(et){return et&&et.type===tt}}function castFactory$1(tt){return nt;function nt(et,...rt){return!!(et&&typeof et=="object"&&"type"in et&&tt.call(this,et,...rt))}}function ok$1(){return!0}function color(tt){return tt}const CONTINUE=!0,EXIT=!1,SKIP="skip",visitParents=function(tt,nt,et,rt){typeof nt=="function"&&typeof et!="function"&&(rt=et,et=nt,nt=null);const ot=convert(nt),at=rt?-1:1;st(tt,void 0,[])();function st(ut,ct,pt){const dt=ut&&typeof ut=="object"?ut:{};if(typeof dt.type=="string"){const bt=typeof dt.tagName=="string"?dt.tagName:typeof dt.name=="string"?dt.name:void 0;Object.defineProperty(ft,"name",{value:"node ("+(ut.type+(bt?"<"+bt+">":""))+")"})}return ft;function ft(){let bt=[],ht,Mt,mt;if((!nt||ot(ut,ct,pt[pt.length-1]||null))&&(bt=toResult(et(ut,pt)),bt[0]===EXIT))return bt;if(ut.children&&bt[0]!==SKIP)for(Mt=(rt?ut.children.length:-1)+at,mt=pt.concat(ut);Mt>-1&&Mt<ut.children.length;){if(ht=st(ut.children[Mt],Mt,mt)(),ht[0]===EXIT)return ht;Mt=typeof ht[1]=="number"?ht[1]:Mt+at}return bt}}};function toResult(tt){return Array.isArray(tt)?tt:typeof tt=="number"?[CONTINUE,tt]:[tt]}const visit=function(tt,nt,et,rt){typeof nt=="function"&&typeof et!="function"&&(rt=et,et=nt,nt=null),visitParents(tt,nt,ot,rt);function ot(at,st){const ut=st[st.length-1];return et(at,ut?ut.children.indexOf(at):null,ut)}},protocols=["http","https","mailto","tel"];function uriTransformer(tt){const nt=(tt||"").trim(),et=nt.charAt(0);if(et==="#"||et==="/")return nt;const rt=nt.indexOf(":");if(rt===-1)return nt;let ot=-1;for(;++ot<protocols.length;){const at=protocols[ot];if(rt===at.length&&nt.slice(0,at.length).toLowerCase()===at)return nt}return ot=nt.indexOf("?"),ot!==-1&&rt>ot||(ot=nt.indexOf("#"),ot!==-1&&rt>ot)?nt:"javascript:void(0)"}/*!
100
100
  * Determine if an object is a Buffer
101
101
  *
102
102
  * @author Feross Aboukhadijeh <https://feross.org>
@@ -447,8 +447,8 @@ To create a submit button, use the \`st.form_submit_button()\` function.
447
447
 
448
448
  For more information, refer to the [documentation for forms](https://docs.streamlit.io/develop/api-reference/execution-flow/st.form).`;function Form(tt){const{formId:nt,widgetMgr:et,hasSubmitButton:rt,children:ot,width:at,scriptRunState:st,clearOnSubmit:ut,enterToSubmit:ct,border:pt}=tt;reactExports.useEffect(()=>{et.setFormSubmitBehaviors(nt,ut,ct)},[et,nt,ut,ct]);const[dt,ft]=reactExports.useState(!1);rt&&dt?ft(!1):!rt&&!dt&&st===ScriptRunState.NOT_RUNNING&&ft(!0);let bt;return dt&&(bt=jsx$1(StyledErrorContainer,{children:jsx$1(AlertElement,{body:MISSING_SUBMIT_BUTTON_WARNING,kind:Kind.ERROR,width:at})})),jsxs(StyledForm,{className:"stForm","data-testid":"stForm",border:pt,children:[ot,bt]})}var ORIENTATION={vertical:"vertical",horizontal:"horizontal"},FILL={fixed:"fixed",intrinsic:"intrinsic"},getTabId=function tt(nt,et){return"tabs-".concat(nt,"-tab-").concat(et)},getTabPanelId=function tt(nt,et){return"tabs-".concat(nt,"-tabpanel-").concat(et)},isHorizontal=function tt(nt){return nt===ORIENTATION.horizontal},isVertical=function tt(nt){return nt===ORIENTATION.vertical},isRTL=function tt(nt){return nt==="rtl"},isIntrinsic=function tt(nt){return nt===FILL.intrinsic},isFixed=function tt(nt){return nt===FILL.fixed};function ownKeys$e(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$d(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$e(Object(et),!0).forEach(function(rt){_defineProperty$h(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$e(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}function _defineProperty$h(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}var StyledRoot$1=styled("div",function(tt){tt.$theme;var nt=tt.$orientation,et=nt===void 0?ORIENTATION.horizontal:nt,rt={transform:"scale(1)"};return isVertical(et)&&(rt.display="flex"),rt});StyledRoot$1.displayName="StyledRoot";StyledRoot$1.displayName="StyledRoot";var StyledTabBar=styled("div",function(tt){var nt=tt.$hasEndEnhancer,et=tt.$orientation;return nt||!isHorizontal(et)?{display:"flex"}:{}});StyledTabBar.displayName="StyledTabBar";StyledTabBar.displayName="StyledTabBar";var StyledTabList=styled("div",function(tt){var nt=tt.$theme,et=tt.$fill,rt=et===void 0?FILL.intrinsic:et,ot=tt.$orientation,at=ot===void 0?ORIENTATION.horizontal:ot,st={position:"relative",display:"flex",flexWrap:"nowrap",flexGrow:1};return isHorizontal(at)?(st.flexDirection="row",st.paddingBottom="5px",st.marginBottom="-5px"):(st.flexDirection="column",isRTL(nt.direction)?(st.paddingLeft="5px",st.marginLeft="-5px"):(st.paddingRight="5px",st.marginRight="-5px")),isIntrinsic(rt)&&(st["::-webkit-scrollbar"]={display:"none"},st["-ms-overflow-style"]="none",st.scrollbarWidth="none",isHorizontal(at)?st.overflowX="scroll":st.overflowY="scroll"),st});StyledTabList.displayName="StyledTabList";StyledTabList.displayName="StyledTabList";var StyledTab=styled("button",function(tt){var nt=tt.$theme,et=tt.$orientation,rt=et===void 0?ORIENTATION.horizontal:et,ot=tt.$fill,at=ot===void 0?FILL.intrinsic:ot,st=tt.$focusVisible,ut=st===void 0?!1:st;tt.$isActive;var ct=_objectSpread$d({cursor:"pointer",WebkitAppearance:"none",marginLeft:"0",marginRight:"0",marginTop:"0",marginBottom:"0",boxSizing:"border-box",display:"inline-flex",alignItems:"center",paddingLeft:nt.sizing.scale600,paddingTop:nt.sizing.scale600,paddingRight:nt.sizing.scale600,paddingBottom:nt.sizing.scale600,borderLeftWidth:0,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",color:nt.colors.contentPrimary,background:nt.colors.backgroundPrimary,transitionProperty:"background",transitionDuration:nt.animation.timing200,transitionTimingFunction:nt.animation.linearCurve,outline:"none",outlineOffset:"-3px",":disabled":{cursor:"not-allowed",color:nt.colors.contentStateDisabled},":hover":{background:nt.colors.backgroundSecondary},":disabled:hover":{background:"none"}},nt.typography.LabelSmall);return ut&&(ct.outline="3px solid ".concat(nt.colors.accent)),isFixed(at)&&(ct.flexGrow=1,ct.flexBasis=0),isHorizontal(rt)?ct.justifyContent="center":ct.justifyContent="flex-end",ct});StyledTab.displayName="StyledTab";StyledTab.displayName="StyledTab";var StyledEndEnhancerContainer=styled("div",function(tt){var nt=tt.$theme,et=nt.direction==="rtl"?"marginRight":"marginLeft";return _defineProperty$h({display:"flex",alignItems:"center",justifyContent:"flex-end"},et,nt.sizing.scale600)});StyledEndEnhancerContainer.displayName="StyledEndEnhancerContainer";StyledEndEnhancerContainer.displayName="StyledEndEnhancerContainer";var StyledArtworkContainer=styled("div",function(tt){var nt=tt.$theme;tt.$orientation;var et={display:"flex"};return isRTL(nt.direction)?et.marginLeft=nt.sizing.scale300:et.marginRight=nt.sizing.scale300,et});StyledArtworkContainer.displayName="StyledArtworkContainer";StyledArtworkContainer.displayName="StyledArtworkContainer";var StyledTabBorder=styled("div",function(tt){var nt=tt.$theme,et=tt.$orientation,rt=et===void 0?ORIENTATION.horizontal:et,ot={backgroundColor:nt.colors.borderOpaque,position:"relative"};return isHorizontal(rt)?ot.height="5px":ot.width="5px",ot});StyledTabBorder.displayName="StyledTabBorder";StyledTabBorder.displayName="StyledTabBorder";var StyledTabHighlight=styled("div",function(tt){var nt=tt.$theme,et=tt.$orientation,rt=et===void 0?ORIENTATION.horizontal:et,ot=tt.$length,at=ot===void 0?0:ot,st=tt.$distance,ut=st===void 0?0:st,ct=tt.$animate,pt=ct===void 0?!1:ct,dt={backgroundColor:nt.colors.borderSelected,position:"absolute",zIndex:1};return isHorizontal(rt)?(dt.bottom="0px",dt.left="0px",dt.height="5px",dt.width="".concat(at,"px"),dt.transform="translateX(".concat(ut,"px)")):(dt.transform="translateY(".concat(ut,"px)"),dt.width="5px",dt.height="".concat(at,"px"),isRTL(nt.direction)?dt.left="0px":dt.right="0px"),pt&&(dt.transitionProperty="all",dt.transitionDuration=nt.animation.timing400,dt.transitionTimingFunction=nt.animation.easeInOutQuinticCurve),dt});StyledTabHighlight.displayName="StyledTabHighlight";StyledTabHighlight.displayName="StyledTabHighlight";var StyledTabPanel=styled("div",function(tt){var nt=tt.$theme,et=tt.$pad,rt=et===void 0?!0:et,ot={flexGrow:1,outline:"none"};return rt&&(ot.paddingTop=nt.sizing.scale600,ot.paddingRight=nt.sizing.scale600,ot.paddingBottom=nt.sizing.scale600,ot.paddingLeft=nt.sizing.scale600),ot});StyledTabPanel.displayName="StyledTabPanel";StyledTabPanel.displayName="StyledTabPanel";var _excluded$g=["childKey","childIndex","activeKey","orientation","activeTabRef","updateHighlight","parseKeyDown","activateOnFocus","uid","disabled","sharedStylingProps","onChange"],_excluded2$3=["artwork","overrides","tabRef","onClick","title"],_excluded3=["childKey","childIndex","activeKey","uid","sharedStylingProps","renderAll"];function ownKeys$d(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$c(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$d(Object(et),!0).forEach(function(rt){_defineProperty$g(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$d(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}function _defineProperty$g(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}function _toConsumableArray$1(tt){return _arrayWithoutHoles$1(tt)||_iterableToArray$1(tt)||_unsupportedIterableToArray$f(tt)||_nonIterableSpread$1()}function _nonIterableSpread$1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
449
449
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArray$1(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}function _arrayWithoutHoles$1(tt){if(Array.isArray(tt))return _arrayLikeToArray$f(tt)}function _objectWithoutProperties$i(tt,nt){if(tt==null)return{};var et=_objectWithoutPropertiesLoose$g(tt,nt),rt,ot;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(tt);for(ot=0;ot<at.length;ot++)rt=at[ot],!(nt.indexOf(rt)>=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(et[rt]=tt[rt])}return et}function _objectWithoutPropertiesLoose$g(tt,nt){if(tt==null)return{};var et={},rt=Object.keys(tt),ot,at;for(at=0;at<rt.length;at++)ot=rt[at],!(nt.indexOf(ot)>=0)&&(et[ot]=tt[ot]);return et}function _extends$y(){return _extends$y=Object.assign?Object.assign.bind():function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_extends$y.apply(this,arguments)}function _slicedToArray$f(tt,nt){return _arrayWithHoles$f(tt)||_iterableToArrayLimit$f(tt,nt)||_unsupportedIterableToArray$f(tt,nt)||_nonIterableRest$f()}function _nonIterableRest$f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
450
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(tt,nt){if(tt){if(typeof tt=="string")return _arrayLikeToArray$f(tt,nt);var et=Object.prototype.toString.call(tt).slice(8,-1);if(et==="Object"&&tt.constructor&&(et=tt.constructor.name),et==="Map"||et==="Set")return Array.from(tt);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return _arrayLikeToArray$f(tt,nt)}}function _arrayLikeToArray$f(tt,nt){(nt==null||nt>tt.length)&&(nt=tt.length);for(var et=0,rt=new Array(nt);et<nt;et++)rt[et]=tt[et];return rt}function _iterableToArrayLimit$f(tt,nt){var et=tt==null?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(et!=null){var rt=[],ot=!0,at=!1,st,ut;try{for(et=et.call(tt);!(ot=(st=et.next()).done)&&(rt.push(st.value),!(nt&&rt.length===nt));ot=!0);}catch(ct){at=!0,ut=ct}finally{try{!ot&&et.return!=null&&et.return()}finally{if(at)throw ut}}return rt}}function _arrayWithHoles$f(tt){if(Array.isArray(tt))return tt}var KEYBOARD_ACTION={next:"next",previous:"previous"},getLayoutParams=function tt(nt,et){return nt?isVertical(et)?{length:nt.clientHeight,distance:nt.offsetTop}:{length:nt.clientWidth,distance:nt.offsetLeft}:{length:0,distance:0}},scrollParentToCentreTarget=function tt(nt){var et=nt.parentNode.getBoundingClientRect(),rt=et.x,ot=et.y,at=et.width,st=et.height,ut=nt.getBoundingClientRect(),ct=ut.x,pt=ut.y,dt=ut.width,ft=ut.height,bt={x:ct-rt+dt/2,y:pt-ot+ft/2},ht=nt.parentNode,Mt=ht.scrollLeft,mt=ht.scrollTop,Ot={x:Mt+bt.x-at/2,y:mt+bt.y-st/2};nt.parentNode.scroll(Ot.x,Ot.y)};function RenderEnhancer(tt){var nt=tt.Enhancer;return typeof nt=="string"?nt:reactIsExports$1.isValidElementType(nt)?reactExports.createElement(nt,null):nt}function Tabs$1(tt){var nt=tt.activeKey,et=nt===void 0?"0":nt,rt=tt.disabled,ot=rt===void 0?!1:rt,at=tt.children,st=tt.fill,ut=st===void 0?FILL.intrinsic:st,ct=tt.activateOnFocus,pt=ct===void 0?!0:ct,dt=tt.onChange,ft=tt.orientation,bt=ft===void 0?ORIENTATION.horizontal:ft,ht=tt.overrides,Mt=ht===void 0?{}:ht,mt=tt.renderAll,Ot=mt===void 0?!1:mt,zt=tt.uid,yt=zt===void 0?null:zt,vt=tt.endEnhancer,At=useUID(),St=yt||At,Et=Mt.Root,Tt=Mt.TabList,Rt=Mt.TabHighlight,Ct=Mt.TabBorder,wt=getOverrides(Et,StyledRoot$1),Lt=_slicedToArray$f(wt,2),Ht=Lt[0],jt=Lt[1],s0=getOverrides(Tt,StyledTabList),Ut=_slicedToArray$f(s0,2),Yt=Ut[0],O0=Ut[1],a0=getOverrides(Rt,StyledTabHighlight),b0=_slicedToArray$f(a0,2),kt=b0[0],o0=b0[1],qt=getOverrides(Ct,StyledTabBorder),Dt=_slicedToArray$f(qt,2),Bt=Dt[0],p0=Dt[1],r0=getOverrides(Mt.EndEnhancerContainer,StyledEndEnhancerContainer),l0=_slicedToArray$f(r0,2),f0=l0[0],i0=l0[1],$t=reactExports.useState(0),It=_slicedToArray$f($t,2),Vt=It[0],xt=It[1];reactExports.useEffect(function(){xt(Vt+1)},[et]);var Ft=reactExports.useRef(),Pt=reactExports.useState({length:0,distance:0}),Zt=_slicedToArray$f(Pt,2),Kt=Zt[0],n0=Zt[1],c0=reactExports.useCallback(function(){Ft.current&&n0(getLayoutParams(Ft.current,bt))},[Ft.current,bt]);reactExports.useEffect(c0,[Ft.current,bt]),reactExports.useEffect(function(){Ft.current&&(isHorizontal(bt)?Ft.current.parentNode.scrollWidth>Ft.current.parentNode.clientWidth:Ft.current.parentNode.scrollHeight>Ft.current.parentNode.clientHeight)&&(Vt>1?Ft.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}):scrollParentToCentreTarget(Ft.current))},[Ft.current]);var u0={$orientation:bt,$fill:ut},y0=useStyletron(),D0=_slicedToArray$f(y0,2),S0=D0[1],x0=reactExports.useCallback(function(m0){if(isHorizontal(bt))if(isRTL(S0.direction))switch(m0.keyCode){case 39:return KEYBOARD_ACTION.previous;case 37:return KEYBOARD_ACTION.next;default:return null}else switch(m0.keyCode){case 37:return KEYBOARD_ACTION.previous;case 39:return KEYBOARD_ACTION.next;default:return null}else switch(m0.keyCode){case 38:return KEYBOARD_ACTION.previous;case 40:return KEYBOARD_ACTION.next;default:return null}},[bt,S0.direction]);return reactExports.createElement(Ht,_extends$y({},u0,jt),reactExports.createElement(StyledTabBar,{$hasEndEnhancer:!!vt,$orientation:bt},reactExports.createElement(Yt,_extends$y({"data-baseweb":"tab-list",role:"tablist","aria-orientation":bt},u0,O0),reactExports.Children.map(at,function(m0,e0){if(m0)return reactExports.createElement(InternalTab,_extends$y({childKey:m0.key,childIndex:e0,activeKey:et,orientation:bt,activeTabRef:Ft,updateHighlight:c0,parseKeyDown:x0,activateOnFocus:pt,uid:St,disabled:ot,sharedStylingProps:u0,onChange:dt},m0.props))}),reactExports.createElement(kt,_extends$y({"data-baseweb":"tab-highlight",$length:Kt.length,$distance:Kt.distance,$animate:Vt>1,"aria-hidden":"true",role:"presentation"},u0,o0))),bt===ORIENTATION.horizontal&&vt!==null&&vt!==void 0&&reactExports.createElement(f0,_extends$y({},i0,{$orientation:bt}),reactExports.createElement(RenderEnhancer,{Enhancer:vt}))),reactExports.createElement(Bt,_extends$y({"data-baseweb":"tab-border","aria-hidden":"true",role:"presentation"},u0,p0)),reactExports.Children.map(at,function(m0,e0){if(m0)return reactExports.createElement(InternalTabPanel,_extends$y({childKey:m0.key,childIndex:e0,activeKey:et,uid:St,sharedStylingProps:u0,renderAll:Ot},m0.props))}))}function InternalTab(tt){var nt=tt.childKey,et=tt.childIndex,rt=tt.activeKey,ot=tt.orientation,at=tt.activeTabRef,st=tt.updateHighlight,ut=tt.parseKeyDown,ct=tt.activateOnFocus,pt=tt.uid,dt=tt.disabled,ft=tt.sharedStylingProps,bt=tt.onChange,ht=_objectWithoutProperties$i(tt,_excluded$g),Mt=nt||String(et),mt=Mt==rt,Ot=ht.artwork,zt=ht.overrides,yt=zt===void 0?{}:zt,vt=ht.tabRef,At=ht.onClick,St=ht.title,Et=_objectWithoutProperties$i(ht,_excluded2$3),Tt=reactExports.useRef();reactExports.useImperativeHandle(vt,function(){return mt?at.current:Tt.current});var Rt=reactExports.useRef({length:0,distance:0});reactExports.useEffect(function(){Rt.current=getLayoutParams(mt?at.current:Tt.current,ot)}),reactExports.useEffect(function(){if(window.ResizeObserver){var r0=new window.ResizeObserver(function(l0){if(l0[0]&&l0[0].target){var f0=getLayoutParams(l0[0].target,ot);(f0.length!==Rt.current.length||f0.distance!==Rt.current.distance)&&st()}});return r0.observe(mt?at.current:Tt.current),function(){r0.disconnect()}}},[rt,ot]),reactExports.useEffect(st,[St]);var Ct=yt.Tab,wt=yt.ArtworkContainer,Lt=getOverrides(Ct,StyledTab),Ht=_slicedToArray$f(Lt,2),jt=Ht[0],s0=Ht[1],Ut=getOverrides(wt,StyledArtworkContainer),Yt=_slicedToArray$f(Ut,2),O0=Yt[0],a0=Yt[1],b0=reactExports.useState(!1),kt=_slicedToArray$f(b0,2),o0=kt[0],qt=kt[1],Dt=reactExports.useCallback(function(r0){isFocusVisible(r0)&&qt(!0)},[]),Bt=reactExports.useCallback(function(r0){o0!==!1&&qt(!1)},[o0]),p0=reactExports.useCallback(function(r0){var l0=_toConsumableArray$1(r0.target.parentNode.childNodes).filter(function(It){return!It.disabled&&It.getAttribute("role")==="tab"});if(l0.length!==1){var f0=l0.indexOf(r0.target),i0=ut(r0);if(i0){var $t;i0===KEYBOARD_ACTION.previous?l0[f0-1]?$t=l0[f0-1]:$t=l0[l0.length-1]:i0===KEYBOARD_ACTION.next&&(l0[f0+1]?$t=l0[f0+1]:$t=l0[0]),$t&&($t.focus(),ct&&$t.click()),isVertical(ot)&&r0.preventDefault()}}});return reactExports.createElement(jt,_extends$y({"data-baseweb":"tab",key:Mt,id:getTabId(pt,Mt),role:"tab",onKeyDown:p0,"aria-selected":mt,"aria-controls":getTabPanelId(pt,Mt),tabIndex:mt?"0":"-1",ref:mt?at:Tt,disabled:!mt&&dt,type:"button",$focusVisible:o0,$isActive:mt},ft,Et,s0,{onClick:function(l0){typeof bt=="function"&&bt({activeKey:Mt}),typeof At=="function"&&At(l0)},onFocus:forkFocus(_objectSpread$c(_objectSpread$c({},Et),s0),Dt),onBlur:forkBlur(_objectSpread$c(_objectSpread$c({},Et),s0),Bt)}),Ot?reactExports.createElement(O0,_extends$y({"data-baseweb":"artwork-container"},ft,a0),reactExports.createElement(Ot,{size:20,color:"contentPrimary"})):null,St||Mt)}function InternalTabPanel(tt){var nt=tt.childKey,et=tt.childIndex,rt=tt.activeKey,ot=tt.uid,at=tt.sharedStylingProps,st=tt.renderAll,ut=_objectWithoutProperties$i(tt,_excluded3),ct=nt||String(et),pt=ct==rt,dt=ut.overrides,ft=dt===void 0?{}:dt,bt=ut.children,ht=ft.TabPanel,Mt=getOverrides(ht,StyledTabPanel),mt=_slicedToArray$f(Mt,2),Ot=mt[0],zt=mt[1];return reactExports.createElement(Ot,_extends$y({"data-baseweb":"tab-panel",key:ct,role:"tabpanel",id:getTabPanelId(ot,ct),"aria-labelledby":getTabId(ot,ct),hidden:!pt},at,zt),pt||st?bt:null)}function Tab(tt){return null}function shouldComponentBeEnabled(tt,nt){return tt!=="empty"||nt!==ScriptRunState.RUNNING}function isElementStale(tt,nt,et,rt){return nt===ScriptRunState.RERUN_REQUESTED?!0:nt===ScriptRunState.RUNNING?rt&&rt.length?!!(tt.fragmentId&&rt.includes(tt.fragmentId)&&tt.scriptRunId!==et):tt.scriptRunId!==et:!1}function isComponentStale(tt,nt,et,rt,ot){return!tt||isElementStale(nt,et,rt,ot)}function assignDividerColor(tt,nt){const et=getDividerColors(nt),rt=Object.keys(et),{blue:ot,green:at,orange:st,red:ut,violet:ct}=et,pt={blue:ot,green:at,orange:st,red:ut,violet:ct},dt=Object.keys(pt);let ft=0;Array.from(tt.getElements()).forEach(bt=>{var Mt;const ht=(Mt=bt.heading)==null?void 0:Mt.divider;if(bt.type==="heading"&&ht)if(ht==="auto"){const mt=dt[ft];bt.heading.divider=pt[mt],ft+=1,ft===dt.length&&(ft=0)}else rt.includes(ht)&&(bt.heading.divider=et[ht])})}function convertKeyToClassName(tt){return tt?"st-key-"+tt.trim().replace(/[^a-zA-Z0-9_-]/g,"-"):""}function getKeyFromId(tt){if(!tt||!isValidElementId(tt))return;const et=tt.split("-").slice(2).join("-");return et==="None"?void 0:et}const StyledTabContainer=newStyled("div",{target:"e10uku090"})(({theme:tt,isOverflowing:nt,tabHeight:et})=>({...nt?{position:"relative","::after":{content:'" "',position:"absolute",zIndex:tt.zIndices.priority,top:0,right:0,pointerEvents:"none",backgroundImage:`linear-gradient(to right, ${transparentize(tt.colors.bgColor,1)}, ${tt.colors.bgColor})`,width:tt.spacing.lg,height:et}}:{}}));function Tabs(tt){const{widgetsDisabled:nt,node:et,isStale:rt,scriptRunState:ot,scriptRunId:at}=tt,{fragmentIdsThisRun:st}=reactExports.useContext(LibContext);let ut=[];const[ct,pt]=reactExports.useState(0),[dt,ft]=reactExports.useState(et.children[0].deltaBlock.tab.label||"0"),bt=reactExports.useRef(null),ht=useTheme(),[Mt,mt]=reactExports.useState(!1);reactExports.useEffect(()=>{ut.indexOf(dt)===-1&&(pt(0),ft(ut[0]))},[ut]),reactExports.useEffect(()=>{if(bt.current){const{scrollWidth:vt,clientWidth:At}=bt.current;mt(vt>At)}const yt=ut.indexOf(dt);yt!==-1?(pt(yt),ft(ut[yt])):(pt(0),ft(ut[0]))},[et.children.length]);const Ot=ht.sizes.tabHeight,zt=ht.spacing.threeXS;return jsx$1(StyledTabContainer,{className:"stTabs","data-testid":"stTabs",isOverflowing:Mt,tabHeight:Ot,children:jsx$1(Tabs$1,{activateOnFocus:!0,activeKey:ct,onChange:({activeKey:yt})=>{pt(yt),ft(ut[yt])},renderAll:!0,disabled:nt,overrides:{TabHighlight:{style:()=>({backgroundColor:nt?ht.colors.fadedText40:ht.colors.primary,height:zt})},TabBorder:{style:()=>({backgroundColor:ht.colors.borderColorLight,height:zt})},TabList:{props:{ref:bt},style:()=>({gap:ht.spacing.lg,marginBottom:`-${zt}`,paddingBottom:zt,overflowY:"hidden",...rt?{opacity:.33,transition:"opacity 1s ease-in 0.5s"}:{}})},Root:{style:()=>({transform:"none"})}},children:et.children.map((yt,vt)=>{var Ct,wt;vt===0&&(ut=[]);const At=isElementStale(yt,ot,at,st),St={...tt,isStale:rt||At,widgetsDisabled:nt,node:yt};let Et=vt.toString();(wt=(Ct=St.node.deltaBlock)==null?void 0:Ct.tab)!=null&&wt.label&&(Et=St.node.deltaBlock.tab.label),ut[vt]=Et;const Tt=ct.toString()===vt.toString(),Rt=vt===et.children.length-1;return jsx$1(Tab,{"data-testid":"stTab",title:jsx$1(StreamlitMarkdown$1,{source:Et,allowHTML:!1,isLabel:!0}),disabled:nt,overrides:{TabPanel:{style:()=>({paddingLeft:ht.spacing.none,paddingRight:ht.spacing.none,paddingBottom:ht.spacing.none,paddingTop:ht.spacing.lg})},Tab:{style:()=>({height:Ot,whiteSpace:"nowrap",paddingLeft:ht.spacing.none,paddingRight:ht.spacing.none,paddingTop:ht.spacing.none,paddingBottom:ht.spacing.none,fontSize:ht.fontSizes.sm,background:"transparent",color:nt?ht.colors.fadedText40:ht.colors.bodyText,":focus":{outline:"none",color:nt?ht.colors.fadedText40:ht.colors.primary,background:"none"},":hover":{color:nt?ht.colors.fadedText40:ht.colors.primary,background:"none"},...Tt?{color:nt?ht.colors.fadedText40:ht.colors.primary}:{},...Mt&&Rt?{paddingRight:`calc(${ht.spacing.lg} * 0.6)`}:{},...!rt&&At?{opacity:.33,transition:"opacity 1s ease-in 0.5s"}:{}})}},children:tt.renderTabContent(St)},vt)})})})}var _excluded$f=["children","iconAttrs","iconVerticalAlign","iconViewBox","size","title"];function ownKeys$c(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$b(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$c(Object(et),!0).forEach(function(rt){_defineProperty$u(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$c(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}var EmotionIconBaseBase=reactExports.forwardRef(function(tt,nt){var et=tt.children,rt=tt.iconAttrs;tt.iconVerticalAlign;var ot=tt.iconViewBox,at=tt.size,st=tt.title,ut=_objectWithoutProperties$o(tt,_excluded$f),ct=_objectSpread$b(_objectSpread$b({viewBox:ot,height:tt.height!==void 0?tt.height:at,width:tt.width!==void 0?tt.width:at,"aria-hidden":st==null?"true":void 0,focusable:"false",role:st!=null?"img":void 0},rt),ut);return reactExports.createElement("svg",_extends$Q({},ct,{ref:nt}),st&&reactExports.createElement("title",{key:"icon-title"},st),et)}),EmotionIconBase=createStyled(EmotionIconBaseBase,{target:"ex0cdmw0"})("display:inline-block;vertical-align:",function(tt){return tt.iconVerticalAlign},";overflow:hidden;"),ArrowDownward=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}))});ArrowDownward.displayName="ArrowDownward";var ArrowUpward=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}))});ArrowUpward.displayName="ArrowUpward";var Check=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"}))});Check.displayName="Check";var ChevronLeft=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});ChevronLeft.displayName="ChevronLeft";var ChevronRight=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});ChevronRight.displayName="ChevronRight";var ExpandLess=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14l-6-6z"}))});ExpandLess.displayName="ExpandLess";var ExpandMore=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M24 24H0V0h24v24z",opacity:.87}),reactExports.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"}))});ExpandMore.displayName="ExpandMore";var Face=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M10.25 13a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0zM15 11.75a1.25 1.25 0 100 2.5 1.25 1.25 0 000-2.5zm7 .25c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10zM10.66 4.12C12.06 6.44 14.6 8 17.5 8c.46 0 .91-.05 1.34-.12C17.44 5.56 14.9 4 12 4c-.46 0-.91.05-1.34.12zM4.42 9.47a8.046 8.046 0 003.66-4.44 8.046 8.046 0 00-3.66 4.44zM20 12c0-.78-.12-1.53-.33-2.24-.7.15-1.42.24-2.17.24a10 10 0 01-7.76-3.69A10.016 10.016 0 014 11.86c.01.04 0 .09 0 .14 0 4.41 3.59 8 8 8s8-3.59 8-8z"}))});Face.displayName="Face";var SmartToy=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("rect",{width:24,height:24,fill:"none"}),reactExports.createElement("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3zm-2 10H6V7h12v12zm-9-6c-.83 0-1.5-.67-1.5-1.5S8.17 10 9 10s1.5.67 1.5 1.5S9.83 13 9 13zm7.5-1.5c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5 1.5.67 1.5 1.5zM8 15h8v2H8v-2z"}))});SmartToy.displayName="SmartToy";const StyledPopoverButtonIcon=newStyled("div",{target:"e1q66ohu0"})(({theme:tt})=>({marginLeft:tt.spacing.threeXS,marginRight:`calc(-${tt.iconSizes.lg} * 0.25)`})),Popover=({element:tt,empty:nt,width:et,children:rt})=>{const[ot,at]=React$1.useState(!1),st=React$1.useContext(IsSidebarContext),ut=useTheme(),ct=hasLightBackgroundColor(ut),pt=tt.help?et:!0;return jsx$1("div",{"data-testid":"stPopover",className:"stPopover",children:jsx$1(Popover$1,{triggerType:TRIGGER_TYPE.click,placement:PLACEMENT.bottomLeft,content:()=>rt,isOpen:ot,onClickOutside:()=>at(!1),onClick:()=>ot?at(!1):void 0,onEsc:()=>at(!1),ignoreBoundary:st,renderAll:!0,overrides:{Body:{props:{"data-testid":"stPopoverBody"},style:()=>({marginRight:ut.spacing.lg,marginBottom:ut.spacing.lg,maxHeight:"70vh",overflow:"auto",maxWidth:`calc(${ut.sizes.contentMaxWidth} - 2*${ut.spacing.lg})`,minWidth:tt.useContainerWidth?`${Math.max(et,160)}px`:ut.sizes.minPopupWidth,[`@media (max-width: ${ut.breakpoints.sm})`]:{maxWidth:`calc(100% - ${ut.spacing.threeXL})`},borderTopLeftRadius:ut.radii.xl,borderTopRightRadius:ut.radii.xl,borderBottomRightRadius:ut.radii.xl,borderBottomLeftRadius:ut.radii.xl,borderLeftWidth:ut.sizes.borderWidth,borderRightWidth:ut.sizes.borderWidth,borderTopWidth:ut.sizes.borderWidth,borderBottomWidth:ut.sizes.borderWidth,paddingRight:`calc(${ut.spacing.twoXL} - ${ut.sizes.borderWidth})`,paddingLeft:`calc(${ut.spacing.twoXL} - ${ut.sizes.borderWidth})`,paddingBottom:`calc(${ut.spacing.twoXL} - ${ut.sizes.borderWidth})`,paddingTop:`calc(${ut.spacing.twoXL} - ${ut.sizes.borderWidth})`,borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftColor:ut.colors.borderColor,borderRightColor:ut.colors.borderColor,borderTopColor:ut.colors.borderColor,borderBottomColor:ut.colors.borderColor,boxShadow:ct?"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:tt.help,children:jsxs(BaseButton,{"data-testid":"stPopoverButton",kind:BaseButtonKind.SECONDARY,size:BaseButtonSize.SMALL,disabled:nt||tt.disabled,fluidWidth:tt.useContainerWidth?pt:!1,onClick:()=>at(!ot),children:[jsx$1(DynamicButtonLabel,{icon:tt.icon,label:tt.label}),jsx$1(StyledPopoverButtonIcon,{children:jsx$1(StyledIcon,{as:ot?ExpandLess:ExpandMore,color:"inherit","aria-hidden":"true",size:"lg",margin:ut.spacing.none,padding:ut.spacing.none})})]})})})})})},StyledChatMessageContainer=newStyled("div",{target:"e2yddhz0"})(({theme:tt,background:nt})=>{const et=hasLightBackgroundColor(tt);return{display:"flex",alignItems:"flex-start",gap:tt.spacing.sm,padding:tt.spacing.lg,paddingRight:nt?tt.spacing.lg:0,borderRadius:tt.radii.default,...nt?{backgroundColor:transparentize(et?tt.colors.gray20:tt.colors.gray90,.5)}:{}}}),StyledMessageContent=newStyled("div",{target:"e2yddhz1"})(({theme:tt})=>({color:tt.colors.bodyText,margin:"auto",flexGrow:1,minWidth:0})),StyledAvatarBackground=newStyled("div",{target:"e2yddhz2"})(({theme:tt})=>{const nt=hasLightBackgroundColor(tt);return{display:"flex",border:`${tt.sizes.borderWidth} solid ${nt?tt.colors.gray40:tt.colors.gray85}`,backgroundColor:nt?tt.colors.white:tt.colors.gray100,color:nt?tt.colors.gray90:tt.colors.white,lineHeight:tt.lineHeights.none,fontSize:tt.fontSizes.md,flexShrink:0,width:tt.sizes.chatAvatarSize,height:tt.sizes.chatAvatarSize,borderRadius:tt.radii.default,alignItems:"center",justifyContent:"center"}}),StyledAvatarIcon=newStyled("div",{target:"e2yddhz3"})(({theme:tt,background:nt})=>{const et=hasLightBackgroundColor(tt);return{display:"flex",width:tt.sizes.chatAvatarSize,height:tt.sizes.chatAvatarSize,flexShrink:0,borderRadius:tt.radii.default,alignItems:"center",justifyContent:"center",backgroundColor:nt,color:et?tt.colors.white:tt.colors.gray100}}),StyledAvatarImage=newStyled("img",{target:"e2yddhz4"})(({theme:tt})=>({width:tt.sizes.chatAvatarSize,height:tt.sizes.chatAvatarSize,flexShrink:0,borderRadius:tt.radii.default,objectFit:"cover",display:"flex"}));function ChatMessageAvatar(tt){const{avatar:nt,avatarType:et,name:rt,endpoints:ot}=tt,at=useTheme();if(nt)switch(et){case Block$2.ChatMessage.AvatarType.IMAGE:return jsx$1(StyledAvatarImage,{src:ot.buildMediaURL(nt),alt:`${rt} avatar`});case Block$2.ChatMessage.AvatarType.EMOJI:return jsx$1(StyledAvatarBackground,{children:nt});case Block$2.ChatMessage.AvatarType.ICON:if(nt==="user")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarUser",background:at.colors.red60,children:jsx$1(Icon$2,{content:Face,size:"lg"})});if(nt==="assistant")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarAssistant",background:at.colors.orange60,children:jsx$1(Icon$2,{content:SmartToy,size:"lg"})});if(nt.startsWith(":material"))return jsx$1(StyledAvatarBackground,{"data-testid":"stChatMessageAvatarCustom",children:jsx$1(DynamicIcon,{size:"lg",iconValue:nt,color:at.colors.bodyText})})}return jsx$1(StyledAvatarBackground,{children:rt?rt.charAt(0).toUpperCase():"🧑‍💻"})}const ChatMessage=({endpoints:tt,element:nt,children:et})=>{const{avatar:rt,avatarType:ot,name:at}=nt;return jsxs(StyledChatMessageContainer,{className:"stChatMessage","data-testid":"stChatMessage",background:["user","human"].includes(at.toLowerCase()),children:[jsx$1(ChatMessageAvatar,{name:at,avatar:rt,avatarType:ot,endpoints:tt}),jsx$1(StyledMessageContent,{"data-testid":"stChatMessageContent","aria-label":`Chat message from ${at}`,children:et})]})};var SIZE$2={default:"default",full:"full",auto:"auto"},SIZE_WIDTHS={default:"500px",full:"100%",auto:"auto"},ROLE={dialog:"dialog",alertdialog:"alertdialog"},CLOSE_SOURCE={closeButton:"closeButton",backdrop:"backdrop",escape:"escape"};function ownKeys$b(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$a(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$b(Object(et),!0).forEach(function(rt){_defineProperty$f(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$b(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}function _defineProperty$f(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}function getSizeStyles(tt){var nt={maxWidth:"100%",width:null};return typeof tt=="number"?nt.width="".concat(tt,"px"):SIZE$2[tt]?nt.width=SIZE_WIDTHS[tt]:typeof tt=="string"&&(nt.width=tt),tt===SIZE$2.full&&(nt.alignSelf="stretch"),nt}var Root$3=styled("div",function(tt){var nt=tt.$isOpen;return{position:"fixed",overflow:"auto",right:0,bottom:0,top:0,left:0,pointerEvents:nt?"auto":"none"}});Root$3.displayName="Root";Root$3.displayName="Root";var DialogContainer=styled("div",function(tt){var nt=tt.$animate,et=tt.$isOpen,rt=tt.$isVisible,ot=tt.$theme,at={transitionProperty:"opacity",transitionDuration:ot.animation.timing400,transitionTimingFunction:ot.animation.easeOutCurve};return _objectSpread$a({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",minHeight:"100%",userSelect:"none",pointerEvents:"auto",backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",opacity:rt&&et?1:0},nt?at:null)});DialogContainer.displayName="DialogContainer";DialogContainer.displayName="DialogContainer";var Dialog$1=styled("div",function(tt){var nt=tt.$animate,et=tt.$isOpen,rt=tt.$isVisible,ot=tt.$size,at=tt.$theme;return _objectSpread$a(_objectSpread$a(_objectSpread$a({position:"relative",backgroundColor:at.colors.backgroundPrimary,borderTopLeftRadius:at.borders.radius500,borderTopRightRadius:at.borders.radius500,borderBottomRightRadius:at.borders.radius500,borderBottomLeftRadius:at.borders.radius500,marginLeft:at.sizing.scale600,marginTop:at.sizing.scale600,marginRight:at.sizing.scale600,marginBottom:at.sizing.scale600},getSizeStyles(ot)),{},{opacity:rt&&et?1:0,transform:rt?"translateY(0)":"translateY(20px)"},nt?{transitionProperty:"opacity, transform",transitionDuration:at.animation.timing400,transitionTimingFunction:at.animation.easeOutCurve}:null),{},{userSelect:"text",pointerEvents:et?"all":"none",":focus":{outline:"none"}})});Dialog$1.displayName="Dialog";Dialog$1.displayName="Dialog";var Close=styled("button",function(tt){var nt,et=tt.$theme,rt=tt.$isFocusVisible,ot=et.direction==="rtl"?"left":"right";return nt={background:"transparent",outline:0,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,color:et.colors.modalCloseColor,transitionProperty:"color, border-color",transitionDuration:et.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:et.colors.modalCloseColorHover},":focus":{outline:rt?"3px solid ".concat(et.colors.accent):"none"},position:"absolute",top:et.sizing.scale500},_defineProperty$f(nt,ot,et.sizing.scale500),_defineProperty$f(nt,"width",et.sizing.scale800),_defineProperty$f(nt,"height",et.sizing.scale800),_defineProperty$f(nt,"display","flex"),_defineProperty$f(nt,"justifyContent","center"),_defineProperty$f(nt,"alignItems","center"),_defineProperty$f(nt,"cursor","pointer"),nt});Close.displayName="Close";Close.displayName="Close";var ModalHeader$1=styled("div",function(tt){var nt,et=tt.$theme,rt=et.direction==="rtl"?"marginRight":"marginLeft",ot=et.direction==="rtl"?"marginLeft":"marginRight";return _objectSpread$a(_objectSpread$a({},et.typography.font550),{},(nt={color:et.colors.contentPrimary,marginTop:et.sizing.scale900,marginBottom:et.sizing.scale600},_defineProperty$f(nt,rt,et.sizing.scale800),_defineProperty$f(nt,ot,et.sizing.scale900),nt))});ModalHeader$1.displayName="ModalHeader";ModalHeader$1.displayName="ModalHeader";var ModalBody$2=styled("div",function(tt){var nt=tt.$theme;return _objectSpread$a(_objectSpread$a({},nt.typography.font200),{},{color:nt.colors.contentSecondary,marginTop:nt.sizing.scale600,marginLeft:nt.sizing.scale800,marginRight:nt.sizing.scale800,marginBottom:nt.sizing.scale700})});ModalBody$2.displayName="ModalBody";ModalBody$2.displayName="ModalBody";var ModalFooter$1=styled("div",function(tt){var nt=tt.$theme;return _objectSpread$a(_objectSpread$a({},nt.typography.font200),{},{marginTop:nt.sizing.scale700,marginLeft:nt.sizing.scale800,marginRight:nt.sizing.scale800,paddingTop:nt.sizing.scale500,paddingBottom:nt.sizing.scale500,textAlign:nt.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$8(tt){"@babel/helpers - typeof";return _typeof$8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(nt){return typeof nt}:function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt},_typeof$8(tt)}function _extends$x(){return _extends$x=Object.assign?Object.assign.bind():function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_extends$x.apply(this,arguments)}function _slicedToArray$e(tt,nt){return _arrayWithHoles$e(tt)||_iterableToArrayLimit$e(tt,nt)||_unsupportedIterableToArray$e(tt,nt)||_nonIterableRest$e()}function _nonIterableRest$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
451
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$e(tt,nt){if(tt){if(typeof tt=="string")return _arrayLikeToArray$e(tt,nt);var et=Object.prototype.toString.call(tt).slice(8,-1);if(et==="Object"&&tt.constructor&&(et=tt.constructor.name),et==="Map"||et==="Set")return Array.from(tt);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return _arrayLikeToArray$e(tt,nt)}}function _arrayLikeToArray$e(tt,nt){(nt==null||nt>tt.length)&&(nt=tt.length);for(var et=0,rt=new Array(nt);et<nt;et++)rt[et]=tt[et];return rt}function _iterableToArrayLimit$e(tt,nt){var et=tt==null?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(et!=null){var rt=[],ot=!0,at=!1,st,ut;try{for(et=et.call(tt);!(ot=(st=et.next()).done)&&(rt.push(st.value),!(nt&&rt.length===nt));ot=!0);}catch(ct){at=!0,ut=ct}finally{try{!ot&&et.return!=null&&et.return()}finally{if(at)throw ut}}return rt}}function _arrayWithHoles$e(tt){if(Array.isArray(tt))return tt}function _classCallCheck$g(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(tt,nt){for(var et=0;et<nt.length;et++){var rt=nt[et];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(tt,rt.key,rt)}}function _createClass$e(tt,nt,et){return nt&&_defineProperties$6(tt.prototype,nt),Object.defineProperty(tt,"prototype",{writable:!1}),tt}function _inherits$g(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function");tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,writable:!0,configurable:!0}}),Object.defineProperty(tt,"prototype",{writable:!1}),nt&&_setPrototypeOf$6(tt,nt)}function _setPrototypeOf$6(tt,nt){return _setPrototypeOf$6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,ot){return rt.__proto__=ot,rt},_setPrototypeOf$6(tt,nt)}function _createSuper$5(tt){var nt=_isNativeReflectConstruct$5();return function(){var rt=_getPrototypeOf$6(tt),ot;if(nt){var at=_getPrototypeOf$6(this).constructor;ot=Reflect.construct(rt,arguments,at)}else ot=rt.apply(this,arguments);return _possibleConstructorReturn$g(this,ot)}}function _possibleConstructorReturn$g(tt,nt){if(nt&&(_typeof$8(nt)==="object"||typeof nt=="function"))return nt;if(nt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$6(tt)}function _assertThisInitialized$6(tt){if(tt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt}function _isNativeReflectConstruct$5(){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(tt){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},_getPrototypeOf$6(tt)}function _defineProperty$e(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}var Modal$1=function(tt){_inherits$g(et,tt);var nt=_createSuper$5(et);function et(){var rt;_classCallCheck$g(this,et);for(var ot=arguments.length,at=new Array(ot),st=0;st<ot;st++)at[st]=arguments[st];return rt=nt.call.apply(nt,[this].concat(at)),_defineProperty$e(_assertThisInitialized$6(rt),"animateOutTimer",void 0),_defineProperty$e(_assertThisInitialized$6(rt),"animateStartTimer",void 0),_defineProperty$e(_assertThisInitialized$6(rt),"dialogContainerRef",reactExports.createRef()),_defineProperty$e(_assertThisInitialized$6(rt),"lastFocus",null),_defineProperty$e(_assertThisInitialized$6(rt),"lastMountNodeOverflowStyle",null),_defineProperty$e(_assertThisInitialized$6(rt),"rootRef",reactExports.createRef()),_defineProperty$e(_assertThisInitialized$6(rt),"state",{isVisible:!1,mounted:!1,isFocusVisible:!1}),_defineProperty$e(_assertThisInitialized$6(rt),"handleFocus",function(ut){isFocusVisible(ut)&&rt.setState({isFocusVisible:!0})}),_defineProperty$e(_assertThisInitialized$6(rt),"handleBlur",function(ut){rt.state.isFocusVisible!==!1&&rt.setState({isFocusVisible:!1})}),_defineProperty$e(_assertThisInitialized$6(rt),"onEscape",function(){rt.props.closeable&&rt.triggerClose(CLOSE_SOURCE.escape)}),_defineProperty$e(_assertThisInitialized$6(rt),"onDocumentClick",function(ut){ut.target&&ut.target instanceof HTMLElement&&ut.target.contains(rt.dialogContainerRef.current)&&rt.onBackdropClick()}),_defineProperty$e(_assertThisInitialized$6(rt),"onBackdropClick",function(){rt.props.closeable&&rt.triggerClose(CLOSE_SOURCE.backdrop)}),_defineProperty$e(_assertThisInitialized$6(rt),"onCloseClick",function(){rt.triggerClose(CLOSE_SOURCE.closeButton)}),_defineProperty$e(_assertThisInitialized$6(rt),"animateOutComplete",function(){rt.setState({isVisible:!1})}),rt}return _createClass$e(et,[{key:"componentDidMount",value:function(){this.setState({mounted:!0})}},{key:"componentWillUnmount",value:function(){this.resetMountNodeScroll(),this.clearTimers()}},{key:"componentDidUpdate",value:function(ot,at){var st=this.props.isOpen;(st!==ot.isOpen||st&&this.state.mounted&&!at.mounted)&&(st?this.didOpen():this.didClose())}},{key:"disableMountNodeScroll",value:function(){var ot=this.getMountNode();this.lastMountNodeOverflowStyle=ot.style.overflow||"",ot.style.overflow="hidden"}},{key:"resetMountNodeScroll",value:function(){var ot=this.getMountNode(),at=this.lastMountNodeOverflowStyle;ot&&at!==null&&(ot.style.overflow==="hidden"&&(ot.style.overflow=at||""),this.lastMountNodeOverflowStyle=null)}},{key:"clearTimers",value:function(){this.animateOutTimer&&clearTimeout(this.animateOutTimer),this.animateStartTimer&&cancelAnimationFrame(this.animateStartTimer)}},{key:"didOpen",value:function(){var ot=this,at=this.rootRef.current;at&&(at.scrollTop=0),this.clearTimers(),this.disableMountNodeScroll(),this.animateStartTimer=requestAnimationFrame(function(){ot.setState({isVisible:!0})})}},{key:"didClose",value:function(){this.resetMountNodeScroll(),this.animateOutTimer=setTimeout(this.animateOutComplete,500)}},{key:"triggerClose",value:function(ot){this.props.onClose&&ot&&this.props.onClose({closeSource:ot})}},{key:"getSharedProps",value:function(){var ot=this.props,at=ot.animate,st=ot.isOpen,ut=ot.size,ct=ot.role,pt=ot.closeable;return{$animate:at,$isVisible:this.state.isVisible,$isOpen:!!st,$size:ut,$role:ct,$closeable:!!pt,$isFocusVisible:this.state.isFocusVisible}}},{key:"getMountNode",value:function(){var ot=this.props.mountNode;return ot||document.body}},{key:"getChildren",value:function(){var ot=this.props.children;return typeof ot=="function"?ot():ot}},{key:"renderModal",value:function(){var ot=this,at=this.props,st=at.overrides,ut=st===void 0?{}:st,ct=at.closeable,pt=at.role,dt=at.autoFocus,ft=at.focusLock,bt=at.returnFocus,ht=ut.Root,Mt=ut.Dialog,mt=ut.DialogContainer,Ot=ut.Close,zt=getOverrides(ht,Root$3),yt=_slicedToArray$e(zt,2),vt=yt[0],At=yt[1],St=getOverrides(mt,DialogContainer),Et=_slicedToArray$e(St,2),Tt=Et[0],Rt=Et[1],Ct=getOverrides(Mt,Dialog$1),wt=_slicedToArray$e(Ct,2),Lt=wt[0],Ht=wt[1],jt=getOverrides(Ot,Close),s0=_slicedToArray$e(jt,2),Ut=s0[0],Yt=s0[1],O0=this.getSharedProps(),a0=this.getChildren();return reactExports.createElement(LocaleContext.Consumer,null,function(b0){return reactExports.createElement(FocusLockCombination,{disabled:!ft,crossFrame:!1,returnFocus:bt,autoFocus:dt},reactExports.createElement(vt,_extends$x({"data-baseweb":"modal",ref:ot.rootRef},O0,At),reactExports.createElement(Tt,_extends$x({ref:ot.dialogContainerRef},O0,Rt),reactExports.createElement(Lt,_extends$x({tabIndex:-1,"aria-modal":!0,"aria-label":"dialog",role:pt},O0,Ht),a0,ct?reactExports.createElement(Ut,_extends$x({"aria-label":b0.modal.close,onClick:ot.onCloseClick},O0,Yt,{onFocus:forkFocus(Yt,ot.handleFocus),onBlur:forkBlur(Yt,ot.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())}}]),et}(reactExports.Component);_defineProperty$e(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 StyledModalButton=newStyled("span",{target:"eoc62cw0"})(({theme:tt})=>({marginRight:tt.spacing.twoXS}));function ModalHeader({children:tt}){const{genericFonts:nt,fontSizes:et,spacing:rt,fontWeights:ot,lineHeights:at}=useTheme();return jsx$1(ModalHeader$1,{style:{marginTop:rt.none,marginLeft:rt.none,marginRight:rt.none,marginBottom:rt.none,paddingTop:rt.twoXL,paddingRight:rt.twoXL,paddingBottom:rt.md,paddingLeft:rt.twoXL,fontFamily:nt.bodyFont,fontSize:et.xl,fontWeight:ot.bold,margin:rt.none,lineHeight:at.small,textTransform:"none",display:"flex",alignItems:"center",maxHeight:"80vh",flexDirection:"row"},children:tt})}function ModalBody$1({children:tt}){const{colors:nt,fontSizes:et,spacing:rt}=useTheme();return jsx$1(ModalBody$2,{style:{marginTop:rt.none,marginLeft:rt.none,marginRight:rt.none,marginBottom:rt.none,paddingTop:rt.md,paddingRight:rt.twoXL,paddingBottom:rt.twoXL,paddingLeft:rt.twoXL,color:nt.bodyText,fontSize:et.md},children:tt})}function ModalFooter({children:tt}){const{spacing:nt}=useTheme();return jsx$1(ModalFooter$1,{style:{marginTop:nt.none,marginLeft:nt.none,marginRight:nt.none,marginBottom:nt.none,paddingTop:nt.md,paddingRight:nt.md,paddingBottom:nt.md,paddingLeft:nt.md},children:jsx$1("div",{children:tt})})}const ModalButton=tt=>jsx$1(StyledModalButton,{children:jsx$1(BaseButton,{...tt})});function calculateModalSize(tt,nt,et){return tt==="full"&&nt&&et?`calc(${nt} + ${et})`:tt==="auto"?SIZE$2.auto:SIZE$2.default}function Modal(tt){const{spacing:nt,radii:et,colors:rt,sizes:ot}=useTheme(),at={Root:{style:{background:rt.darkenedBgMix25},props:{className:"stDialog","data-testid":"stDialog"}},DialogContainer:{style:{alignItems:"start",paddingTop:nt.threeXL}},Dialog:{style:{borderBottomRightRadius:et.xxl,borderBottomLeftRadius:et.xxl,borderTopRightRadius:et.xxl,borderTopLeftRadius:et.xxl,minWidth:ot.minPopupWidth}},Close:{style:{top:`calc(${nt.twoXL} + .375rem)`,right:nt.twoXL}}},st=calculateModalSize(tt.size,ot.contentMaxWidth,nt.lg),ut=merge$6(at,tt.overrides),ct={...tt,size:st};return jsx$1(Modal$1,{...ct,overrides:ut})}const Dialog=({element:tt,deltaMsgReceivedAt:nt,children:et})=>{const{title:rt,dismissible:ot,width:at,isOpen:st}=tt,[ut,ct]=reactExports.useState(!1);return reactExports.useEffect(()=>{notNullOrUndefined(st)&&ct(st)},[st,nt]),ut?jsxs(Modal,{isOpen:!0,closeable:ot,onClose:()=>ct(!1),size:at===Block$2.Dialog.DialogWidth.LARGE?"full":"default",children:[jsx$1(ModalHeader,{children:rt}),jsx$1(ModalBody$1,{children:et})]}):jsx$1(Fragment,{})};function DialogWithProvider(tt){return jsx$1(IsDialogContext.Provider,{value:!0,children:jsx$1(Dialog,{...tt})})}const StyledExpandableContainer=newStyled("div",{target:"enj44ev0"})({}),BORDER_SIZE=1,StyledDetails=newStyled("details",{target:"enj44ev1"})(({isStale:tt,theme:nt})=>({marginBottom:0,marginTop:0,width:"100%",borderStyle:"solid",borderWidth:nt.sizes.borderWidth,borderColor:nt.colors.borderColor,borderRadius:nt.radii.default,...tt?{borderColor:nt.colors.borderColorLight,transition:"border 1s ease-in 0.5s"}:{}})),StyledSummaryHeading=newStyled("span",{target:"enj44ev2"})(({theme:tt})=>({display:"flex",gap:tt.spacing.sm,alignItems:"center",flexGrow:1})),StyledSummary=newStyled("summary",{target:"enj44ev3"})(({theme:tt,empty:nt})=>({position:"relative",display:"flex",width:"100%","&:focus-visible":{outline:`${tt.sizes.borderWidth} solid ${tt.colors.primary}`,outlineOffset:`-${tt.sizes.borderWidth}`,borderRadius:tt.radii.default},fontSize:tt.fontSizes.sm,paddingLeft:tt.spacing.lg,paddingRight:tt.spacing.lg,paddingTop:tt.spacing.md,paddingBottom:tt.spacing.md,cursor:"pointer",listStyleType:"none","&::-webkit-details-marker":{display:"none"},"&:hover":{color:nt?void 0:tt.colors.primary},"&:hover svg":{fill:nt?void 0:tt.colors.primary},...nt&&{cursor:"default"}})),StyledDetailsPanel=newStyled("div",{target:"enj44ev4"})(({theme:tt})=>({paddingBottom:tt.spacing.lg,paddingLeft:tt.spacing.lg,paddingRight:tt.spacing.lg})),ExpanderIcon=tt=>{const{icon:nt}=tt,{activeTheme:et}=React$1.useContext(LibContext),rt={size:"lg",margin:"0",padding:"0"},ot={":material/check:":"stExpanderIconCheck",":material/error:":"stExpanderIconError"};if(nt==="spinner"){const at=!isPresetTheme(et);return jsx$1(StyledSpinnerIcon,{usingCustomTheme:at,"data-testid":"stExpanderIconSpinner",...rt})}return nt?jsx$1(DynamicIcon,{color:"inherit",iconValue:nt,testid:ot[nt]||"stExpanderIcon",...rt}):jsx$1(Fragment,{})},Expander=({element:tt,isStale:nt,empty:et,children:rt})=>{const{label:ot,expanded:at}=tt,[st,ut]=reactExports.useState(at||!1),ct=reactExports.useRef(null),pt=reactExports.useRef(null),dt=reactExports.useRef(null),ft=reactExports.useRef(null),bt=reactExports.useRef(null);reactExports.useEffect(()=>{notNullOrUndefined(at)&&(ut(at),ct.current&&(ct.current.open=at))},[ot,at]);const ht=Ot=>{ct.current&&(ct.current.open=Ot,dt.current=null,ct.current.style.height="",ct.current.style.overflow="")},Mt=(Ot,zt,yt)=>{const vt=yt>zt;dt.current&&(dt.current.cancel(),ft.current&&(clearTimeout(ft.current),ft.current=null));const At=Ot.animate({height:[`${zt}px`,`${yt}px`]},{duration:500,easing:"cubic-bezier(0.23, 1, 0.32, 1)"});At.addEventListener("finish",()=>ht(vt)),dt.current=At};return jsx$1(StyledExpandableContainer,{className:"stExpander","data-testid":"stExpander",children:jsxs(StyledDetails,{isStale:nt,ref:ct,children:[jsxs(StyledSummary,{onClick:Ot=>{if(Ot.preventDefault(),et)return;ut(!st);const zt=ct.current;if(!zt||!pt.current)return;zt.style.overflow="hidden";const yt=zt.getBoundingClientRect().height,vt=pt.current.getBoundingClientRect().height;st?Mt(zt,yt,vt+2*BORDER_SIZE):(zt.style.height=`${yt}px`,zt.open=!0,window.requestAnimationFrame(()=>{Mt(zt,yt,vt+2*BORDER_SIZE+5),ft.current=setTimeout(()=>{if(!bt.current)return;const At=bt.current.getBoundingClientRect().height;Mt(zt,yt,vt+At+2*BORDER_SIZE)},100)}))},empty:et,ref:pt,children:[jsxs(StyledSummaryHeading,{children:[tt.icon&&jsx$1(ExpanderIcon,{icon:tt.icon}),jsx$1(StreamlitMarkdown$1,{source:ot,allowHTML:!1,isLabel:!0})]}),et?jsx$1(Fragment,{}):jsx$1(StyledIcon,{as:st?ExpandLess:ExpandMore,color:"inherit","aria-hidden":"true","data-testid":"stExpanderToggleIcon",size:"lg",margin:"",padding:""})]}),et?jsx$1(Fragment,{}):jsx$1(StyledDetailsPanel,{"data-testid":"stExpanderDetails",ref:bt,children:rt})]})})};function debounce$2(tt,nt){let et=0,rt=null;return(...ot)=>{const at=Date.now();at-et>nt?(tt(...ot),et=at):(rt&&clearTimeout(rt),rt=setTimeout(()=>{tt(...ot),et=Date.now()},Math.max(0,nt-at+et)))}}const DEFAULT_DEBOUNCE_MS=100;function useScrollSpy(tt,nt){const et=reactExports.useRef(nt),rt=reactExports.useMemo(()=>debounce$2(at=>{et.current(at)},DEFAULT_DEBOUNCE_MS),[et]),ot=reactExports.useCallback(at=>{at.timeStampLow=Date.now(),rt(at)},[rt]);reactExports.useLayoutEffect(()=>tt?(tt.addEventListener("scroll",ot,{passive:!0}),ot({target:tt}),()=>tt.removeEventListener("scroll",ot)):()=>{},[ot,tt])}function squareStepper(tt,nt){const et=Math.sign(nt-tt),rt=Math.sqrt(Math.abs(nt-tt)),ot=tt+rt*et;return et>0?Math.min(nt,ot):Math.max(nt,ot)}function step(tt,nt,et,rt){let ot=tt;for(let at=0;at<rt;at++)ot=et(ot,nt);return ot}function useScrollAnimation(tt,nt,et){const rt=reactExports.useRef(0),ot=reactExports.useCallback((st,ut,ct=Date.now())=>{cancelAnimationFrame(rt.current),rt.current=requestAnimationFrame(()=>{if(tt){const pt=tt.scrollHeight-tt.offsetHeight;let dt=step(st,pt,squareStepper,(Date.now()-ct)/5);Math.abs(pt-dt)<1.5&&(dt=pt),tt.scrollTop=dt,pt===dt?nt():ot(st,ut+1,ct)}})},[rt,nt,tt]),at=reactExports.useCallback(()=>{cancelAnimationFrame(rt.current),nt()},[nt]);reactExports.useLayoutEffect(()=>{if(!(!tt||!et))return ot(tt.scrollTop,1),tt?(tt.addEventListener("pointerdown",at,{passive:!0}),tt.addEventListener("wheel",at,{passive:!0}),()=>{tt.removeEventListener("pointerdown",at),tt.removeEventListener("wheel",at),cancelAnimationFrame(rt.current)}):()=>cancelAnimationFrame(rt.current)},[ot,rt,at,tt,et])}function useStateRef(tt){const[nt,et]=reactExports.useState(tt),rt=reactExports.useRef(tt);return rt.current=nt,[nt,et,rt]}const DEFAULT_BOTTOM_THRESHOLD=1,SCROLL_DECISION_DURATION=34,MIN_CHECK_INTERVAL=17;function setImmediateInterval(tt,nt){return tt(),setInterval(tt,nt)}function isAtBottom({scrollHeight:tt,offsetHeight:nt,scrollTop:et}){return tt-et-nt<DEFAULT_BOTTOM_THRESHOLD}function useScrollToBottom(){const tt=reactExports.useRef(null),[nt,et,rt]=useStateRef(!1),[ot,at,st]=useStateRef(!0),ut=reactExports.useRef(0),ct=reactExports.useRef(0),pt=reactExports.useRef(0),dt=reactExports.useCallback(()=>{ut.current=Date.now(),st.current||et(!1),at(!1)},[ut,st,at,et]),ft=reactExports.useCallback(({timeStampLow:bt})=>{const{current:ht}=tt,Mt=st.current;if(bt<=ut.current||!ht)return;const mt=isAtBottom(ht),{offsetHeight:Ot,scrollHeight:zt}=ht,{current:yt}=ct,{current:vt}=pt,At=Ot!==yt,St=zt!==vt;if(At&&(ct.current=Ot),St&&(pt.current=zt),!At&&!St){const Et=Mt||mt;rt.current!==Et&&et(Et)}else rt.current&&(at(!0),et(!0))},[ut,ct,pt,st,rt,at,et]);return reactExports.useEffect(()=>{if(tt.current){let bt=0;const ht=setImmediateInterval(()=>{const{current:Mt}=tt,mt=st.current;rt.current&&Mt?isAtBottom(Mt)?bt=0:bt?Date.now()-bt>SCROLL_DECISION_DURATION&&(mt||(at(!0),et(!0)),bt=0):bt=Date.now():Mt&&Mt.scrollHeight<=Mt.offsetHeight&&!rt.current&&et(!0)},MIN_CHECK_INTERVAL);return()=>clearInterval(ht)}},[tt,nt,ot,st,rt,et,at]),reactExports.useEffect(()=>{const bt=tt.current;if(bt){const ht=()=>{pt.current=bt.scrollHeight};return bt.addEventListener("focus",ht,{capture:!0,passive:!0}),()=>bt.removeEventListener("focus",ht)}},[tt]),useScrollSpy(tt.current,ft),useScrollAnimation(tt.current,dt,ot),tt}var FUNC_ERROR_TEXT$3="Expected a function",NAN$1=NaN,symbolTag$3="[object Symbol]",reTrim=/^\s+|\s+$/g,reIsBadHex$1=/^[-+]0x[0-9a-f]+$/i,reIsBinary$1=/^0b[01]+$/i,reIsOctal$1=/^0o[0-7]+$/i,freeParseInt$1=parseInt,freeGlobal$1=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,freeSelf$1=typeof self=="object"&&self&&self.Object===Object&&self,root$3=freeGlobal$1||freeSelf$1||Function("return this")(),objectProto$i=Object.prototype,objectToString$1=objectProto$i.toString,nativeMax$2=Math.max,nativeMin$1=Math.min,now$3=function(){return root$3.Date.now()};function debounce$1(tt,nt,et){var rt,ot,at,st,ut,ct,pt=0,dt=!1,ft=!1,bt=!0;if(typeof tt!="function")throw new TypeError(FUNC_ERROR_TEXT$3);nt=toNumber$1(nt)||0,isObject$5(et)&&(dt=!!et.leading,ft="maxWait"in et,at=ft?nativeMax$2(toNumber$1(et.maxWait)||0,nt):at,bt="trailing"in et?!!et.trailing:bt);function ht(Et){var Tt=rt,Rt=ot;return rt=ot=void 0,pt=Et,st=tt.apply(Rt,Tt),st}function Mt(Et){return pt=Et,ut=setTimeout(zt,nt),dt?ht(Et):st}function mt(Et){var Tt=Et-ct,Rt=Et-pt,Ct=nt-Tt;return ft?nativeMin$1(Ct,at-Rt):Ct}function Ot(Et){var Tt=Et-ct,Rt=Et-pt;return ct===void 0||Tt>=nt||Tt<0||ft&&Rt>=at}function zt(){var Et=now$3();if(Ot(Et))return yt(Et);ut=setTimeout(zt,mt(Et))}function yt(Et){return ut=void 0,bt&&rt?ht(Et):(rt=ot=void 0,st)}function vt(){ut!==void 0&&clearTimeout(ut),pt=0,rt=ct=ot=ut=void 0}function At(){return ut===void 0?st:yt(now$3())}function St(){var Et=now$3(),Tt=Ot(Et);if(rt=arguments,ot=this,ct=Et,Tt){if(ut===void 0)return Mt(ct);if(ft)return ut=setTimeout(zt,nt),ht(ct)}return ut===void 0&&(ut=setTimeout(zt,nt)),st}return St.cancel=vt,St.flush=At,St}function isObject$5(tt){var nt=typeof tt;return!!tt&&(nt=="object"||nt=="function")}function isObjectLike$2(tt){return!!tt&&typeof tt=="object"}function isSymbol$2(tt){return typeof tt=="symbol"||isObjectLike$2(tt)&&objectToString$1.call(tt)==symbolTag$3}function toNumber$1(tt){if(typeof tt=="number")return tt;if(isSymbol$2(tt))return NAN$1;if(isObject$5(tt)){var nt=typeof tt.valueOf=="function"?tt.valueOf():tt;tt=isObject$5(nt)?nt+"":nt}if(typeof tt!="string")return tt===0?tt:+tt;tt=tt.replace(reTrim,"");var et=reIsBinary$1.test(tt);return et||reIsOctal$1.test(tt)?freeParseInt$1(tt.slice(2),et?2:8):reIsBadHex$1.test(tt)?NAN$1:+tt}var lodash_debounce=debounce$1;const _debounce=getDefaultExportFromCjs$1(lodash_debounce);function debounceRender(tt,nt,et){class rt extends reactExports.Component{constructor(){super(...arguments),this.updateDebounced=_debounce(this.forceUpdate,nt,et)}shouldComponentUpdate(){return this.updateDebounced(),!1}componentWillUnmount(){this.updateDebounced.cancel()}render(){return React$1.createElement(tt,Object.assign({},this.props))}}return rt.displayName=`debounceRender(${tt.displayName||tt.name||"Component"})`,hoistNonReactStatics$2(rt,tt)}var baseSlice$1=_baseSlice;function castSlice$1(tt,nt,et){var rt=tt.length;return et=et===void 0?rt:et,!nt&&et>=rt?tt:baseSlice$1(tt,nt,et)}var _castSlice=castSlice$1;function baseFindIndex$1(tt,nt,et,rt){for(var ot=tt.length,at=et+(rt?1:-1);rt?at--:++at<ot;)if(nt(tt[at],at,tt))return at;return-1}var _baseFindIndex=baseFindIndex$1;function baseIsNaN$1(tt){return tt!==tt}var _baseIsNaN=baseIsNaN$1;function strictIndexOf$1(tt,nt,et){for(var rt=et-1,ot=tt.length;++rt<ot;)if(tt[rt]===nt)return rt;return-1}var _strictIndexOf=strictIndexOf$1,baseFindIndex=_baseFindIndex,baseIsNaN=_baseIsNaN,strictIndexOf=_strictIndexOf;function baseIndexOf$2(tt,nt,et){return nt===nt?strictIndexOf(tt,nt,et):baseFindIndex(tt,baseIsNaN,et)}var _baseIndexOf=baseIndexOf$2,baseIndexOf$1=_baseIndexOf;function charsEndIndex$1(tt,nt){for(var et=tt.length;et--&&baseIndexOf$1(nt,tt[et],0)>-1;);return et}var _charsEndIndex=charsEndIndex$1,baseToString$1=_baseToString,castSlice=_castSlice,charsEndIndex=_charsEndIndex,stringToArray=_stringToArray,toString$3=toString_1,trimmedEndIndex$1=_trimmedEndIndex;function trimEnd(tt,nt,et){if(tt=toString$3(tt),tt&&(et||nt===void 0))return tt.slice(0,trimmedEndIndex$1(tt)+1);if(!tt||!(nt=baseToString$1(nt)))return tt;var rt=stringToArray(tt),ot=charsEndIndex(rt,stringToArray(nt))+1;return castSlice(rt,0,ot).join("")}var trimEnd_1=trimEnd;const trimEnd$1=getDefaultExportFromCjs$1(trimEnd_1);var momentTimezone$1={exports:{}},momentTimezone={exports:{}};//! moment.js
450
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(tt,nt){if(tt){if(typeof tt=="string")return _arrayLikeToArray$f(tt,nt);var et=Object.prototype.toString.call(tt).slice(8,-1);if(et==="Object"&&tt.constructor&&(et=tt.constructor.name),et==="Map"||et==="Set")return Array.from(tt);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return _arrayLikeToArray$f(tt,nt)}}function _arrayLikeToArray$f(tt,nt){(nt==null||nt>tt.length)&&(nt=tt.length);for(var et=0,rt=new Array(nt);et<nt;et++)rt[et]=tt[et];return rt}function _iterableToArrayLimit$f(tt,nt){var et=tt==null?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(et!=null){var rt=[],ot=!0,at=!1,st,ut;try{for(et=et.call(tt);!(ot=(st=et.next()).done)&&(rt.push(st.value),!(nt&&rt.length===nt));ot=!0);}catch(ct){at=!0,ut=ct}finally{try{!ot&&et.return!=null&&et.return()}finally{if(at)throw ut}}return rt}}function _arrayWithHoles$f(tt){if(Array.isArray(tt))return tt}var KEYBOARD_ACTION={next:"next",previous:"previous"},getLayoutParams=function tt(nt,et){return nt?isVertical(et)?{length:nt.clientHeight,distance:nt.offsetTop}:{length:nt.clientWidth,distance:nt.offsetLeft}:{length:0,distance:0}},scrollParentToCentreTarget=function tt(nt){var et=nt.parentNode.getBoundingClientRect(),rt=et.x,ot=et.y,at=et.width,st=et.height,ut=nt.getBoundingClientRect(),ct=ut.x,pt=ut.y,dt=ut.width,ft=ut.height,bt={x:ct-rt+dt/2,y:pt-ot+ft/2},ht=nt.parentNode,Mt=ht.scrollLeft,mt=ht.scrollTop,Ot={x:Mt+bt.x-at/2,y:mt+bt.y-st/2};nt.parentNode.scroll(Ot.x,Ot.y)};function RenderEnhancer(tt){var nt=tt.Enhancer;return typeof nt=="string"?nt:reactIsExports$1.isValidElementType(nt)?reactExports.createElement(nt,null):nt}function Tabs$1(tt){var nt=tt.activeKey,et=nt===void 0?"0":nt,rt=tt.disabled,ot=rt===void 0?!1:rt,at=tt.children,st=tt.fill,ut=st===void 0?FILL.intrinsic:st,ct=tt.activateOnFocus,pt=ct===void 0?!0:ct,dt=tt.onChange,ft=tt.orientation,bt=ft===void 0?ORIENTATION.horizontal:ft,ht=tt.overrides,Mt=ht===void 0?{}:ht,mt=tt.renderAll,Ot=mt===void 0?!1:mt,zt=tt.uid,yt=zt===void 0?null:zt,vt=tt.endEnhancer,At=useUID(),St=yt||At,Et=Mt.Root,Tt=Mt.TabList,Rt=Mt.TabHighlight,Ct=Mt.TabBorder,wt=getOverrides(Et,StyledRoot$1),Lt=_slicedToArray$f(wt,2),Ht=Lt[0],jt=Lt[1],s0=getOverrides(Tt,StyledTabList),Ut=_slicedToArray$f(s0,2),Yt=Ut[0],O0=Ut[1],a0=getOverrides(Rt,StyledTabHighlight),b0=_slicedToArray$f(a0,2),kt=b0[0],o0=b0[1],qt=getOverrides(Ct,StyledTabBorder),Dt=_slicedToArray$f(qt,2),Bt=Dt[0],p0=Dt[1],r0=getOverrides(Mt.EndEnhancerContainer,StyledEndEnhancerContainer),l0=_slicedToArray$f(r0,2),f0=l0[0],i0=l0[1],$t=reactExports.useState(0),It=_slicedToArray$f($t,2),Vt=It[0],xt=It[1];reactExports.useEffect(function(){xt(Vt+1)},[et]);var Ft=reactExports.useRef(),Pt=reactExports.useState({length:0,distance:0}),Zt=_slicedToArray$f(Pt,2),Kt=Zt[0],n0=Zt[1],c0=reactExports.useCallback(function(){Ft.current&&n0(getLayoutParams(Ft.current,bt))},[Ft.current,bt]);reactExports.useEffect(c0,[Ft.current,bt]),reactExports.useEffect(function(){Ft.current&&(isHorizontal(bt)?Ft.current.parentNode.scrollWidth>Ft.current.parentNode.clientWidth:Ft.current.parentNode.scrollHeight>Ft.current.parentNode.clientHeight)&&(Vt>1?Ft.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}):scrollParentToCentreTarget(Ft.current))},[Ft.current]);var u0={$orientation:bt,$fill:ut},y0=useStyletron(),D0=_slicedToArray$f(y0,2),S0=D0[1],x0=reactExports.useCallback(function(m0){if(isHorizontal(bt))if(isRTL(S0.direction))switch(m0.keyCode){case 39:return KEYBOARD_ACTION.previous;case 37:return KEYBOARD_ACTION.next;default:return null}else switch(m0.keyCode){case 37:return KEYBOARD_ACTION.previous;case 39:return KEYBOARD_ACTION.next;default:return null}else switch(m0.keyCode){case 38:return KEYBOARD_ACTION.previous;case 40:return KEYBOARD_ACTION.next;default:return null}},[bt,S0.direction]);return reactExports.createElement(Ht,_extends$y({},u0,jt),reactExports.createElement(StyledTabBar,{$hasEndEnhancer:!!vt,$orientation:bt},reactExports.createElement(Yt,_extends$y({"data-baseweb":"tab-list",role:"tablist","aria-orientation":bt},u0,O0),reactExports.Children.map(at,function(m0,e0){if(m0)return reactExports.createElement(InternalTab,_extends$y({childKey:m0.key,childIndex:e0,activeKey:et,orientation:bt,activeTabRef:Ft,updateHighlight:c0,parseKeyDown:x0,activateOnFocus:pt,uid:St,disabled:ot,sharedStylingProps:u0,onChange:dt},m0.props))}),reactExports.createElement(kt,_extends$y({"data-baseweb":"tab-highlight",$length:Kt.length,$distance:Kt.distance,$animate:Vt>1,"aria-hidden":"true",role:"presentation"},u0,o0))),bt===ORIENTATION.horizontal&&vt!==null&&vt!==void 0&&reactExports.createElement(f0,_extends$y({},i0,{$orientation:bt}),reactExports.createElement(RenderEnhancer,{Enhancer:vt}))),reactExports.createElement(Bt,_extends$y({"data-baseweb":"tab-border","aria-hidden":"true",role:"presentation"},u0,p0)),reactExports.Children.map(at,function(m0,e0){if(m0)return reactExports.createElement(InternalTabPanel,_extends$y({childKey:m0.key,childIndex:e0,activeKey:et,uid:St,sharedStylingProps:u0,renderAll:Ot},m0.props))}))}function InternalTab(tt){var nt=tt.childKey,et=tt.childIndex,rt=tt.activeKey,ot=tt.orientation,at=tt.activeTabRef,st=tt.updateHighlight,ut=tt.parseKeyDown,ct=tt.activateOnFocus,pt=tt.uid,dt=tt.disabled,ft=tt.sharedStylingProps,bt=tt.onChange,ht=_objectWithoutProperties$i(tt,_excluded$g),Mt=nt||String(et),mt=Mt==rt,Ot=ht.artwork,zt=ht.overrides,yt=zt===void 0?{}:zt,vt=ht.tabRef,At=ht.onClick,St=ht.title,Et=_objectWithoutProperties$i(ht,_excluded2$3),Tt=reactExports.useRef();reactExports.useImperativeHandle(vt,function(){return mt?at.current:Tt.current});var Rt=reactExports.useRef({length:0,distance:0});reactExports.useEffect(function(){Rt.current=getLayoutParams(mt?at.current:Tt.current,ot)}),reactExports.useEffect(function(){if(window.ResizeObserver){var r0=new window.ResizeObserver(function(l0){if(l0[0]&&l0[0].target){var f0=getLayoutParams(l0[0].target,ot);(f0.length!==Rt.current.length||f0.distance!==Rt.current.distance)&&st()}});return r0.observe(mt?at.current:Tt.current),function(){r0.disconnect()}}},[rt,ot]),reactExports.useEffect(st,[St]);var Ct=yt.Tab,wt=yt.ArtworkContainer,Lt=getOverrides(Ct,StyledTab),Ht=_slicedToArray$f(Lt,2),jt=Ht[0],s0=Ht[1],Ut=getOverrides(wt,StyledArtworkContainer),Yt=_slicedToArray$f(Ut,2),O0=Yt[0],a0=Yt[1],b0=reactExports.useState(!1),kt=_slicedToArray$f(b0,2),o0=kt[0],qt=kt[1],Dt=reactExports.useCallback(function(r0){isFocusVisible(r0)&&qt(!0)},[]),Bt=reactExports.useCallback(function(r0){o0!==!1&&qt(!1)},[o0]),p0=reactExports.useCallback(function(r0){var l0=_toConsumableArray$1(r0.target.parentNode.childNodes).filter(function(It){return!It.disabled&&It.getAttribute("role")==="tab"});if(l0.length!==1){var f0=l0.indexOf(r0.target),i0=ut(r0);if(i0){var $t;i0===KEYBOARD_ACTION.previous?l0[f0-1]?$t=l0[f0-1]:$t=l0[l0.length-1]:i0===KEYBOARD_ACTION.next&&(l0[f0+1]?$t=l0[f0+1]:$t=l0[0]),$t&&($t.focus(),ct&&$t.click()),isVertical(ot)&&r0.preventDefault()}}});return reactExports.createElement(jt,_extends$y({"data-baseweb":"tab",key:Mt,id:getTabId(pt,Mt),role:"tab",onKeyDown:p0,"aria-selected":mt,"aria-controls":getTabPanelId(pt,Mt),tabIndex:mt?"0":"-1",ref:mt?at:Tt,disabled:!mt&&dt,type:"button",$focusVisible:o0,$isActive:mt},ft,Et,s0,{onClick:function(l0){typeof bt=="function"&&bt({activeKey:Mt}),typeof At=="function"&&At(l0)},onFocus:forkFocus(_objectSpread$c(_objectSpread$c({},Et),s0),Dt),onBlur:forkBlur(_objectSpread$c(_objectSpread$c({},Et),s0),Bt)}),Ot?reactExports.createElement(O0,_extends$y({"data-baseweb":"artwork-container"},ft,a0),reactExports.createElement(Ot,{size:20,color:"contentPrimary"})):null,St||Mt)}function InternalTabPanel(tt){var nt=tt.childKey,et=tt.childIndex,rt=tt.activeKey,ot=tt.uid,at=tt.sharedStylingProps,st=tt.renderAll,ut=_objectWithoutProperties$i(tt,_excluded3),ct=nt||String(et),pt=ct==rt,dt=ut.overrides,ft=dt===void 0?{}:dt,bt=ut.children,ht=ft.TabPanel,Mt=getOverrides(ht,StyledTabPanel),mt=_slicedToArray$f(Mt,2),Ot=mt[0],zt=mt[1];return reactExports.createElement(Ot,_extends$y({"data-baseweb":"tab-panel",key:ct,role:"tabpanel",id:getTabPanelId(ot,ct),"aria-labelledby":getTabId(ot,ct),hidden:!pt},at,zt),pt||st?bt:null)}function Tab(tt){return null}function shouldComponentBeEnabled(tt,nt){return tt!=="empty"||nt!==ScriptRunState.RUNNING}function isElementStale(tt,nt,et,rt){return nt===ScriptRunState.RERUN_REQUESTED?!0:nt===ScriptRunState.RUNNING?rt&&rt.length?!!(tt.fragmentId&&rt.includes(tt.fragmentId)&&tt.scriptRunId!==et):tt.scriptRunId!==et:!1}function isComponentStale(tt,nt,et,rt,ot){return!tt||isElementStale(nt,et,rt,ot)}function assignDividerColor(tt,nt){const et=getDividerColors(nt),rt=Object.keys(et),{blue:ot,green:at,orange:st,red:ut,violet:ct}=et,pt={blue:ot,green:at,orange:st,red:ut,violet:ct},dt=Object.keys(pt);let ft=0;Array.from(tt.getElements()).forEach(bt=>{var Mt;const ht=(Mt=bt.heading)==null?void 0:Mt.divider;if(bt.type==="heading"&&ht)if(ht==="auto"){const mt=dt[ft];bt.heading.divider=pt[mt],ft+=1,ft===dt.length&&(ft=0)}else rt.includes(ht)&&(bt.heading.divider=et[ht])})}function convertKeyToClassName(tt){return tt?"st-key-"+tt.trim().replace(/[^a-zA-Z0-9_-]/g,"-"):""}function getKeyFromId(tt){if(!tt||!isValidElementId(tt))return;const et=tt.split("-").slice(2).join("-");return et==="None"?void 0:et}const StyledTabContainer=newStyled("div",{target:"e10uku090"})(({theme:tt,isOverflowing:nt,tabHeight:et})=>({...nt?{position:"relative","::after":{content:'" "',position:"absolute",zIndex:tt.zIndices.priority,top:0,right:0,pointerEvents:"none",backgroundImage:`linear-gradient(to right, ${transparentize(tt.colors.bgColor,1)}, ${tt.colors.bgColor})`,width:tt.spacing.lg,height:et}}:{}}));function Tabs(tt){const{widgetsDisabled:nt,node:et,isStale:rt,scriptRunState:ot,scriptRunId:at}=tt,{fragmentIdsThisRun:st}=reactExports.useContext(LibContext);let ut=[];const[ct,pt]=reactExports.useState(0),[dt,ft]=reactExports.useState(et.children[0].deltaBlock.tab.label||"0"),bt=reactExports.useRef(null),ht=useTheme(),[Mt,mt]=reactExports.useState(!1);reactExports.useEffect(()=>{ut.indexOf(dt)===-1&&(pt(0),ft(ut[0]))},[ut]),reactExports.useEffect(()=>{if(bt.current){const{scrollWidth:vt,clientWidth:At}=bt.current;mt(vt>At)}const yt=ut.indexOf(dt);yt!==-1?(pt(yt),ft(ut[yt])):(pt(0),ft(ut[0]))},[et.children.length]);const Ot=ht.sizes.tabHeight,zt=ht.spacing.threeXS;return jsx$1(StyledTabContainer,{className:"stTabs","data-testid":"stTabs",isOverflowing:Mt,tabHeight:Ot,children:jsx$1(Tabs$1,{activateOnFocus:!0,activeKey:ct,onChange:({activeKey:yt})=>{pt(yt),ft(ut[yt])},renderAll:!0,disabled:nt,overrides:{TabHighlight:{style:()=>({backgroundColor:nt?ht.colors.fadedText40:ht.colors.primary,height:zt})},TabBorder:{style:()=>({backgroundColor:ht.colors.borderColorLight,height:zt})},TabList:{props:{ref:bt},style:()=>({gap:ht.spacing.lg,marginBottom:`-${zt}`,paddingBottom:zt,overflowY:"hidden",...rt&&STALE_STYLES})},Root:{style:()=>({transform:"none"})}},children:et.children.map((yt,vt)=>{var Ct,wt;vt===0&&(ut=[]);const At=isElementStale(yt,ot,at,st),St={...tt,isStale:rt||At,widgetsDisabled:nt,node:yt};let Et=vt.toString();(wt=(Ct=St.node.deltaBlock)==null?void 0:Ct.tab)!=null&&wt.label&&(Et=St.node.deltaBlock.tab.label),ut[vt]=Et;const Tt=ct.toString()===vt.toString(),Rt=vt===et.children.length-1;return jsx$1(Tab,{"data-testid":"stTab",title:jsx$1(StreamlitMarkdown$1,{source:Et,allowHTML:!1,isLabel:!0}),disabled:nt,overrides:{TabPanel:{style:()=>({paddingLeft:ht.spacing.none,paddingRight:ht.spacing.none,paddingBottom:ht.spacing.none,paddingTop:ht.spacing.lg})},Tab:{style:()=>({height:Ot,whiteSpace:"nowrap",paddingLeft:ht.spacing.none,paddingRight:ht.spacing.none,paddingTop:ht.spacing.none,paddingBottom:ht.spacing.none,fontSize:ht.fontSizes.sm,background:"transparent",color:nt?ht.colors.fadedText40:ht.colors.bodyText,":focus":{outline:"none",color:nt?ht.colors.fadedText40:ht.colors.primary,background:"none"},":hover":{color:nt?ht.colors.fadedText40:ht.colors.primary,background:"none"},...Tt?{color:nt?ht.colors.fadedText40:ht.colors.primary}:{},...Mt&&Rt?{paddingRight:`calc(${ht.spacing.lg} * 0.6)`}:{},...!rt&&At&&STALE_STYLES})}},children:tt.renderTabContent(St)},vt)})})})}var _excluded$f=["children","iconAttrs","iconVerticalAlign","iconViewBox","size","title"];function ownKeys$c(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$b(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$c(Object(et),!0).forEach(function(rt){_defineProperty$u(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$c(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}var EmotionIconBaseBase=reactExports.forwardRef(function(tt,nt){var et=tt.children,rt=tt.iconAttrs;tt.iconVerticalAlign;var ot=tt.iconViewBox,at=tt.size,st=tt.title,ut=_objectWithoutProperties$o(tt,_excluded$f),ct=_objectSpread$b(_objectSpread$b({viewBox:ot,height:tt.height!==void 0?tt.height:at,width:tt.width!==void 0?tt.width:at,"aria-hidden":st==null?"true":void 0,focusable:"false",role:st!=null?"img":void 0},rt),ut);return reactExports.createElement("svg",_extends$Q({},ct,{ref:nt}),st&&reactExports.createElement("title",{key:"icon-title"},st),et)}),EmotionIconBase=createStyled(EmotionIconBaseBase,{target:"ex0cdmw0"})("display:inline-block;vertical-align:",function(tt){return tt.iconVerticalAlign},";overflow:hidden;"),ArrowDownward=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}))});ArrowDownward.displayName="ArrowDownward";var ArrowUpward=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}))});ArrowUpward.displayName="ArrowUpward";var Check=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"}))});Check.displayName="Check";var ChevronLeft=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});ChevronLeft.displayName="ChevronLeft";var ChevronRight=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});ChevronRight.displayName="ChevronRight";var ExpandLess=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14l-6-6z"}))});ExpandLess.displayName="ExpandLess";var ExpandMore=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M24 24H0V0h24v24z",opacity:.87}),reactExports.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"}))});ExpandMore.displayName="ExpandMore";var Face=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M10.25 13a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0zM15 11.75a1.25 1.25 0 100 2.5 1.25 1.25 0 000-2.5zm7 .25c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10zM10.66 4.12C12.06 6.44 14.6 8 17.5 8c.46 0 .91-.05 1.34-.12C17.44 5.56 14.9 4 12 4c-.46 0-.91.05-1.34.12zM4.42 9.47a8.046 8.046 0 003.66-4.44 8.046 8.046 0 00-3.66 4.44zM20 12c0-.78-.12-1.53-.33-2.24-.7.15-1.42.24-2.17.24a10 10 0 01-7.76-3.69A10.016 10.016 0 014 11.86c.01.04 0 .09 0 .14 0 4.41 3.59 8 8 8s8-3.59 8-8z"}))});Face.displayName="Face";var SmartToy=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("rect",{width:24,height:24,fill:"none"}),reactExports.createElement("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3zm-2 10H6V7h12v12zm-9-6c-.83 0-1.5-.67-1.5-1.5S8.17 10 9 10s1.5.67 1.5 1.5S9.83 13 9 13zm7.5-1.5c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5 1.5.67 1.5 1.5zM8 15h8v2H8v-2z"}))});SmartToy.displayName="SmartToy";const StyledPopoverButtonIcon=newStyled("div",{target:"e1q66ohu0"})(({theme:tt})=>({marginLeft:tt.spacing.threeXS,marginRight:`calc(-${tt.iconSizes.lg} * 0.25)`})),Popover=({element:tt,empty:nt,width:et,children:rt})=>{const[ot,at]=React$1.useState(!1),st=React$1.useContext(IsSidebarContext),ut=useTheme(),ct=hasLightBackgroundColor(ut),pt=tt.help?et:!0;return jsx$1("div",{"data-testid":"stPopover",className:"stPopover",children:jsx$1(Popover$1,{triggerType:TRIGGER_TYPE.click,placement:PLACEMENT.bottomLeft,content:()=>rt,isOpen:ot,onClickOutside:()=>at(!1),onClick:()=>ot?at(!1):void 0,onEsc:()=>at(!1),ignoreBoundary:st,renderAll:!0,overrides:{Body:{props:{"data-testid":"stPopoverBody"},style:()=>({marginRight:ut.spacing.lg,marginBottom:ut.spacing.lg,maxHeight:"70vh",overflow:"auto",maxWidth:`calc(${ut.sizes.contentMaxWidth} - 2*${ut.spacing.lg})`,minWidth:tt.useContainerWidth?`${Math.max(et,160)}px`:ut.sizes.minPopupWidth,[`@media (max-width: ${ut.breakpoints.sm})`]:{maxWidth:`calc(100% - ${ut.spacing.threeXL})`},borderTopLeftRadius:ut.radii.xl,borderTopRightRadius:ut.radii.xl,borderBottomRightRadius:ut.radii.xl,borderBottomLeftRadius:ut.radii.xl,borderLeftWidth:ut.sizes.borderWidth,borderRightWidth:ut.sizes.borderWidth,borderTopWidth:ut.sizes.borderWidth,borderBottomWidth:ut.sizes.borderWidth,paddingRight:`calc(${ut.spacing.twoXL} - ${ut.sizes.borderWidth})`,paddingLeft:`calc(${ut.spacing.twoXL} - ${ut.sizes.borderWidth})`,paddingBottom:`calc(${ut.spacing.twoXL} - ${ut.sizes.borderWidth})`,paddingTop:`calc(${ut.spacing.twoXL} - ${ut.sizes.borderWidth})`,borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftColor:ut.colors.borderColor,borderRightColor:ut.colors.borderColor,borderTopColor:ut.colors.borderColor,borderBottomColor:ut.colors.borderColor,boxShadow:ct?"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:tt.help,children:jsxs(BaseButton,{"data-testid":"stPopoverButton",kind:BaseButtonKind.SECONDARY,size:BaseButtonSize.SMALL,disabled:nt||tt.disabled,fluidWidth:tt.useContainerWidth?pt:!1,onClick:()=>at(!ot),children:[jsx$1(DynamicButtonLabel,{icon:tt.icon,label:tt.label}),jsx$1(StyledPopoverButtonIcon,{children:jsx$1(StyledIcon,{as:ot?ExpandLess:ExpandMore,color:"inherit","aria-hidden":"true",size:"lg",margin:ut.spacing.none,padding:ut.spacing.none})})]})})})})})},StyledChatMessageContainer=newStyled("div",{target:"e2yddhz0"})(({theme:tt,background:nt})=>{const et=hasLightBackgroundColor(tt);return{display:"flex",alignItems:"flex-start",gap:tt.spacing.sm,padding:tt.spacing.lg,paddingRight:nt?tt.spacing.lg:0,borderRadius:tt.radii.default,...nt?{backgroundColor:transparentize(et?tt.colors.gray20:tt.colors.gray90,.5)}:{}}}),StyledMessageContent=newStyled("div",{target:"e2yddhz1"})(({theme:tt})=>({color:tt.colors.bodyText,margin:"auto",flexGrow:1,minWidth:0})),StyledAvatarBackground=newStyled("div",{target:"e2yddhz2"})(({theme:tt})=>{const nt=hasLightBackgroundColor(tt);return{display:"flex",border:`${tt.sizes.borderWidth} solid ${nt?tt.colors.gray40:tt.colors.gray85}`,backgroundColor:nt?tt.colors.white:tt.colors.gray100,color:nt?tt.colors.gray90:tt.colors.white,lineHeight:tt.lineHeights.none,fontSize:tt.fontSizes.md,flexShrink:0,width:tt.sizes.chatAvatarSize,height:tt.sizes.chatAvatarSize,borderRadius:tt.radii.default,alignItems:"center",justifyContent:"center"}}),StyledAvatarIcon=newStyled("div",{target:"e2yddhz3"})(({theme:tt,background:nt})=>{const et=hasLightBackgroundColor(tt);return{display:"flex",width:tt.sizes.chatAvatarSize,height:tt.sizes.chatAvatarSize,flexShrink:0,borderRadius:tt.radii.default,alignItems:"center",justifyContent:"center",backgroundColor:nt,color:et?tt.colors.white:tt.colors.gray100}}),StyledAvatarImage=newStyled("img",{target:"e2yddhz4"})(({theme:tt})=>({width:tt.sizes.chatAvatarSize,height:tt.sizes.chatAvatarSize,flexShrink:0,borderRadius:tt.radii.default,objectFit:"cover",display:"flex"}));function ChatMessageAvatar(tt){const{avatar:nt,avatarType:et,name:rt,endpoints:ot}=tt,at=useTheme();if(nt)switch(et){case Block$2.ChatMessage.AvatarType.IMAGE:return jsx$1(StyledAvatarImage,{src:ot.buildMediaURL(nt),alt:`${rt} avatar`});case Block$2.ChatMessage.AvatarType.EMOJI:return jsx$1(StyledAvatarBackground,{children:nt});case Block$2.ChatMessage.AvatarType.ICON:if(nt==="user")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarUser",background:at.colors.red60,children:jsx$1(Icon$2,{content:Face,size:"lg"})});if(nt==="assistant")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarAssistant",background:at.colors.orange60,children:jsx$1(Icon$2,{content:SmartToy,size:"lg"})});if(nt.startsWith(":material"))return jsx$1(StyledAvatarBackground,{"data-testid":"stChatMessageAvatarCustom",children:jsx$1(DynamicIcon,{size:"lg",iconValue:nt,color:at.colors.bodyText})})}return jsx$1(StyledAvatarBackground,{children:rt?rt.charAt(0).toUpperCase():"🧑‍💻"})}const ChatMessage=({endpoints:tt,element:nt,children:et})=>{const{avatar:rt,avatarType:ot,name:at}=nt;return jsxs(StyledChatMessageContainer,{className:"stChatMessage","data-testid":"stChatMessage",background:["user","human"].includes(at.toLowerCase()),children:[jsx$1(ChatMessageAvatar,{name:at,avatar:rt,avatarType:ot,endpoints:tt}),jsx$1(StyledMessageContent,{"data-testid":"stChatMessageContent","aria-label":`Chat message from ${at}`,children:et})]})};var SIZE$2={default:"default",full:"full",auto:"auto"},SIZE_WIDTHS={default:"500px",full:"100%",auto:"auto"},ROLE={dialog:"dialog",alertdialog:"alertdialog"},CLOSE_SOURCE={closeButton:"closeButton",backdrop:"backdrop",escape:"escape"};function ownKeys$b(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$a(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$b(Object(et),!0).forEach(function(rt){_defineProperty$f(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$b(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}function _defineProperty$f(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}function getSizeStyles(tt){var nt={maxWidth:"100%",width:null};return typeof tt=="number"?nt.width="".concat(tt,"px"):SIZE$2[tt]?nt.width=SIZE_WIDTHS[tt]:typeof tt=="string"&&(nt.width=tt),tt===SIZE$2.full&&(nt.alignSelf="stretch"),nt}var Root$3=styled("div",function(tt){var nt=tt.$isOpen;return{position:"fixed",overflow:"auto",right:0,bottom:0,top:0,left:0,pointerEvents:nt?"auto":"none"}});Root$3.displayName="Root";Root$3.displayName="Root";var DialogContainer=styled("div",function(tt){var nt=tt.$animate,et=tt.$isOpen,rt=tt.$isVisible,ot=tt.$theme,at={transitionProperty:"opacity",transitionDuration:ot.animation.timing400,transitionTimingFunction:ot.animation.easeOutCurve};return _objectSpread$a({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",minHeight:"100%",userSelect:"none",pointerEvents:"auto",backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",opacity:rt&&et?1:0},nt?at:null)});DialogContainer.displayName="DialogContainer";DialogContainer.displayName="DialogContainer";var Dialog$1=styled("div",function(tt){var nt=tt.$animate,et=tt.$isOpen,rt=tt.$isVisible,ot=tt.$size,at=tt.$theme;return _objectSpread$a(_objectSpread$a(_objectSpread$a({position:"relative",backgroundColor:at.colors.backgroundPrimary,borderTopLeftRadius:at.borders.radius500,borderTopRightRadius:at.borders.radius500,borderBottomRightRadius:at.borders.radius500,borderBottomLeftRadius:at.borders.radius500,marginLeft:at.sizing.scale600,marginTop:at.sizing.scale600,marginRight:at.sizing.scale600,marginBottom:at.sizing.scale600},getSizeStyles(ot)),{},{opacity:rt&&et?1:0,transform:rt?"translateY(0)":"translateY(20px)"},nt?{transitionProperty:"opacity, transform",transitionDuration:at.animation.timing400,transitionTimingFunction:at.animation.easeOutCurve}:null),{},{userSelect:"text",pointerEvents:et?"all":"none",":focus":{outline:"none"}})});Dialog$1.displayName="Dialog";Dialog$1.displayName="Dialog";var Close=styled("button",function(tt){var nt,et=tt.$theme,rt=tt.$isFocusVisible,ot=et.direction==="rtl"?"left":"right";return nt={background:"transparent",outline:0,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,color:et.colors.modalCloseColor,transitionProperty:"color, border-color",transitionDuration:et.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:et.colors.modalCloseColorHover},":focus":{outline:rt?"3px solid ".concat(et.colors.accent):"none"},position:"absolute",top:et.sizing.scale500},_defineProperty$f(nt,ot,et.sizing.scale500),_defineProperty$f(nt,"width",et.sizing.scale800),_defineProperty$f(nt,"height",et.sizing.scale800),_defineProperty$f(nt,"display","flex"),_defineProperty$f(nt,"justifyContent","center"),_defineProperty$f(nt,"alignItems","center"),_defineProperty$f(nt,"cursor","pointer"),nt});Close.displayName="Close";Close.displayName="Close";var ModalHeader$1=styled("div",function(tt){var nt,et=tt.$theme,rt=et.direction==="rtl"?"marginRight":"marginLeft",ot=et.direction==="rtl"?"marginLeft":"marginRight";return _objectSpread$a(_objectSpread$a({},et.typography.font550),{},(nt={color:et.colors.contentPrimary,marginTop:et.sizing.scale900,marginBottom:et.sizing.scale600},_defineProperty$f(nt,rt,et.sizing.scale800),_defineProperty$f(nt,ot,et.sizing.scale900),nt))});ModalHeader$1.displayName="ModalHeader";ModalHeader$1.displayName="ModalHeader";var ModalBody$2=styled("div",function(tt){var nt=tt.$theme;return _objectSpread$a(_objectSpread$a({},nt.typography.font200),{},{color:nt.colors.contentSecondary,marginTop:nt.sizing.scale600,marginLeft:nt.sizing.scale800,marginRight:nt.sizing.scale800,marginBottom:nt.sizing.scale700})});ModalBody$2.displayName="ModalBody";ModalBody$2.displayName="ModalBody";var ModalFooter$1=styled("div",function(tt){var nt=tt.$theme;return _objectSpread$a(_objectSpread$a({},nt.typography.font200),{},{marginTop:nt.sizing.scale700,marginLeft:nt.sizing.scale800,marginRight:nt.sizing.scale800,paddingTop:nt.sizing.scale500,paddingBottom:nt.sizing.scale500,textAlign:nt.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$8(tt){"@babel/helpers - typeof";return _typeof$8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(nt){return typeof nt}:function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt},_typeof$8(tt)}function _extends$x(){return _extends$x=Object.assign?Object.assign.bind():function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_extends$x.apply(this,arguments)}function _slicedToArray$e(tt,nt){return _arrayWithHoles$e(tt)||_iterableToArrayLimit$e(tt,nt)||_unsupportedIterableToArray$e(tt,nt)||_nonIterableRest$e()}function _nonIterableRest$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
451
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$e(tt,nt){if(tt){if(typeof tt=="string")return _arrayLikeToArray$e(tt,nt);var et=Object.prototype.toString.call(tt).slice(8,-1);if(et==="Object"&&tt.constructor&&(et=tt.constructor.name),et==="Map"||et==="Set")return Array.from(tt);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return _arrayLikeToArray$e(tt,nt)}}function _arrayLikeToArray$e(tt,nt){(nt==null||nt>tt.length)&&(nt=tt.length);for(var et=0,rt=new Array(nt);et<nt;et++)rt[et]=tt[et];return rt}function _iterableToArrayLimit$e(tt,nt){var et=tt==null?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(et!=null){var rt=[],ot=!0,at=!1,st,ut;try{for(et=et.call(tt);!(ot=(st=et.next()).done)&&(rt.push(st.value),!(nt&&rt.length===nt));ot=!0);}catch(ct){at=!0,ut=ct}finally{try{!ot&&et.return!=null&&et.return()}finally{if(at)throw ut}}return rt}}function _arrayWithHoles$e(tt){if(Array.isArray(tt))return tt}function _classCallCheck$g(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(tt,nt){for(var et=0;et<nt.length;et++){var rt=nt[et];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(tt,rt.key,rt)}}function _createClass$e(tt,nt,et){return nt&&_defineProperties$6(tt.prototype,nt),Object.defineProperty(tt,"prototype",{writable:!1}),tt}function _inherits$g(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function");tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,writable:!0,configurable:!0}}),Object.defineProperty(tt,"prototype",{writable:!1}),nt&&_setPrototypeOf$6(tt,nt)}function _setPrototypeOf$6(tt,nt){return _setPrototypeOf$6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,ot){return rt.__proto__=ot,rt},_setPrototypeOf$6(tt,nt)}function _createSuper$5(tt){var nt=_isNativeReflectConstruct$5();return function(){var rt=_getPrototypeOf$6(tt),ot;if(nt){var at=_getPrototypeOf$6(this).constructor;ot=Reflect.construct(rt,arguments,at)}else ot=rt.apply(this,arguments);return _possibleConstructorReturn$g(this,ot)}}function _possibleConstructorReturn$g(tt,nt){if(nt&&(_typeof$8(nt)==="object"||typeof nt=="function"))return nt;if(nt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$6(tt)}function _assertThisInitialized$6(tt){if(tt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt}function _isNativeReflectConstruct$5(){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(tt){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},_getPrototypeOf$6(tt)}function _defineProperty$e(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}var Modal$1=function(tt){_inherits$g(et,tt);var nt=_createSuper$5(et);function et(){var rt;_classCallCheck$g(this,et);for(var ot=arguments.length,at=new Array(ot),st=0;st<ot;st++)at[st]=arguments[st];return rt=nt.call.apply(nt,[this].concat(at)),_defineProperty$e(_assertThisInitialized$6(rt),"animateOutTimer",void 0),_defineProperty$e(_assertThisInitialized$6(rt),"animateStartTimer",void 0),_defineProperty$e(_assertThisInitialized$6(rt),"dialogContainerRef",reactExports.createRef()),_defineProperty$e(_assertThisInitialized$6(rt),"lastFocus",null),_defineProperty$e(_assertThisInitialized$6(rt),"lastMountNodeOverflowStyle",null),_defineProperty$e(_assertThisInitialized$6(rt),"rootRef",reactExports.createRef()),_defineProperty$e(_assertThisInitialized$6(rt),"state",{isVisible:!1,mounted:!1,isFocusVisible:!1}),_defineProperty$e(_assertThisInitialized$6(rt),"handleFocus",function(ut){isFocusVisible(ut)&&rt.setState({isFocusVisible:!0})}),_defineProperty$e(_assertThisInitialized$6(rt),"handleBlur",function(ut){rt.state.isFocusVisible!==!1&&rt.setState({isFocusVisible:!1})}),_defineProperty$e(_assertThisInitialized$6(rt),"onEscape",function(){rt.props.closeable&&rt.triggerClose(CLOSE_SOURCE.escape)}),_defineProperty$e(_assertThisInitialized$6(rt),"onDocumentClick",function(ut){ut.target&&ut.target instanceof HTMLElement&&ut.target.contains(rt.dialogContainerRef.current)&&rt.onBackdropClick()}),_defineProperty$e(_assertThisInitialized$6(rt),"onBackdropClick",function(){rt.props.closeable&&rt.triggerClose(CLOSE_SOURCE.backdrop)}),_defineProperty$e(_assertThisInitialized$6(rt),"onCloseClick",function(){rt.triggerClose(CLOSE_SOURCE.closeButton)}),_defineProperty$e(_assertThisInitialized$6(rt),"animateOutComplete",function(){rt.setState({isVisible:!1})}),rt}return _createClass$e(et,[{key:"componentDidMount",value:function(){this.setState({mounted:!0})}},{key:"componentWillUnmount",value:function(){this.resetMountNodeScroll(),this.clearTimers()}},{key:"componentDidUpdate",value:function(ot,at){var st=this.props.isOpen;(st!==ot.isOpen||st&&this.state.mounted&&!at.mounted)&&(st?this.didOpen():this.didClose())}},{key:"disableMountNodeScroll",value:function(){var ot=this.getMountNode();this.lastMountNodeOverflowStyle=ot.style.overflow||"",ot.style.overflow="hidden"}},{key:"resetMountNodeScroll",value:function(){var ot=this.getMountNode(),at=this.lastMountNodeOverflowStyle;ot&&at!==null&&(ot.style.overflow==="hidden"&&(ot.style.overflow=at||""),this.lastMountNodeOverflowStyle=null)}},{key:"clearTimers",value:function(){this.animateOutTimer&&clearTimeout(this.animateOutTimer),this.animateStartTimer&&cancelAnimationFrame(this.animateStartTimer)}},{key:"didOpen",value:function(){var ot=this,at=this.rootRef.current;at&&(at.scrollTop=0),this.clearTimers(),this.disableMountNodeScroll(),this.animateStartTimer=requestAnimationFrame(function(){ot.setState({isVisible:!0})})}},{key:"didClose",value:function(){this.resetMountNodeScroll(),this.animateOutTimer=setTimeout(this.animateOutComplete,500)}},{key:"triggerClose",value:function(ot){this.props.onClose&&ot&&this.props.onClose({closeSource:ot})}},{key:"getSharedProps",value:function(){var ot=this.props,at=ot.animate,st=ot.isOpen,ut=ot.size,ct=ot.role,pt=ot.closeable;return{$animate:at,$isVisible:this.state.isVisible,$isOpen:!!st,$size:ut,$role:ct,$closeable:!!pt,$isFocusVisible:this.state.isFocusVisible}}},{key:"getMountNode",value:function(){var ot=this.props.mountNode;return ot||document.body}},{key:"getChildren",value:function(){var ot=this.props.children;return typeof ot=="function"?ot():ot}},{key:"renderModal",value:function(){var ot=this,at=this.props,st=at.overrides,ut=st===void 0?{}:st,ct=at.closeable,pt=at.role,dt=at.autoFocus,ft=at.focusLock,bt=at.returnFocus,ht=ut.Root,Mt=ut.Dialog,mt=ut.DialogContainer,Ot=ut.Close,zt=getOverrides(ht,Root$3),yt=_slicedToArray$e(zt,2),vt=yt[0],At=yt[1],St=getOverrides(mt,DialogContainer),Et=_slicedToArray$e(St,2),Tt=Et[0],Rt=Et[1],Ct=getOverrides(Mt,Dialog$1),wt=_slicedToArray$e(Ct,2),Lt=wt[0],Ht=wt[1],jt=getOverrides(Ot,Close),s0=_slicedToArray$e(jt,2),Ut=s0[0],Yt=s0[1],O0=this.getSharedProps(),a0=this.getChildren();return reactExports.createElement(LocaleContext.Consumer,null,function(b0){return reactExports.createElement(FocusLockCombination,{disabled:!ft,crossFrame:!1,returnFocus:bt,autoFocus:dt},reactExports.createElement(vt,_extends$x({"data-baseweb":"modal",ref:ot.rootRef},O0,At),reactExports.createElement(Tt,_extends$x({ref:ot.dialogContainerRef},O0,Rt),reactExports.createElement(Lt,_extends$x({tabIndex:-1,"aria-modal":!0,"aria-label":"dialog",role:pt},O0,Ht),a0,ct?reactExports.createElement(Ut,_extends$x({"aria-label":b0.modal.close,onClick:ot.onCloseClick},O0,Yt,{onFocus:forkFocus(Yt,ot.handleFocus),onBlur:forkBlur(Yt,ot.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())}}]),et}(reactExports.Component);_defineProperty$e(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 StyledModalButton=newStyled("span",{target:"eoc62cw0"})(({theme:tt})=>({marginRight:tt.spacing.twoXS}));function ModalHeader({children:tt}){const{genericFonts:nt,fontSizes:et,spacing:rt,fontWeights:ot,lineHeights:at}=useTheme();return jsx$1(ModalHeader$1,{style:{marginTop:rt.none,marginLeft:rt.none,marginRight:rt.none,marginBottom:rt.none,paddingTop:rt.twoXL,paddingRight:rt.twoXL,paddingBottom:rt.md,paddingLeft:rt.twoXL,fontFamily:nt.bodyFont,fontSize:et.xl,fontWeight:ot.bold,margin:rt.none,lineHeight:at.small,textTransform:"none",display:"flex",alignItems:"center",maxHeight:"80vh",flexDirection:"row"},children:tt})}function ModalBody$1({children:tt}){const{colors:nt,fontSizes:et,spacing:rt}=useTheme();return jsx$1(ModalBody$2,{style:{marginTop:rt.none,marginLeft:rt.none,marginRight:rt.none,marginBottom:rt.none,paddingTop:rt.md,paddingRight:rt.twoXL,paddingBottom:rt.twoXL,paddingLeft:rt.twoXL,color:nt.bodyText,fontSize:et.md},children:tt})}function ModalFooter({children:tt}){const{spacing:nt}=useTheme();return jsx$1(ModalFooter$1,{style:{marginTop:nt.none,marginLeft:nt.none,marginRight:nt.none,marginBottom:nt.none,paddingTop:nt.md,paddingRight:nt.md,paddingBottom:nt.md,paddingLeft:nt.md},children:jsx$1("div",{children:tt})})}const ModalButton=tt=>jsx$1(StyledModalButton,{children:jsx$1(BaseButton,{...tt})});function calculateModalSize(tt,nt,et){return tt==="full"&&nt&&et?`calc(${nt} + ${et})`:tt==="auto"?SIZE$2.auto:SIZE$2.default}function Modal(tt){const{spacing:nt,radii:et,colors:rt,sizes:ot}=useTheme(),at={Root:{style:{background:rt.darkenedBgMix25},props:{className:"stDialog","data-testid":"stDialog"}},DialogContainer:{style:{alignItems:"start",paddingTop:nt.threeXL}},Dialog:{style:{borderBottomRightRadius:et.xxl,borderBottomLeftRadius:et.xxl,borderTopRightRadius:et.xxl,borderTopLeftRadius:et.xxl,minWidth:ot.minPopupWidth}},Close:{style:{top:`calc(${nt.twoXL} + .375rem)`,right:nt.twoXL}}},st=calculateModalSize(tt.size,ot.contentMaxWidth,nt.lg),ut=merge$6(at,tt.overrides),ct={...tt,size:st};return jsx$1(Modal$1,{...ct,overrides:ut})}const Dialog=({element:tt,deltaMsgReceivedAt:nt,children:et})=>{const{title:rt,dismissible:ot,width:at,isOpen:st}=tt,[ut,ct]=reactExports.useState(!1);return reactExports.useEffect(()=>{notNullOrUndefined(st)&&ct(st)},[st,nt]),ut?jsxs(Modal,{isOpen:!0,closeable:ot,onClose:()=>ct(!1),size:at===Block$2.Dialog.DialogWidth.LARGE?"full":"default",children:[jsx$1(ModalHeader,{children:rt}),jsx$1(ModalBody$1,{children:et})]}):jsx$1(Fragment,{})};function DialogWithProvider(tt){return jsx$1(IsDialogContext.Provider,{value:!0,children:jsx$1(Dialog,{...tt})})}const StyledExpandableContainer=newStyled("div",{target:"e1o77btk0"})({}),BORDER_SIZE=1,StyledDetails=newStyled("details",{target:"e1o77btk1"})(({isStale:tt,theme:nt})=>({marginBottom:0,marginTop:0,width:"100%",borderStyle:"solid",borderWidth:nt.sizes.borderWidth,borderColor:nt.colors.borderColor,borderRadius:nt.radii.default,...tt?{borderColor:nt.colors.borderColorLight,transition:`border ${STALE_TRANSITION_PARAMS}`}:{}})),StyledSummaryHeading=newStyled("span",{target:"e1o77btk2"})(({theme:tt})=>({display:"flex",gap:tt.spacing.sm,alignItems:"center",flexGrow:1})),StyledSummary=newStyled("summary",{target:"e1o77btk3"})(({theme:tt,empty:nt,isStale:et})=>({position:"relative",display:"flex",width:"100%","&:focus-visible":{outline:`${tt.sizes.borderWidth} solid ${tt.colors.primary}`,outlineOffset:`-${tt.sizes.borderWidth}`,borderRadius:tt.radii.default},fontSize:tt.fontSizes.sm,paddingLeft:tt.spacing.lg,paddingRight:tt.spacing.lg,paddingTop:tt.spacing.md,paddingBottom:tt.spacing.md,cursor:"pointer",listStyleType:"none","&::-webkit-details-marker":{display:"none"},"&:hover":{color:nt?void 0:tt.colors.primary},"&:hover svg":{fill:nt?void 0:tt.colors.primary},...nt&&{cursor:"default"},...et&&STALE_STYLES})),StyledDetailsPanel=newStyled("div",{target:"e1o77btk4"})(({theme:tt})=>({paddingBottom:tt.spacing.lg,paddingLeft:tt.spacing.lg,paddingRight:tt.spacing.lg})),ExpanderIcon=tt=>{const{icon:nt}=tt,{activeTheme:et}=React$1.useContext(LibContext),rt={size:"lg",margin:"0",padding:"0"},ot={":material/check:":"stExpanderIconCheck",":material/error:":"stExpanderIconError"};if(nt==="spinner"){const at=!isPresetTheme(et);return jsx$1(StyledSpinnerIcon,{usingCustomTheme:at,"data-testid":"stExpanderIconSpinner",...rt})}return nt?jsx$1(DynamicIcon,{color:"inherit",iconValue:nt,testid:ot[nt]||"stExpanderIcon",...rt}):jsx$1(Fragment,{})},Expander=({element:tt,isStale:nt,empty:et,children:rt})=>{const{label:ot,expanded:at}=tt,[st,ut]=reactExports.useState(at||!1),ct=reactExports.useRef(null),pt=reactExports.useRef(null),dt=reactExports.useRef(null),ft=reactExports.useRef(null),bt=reactExports.useRef(null);reactExports.useEffect(()=>{notNullOrUndefined(at)&&(ut(at),ct.current&&(ct.current.open=at))},[ot,at]);const ht=Ot=>{ct.current&&(ct.current.open=Ot,dt.current=null,ct.current.style.height="",ct.current.style.overflow="")},Mt=(Ot,zt,yt)=>{const vt=yt>zt;dt.current&&(dt.current.cancel(),ft.current&&(clearTimeout(ft.current),ft.current=null));const At=Ot.animate({height:[`${zt}px`,`${yt}px`]},{duration:500,easing:"cubic-bezier(0.23, 1, 0.32, 1)"});At.addEventListener("finish",()=>ht(vt)),dt.current=At};return jsx$1(StyledExpandableContainer,{className:"stExpander","data-testid":"stExpander",children:jsxs(StyledDetails,{isStale:nt,ref:ct,children:[jsxs(StyledSummary,{onClick:Ot=>{if(Ot.preventDefault(),et)return;ut(!st);const zt=ct.current;if(!zt||!pt.current)return;zt.style.overflow="hidden";const yt=zt.getBoundingClientRect().height,vt=pt.current.getBoundingClientRect().height;st?Mt(zt,yt,vt+2*BORDER_SIZE):(zt.style.height=`${yt}px`,zt.open=!0,window.requestAnimationFrame(()=>{Mt(zt,yt,vt+2*BORDER_SIZE+5),ft.current=setTimeout(()=>{if(!bt.current)return;const At=bt.current.getBoundingClientRect().height;Mt(zt,yt,vt+At+2*BORDER_SIZE)},100)}))},empty:et,ref:pt,isStale:nt,children:[jsxs(StyledSummaryHeading,{children:[tt.icon&&jsx$1(ExpanderIcon,{icon:tt.icon}),jsx$1(StreamlitMarkdown$1,{source:ot,allowHTML:!1,isLabel:!0})]}),et?jsx$1(Fragment,{}):jsx$1(StyledIcon,{as:st?ExpandLess:ExpandMore,color:"inherit","aria-hidden":"true","data-testid":"stExpanderToggleIcon",size:"lg",margin:"",padding:""})]}),et?jsx$1(Fragment,{}):jsx$1(StyledDetailsPanel,{"data-testid":"stExpanderDetails",ref:bt,children:rt})]})})};function debounce$2(tt,nt){let et=0,rt=null;return(...ot)=>{const at=Date.now();at-et>nt?(tt(...ot),et=at):(rt&&clearTimeout(rt),rt=setTimeout(()=>{tt(...ot),et=Date.now()},Math.max(0,nt-at+et)))}}const DEFAULT_DEBOUNCE_MS=100;function useScrollSpy(tt,nt){const et=reactExports.useRef(nt),rt=reactExports.useMemo(()=>debounce$2(at=>{et.current(at)},DEFAULT_DEBOUNCE_MS),[et]),ot=reactExports.useCallback(at=>{at.timeStampLow=Date.now(),rt(at)},[rt]);reactExports.useLayoutEffect(()=>tt?(tt.addEventListener("scroll",ot,{passive:!0}),ot({target:tt}),()=>tt.removeEventListener("scroll",ot)):()=>{},[ot,tt])}function squareStepper(tt,nt){const et=Math.sign(nt-tt),rt=Math.sqrt(Math.abs(nt-tt)),ot=tt+rt*et;return et>0?Math.min(nt,ot):Math.max(nt,ot)}function step(tt,nt,et,rt){let ot=tt;for(let at=0;at<rt;at++)ot=et(ot,nt);return ot}function useScrollAnimation(tt,nt,et){const rt=reactExports.useRef(0),ot=reactExports.useCallback((st,ut,ct=Date.now())=>{cancelAnimationFrame(rt.current),rt.current=requestAnimationFrame(()=>{if(tt){const pt=tt.scrollHeight-tt.offsetHeight;let dt=step(st,pt,squareStepper,(Date.now()-ct)/5);Math.abs(pt-dt)<1.5&&(dt=pt),tt.scrollTop=dt,pt===dt?nt():ot(st,ut+1,ct)}})},[rt,nt,tt]),at=reactExports.useCallback(()=>{cancelAnimationFrame(rt.current),nt()},[nt]);reactExports.useLayoutEffect(()=>{if(!(!tt||!et))return ot(tt.scrollTop,1),tt?(tt.addEventListener("pointerdown",at,{passive:!0}),tt.addEventListener("wheel",at,{passive:!0}),()=>{tt.removeEventListener("pointerdown",at),tt.removeEventListener("wheel",at),cancelAnimationFrame(rt.current)}):()=>cancelAnimationFrame(rt.current)},[ot,rt,at,tt,et])}function useStateRef(tt){const[nt,et]=reactExports.useState(tt),rt=reactExports.useRef(tt);return rt.current=nt,[nt,et,rt]}const DEFAULT_BOTTOM_THRESHOLD=1,SCROLL_DECISION_DURATION=34,MIN_CHECK_INTERVAL=17;function setImmediateInterval(tt,nt){return tt(),setInterval(tt,nt)}function isAtBottom({scrollHeight:tt,offsetHeight:nt,scrollTop:et}){return tt-et-nt<DEFAULT_BOTTOM_THRESHOLD}function useScrollToBottom(){const tt=reactExports.useRef(null),[nt,et,rt]=useStateRef(!1),[ot,at,st]=useStateRef(!0),ut=reactExports.useRef(0),ct=reactExports.useRef(0),pt=reactExports.useRef(0),dt=reactExports.useCallback(()=>{ut.current=Date.now(),st.current||et(!1),at(!1)},[ut,st,at,et]),ft=reactExports.useCallback(({timeStampLow:bt})=>{const{current:ht}=tt,Mt=st.current;if(bt<=ut.current||!ht)return;const mt=isAtBottom(ht),{offsetHeight:Ot,scrollHeight:zt}=ht,{current:yt}=ct,{current:vt}=pt,At=Ot!==yt,St=zt!==vt;if(At&&(ct.current=Ot),St&&(pt.current=zt),!At&&!St){const Et=Mt||mt;rt.current!==Et&&et(Et)}else rt.current&&(at(!0),et(!0))},[ut,ct,pt,st,rt,at,et]);return reactExports.useEffect(()=>{if(tt.current){let bt=0;const ht=setImmediateInterval(()=>{const{current:Mt}=tt,mt=st.current;rt.current&&Mt?isAtBottom(Mt)?bt=0:bt?Date.now()-bt>SCROLL_DECISION_DURATION&&(mt||(at(!0),et(!0)),bt=0):bt=Date.now():Mt&&Mt.scrollHeight<=Mt.offsetHeight&&!rt.current&&et(!0)},MIN_CHECK_INTERVAL);return()=>clearInterval(ht)}},[tt,nt,ot,st,rt,et,at]),reactExports.useEffect(()=>{const bt=tt.current;if(bt){const ht=()=>{pt.current=bt.scrollHeight};return bt.addEventListener("focus",ht,{capture:!0,passive:!0}),()=>bt.removeEventListener("focus",ht)}},[tt]),useScrollSpy(tt.current,ft),useScrollAnimation(tt.current,dt,ot),tt}var FUNC_ERROR_TEXT$3="Expected a function",NAN$1=NaN,symbolTag$3="[object Symbol]",reTrim=/^\s+|\s+$/g,reIsBadHex$1=/^[-+]0x[0-9a-f]+$/i,reIsBinary$1=/^0b[01]+$/i,reIsOctal$1=/^0o[0-7]+$/i,freeParseInt$1=parseInt,freeGlobal$1=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,freeSelf$1=typeof self=="object"&&self&&self.Object===Object&&self,root$3=freeGlobal$1||freeSelf$1||Function("return this")(),objectProto$i=Object.prototype,objectToString$1=objectProto$i.toString,nativeMax$2=Math.max,nativeMin$1=Math.min,now$3=function(){return root$3.Date.now()};function debounce$1(tt,nt,et){var rt,ot,at,st,ut,ct,pt=0,dt=!1,ft=!1,bt=!0;if(typeof tt!="function")throw new TypeError(FUNC_ERROR_TEXT$3);nt=toNumber$1(nt)||0,isObject$5(et)&&(dt=!!et.leading,ft="maxWait"in et,at=ft?nativeMax$2(toNumber$1(et.maxWait)||0,nt):at,bt="trailing"in et?!!et.trailing:bt);function ht(Et){var Tt=rt,Rt=ot;return rt=ot=void 0,pt=Et,st=tt.apply(Rt,Tt),st}function Mt(Et){return pt=Et,ut=setTimeout(zt,nt),dt?ht(Et):st}function mt(Et){var Tt=Et-ct,Rt=Et-pt,Ct=nt-Tt;return ft?nativeMin$1(Ct,at-Rt):Ct}function Ot(Et){var Tt=Et-ct,Rt=Et-pt;return ct===void 0||Tt>=nt||Tt<0||ft&&Rt>=at}function zt(){var Et=now$3();if(Ot(Et))return yt(Et);ut=setTimeout(zt,mt(Et))}function yt(Et){return ut=void 0,bt&&rt?ht(Et):(rt=ot=void 0,st)}function vt(){ut!==void 0&&clearTimeout(ut),pt=0,rt=ct=ot=ut=void 0}function At(){return ut===void 0?st:yt(now$3())}function St(){var Et=now$3(),Tt=Ot(Et);if(rt=arguments,ot=this,ct=Et,Tt){if(ut===void 0)return Mt(ct);if(ft)return ut=setTimeout(zt,nt),ht(ct)}return ut===void 0&&(ut=setTimeout(zt,nt)),st}return St.cancel=vt,St.flush=At,St}function isObject$5(tt){var nt=typeof tt;return!!tt&&(nt=="object"||nt=="function")}function isObjectLike$2(tt){return!!tt&&typeof tt=="object"}function isSymbol$2(tt){return typeof tt=="symbol"||isObjectLike$2(tt)&&objectToString$1.call(tt)==symbolTag$3}function toNumber$1(tt){if(typeof tt=="number")return tt;if(isSymbol$2(tt))return NAN$1;if(isObject$5(tt)){var nt=typeof tt.valueOf=="function"?tt.valueOf():tt;tt=isObject$5(nt)?nt+"":nt}if(typeof tt!="string")return tt===0?tt:+tt;tt=tt.replace(reTrim,"");var et=reIsBinary$1.test(tt);return et||reIsOctal$1.test(tt)?freeParseInt$1(tt.slice(2),et?2:8):reIsBadHex$1.test(tt)?NAN$1:+tt}var lodash_debounce=debounce$1;const _debounce=getDefaultExportFromCjs$1(lodash_debounce);function debounceRender(tt,nt,et){class rt extends reactExports.Component{constructor(){super(...arguments),this.updateDebounced=_debounce(this.forceUpdate,nt,et)}shouldComponentUpdate(){return this.updateDebounced(),!1}componentWillUnmount(){this.updateDebounced.cancel()}render(){return React$1.createElement(tt,Object.assign({},this.props))}}return rt.displayName=`debounceRender(${tt.displayName||tt.name||"Component"})`,hoistNonReactStatics$2(rt,tt)}var baseSlice$1=_baseSlice;function castSlice$1(tt,nt,et){var rt=tt.length;return et=et===void 0?rt:et,!nt&&et>=rt?tt:baseSlice$1(tt,nt,et)}var _castSlice=castSlice$1;function baseFindIndex$1(tt,nt,et,rt){for(var ot=tt.length,at=et+(rt?1:-1);rt?at--:++at<ot;)if(nt(tt[at],at,tt))return at;return-1}var _baseFindIndex=baseFindIndex$1;function baseIsNaN$1(tt){return tt!==tt}var _baseIsNaN=baseIsNaN$1;function strictIndexOf$1(tt,nt,et){for(var rt=et-1,ot=tt.length;++rt<ot;)if(tt[rt]===nt)return rt;return-1}var _strictIndexOf=strictIndexOf$1,baseFindIndex=_baseFindIndex,baseIsNaN=_baseIsNaN,strictIndexOf=_strictIndexOf;function baseIndexOf$2(tt,nt,et){return nt===nt?strictIndexOf(tt,nt,et):baseFindIndex(tt,baseIsNaN,et)}var _baseIndexOf=baseIndexOf$2,baseIndexOf$1=_baseIndexOf;function charsEndIndex$1(tt,nt){for(var et=tt.length;et--&&baseIndexOf$1(nt,tt[et],0)>-1;);return et}var _charsEndIndex=charsEndIndex$1,baseToString$1=_baseToString,castSlice=_castSlice,charsEndIndex=_charsEndIndex,stringToArray=_stringToArray,toString$3=toString_1,trimmedEndIndex$1=_trimmedEndIndex;function trimEnd(tt,nt,et){if(tt=toString$3(tt),tt&&(et||nt===void 0))return tt.slice(0,trimmedEndIndex$1(tt)+1);if(!tt||!(nt=baseToString$1(nt)))return tt;var rt=stringToArray(tt),ot=charsEndIndex(rt,stringToArray(nt))+1;return castSlice(rt,0,ot).join("")}var trimEnd_1=trimEnd;const trimEnd$1=getDefaultExportFromCjs$1(trimEnd_1);var momentTimezone$1={exports:{}},momentTimezone={exports:{}};//! moment.js
452
452
  //! version : 2.30.1
453
453
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
454
454
  //! license : MIT
@@ -680,7 +680,7 @@ If this is an installed component that works locally, the app may be having trou
680
680
 
681
681
  For more troubleshooting help, please see the [Streamlit Component docs](${COMPONENT_DEVELOPER_URL}) or visit our [forums](${COMMUNITY_URL}).`,et}function tryParseArgs(tt,nt,et,rt){if(!rt)try{return parseArgs(tt,nt)}catch(ot){const at=ensureError(ot);et(at)}return[{},[]]}function compareDataframeArgs(tt,nt){return tt===nt||tt.length===nt.length&&tt.every((et,rt)=>{const ot=nt[rt];return et.key===ot.key&&et.value===ot.value})}function ComponentInstance(tt){const[nt,et]=reactExports.useState(),{disabled:rt,element:ot,registry:at,theme:st,widgetMgr:ut,width:ct,fragmentId:pt}=tt,{componentName:dt,jsonArgs:ft,specialArgs:bt,url:ht}=ot,[Mt,mt]=tryParseArgs(ft,bt,et,nt),Ot=reactExports.useRef({args:{},dataframeArgs:[]}),zt=compareDataframeArgs(Ot.current.dataframeArgs,mt);Ot.current.args=Mt,Ot.current.dataframeArgs=mt;const[yt,vt]=reactExports.useState(),[At,St]=reactExports.useState(isNaN(Mt.height)?void 0:Mt.height),Et=reactExports.useRef(!1),Tt=reactExports.useRef(null),Rt=reactExports.useRef(),Ct=useTimeout(()=>logWarning(getWarnMessage(dt,ht)),COMPONENT_READY_WARNING_TIME_MS/4),wt=useTimeout(()=>vt(!0),COMPONENT_READY_WARNING_TIME_MS);if(reactExports.useEffect(()=>{Et.current&&sendRenderMessage(Ot.current.args,Ot.current.dataframeArgs,rt,st,Tt.current??void 0)},[rt,At,zt,ft,st,ct]),reactExports.useEffect(()=>{const jt=Ut=>{Ut!==void 0&&Ut!==At&&(isNullOrUndefined$1(Tt.current)||(Tt.current.height=Ut.toString(),St(Ut)))},s0=()=>{sendRenderMessage(Ot.current.args,Ot.current.dataframeArgs,rt,st,Tt.current??void 0),Ct(),wt(),Et.current=!0,vt(!1)};Rt.current={isReady:()=>Et.current,element:ot,widgetMgr:ut,setComponentError:et,componentReadyCallback:s0,frameHeightCallback:jt,fragmentId:pt}},[dt,rt,ot,At,zt,yt,ft,st,ut,wt,Ct,pt]),reactExports.useEffect(()=>{var s0;const jt=((s0=Tt.current)==null?void 0:s0.contentWindow)??void 0;if(jt)return at.registerListener(jt,createIframeMessageHandler(Rt)),()=>{jt&&at.deregisterListener(jt)}},[at,dt]),nt)return jsx$1(ErrorElement,{name:nt.name,message:nt.message});const Lt=!Et.current&&!yt&&At!==0&&jsx$1(Skeleton,{element:Skeleton$1.create({height:At,style:Skeleton$1.SkeletonStyle.ELEMENT})}),Ht=!Et.current&&yt?jsx$1(AlertElement,{width:ct,body:getWarnMessage(dt,ht),kind:Kind.WARNING}):null;return jsxs(Fragment,{children:[Lt,Ht,jsx$1(StyledComponentIframe,{className:"stCustomComponentV1","data-testid":"stCustomComponentV1",allow:DEFAULT_IFRAME_FEATURE_POLICY,ref:Tt,src:getSrc(dt,at,ht),width:ct,height:At??0,scrolling:"no",sandbox:DEFAULT_IFRAME_SANDBOX_POLICY,title:dt,componentReady:Et.current})]})}const ComponentInstance$1=withTheme(ComponentInstance);class ComponentRegistry{constructor(nt){this.msgListeners=new Map,this.registerListener=(et,rt)=>{this.msgListeners.has(et),this.msgListeners.set(et,rt)},this.deregisterListener=et=>{this.msgListeners.delete(et)},this.getComponentURL=(et,rt)=>this.endpoints.buildComponentURL(et,rt),this.onMessageEvent=et=>{if(isNullOrUndefined$1(et.data)||!et.data.hasOwnProperty("isStreamlitMessage"))return;if(isNullOrUndefined$1(et.source)){logWarning("Received component message with no eventSource!",et.data);return}const rt=this.msgListeners.get(et.source);if(isNullOrUndefined$1(rt)||typeof rt!="function"){logWarning("Received component message for unregistered ComponentInstance!",et.data);return}const{type:ot}=et.data;if(isNullOrUndefined$1(ot)){logWarning("Received Streamlit message with no type!",et.data);return}rt(ot,et.data)},this.endpoints=nt,window.addEventListener("message",this.onMessageEvent)}}const Maybe=reactExports.memo(function tt({children:nt}){return jsx$1(Fragment,{children:nt})},(tt,nt)=>!(tt.enable||nt.enable));function makeMarkdownHeading(tt,nt){switch(tt.toLowerCase()){case Tags.H1:return`# ${nt}`;case Tags.H2:return`## ${nt}`;case Tags.H3:return`### ${nt}`;default:throw new Error(`Unrecognized tag for header: ${tt}`)}}function Heading(tt){const{width:nt,element:et}=tt,{tag:rt,anchor:ot,body:at,help:st,hideAnchor:ut,divider:ct}=et,pt=React$1.useContext(IsSidebarContext),dt=React$1.useContext(IsDialogContext),[ft,...bt]=at.split(`
682
682
  `);return jsxs("div",{style:{width:nt},className:"stHeading","data-testid":"stHeading",children:[jsxs(StyledStreamlitMarkdown,{isCaption:!1,isInSidebarOrDialog:pt||dt,style:{width:nt},"data-testid":"stMarkdownContainer",children:[jsx$1(HeadingWithActionElements,{anchor:ot,help:st,hideAnchor:ut,tag:rt,children:jsx$1(RenderedMarkdown,{allowHTML:!1,source:makeMarkdownHeading(rt,ft),overrideComponents:{p:reactExports.Fragment,h1:reactExports.Fragment,h2:reactExports.Fragment,h3:reactExports.Fragment,h4:reactExports.Fragment,h5:reactExports.Fragment,h6:reactExports.Fragment}})}),bt.length>0&&jsx$1(RenderedMarkdown,{source:bt.join(`
683
- `),allowHTML:!1})]}),ct&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:ct.includes("linear"),color:ct})]})}const StyledCheckbox$1=newStyled("div",{target:"e1eyve560"})(({width:tt,theme:nt})=>({width:tt,display:"flex",alignItems:"center",minHeight:nt.sizes.smallElementHeight})),StyledContent=newStyled("div",{target:"e1eyve561"})(({visibility:tt})=>({display:tt===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:tt===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(tt,nt){let et=nt.spacing.lg;return tt==="medium"?et=nt.spacing.threeXL:tt==="large"&&(et=nt.spacing.fourXL),et}const StyledHorizontalBlock=newStyled("div",{target:"epboeck0"})(({theme:tt,gap:nt})=>({display:"flex",flexWrap:"wrap",flexGrow:1,alignItems:"stretch",gap:translateGapWidth(nt,tt)})),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=newStyled("div",{target:"epboeck1"})(({theme:tt,isStale:nt,width:et,elementType:rt})=>({width:et,position:"relative","@media print":{overflow:"visible"},":is(.stHtml-empty)":{display:"none"},":has(> .stCacheSpinner)":{height:tt.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${tt.spacing.lg}`,zIndex:tt.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${tt.spacing.xs}`,marginBottom:`-${tt.spacing.xs}`},...nt&&rt!=="skeleton"?{opacity:.33,transition:"opacity 1s ease-in 0.5s"}:{},...rt==="empty"?{display:"none"}:{},...GLOBAL_ELEMENTS.includes(rt)?{marginBottom:`-${tt.spacing.lg}`}:{}})),StyledColumn=newStyled("div",{target:"epboeck2"})(({theme:tt,weight:nt,gap:et,showBorder:rt,verticalAlignment:ot})=>{const{VerticalAlignment:at}=Block$2.Column,st=nt*100,ut=translateGapWidth(et,tt),ct=`calc(${st}% - ${ut})`;return{width:ct,flex:`1 1 ${ct}`,[`@media (max-width: ${tt.breakpoints.columns})`]:{minWidth:`calc(100% - ${tt.spacing.twoXL})`},...ot===at.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:tt.spacing.sm}},...ot===at.TOP&&{[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginTop:tt.spacing.sm}},...ot===at.CENTER&&{marginTop:"auto",marginBottom:"auto"},...rt&&{border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,borderRadius:tt.radii.default,padding:`calc(${tt.spacing.lg} - ${tt.sizes.borderWidth})`}}}),StyledVerticalBlock=newStyled("div",{target:"epboeck3"})(({width:tt,theme:nt})=>({width:tt,position:"relative",display:"flex",flex:1,flexDirection:"column",gap:nt.spacing.lg})),StyledVerticalBlockWrapper=newStyled("div",{target:"epboeck4"})({display:"flex",flexDirection:"column",flex:1}),StyledVerticalBlockBorderWrapper=newStyled("div",{target:"epboeck5"})(({theme:tt,border:nt,height:et})=>({...nt&&{border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,borderRadius:tt.radii.default,padding:`calc(${tt.spacing.lg} - ${tt.sizes.borderWidth})`},...et&&{height:`${et}px`,overflow:"auto"}})),Audio=React$1.lazy(()=>__vitePreload(()=>import("./index.BceNwBQ7.js"),[],import.meta.url)),Balloons=React$1.lazy(()=>__vitePreload(()=>import("./index.yge1jSoD.js"),__vite__mapDeps([0,1]),import.meta.url)),Snow=React$1.lazy(()=>__vitePreload(()=>import("./index.CgwMN8Xv.js"),__vite__mapDeps([2,1]),import.meta.url)),ArrowDataFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.D2sEk90l.js").then(tt=>tt.c),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13]),import.meta.url)),ArrowVegaLiteChart=React$1.lazy(()=>__vitePreload(()=>import("./index.BLsk_Naj.js"),__vite__mapDeps([14,15,16,17,4,6,5]),import.meta.url)),Toast=React$1.lazy(()=>__vitePreload(()=>import("./index.DokSVIB2.js"),[],import.meta.url)),BokehChart=React$1.lazy(()=>__vitePreload(()=>import("./index.D3_j16sc.js"),[],import.meta.url)),DebouncedBokehChart=debounceRender(BokehChart,100),DeckGlJsonChart=React$1.lazy(()=>__vitePreload(()=>import("./index.BEtyBSSz.js"),__vite__mapDeps([18,9,10,6,5,19,4,20,15,16,21]),import.meta.url)),GraphVizChart=React$1.lazy(()=>__vitePreload(()=>import("./index.e2mIXcY7.js"),__vite__mapDeps([22,17,16,20,6,5]),import.meta.url)),IFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.BozobE_y.js"),[],import.meta.url)),ImageList=React$1.lazy(()=>__vitePreload(()=>import("./index.CWgiCNwz.js"),__vite__mapDeps([23,6,5]),import.meta.url)),LinkButton=React$1.lazy(()=>__vitePreload(()=>import("./index.BtyW8_Lq.js"),[],import.meta.url)),PageLink=React$1.lazy(()=>__vitePreload(()=>import("./index.C7m2u1Hi.js"),[],import.meta.url)),PlotlyChart=React$1.lazy(()=>__vitePreload(()=>import("./index.cf6LJRuO.js"),__vite__mapDeps([24,4,5]),import.meta.url)),Video=React$1.lazy(()=>__vitePreload(()=>import("./index.DSToQbfG.js"),[],import.meta.url)),AudioInput=React$1.lazy(()=>__vitePreload(()=>import("./index.Bo90e_Uc.js"),__vite__mapDeps([25,4,6,26,8,12]),import.meta.url)),Button=React$1.lazy(()=>__vitePreload(()=>import("./index.BE3Oy0-w.js"),[],import.meta.url)),ButtonGroup=React$1.lazy(()=>__vitePreload(()=>import("./index.qDaxAO86.js"),__vite__mapDeps([27,19,4]),import.meta.url)),DownloadButton=React$1.lazy(()=>__vitePreload(()=>import("./index.I1VZoGQK.js"),__vite__mapDeps([28,8]),import.meta.url)),CameraInput=React$1.lazy(()=>__vitePreload(()=>import("./index.IkCWa6ie.js"),__vite__mapDeps([29,4,30,31]),import.meta.url)),ChatInput=React$1.lazy(()=>__vitePreload(()=>import("./index.BFuk3D-a.js"),__vite__mapDeps([32,33,34,35,36]),import.meta.url)),Checkbox=React$1.lazy(()=>__vitePreload(()=>import("./index.B00Rrwlo.js"),__vite__mapDeps([37,19,4]),import.meta.url)),ColorPicker=React$1.lazy(()=>__vitePreload(()=>import("./index.BwNWvULL.js"),__vite__mapDeps([38,19,4]),import.meta.url)),DateInput=React$1.lazy(()=>__vitePreload(()=>import("./index.BlDvA0Pm.js"),__vite__mapDeps([39,19,4,40,10,11,41,36]),import.meta.url)),Html=React$1.lazy(()=>__vitePreload(()=>import("./index.DKS2m2dW.js"),[],import.meta.url)),Multiselect=React$1.lazy(()=>__vitePreload(()=>import("./index.ln_0INpA.js"),__vite__mapDeps([42,19,4]),import.meta.url)),Progress=React$1.lazy(()=>__vitePreload(()=>import("./index.Bw-My5yL.js"),__vite__mapDeps([43,31]),import.meta.url)),Spinner=React$1.lazy(()=>__vitePreload(()=>import("./index.BOcbB1Se.js"),[],import.meta.url)),Radio=React$1.lazy(()=>__vitePreload(()=>import("./index.Cd1M1khv.js"),__vite__mapDeps([44,19,4]),import.meta.url)),Selectbox$1=React$1.lazy(()=>__vitePreload(()=>import("./index.CSkOy9Ie.js"),__vite__mapDeps([45,19,4]),import.meta.url)),Slider$1=React$1.lazy(()=>__vitePreload(()=>import("./index.CKLsExlx.js"),__vite__mapDeps([46,7,19,4]),import.meta.url)),FileUploader=React$1.lazy(()=>__vitePreload(()=>import("./index.DgYh-jV7.js"),__vite__mapDeps([47,4,31,26,30]),import.meta.url)),TextArea=React$1.lazy(()=>__vitePreload(()=>import("./index.DJaNJkBl.js"),__vite__mapDeps([48,49,50,34,33,19,4,35,36]),import.meta.url)),TextInput=React$1.lazy(()=>__vitePreload(()=>import("./index.wXwVYako.js"),__vite__mapDeps([51,49,50,34,19,4,33,41,36]),import.meta.url)),TimeInput=React$1.lazy(()=>__vitePreload(()=>import("./index.U0queCso.js"),__vite__mapDeps([52,19,4,40,10,11]),import.meta.url)),NumberInput=React$1.lazy(()=>__vitePreload(()=>import("./index.D2jry5bi.js"),__vite__mapDeps([53,7,49,4,33,41,36]),import.meta.url)),StreamlitSyntaxHighlighter=React$1.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>StreamlitSyntaxHighlighter$2),void 0,import.meta.url));function hideIfStale(tt,nt){return tt?jsx$1(Fragment,{}):nt}const RawElementNodeRenderer=tt=>{const{node:nt}=tt;if(!nt)throw new Error("ElementNode not found.");const et={width:tt.width,disableFullscreenMode:tt.disableFullscreenMode},rt={...et,widgetMgr:tt.widgetMgr,disabled:tt.widgetsDisabled,fragmentId:nt.fragmentId};switch(nt.element.type){case"alert":{const at=nt.element.alert;return jsx$1(AlertElement,{icon:at.icon,body:at.body,kind:getAlertElementKind(at.format),...et})}case"arrowTable":return jsx$1(ArrowTable,{element:nt.quiverElement,...et});case"audio":return jsx$1(Audio,{element:nt.element.audio,endpoints:tt.endpoints,...et,elementMgr:tt.widgetMgr});case"balloons":return hideIfStale(tt.isStale,jsx$1(Balloons,{scriptRunId:tt.scriptRunId}));case"bokehChart":return jsx$1(DebouncedBokehChart,{element:nt.element.bokehChart,...et});case"code":{const at=nt.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:at.language,showLineNumbers:at.showLineNumbers,wrapLines:at.wrapLines,height:at.height,children:at.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:nt.element.deckGlJsonChart,...rt});case"docString":return jsx$1(DocString,{element:nt.element.docString,...et});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement,{element:nt.element.exception,...et});case"graphvizChart":return jsx$1(GraphVizChart,{element:nt.element.graphvizChart,...et});case"heading":return jsx$1(Heading,{element:nt.element.heading,...et});case"iframe":return jsx$1(IFrame,{element:nt.element.iframe,...et});case"imgs":return jsx$1(ImageList,{element:nt.element.imgs,endpoints:tt.endpoints,...et});case"json":return jsx$1(Json,{element:nt.element.json,...et});case"markdown":return jsx$1(Markdown,{element:nt.element.markdown,...et});case"metric":return jsx$1(Metric,{element:nt.element.metric});case"html":return jsx$1(Html,{element:nt.element.html,...et});case"pageLink":{const at=nt.element.pageLink,st=rt.disabled||at.disabled;return jsx$1(PageLink,{element:at,disabled:st,...et})}case"progress":return jsx$1(Progress,{element:nt.element.progress,...et});case"skeleton":return jsx$1(Skeleton,{element:nt.element.skeleton});case"snow":return hideIfStale(tt.isStale,jsx$1(Snow,{scriptRunId:tt.scriptRunId}));case"spinner":return jsx$1(Spinner,{element:nt.element.spinner,...et});case"text":return jsx$1(TextElement,{element:nt.element.text,...et});case"video":return jsx$1(Video,{element:nt.element.video,endpoints:tt.endpoints,...et,elementMgr:tt.widgetMgr});case"toast":{const at=nt.element.toast;return jsx$1(Toast,{body:at.body,icon:at.icon,...et},nt.scriptRunId)}case"arrowDataFrame":{const at=nt.element.arrowDataFrame;return rt.disabled=rt.disabled||at.disabled,jsx$1(ArrowDataFrame,{element:at,data:nt.quiverElement,...at.id&&{key:at.id},...rt})}case"arrowVegaLiteChart":const ot=nt.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:ot,...rt},ot.id||void 0);case"audioInput":{const at=nt.element.audioInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(AudioInput,{uploadClient:tt.uploadClient,element:at,...rt},at.id)}case"button":{const at=nt.element.button;if(rt.disabled=rt.disabled||at.disabled,at.isFormSubmitter){const{formId:st}=at,ut=tt.formsData.formsWithUploads.has(st);return jsx$1(FormSubmitContent,{element:at,hasInProgressUpload:ut,...rt})}return jsx$1(Button,{element:at,...rt})}case"buttonGroup":{const at=nt.element.buttonGroup;return rt.disabled=rt.disabled||at.disabled,jsx$1(ButtonGroup,{element:at,...rt},at.id)}case"downloadButton":{const at=nt.element.downloadButton;return rt.disabled=rt.disabled||at.disabled,jsx$1(DownloadButton,{endpoints:tt.endpoints,element:at,...rt},at.id)}case"cameraInput":{const at=nt.element.cameraInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(CameraInput,{element:at,uploadClient:tt.uploadClient,...rt},at.id)}case"chatInput":{const at=nt.element.chatInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(ChatInput,{element:at,...rt},at.id)}case"checkbox":{const at=nt.element.checkbox;return rt.disabled=rt.disabled||at.disabled,jsx$1(Checkbox,{element:at,...rt},at.id)}case"colorPicker":{const at=nt.element.colorPicker;return rt.disabled=rt.disabled||at.disabled,jsx$1(ColorPicker,{element:at,...rt},at.id)}case"componentInstance":return jsx$1(ComponentInstance$1,{registry:tt.componentRegistry,element:nt.element.componentInstance,...rt});case"dateInput":{const at=nt.element.dateInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(DateInput,{element:at,...rt},at.id)}case"fileUploader":{const at=nt.element.fileUploader;return rt.disabled=rt.disabled||at.disabled,jsx$1(FileUploader,{element:at,uploadClient:tt.uploadClient,...rt},at.id)}case"linkButton":{const at=nt.element.linkButton;return rt.disabled=rt.disabled||at.disabled,jsx$1(LinkButton,{element:at,...rt})}case"multiselect":{const at=nt.element.multiselect;return rt.disabled=rt.disabled||at.disabled,jsx$1(Multiselect,{element:at,...rt},at.id)}case"numberInput":{const at=nt.element.numberInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(NumberInput,{element:at,...rt},at.id)}case"plotlyChart":{const at=nt.element.plotlyChart;return jsx$1(PlotlyChart,{element:at,...rt},at.id)}case"radio":{const at=nt.element.radio;return rt.disabled=rt.disabled||at.disabled,jsx$1(Radio,{element:at,...rt},at.id)}case"selectbox":{const at=nt.element.selectbox;return rt.disabled=rt.disabled||at.disabled,jsx$1(Selectbox$1,{element:at,...rt},at.id)}case"slider":{const at=nt.element.slider;return rt.disabled=rt.disabled||at.disabled,jsx$1(Slider$1,{element:at,...rt},at.id)}case"textArea":{const at=nt.element.textArea;return rt.disabled=rt.disabled||at.disabled,jsx$1(TextArea,{element:at,...rt},at.id)}case"textInput":{const at=nt.element.textInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(TextInput,{element:at,...rt},at.id)}case"timeInput":{const at=nt.element.timeInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(TimeInput,{element:at,...rt},at.id)}default:throw new Error(`Unrecognized Element type ${nt.element.type}`)}},ElementNodeRenderer=tt=>{const{isFullScreen:nt,fragmentIdsThisRun:et}=React$1.useContext(LibContext),{node:rt,width:ot}=tt,at=rt.element.type||"",st=shouldComponentBeEnabled(at,tt.scriptRunState),ut=isComponentStale(st,rt,tt.scriptRunState,tt.scriptRunId,et),ct=getElementId(rt.element),pt=getKeyFromId(ct);return jsx$1(Maybe,{enable:st,children:jsx$1(StyledElementContainer,{className:classNames("stElementContainer","element-container",convertKeyToClassName(pt)),"data-testid":"stElementContainer","data-stale":ut,isStale:ut&&!nt,width:ot,elementType:at,children:jsx$1(ErrorBoundary,{width:ot,children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...tt,isStale:ut})})})})})},BlockNodeRenderer=tt=>{const{node:nt}=tt,{fragmentIdsThisRun:et}=reactExports.useContext(LibContext);if(nt.isEmpty&&!nt.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const rt=shouldComponentBeEnabled("",tt.scriptRunState),ot=isComponentStale(rt,nt,tt.scriptRunState,tt.scriptRunId,et),at={...tt,node:nt},st=tt.disableFullscreenMode||notNullOrUndefined(nt.deltaBlock.dialog)||notNullOrUndefined(nt.deltaBlock.popover),ut=jsx$1(LayoutBlock,{...at,disableFullscreenMode:st});if(nt.deltaBlock.dialog)return jsx$1(DialogWithProvider,{element:nt.deltaBlock.dialog,deltaMsgReceivedAt:nt.deltaMsgReceivedAt,children:ut});if(nt.deltaBlock.expandable)return jsx$1(Expander,{empty:nt.isEmpty,isStale:ot,element:nt.deltaBlock.expandable,children:ut});if(nt.deltaBlock.popover)return jsx$1(Popover,{empty:nt.isEmpty,element:nt.deltaBlock.popover,width:tt.width,children:ut});if(nt.deltaBlock.type==="form"){const{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,border:ft}=nt.deltaBlock.form,bt=tt.formsData.submitButtons.get(ct),ht=bt!==void 0&&bt.length>0;return jsx$1(Form,{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,width:tt.width,hasSubmitButton:ht,scriptRunState:tt.scriptRunState,widgetMgr:tt.widgetMgr,border:ft,children:ut})}if(nt.deltaBlock.chatMessage)return jsx$1(ChatMessage,{element:nt.deltaBlock.chatMessage,endpoints:tt.endpoints,children:ut});if(nt.deltaBlock.column)return jsx$1(StyledColumn,{weight:nt.deltaBlock.column.weight??0,gap:nt.deltaBlock.column.gap??"",verticalAlignment:nt.deltaBlock.column.verticalAlignment??void 0,showBorder:nt.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:ut});if(nt.deltaBlock.tabContainer){const pt={...at,isStale:ot,renderTabContent:dt=>jsx$1(VerticalBlock,{...dt})};return jsx$1(Tabs,{...pt})}return ut},ChildRenderer=tt=>{const{libConfig:nt}=reactExports.useContext(LibContext);assignDividerColor(tt.node,useTheme());const et=new Set;return jsx$1(Fragment,{children:tt.node.children&&tt.node.children.map((rt,ot)=>{const at=nt.disableFullscreenMode||tt.disableFullscreenMode;if(rt instanceof ElementNode){const st={...tt,disableFullscreenMode:at,node:rt},ut=getElementId(rt.element)||ot.toString();return et.has(ut)?null:(et.add(ut),jsx$1(ElementNodeRenderer,{...st},ut))}if(rt instanceof BlockNode){const st={...tt,disableFullscreenMode:at,node:rt};return jsx$1(BlockNodeRenderer,{...st},ot)}throw new Error(`Unrecognized AppNode: ${rt}`)})})};function ScrollToBottomVerticalBlockWrapper(tt){const{border:nt,height:et,children:rt}=tt,ot=useScrollToBottom();return jsx$1(StyledVerticalBlockBorderWrapper,{border:nt,height:et,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"scroll-to-bottom",ref:ot,children:rt})}const VerticalBlock=tt=>{var ft,bt;const nt=reactExports.useRef(null),[et,rt]=React$1.useState(-1),ot=reactExports.useMemo(()=>new ResizeObserver(([ht])=>{window.requestAnimationFrame(()=>{rt(ht.target.getBoundingClientRect().width||-1)})}),[rt]),at=((ft=tt.node.deltaBlock.vertical)==null?void 0:ft.border)??!1,st=((bt=tt.node.deltaBlock.vertical)==null?void 0:bt.height)||void 0,ut=st&&tt.node.children.find(ht=>ht instanceof BlockNode&&ht.deltaBlock.type==="chatMessage")!==void 0;reactExports.useEffect(()=>(nt.current&&ot.observe(nt.current),()=>{ot.disconnect()}),[ot,ut]);const ct=ut?ScrollToBottomVerticalBlockWrapper:StyledVerticalBlockBorderWrapper,pt={...tt,width:et},dt=getKeyFromId(tt.node.deltaBlock.id);return jsx$1(ct,{border:at,height:st,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"normal",children:jsx$1(StyledVerticalBlockWrapper,{ref:nt,children:jsx$1(StyledVerticalBlock,{width:et,className:classNames("stVerticalBlock",convertKeyToClassName(dt)),"data-testid":"stVerticalBlock",children:jsx$1(ChildRenderer,{...pt})})})})},HorizontalBlock=tt=>{var et;const nt=((et=tt.node.deltaBlock.horizontal)==null?void 0:et.gap)??"";return jsx$1(StyledHorizontalBlock,{gap:nt,className:"stHorizontalBlock","data-testid":"stHorizontalBlock",children:jsx$1(ChildRenderer,{...tt})})};function LayoutBlock(tt){return tt.node.deltaBlock.horizontal?jsx$1(HorizontalBlock,{...tt}):jsx$1(VerticalBlock,{...tt})}const StyledDataFrameOverlay=newStyled("div",{target:"e1cp3dxa1"})(({theme:tt})=>({position:"fixed",top:0,left:0,zIndex:tt.zIndices.tablePortal,lineHeight:"100%"})),PortalContext=React$1.createContext(null),PortalProvider=({children:tt})=>{const nt=reactExports.useRef(null),et=reactExports.useCallback(()=>nt.current,[]);return jsxs(PortalContext.Provider,{value:et,children:[tt,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:nt})]})};function ThemeProvider({theme:tt,baseuiTheme:nt,children:et}){return jsx$1(ThemeProvider$1,{theme:nt||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:tt,children:et})})}function toCodePoint(tt,nt){const et=[];let rt=0,ot=0,at=0;for(;at<tt.length;)rt=tt.charCodeAt(at++),ot?(et.push((65536+(ot-55296<<10)+(rt-56320)).toString(16)),ot=0):55296<=rt&&rt<=56319?ot=rt:et.push(rt.toString(16));return et.join("-")}const UFE0Fg=/\uFE0F/g,U200D="‍";function grabTheRightIcon(tt){return toCodePoint(tt.indexOf(U200D)<0?tt.replace(UFE0Fg,""):tt)}function iconToUrl(tt){const nt=/^:(.+)\/(.+):$/,et=tt.match(nt);return et===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${et[2]}/default/24px.svg`}function handleFavicon(tt,nt,et){const rt=extractEmoji(tt);let ot;rt&&!tt.startsWith(":material")?ot=`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/${grabTheRightIcon(rt)}.png`:tt.startsWith(":material")?ot=iconToUrl(tt):ot=et.buildMediaURL(tt),overwriteFavicon(ot),nt({type:"SET_PAGE_FAVICON",favicon:ot})}function overwriteFavicon(tt){const nt=document.querySelector("link[rel='shortcut icon']");nt&&(nt.href=tt)}function extractEmoji(tt){const nt=tt.replace("-","_");return nodeEmoji$1.hasEmoji(nodeEmoji$1.get(nt))?nodeEmoji$1.get(nt):nodeEmoji$1.hasEmoji(tt)?tt:""}var lib$2={},flattenNames$1={},baseFor$1=_baseFor,keys$2=keys_1;function baseForOwn$4(tt,nt){return tt&&baseFor$1(tt,nt,keys$2)}var _baseForOwn=baseForOwn$4,identity$3=identity_1;function castFunction$2(tt){return typeof tt=="function"?tt:identity$3}var _castFunction=castFunction$2,baseForOwn$3=_baseForOwn,castFunction$1=_castFunction;function forOwn(tt,nt){return tt&&baseForOwn$3(tt,castFunction$1(nt))}var forOwn_1=forOwn,HASH_UNDEFINED$3="__lodash_hash_undefined__";function setCacheAdd$2(tt){return this.__data__.set(tt,HASH_UNDEFINED$3),this}var _setCacheAdd=setCacheAdd$2;function setCacheHas$2(tt){return this.__data__.has(tt)}var _setCacheHas=setCacheHas$2,MapCache$1=_MapCache,setCacheAdd$1=_setCacheAdd,setCacheHas$1=_setCacheHas;function SetCache$3(tt){var nt=-1,et=tt==null?0:tt.length;for(this.__data__=new MapCache$1;++nt<et;)this.add(tt[nt])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd$1;SetCache$3.prototype.has=setCacheHas$1;var _SetCache=SetCache$3;function arraySome$2(tt,nt){for(var et=-1,rt=tt==null?0:tt.length;++et<rt;)if(nt(tt[et],et,tt))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$3(tt,nt){return tt.has(nt)}var _cacheHas=cacheHas$3,SetCache$2=_SetCache,arraySome$1=_arraySome,cacheHas$2=_cacheHas,COMPARE_PARTIAL_FLAG$b=1,COMPARE_UNORDERED_FLAG$7=2;function equalArrays$3(tt,nt,et,rt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$b,ut=tt.length,ct=nt.length;if(ut!=ct&&!(st&&ct>ut))return!1;var pt=at.get(tt),dt=at.get(nt);if(pt&&dt)return pt==nt&&dt==tt;var ft=-1,bt=!0,ht=et&COMPARE_UNORDERED_FLAG$7?new SetCache$2:void 0;for(at.set(tt,nt),at.set(nt,tt);++ft<ut;){var Mt=tt[ft],mt=nt[ft];if(rt)var Ot=st?rt(mt,Mt,ft,nt,tt,at):rt(Mt,mt,ft,tt,nt,at);if(Ot!==void 0){if(Ot)continue;bt=!1;break}if(ht){if(!arraySome$1(nt,function(zt,yt){if(!cacheHas$2(ht,yt)&&(Mt===zt||ot(Mt,zt,et,rt,at)))return ht.push(yt)})){bt=!1;break}}else if(!(Mt===mt||ot(Mt,mt,et,rt,at))){bt=!1;break}}return at.delete(tt),at.delete(nt),bt}var _equalArrays=equalArrays$3,Symbol$2=_Symbol,Uint8Array$2=_Uint8Array,eq$1=eq_1,equalArrays$2=_equalArrays,mapToArray$1=_mapToArray,setToArray$1=_setToArray,COMPARE_PARTIAL_FLAG$a=1,COMPARE_UNORDERED_FLAG$6=2,boolTag$2="[object Boolean]",dateTag$2="[object Date]",errorTag$2="[object Error]",mapTag$3="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$3="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$3="[object DataView]",symbolProto$2=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf$1=symbolProto$2?symbolProto$2.valueOf:void 0;function equalByTag$2(tt,nt,et,rt,ot,at,st){switch(et){case dataViewTag$3:if(tt.byteLength!=nt.byteLength||tt.byteOffset!=nt.byteOffset)return!1;tt=tt.buffer,nt=nt.buffer;case arrayBufferTag$2:return!(tt.byteLength!=nt.byteLength||!at(new Uint8Array$2(tt),new Uint8Array$2(nt)));case boolTag$2:case dateTag$2:case numberTag$2:return eq$1(+tt,+nt);case errorTag$2:return tt.name==nt.name&&tt.message==nt.message;case regexpTag$2:case stringTag$2:return tt==nt+"";case mapTag$3:var ut=mapToArray$1;case setTag$3:var ct=rt&COMPARE_PARTIAL_FLAG$a;if(ut||(ut=setToArray$1),tt.size!=nt.size&&!ct)return!1;var pt=st.get(tt);if(pt)return pt==nt;rt|=COMPARE_UNORDERED_FLAG$6,st.set(tt,nt);var dt=equalArrays$2(ut(tt),ut(nt),rt,ot,at,st);return st.delete(tt),dt;case symbolTag$2:if(symbolValueOf$1)return symbolValueOf$1.call(tt)==symbolValueOf$1.call(nt)}return!1}var _equalByTag=equalByTag$2,getAllKeys$1=_getAllKeys,COMPARE_PARTIAL_FLAG$9=1,objectProto$h=Object.prototype,hasOwnProperty$f=objectProto$h.hasOwnProperty;function equalObjects$2(tt,nt,et,rt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$9,ut=getAllKeys$1(tt),ct=ut.length,pt=getAllKeys$1(nt),dt=pt.length;if(ct!=dt&&!st)return!1;for(var ft=ct;ft--;){var bt=ut[ft];if(!(st?bt in nt:hasOwnProperty$f.call(nt,bt)))return!1}var ht=at.get(tt),Mt=at.get(nt);if(ht&&Mt)return ht==nt&&Mt==tt;var mt=!0;at.set(tt,nt),at.set(nt,tt);for(var Ot=st;++ft<ct;){bt=ut[ft];var zt=tt[bt],yt=nt[bt];if(rt)var vt=st?rt(yt,zt,bt,nt,tt,at):rt(zt,yt,bt,tt,nt,at);if(!(vt===void 0?zt===yt||ot(zt,yt,et,rt,at):vt)){mt=!1;break}Ot||(Ot=bt=="constructor")}if(mt&&!Ot){var At=tt.constructor,St=nt.constructor;At!=St&&"constructor"in tt&&"constructor"in nt&&!(typeof At=="function"&&At instanceof At&&typeof St=="function"&&St instanceof St)&&(mt=!1)}return at.delete(tt),at.delete(nt),mt}var _equalObjects=equalObjects$2,Stack$2=_Stack,equalArrays$1=_equalArrays,equalByTag$1=_equalByTag,equalObjects$1=_equalObjects,getTag$1=_getTag,isArray$7=isArray_1,isBuffer$2=isBufferExports,isTypedArray$2=isTypedArray_1,COMPARE_PARTIAL_FLAG$8=1,argsTag$3="[object Arguments]",arrayTag$2="[object Array]",objectTag$4="[object Object]",objectProto$g=Object.prototype,hasOwnProperty$e=objectProto$g.hasOwnProperty;function baseIsEqualDeep$2(tt,nt,et,rt,ot,at){var st=isArray$7(tt),ut=isArray$7(nt),ct=st?arrayTag$2:getTag$1(tt),pt=ut?arrayTag$2:getTag$1(nt);ct=ct==argsTag$3?objectTag$4:ct,pt=pt==argsTag$3?objectTag$4:pt;var dt=ct==objectTag$4,ft=pt==objectTag$4,bt=ct==pt;if(bt&&isBuffer$2(tt)){if(!isBuffer$2(nt))return!1;st=!0,dt=!1}if(bt&&!dt)return at||(at=new Stack$2),st||isTypedArray$2(tt)?equalArrays$1(tt,nt,et,rt,ot,at):equalByTag$1(tt,nt,ct,et,rt,ot,at);if(!(et&COMPARE_PARTIAL_FLAG$8)){var ht=dt&&hasOwnProperty$e.call(tt,"__wrapped__"),Mt=ft&&hasOwnProperty$e.call(nt,"__wrapped__");if(ht||Mt){var mt=ht?tt.value():tt,Ot=Mt?nt.value():nt;return at||(at=new Stack$2),ot(mt,Ot,et,rt,at)}}return bt?(at||(at=new Stack$2),equalObjects$1(tt,nt,et,rt,ot,at)):!1}var _baseIsEqualDeep=baseIsEqualDeep$2,baseIsEqualDeep$1=_baseIsEqualDeep,isObjectLike$1=isObjectLike_1;function baseIsEqual$4(tt,nt,et,rt,ot){return tt===nt?!0:tt==null||nt==null||!isObjectLike$1(tt)&&!isObjectLike$1(nt)?tt!==tt&&nt!==nt:baseIsEqualDeep$1(tt,nt,et,rt,baseIsEqual$4,ot)}var _baseIsEqual=baseIsEqual$4,Stack$1=_Stack,baseIsEqual$3=_baseIsEqual,COMPARE_PARTIAL_FLAG$7=1,COMPARE_UNORDERED_FLAG$5=2;function baseIsMatch$2(tt,nt,et,rt){var ot=et.length,at=ot,st=!rt;if(tt==null)return!at;for(tt=Object(tt);ot--;){var ut=et[ot];if(st&&ut[2]?ut[1]!==tt[ut[0]]:!(ut[0]in tt))return!1}for(;++ot<at;){ut=et[ot];var ct=ut[0],pt=tt[ct],dt=ut[1];if(st&&ut[2]){if(pt===void 0&&!(ct in tt))return!1}else{var ft=new Stack$1;if(rt)var bt=rt(pt,dt,ct,tt,nt,ft);if(!(bt===void 0?baseIsEqual$3(dt,pt,COMPARE_PARTIAL_FLAG$7|COMPARE_UNORDERED_FLAG$5,rt,ft):bt))return!1}}return!0}var _baseIsMatch=baseIsMatch$2,isObject$3=isObject_1;function isStrictComparable$3(tt){return tt===tt&&!isObject$3(tt)}var _isStrictComparable=isStrictComparable$3,isStrictComparable$2=_isStrictComparable,keys$1=keys_1;function getMatchData$2(tt){for(var nt=keys$1(tt),et=nt.length;et--;){var rt=nt[et],ot=tt[rt];nt[et]=[rt,ot,isStrictComparable$2(ot)]}return nt}var _getMatchData=getMatchData$2;function matchesStrictComparable$3(tt,nt){return function(et){return et==null?!1:et[tt]===nt&&(nt!==void 0||tt in Object(et))}}var _matchesStrictComparable=matchesStrictComparable$3,baseIsMatch$1=_baseIsMatch,getMatchData$1=_getMatchData,matchesStrictComparable$2=_matchesStrictComparable;function baseMatches$2(tt){var nt=getMatchData$1(tt);return nt.length==1&&nt[0][2]?matchesStrictComparable$2(nt[0][0],nt[0][1]):function(et){return et===tt||baseIsMatch$1(et,tt,nt)}}var _baseMatches=baseMatches$2;function baseHasIn$2(tt,nt){return tt!=null&&nt in Object(tt)}var _baseHasIn=baseHasIn$2,castPath$3=_castPath,isArguments$1=isArguments_1,isArray$6=isArray_1,isIndex$2=_isIndex,isLength$1=isLength_1,toKey$4=_toKey;function hasPath$2(tt,nt,et){nt=castPath$3(nt,tt);for(var rt=-1,ot=nt.length,at=!1;++rt<ot;){var st=toKey$4(nt[rt]);if(!(at=tt!=null&&et(tt,st)))break;tt=tt[st]}return at||++rt!=ot?at:(ot=tt==null?0:tt.length,!!ot&&isLength$1(ot)&&isIndex$2(st,ot)&&(isArray$6(tt)||isArguments$1(tt)))}var _hasPath=hasPath$2,baseHasIn$1=_baseHasIn,hasPath$1=_hasPath;function hasIn$3(tt,nt){return tt!=null&&hasPath$1(tt,nt,baseHasIn$1)}var hasIn_1=hasIn$3,baseIsEqual$2=_baseIsEqual,get$2=get_1,hasIn$2=hasIn_1,isKey$2=_isKey,isStrictComparable$1=_isStrictComparable,matchesStrictComparable$1=_matchesStrictComparable,toKey$3=_toKey,COMPARE_PARTIAL_FLAG$6=1,COMPARE_UNORDERED_FLAG$4=2;function baseMatchesProperty$2(tt,nt){return isKey$2(tt)&&isStrictComparable$1(nt)?matchesStrictComparable$1(toKey$3(tt),nt):function(et){var rt=get$2(et,tt);return rt===void 0&&rt===nt?hasIn$2(et,tt):baseIsEqual$2(nt,rt,COMPARE_PARTIAL_FLAG$6|COMPARE_UNORDERED_FLAG$4)}}var _baseMatchesProperty=baseMatchesProperty$2,baseGet$3=_baseGet;function basePropertyDeep$2(tt){return function(nt){return baseGet$3(nt,tt)}}var _basePropertyDeep=basePropertyDeep$2,baseProperty$1=_baseProperty,basePropertyDeep$1=_basePropertyDeep,isKey$1=_isKey,toKey$2=_toKey;function property$2(tt){return isKey$1(tt)?baseProperty$1(toKey$2(tt)):basePropertyDeep$1(tt)}var property_1=property$2,baseMatches$1=_baseMatches,baseMatchesProperty$1=_baseMatchesProperty,identity$2=identity_1,isArray$5=isArray_1,property$1=property_1;function baseIteratee$5(tt){return typeof tt=="function"?tt:tt==null?identity$2:typeof tt=="object"?isArray$5(tt)?baseMatchesProperty$1(tt[0],tt[1]):baseMatches$1(tt):property$1(tt)}var _baseIteratee=baseIteratee$5,isArrayLike$2=isArrayLike_1;function createBaseEach$2(tt,nt){return function(et,rt){if(et==null)return et;if(!isArrayLike$2(et))return tt(et,rt);for(var ot=et.length,at=nt?ot:-1,st=Object(et);(nt?at--:++at<ot)&&rt(st[at],at,st)!==!1;);return et}}var _createBaseEach=createBaseEach$2,baseForOwn$2=_baseForOwn,createBaseEach$1=_createBaseEach,baseEach$3=createBaseEach$1(baseForOwn$2),_baseEach=baseEach$3,baseEach$2=_baseEach,isArrayLike$1=isArrayLike_1;function baseMap$3(tt,nt){var et=-1,rt=isArrayLike$1(tt)?Array(tt.length):[];return baseEach$2(tt,function(ot,at,st){rt[++et]=nt(ot,at,st)}),rt}var _baseMap=baseMap$3,arrayMap$3=_arrayMap,baseIteratee$4=_baseIteratee,baseMap$2=_baseMap,isArray$4=isArray_1;function map$1(tt,nt){var et=isArray$4(tt)?arrayMap$3:baseMap$2;return et(tt,baseIteratee$4(nt))}var map_1=map$1;Object.defineProperty(flattenNames$1,"__esModule",{value:!0});flattenNames$1.flattenNames=void 0;var _isString2=isString_1,_isString3=_interopRequireDefault$7(_isString2),_forOwn2$2=forOwn_1,_forOwn3$2=_interopRequireDefault$7(_forOwn2$2),_isPlainObject2=isPlainObject_1,_isPlainObject3=_interopRequireDefault$7(_isPlainObject2),_map2=map_1,_map3=_interopRequireDefault$7(_map2);function _interopRequireDefault$7(tt){return tt&&tt.__esModule?tt:{default:tt}}var flattenNames=flattenNames$1.flattenNames=function tt(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],et=[];return(0,_map3.default)(nt,function(rt){Array.isArray(rt)?tt(rt).map(function(ot){return et.push(ot)}):(0,_isPlainObject3.default)(rt)?(0,_forOwn3$2.default)(rt,function(ot,at){ot===!0&&et.push(at),et.push(at+"-"+ot)}):(0,_isString3.default)(rt)&&et.push(rt)}),et};flattenNames$1.default=flattenNames;var mergeClasses$1={};Object.defineProperty(mergeClasses$1,"__esModule",{value:!0});mergeClasses$1.mergeClasses=void 0;var _forOwn2$1=forOwn_1,_forOwn3$1=_interopRequireDefault$6(_forOwn2$1),_cloneDeep2=cloneDeep_1,_cloneDeep3=_interopRequireDefault$6(_cloneDeep2),_extends$w=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function _interopRequireDefault$6(tt){return tt&&tt.__esModule?tt:{default:tt}}var mergeClasses=mergeClasses$1.mergeClasses=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],rt=nt.default&&(0,_cloneDeep3.default)(nt.default)||{};return et.map(function(ot){var at=nt[ot];return at&&(0,_forOwn3$1.default)(at,function(st,ut){rt[ut]||(rt[ut]={}),rt[ut]=_extends$w({},rt[ut],at[ut])}),ot}),rt};mergeClasses$1.default=mergeClasses;var autoprefix$1={};Object.defineProperty(autoprefix$1,"__esModule",{value:!0});autoprefix$1.autoprefix=void 0;var _forOwn2=forOwn_1,_forOwn3=_interopRequireDefault$5(_forOwn2),_extends$v=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function _interopRequireDefault$5(tt){return tt&&tt.__esModule?tt:{default:tt}}var transforms={borderRadius:function tt(nt){return{msBorderRadius:nt,MozBorderRadius:nt,OBorderRadius:nt,WebkitBorderRadius:nt,borderRadius:nt}},boxShadow:function tt(nt){return{msBoxShadow:nt,MozBoxShadow:nt,OBoxShadow:nt,WebkitBoxShadow:nt,boxShadow:nt}},userSelect:function tt(nt){return{WebkitTouchCallout:nt,KhtmlUserSelect:nt,MozUserSelect:nt,msUserSelect:nt,WebkitUserSelect:nt,userSelect:nt}},flex:function tt(nt){return{WebkitBoxFlex:nt,MozBoxFlex:nt,WebkitFlex:nt,msFlex:nt,flex:nt}},flexBasis:function tt(nt){return{WebkitFlexBasis:nt,flexBasis:nt}},justifyContent:function tt(nt){return{WebkitJustifyContent:nt,justifyContent:nt}},transition:function tt(nt){return{msTransition:nt,MozTransition:nt,OTransition:nt,WebkitTransition:nt,transition:nt}},transform:function tt(nt){return{msTransform:nt,MozTransform:nt,OTransform:nt,WebkitTransform:nt,transform:nt}},absolute:function tt(nt){var et=nt&&nt.split(" ");return{position:"absolute",top:et&&et[0],right:et&&et[1],bottom:et&&et[2],left:et&&et[3]}},extend:function tt(nt,et){var rt=et[nt];return rt||{extend:nt}}},autoprefix=autoprefix$1.autoprefix=function tt(nt){var et={};return(0,_forOwn3.default)(nt,function(rt,ot){var at={};(0,_forOwn3.default)(rt,function(st,ut){var ct=transforms[ut];ct?at=_extends$v({},at,ct(st)):at[ut]=st}),et[ot]=at}),et};autoprefix$1.default=autoprefix;var hover$1={};Object.defineProperty(hover$1,"__esModule",{value:!0});hover$1.hover=void 0;var _extends$u=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_react$3=reactExports,_react2$3=_interopRequireDefault$4(_react$3);function _interopRequireDefault$4(tt){return tt&&tt.__esModule?tt:{default:tt}}function _classCallCheck$f(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$f(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$f(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var hover=hover$1.hover=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(rt){_inherits$f(ot,rt);function ot(){var at,st,ut,ct;_classCallCheck$f(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$f(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={hover:!1},ut.handleMouseOver=function(){return ut.setState({hover:!0})},ut.handleMouseOut=function(){return ut.setState({hover:!1})},ut.render=function(){return _react2$3.default.createElement(et,{onMouseOver:ut.handleMouseOver,onMouseOut:ut.handleMouseOut},_react2$3.default.createElement(nt,_extends$u({},ut.props,ut.state)))},st),_possibleConstructorReturn$f(ut,ct)}return ot}(_react2$3.default.Component)};hover$1.default=hover;var active$1={};Object.defineProperty(active$1,"__esModule",{value:!0});active$1.active=void 0;var _extends$t=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_react$2=reactExports,_react2$2=_interopRequireDefault$3(_react$2);function _interopRequireDefault$3(tt){return tt&&tt.__esModule?tt:{default:tt}}function _classCallCheck$e(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$e(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$e(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var active=active$1.active=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(rt){_inherits$e(ot,rt);function ot(){var at,st,ut,ct;_classCallCheck$e(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$e(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={active:!1},ut.handleMouseDown=function(){return ut.setState({active:!0})},ut.handleMouseUp=function(){return ut.setState({active:!1})},ut.render=function(){return _react2$2.default.createElement(et,{onMouseDown:ut.handleMouseDown,onMouseUp:ut.handleMouseUp},_react2$2.default.createElement(nt,_extends$t({},ut.props,ut.state)))},st),_possibleConstructorReturn$e(ut,ct)}return ot}(_react2$2.default.Component)};active$1.default=active;var loop={};Object.defineProperty(loop,"__esModule",{value:!0});var loopable=function tt(nt,et){var rt={},ot=function(st){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;rt[st]=ut};return nt===0&&ot("first-child"),nt===et-1&&ot("last-child"),(nt===0||nt%2===0)&&ot("even"),Math.abs(nt%2)===1&&ot("odd"),ot("nth-child",nt),rt};loop.default=loopable;Object.defineProperty(lib$2,"__esModule",{value:!0});lib$2.ReactCSS=lib$2.loop=lib$2.handleActive=handleHover=lib$2.handleHover=lib$2.hover=void 0;var _flattenNames=flattenNames$1,_flattenNames2=_interopRequireDefault$2(_flattenNames),_mergeClasses=mergeClasses$1,_mergeClasses2=_interopRequireDefault$2(_mergeClasses),_autoprefix=autoprefix$1,_autoprefix2=_interopRequireDefault$2(_autoprefix),_hover2=hover$1,_hover3=_interopRequireDefault$2(_hover2),_active=active$1,_active2=_interopRequireDefault$2(_active),_loop2=loop,_loop3=_interopRequireDefault$2(_loop2);function _interopRequireDefault$2(tt){return tt&&tt.__esModule?tt:{default:tt}}lib$2.hover=_hover3.default;var handleHover=lib$2.handleHover=_hover3.default;lib$2.handleActive=_active2.default;lib$2.loop=_loop3.default;var ReactCSS=lib$2.ReactCSS=function tt(nt){for(var et=arguments.length,rt=Array(et>1?et-1:0),ot=1;ot<et;ot++)rt[ot-1]=arguments[ot];var at=(0,_flattenNames2.default)(rt),st=(0,_mergeClasses2.default)(nt,at);return(0,_autoprefix2.default)(st)},_default$2=lib$2.default=ReactCSS,calculateChange$2=function tt(nt,et,rt,ot,at){var st=at.clientWidth,ut=at.clientHeight,ct=typeof nt.pageX=="number"?nt.pageX:nt.touches[0].pageX,pt=typeof nt.pageY=="number"?nt.pageY:nt.touches[0].pageY,dt=ct-(at.getBoundingClientRect().left+window.pageXOffset),ft=pt-(at.getBoundingClientRect().top+window.pageYOffset);if(rt==="vertical"){var bt=void 0;if(ft<0?bt=0:ft>ut?bt=1:bt=Math.round(ft*100/ut)/100,et.a!==bt)return{h:et.h,s:et.s,l:et.l,a:bt,source:"rgb"}}else{var ht=void 0;if(dt<0?ht=0:dt>st?ht=1:ht=Math.round(dt*100/st)/100,ot!==ht)return{h:et.h,s:et.s,l:et.l,a:ht,source:"rgb"}}return null},checkboardCache={},render=function tt(nt,et,rt,ot){if(typeof document>"u"&&!ot)return null;var at=ot?new ot:document.createElement("canvas");at.width=rt*2,at.height=rt*2;var st=at.getContext("2d");return st?(st.fillStyle=nt,st.fillRect(0,0,at.width,at.height),st.fillStyle=et,st.fillRect(0,0,rt,rt),st.translate(rt,rt),st.fillRect(0,0,rt,rt),at.toDataURL()):null},get$1=function tt(nt,et,rt,ot){var at=nt+"-"+et+"-"+rt+(ot?"-server":"");if(checkboardCache[at])return checkboardCache[at];var st=render(nt,et,rt,ot);return checkboardCache[at]=st,st},_extends$s=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},Checkboard=function tt(nt){var et=nt.white,rt=nt.grey,ot=nt.size,at=nt.renderers,st=nt.borderRadius,ut=nt.boxShadow,ct=nt.children,pt=_default$2({default:{grid:{borderRadius:st,boxShadow:ut,absolute:"0px 0px 0px 0px",background:"url("+get$1(et,rt,ot,at.canvas)+") center left"}}});return reactExports.isValidElement(ct)?React$1.cloneElement(ct,_extends$s({},ct.props,{style:_extends$s({},ct.props.style,pt.grid)})):React$1.createElement("div",{style:pt.grid})};Checkboard.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var _extends$r=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_createClass$d=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}();function _classCallCheck$d(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$d(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$d(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var Alpha=function(tt){_inherits$d(nt,tt);function nt(){var et,rt,ot,at;_classCallCheck$d(this,nt);for(var st=arguments.length,ut=Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];return at=(rt=(ot=_possibleConstructorReturn$d(this,(et=nt.__proto__||Object.getPrototypeOf(nt)).call.apply(et,[this].concat(ut))),ot),ot.handleChange=function(pt){var dt=calculateChange$2(pt,ot.props.hsl,ot.props.direction,ot.props.a,ot.container);dt&&typeof ot.props.onChange=="function"&&ot.props.onChange(dt,pt)},ot.handleMouseDown=function(pt){ot.handleChange(pt),window.addEventListener("mousemove",ot.handleChange),window.addEventListener("mouseup",ot.handleMouseUp)},ot.handleMouseUp=function(){ot.unbindEventListeners()},ot.unbindEventListeners=function(){window.removeEventListener("mousemove",ot.handleChange),window.removeEventListener("mouseup",ot.handleMouseUp)},rt),_possibleConstructorReturn$d(ot,at)}return _createClass$d(nt,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var rt=this,ot=this.props.rgb,at=_default$2({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+ot.r+","+ot.g+","+ot.b+`, 0) 0%,
683
+ `),allowHTML:!1})]}),ct&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:ct.includes("linear"),color:ct})]})}const StyledCheckbox$1=newStyled("div",{target:"e1eyve560"})(({width:tt,theme:nt})=>({width:tt,display:"flex",alignItems:"center",minHeight:nt.sizes.smallElementHeight})),StyledContent=newStyled("div",{target:"e1eyve561"})(({visibility:tt})=>({display:tt===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:tt===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(tt,nt){let et=nt.spacing.lg;return tt==="medium"?et=nt.spacing.threeXL:tt==="large"&&(et=nt.spacing.fourXL),et}const StyledHorizontalBlock=newStyled("div",{target:"e1o09lpv0"})(({theme:tt,gap:nt})=>({display:"flex",flexWrap:"wrap",flexGrow:1,alignItems:"stretch",gap:translateGapWidth(nt,tt)})),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=newStyled("div",{target:"e1o09lpv1"})(({theme:tt,isStale:nt,width:et,elementType:rt})=>({width:et,position:"relative","@media print":{overflow:"visible"},":is(.stHtml-empty)":{display:"none"},":has(> .stCacheSpinner)":{height:tt.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${tt.spacing.lg}`,zIndex:tt.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${tt.spacing.xs}`,marginBottom:`-${tt.spacing.xs}`},...nt&&rt!=="skeleton"&&STALE_STYLES,...rt==="empty"?{display:"none"}:{},...GLOBAL_ELEMENTS.includes(rt)?{marginBottom:`-${tt.spacing.lg}`}:{}})),StyledColumn=newStyled("div",{target:"e1o09lpv2"})(({theme:tt,weight:nt,gap:et,showBorder:rt,verticalAlignment:ot})=>{const{VerticalAlignment:at}=Block$2.Column,st=nt*100,ut=translateGapWidth(et,tt),ct=`calc(${st}% - ${ut})`;return{width:ct,flex:`1 1 ${ct}`,[`@media (max-width: ${tt.breakpoints.columns})`]:{minWidth:`calc(100% - ${tt.spacing.twoXL})`},...ot===at.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:tt.spacing.sm}},...ot===at.TOP&&{[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginTop:tt.spacing.sm}},...ot===at.CENTER&&{marginTop:"auto",marginBottom:"auto"},...rt&&{border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,borderRadius:tt.radii.default,padding:`calc(${tt.spacing.lg} - ${tt.sizes.borderWidth})`}}}),StyledVerticalBlock=newStyled("div",{target:"e1o09lpv3"})(({width:tt,theme:nt})=>({width:tt,position:"relative",display:"flex",flex:1,flexDirection:"column",gap:nt.spacing.lg})),StyledVerticalBlockWrapper=newStyled("div",{target:"e1o09lpv4"})({display:"flex",flexDirection:"column",flex:1}),StyledVerticalBlockBorderWrapper=newStyled("div",{target:"e1o09lpv5"})(({theme:tt,border:nt,height:et})=>({...nt&&{border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,borderRadius:tt.radii.default,padding:`calc(${tt.spacing.lg} - ${tt.sizes.borderWidth})`},...et&&{height:`${et}px`,overflow:"auto"}})),Audio=React$1.lazy(()=>__vitePreload(()=>import("./index.D_cUCQty.js"),[],import.meta.url)),Balloons=React$1.lazy(()=>__vitePreload(()=>import("./index.KnCHOP8N.js"),__vite__mapDeps([0,1]),import.meta.url)),Snow=React$1.lazy(()=>__vitePreload(()=>import("./index.6ZeP-L28.js"),__vite__mapDeps([2,1]),import.meta.url)),ArrowDataFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.DaJKYvsa.js").then(tt=>tt.c),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13]),import.meta.url)),ArrowVegaLiteChart=React$1.lazy(()=>__vitePreload(()=>import("./index.CgSymxeL.js"),__vite__mapDeps([14,15,16,17,4,6,5]),import.meta.url)),Toast=React$1.lazy(()=>__vitePreload(()=>import("./index.CzhhqwJO.js"),[],import.meta.url)),BokehChart=React$1.lazy(()=>__vitePreload(()=>import("./index.lvhOjMEi.js"),[],import.meta.url)),DebouncedBokehChart=debounceRender(BokehChart,100),DeckGlJsonChart=React$1.lazy(()=>__vitePreload(()=>import("./index.vp4vsBFK.js"),__vite__mapDeps([18,9,10,6,5,19,4,20,15,16,21]),import.meta.url)),GraphVizChart=React$1.lazy(()=>__vitePreload(()=>import("./index.KmZ5vhVN.js"),__vite__mapDeps([22,17,16,20,6,5]),import.meta.url)),IFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.dgKFPPrX.js"),[],import.meta.url)),ImageList=React$1.lazy(()=>__vitePreload(()=>import("./index.8Bq56lcM.js"),__vite__mapDeps([23,6,5]),import.meta.url)),LinkButton=React$1.lazy(()=>__vitePreload(()=>import("./index.GNEDK2sZ.js"),[],import.meta.url)),PageLink=React$1.lazy(()=>__vitePreload(()=>import("./index.BF04V0db.js"),[],import.meta.url)),PlotlyChart=React$1.lazy(()=>__vitePreload(()=>import("./index.Q2CKSyfz.js"),__vite__mapDeps([24,4,5]),import.meta.url)),Video=React$1.lazy(()=>__vitePreload(()=>import("./index.D277ro6Y.js"),[],import.meta.url)),AudioInput=React$1.lazy(()=>__vitePreload(()=>import("./index.PqkLl1t0.js"),__vite__mapDeps([25,4,6,26,8,12]),import.meta.url)),Button=React$1.lazy(()=>__vitePreload(()=>import("./index.CkxcnfCr.js"),[],import.meta.url)),ButtonGroup=React$1.lazy(()=>__vitePreload(()=>import("./index.CmHLY_aM.js"),__vite__mapDeps([27,19,4]),import.meta.url)),DownloadButton=React$1.lazy(()=>__vitePreload(()=>import("./index.0AR3jk4J.js"),__vite__mapDeps([28,8]),import.meta.url)),CameraInput=React$1.lazy(()=>__vitePreload(()=>import("./index.B_nF-WE5.js"),__vite__mapDeps([29,4,30,31]),import.meta.url)),ChatInput=React$1.lazy(()=>__vitePreload(()=>import("./index.WrhWPW-4.js"),__vite__mapDeps([32,33,34,35,36]),import.meta.url)),Checkbox=React$1.lazy(()=>__vitePreload(()=>import("./index.C-fIpagH.js"),__vite__mapDeps([37,19,4]),import.meta.url)),ColorPicker=React$1.lazy(()=>__vitePreload(()=>import("./index.BfjxH33Q.js"),__vite__mapDeps([38,19,4]),import.meta.url)),DateInput=React$1.lazy(()=>__vitePreload(()=>import("./index.3p3iyxFl.js"),__vite__mapDeps([39,19,4,40,10,11,41,36]),import.meta.url)),Html=React$1.lazy(()=>__vitePreload(()=>import("./index.BRjwQabs.js"),[],import.meta.url)),Multiselect=React$1.lazy(()=>__vitePreload(()=>import("./index.D6WGxtqm.js"),__vite__mapDeps([42,19,4]),import.meta.url)),Progress=React$1.lazy(()=>__vitePreload(()=>import("./index.SOQTU-r_.js"),__vite__mapDeps([43,31]),import.meta.url)),Spinner=React$1.lazy(()=>__vitePreload(()=>import("./index.drbticTq.js"),[],import.meta.url)),Radio=React$1.lazy(()=>__vitePreload(()=>import("./index.C9YRT0fo.js"),__vite__mapDeps([44,19,4]),import.meta.url)),Selectbox$1=React$1.lazy(()=>__vitePreload(()=>import("./index.75EUE6su.js"),__vite__mapDeps([45,19,4]),import.meta.url)),Slider$1=React$1.lazy(()=>__vitePreload(()=>import("./index.C3rcPpxm.js"),__vite__mapDeps([46,7,19,4]),import.meta.url)),FileUploader=React$1.lazy(()=>__vitePreload(()=>import("./index.1fq50cer.js"),__vite__mapDeps([47,4,31,26,30]),import.meta.url)),TextArea=React$1.lazy(()=>__vitePreload(()=>import("./index.BSgVnwxN.js"),__vite__mapDeps([48,49,50,34,33,19,4,35,36]),import.meta.url)),TextInput=React$1.lazy(()=>__vitePreload(()=>import("./index.KOla1gMY.js"),__vite__mapDeps([51,49,50,34,19,4,33,41,36]),import.meta.url)),TimeInput=React$1.lazy(()=>__vitePreload(()=>import("./index.CIMJL36S.js"),__vite__mapDeps([52,19,4,40,10,11]),import.meta.url)),NumberInput=React$1.lazy(()=>__vitePreload(()=>import("./index.BdfmpndH.js"),__vite__mapDeps([53,7,49,4,33,41,36]),import.meta.url)),StreamlitSyntaxHighlighter=React$1.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>StreamlitSyntaxHighlighter$2),void 0,import.meta.url));function hideIfStale(tt,nt){return tt?jsx$1(Fragment,{}):nt}const RawElementNodeRenderer=tt=>{const{node:nt}=tt;if(!nt)throw new Error("ElementNode not found.");const et={width:tt.width,disableFullscreenMode:tt.disableFullscreenMode},rt={...et,widgetMgr:tt.widgetMgr,disabled:tt.widgetsDisabled,fragmentId:nt.fragmentId};switch(nt.element.type){case"alert":{const at=nt.element.alert;return jsx$1(AlertElement,{icon:at.icon,body:at.body,kind:getAlertElementKind(at.format),...et})}case"arrowTable":return jsx$1(ArrowTable,{element:nt.quiverElement,...et});case"audio":return jsx$1(Audio,{element:nt.element.audio,endpoints:tt.endpoints,...et,elementMgr:tt.widgetMgr});case"balloons":return hideIfStale(tt.isStale,jsx$1(Balloons,{scriptRunId:tt.scriptRunId}));case"bokehChart":return jsx$1(DebouncedBokehChart,{element:nt.element.bokehChart,...et});case"code":{const at=nt.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:at.language,showLineNumbers:at.showLineNumbers,wrapLines:at.wrapLines,height:at.height,children:at.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:nt.element.deckGlJsonChart,...rt});case"docString":return jsx$1(DocString,{element:nt.element.docString,...et});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement,{element:nt.element.exception,...et});case"graphvizChart":return jsx$1(GraphVizChart,{element:nt.element.graphvizChart,...et});case"heading":return jsx$1(Heading,{element:nt.element.heading,...et});case"iframe":return jsx$1(IFrame,{element:nt.element.iframe,...et});case"imgs":return jsx$1(ImageList,{element:nt.element.imgs,endpoints:tt.endpoints,...et});case"json":return jsx$1(Json,{element:nt.element.json,...et});case"markdown":return jsx$1(Markdown,{element:nt.element.markdown,...et});case"metric":return jsx$1(Metric,{element:nt.element.metric});case"html":return jsx$1(Html,{element:nt.element.html,...et});case"pageLink":{const at=nt.element.pageLink,st=rt.disabled||at.disabled;return jsx$1(PageLink,{element:at,disabled:st,...et})}case"progress":return jsx$1(Progress,{element:nt.element.progress,...et});case"skeleton":return jsx$1(Skeleton,{element:nt.element.skeleton});case"snow":return hideIfStale(tt.isStale,jsx$1(Snow,{scriptRunId:tt.scriptRunId}));case"spinner":return jsx$1(Spinner,{element:nt.element.spinner,...et});case"text":return jsx$1(TextElement,{element:nt.element.text,...et});case"video":return jsx$1(Video,{element:nt.element.video,endpoints:tt.endpoints,...et,elementMgr:tt.widgetMgr});case"toast":{const at=nt.element.toast;return jsx$1(Toast,{body:at.body,icon:at.icon,...et},nt.scriptRunId)}case"arrowDataFrame":{const at=nt.element.arrowDataFrame;return rt.disabled=rt.disabled||at.disabled,jsx$1(ArrowDataFrame,{element:at,data:nt.quiverElement,...at.id&&{key:at.id},...rt})}case"arrowVegaLiteChart":const ot=nt.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:ot,...rt},ot.id||void 0);case"audioInput":{const at=nt.element.audioInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(AudioInput,{uploadClient:tt.uploadClient,element:at,...rt},at.id)}case"button":{const at=nt.element.button;if(rt.disabled=rt.disabled||at.disabled,at.isFormSubmitter){const{formId:st}=at,ut=tt.formsData.formsWithUploads.has(st);return jsx$1(FormSubmitContent,{element:at,hasInProgressUpload:ut,...rt})}return jsx$1(Button,{element:at,...rt})}case"buttonGroup":{const at=nt.element.buttonGroup;return rt.disabled=rt.disabled||at.disabled,jsx$1(ButtonGroup,{element:at,...rt},at.id)}case"downloadButton":{const at=nt.element.downloadButton;return rt.disabled=rt.disabled||at.disabled,jsx$1(DownloadButton,{endpoints:tt.endpoints,element:at,...rt},at.id)}case"cameraInput":{const at=nt.element.cameraInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(CameraInput,{element:at,uploadClient:tt.uploadClient,...rt},at.id)}case"chatInput":{const at=nt.element.chatInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(ChatInput,{element:at,...rt},at.id)}case"checkbox":{const at=nt.element.checkbox;return rt.disabled=rt.disabled||at.disabled,jsx$1(Checkbox,{element:at,...rt},at.id)}case"colorPicker":{const at=nt.element.colorPicker;return rt.disabled=rt.disabled||at.disabled,jsx$1(ColorPicker,{element:at,...rt},at.id)}case"componentInstance":return jsx$1(ComponentInstance$1,{registry:tt.componentRegistry,element:nt.element.componentInstance,...rt});case"dateInput":{const at=nt.element.dateInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(DateInput,{element:at,...rt},at.id)}case"fileUploader":{const at=nt.element.fileUploader;return rt.disabled=rt.disabled||at.disabled,jsx$1(FileUploader,{element:at,uploadClient:tt.uploadClient,...rt},at.id)}case"linkButton":{const at=nt.element.linkButton;return rt.disabled=rt.disabled||at.disabled,jsx$1(LinkButton,{element:at,...rt})}case"multiselect":{const at=nt.element.multiselect;return rt.disabled=rt.disabled||at.disabled,jsx$1(Multiselect,{element:at,...rt},at.id)}case"numberInput":{const at=nt.element.numberInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(NumberInput,{element:at,...rt},at.id)}case"plotlyChart":{const at=nt.element.plotlyChart;return jsx$1(PlotlyChart,{element:at,...rt},at.id)}case"radio":{const at=nt.element.radio;return rt.disabled=rt.disabled||at.disabled,jsx$1(Radio,{element:at,...rt},at.id)}case"selectbox":{const at=nt.element.selectbox;return rt.disabled=rt.disabled||at.disabled,jsx$1(Selectbox$1,{element:at,...rt},at.id)}case"slider":{const at=nt.element.slider;return rt.disabled=rt.disabled||at.disabled,jsx$1(Slider$1,{element:at,...rt},at.id)}case"textArea":{const at=nt.element.textArea;return rt.disabled=rt.disabled||at.disabled,jsx$1(TextArea,{element:at,...rt},at.id)}case"textInput":{const at=nt.element.textInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(TextInput,{element:at,...rt},at.id)}case"timeInput":{const at=nt.element.timeInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(TimeInput,{element:at,...rt},at.id)}default:throw new Error(`Unrecognized Element type ${nt.element.type}`)}},ElementNodeRenderer=tt=>{const{isFullScreen:nt,fragmentIdsThisRun:et}=React$1.useContext(LibContext),{node:rt,width:ot}=tt,at=rt.element.type||"",st=shouldComponentBeEnabled(at,tt.scriptRunState),ut=isComponentStale(st,rt,tt.scriptRunState,tt.scriptRunId,et),ct=getElementId(rt.element),pt=getKeyFromId(ct);return jsx$1(Maybe,{enable:st,children:jsx$1(StyledElementContainer,{className:classNames("stElementContainer","element-container",convertKeyToClassName(pt)),"data-testid":"stElementContainer","data-stale":ut,isStale:ut&&!nt,width:ot,elementType:at,children:jsx$1(ErrorBoundary,{width:ot,children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...tt,isStale:ut})})})})})},BlockNodeRenderer=tt=>{const{node:nt}=tt,{fragmentIdsThisRun:et}=reactExports.useContext(LibContext);if(nt.isEmpty&&!nt.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const rt=shouldComponentBeEnabled("",tt.scriptRunState),ot=isComponentStale(rt,nt,tt.scriptRunState,tt.scriptRunId,et),at={...tt,node:nt},st=tt.disableFullscreenMode||notNullOrUndefined(nt.deltaBlock.dialog)||notNullOrUndefined(nt.deltaBlock.popover),ut=jsx$1(LayoutBlock,{...at,disableFullscreenMode:st});if(nt.deltaBlock.dialog)return jsx$1(DialogWithProvider,{element:nt.deltaBlock.dialog,deltaMsgReceivedAt:nt.deltaMsgReceivedAt,children:ut});if(nt.deltaBlock.expandable)return jsx$1(Expander,{empty:nt.isEmpty,isStale:ot,element:nt.deltaBlock.expandable,children:ut});if(nt.deltaBlock.popover)return jsx$1(Popover,{empty:nt.isEmpty,element:nt.deltaBlock.popover,width:tt.width,children:ut});if(nt.deltaBlock.type==="form"){const{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,border:ft}=nt.deltaBlock.form,bt=tt.formsData.submitButtons.get(ct),ht=bt!==void 0&&bt.length>0;return jsx$1(Form,{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,width:tt.width,hasSubmitButton:ht,scriptRunState:tt.scriptRunState,widgetMgr:tt.widgetMgr,border:ft,children:ut})}if(nt.deltaBlock.chatMessage)return jsx$1(ChatMessage,{element:nt.deltaBlock.chatMessage,endpoints:tt.endpoints,children:ut});if(nt.deltaBlock.column)return jsx$1(StyledColumn,{weight:nt.deltaBlock.column.weight??0,gap:nt.deltaBlock.column.gap??"",verticalAlignment:nt.deltaBlock.column.verticalAlignment??void 0,showBorder:nt.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:ut});if(nt.deltaBlock.tabContainer){const pt={...at,isStale:ot,renderTabContent:dt=>jsx$1(VerticalBlock,{...dt})};return jsx$1(Tabs,{...pt})}return ut},ChildRenderer=tt=>{const{libConfig:nt}=reactExports.useContext(LibContext);assignDividerColor(tt.node,useTheme());const et=new Set;return jsx$1(Fragment,{children:tt.node.children&&tt.node.children.map((rt,ot)=>{const at=nt.disableFullscreenMode||tt.disableFullscreenMode;if(rt instanceof ElementNode){const st={...tt,disableFullscreenMode:at,node:rt},ut=getElementId(rt.element)||ot.toString();return et.has(ut)?null:(et.add(ut),jsx$1(ElementNodeRenderer,{...st},ut))}if(rt instanceof BlockNode){const st={...tt,disableFullscreenMode:at,node:rt};return jsx$1(BlockNodeRenderer,{...st},ot)}throw new Error(`Unrecognized AppNode: ${rt}`)})})};function ScrollToBottomVerticalBlockWrapper(tt){const{border:nt,height:et,children:rt}=tt,ot=useScrollToBottom();return jsx$1(StyledVerticalBlockBorderWrapper,{border:nt,height:et,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"scroll-to-bottom",ref:ot,children:rt})}const VerticalBlock=tt=>{var ft,bt;const nt=reactExports.useRef(null),[et,rt]=React$1.useState(-1),ot=reactExports.useMemo(()=>new ResizeObserver(([ht])=>{window.requestAnimationFrame(()=>{rt(ht.target.getBoundingClientRect().width||-1)})}),[rt]),at=((ft=tt.node.deltaBlock.vertical)==null?void 0:ft.border)??!1,st=((bt=tt.node.deltaBlock.vertical)==null?void 0:bt.height)||void 0,ut=st&&tt.node.children.find(ht=>ht instanceof BlockNode&&ht.deltaBlock.type==="chatMessage")!==void 0;reactExports.useEffect(()=>(nt.current&&ot.observe(nt.current),()=>{ot.disconnect()}),[ot,ut]);const ct=ut?ScrollToBottomVerticalBlockWrapper:StyledVerticalBlockBorderWrapper,pt={...tt,width:et},dt=getKeyFromId(tt.node.deltaBlock.id);return jsx$1(ct,{border:at,height:st,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"normal",children:jsx$1(StyledVerticalBlockWrapper,{ref:nt,children:jsx$1(StyledVerticalBlock,{width:et,className:classNames("stVerticalBlock",convertKeyToClassName(dt)),"data-testid":"stVerticalBlock",children:jsx$1(ChildRenderer,{...pt})})})})},HorizontalBlock=tt=>{var et;const nt=((et=tt.node.deltaBlock.horizontal)==null?void 0:et.gap)??"";return jsx$1(StyledHorizontalBlock,{gap:nt,className:"stHorizontalBlock","data-testid":"stHorizontalBlock",children:jsx$1(ChildRenderer,{...tt})})};function LayoutBlock(tt){return tt.node.deltaBlock.horizontal?jsx$1(HorizontalBlock,{...tt}):jsx$1(VerticalBlock,{...tt})}const StyledDataFrameOverlay=newStyled("div",{target:"e1cp3dxa1"})(({theme:tt})=>({position:"fixed",top:0,left:0,zIndex:tt.zIndices.tablePortal,lineHeight:"100%"})),PortalContext=React$1.createContext(null),PortalProvider=({children:tt})=>{const nt=reactExports.useRef(null),et=reactExports.useCallback(()=>nt.current,[]);return jsxs(PortalContext.Provider,{value:et,children:[tt,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:nt})]})};function ThemeProvider({theme:tt,baseuiTheme:nt,children:et}){return jsx$1(ThemeProvider$1,{theme:nt||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:tt,children:et})})}function toCodePoint(tt,nt){const et=[];let rt=0,ot=0,at=0;for(;at<tt.length;)rt=tt.charCodeAt(at++),ot?(et.push((65536+(ot-55296<<10)+(rt-56320)).toString(16)),ot=0):55296<=rt&&rt<=56319?ot=rt:et.push(rt.toString(16));return et.join("-")}const UFE0Fg=/\uFE0F/g,U200D="‍";function grabTheRightIcon(tt){return toCodePoint(tt.indexOf(U200D)<0?tt.replace(UFE0Fg,""):tt)}function iconToUrl(tt){const nt=/^:(.+)\/(.+):$/,et=tt.match(nt);return et===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${et[2]}/default/24px.svg`}function handleFavicon(tt,nt,et){const rt=extractEmoji(tt);let ot;rt&&!tt.startsWith(":material")?ot=`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/${grabTheRightIcon(rt)}.png`:tt.startsWith(":material")?ot=iconToUrl(tt):ot=et.buildMediaURL(tt),overwriteFavicon(ot),nt({type:"SET_PAGE_FAVICON",favicon:ot})}function overwriteFavicon(tt){const nt=document.querySelector("link[rel='shortcut icon']");nt&&(nt.href=tt)}function extractEmoji(tt){const nt=tt.replace("-","_");return nodeEmoji$1.hasEmoji(nodeEmoji$1.get(nt))?nodeEmoji$1.get(nt):nodeEmoji$1.hasEmoji(tt)?tt:""}var lib$2={},flattenNames$1={},baseFor$1=_baseFor,keys$2=keys_1;function baseForOwn$4(tt,nt){return tt&&baseFor$1(tt,nt,keys$2)}var _baseForOwn=baseForOwn$4,identity$3=identity_1;function castFunction$2(tt){return typeof tt=="function"?tt:identity$3}var _castFunction=castFunction$2,baseForOwn$3=_baseForOwn,castFunction$1=_castFunction;function forOwn(tt,nt){return tt&&baseForOwn$3(tt,castFunction$1(nt))}var forOwn_1=forOwn,HASH_UNDEFINED$3="__lodash_hash_undefined__";function setCacheAdd$2(tt){return this.__data__.set(tt,HASH_UNDEFINED$3),this}var _setCacheAdd=setCacheAdd$2;function setCacheHas$2(tt){return this.__data__.has(tt)}var _setCacheHas=setCacheHas$2,MapCache$1=_MapCache,setCacheAdd$1=_setCacheAdd,setCacheHas$1=_setCacheHas;function SetCache$3(tt){var nt=-1,et=tt==null?0:tt.length;for(this.__data__=new MapCache$1;++nt<et;)this.add(tt[nt])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd$1;SetCache$3.prototype.has=setCacheHas$1;var _SetCache=SetCache$3;function arraySome$2(tt,nt){for(var et=-1,rt=tt==null?0:tt.length;++et<rt;)if(nt(tt[et],et,tt))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$3(tt,nt){return tt.has(nt)}var _cacheHas=cacheHas$3,SetCache$2=_SetCache,arraySome$1=_arraySome,cacheHas$2=_cacheHas,COMPARE_PARTIAL_FLAG$b=1,COMPARE_UNORDERED_FLAG$7=2;function equalArrays$3(tt,nt,et,rt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$b,ut=tt.length,ct=nt.length;if(ut!=ct&&!(st&&ct>ut))return!1;var pt=at.get(tt),dt=at.get(nt);if(pt&&dt)return pt==nt&&dt==tt;var ft=-1,bt=!0,ht=et&COMPARE_UNORDERED_FLAG$7?new SetCache$2:void 0;for(at.set(tt,nt),at.set(nt,tt);++ft<ut;){var Mt=tt[ft],mt=nt[ft];if(rt)var Ot=st?rt(mt,Mt,ft,nt,tt,at):rt(Mt,mt,ft,tt,nt,at);if(Ot!==void 0){if(Ot)continue;bt=!1;break}if(ht){if(!arraySome$1(nt,function(zt,yt){if(!cacheHas$2(ht,yt)&&(Mt===zt||ot(Mt,zt,et,rt,at)))return ht.push(yt)})){bt=!1;break}}else if(!(Mt===mt||ot(Mt,mt,et,rt,at))){bt=!1;break}}return at.delete(tt),at.delete(nt),bt}var _equalArrays=equalArrays$3,Symbol$2=_Symbol,Uint8Array$2=_Uint8Array,eq$1=eq_1,equalArrays$2=_equalArrays,mapToArray$1=_mapToArray,setToArray$1=_setToArray,COMPARE_PARTIAL_FLAG$a=1,COMPARE_UNORDERED_FLAG$6=2,boolTag$2="[object Boolean]",dateTag$2="[object Date]",errorTag$2="[object Error]",mapTag$3="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$3="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$3="[object DataView]",symbolProto$2=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf$1=symbolProto$2?symbolProto$2.valueOf:void 0;function equalByTag$2(tt,nt,et,rt,ot,at,st){switch(et){case dataViewTag$3:if(tt.byteLength!=nt.byteLength||tt.byteOffset!=nt.byteOffset)return!1;tt=tt.buffer,nt=nt.buffer;case arrayBufferTag$2:return!(tt.byteLength!=nt.byteLength||!at(new Uint8Array$2(tt),new Uint8Array$2(nt)));case boolTag$2:case dateTag$2:case numberTag$2:return eq$1(+tt,+nt);case errorTag$2:return tt.name==nt.name&&tt.message==nt.message;case regexpTag$2:case stringTag$2:return tt==nt+"";case mapTag$3:var ut=mapToArray$1;case setTag$3:var ct=rt&COMPARE_PARTIAL_FLAG$a;if(ut||(ut=setToArray$1),tt.size!=nt.size&&!ct)return!1;var pt=st.get(tt);if(pt)return pt==nt;rt|=COMPARE_UNORDERED_FLAG$6,st.set(tt,nt);var dt=equalArrays$2(ut(tt),ut(nt),rt,ot,at,st);return st.delete(tt),dt;case symbolTag$2:if(symbolValueOf$1)return symbolValueOf$1.call(tt)==symbolValueOf$1.call(nt)}return!1}var _equalByTag=equalByTag$2,getAllKeys$1=_getAllKeys,COMPARE_PARTIAL_FLAG$9=1,objectProto$h=Object.prototype,hasOwnProperty$f=objectProto$h.hasOwnProperty;function equalObjects$2(tt,nt,et,rt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$9,ut=getAllKeys$1(tt),ct=ut.length,pt=getAllKeys$1(nt),dt=pt.length;if(ct!=dt&&!st)return!1;for(var ft=ct;ft--;){var bt=ut[ft];if(!(st?bt in nt:hasOwnProperty$f.call(nt,bt)))return!1}var ht=at.get(tt),Mt=at.get(nt);if(ht&&Mt)return ht==nt&&Mt==tt;var mt=!0;at.set(tt,nt),at.set(nt,tt);for(var Ot=st;++ft<ct;){bt=ut[ft];var zt=tt[bt],yt=nt[bt];if(rt)var vt=st?rt(yt,zt,bt,nt,tt,at):rt(zt,yt,bt,tt,nt,at);if(!(vt===void 0?zt===yt||ot(zt,yt,et,rt,at):vt)){mt=!1;break}Ot||(Ot=bt=="constructor")}if(mt&&!Ot){var At=tt.constructor,St=nt.constructor;At!=St&&"constructor"in tt&&"constructor"in nt&&!(typeof At=="function"&&At instanceof At&&typeof St=="function"&&St instanceof St)&&(mt=!1)}return at.delete(tt),at.delete(nt),mt}var _equalObjects=equalObjects$2,Stack$2=_Stack,equalArrays$1=_equalArrays,equalByTag$1=_equalByTag,equalObjects$1=_equalObjects,getTag$1=_getTag,isArray$7=isArray_1,isBuffer$2=isBufferExports,isTypedArray$2=isTypedArray_1,COMPARE_PARTIAL_FLAG$8=1,argsTag$3="[object Arguments]",arrayTag$2="[object Array]",objectTag$4="[object Object]",objectProto$g=Object.prototype,hasOwnProperty$e=objectProto$g.hasOwnProperty;function baseIsEqualDeep$2(tt,nt,et,rt,ot,at){var st=isArray$7(tt),ut=isArray$7(nt),ct=st?arrayTag$2:getTag$1(tt),pt=ut?arrayTag$2:getTag$1(nt);ct=ct==argsTag$3?objectTag$4:ct,pt=pt==argsTag$3?objectTag$4:pt;var dt=ct==objectTag$4,ft=pt==objectTag$4,bt=ct==pt;if(bt&&isBuffer$2(tt)){if(!isBuffer$2(nt))return!1;st=!0,dt=!1}if(bt&&!dt)return at||(at=new Stack$2),st||isTypedArray$2(tt)?equalArrays$1(tt,nt,et,rt,ot,at):equalByTag$1(tt,nt,ct,et,rt,ot,at);if(!(et&COMPARE_PARTIAL_FLAG$8)){var ht=dt&&hasOwnProperty$e.call(tt,"__wrapped__"),Mt=ft&&hasOwnProperty$e.call(nt,"__wrapped__");if(ht||Mt){var mt=ht?tt.value():tt,Ot=Mt?nt.value():nt;return at||(at=new Stack$2),ot(mt,Ot,et,rt,at)}}return bt?(at||(at=new Stack$2),equalObjects$1(tt,nt,et,rt,ot,at)):!1}var _baseIsEqualDeep=baseIsEqualDeep$2,baseIsEqualDeep$1=_baseIsEqualDeep,isObjectLike$1=isObjectLike_1;function baseIsEqual$4(tt,nt,et,rt,ot){return tt===nt?!0:tt==null||nt==null||!isObjectLike$1(tt)&&!isObjectLike$1(nt)?tt!==tt&&nt!==nt:baseIsEqualDeep$1(tt,nt,et,rt,baseIsEqual$4,ot)}var _baseIsEqual=baseIsEqual$4,Stack$1=_Stack,baseIsEqual$3=_baseIsEqual,COMPARE_PARTIAL_FLAG$7=1,COMPARE_UNORDERED_FLAG$5=2;function baseIsMatch$2(tt,nt,et,rt){var ot=et.length,at=ot,st=!rt;if(tt==null)return!at;for(tt=Object(tt);ot--;){var ut=et[ot];if(st&&ut[2]?ut[1]!==tt[ut[0]]:!(ut[0]in tt))return!1}for(;++ot<at;){ut=et[ot];var ct=ut[0],pt=tt[ct],dt=ut[1];if(st&&ut[2]){if(pt===void 0&&!(ct in tt))return!1}else{var ft=new Stack$1;if(rt)var bt=rt(pt,dt,ct,tt,nt,ft);if(!(bt===void 0?baseIsEqual$3(dt,pt,COMPARE_PARTIAL_FLAG$7|COMPARE_UNORDERED_FLAG$5,rt,ft):bt))return!1}}return!0}var _baseIsMatch=baseIsMatch$2,isObject$3=isObject_1;function isStrictComparable$3(tt){return tt===tt&&!isObject$3(tt)}var _isStrictComparable=isStrictComparable$3,isStrictComparable$2=_isStrictComparable,keys$1=keys_1;function getMatchData$2(tt){for(var nt=keys$1(tt),et=nt.length;et--;){var rt=nt[et],ot=tt[rt];nt[et]=[rt,ot,isStrictComparable$2(ot)]}return nt}var _getMatchData=getMatchData$2;function matchesStrictComparable$3(tt,nt){return function(et){return et==null?!1:et[tt]===nt&&(nt!==void 0||tt in Object(et))}}var _matchesStrictComparable=matchesStrictComparable$3,baseIsMatch$1=_baseIsMatch,getMatchData$1=_getMatchData,matchesStrictComparable$2=_matchesStrictComparable;function baseMatches$2(tt){var nt=getMatchData$1(tt);return nt.length==1&&nt[0][2]?matchesStrictComparable$2(nt[0][0],nt[0][1]):function(et){return et===tt||baseIsMatch$1(et,tt,nt)}}var _baseMatches=baseMatches$2;function baseHasIn$2(tt,nt){return tt!=null&&nt in Object(tt)}var _baseHasIn=baseHasIn$2,castPath$3=_castPath,isArguments$1=isArguments_1,isArray$6=isArray_1,isIndex$2=_isIndex,isLength$1=isLength_1,toKey$4=_toKey;function hasPath$2(tt,nt,et){nt=castPath$3(nt,tt);for(var rt=-1,ot=nt.length,at=!1;++rt<ot;){var st=toKey$4(nt[rt]);if(!(at=tt!=null&&et(tt,st)))break;tt=tt[st]}return at||++rt!=ot?at:(ot=tt==null?0:tt.length,!!ot&&isLength$1(ot)&&isIndex$2(st,ot)&&(isArray$6(tt)||isArguments$1(tt)))}var _hasPath=hasPath$2,baseHasIn$1=_baseHasIn,hasPath$1=_hasPath;function hasIn$3(tt,nt){return tt!=null&&hasPath$1(tt,nt,baseHasIn$1)}var hasIn_1=hasIn$3,baseIsEqual$2=_baseIsEqual,get$2=get_1,hasIn$2=hasIn_1,isKey$2=_isKey,isStrictComparable$1=_isStrictComparable,matchesStrictComparable$1=_matchesStrictComparable,toKey$3=_toKey,COMPARE_PARTIAL_FLAG$6=1,COMPARE_UNORDERED_FLAG$4=2;function baseMatchesProperty$2(tt,nt){return isKey$2(tt)&&isStrictComparable$1(nt)?matchesStrictComparable$1(toKey$3(tt),nt):function(et){var rt=get$2(et,tt);return rt===void 0&&rt===nt?hasIn$2(et,tt):baseIsEqual$2(nt,rt,COMPARE_PARTIAL_FLAG$6|COMPARE_UNORDERED_FLAG$4)}}var _baseMatchesProperty=baseMatchesProperty$2,baseGet$3=_baseGet;function basePropertyDeep$2(tt){return function(nt){return baseGet$3(nt,tt)}}var _basePropertyDeep=basePropertyDeep$2,baseProperty$1=_baseProperty,basePropertyDeep$1=_basePropertyDeep,isKey$1=_isKey,toKey$2=_toKey;function property$2(tt){return isKey$1(tt)?baseProperty$1(toKey$2(tt)):basePropertyDeep$1(tt)}var property_1=property$2,baseMatches$1=_baseMatches,baseMatchesProperty$1=_baseMatchesProperty,identity$2=identity_1,isArray$5=isArray_1,property$1=property_1;function baseIteratee$5(tt){return typeof tt=="function"?tt:tt==null?identity$2:typeof tt=="object"?isArray$5(tt)?baseMatchesProperty$1(tt[0],tt[1]):baseMatches$1(tt):property$1(tt)}var _baseIteratee=baseIteratee$5,isArrayLike$2=isArrayLike_1;function createBaseEach$2(tt,nt){return function(et,rt){if(et==null)return et;if(!isArrayLike$2(et))return tt(et,rt);for(var ot=et.length,at=nt?ot:-1,st=Object(et);(nt?at--:++at<ot)&&rt(st[at],at,st)!==!1;);return et}}var _createBaseEach=createBaseEach$2,baseForOwn$2=_baseForOwn,createBaseEach$1=_createBaseEach,baseEach$3=createBaseEach$1(baseForOwn$2),_baseEach=baseEach$3,baseEach$2=_baseEach,isArrayLike$1=isArrayLike_1;function baseMap$3(tt,nt){var et=-1,rt=isArrayLike$1(tt)?Array(tt.length):[];return baseEach$2(tt,function(ot,at,st){rt[++et]=nt(ot,at,st)}),rt}var _baseMap=baseMap$3,arrayMap$3=_arrayMap,baseIteratee$4=_baseIteratee,baseMap$2=_baseMap,isArray$4=isArray_1;function map$1(tt,nt){var et=isArray$4(tt)?arrayMap$3:baseMap$2;return et(tt,baseIteratee$4(nt))}var map_1=map$1;Object.defineProperty(flattenNames$1,"__esModule",{value:!0});flattenNames$1.flattenNames=void 0;var _isString2=isString_1,_isString3=_interopRequireDefault$7(_isString2),_forOwn2$2=forOwn_1,_forOwn3$2=_interopRequireDefault$7(_forOwn2$2),_isPlainObject2=isPlainObject_1,_isPlainObject3=_interopRequireDefault$7(_isPlainObject2),_map2=map_1,_map3=_interopRequireDefault$7(_map2);function _interopRequireDefault$7(tt){return tt&&tt.__esModule?tt:{default:tt}}var flattenNames=flattenNames$1.flattenNames=function tt(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],et=[];return(0,_map3.default)(nt,function(rt){Array.isArray(rt)?tt(rt).map(function(ot){return et.push(ot)}):(0,_isPlainObject3.default)(rt)?(0,_forOwn3$2.default)(rt,function(ot,at){ot===!0&&et.push(at),et.push(at+"-"+ot)}):(0,_isString3.default)(rt)&&et.push(rt)}),et};flattenNames$1.default=flattenNames;var mergeClasses$1={};Object.defineProperty(mergeClasses$1,"__esModule",{value:!0});mergeClasses$1.mergeClasses=void 0;var _forOwn2$1=forOwn_1,_forOwn3$1=_interopRequireDefault$6(_forOwn2$1),_cloneDeep2=cloneDeep_1,_cloneDeep3=_interopRequireDefault$6(_cloneDeep2),_extends$w=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function _interopRequireDefault$6(tt){return tt&&tt.__esModule?tt:{default:tt}}var mergeClasses=mergeClasses$1.mergeClasses=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],rt=nt.default&&(0,_cloneDeep3.default)(nt.default)||{};return et.map(function(ot){var at=nt[ot];return at&&(0,_forOwn3$1.default)(at,function(st,ut){rt[ut]||(rt[ut]={}),rt[ut]=_extends$w({},rt[ut],at[ut])}),ot}),rt};mergeClasses$1.default=mergeClasses;var autoprefix$1={};Object.defineProperty(autoprefix$1,"__esModule",{value:!0});autoprefix$1.autoprefix=void 0;var _forOwn2=forOwn_1,_forOwn3=_interopRequireDefault$5(_forOwn2),_extends$v=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function _interopRequireDefault$5(tt){return tt&&tt.__esModule?tt:{default:tt}}var transforms={borderRadius:function tt(nt){return{msBorderRadius:nt,MozBorderRadius:nt,OBorderRadius:nt,WebkitBorderRadius:nt,borderRadius:nt}},boxShadow:function tt(nt){return{msBoxShadow:nt,MozBoxShadow:nt,OBoxShadow:nt,WebkitBoxShadow:nt,boxShadow:nt}},userSelect:function tt(nt){return{WebkitTouchCallout:nt,KhtmlUserSelect:nt,MozUserSelect:nt,msUserSelect:nt,WebkitUserSelect:nt,userSelect:nt}},flex:function tt(nt){return{WebkitBoxFlex:nt,MozBoxFlex:nt,WebkitFlex:nt,msFlex:nt,flex:nt}},flexBasis:function tt(nt){return{WebkitFlexBasis:nt,flexBasis:nt}},justifyContent:function tt(nt){return{WebkitJustifyContent:nt,justifyContent:nt}},transition:function tt(nt){return{msTransition:nt,MozTransition:nt,OTransition:nt,WebkitTransition:nt,transition:nt}},transform:function tt(nt){return{msTransform:nt,MozTransform:nt,OTransform:nt,WebkitTransform:nt,transform:nt}},absolute:function tt(nt){var et=nt&&nt.split(" ");return{position:"absolute",top:et&&et[0],right:et&&et[1],bottom:et&&et[2],left:et&&et[3]}},extend:function tt(nt,et){var rt=et[nt];return rt||{extend:nt}}},autoprefix=autoprefix$1.autoprefix=function tt(nt){var et={};return(0,_forOwn3.default)(nt,function(rt,ot){var at={};(0,_forOwn3.default)(rt,function(st,ut){var ct=transforms[ut];ct?at=_extends$v({},at,ct(st)):at[ut]=st}),et[ot]=at}),et};autoprefix$1.default=autoprefix;var hover$1={};Object.defineProperty(hover$1,"__esModule",{value:!0});hover$1.hover=void 0;var _extends$u=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_react$3=reactExports,_react2$3=_interopRequireDefault$4(_react$3);function _interopRequireDefault$4(tt){return tt&&tt.__esModule?tt:{default:tt}}function _classCallCheck$f(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$f(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$f(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var hover=hover$1.hover=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(rt){_inherits$f(ot,rt);function ot(){var at,st,ut,ct;_classCallCheck$f(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$f(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={hover:!1},ut.handleMouseOver=function(){return ut.setState({hover:!0})},ut.handleMouseOut=function(){return ut.setState({hover:!1})},ut.render=function(){return _react2$3.default.createElement(et,{onMouseOver:ut.handleMouseOver,onMouseOut:ut.handleMouseOut},_react2$3.default.createElement(nt,_extends$u({},ut.props,ut.state)))},st),_possibleConstructorReturn$f(ut,ct)}return ot}(_react2$3.default.Component)};hover$1.default=hover;var active$1={};Object.defineProperty(active$1,"__esModule",{value:!0});active$1.active=void 0;var _extends$t=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_react$2=reactExports,_react2$2=_interopRequireDefault$3(_react$2);function _interopRequireDefault$3(tt){return tt&&tt.__esModule?tt:{default:tt}}function _classCallCheck$e(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$e(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$e(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var active=active$1.active=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(rt){_inherits$e(ot,rt);function ot(){var at,st,ut,ct;_classCallCheck$e(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$e(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={active:!1},ut.handleMouseDown=function(){return ut.setState({active:!0})},ut.handleMouseUp=function(){return ut.setState({active:!1})},ut.render=function(){return _react2$2.default.createElement(et,{onMouseDown:ut.handleMouseDown,onMouseUp:ut.handleMouseUp},_react2$2.default.createElement(nt,_extends$t({},ut.props,ut.state)))},st),_possibleConstructorReturn$e(ut,ct)}return ot}(_react2$2.default.Component)};active$1.default=active;var loop={};Object.defineProperty(loop,"__esModule",{value:!0});var loopable=function tt(nt,et){var rt={},ot=function(st){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;rt[st]=ut};return nt===0&&ot("first-child"),nt===et-1&&ot("last-child"),(nt===0||nt%2===0)&&ot("even"),Math.abs(nt%2)===1&&ot("odd"),ot("nth-child",nt),rt};loop.default=loopable;Object.defineProperty(lib$2,"__esModule",{value:!0});lib$2.ReactCSS=lib$2.loop=lib$2.handleActive=handleHover=lib$2.handleHover=lib$2.hover=void 0;var _flattenNames=flattenNames$1,_flattenNames2=_interopRequireDefault$2(_flattenNames),_mergeClasses=mergeClasses$1,_mergeClasses2=_interopRequireDefault$2(_mergeClasses),_autoprefix=autoprefix$1,_autoprefix2=_interopRequireDefault$2(_autoprefix),_hover2=hover$1,_hover3=_interopRequireDefault$2(_hover2),_active=active$1,_active2=_interopRequireDefault$2(_active),_loop2=loop,_loop3=_interopRequireDefault$2(_loop2);function _interopRequireDefault$2(tt){return tt&&tt.__esModule?tt:{default:tt}}lib$2.hover=_hover3.default;var handleHover=lib$2.handleHover=_hover3.default;lib$2.handleActive=_active2.default;lib$2.loop=_loop3.default;var ReactCSS=lib$2.ReactCSS=function tt(nt){for(var et=arguments.length,rt=Array(et>1?et-1:0),ot=1;ot<et;ot++)rt[ot-1]=arguments[ot];var at=(0,_flattenNames2.default)(rt),st=(0,_mergeClasses2.default)(nt,at);return(0,_autoprefix2.default)(st)},_default$2=lib$2.default=ReactCSS,calculateChange$2=function tt(nt,et,rt,ot,at){var st=at.clientWidth,ut=at.clientHeight,ct=typeof nt.pageX=="number"?nt.pageX:nt.touches[0].pageX,pt=typeof nt.pageY=="number"?nt.pageY:nt.touches[0].pageY,dt=ct-(at.getBoundingClientRect().left+window.pageXOffset),ft=pt-(at.getBoundingClientRect().top+window.pageYOffset);if(rt==="vertical"){var bt=void 0;if(ft<0?bt=0:ft>ut?bt=1:bt=Math.round(ft*100/ut)/100,et.a!==bt)return{h:et.h,s:et.s,l:et.l,a:bt,source:"rgb"}}else{var ht=void 0;if(dt<0?ht=0:dt>st?ht=1:ht=Math.round(dt*100/st)/100,ot!==ht)return{h:et.h,s:et.s,l:et.l,a:ht,source:"rgb"}}return null},checkboardCache={},render=function tt(nt,et,rt,ot){if(typeof document>"u"&&!ot)return null;var at=ot?new ot:document.createElement("canvas");at.width=rt*2,at.height=rt*2;var st=at.getContext("2d");return st?(st.fillStyle=nt,st.fillRect(0,0,at.width,at.height),st.fillStyle=et,st.fillRect(0,0,rt,rt),st.translate(rt,rt),st.fillRect(0,0,rt,rt),at.toDataURL()):null},get$1=function tt(nt,et,rt,ot){var at=nt+"-"+et+"-"+rt+(ot?"-server":"");if(checkboardCache[at])return checkboardCache[at];var st=render(nt,et,rt,ot);return checkboardCache[at]=st,st},_extends$s=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},Checkboard=function tt(nt){var et=nt.white,rt=nt.grey,ot=nt.size,at=nt.renderers,st=nt.borderRadius,ut=nt.boxShadow,ct=nt.children,pt=_default$2({default:{grid:{borderRadius:st,boxShadow:ut,absolute:"0px 0px 0px 0px",background:"url("+get$1(et,rt,ot,at.canvas)+") center left"}}});return reactExports.isValidElement(ct)?React$1.cloneElement(ct,_extends$s({},ct.props,{style:_extends$s({},ct.props.style,pt.grid)})):React$1.createElement("div",{style:pt.grid})};Checkboard.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var _extends$r=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_createClass$d=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}();function _classCallCheck$d(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$d(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$d(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var Alpha=function(tt){_inherits$d(nt,tt);function nt(){var et,rt,ot,at;_classCallCheck$d(this,nt);for(var st=arguments.length,ut=Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];return at=(rt=(ot=_possibleConstructorReturn$d(this,(et=nt.__proto__||Object.getPrototypeOf(nt)).call.apply(et,[this].concat(ut))),ot),ot.handleChange=function(pt){var dt=calculateChange$2(pt,ot.props.hsl,ot.props.direction,ot.props.a,ot.container);dt&&typeof ot.props.onChange=="function"&&ot.props.onChange(dt,pt)},ot.handleMouseDown=function(pt){ot.handleChange(pt),window.addEventListener("mousemove",ot.handleChange),window.addEventListener("mouseup",ot.handleMouseUp)},ot.handleMouseUp=function(){ot.unbindEventListeners()},ot.unbindEventListeners=function(){window.removeEventListener("mousemove",ot.handleChange),window.removeEventListener("mouseup",ot.handleMouseUp)},rt),_possibleConstructorReturn$d(ot,at)}return _createClass$d(nt,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var rt=this,ot=this.props.rgb,at=_default$2({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+ot.r+","+ot.g+","+ot.b+`, 0) 0%,
684
684
  rgba(`+ot.r+","+ot.g+","+ot.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:ot.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+ot.r+","+ot.g+","+ot.b+`, 0) 0%,
685
685
  rgba(`+ot.r+","+ot.g+","+ot.b+", 1) 100%)"},pointer:{left:0,top:ot.a*100+"%"}},overwrite:_extends$r({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return React$1.createElement("div",{style:at.alpha},React$1.createElement("div",{style:at.checkboard},React$1.createElement(Checkboard,{renderers:this.props.renderers})),React$1.createElement("div",{style:at.gradient}),React$1.createElement("div",{style:at.container,ref:function(ut){return rt.container=ut},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},React$1.createElement("div",{style:at.pointer},this.props.pointer?React$1.createElement(this.props.pointer,this.props):React$1.createElement("div",{style:at.slider}))))}}]),nt}(reactExports.PureComponent||reactExports.Component),_createClass$c=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}();function _defineProperty$d(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}function _classCallCheck$c(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$c(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$c(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var DEFAULT_ARROW_OFFSET=1,UP_KEY_CODE=38,DOWN_KEY_CODE=40,VALID_KEY_CODES=[UP_KEY_CODE,DOWN_KEY_CODE],isValidKeyCode=function tt(nt){return VALID_KEY_CODES.indexOf(nt)>-1},getNumberValue=function tt(nt){return Number(String(nt).replace(/%/g,""))},idCounter=1,EditableInput=function(tt){_inherits$c(nt,tt);function nt(et){_classCallCheck$c(this,nt);var rt=_possibleConstructorReturn$c(this,(nt.__proto__||Object.getPrototypeOf(nt)).call(this));return rt.handleBlur=function(){rt.state.blurValue&&rt.setState({value:rt.state.blurValue,blurValue:null})},rt.handleChange=function(ot){rt.setUpdatedValue(ot.target.value,ot)},rt.handleKeyDown=function(ot){var at=getNumberValue(ot.target.value);if(!isNaN(at)&&isValidKeyCode(ot.keyCode)){var st=rt.getArrowOffset(),ut=ot.keyCode===UP_KEY_CODE?at+st:at-st;rt.setUpdatedValue(ut,ot)}},rt.handleDrag=function(ot){if(rt.props.dragLabel){var at=Math.round(rt.props.value+ot.movementX);at>=0&&at<=rt.props.dragMax&&rt.props.onChange&&rt.props.onChange(rt.getValueObjectWithLabel(at),ot)}},rt.handleMouseDown=function(ot){rt.props.dragLabel&&(ot.preventDefault(),rt.handleDrag(ot),window.addEventListener("mousemove",rt.handleDrag),window.addEventListener("mouseup",rt.handleMouseUp))},rt.handleMouseUp=function(){rt.unbindEventListeners()},rt.unbindEventListeners=function(){window.removeEventListener("mousemove",rt.handleDrag),window.removeEventListener("mouseup",rt.handleMouseUp)},rt.state={value:String(et.value).toUpperCase(),blurValue:String(et.value).toUpperCase()},rt.inputId="rc-editable-input-"+idCounter++,rt}return _createClass$c(nt,[{key:"componentDidUpdate",value:function(rt,ot){this.props.value!==this.state.value&&(rt.value!==this.props.value||ot.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(rt){return _defineProperty$d({},this.props.label,rt)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||DEFAULT_ARROW_OFFSET}},{key:"setUpdatedValue",value:function(rt,ot){var at=this.props.label?this.getValueObjectWithLabel(rt):rt;this.props.onChange&&this.props.onChange(at,ot),this.setState({value:rt})}},{key:"render",value:function(){var rt=this,ot=_default$2({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return React$1.createElement("div",{style:ot.wrap},React$1.createElement("input",{id:this.inputId,style:ot.input,ref:function(st){return rt.input=st},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?React$1.createElement("label",{htmlFor:this.inputId,style:ot.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),nt}(reactExports.PureComponent||reactExports.Component),calculateChange$1=function tt(nt,et,rt,ot){var at=ot.clientWidth,st=ot.clientHeight,ut=typeof nt.pageX=="number"?nt.pageX:nt.touches[0].pageX,ct=typeof nt.pageY=="number"?nt.pageY:nt.touches[0].pageY,pt=ut-(ot.getBoundingClientRect().left+window.pageXOffset),dt=ct-(ot.getBoundingClientRect().top+window.pageYOffset);if(et==="vertical"){var ft=void 0;if(dt<0)ft=359;else if(dt>st)ft=0;else{var bt=-(dt*100/st)+100;ft=360*bt/100}if(rt.h!==ft)return{h:ft,s:rt.s,l:rt.l,a:rt.a,source:"hsl"}}else{var ht=void 0;if(pt<0)ht=0;else if(pt>at)ht=359;else{var Mt=pt*100/at;ht=360*Mt/100}if(rt.h!==ht)return{h:ht,s:rt.s,l:rt.l,a:rt.a,source:"hsl"}}return null},_createClass$b=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}();function _classCallCheck$b(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$b(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$b(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var Hue=function(tt){_inherits$b(nt,tt);function nt(){var et,rt,ot,at;_classCallCheck$b(this,nt);for(var st=arguments.length,ut=Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];return at=(rt=(ot=_possibleConstructorReturn$b(this,(et=nt.__proto__||Object.getPrototypeOf(nt)).call.apply(et,[this].concat(ut))),ot),ot.handleChange=function(pt){var dt=calculateChange$1(pt,ot.props.direction,ot.props.hsl,ot.container);dt&&typeof ot.props.onChange=="function"&&ot.props.onChange(dt,pt)},ot.handleMouseDown=function(pt){ot.handleChange(pt),window.addEventListener("mousemove",ot.handleChange),window.addEventListener("mouseup",ot.handleMouseUp)},ot.handleMouseUp=function(){ot.unbindEventListeners()},rt),_possibleConstructorReturn$b(ot,at)}return _createClass$b(nt,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var rt=this,ot=this.props.direction,at=ot===void 0?"horizontal":ot,st=_default$2({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:at==="vertical"});return React$1.createElement("div",{style:st.hue},React$1.createElement("div",{className:"hue-"+at,style:st.container,ref:function(ct){return rt.container=ct},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},React$1.createElement("style",null,`
686
686
  .hue-horizontal {
@@ -795,4 +795,4 @@ not been pushed to GitHub. Please add it to continue.
795
795
  `):" "+renderReason(at[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+st,"ERR_NOT_SUPPORT")}return rt},adapters:knownAdapters};function throwIfCancellationRequested(tt){if(tt.cancelToken&&tt.cancelToken.throwIfRequested(),tt.signal&&tt.signal.aborted)throw new CanceledError(null,tt)}function dispatchRequest(tt){return throwIfCancellationRequested(tt),tt.headers=AxiosHeaders.from(tt.headers),tt.data=transformData.call(tt,tt.transformRequest),["post","put","patch"].indexOf(tt.method)!==-1&&tt.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(tt.adapter||defaults.adapter)(tt).then(function(rt){return throwIfCancellationRequested(tt),rt.data=transformData.call(tt,tt.transformResponse,rt),rt.headers=AxiosHeaders.from(rt.headers),rt},function(rt){return isCancel(rt)||(throwIfCancellationRequested(tt),rt&&rt.response&&(rt.response.data=transformData.call(tt,tt.transformResponse,rt.response),rt.response.headers=AxiosHeaders.from(rt.response.headers))),Promise.reject(rt)})}const VERSION="1.7.9",validators$1={};["object","boolean","number","function","string","symbol"].forEach((tt,nt)=>{validators$1[tt]=function(rt){return typeof rt===tt||"a"+(nt<1?"n ":" ")+tt}});const deprecatedWarnings={};validators$1.transitional=function tt(nt,et,rt){function ot(at,st){return"[Axios v"+VERSION+"] Transitional option '"+at+"'"+st+(rt?". "+rt:"")}return(at,st,ut)=>{if(nt===!1)throw new AxiosError(ot(st," has been removed"+(et?" in "+et:"")),AxiosError.ERR_DEPRECATED);return et&&!deprecatedWarnings[st]&&(deprecatedWarnings[st]=!0,console.warn(ot(st," has been deprecated since v"+et+" and will be removed in the near future"))),nt?nt(at,st,ut):!0}};validators$1.spelling=function tt(nt){return(et,rt)=>(console.warn(`${rt} is likely a misspelling of ${nt}`),!0)};function assertOptions(tt,nt,et){if(typeof tt!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const rt=Object.keys(tt);let ot=rt.length;for(;ot-- >0;){const at=rt[ot],st=nt[at];if(st){const ut=tt[at],ct=ut===void 0||st(ut,at,tt);if(ct!==!0)throw new AxiosError("option "+at+" must be "+ct,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(et!==!0)throw new AxiosError("Unknown option "+at,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(nt){this.defaults=nt,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(nt,et){try{return await this._request(nt,et)}catch(rt){if(rt instanceof Error){let ot={};Error.captureStackTrace?Error.captureStackTrace(ot):ot=new Error;const at=ot.stack?ot.stack.replace(/^.+\n/,""):"";try{rt.stack?at&&!String(rt.stack).endsWith(at.replace(/^.+\n.+\n/,""))&&(rt.stack+=`
796
796
  `+at):rt.stack=at}catch{}}throw rt}}_request(nt,et){typeof nt=="string"?(et=et||{},et.url=nt):et=nt||{},et=mergeConfig(this.defaults,et);const{transitional:rt,paramsSerializer:ot,headers:at}=et;rt!==void 0&&validator.assertOptions(rt,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),ot!=null&&(utils$1.isFunction(ot)?et.paramsSerializer={serialize:ot}:validator.assertOptions(ot,{encode:validators.function,serialize:validators.function},!0)),validator.assertOptions(et,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),et.method=(et.method||this.defaults.method||"get").toLowerCase();let st=at&&utils$1.merge(at.common,at[et.method]);at&&utils$1.forEach(["delete","get","head","post","put","patch","common"],Mt=>{delete at[Mt]}),et.headers=AxiosHeaders.concat(st,at);const ut=[];let ct=!0;this.interceptors.request.forEach(function(mt){typeof mt.runWhen=="function"&&mt.runWhen(et)===!1||(ct=ct&&mt.synchronous,ut.unshift(mt.fulfilled,mt.rejected))});const pt=[];this.interceptors.response.forEach(function(mt){pt.push(mt.fulfilled,mt.rejected)});let dt,ft=0,bt;if(!ct){const Mt=[dispatchRequest.bind(this),void 0];for(Mt.unshift.apply(Mt,ut),Mt.push.apply(Mt,pt),bt=Mt.length,dt=Promise.resolve(et);ft<bt;)dt=dt.then(Mt[ft++],Mt[ft++]);return dt}bt=ut.length;let ht=et;for(ft=0;ft<bt;){const Mt=ut[ft++],mt=ut[ft++];try{ht=Mt(ht)}catch(Ot){mt.call(this,Ot);break}}try{dt=dispatchRequest.call(this,ht)}catch(Mt){return Promise.reject(Mt)}for(ft=0,bt=pt.length;ft<bt;)dt=dt.then(pt[ft++],pt[ft++]);return dt}getUri(nt){nt=mergeConfig(this.defaults,nt);const et=buildFullPath(nt.baseURL,nt.url);return buildURL(et,nt.params,nt.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function tt(nt){Axios.prototype[nt]=function(et,rt){return this.request(mergeConfig(rt||{},{method:nt,url:et,data:(rt||{}).data}))}});utils$1.forEach(["post","put","patch"],function tt(nt){function et(rt){return function(at,st,ut){return this.request(mergeConfig(ut||{},{method:nt,headers:rt?{"Content-Type":"multipart/form-data"}:{},url:at,data:st}))}}Axios.prototype[nt]=et(),Axios.prototype[nt+"Form"]=et(!0)});class CancelToken{constructor(nt){if(typeof nt!="function")throw new TypeError("executor must be a function.");let et;this.promise=new Promise(function(at){et=at});const rt=this;this.promise.then(ot=>{if(!rt._listeners)return;let at=rt._listeners.length;for(;at-- >0;)rt._listeners[at](ot);rt._listeners=null}),this.promise.then=ot=>{let at;const st=new Promise(ut=>{rt.subscribe(ut),at=ut}).then(ot);return st.cancel=function(){rt.unsubscribe(at)},st},nt(function(at,st,ut){rt.reason||(rt.reason=new CanceledError(at,st,ut),et(rt.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(nt){if(this.reason){nt(this.reason);return}this._listeners?this._listeners.push(nt):this._listeners=[nt]}unsubscribe(nt){if(!this._listeners)return;const et=this._listeners.indexOf(nt);et!==-1&&this._listeners.splice(et,1)}toAbortSignal(){const nt=new AbortController,et=rt=>{nt.abort(rt)};return this.subscribe(et),nt.signal.unsubscribe=()=>this.unsubscribe(et),nt.signal}static source(){let nt;return{token:new CancelToken(function(ot){nt=ot}),cancel:nt}}}function spread(tt){return function(et){return tt.apply(null,et)}}function isAxiosError(tt){return utils$1.isObject(tt)&&tt.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([tt,nt])=>{HttpStatusCode[nt]=tt});function createInstance(tt){const nt=new Axios(tt),et=bind(Axios.prototype.request,nt);return utils$1.extend(et,Axios.prototype,nt,{allOwnKeys:!0}),utils$1.extend(et,nt,null,{allOwnKeys:!0}),et.create=function(ot){return createInstance(mergeConfig(tt,ot))},et}const axios=createInstance(defaults);axios.Axios=Axios;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function tt(nt){return Promise.all(nt)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders;axios.formToJSON=tt=>formDataToJSON(utils$1.isHTMLForm(tt)?new FormData(tt):tt);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode;axios.default=axios;const LOG="WebsocketConnection",SERVER_PING_PATH="_stcore/health",HOST_CONFIG_PATH="_stcore/host-config",WEBSOCKET_STREAM_PATH="_stcore/stream",PING_MINIMUM_RETRY_PERIOD_MS=500,PING_MAXIMUM_RETRY_PERIOD_MS=1e3*60,PING_TIMEOUT_MS=15*1e3,WEBSOCKET_TIMEOUT_MS=15*1e3,CORS_ERROR_MESSAGE_DOCUMENTATION_LINK="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS";class WebsocketConnection{constructor(nt){this.uriIndex=0,this.lastDispatchedMessageIndex=-1,this.nextMessageIndex=0,this.messageQueue={},this.state=ConnectionState.INITIAL,this.args=nt,this.cache=new ForwardMsgCache(nt.endpoints),this.stepFsm("INITIALIZED")}getBaseUriParts(){if(this.state===ConnectionState.CONNECTED)return this.args.baseUriPartsList[this.uriIndex]}disconnect(){this.setFsmState(ConnectionState.DISCONNECTED_FOREVER)}setFsmState(nt,et){switch(this.state=nt,this.state){case ConnectionState.PINGING_SERVER:this.pingServer();break}switch(this.args.onConnectionStateChange(nt,et),this.state){case ConnectionState.CONNECTING:this.connectToWebSocket();break;case ConnectionState.DISCONNECTED_FOREVER:this.closeConnection();break}}stepFsm(nt,et){if(logMessage(LOG,`State: ${this.state}; Event: ${nt}`),nt==="FATAL_ERROR"&&this.state!==ConnectionState.DISCONNECTED_FOREVER){this.setFsmState(ConnectionState.DISCONNECTED_FOREVER,et);return}switch(this.state){case ConnectionState.INITIAL:if(nt==="INITIALIZED"){this.setFsmState(ConnectionState.PINGING_SERVER);return}break;case ConnectionState.CONNECTING:if(nt==="CONNECTION_SUCCEEDED"){this.setFsmState(ConnectionState.CONNECTED);return}if(nt==="CONNECTION_TIMED_OUT"||nt==="CONNECTION_ERROR"||nt==="CONNECTION_CLOSED"){this.setFsmState(ConnectionState.PINGING_SERVER);return}break;case ConnectionState.CONNECTED:if(nt==="CONNECTION_CLOSED"||nt==="CONNECTION_ERROR"){this.setFsmState(ConnectionState.PINGING_SERVER);return}break;case ConnectionState.PINGING_SERVER:if(nt==="SERVER_PING_SUCCEEDED"){this.setFsmState(ConnectionState.CONNECTING);return}break;case ConnectionState.DISCONNECTED_FOREVER:logWarning(LOG,`Discarding ${nt} while in ${ConnectionState.DISCONNECTED_FOREVER}`);return}throw new Error(`Unsupported state transition.
797
797
  State: ${this.state}
798
- Event: ${nt}`)}async pingServer(){this.uriIndex=await doInitPings(this.args.baseUriPartsList,PING_MINIMUM_RETRY_PERIOD_MS,PING_MAXIMUM_RETRY_PERIOD_MS,this.args.onRetry,this.args.onHostConfigResp),this.stepFsm("SERVER_PING_SUCCEEDED")}async getSessionTokens(){var et,rt;const nt=await this.args.claimHostAuthToken();return this.args.resetHostAuthToken(),[nt??"PLACEHOLDER_AUTH_TOKEN",...(et=this.args.sessionInfo.last)!=null&&et.sessionId?[(rt=this.args.sessionInfo.last)==null?void 0:rt.sessionId]:[]]}async connectToWebSocket(){const nt=buildWsUri(this.args.baseUriPartsList[this.uriIndex],WEBSOCKET_STREAM_PATH);if(notNullOrUndefined(this.websocket))throw new Error("Websocket already exists");const et=await this.getSessionTokens();this.websocket=new WebSocket(nt,["streamlit",...et]),this.websocket.binaryType="arraybuffer",this.setConnectionTimeout(nt);const rt=this.websocket,ot=()=>rt===this.websocket;this.websocket.addEventListener("message",at=>{ot()&&this.handleMessage(at.data).catch(st=>{const ut=`Failed to process a Websocket message (${st})`;logError(LOG,ut),this.stepFsm("FATAL_ERROR",ut)})}),this.websocket.addEventListener("open",()=>{ot()&&this.stepFsm("CONNECTION_SUCCEEDED")}),this.websocket.addEventListener("close",()=>{ot()&&(this.closeConnection(),this.stepFsm("CONNECTION_CLOSED"))}),this.websocket.addEventListener("error",()=>{ot()&&(logError(LOG,"WebSocket onerror"),this.closeConnection(),this.stepFsm("CONNECTION_ERROR"))})}setConnectionTimeout(nt){if(notNullOrUndefined(this.wsConnectionTimeoutId))throw new Error("WS timeout is already set");const et=this.websocket;this.wsConnectionTimeoutId=window.setTimeout(()=>{if(et===this.websocket&&!isNullOrUndefined$1(this.wsConnectionTimeoutId)){if(isNullOrUndefined$1(this.websocket)){this.closeConnection(),this.stepFsm("FATAL_ERROR","Null Websocket in setConnectionTimeout");return}this.websocket.readyState===0&&(this.closeConnection(),this.stepFsm("CONNECTION_TIMED_OUT"))}},WEBSOCKET_TIMEOUT_MS),logMessage(LOG,`Set WS timeout ${this.wsConnectionTimeoutId}`)}closeConnection(){this.websocket&&(this.websocket.close(),this.websocket=void 0),notNullOrUndefined(this.wsConnectionTimeoutId)&&(logMessage(LOG,`Clearing WS timeout ${this.wsConnectionTimeoutId}`),window.clearTimeout(this.wsConnectionTimeoutId),this.wsConnectionTimeoutId=void 0)}sendMessage(nt){if(!this.websocket)return;const et=BackMsg.create(nt),rt=BackMsg.encode(et).finish();this.websocket.send(rt)}incrementMessageCacheRunCount(nt){this.cache.incrementRunCount(nt)}async handleMessage(nt){const et=this.nextMessageIndex;this.nextMessageIndex+=1,PerformanceEvents.record({name:"BeginHandleMessage",messageIndex:et});const rt=new Uint8Array(nt),ot=ForwardMsg.decode(rt);for(PerformanceEvents.record({name:"DecodedMessage",messageIndex:et,messageType:ot.type,len:nt.byteLength}),this.messageQueue[et]=await this.cache.processMessagePayload(ot,rt),PerformanceEvents.record({name:"GotCachedPayload",messageIndex:et});this.lastDispatchedMessageIndex+1 in this.messageQueue;){const at=this.lastDispatchedMessageIndex+1;this.args.onMessage(this.messageQueue[at]),PerformanceEvents.record({name:"DispatchedMessage",messageIndex:at,messageType:this.messageQueue[at].type}),delete this.messageQueue[at],this.lastDispatchedMessageIndex=at}}}function doInitPings(tt,nt,et,rt,ot){const at=new Resolver;let st=0,ut=0,ct=()=>{};const pt=()=>{ut++,ut>=tt.length&&(ut=0),ct()},dt=ht=>{const Mt=Math.random()*.4-.2,mt=st===1?nt:nt*2**(st-1)*(1+Mt),Ot=Math.min(et,mt);rt(st,ht,Ot),window.setTimeout(pt,Ot)},ft=()=>{const ht=tt[ut];new URL(buildHttpUri(ht,"")).hostname==="localhost"?dt(jsx$1(StreamlitMarkdown$1,{source:"\nIs Streamlit still running? If you accidentally stopped Streamlit, just restart it in your terminal:\n\n```bash\nstreamlit run yourscript.py\n```\n ",allowHTML:!1})):dt("Connection failed with status 0.")},bt=()=>{dt(jsxs(reactExports.Fragment,{children:[jsx$1("p",{children:"Cannot connect to Streamlit (HTTP status: 403)."}),jsxs("p",{children:["If you are trying to access a Streamlit app running on another server, this could be due to the app's"," ",jsx$1("a",{href:CORS_ERROR_MESSAGE_DOCUMENTATION_LINK,children:"CORS"})," settings."]})]}))};return ct=()=>{const ht=tt[ut],Mt=buildHttpUri(ht,SERVER_PING_PATH),mt=buildHttpUri(ht,HOST_CONFIG_PATH);ut===0&&st++,Promise.all([axios.get(Mt,{timeout:PING_TIMEOUT_MS}),axios.get(mt,{timeout:PING_TIMEOUT_MS})]).then(([Ot,zt])=>{ot(zt.data),at.resolve(ut)}).catch(Ot=>{if(Ot.code==="ECONNABORTED")return dt("Connection timed out.");if(Ot.response){const{data:zt,status:yt}=Ot.response;return yt===0?ft():yt===403?bt():dt(`Connection failed with status ${yt}, and response "${zt}".`)}return Ot.request?ft():dt(Ot.message)})},ct(),at.promise}const RETRY_COUNT_FOR_WARNING=6;class ConnectionManager{constructor(nt){this.connectionState=ConnectionState.INITIAL,this.setConnectionState=(et,rt)=>{this.connectionState!==et&&(this.connectionState=et,this.props.connectionStateChanged(et)),rt&&this.props.onConnectionError(rt)},this.showRetryError=(et,rt,ot)=>{et===RETRY_COUNT_FOR_WARNING&&this.props.onConnectionError(rt)},this.props=nt,this.connect()}isConnected(){return this.connectionState===ConnectionState.CONNECTED}getBaseUriParts(){if(this.connection instanceof WebsocketConnection)return this.connection.getBaseUriParts()}sendMessage(nt){this.connection instanceof WebsocketConnection&&this.isConnected()?this.connection.sendMessage(nt):logError(`Cannot send message when server is disconnected: ${nt}`)}incrementMessageCacheRunCount(nt){this.connection instanceof WebsocketConnection&&this.connection.incrementMessageCacheRunCount(nt)}async connect(){try{this.connection=await this.connectToRunningServer()}catch(nt){const et=ensureError(nt);logError(et.message),this.setConnectionState(ConnectionState.DISCONNECTED_FOREVER,et.message)}}disconnect(){var nt;(nt=this.connection)==null||nt.disconnect()}connectToRunningServer(){const nt=getPossibleBaseUris();return new WebsocketConnection({sessionInfo:this.props.sessionInfo,endpoints:this.props.endpoints,baseUriPartsList:nt,onMessage:this.props.onMessage,onConnectionStateChange:this.setConnectionState,onRetry:this.showRetryError,claimHostAuthToken:this.props.claimHostAuthToken,resetHostAuthToken:this.props.resetHostAuthToken,onHostConfigResp:this.props.onHostConfigResp})}}class SessionEventDispatcher{constructor(){this.onSessionEvent=new dist.Signal}handleSessionEventMsg(nt){this.onSessionEvent.emit(nt)}}const MEDIA_ENDPOINT="/media",UPLOAD_FILE_ENDPOINT="/_stcore/upload_file",COMPONENT_ENDPOINT_BASE="/component",FORWARD_MSG_CACHE_ENDPOINT="/_stcore/message";class DefaultStreamlitEndpoints{constructor(nt){this.getServerUri=nt.getServerUri,this.csrfEnabled=nt.csrfEnabled}buildComponentURL(nt,et){return buildHttpUri(this.requireServerUri(),`${COMPONENT_ENDPOINT_BASE}/${nt}/${et}`)}setFileUploadClientConfig({prefix:nt,headers:et}){this.fileUploadClientConfig={prefix:nt,headers:et}}buildMediaURL(nt){return nt.startsWith(MEDIA_ENDPOINT)?buildHttpUri(this.requireServerUri(),nt):nt}buildFileUploadURL(nt){return this.fileUploadClientConfig?makePath(this.fileUploadClientConfig.prefix,nt):nt.startsWith(UPLOAD_FILE_ENDPOINT)?buildHttpUri(this.requireServerUri(),nt):nt}buildAppPageURL(nt,et){const rt=et.urlPathname,ot=et.isDefault?"":rt;if(notNullOrUndefined(nt)&&nt.length>0)return`${nt}/${ot}`;const{port:at,protocol:st}=window.location,{basePath:ut,host:ct}=this.requireServerUri(),pt=at?`:${at}`:"",dt=ut?`${ut}/`:"";return`${st}//${ct}${pt}/${dt}${ot}`}async uploadFileUploaderFile(nt,et,rt,ot,at){const st=new FormData;st.append(et.name,et);const ut=this.getAdditionalHeaders();return this.csrfRequest(this.buildFileUploadURL(nt),{cancelToken:at,method:"PUT",data:st,responseType:"text",headers:ut,onUploadProgress:ot}).then(()=>{})}getAdditionalHeaders(){let nt={};return this.fileUploadClientConfig&&(nt={...nt,...this.fileUploadClientConfig.headers}),nt}async deleteFileAtURL(nt,et){const rt=this.getAdditionalHeaders();return this.csrfRequest(this.buildFileUploadURL(nt),{method:"DELETE",data:{sessionId:et},headers:rt}).then(()=>{})}async fetchCachedForwardMsg(nt){const et=this.requireServerUri(),rt=await axios.request({url:buildHttpUri(et,`${FORWARD_MSG_CACHE_ENDPOINT}?hash=${nt}`),method:"GET",responseType:"arraybuffer"});return new Uint8Array(rt.data)}requireServerUri(){const nt=this.getServerUri();if(notNullOrUndefined(nt))return this.cachedServerUri=nt,nt;if(notNullOrUndefined(this.cachedServerUri))return this.cachedServerUri;throw new Error("not connected to a server!")}csrfRequest(nt,et){if(et.url=nt,this.csrfEnabled){const rt=getCookie("_streamlit_xsrf");notNullOrUndefined(rt)&&(et.headers={"X-Xsrftoken":rt,...et.headers||{}},et.withCredentials=!0)}return axios.request(et)}}var assignValue=_assignValue,castPath$1=_castPath,isIndex=_isIndex,isObject=isObject_1,toKey=_toKey;function baseSet$1(tt,nt,et,rt){if(!isObject(tt))return tt;nt=castPath$1(nt,tt);for(var ot=-1,at=nt.length,st=at-1,ut=tt;ut!=null&&++ot<at;){var ct=toKey(nt[ot]),pt=et;if(ct==="__proto__"||ct==="constructor"||ct==="prototype")return tt;if(ot!=st){var dt=ut[ct];pt=rt?rt(dt,ct,ut):void 0,pt===void 0&&(pt=isObject(dt)?dt:isIndex(nt[ot+1])?[]:{})}assignValue(ut,ct,pt),ut=ut[ct]}return tt}var _baseSet=baseSet$1,baseGet=_baseGet,baseSet=_baseSet,castPath=_castPath;function basePickBy$1(tt,nt,et){for(var rt=-1,ot=nt.length,at={};++rt<ot;){var st=nt[rt],ut=baseGet(tt,st);et(ut,st)&&baseSet(at,castPath(st,tt),ut)}return at}var _basePickBy=basePickBy$1,basePickBy=_basePickBy,hasIn=hasIn_1;function basePick$1(tt,nt){return basePickBy(tt,nt,function(et,rt){return hasIn(tt,rt)})}var _basePick=basePick$1,basePick=_basePick,flatRest=_flatRest,pick=flatRest(function(tt,nt){return tt==null?{}:basePick(tt,nt)}),pick_1=pick;const pick$1=getDefaultExportFromCjs$1(pick_1),DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json";class MetricsManager{constructor(nt){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=et=>{this.appHash=et},this.setMetricsConfig=(et="")=>{this.metricsUrl=et},this.sessionInfo=nt}async initialize({gatherUsageStats:nt,sendMessageToHost:et}){this.sendMessageToHost=et,this.actuallySendMetrics=nt&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(logError("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),logAlways("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(nt,et={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([nt,et]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(nt,et))}setMetadata(nt){this.metadata=nt}async requestDefaultMetricsConfig(){const nt=localStorageAvailable();if(nt){const et=window.localStorage.getItem("stMetricsConfig");if(et){this.metricsUrl=et;return}}try{const et=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!et.ok)this.metricsUrl=void 0,logError("Failed to fetch metrics config: ",et.status);else{const rt=await et.json();this.metricsUrl=rt.url??void 0,nt&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(et){logError("Failed to fetch metrics config:",et)}}send(nt,et={}){const rt=this.buildEventProto(nt,et);this.metricsUrl==="postMessage"?this.postMessageEvent(nt,rt):this.track(rt)}sendPendingEvents(){this.pendingEvents.forEach(([nt,et])=>{this.send(nt,et)}),this.pendingEvents=[]}async track(nt){const et=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(nt.toJSON())});await fetch(et)}postMessageEvent(nt,et){this.sendMessageToHost({type:"METRICS_EVENT",eventName:nt,data:et})}buildEventProto(nt,et){const rt=new MetricsEvent({event:nt,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,...this.getContextData()});if(nt==="menuClick")rt.label=et.label;else if(nt==="pageProfile")return new MetricsEvent({...rt,...et});return rt}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3}}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 nt="ajs_anonymous_id",et=localStorageAvailable(),rt=getCookie(nt),ot=et?window.localStorage.getItem(nt):null,at=new Date;at.setFullYear(new Date().getFullYear()+1),rt?(this.anonymousId=rt,et&&window.localStorage.setItem(nt,rt)):ot?(this.anonymousId=JSON.parse(ot),setCookie(nt,this.anonymousId,at)):(this.anonymousId=v4(),setCookie(nt,this.anonymousId,at),et&&window.localStorage.setItem(nt,this.anonymousId))}}const StyledApp=newStyled("div",{target:"e10tffaf0"})(({theme:tt})=>{const nt=hasLightBackgroundColor(tt);return{position:"absolute",background:tt.colors.bgColor,color:tt.colors.bodyText,top:tt.spacing.none,left:tt.spacing.none,right:tt.spacing.none,bottom:tt.spacing.none,colorScheme:nt?"light":"dark",overflow:"hidden","@media print":{float:"none",height:tt.sizes.full,position:"static",overflow:"visible"}}}),StyledRecordAudioLabel=newStyled("label",{target:"e1nhbas40"})({margin:0}),StyledInstruction=newStyled("p",{target:"e1nhbas41"})({margin:0}),ScreencastDialog=({onClose:tt,toggleRecordAudio:nt,recordAudio:et,startRecording:rt})=>{const[ot,at]=reactExports.useState(et),st=reactExports.useCallback(ct=>{const{checked:pt}=ct.target;pt!==ot&&(at(pt),nt())},[ot,nt]),ut=reactExports.useCallback(()=>{rt(),tt()},[rt,tt]);return jsxs(Modal,{isOpen:!0,onClose:tt,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:ot,onChange:st})," ","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:ut,children:"Start recording!"})})]})},StyledVideo=newStyled("video",{target:"ec1y6ev0"})(({theme:tt})=>({width:tt.sizes.full,borderRadius:tt.radii.md})),StyledDialogContainer=newStyled("div",{target:"ec1y6ev1"})(({theme:tt})=>({display:"flex",flexDirection:"column",width:tt.sizes.full})),StyledRow=newStyled("div",{target:"ec1y6ev2"})(({theme:tt})=>({display:"flex",flexDirection:"row",paddingTop:tt.spacing.md,paddingBottom:tt.spacing.md})),StyledFirstColumn=newStyled("div",{target:"ec1y6ev3"})(({theme:tt})=>({paddingRight:tt.spacing.lg,textAlign:"right",color:tt.colors.gray,fontWeight:tt.fontWeights.bold,width:"6em"})),StyledSecondColumn=newStyled("div",{target:"ec1y6ev4"})(({theme:tt})=>({flex:1,paddingRight:tt.spacing.lg,marginRight:"6em",[`@media (max-width: ${tt.breakpoints.sm})`]:{marginRight:tt.spacing.none}})),StyledVideoFormatInstructions=newStyled("p",{target:"ec1y6ev5"})(({theme:tt})=>({marginTop:tt.spacing.sm,marginBottom:tt.spacing.none,fontSize:tt.fontSizes.sm})),StyledDownloadButtonContainer=newStyled("div",{target:"ec1y6ev6"})(({theme:tt})=>({marginTop:tt.spacing.twoXS})),VideoRecordedDialog=({onClose:tt,videoBlob:nt,fileName:et})=>{const rt=URL.createObjectURL(nt),ot=()=>{const at=document.createElement("a");at.setAttribute("href",rt),at.setAttribute("download",`${et}.webm`),at.click(),tt()};return jsxs(Modal,{isOpen:!0,onClose:tt,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:rt,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:ot,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=newStyled("div",{target:"e1xu6skw0"})({display:"flex"}),StyledUnsupportedScreenCastIcon=newStyled("div",{target:"e1xu6skw1"})(({theme:tt})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:tt.spacing.twoXL,marginLeft:tt.spacing.sm,fontSize:tt.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=newStyled("p",{target:"e1xu6skw2"})(({theme:tt})=>({margin:tt.spacing.none})),UnsupportedBrowserDialog=({onClose:tt})=>jsxs(Modal,{isOpen:!0,onClose:tt,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),screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=newStyled("div",{target:"e1442ngl0"})(({theme:tt})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:tt.sizes.full,height:tt.sizes.full,fontSize:"40vh",color:tt.colors.red,fontWeight:tt.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${tt.colors.darkGray}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:tt,endCallback:nt})=>{const[et,rt]=reactExports.useState(tt);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const at=et-1;at>=0&&rt(at),at===0&&nt()},children:jsx$1("span",{children:et})},`frame${et}`)};function withScreencast(tt){const et=class et extends reactExports.PureComponent{constructor(){super(...arguments),this.state={fileName:"streamlit-screencast",recordAudio:!1,currentState:this.props.testOverride||"OFF"},this.toggleRecordAudio=()=>{const{recordAudio:ot}=this.state;this.setState({recordAudio:!ot})},this.showDialog=ot=>{const{currentState:at}=this.state;ScreenCastRecorder.isSupportedBrowser()?at==="OFF"?this.setState({fileName:ot,currentState:"SETUP"}):this.stopRecording().catch(st=>logWarning(`withScreencast.stopRecording threw an error: ${st}`)):this.setState({currentState:"UNSUPPORTED"})},this.startRecording=async()=>{const{recordAudio:ot}=this.state;this.recorder=new ScreenCastRecorder({recordAudio:ot,onErrorOrStop:()=>this.stopRecording()});try{await this.recorder.initialize()}catch{this.setState({currentState:"UNSUPPORTED"});return}this.setState({currentState:"COUNTDOWN"})},this.stopRecording=async()=>{let ot;const{currentState:at}=this.state;at==="OFF"||isNullOrUndefined$1(this.recorder)||(at==="COUNTDOWN"&&this.setState({currentState:"OFF"}),at==="RECORDING"&&(this.recorder.getState()==="inactive"?this.setState({currentState:"OFF"}):(ot=await this.recorder.stop(),this.setState({outputBlob:ot,currentState:"PREVIEW_FILE"}))))},this.onCountdownEnd=async()=>{if(isNullOrUndefined$1(this.recorder))throw new Error("Countdown finished but recorder is null");this.recorder.start()?this.setState({currentState:"RECORDING"}):this.stopRecording().catch(at=>logWarning(`withScreencast.stopRecording threw an error: ${at}`))},this.getScreenCastProps=()=>({currentState:this.state.currentState,toggleRecordAudio:this.toggleRecordAudio,startRecording:this.showDialog,stopRecording:this.stopRecording}),this.closeDialog=()=>{this.setState({currentState:"OFF"})},this.render=()=>{const{outputBlob:ot,fileName:at,recordAudio:st,currentState:ut}=this.state;return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(tt,{...this.props,screenCast:this.getScreenCastProps()}),ut==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:this.closeDialog}),ut==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:st,onClose:this.closeDialog,startRecording:this.startRecording,toggleRecordAudio:this.toggleRecordAudio}),ut==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:this.onCountdownEnd}),ut==="PREVIEW_FILE"&&ot&&jsx$1(VideoRecordedDialog,{onClose:this.closeDialog,videoBlob:ot,fileName:at})]})}}};et.displayName=`withScreencast(${tt.displayName||tt.name})`;let nt=et;return hoistNonReactStatics$2(nt,tt)}const showDevelopmentOptions=(tt,nt)=>nt==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==nt||Config.ToolbarMode.MINIMAL==nt?!1:tt||isLocalhost();function getTitle(tt){return tt||"Streamlit"}class StrategyV1{constructor(nt){this.appNav=nt,this.appPages=[],this.currentPageScriptHash=null,this.hideSidebarNav=null}handleNewSession(nt){var st,ut;this.appPages=nt.appPages,this.currentPageScriptHash=nt.pageScriptHash,this.hideSidebarNav=((st=nt.config)==null?void 0:st.hideSidebarNav)??!1;const et=this.appPages[0],rt=et.urlPathname??"",ot=((ut=this.appPages.find(ct=>ct.pageScriptHash===this.currentPageScriptHash))==null?void 0:ut.urlPathname)??"",at=et.pageScriptHash===this.currentPageScriptHash;return this.appNav.onUpdatePageUrl(rt,ot,at),document.title=getTitle(ot??""),[{hideSidebarNav:this.hideSidebarNav,appPages:this.appPages,currentPageScriptHash:this.currentPageScriptHash},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:this.appPages}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:at?"":ot,currentPageScriptHash:this.currentPageScriptHash})}]}handlePagesChanged(nt){const{appPages:et}=nt;return[{appPages:et},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:et})}]}handlePageNotFound(nt){var ot;const{pageName:et}=nt;this.appNav.onPageNotFound(et);const rt=((ot=this.appPages[0])==null?void 0:ot.pageScriptHash)??"";return this.currentPageScriptHash=rt,[{currentPageScriptHash:rt},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:rt})}]}handleNavigation(nt){}findPageByUrlPath(nt){return this.appPages.length===0?null:this.appPages.find(et=>nt.endsWith("/"+et.urlPathname))??this.appPages[0]}clearPageElements(nt,et,rt){return AppRoot.empty(et,!1,rt,nt.logo)}}class StrategyV2{constructor(nt){this.appNav=nt,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(nt){var et;return this.mainScriptHash=nt.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=((et=nt.config)==null?void 0:et.hideSidebarNav)??null),document.title=getTitle(""),[{hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handlePagesChanged(nt){}handlePageNotFound(nt){const{pageName:et}=nt;return this.appNav.onPageNotFound(et),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}handleNavigation(nt){const{sections:et,position:rt,appPages:ot}=nt;this.appPages=ot,this.hideSidebarNav=rt===Navigation.Position.HIDDEN;const at=nt.pageScriptHash,st=ot.find(pt=>pt.pageScriptHash===at),ut=ot.find(pt=>pt.isDefault);this.mainPage=ut;const ct=st.urlPathname;if(!this.appNav.isPageTitleSet){const pt=getTitle(st.pageName);document.title=pt,this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:st.pageName??""})}return!this.appNav.isPageIconSet&&st.icon&&this.appNav.onPageIconChange(st.icon),this.appNav.onUpdatePageUrl(ut.urlPathname??"",ct,st.isDefault??!1),[{appPages:ot,navSections:et,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:nt.expanded,currentPageScriptHash:at},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:ot}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:st.isDefault?"":ct,currentPageScriptHash:at})}]}findPageByUrlPath(nt){return this.appPages.find(et=>nt.endsWith("/"+et.urlPathname))??this.mainPage}clearPageElements(nt,et,rt){return nt.filterMainScriptElements(et)}}class AppNavigation{constructor(nt,et,rt,ot){this.hostCommunicationMgr=nt,this.onUpdatePageUrl=et,this.onPageNotFound=rt,this.onPageIconChange=ot,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.strategy=new StrategyV1(this)}handleNewSession(nt){return this.isPageTitleSet=!1,this.isPageIconSet=!1,this.strategy.handleNewSession(nt)}handleNavigation(nt){return this.strategy instanceof StrategyV1&&(this.strategy=new StrategyV2(this)),this.strategy.handleNavigation(nt)}handlePagesChanged(nt){return this.strategy.handlePagesChanged(nt)}handlePageNotFound(nt){return this.strategy.handlePageNotFound(nt)}findPageByUrlPath(nt){return this.strategy.findPageByUrlPath(nt)}handlePageConfigChanged(nt){this.isPageIconSet=!!nt.favicon,this.isPageTitleSet=!!nt.title}clearPageElements(nt,et,rt){return this.strategy.clearPageElements(nt,et,rt)}}const ELEMENT_LIST_BUFFER_TIMEOUT_MS=10,INITIAL_SCRIPT_RUN_ID="<null>";class App extends reactExports.PureComponent{constructor(nt){super(nt),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.showDeployError=(rt,ot,at)=>{this.openDialog({type:DialogType.DEPLOY_ERROR,title:rt,msg:ot,onContinue:at,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg})},this.handleThemeMessage=(rt,ot)=>{const[,at,st]=createPresetThemes(),ut=isPresetTheme(this.props.theme.activeTheme);rt===at.name&&ut?this.props.theme.setTheme(at):rt===st.name&&ut?this.props.theme.setTheme(st):ot&&this.props.theme.setImportedTheme(ot)},this.handleConnectionStateChanged=rt=>{if(logMessage(`Connection state changed from ${this.state.connectionState} to ${rt}`),rt===ConnectionState.CONNECTED){const ot=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||this.state.scriptRunState===ScriptRunState.RUNNING;(!this.sessionInfo.last||ot)&&(this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:rt!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.clearCurrent();this.setState({connectionState:rt})},this.handleGitInfoChanged=rt=>{this.setState({gitInfo:rt})},this.handleCustomParentMessage=rt=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:rt.message}):logError("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=rt=>{const ot=(at,st,ut)=>{const ct=at[st];if(ct in ut)return ut[ct](at[ct]);throw new Error(`Cannot handle ${st} "${ct}".`)};try{ot(rt,"type",{newSession:at=>this.handleNewSession(at),sessionStatusChanged:at=>this.handleSessionStatusChanged(at),sessionEvent:at=>this.handleSessionEvent(at),delta:at=>this.handleDeltaMsg(at,rt.metadata),pageConfigChanged:at=>this.handlePageConfigChanged(at),pageInfoChanged:at=>this.handlePageInfoChanged(at),pagesChanged:at=>this.handlePagesChanged(at),pageNotFound:at=>this.handlePageNotFound(at),gitInfoChanged:at=>this.handleGitInfoChanged(at),scriptFinished:at=>this.handleScriptFinished(at),pageProfile:at=>this.handlePageProfileMsg(at),autoRerun:at=>this.handleAutoRerun(at),fileUrlsResponse:at=>this.uploadClient.onFileURLsResponse(at),parentMessage:at=>this.handleCustomParentMessage(at),logo:at=>this.handleLogo(at,rt.metadata),navigation:at=>this.handleNavigation(at)})}catch(at){const st=ensureError(at);logError(st),this.showError("Bad message format",st.message)}},this.handleLogo=(rt,ot)=>{const at={activeScriptHash:ot.activeScriptHash,scriptRunId:this.state.scriptRunId};this.setState({elements:this.pendingElementsBuffer.appRootWithLogo(rt,at)},()=>{this.pendingElementsBuffer=this.state.elements})},this.handlePageConfigChanged=rt=>{const{title:ot,favicon:at,layout:st,initialSidebarState:ut,menuItems:ct}=rt;this.appNavigation.handlePageConfigChanged(rt),ot&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:ot}),document.title=ot),at&&this.onPageIconChanged(at),st!==this.state.layout&&this.setState(pt=>({layout:st,userSettings:{...pt.userSettings,wideMode:st===PageConfig.Layout.WIDE}})),ut!==this.state.initialSidebarState&&this.setState(()=>({initialSidebarState:ut})),this.setState({menuItems:ct})},this.handlePageInfoChanged=rt=>{const{queryString:ot}=rt,at=document.location.pathname+(ot?`?${ot}`:"");window.history.pushState({},"",at),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:ot?`?${ot}`:""})},this.onPageNotFound=rt=>{const ot=rt?`You have requested page /${rt}, 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",`${ot}. Running the app's main page.`)},this.handlePageNotFound=rt=>{this.maybeSetState(this.appNavigation.handlePageNotFound(rt))},this.onPageIconChanged=rt=>{handleFavicon(rt,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handlePagesChanged=rt=>{this.maybeSetState(this.appNavigation.handlePagesChanged(rt))},this.handleNavigation=rt=>{this.maybeSetState(this.appNavigation.handleNavigation(rt))},this.handlePageProfileMsg=rt=>{var st,ut,ct;const ot=PageProfile.toObject(rt),at=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...ot,isFragmentRun:!!ot.isFragmentRun,appId:this.sessionInfo.current.appId,numPages:(st=this.state.appPages)==null?void 0:st.length,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,pageScriptHash:this.state.currentPageScriptHash,activeTheme:(ct=(ut=this.props.theme)==null?void 0:ut.activeTheme)==null?void 0:ct.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:at})},this.handleAutoRerun=rt=>{const ot=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(rt.fragmentId,!0)},rt.interval*1e3);this.setState(at=>({autoReruns:[...at.autoReruns,ot]}))},this.handleSessionStatusChanged=rt=>{this.setState(ot=>{let{scriptRunState:at}=ot,{dialog:st}=ot;return rt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.STOP_REQUESTED?(at=ScriptRunState.RUNNING,notNullOrUndefined(st)&&st.type===DialogType.SCRIPT_COMPILE_ERROR&&(st=void 0)):!rt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&ot.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(at=ScriptRunState.NOT_RUNNING),{userSettings:{...ot.userSettings,runOnSave:!!rt.runOnSave},dialog:st,scriptRunState:at}})},this.handleSessionEvent=rt=>{if(this.sessionEventDispatcher.handleSessionEventMsg(rt),rt.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const ot={type:DialogType.SCRIPT_COMPILE_ERROR,exception:rt.scriptCompilationException,onClose:()=>{}};this.openDialog(ot)}},this.maybeUpdatePageUrl=(rt,ot,at)=>{const st=this.getBaseUriParts();if(st){const{basePath:ut}=st,ct=extractPageNameFromPathName(document.location.pathname,ut);if((ct===""?rt:ct)!==ot){const dt=at?"":ot,ft=preserveEmbedQueryParams(),bt=ft?`?${ft}`:"",Mt=`${ut?`/${ut}`:""}/${dt}${bt}`;window.history.pushState({},"",Mt)}}},this.handleNewSession=rt=>{const ot=rt.initialize;if(this.hasStreamlitVersionChanged(ot)){window.location.reload();return}this.sessionInfo.isSet||this.handleOneTimeInitialization(rt);const{appHash:at,currentPageScriptHash:st}=this.state,{scriptRunId:ut,name:ct,mainScriptPath:pt,fragmentIdsThisRun:dt,pageScriptHash:ft,mainScriptHash:bt}=rt;if(dt.length)this.setState({fragmentIdsThisRun:dt,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Mt=rt.config,mt=rt.customTheme;this.processThemeInput(mt),this.setState({allowRunOnSave:Mt.allowRunOnSave,hideTopBar:Mt.hideTopBar,toolbarMode:Mt.toolbarMode,latestRunTime:performance.now(),mainScriptHash:bt,fragmentIdsThisRun:dt}),this.maybeSetState(this.appNavigation.handleNewSession(rt)),this.onPageIconChanged("./favicon.png")}const ht=hashString(this.sessionInfo.current.installationId+pt);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(ht),this.metricsMgr.enqueue("updateReport"),at===ht&&st===ft?this.setState({scriptRunId:ut}):this.clearAppState(ht,ut,ct,bt)},this.handleOneTimeInitialization=rt=>{const ot=rt.initialize,at=rt.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(rt)),this.metricsMgr.initialize({gatherUsageStats:at.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(ot.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:rt}=this.state,ot=this.appNavigation.findPageByUrlPath(document.location.pathname),at=document.location.toString().includes("#"),st=(ot==null?void 0:ot.pageScriptHash)===rt;isNullOrUndefined$1(ot)||at&&st||this.onPageChange(ot.pageScriptHash)},this.setAndSendTheme=rt=>{this.props.theme.setTheme(rt),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(rt.emotion)})},this.createThemeHash=rt=>{if(!rt)return"hash_for_undefined_custom_theme";const ot=Object.entries(rt);return ot.sort(),hashString(ot.join(":"))},this.closeDialog=()=>{this.setState({dialog:void 0})},this.saveSettings=rt=>{const{runOnSave:ot}=this.state.userSettings,{runOnSave:at}=rt;if(this.setState({userSettings:rt}),ot!==at&&this.isServerConnected()){const st=new BackMsg({setRunOnSave:at});st.type="setRunOnSave",this.sendBackMsg(st)}},this.handleDeltaMsg=(rt,ot)=>{if(this.pendingElementsBuffer=this.pendingElementsBuffer.applyDelta(this.state.scriptRunId,rt,ot),!this.pendingElementsTimerRunning){this.pendingElementsTimerRunning=!0;const at=this.state.scriptRunState===ScriptRunState.RUNNING;setTimeout(()=>{this.pendingElementsTimerRunning=!1,at&&this.setState({elements:this.pendingElementsBuffer})},ELEMENT_LIST_BUFFER_TIMEOUT_MS)}},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const rt=new BackMsg({debugShutdownRuntime:!0});rt.type="debugShutdownRuntime",this.sendBackMsg(rt)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const rt=new BackMsg({debugDisconnectWebsocket:!0});rt.type="debugDisconnectWebsocket",this.sendBackMsg(rt)}},this.debugClearForwardMsgCache=()=>{var rt,ot;isLocalhost()&&((ot=(rt=this.connectionManager)==null?void 0:rt.connection)==null||ot.cache.messages.clear())},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(rt=>{clearInterval(rt)}),this.setState({autoReruns:[]})},this.rerunScript=(rt=!1)=>{if(this.closeDialog(),!this.isServerConnected()){logError("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}),rt===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){logError("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=rt=>{const{elements:ot,mainScriptHash:at}=this.state;this.cleanupAutoReruns();const st=this.appNavigation.clearPageElements(ot,at,void 0),ut=new Set(Array.from(st.getElements()).map(ct=>getElementId(ct)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(ut),void 0,rt)},this.isAppInReadyState=rt=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&rt.scriptRunState===ScriptRunState.RUNNING&&rt.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(rt,ot,at,st)=>{const ut=this.getBaseUriParts();if(!ut){logError("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:ct}=this.state,{basePath:pt}=ut;let dt=this.getQueryString(),ft="";at?at!=ct&&(dt=preserveEmbedQueryParams(),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:dt})):ct?at=ct:(ft=extractPageNameFromPathName(document.location.pathname,pt),at=""),this.sendBackMsg(new BackMsg({rerunScript:{queryString:dt,widgetStates:rt,pageScriptHash:at,pageName:ft,fragmentId:ot,isAutoRerun:st}})),PerformanceEvents.record({name:"RequestedRerun",scriptRunState:this.state.scriptRunState})},this.stopScript=()=>{if(!this.isServerConnected()){logError("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const rt=new BackMsg({stopScript:!0});rt.type="stopScript",this.sendBackMsg(rt),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const rt={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(rt)}else logError("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{var ot;const rt={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:((ot=this.state.dialog)==null?void 0:ot.type)===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr};this.openDialog(rt)},this.openThemeCreatorDialog=()=>{this.metricsMgr.enqueue("menuClick",{label:"editTheme"});const rt={type:DialogType.THEME_CREATOR,backToSettings:this.settingsCallback,onClose:this.closeDialog,metricsMgr:this.metricsMgr};this.openDialog(rt)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const rt=new BackMsg({clearCache:!0});rt.type="clearCache",this.sendBackMsg(rt)}else logError("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const rt=new BackMsg({appHeartbeat:!0});rt.type="appHeartbeat",this.sendBackMsg(rt)}else logError("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=rt=>{this.connectionManager?this.connectionManager.sendMessage(rt):logError(`Not connected. Cannot send back message: ${rt}`)},this.handleConnectionError=rt=>{this.showError("Connection error",rt)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(rt=!0)=>{const ot={type:DialogType.SETTINGS,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},developerMode:showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),openThemeCreator:this.openThemeCreatorDialog,animateModal:rt,metricsMgr:this.metricsMgr};this.openDialog(ot)},this.aboutCallback=()=>{const{menuItems:rt}=this.state,ot={type:DialogType.ABOUT,sessionInfo:this.sessionInfo,onClose:this.closeDialog,aboutSectionMd:rt==null?void 0:rt.aboutSectionMd};this.openDialog(ot)},this.printCallback=()=>{const{scriptRunState:rt}=this.state;if(rt!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let ot;try{const at=getIFrameEnclosingApp(this.embeddingId);at&&at.contentWindow?ot=at.contentWindow.window:ot=window}catch{ot=window}finally{ot||(ot=window),ot.print()}},this.screencastCallback=()=>{const{scriptName:rt}=this.state,{startRecording:ot}=this.props.screenCast,at=hooks().format("YYYY-MM-DD-HH-MM-SS");ot(`streamlit-${rt}-${at}`)},this.handleFullScreen=rt=>{this.setState({isFullScreen:rt})},this.setLibConfig=rt=>{this.setState({libConfig:rt})},this.setAppConfig=rt=>{this.setState({appConfig:rt})},this.addScriptFinishedHandler=rt=>{this.setState((ot,at)=>({scriptFinishedHandlers:ot.scriptFinishedHandlers.concat(rt)}))},this.removeScriptFinishedHandler=rt=>{this.setState((ot,at)=>({scriptFinishedHandlers:without$1(ot.scriptFinishedHandlers,rt)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:rt}=this.state,ot=rt&&rt.length>0?rt:document.location.search;return ot.startsWith("?")?ot.substring(1):ot},this.isInCloudEnvironment=()=>{const{hostMenuItems:rt}=this.state;return rt&&(rt==null?void 0:rt.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=(rt,ot)=>{if(this.isServerConnected()){const at=new BackMsg({fileUrlsRequest:{requestId:rt,fileNames:ot.map(st=>st.name),sessionId:this.sessionInfo.current.sessionId}});at.type="fileUrlsRequest",this.sendBackMsg(at)}},this.handleKeyDown=rt=>{switch(rt){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=rt=>{rt==="esc"&&this.props.screenCast.stopRecording()},J$1();let et=this.createThemeHash();isPresetTheme(nt.theme.activeTheme)||(et=this.createThemeHash(toThemeInput(nt.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},layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:et,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},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:rt=>this.setState({formsData:rt})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:nt.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:rt=>{this.setState({inputsDisabled:rt})},themeChanged:this.handleThemeMessage,pageChanged:this.onPageChange,isOwnerChanged:rt=>this.setState({isOwner:rt}),fileUploadClientConfigChanged:rt=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(rt)},hostMenuItemsChanged:rt=>{this.setState({hostMenuItems:rt})},hostToolbarItemsChanged:rt=>{this.setState({hostToolbarItems:rt})},hostHideSidebarNavChanged:rt=>{this.setState({hostHideSidebarNav:rt})},sidebarChevronDownshiftChanged:rt=>{this.setState({sidebarChevronDownshift:rt})},pageLinkBaseUrlChanged:rt=>{this.setState({pageLinkBaseUrl:rt})},queryParamsChanged:rt=>{this.setState({queryParams:rt})},deployedAppMetadataChanged:rt=>{this.setState({deployedAppMetadata:rt})},restartWebsocketConnection:()=>{this.connectionManager||this.initializeConnectionManager()},terminateWebsocketConnection:()=>{var rt;(rt=this.connectionManager)==null||rt.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:rt=>this.widgetMgr.setFormsWithUploadsInProgress(rt),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.pendingElementsTimerRunning=!1,this.pendingElementsBuffer=this.state.elements,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.connectionManager=new ConnectionManager({sessionInfo:this.sessionInfo,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,onHostConfigResp:nt=>{const{allowedOrigins:et,useExternalAuthToken:rt,disableFullscreenMode:ot,enableCustomParentMessages:at,mapboxToken:st,enforceDownloadInNewTab:ut,metricsUrl:ct}=nt,pt={allowedOrigins:et,useExternalAuthToken:rt,enableCustomParentMessages:at},dt={mapboxToken:st,disableFullscreenMode:ot,enforceDownloadInNewTab:ut};this.metricsMgr.setMetricsConfig(ct),this.hostCommunicationMgr.setAllowedOrigins(pt),this.setAppConfig(pt),this.setLibConfig(dt)}})}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 nt=document.querySelectorAll("[data-iframe-height]"),et=Array.from(nt).map(rt=>Math.ceil(rt.getBoundingClientRect().bottom));return Math.max(0,...et)}},__vitePreload(()=>import("./iframeResizer.contentWindow.C4V1QE40.js").then(nt=>nt.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(nt,et){window.prerenderReady===!1&&this.isAppInReadyState(et)&&(window.prerenderReady=!0),this.state.scriptRunState!==et.scriptRunState&&(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}))}componentWillUnmount(){var nt;(nt=this.connectionManager)==null||nt.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}showError(nt,et){logError(et);const rt={type:DialogType.WARNING,title:nt,msg:et,onClose:()=>{}};this.openDialog(rt)}hasStreamlitVersionChanged(nt){if(this.sessionInfo.isSet){const et=this.sessionInfo.current.streamlitVersion,{environmentInfo:rt}=nt;if(notNullOrUndefined(rt)&&notNullOrUndefined(rt.streamlitVersion))return et!=rt.streamlitVersion}return!1}maybeSetState(nt){if(nt){const[et,rt]=nt;this.setState(et,rt)}}processThemeInput(nt){const et=this.createThemeHash(nt);if(et===this.state.themeHash)return;this.setState({themeHash:et});const rt=!isPresetTheme(this.props.theme.activeTheme);if(nt){const ot=createTheme(CUSTOM_THEME_NAME,nt);this.props.theme.addThemes([ot]),(getCachedTheme()===null||rt)&&this.setAndSendTheme(ot)}else this.props.theme.addThemes([]),rt&&this.setAndSendTheme(getHostSpecifiedTheme())}handleScriptFinished(nt){if(nt===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){if(window.setTimeout(()=>{this.state.scriptFinishedHandlers.map(et=>et())},0),nt===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){this.setState(({scriptRunId:rt,fragmentIdsThisRun:ot})=>({elements:this.pendingElementsBuffer.clearStaleNodes(rt,ot)}),()=>{this.pendingElementsBuffer=this.state.elements});const et=new Set(Array.from(this.state.elements.getElements()).map(rt=>getElementId(rt)).filter(notUndefined));this.widgetMgr.removeInactive(et)}this.connectionManager!==null&&nt!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge)}}clearAppState(nt,et,rt,ot){const{hideSidebarNav:at,elements:st}=this.state,ut=at&&st.sidebar||void 0;this.setState({scriptRunId:et,scriptName:rt,appHash:nt,elements:this.appNavigation.clearPageElements(this.pendingElementsBuffer,ot,ut)},()=>{this.pendingElementsBuffer=this.state.elements;const ct=new Set(Array.from(this.state.elements.getElements()).map(pt=>getElementId(pt)).filter(notUndefined));this.widgetMgr.removeInactive(ct)})}openDialog(nt){this.setState({dialog:nt})}render(){const{allowRunOnSave:nt,connectionState:et,dialog:rt,elements:ot,initialSidebarState:at,menuItems:st,isFullScreen:ut,scriptRunId:ct,scriptRunState:pt,userSettings:dt,hideTopBar:ft,hideSidebarNav:bt,expandSidebarNav:ht,currentPageScriptHash:Mt,hostHideSidebarNav:mt,pageLinkBaseUrl:Ot,sidebarChevronDownshift:zt,hostMenuItems:yt,hostToolbarItems:vt,libConfig:At,appConfig:St,inputsDisabled:Et,appPages:Tt,navSections:Rt}=this.state,Ct=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),wt=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":dt.wideMode}),Lt=rt?StreamlitDialog({...rt,onClose:this.closeDialog}):null,Ht=Et||et!==ConnectionState.CONNECTED;return jsx$1(AppContext.Provider,{value:{initialSidebarState:at,wideMode:dt.wideMode,embedded:isEmbed(),showPadding:!isEmbed()||isPaddingDisplayed(),disableScrolling:isScrollingHidden(),showToolbar:!isEmbed()||isToolbarDisplayed(),showColoredLine:!isEmbed()||isColoredLineDisplayed(),pageLinkBaseUrl:Ot,sidebarChevronDownshift:zt,gitInfo:this.state.gitInfo,appConfig:St},children:jsx$1(LibContext.Provider,{value:{isFullScreen:ut,setFullScreen:this.handleFullScreen,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,addThemes:this.props.theme.addThemes,onPageChange:this.onPageChange,currentPageScriptHash:Mt,libConfig:At,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language},children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:wt,"data-testid":"stApp","data-test-script-state":ct==INITIAL_SCRIPT_RUN_ID?"initial":pt,"data-test-connection-state":et,children:[jsxs(Header,{children:[!ft&&jsxs(Fragment,{children:[jsx$1(StatusWidget,{connectionState:et,sessionEventDispatcher:this.sessionEventDispatcher,scriptRunState:pt,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:nt}),jsx$1(ToolbarActions,{hostToolbarItems:vt,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr})]}),this.showDeployButton()&&jsx$1(DeployButton,{onClick:this.deployButtonClicked.bind(this)}),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:yt,developmentMode:Ct,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:st,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]}),jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:ot,scriptRunId:ct,scriptRunState:pt,widgetMgr:this.widgetMgr,widgetsDisabled:Ht,uploadClient:this.uploadClient,componentRegistry:this.componentRegistry,formsData:this.state.formsData,appLogo:ot.logo,appPages:Tt,navSections:Rt,onPageChange:this.onPageChange,currentPageScriptHash:Mt,hideSidebarNav:bt||mt,expandSidebarNav:ht}),Lt]})})})})}}const AppWithScreencast=withScreencast(App);function useThemeManager(){const tt=getDefaultTheme(),[nt,et]=reactExports.useState(tt),[rt,ot]=reactExports.useState([]),[at,st]=reactExports.useState([...createPresetThemes(),...isPresetTheme(tt)?[]:[tt]]),ut=ft=>{st([...createPresetThemes(),...ft])},ct=reactExports.useCallback(ft=>{ft!==nt&&(et(ft),ft.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(ft))},[et,nt]),pt=reactExports.useCallback(()=>{nt.name===AUTO_THEME_NAME&&ct(getHostSpecifiedTheme());const ft=at.filter(bt=>bt.name!==AUTO_THEME_NAME);st([createAutoTheme(),...ft])},[nt.name,at,ct]),dt=reactExports.useCallback(ft=>{ft.fontFaces&&ot(ft.fontFaces);const bt=new CustomThemeConfig(ft),ht=createTheme(CUSTOM_THEME_NAME,bt);ct(ht)},[ot,ct]);return reactExports.useEffect(()=>{const ft=window.matchMedia("(prefers-color-scheme: dark)");return ft.addEventListener("change",pt),window.addEventListener("afterprint",pt),()=>{window.removeEventListener("afterprint",pt),ft.removeEventListener("change",pt)}},[nt,at,pt]),[{setTheme:ct,activeTheme:nt,addThemes:ut,availableThemes:at,setImportedTheme:dt},rt]}const ThemedApp=({streamlitExecutionStartedAt:tt})=>{const[nt,et]=useThemeManager(),{activeTheme:rt}=nt,ot=rt.name===CUSTOM_THEME_NAME&&et.length>0;return jsx$1(RootStyleProvider,{theme:rt,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[ot&&jsx$1(FontFaceDeclaration,{fontFaces:et}),jsx$1(AppWithScreencast,{theme:nt,streamlitExecutionStartedAt:tt})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"});ReactDOM.render(jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})}),document.getElementById("root"));export{logWarning as $,isNullOrUndefined$1 as A,merge$6 as B,numbro$1 as C,notNullOrUndefined as D,EmotionIconBase as E,Fragment as F,hooks as G,formatPeriodType as H,moment$1 as I,getTypeName as J,format as K,convertToSeconds as L,useTheme as M,Arrow$2 as N,logError as O,PortalContext as P,_defineProperty$u as Q,React$1 as R,_objectWithoutProperties$o as S,_typeof$g as T,jsx as U,css$2 as V,_toConsumableArray$3 as W,transparentize as X,convertRemToPx as Y,mix$1 as Z,_extends$Q as _,range$1 as a,labelVisibilityProtoValueToEnum as a$,isEqual$1 as a0,StyledTooltipContentWrapper as a1,StreamlitMarkdown$1 as a2,PLACEMENT as a3,ACCESSIBILITY_TYPE as a4,hasLightBackgroundColor as a5,Popover$1 as a6,LibContext as a7,jsxs as a8,Resizable as a9,DeckGlJsonChart$1 as aA,_unsupportedIterableToArray$l as aB,getAugmentedNamespace as aC,DEFAULT_IFRAME_FEATURE_POLICY as aD,DEFAULT_IFRAME_SANDBOX_POLICY as aE,darken as aF,BaseButtonSize as aG,BaseButtonKind as aH,BaseButtonTooltip as aI,DynamicButtonLabel as aJ,IsSidebarContext as aK,Placement as aL,getGray90 as aM,getIncreasingGreen as aN,getDecreasingRed as aO,PlotlyChart$1 as aP,keysToSnakeCase as aQ,WindowDimensionsContext as aR,Video$1 as aS,zip$1 as aT,FileUploaderState as aU,UploadedFileInfo as aV,StyledSpinner as aW,ENABLE_PERIPHERALS_DOCS_URL as aX,Icon$2 as aY,BaseButton as aZ,blend as a_,IndexTypeName as aa,_baseMerge as ab,_createAssigner as ac,getGray70 as ad,getGray30 as ae,getCategoricalColorsArray as af,getDivergingColorsArray as ag,getSequentialColorsArray as ah,getBlue80 as ai,debounce$4 as aj,Global as ak,ensureError as al,withTheme as am,DynamicIcon as an,toaster as ao,Kind as ap,AlertElement as aq,_assertThisInitialized$e as ar,StyledInlineCode as as,ErrorElement as at,axios as au,Skeleton$1 as av,Skeleton as aw,hoistNonReactStatics$2 as ax,lib$3 as ay,parseToRgba as az,reactDomExports as b,TextInput$1 as b$,TooltipIcon as b0,WidgetLabel as b1,Tooltip as b2,styled as b3,getOverrides as b4,LocaleContext as b5,ButtonGroup$1 as b6,LabelVisibilityMessage as b7,StyledWidgetLabelHelpInline as b8,themeColors as b9,isPresetTheme as bA,classNames as bB,UISelectbox as bC,isValidFormId as bD,toPropertyKey as bE,_setPrototypeOf$e as bF,hexToRgb as bG,withWrapper as bH,StyledWidgetInstructions as bI,isFromMac as bJ,CUSTOM_INPUT_TYPE as bK,SIZE$1 as bL,DeleteAlt$1 as bM,ADJOINED as bN,filterOptions as bO,ENHANCER_POSITION as bP,pick$1 as bQ,Slider$2 as bR,isFromWindows as bS,__awaiter as bT,__generator as bU,__spread as bV,PropTypes as bW,ChevronLeft as bX,ChevronRight as bY,isInForm as bZ,toString_1 as b_,isMobile_1 as ba,CAMERA_PERMISSION_URL as bb,StyledWidgetLabelHelp as bc,isFocusVisible as bd,getOverride as be,getOverrideProps as bf,Checkbox$1 as bg,StyledContent as bh,StyledCheckbox$1 as bi,BaseColorPicker as bj,useStyletron as bk,mergeOverride as bl,toObjectOverride as bm,Icon$1 as bn,UIDConsumer as bo,StatefulMenu as bp,mergeOverrides as bq,ChevronDown$1 as br,ThemeContext as bs,forkFocus as bt,forkBlur as bu,Select as bv,without$1 as bw,fuzzyFilterSelectOptions as bx,TYPE as by,VirtualDropdown as bz,_hasPath as c,ThemeProvider$1 as c0,createThemedStyled as c1,createThemedUseStyletron as c2,createThemedWithStyle as c3,expandBorderStyles as c4,withStyle as c5,reactIsExports$1 as c6,NumberInput$1 as c7,commonjsGlobal$1 as d,classnamesExports as e,_root as f,getDefaultExportFromCjs$1 as g,isObject_1 as h,isPropValid as i,jsx$1 as j,keyframes as k,_Set as l,_setToArray as m,newStyled as n,_SetCache as o,propTypesExports as p,_arrayIncludes as q,reactExports as r,_arrayIncludesWith as s,toNumber_1 as t,_cacheHas as u,groupBy$1 as v,__vitePreload as w,flatten$2 as x,require$$0 as y,toString$9 as z};
798
+ Event: ${nt}`)}async pingServer(){this.uriIndex=await doInitPings(this.args.baseUriPartsList,PING_MINIMUM_RETRY_PERIOD_MS,PING_MAXIMUM_RETRY_PERIOD_MS,this.args.onRetry,this.args.onHostConfigResp),this.stepFsm("SERVER_PING_SUCCEEDED")}async getSessionTokens(){var et,rt;const nt=await this.args.claimHostAuthToken();return this.args.resetHostAuthToken(),[nt??"PLACEHOLDER_AUTH_TOKEN",...(et=this.args.sessionInfo.last)!=null&&et.sessionId?[(rt=this.args.sessionInfo.last)==null?void 0:rt.sessionId]:[]]}async connectToWebSocket(){const nt=buildWsUri(this.args.baseUriPartsList[this.uriIndex],WEBSOCKET_STREAM_PATH);if(notNullOrUndefined(this.websocket))throw new Error("Websocket already exists");const et=await this.getSessionTokens();this.websocket=new WebSocket(nt,["streamlit",...et]),this.websocket.binaryType="arraybuffer",this.setConnectionTimeout(nt);const rt=this.websocket,ot=()=>rt===this.websocket;this.websocket.addEventListener("message",at=>{ot()&&this.handleMessage(at.data).catch(st=>{const ut=`Failed to process a Websocket message (${st})`;logError(LOG,ut),this.stepFsm("FATAL_ERROR",ut)})}),this.websocket.addEventListener("open",()=>{ot()&&this.stepFsm("CONNECTION_SUCCEEDED")}),this.websocket.addEventListener("close",()=>{ot()&&(this.closeConnection(),this.stepFsm("CONNECTION_CLOSED"))}),this.websocket.addEventListener("error",()=>{ot()&&(logError(LOG,"WebSocket onerror"),this.closeConnection(),this.stepFsm("CONNECTION_ERROR"))})}setConnectionTimeout(nt){if(notNullOrUndefined(this.wsConnectionTimeoutId))throw new Error("WS timeout is already set");const et=this.websocket;this.wsConnectionTimeoutId=window.setTimeout(()=>{if(et===this.websocket&&!isNullOrUndefined$1(this.wsConnectionTimeoutId)){if(isNullOrUndefined$1(this.websocket)){this.closeConnection(),this.stepFsm("FATAL_ERROR","Null Websocket in setConnectionTimeout");return}this.websocket.readyState===0&&(this.closeConnection(),this.stepFsm("CONNECTION_TIMED_OUT"))}},WEBSOCKET_TIMEOUT_MS),logMessage(LOG,`Set WS timeout ${this.wsConnectionTimeoutId}`)}closeConnection(){this.websocket&&(this.websocket.close(),this.websocket=void 0),notNullOrUndefined(this.wsConnectionTimeoutId)&&(logMessage(LOG,`Clearing WS timeout ${this.wsConnectionTimeoutId}`),window.clearTimeout(this.wsConnectionTimeoutId),this.wsConnectionTimeoutId=void 0)}sendMessage(nt){if(!this.websocket)return;const et=BackMsg.create(nt),rt=BackMsg.encode(et).finish();this.websocket.send(rt)}incrementMessageCacheRunCount(nt){this.cache.incrementRunCount(nt)}async handleMessage(nt){const et=this.nextMessageIndex;this.nextMessageIndex+=1,PerformanceEvents.record({name:"BeginHandleMessage",messageIndex:et});const rt=new Uint8Array(nt),ot=ForwardMsg.decode(rt);for(PerformanceEvents.record({name:"DecodedMessage",messageIndex:et,messageType:ot.type,len:nt.byteLength}),this.messageQueue[et]=await this.cache.processMessagePayload(ot,rt),PerformanceEvents.record({name:"GotCachedPayload",messageIndex:et});this.lastDispatchedMessageIndex+1 in this.messageQueue;){const at=this.lastDispatchedMessageIndex+1;this.args.onMessage(this.messageQueue[at]),PerformanceEvents.record({name:"DispatchedMessage",messageIndex:at,messageType:this.messageQueue[at].type}),delete this.messageQueue[at],this.lastDispatchedMessageIndex=at}}}function doInitPings(tt,nt,et,rt,ot){const at=new Resolver;let st=0,ut=0,ct=()=>{};const pt=()=>{ut++,ut>=tt.length&&(ut=0),ct()},dt=ht=>{const Mt=Math.random()*.4-.2,mt=st===1?nt:nt*2**(st-1)*(1+Mt),Ot=Math.min(et,mt);rt(st,ht,Ot),window.setTimeout(pt,Ot)},ft=()=>{const ht=tt[ut];new URL(buildHttpUri(ht,"")).hostname==="localhost"?dt(jsx$1(StreamlitMarkdown$1,{source:"\nIs Streamlit still running? If you accidentally stopped Streamlit, just restart it in your terminal:\n\n```bash\nstreamlit run yourscript.py\n```\n ",allowHTML:!1})):dt("Connection failed with status 0.")},bt=()=>{dt(jsxs(reactExports.Fragment,{children:[jsx$1("p",{children:"Cannot connect to Streamlit (HTTP status: 403)."}),jsxs("p",{children:["If you are trying to access a Streamlit app running on another server, this could be due to the app's"," ",jsx$1("a",{href:CORS_ERROR_MESSAGE_DOCUMENTATION_LINK,children:"CORS"})," settings."]})]}))};return ct=()=>{const ht=tt[ut],Mt=buildHttpUri(ht,SERVER_PING_PATH),mt=buildHttpUri(ht,HOST_CONFIG_PATH);ut===0&&st++,Promise.all([axios.get(Mt,{timeout:PING_TIMEOUT_MS}),axios.get(mt,{timeout:PING_TIMEOUT_MS})]).then(([Ot,zt])=>{ot(zt.data),at.resolve(ut)}).catch(Ot=>{if(Ot.code==="ECONNABORTED")return dt("Connection timed out.");if(Ot.response){const{data:zt,status:yt}=Ot.response;return yt===0?ft():yt===403?bt():dt(`Connection failed with status ${yt}, and response "${zt}".`)}return Ot.request?ft():dt(Ot.message)})},ct(),at.promise}const RETRY_COUNT_FOR_WARNING=6;class ConnectionManager{constructor(nt){this.connectionState=ConnectionState.INITIAL,this.setConnectionState=(et,rt)=>{this.connectionState!==et&&(this.connectionState=et,this.props.connectionStateChanged(et)),rt&&this.props.onConnectionError(rt)},this.showRetryError=(et,rt,ot)=>{et===RETRY_COUNT_FOR_WARNING&&this.props.onConnectionError(rt)},this.props=nt,this.connect()}isConnected(){return this.connectionState===ConnectionState.CONNECTED}getBaseUriParts(){if(this.connection instanceof WebsocketConnection)return this.connection.getBaseUriParts()}sendMessage(nt){this.connection instanceof WebsocketConnection&&this.isConnected()?this.connection.sendMessage(nt):logError(`Cannot send message when server is disconnected: ${nt}`)}incrementMessageCacheRunCount(nt){this.connection instanceof WebsocketConnection&&this.connection.incrementMessageCacheRunCount(nt)}async connect(){try{this.connection=await this.connectToRunningServer()}catch(nt){const et=ensureError(nt);logError(et.message),this.setConnectionState(ConnectionState.DISCONNECTED_FOREVER,et.message)}}disconnect(){var nt;(nt=this.connection)==null||nt.disconnect()}connectToRunningServer(){const nt=getPossibleBaseUris();return new WebsocketConnection({sessionInfo:this.props.sessionInfo,endpoints:this.props.endpoints,baseUriPartsList:nt,onMessage:this.props.onMessage,onConnectionStateChange:this.setConnectionState,onRetry:this.showRetryError,claimHostAuthToken:this.props.claimHostAuthToken,resetHostAuthToken:this.props.resetHostAuthToken,onHostConfigResp:this.props.onHostConfigResp})}}class SessionEventDispatcher{constructor(){this.onSessionEvent=new dist.Signal}handleSessionEventMsg(nt){this.onSessionEvent.emit(nt)}}const MEDIA_ENDPOINT="/media",UPLOAD_FILE_ENDPOINT="/_stcore/upload_file",COMPONENT_ENDPOINT_BASE="/component",FORWARD_MSG_CACHE_ENDPOINT="/_stcore/message";class DefaultStreamlitEndpoints{constructor(nt){this.getServerUri=nt.getServerUri,this.csrfEnabled=nt.csrfEnabled}buildComponentURL(nt,et){return buildHttpUri(this.requireServerUri(),`${COMPONENT_ENDPOINT_BASE}/${nt}/${et}`)}setFileUploadClientConfig({prefix:nt,headers:et}){this.fileUploadClientConfig={prefix:nt,headers:et}}buildMediaURL(nt){return nt.startsWith(MEDIA_ENDPOINT)?buildHttpUri(this.requireServerUri(),nt):nt}buildFileUploadURL(nt){return this.fileUploadClientConfig?makePath(this.fileUploadClientConfig.prefix,nt):nt.startsWith(UPLOAD_FILE_ENDPOINT)?buildHttpUri(this.requireServerUri(),nt):nt}buildAppPageURL(nt,et){const rt=et.urlPathname,ot=et.isDefault?"":rt;if(notNullOrUndefined(nt)&&nt.length>0)return`${nt}/${ot}`;const{port:at,protocol:st}=window.location,{basePath:ut,host:ct}=this.requireServerUri(),pt=at?`:${at}`:"",dt=ut?`${ut}/`:"";return`${st}//${ct}${pt}/${dt}${ot}`}async uploadFileUploaderFile(nt,et,rt,ot,at){const st=new FormData;st.append(et.name,et);const ut=this.getAdditionalHeaders();return this.csrfRequest(this.buildFileUploadURL(nt),{cancelToken:at,method:"PUT",data:st,responseType:"text",headers:ut,onUploadProgress:ot}).then(()=>{})}getAdditionalHeaders(){let nt={};return this.fileUploadClientConfig&&(nt={...nt,...this.fileUploadClientConfig.headers}),nt}async deleteFileAtURL(nt,et){const rt=this.getAdditionalHeaders();return this.csrfRequest(this.buildFileUploadURL(nt),{method:"DELETE",data:{sessionId:et},headers:rt}).then(()=>{})}async fetchCachedForwardMsg(nt){const et=this.requireServerUri(),rt=await axios.request({url:buildHttpUri(et,`${FORWARD_MSG_CACHE_ENDPOINT}?hash=${nt}`),method:"GET",responseType:"arraybuffer"});return new Uint8Array(rt.data)}requireServerUri(){const nt=this.getServerUri();if(notNullOrUndefined(nt))return this.cachedServerUri=nt,nt;if(notNullOrUndefined(this.cachedServerUri))return this.cachedServerUri;throw new Error("not connected to a server!")}csrfRequest(nt,et){if(et.url=nt,this.csrfEnabled){const rt=getCookie("_streamlit_xsrf");notNullOrUndefined(rt)&&(et.headers={"X-Xsrftoken":rt,...et.headers||{}},et.withCredentials=!0)}return axios.request(et)}}var assignValue=_assignValue,castPath$1=_castPath,isIndex=_isIndex,isObject=isObject_1,toKey=_toKey;function baseSet$1(tt,nt,et,rt){if(!isObject(tt))return tt;nt=castPath$1(nt,tt);for(var ot=-1,at=nt.length,st=at-1,ut=tt;ut!=null&&++ot<at;){var ct=toKey(nt[ot]),pt=et;if(ct==="__proto__"||ct==="constructor"||ct==="prototype")return tt;if(ot!=st){var dt=ut[ct];pt=rt?rt(dt,ct,ut):void 0,pt===void 0&&(pt=isObject(dt)?dt:isIndex(nt[ot+1])?[]:{})}assignValue(ut,ct,pt),ut=ut[ct]}return tt}var _baseSet=baseSet$1,baseGet=_baseGet,baseSet=_baseSet,castPath=_castPath;function basePickBy$1(tt,nt,et){for(var rt=-1,ot=nt.length,at={};++rt<ot;){var st=nt[rt],ut=baseGet(tt,st);et(ut,st)&&baseSet(at,castPath(st,tt),ut)}return at}var _basePickBy=basePickBy$1,basePickBy=_basePickBy,hasIn=hasIn_1;function basePick$1(tt,nt){return basePickBy(tt,nt,function(et,rt){return hasIn(tt,rt)})}var _basePick=basePick$1,basePick=_basePick,flatRest=_flatRest,pick=flatRest(function(tt,nt){return tt==null?{}:basePick(tt,nt)}),pick_1=pick;const pick$1=getDefaultExportFromCjs$1(pick_1),DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json";class MetricsManager{constructor(nt){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=et=>{this.appHash=et},this.setMetricsConfig=(et="")=>{this.metricsUrl=et},this.sessionInfo=nt}async initialize({gatherUsageStats:nt,sendMessageToHost:et}){this.sendMessageToHost=et,this.actuallySendMetrics=nt&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(logError("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),logAlways("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(nt,et={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([nt,et]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(nt,et))}setMetadata(nt){this.metadata=nt}async requestDefaultMetricsConfig(){const nt=localStorageAvailable();if(nt){const et=window.localStorage.getItem("stMetricsConfig");if(et){this.metricsUrl=et;return}}try{const et=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!et.ok)this.metricsUrl=void 0,logError("Failed to fetch metrics config: ",et.status);else{const rt=await et.json();this.metricsUrl=rt.url??void 0,nt&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(et){logError("Failed to fetch metrics config:",et)}}send(nt,et={}){const rt=this.buildEventProto(nt,et);this.metricsUrl==="postMessage"?this.postMessageEvent(nt,rt):this.track(rt)}sendPendingEvents(){this.pendingEvents.forEach(([nt,et])=>{this.send(nt,et)}),this.pendingEvents=[]}async track(nt){const et=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(nt.toJSON())});await fetch(et)}postMessageEvent(nt,et){this.sendMessageToHost({type:"METRICS_EVENT",eventName:nt,data:et})}buildEventProto(nt,et){const rt=new MetricsEvent({event:nt,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,...this.getContextData()});if(nt==="menuClick")rt.label=et.label;else if(nt==="pageProfile")return new MetricsEvent({...rt,...et});return rt}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3}}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 nt="ajs_anonymous_id",et=localStorageAvailable(),rt=getCookie(nt),ot=et?window.localStorage.getItem(nt):null,at=new Date;at.setFullYear(new Date().getFullYear()+1),rt?(this.anonymousId=rt,et&&window.localStorage.setItem(nt,rt)):ot?(this.anonymousId=JSON.parse(ot),setCookie(nt,this.anonymousId,at)):(this.anonymousId=v4(),setCookie(nt,this.anonymousId,at),et&&window.localStorage.setItem(nt,this.anonymousId))}}const StyledApp=newStyled("div",{target:"e10tffaf0"})(({theme:tt})=>{const nt=hasLightBackgroundColor(tt);return{position:"absolute",background:tt.colors.bgColor,color:tt.colors.bodyText,top:tt.spacing.none,left:tt.spacing.none,right:tt.spacing.none,bottom:tt.spacing.none,colorScheme:nt?"light":"dark",overflow:"hidden","@media print":{float:"none",height:tt.sizes.full,position:"static",overflow:"visible"}}}),StyledRecordAudioLabel=newStyled("label",{target:"e1nhbas40"})({margin:0}),StyledInstruction=newStyled("p",{target:"e1nhbas41"})({margin:0}),ScreencastDialog=({onClose:tt,toggleRecordAudio:nt,recordAudio:et,startRecording:rt})=>{const[ot,at]=reactExports.useState(et),st=reactExports.useCallback(ct=>{const{checked:pt}=ct.target;pt!==ot&&(at(pt),nt())},[ot,nt]),ut=reactExports.useCallback(()=>{rt(),tt()},[rt,tt]);return jsxs(Modal,{isOpen:!0,onClose:tt,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:ot,onChange:st})," ","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:ut,children:"Start recording!"})})]})},StyledVideo=newStyled("video",{target:"ec1y6ev0"})(({theme:tt})=>({width:tt.sizes.full,borderRadius:tt.radii.md})),StyledDialogContainer=newStyled("div",{target:"ec1y6ev1"})(({theme:tt})=>({display:"flex",flexDirection:"column",width:tt.sizes.full})),StyledRow=newStyled("div",{target:"ec1y6ev2"})(({theme:tt})=>({display:"flex",flexDirection:"row",paddingTop:tt.spacing.md,paddingBottom:tt.spacing.md})),StyledFirstColumn=newStyled("div",{target:"ec1y6ev3"})(({theme:tt})=>({paddingRight:tt.spacing.lg,textAlign:"right",color:tt.colors.gray,fontWeight:tt.fontWeights.bold,width:"6em"})),StyledSecondColumn=newStyled("div",{target:"ec1y6ev4"})(({theme:tt})=>({flex:1,paddingRight:tt.spacing.lg,marginRight:"6em",[`@media (max-width: ${tt.breakpoints.sm})`]:{marginRight:tt.spacing.none}})),StyledVideoFormatInstructions=newStyled("p",{target:"ec1y6ev5"})(({theme:tt})=>({marginTop:tt.spacing.sm,marginBottom:tt.spacing.none,fontSize:tt.fontSizes.sm})),StyledDownloadButtonContainer=newStyled("div",{target:"ec1y6ev6"})(({theme:tt})=>({marginTop:tt.spacing.twoXS})),VideoRecordedDialog=({onClose:tt,videoBlob:nt,fileName:et})=>{const rt=URL.createObjectURL(nt),ot=()=>{const at=document.createElement("a");at.setAttribute("href",rt),at.setAttribute("download",`${et}.webm`),at.click(),tt()};return jsxs(Modal,{isOpen:!0,onClose:tt,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:rt,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:ot,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=newStyled("div",{target:"e1xu6skw0"})({display:"flex"}),StyledUnsupportedScreenCastIcon=newStyled("div",{target:"e1xu6skw1"})(({theme:tt})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:tt.spacing.twoXL,marginLeft:tt.spacing.sm,fontSize:tt.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=newStyled("p",{target:"e1xu6skw2"})(({theme:tt})=>({margin:tt.spacing.none})),UnsupportedBrowserDialog=({onClose:tt})=>jsxs(Modal,{isOpen:!0,onClose:tt,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),screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=newStyled("div",{target:"e1442ngl0"})(({theme:tt})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:tt.sizes.full,height:tt.sizes.full,fontSize:"40vh",color:tt.colors.red,fontWeight:tt.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${tt.colors.darkGray}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:tt,endCallback:nt})=>{const[et,rt]=reactExports.useState(tt);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const at=et-1;at>=0&&rt(at),at===0&&nt()},children:jsx$1("span",{children:et})},`frame${et}`)};function withScreencast(tt){const et=class et extends reactExports.PureComponent{constructor(){super(...arguments),this.state={fileName:"streamlit-screencast",recordAudio:!1,currentState:this.props.testOverride||"OFF"},this.toggleRecordAudio=()=>{const{recordAudio:ot}=this.state;this.setState({recordAudio:!ot})},this.showDialog=ot=>{const{currentState:at}=this.state;ScreenCastRecorder.isSupportedBrowser()?at==="OFF"?this.setState({fileName:ot,currentState:"SETUP"}):this.stopRecording().catch(st=>logWarning(`withScreencast.stopRecording threw an error: ${st}`)):this.setState({currentState:"UNSUPPORTED"})},this.startRecording=async()=>{const{recordAudio:ot}=this.state;this.recorder=new ScreenCastRecorder({recordAudio:ot,onErrorOrStop:()=>this.stopRecording()});try{await this.recorder.initialize()}catch{this.setState({currentState:"UNSUPPORTED"});return}this.setState({currentState:"COUNTDOWN"})},this.stopRecording=async()=>{let ot;const{currentState:at}=this.state;at==="OFF"||isNullOrUndefined$1(this.recorder)||(at==="COUNTDOWN"&&this.setState({currentState:"OFF"}),at==="RECORDING"&&(this.recorder.getState()==="inactive"?this.setState({currentState:"OFF"}):(ot=await this.recorder.stop(),this.setState({outputBlob:ot,currentState:"PREVIEW_FILE"}))))},this.onCountdownEnd=async()=>{if(isNullOrUndefined$1(this.recorder))throw new Error("Countdown finished but recorder is null");this.recorder.start()?this.setState({currentState:"RECORDING"}):this.stopRecording().catch(at=>logWarning(`withScreencast.stopRecording threw an error: ${at}`))},this.getScreenCastProps=()=>({currentState:this.state.currentState,toggleRecordAudio:this.toggleRecordAudio,startRecording:this.showDialog,stopRecording:this.stopRecording}),this.closeDialog=()=>{this.setState({currentState:"OFF"})},this.render=()=>{const{outputBlob:ot,fileName:at,recordAudio:st,currentState:ut}=this.state;return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(tt,{...this.props,screenCast:this.getScreenCastProps()}),ut==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:this.closeDialog}),ut==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:st,onClose:this.closeDialog,startRecording:this.startRecording,toggleRecordAudio:this.toggleRecordAudio}),ut==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:this.onCountdownEnd}),ut==="PREVIEW_FILE"&&ot&&jsx$1(VideoRecordedDialog,{onClose:this.closeDialog,videoBlob:ot,fileName:at})]})}}};et.displayName=`withScreencast(${tt.displayName||tt.name})`;let nt=et;return hoistNonReactStatics$2(nt,tt)}const showDevelopmentOptions=(tt,nt)=>nt==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==nt||Config.ToolbarMode.MINIMAL==nt?!1:tt||isLocalhost();function getTitle(tt){return tt||"Streamlit"}class StrategyV1{constructor(nt){this.appNav=nt,this.appPages=[],this.currentPageScriptHash=null,this.hideSidebarNav=null}handleNewSession(nt){var st,ut;this.appPages=nt.appPages,this.currentPageScriptHash=nt.pageScriptHash,this.hideSidebarNav=((st=nt.config)==null?void 0:st.hideSidebarNav)??!1;const et=this.appPages[0],rt=et.urlPathname??"",ot=((ut=this.appPages.find(ct=>ct.pageScriptHash===this.currentPageScriptHash))==null?void 0:ut.urlPathname)??"",at=et.pageScriptHash===this.currentPageScriptHash;return this.appNav.onUpdatePageUrl(rt,ot,at),document.title=getTitle(ot??""),[{hideSidebarNav:this.hideSidebarNav,appPages:this.appPages,currentPageScriptHash:this.currentPageScriptHash},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:this.appPages}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:at?"":ot,currentPageScriptHash:this.currentPageScriptHash})}]}handlePagesChanged(nt){const{appPages:et}=nt;return[{appPages:et},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:et})}]}handlePageNotFound(nt){var ot;const{pageName:et}=nt;this.appNav.onPageNotFound(et);const rt=((ot=this.appPages[0])==null?void 0:ot.pageScriptHash)??"";return this.currentPageScriptHash=rt,[{currentPageScriptHash:rt},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:rt})}]}handleNavigation(nt){}findPageByUrlPath(nt){return this.appPages.length===0?null:this.appPages.find(et=>nt.endsWith("/"+et.urlPathname))??this.appPages[0]}clearPageElements(nt,et,rt){return AppRoot.empty(et,!1,rt,nt.logo)}}class StrategyV2{constructor(nt){this.appNav=nt,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(nt){var et;return this.mainScriptHash=nt.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=((et=nt.config)==null?void 0:et.hideSidebarNav)??null),document.title=getTitle(""),[{hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handlePagesChanged(nt){}handlePageNotFound(nt){const{pageName:et}=nt;return this.appNav.onPageNotFound(et),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}handleNavigation(nt){const{sections:et,position:rt,appPages:ot}=nt;this.appPages=ot,this.hideSidebarNav=rt===Navigation.Position.HIDDEN;const at=nt.pageScriptHash,st=ot.find(pt=>pt.pageScriptHash===at),ut=ot.find(pt=>pt.isDefault);this.mainPage=ut;const ct=st.urlPathname;if(!this.appNav.isPageTitleSet){const pt=getTitle(st.pageName);document.title=pt,this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:st.pageName??""})}return!this.appNav.isPageIconSet&&st.icon&&this.appNav.onPageIconChange(st.icon),this.appNav.onUpdatePageUrl(ut.urlPathname??"",ct,st.isDefault??!1),[{appPages:ot,navSections:et,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:nt.expanded,currentPageScriptHash:at},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:ot}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:st.isDefault?"":ct,currentPageScriptHash:at})}]}findPageByUrlPath(nt){return this.appPages.find(et=>nt.endsWith("/"+et.urlPathname))??this.mainPage}clearPageElements(nt,et,rt){return nt.filterMainScriptElements(et)}}class AppNavigation{constructor(nt,et,rt,ot){this.hostCommunicationMgr=nt,this.onUpdatePageUrl=et,this.onPageNotFound=rt,this.onPageIconChange=ot,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.strategy=new StrategyV1(this)}handleNewSession(nt){return this.isPageTitleSet=!1,this.isPageIconSet=!1,this.strategy.handleNewSession(nt)}handleNavigation(nt){return this.strategy instanceof StrategyV1&&(this.strategy=new StrategyV2(this)),this.strategy.handleNavigation(nt)}handlePagesChanged(nt){return this.strategy.handlePagesChanged(nt)}handlePageNotFound(nt){return this.strategy.handlePageNotFound(nt)}findPageByUrlPath(nt){return this.strategy.findPageByUrlPath(nt)}handlePageConfigChanged(nt){this.isPageIconSet=!!nt.favicon,this.isPageTitleSet=!!nt.title}clearPageElements(nt,et,rt){return this.strategy.clearPageElements(nt,et,rt)}}const ELEMENT_LIST_BUFFER_TIMEOUT_MS=10,INITIAL_SCRIPT_RUN_ID="<null>";class App extends reactExports.PureComponent{constructor(nt){super(nt),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.showDeployError=(rt,ot,at)=>{this.openDialog({type:DialogType.DEPLOY_ERROR,title:rt,msg:ot,onContinue:at,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg})},this.handleThemeMessage=(rt,ot)=>{const[,at,st]=createPresetThemes(),ut=isPresetTheme(this.props.theme.activeTheme);rt===at.name&&ut?this.props.theme.setTheme(at):rt===st.name&&ut?this.props.theme.setTheme(st):ot&&this.props.theme.setImportedTheme(ot)},this.handleConnectionStateChanged=rt=>{if(logMessage(`Connection state changed from ${this.state.connectionState} to ${rt}`),rt===ConnectionState.CONNECTED){const ot=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||this.state.scriptRunState===ScriptRunState.RUNNING;(!this.sessionInfo.last||ot)&&(this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:rt!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.clearCurrent();this.setState({connectionState:rt})},this.handleGitInfoChanged=rt=>{this.setState({gitInfo:rt})},this.handleCustomParentMessage=rt=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:rt.message}):logError("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=rt=>{const ot=(at,st,ut)=>{const ct=at[st];if(ct in ut)return ut[ct](at[ct]);throw new Error(`Cannot handle ${st} "${ct}".`)};try{ot(rt,"type",{newSession:at=>this.handleNewSession(at),sessionStatusChanged:at=>this.handleSessionStatusChanged(at),sessionEvent:at=>this.handleSessionEvent(at),delta:at=>this.handleDeltaMsg(at,rt.metadata),pageConfigChanged:at=>this.handlePageConfigChanged(at),pageInfoChanged:at=>this.handlePageInfoChanged(at),pagesChanged:at=>this.handlePagesChanged(at),pageNotFound:at=>this.handlePageNotFound(at),gitInfoChanged:at=>this.handleGitInfoChanged(at),scriptFinished:at=>this.handleScriptFinished(at),pageProfile:at=>this.handlePageProfileMsg(at),autoRerun:at=>this.handleAutoRerun(at),fileUrlsResponse:at=>this.uploadClient.onFileURLsResponse(at),parentMessage:at=>this.handleCustomParentMessage(at),logo:at=>this.handleLogo(at,rt.metadata),navigation:at=>this.handleNavigation(at)})}catch(at){const st=ensureError(at);logError(st),this.showError("Bad message format",st.message)}},this.handleLogo=(rt,ot)=>{const at={activeScriptHash:ot.activeScriptHash,scriptRunId:this.state.scriptRunId};this.setState({elements:this.pendingElementsBuffer.appRootWithLogo(rt,at)},()=>{this.pendingElementsBuffer=this.state.elements})},this.handlePageConfigChanged=rt=>{const{title:ot,favicon:at,layout:st,initialSidebarState:ut,menuItems:ct}=rt;this.appNavigation.handlePageConfigChanged(rt),ot&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:ot}),document.title=ot),at&&this.onPageIconChanged(at),st!==this.state.layout&&this.setState(pt=>({layout:st,userSettings:{...pt.userSettings,wideMode:st===PageConfig.Layout.WIDE}})),ut!==this.state.initialSidebarState&&this.setState(()=>({initialSidebarState:ut})),this.setState({menuItems:ct})},this.handlePageInfoChanged=rt=>{const{queryString:ot}=rt,at=document.location.pathname+(ot?`?${ot}`:"");window.history.pushState({},"",at),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:ot?`?${ot}`:""})},this.onPageNotFound=rt=>{const ot=rt?`You have requested page /${rt}, 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",`${ot}. Running the app's main page.`)},this.handlePageNotFound=rt=>{this.maybeSetState(this.appNavigation.handlePageNotFound(rt))},this.onPageIconChanged=rt=>{handleFavicon(rt,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handlePagesChanged=rt=>{this.maybeSetState(this.appNavigation.handlePagesChanged(rt))},this.handleNavigation=rt=>{this.maybeSetState(this.appNavigation.handleNavigation(rt))},this.handlePageProfileMsg=rt=>{var st,ut,ct;const ot=PageProfile.toObject(rt),at=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...ot,isFragmentRun:!!ot.isFragmentRun,appId:this.sessionInfo.current.appId,numPages:(st=this.state.appPages)==null?void 0:st.length,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,pageScriptHash:this.state.currentPageScriptHash,activeTheme:(ct=(ut=this.props.theme)==null?void 0:ut.activeTheme)==null?void 0:ct.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:at})},this.handleAutoRerun=rt=>{const ot=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(rt.fragmentId,!0)},rt.interval*1e3);this.setState(at=>({autoReruns:[...at.autoReruns,ot]}))},this.handleSessionStatusChanged=rt=>{this.setState(ot=>{let{scriptRunState:at}=ot,{dialog:st}=ot;return rt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.STOP_REQUESTED?(at=ScriptRunState.RUNNING,notNullOrUndefined(st)&&st.type===DialogType.SCRIPT_COMPILE_ERROR&&(st=void 0)):!rt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&ot.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(at=ScriptRunState.NOT_RUNNING),{userSettings:{...ot.userSettings,runOnSave:!!rt.runOnSave},dialog:st,scriptRunState:at}})},this.handleSessionEvent=rt=>{if(this.sessionEventDispatcher.handleSessionEventMsg(rt),rt.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const ot={type:DialogType.SCRIPT_COMPILE_ERROR,exception:rt.scriptCompilationException,onClose:()=>{}};this.openDialog(ot)}},this.maybeUpdatePageUrl=(rt,ot,at)=>{const st=this.getBaseUriParts();if(st){const{basePath:ut}=st,ct=extractPageNameFromPathName(document.location.pathname,ut);if((ct===""?rt:ct)!==ot){const dt=at?"":ot,ft=preserveEmbedQueryParams(),bt=ft?`?${ft}`:"",Mt=`${ut?`/${ut}`:""}/${dt}${bt}`;window.history.pushState({},"",Mt)}}},this.handleNewSession=rt=>{const ot=rt.initialize;if(this.hasStreamlitVersionChanged(ot)){window.location.reload();return}this.sessionInfo.isSet||this.handleOneTimeInitialization(rt);const{appHash:at,currentPageScriptHash:st}=this.state,{scriptRunId:ut,name:ct,mainScriptPath:pt,fragmentIdsThisRun:dt,pageScriptHash:ft,mainScriptHash:bt}=rt;if(dt.length)this.setState({fragmentIdsThisRun:dt,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Mt=rt.config,mt=rt.customTheme;this.processThemeInput(mt),this.setState({allowRunOnSave:Mt.allowRunOnSave,hideTopBar:Mt.hideTopBar,toolbarMode:Mt.toolbarMode,latestRunTime:performance.now(),mainScriptHash:bt,fragmentIdsThisRun:dt}),this.maybeSetState(this.appNavigation.handleNewSession(rt)),this.onPageIconChanged("./favicon.png")}const ht=hashString(this.sessionInfo.current.installationId+pt);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(ht),this.metricsMgr.enqueue("updateReport"),at===ht&&st===ft?this.setState({scriptRunId:ut}):this.clearAppState(ht,ut,ct,bt)},this.handleOneTimeInitialization=rt=>{const ot=rt.initialize,at=rt.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(rt)),this.metricsMgr.initialize({gatherUsageStats:at.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(ot.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:rt}=this.state,ot=this.appNavigation.findPageByUrlPath(document.location.pathname),at=document.location.toString().includes("#"),st=(ot==null?void 0:ot.pageScriptHash)===rt;isNullOrUndefined$1(ot)||at&&st||this.onPageChange(ot.pageScriptHash)},this.setAndSendTheme=rt=>{this.props.theme.setTheme(rt),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(rt.emotion)})},this.createThemeHash=rt=>{if(!rt)return"hash_for_undefined_custom_theme";const ot=Object.entries(rt);return ot.sort(),hashString(ot.join(":"))},this.closeDialog=()=>{this.setState({dialog:void 0})},this.saveSettings=rt=>{const{runOnSave:ot}=this.state.userSettings,{runOnSave:at}=rt;if(this.setState({userSettings:rt}),ot!==at&&this.isServerConnected()){const st=new BackMsg({setRunOnSave:at});st.type="setRunOnSave",this.sendBackMsg(st)}},this.handleDeltaMsg=(rt,ot)=>{if(this.pendingElementsBuffer=this.pendingElementsBuffer.applyDelta(this.state.scriptRunId,rt,ot),!this.pendingElementsTimerRunning){this.pendingElementsTimerRunning=!0;const at=this.state.scriptRunState===ScriptRunState.RUNNING;setTimeout(()=>{this.pendingElementsTimerRunning=!1,at&&this.setState({elements:this.pendingElementsBuffer})},ELEMENT_LIST_BUFFER_TIMEOUT_MS)}},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const rt=new BackMsg({debugShutdownRuntime:!0});rt.type="debugShutdownRuntime",this.sendBackMsg(rt)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const rt=new BackMsg({debugDisconnectWebsocket:!0});rt.type="debugDisconnectWebsocket",this.sendBackMsg(rt)}},this.debugClearForwardMsgCache=()=>{var rt,ot;isLocalhost()&&((ot=(rt=this.connectionManager)==null?void 0:rt.connection)==null||ot.cache.messages.clear())},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(rt=>{clearInterval(rt)}),this.setState({autoReruns:[]})},this.rerunScript=(rt=!1)=>{if(this.closeDialog(),!this.isServerConnected()){logError("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}),rt===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){logError("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=rt=>{const{elements:ot,mainScriptHash:at}=this.state;this.cleanupAutoReruns();const st=this.appNavigation.clearPageElements(ot,at,void 0),ut=new Set(Array.from(st.getElements()).map(ct=>getElementId(ct)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(ut),void 0,rt)},this.isAppInReadyState=rt=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&rt.scriptRunState===ScriptRunState.RUNNING&&rt.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(rt,ot,at,st)=>{const ut=this.getBaseUriParts();if(!ut){logError("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:ct}=this.state,{basePath:pt}=ut;let dt=this.getQueryString(),ft="";at?at!=ct&&(dt=preserveEmbedQueryParams(),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:dt})):ct?at=ct:(ft=extractPageNameFromPathName(document.location.pathname,pt),at=""),this.sendBackMsg(new BackMsg({rerunScript:{queryString:dt,widgetStates:rt,pageScriptHash:at,pageName:ft,fragmentId:ot,isAutoRerun:st}})),PerformanceEvents.record({name:"RequestedRerun",scriptRunState:this.state.scriptRunState})},this.stopScript=()=>{if(!this.isServerConnected()){logError("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const rt=new BackMsg({stopScript:!0});rt.type="stopScript",this.sendBackMsg(rt),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const rt={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(rt)}else logError("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{var ot;const rt={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:((ot=this.state.dialog)==null?void 0:ot.type)===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr};this.openDialog(rt)},this.openThemeCreatorDialog=()=>{this.metricsMgr.enqueue("menuClick",{label:"editTheme"});const rt={type:DialogType.THEME_CREATOR,backToSettings:this.settingsCallback,onClose:this.closeDialog,metricsMgr:this.metricsMgr};this.openDialog(rt)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const rt=new BackMsg({clearCache:!0});rt.type="clearCache",this.sendBackMsg(rt)}else logError("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const rt=new BackMsg({appHeartbeat:!0});rt.type="appHeartbeat",this.sendBackMsg(rt)}else logError("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=rt=>{this.connectionManager?this.connectionManager.sendMessage(rt):logError(`Not connected. Cannot send back message: ${rt}`)},this.handleConnectionError=rt=>{this.showError("Connection error",rt)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(rt=!0)=>{const ot={type:DialogType.SETTINGS,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},developerMode:showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),openThemeCreator:this.openThemeCreatorDialog,animateModal:rt,metricsMgr:this.metricsMgr};this.openDialog(ot)},this.aboutCallback=()=>{const{menuItems:rt}=this.state,ot={type:DialogType.ABOUT,sessionInfo:this.sessionInfo,onClose:this.closeDialog,aboutSectionMd:rt==null?void 0:rt.aboutSectionMd};this.openDialog(ot)},this.printCallback=()=>{const{scriptRunState:rt}=this.state;if(rt!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let ot;try{const at=getIFrameEnclosingApp(this.embeddingId);at&&at.contentWindow?ot=at.contentWindow.window:ot=window}catch{ot=window}finally{ot||(ot=window),ot.print()}},this.screencastCallback=()=>{const{scriptName:rt}=this.state,{startRecording:ot}=this.props.screenCast,at=hooks().format("YYYY-MM-DD-HH-MM-SS");ot(`streamlit-${rt}-${at}`)},this.handleFullScreen=rt=>{this.setState({isFullScreen:rt})},this.setLibConfig=rt=>{this.setState({libConfig:rt})},this.setAppConfig=rt=>{this.setState({appConfig:rt})},this.addScriptFinishedHandler=rt=>{this.setState((ot,at)=>({scriptFinishedHandlers:ot.scriptFinishedHandlers.concat(rt)}))},this.removeScriptFinishedHandler=rt=>{this.setState((ot,at)=>({scriptFinishedHandlers:without$1(ot.scriptFinishedHandlers,rt)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:rt}=this.state,ot=rt&&rt.length>0?rt:document.location.search;return ot.startsWith("?")?ot.substring(1):ot},this.isInCloudEnvironment=()=>{const{hostMenuItems:rt}=this.state;return rt&&(rt==null?void 0:rt.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=(rt,ot)=>{if(this.isServerConnected()){const at=new BackMsg({fileUrlsRequest:{requestId:rt,fileNames:ot.map(st=>st.name),sessionId:this.sessionInfo.current.sessionId}});at.type="fileUrlsRequest",this.sendBackMsg(at)}},this.handleKeyDown=rt=>{switch(rt){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=rt=>{rt==="esc"&&this.props.screenCast.stopRecording()},J$1();let et=this.createThemeHash();isPresetTheme(nt.theme.activeTheme)||(et=this.createThemeHash(toThemeInput(nt.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},layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:et,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},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:rt=>this.setState({formsData:rt})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:nt.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:rt=>{this.setState({inputsDisabled:rt})},themeChanged:this.handleThemeMessage,pageChanged:this.onPageChange,isOwnerChanged:rt=>this.setState({isOwner:rt}),fileUploadClientConfigChanged:rt=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(rt)},hostMenuItemsChanged:rt=>{this.setState({hostMenuItems:rt})},hostToolbarItemsChanged:rt=>{this.setState({hostToolbarItems:rt})},hostHideSidebarNavChanged:rt=>{this.setState({hostHideSidebarNav:rt})},sidebarChevronDownshiftChanged:rt=>{this.setState({sidebarChevronDownshift:rt})},pageLinkBaseUrlChanged:rt=>{this.setState({pageLinkBaseUrl:rt})},queryParamsChanged:rt=>{this.setState({queryParams:rt})},deployedAppMetadataChanged:rt=>{this.setState({deployedAppMetadata:rt})},restartWebsocketConnection:()=>{this.connectionManager||this.initializeConnectionManager()},terminateWebsocketConnection:()=>{var rt;(rt=this.connectionManager)==null||rt.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:rt=>this.widgetMgr.setFormsWithUploadsInProgress(rt),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.pendingElementsTimerRunning=!1,this.pendingElementsBuffer=this.state.elements,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.connectionManager=new ConnectionManager({sessionInfo:this.sessionInfo,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,onHostConfigResp:nt=>{const{allowedOrigins:et,useExternalAuthToken:rt,disableFullscreenMode:ot,enableCustomParentMessages:at,mapboxToken:st,enforceDownloadInNewTab:ut,metricsUrl:ct}=nt,pt={allowedOrigins:et,useExternalAuthToken:rt,enableCustomParentMessages:at},dt={mapboxToken:st,disableFullscreenMode:ot,enforceDownloadInNewTab:ut};this.metricsMgr.setMetricsConfig(ct),this.hostCommunicationMgr.setAllowedOrigins(pt),this.setAppConfig(pt),this.setLibConfig(dt)}})}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 nt=document.querySelectorAll("[data-iframe-height]"),et=Array.from(nt).map(rt=>Math.ceil(rt.getBoundingClientRect().bottom));return Math.max(0,...et)}},__vitePreload(()=>import("./iframeResizer.contentWindow.Bd3a4rtP.js").then(nt=>nt.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(nt,et){window.prerenderReady===!1&&this.isAppInReadyState(et)&&(window.prerenderReady=!0),this.state.scriptRunState!==et.scriptRunState&&(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}))}componentWillUnmount(){var nt;(nt=this.connectionManager)==null||nt.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}showError(nt,et){logError(et);const rt={type:DialogType.WARNING,title:nt,msg:et,onClose:()=>{}};this.openDialog(rt)}hasStreamlitVersionChanged(nt){if(this.sessionInfo.isSet){const et=this.sessionInfo.current.streamlitVersion,{environmentInfo:rt}=nt;if(notNullOrUndefined(rt)&&notNullOrUndefined(rt.streamlitVersion))return et!=rt.streamlitVersion}return!1}maybeSetState(nt){if(nt){const[et,rt]=nt;this.setState(et,rt)}}processThemeInput(nt){const et=this.createThemeHash(nt);if(et===this.state.themeHash)return;this.setState({themeHash:et});const rt=!isPresetTheme(this.props.theme.activeTheme);if(nt){const ot=createTheme(CUSTOM_THEME_NAME,nt);this.props.theme.addThemes([ot]),(getCachedTheme()===null||rt)&&this.setAndSendTheme(ot)}else this.props.theme.addThemes([]),rt&&this.setAndSendTheme(getHostSpecifiedTheme())}handleScriptFinished(nt){if(nt===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){if(window.setTimeout(()=>{this.state.scriptFinishedHandlers.map(et=>et())},0),nt===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){this.setState(({scriptRunId:rt,fragmentIdsThisRun:ot})=>({elements:this.pendingElementsBuffer.clearStaleNodes(rt,ot)}),()=>{this.pendingElementsBuffer=this.state.elements});const et=new Set(Array.from(this.state.elements.getElements()).map(rt=>getElementId(rt)).filter(notUndefined));this.widgetMgr.removeInactive(et)}this.connectionManager!==null&&nt!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge)}}clearAppState(nt,et,rt,ot){const{hideSidebarNav:at,elements:st}=this.state,ut=at&&st.sidebar||void 0;this.setState({scriptRunId:et,scriptName:rt,appHash:nt,elements:this.appNavigation.clearPageElements(this.pendingElementsBuffer,ot,ut)},()=>{this.pendingElementsBuffer=this.state.elements;const ct=new Set(Array.from(this.state.elements.getElements()).map(pt=>getElementId(pt)).filter(notUndefined));this.widgetMgr.removeInactive(ct)})}openDialog(nt){this.setState({dialog:nt})}render(){const{allowRunOnSave:nt,connectionState:et,dialog:rt,elements:ot,initialSidebarState:at,menuItems:st,isFullScreen:ut,scriptRunId:ct,scriptRunState:pt,userSettings:dt,hideTopBar:ft,hideSidebarNav:bt,expandSidebarNav:ht,currentPageScriptHash:Mt,hostHideSidebarNav:mt,pageLinkBaseUrl:Ot,sidebarChevronDownshift:zt,hostMenuItems:yt,hostToolbarItems:vt,libConfig:At,appConfig:St,inputsDisabled:Et,appPages:Tt,navSections:Rt}=this.state,Ct=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),wt=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":dt.wideMode}),Lt=rt?StreamlitDialog({...rt,onClose:this.closeDialog}):null,Ht=Et||et!==ConnectionState.CONNECTED;return jsx$1(AppContext.Provider,{value:{initialSidebarState:at,wideMode:dt.wideMode,embedded:isEmbed(),showPadding:!isEmbed()||isPaddingDisplayed(),disableScrolling:isScrollingHidden(),showToolbar:!isEmbed()||isToolbarDisplayed(),showColoredLine:!isEmbed()||isColoredLineDisplayed(),pageLinkBaseUrl:Ot,sidebarChevronDownshift:zt,gitInfo:this.state.gitInfo,appConfig:St},children:jsx$1(LibContext.Provider,{value:{isFullScreen:ut,setFullScreen:this.handleFullScreen,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,addThemes:this.props.theme.addThemes,onPageChange:this.onPageChange,currentPageScriptHash:Mt,libConfig:At,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language},children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:wt,"data-testid":"stApp","data-test-script-state":ct==INITIAL_SCRIPT_RUN_ID?"initial":pt,"data-test-connection-state":et,children:[jsxs(Header,{children:[!ft&&jsxs(Fragment,{children:[jsx$1(StatusWidget,{connectionState:et,sessionEventDispatcher:this.sessionEventDispatcher,scriptRunState:pt,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:nt}),jsx$1(ToolbarActions,{hostToolbarItems:vt,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr})]}),this.showDeployButton()&&jsx$1(DeployButton,{onClick:this.deployButtonClicked.bind(this)}),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:yt,developmentMode:Ct,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:st,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]}),jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:ot,scriptRunId:ct,scriptRunState:pt,widgetMgr:this.widgetMgr,widgetsDisabled:Ht,uploadClient:this.uploadClient,componentRegistry:this.componentRegistry,formsData:this.state.formsData,appLogo:ot.logo,appPages:Tt,navSections:Rt,onPageChange:this.onPageChange,currentPageScriptHash:Mt,hideSidebarNav:bt||mt,expandSidebarNav:ht}),Lt]})})})})}}const AppWithScreencast=withScreencast(App);function useThemeManager(){const tt=getDefaultTheme(),[nt,et]=reactExports.useState(tt),[rt,ot]=reactExports.useState([]),[at,st]=reactExports.useState([...createPresetThemes(),...isPresetTheme(tt)?[]:[tt]]),ut=ft=>{st([...createPresetThemes(),...ft])},ct=reactExports.useCallback(ft=>{ft!==nt&&(et(ft),ft.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(ft))},[et,nt]),pt=reactExports.useCallback(()=>{nt.name===AUTO_THEME_NAME&&ct(getHostSpecifiedTheme());const ft=at.filter(bt=>bt.name!==AUTO_THEME_NAME);st([createAutoTheme(),...ft])},[nt.name,at,ct]),dt=reactExports.useCallback(ft=>{ft.fontFaces&&ot(ft.fontFaces);const bt=new CustomThemeConfig(ft),ht=createTheme(CUSTOM_THEME_NAME,bt);ct(ht)},[ot,ct]);return reactExports.useEffect(()=>{const ft=window.matchMedia("(prefers-color-scheme: dark)");return ft.addEventListener("change",pt),window.addEventListener("afterprint",pt),()=>{window.removeEventListener("afterprint",pt),ft.removeEventListener("change",pt)}},[nt,at,pt]),[{setTheme:ct,activeTheme:nt,addThemes:ut,availableThemes:at,setImportedTheme:dt},rt]}const ThemedApp=({streamlitExecutionStartedAt:tt})=>{const[nt,et]=useThemeManager(),{activeTheme:rt}=nt,ot=rt.name===CUSTOM_THEME_NAME&&et.length>0;return jsx$1(RootStyleProvider,{theme:rt,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[ot&&jsx$1(FontFaceDeclaration,{fontFaces:et}),jsx$1(AppWithScreencast,{theme:nt,streamlitExecutionStartedAt:tt})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"});ReactDOM.render(jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})}),document.getElementById("root"));export{logWarning as $,isNullOrUndefined$1 as A,merge$6 as B,numbro$1 as C,notNullOrUndefined as D,EmotionIconBase as E,Fragment as F,hooks as G,formatPeriodType as H,moment$1 as I,getTypeName as J,format as K,convertToSeconds as L,useTheme as M,Arrow$2 as N,logError as O,PortalContext as P,_defineProperty$u as Q,React$1 as R,_objectWithoutProperties$o as S,_typeof$g as T,jsx as U,css$2 as V,_toConsumableArray$3 as W,transparentize as X,convertRemToPx as Y,mix$1 as Z,_extends$Q as _,range$1 as a,labelVisibilityProtoValueToEnum as a$,isEqual$1 as a0,StyledTooltipContentWrapper as a1,StreamlitMarkdown$1 as a2,PLACEMENT as a3,ACCESSIBILITY_TYPE as a4,hasLightBackgroundColor as a5,Popover$1 as a6,LibContext as a7,jsxs as a8,Resizable as a9,DeckGlJsonChart$1 as aA,_unsupportedIterableToArray$l as aB,getAugmentedNamespace as aC,DEFAULT_IFRAME_FEATURE_POLICY as aD,DEFAULT_IFRAME_SANDBOX_POLICY as aE,darken as aF,BaseButtonSize as aG,BaseButtonKind as aH,BaseButtonTooltip as aI,DynamicButtonLabel as aJ,IsSidebarContext as aK,Placement as aL,getGray90 as aM,getIncreasingGreen as aN,getDecreasingRed as aO,PlotlyChart$1 as aP,keysToSnakeCase as aQ,WindowDimensionsContext as aR,Video$1 as aS,zip$1 as aT,FileUploaderState as aU,UploadedFileInfo as aV,StyledSpinner as aW,ENABLE_PERIPHERALS_DOCS_URL as aX,Icon$2 as aY,BaseButton as aZ,blend as a_,IndexTypeName as aa,_baseMerge as ab,_createAssigner as ac,getGray70 as ad,getGray30 as ae,getCategoricalColorsArray as af,getDivergingColorsArray as ag,getSequentialColorsArray as ah,getBlue80 as ai,debounce$4 as aj,Global as ak,ensureError as al,withTheme as am,DynamicIcon as an,toaster as ao,Kind as ap,AlertElement as aq,_assertThisInitialized$e as ar,StyledInlineCode as as,ErrorElement as at,axios as au,Skeleton$1 as av,Skeleton as aw,hoistNonReactStatics$2 as ax,lib$3 as ay,parseToRgba as az,reactDomExports as b,TextInput$1 as b$,TooltipIcon as b0,WidgetLabel as b1,Tooltip as b2,styled as b3,getOverrides as b4,LocaleContext as b5,ButtonGroup$1 as b6,LabelVisibilityMessage as b7,StyledWidgetLabelHelpInline as b8,themeColors as b9,isPresetTheme as bA,classNames as bB,UISelectbox as bC,isValidFormId as bD,toPropertyKey as bE,_setPrototypeOf$e as bF,hexToRgb as bG,withWrapper as bH,StyledWidgetInstructions as bI,isFromMac as bJ,CUSTOM_INPUT_TYPE as bK,SIZE$1 as bL,DeleteAlt$1 as bM,ADJOINED as bN,filterOptions as bO,ENHANCER_POSITION as bP,pick$1 as bQ,Slider$2 as bR,isFromWindows as bS,__awaiter as bT,__generator as bU,__spread as bV,PropTypes as bW,ChevronLeft as bX,ChevronRight as bY,isInForm as bZ,toString_1 as b_,isMobile_1 as ba,CAMERA_PERMISSION_URL as bb,StyledWidgetLabelHelp as bc,isFocusVisible as bd,getOverride as be,getOverrideProps as bf,Checkbox$1 as bg,StyledContent as bh,StyledCheckbox$1 as bi,BaseColorPicker as bj,useStyletron as bk,mergeOverride as bl,toObjectOverride as bm,Icon$1 as bn,UIDConsumer as bo,StatefulMenu as bp,mergeOverrides as bq,ChevronDown$1 as br,ThemeContext as bs,forkFocus as bt,forkBlur as bu,Select as bv,without$1 as bw,fuzzyFilterSelectOptions as bx,TYPE as by,VirtualDropdown as bz,_hasPath as c,ThemeProvider$1 as c0,createThemedStyled as c1,createThemedUseStyletron as c2,createThemedWithStyle as c3,expandBorderStyles as c4,withStyle as c5,reactIsExports$1 as c6,NumberInput$1 as c7,commonjsGlobal$1 as d,classnamesExports as e,_root as f,getDefaultExportFromCjs$1 as g,isObject_1 as h,isPropValid as i,jsx$1 as j,keyframes as k,_Set as l,_setToArray as m,newStyled as n,_SetCache as o,propTypesExports as p,_arrayIncludes as q,reactExports as r,_arrayIncludesWith as s,toNumber_1 as t,_cacheHas as u,groupBy$1 as v,__vitePreload as w,flatten$2 as x,require$$0 as y,toString$9 as z};