PageSourceSearch

https://scorpion-3003-enterprise-rag-system.hf.space/static/js/index.k-9rUdPI.js

js scorpion-3003-enterprise-rag-system.hf.space collected 2026-10-04 17:21:31 UTC 242,314 bytes, 25 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./axios.BPGFmyVv.js","./chunk.DuxOD-Sk.js","./iframeResizer.contentWindow.DWzQ-oz2.js"])))=>i.map(i=>d[i]);
2import{a as e,n as t,o as n,r,t as i}from"./chunk.DuxOD-Sk.js";import{r as a}from"./emotion-is-prop-valid.esm.DV_OErv-.js";import{_ as o,c as s,h as c,i as l,l as u,o as d,p as f,r as p,s as m,t as h}from"./emotion-styled.browser.esm.j1V2KkYw.js";import{t as g}from"./loglevel.H4SN4KQm.js";import{a as _,i as v,r as y}from"./isLength.Dot76Eow.js";import{C as b,E as x,G as S,N as C,S as w,f as T,it as E,j as D,nt as O,rt as ee,w as k,x as A}from"./getColors.BEaEwBzZ.js";import{$ as j,E as M,O as N,Q as P,S as te,T as ne,Z as F,_ as re,b as ie,et as ae,i as oe,k as se,l as ce,nt as le,r as I,rt as L,tt as ue,u as de,v as fe,y as pe}from"./protobuf.DYxUUxb3.js";import{$ as me,An as he,C as ge,Dn as _e,Dt as ve,En as ye,Ft as be,Gt as xe,Ht as Se,It as Ce,J as we,Kt as Te,Lt as R,Mt as Ee,Nt as z,On as De,Pt as Oe,Rt as B,St as ke,Tt as Ae,U as je,Ut as V,Vn as Me,Vt as Ne,W as Pe,X as Fe,Y as Ie,Z as Le,_ as Re,_n as ze,a as Be,bn as Ve,bt as He,c as Ue,ct as We,d as Ge,dt as Ke,et as qe,f as Je,gn as Ye,gt as Xe,hn as Ze,it as Qe,jn as $e,kn as et,kt as tt,l as nt,lt as rt,m as it,mt as at,n as ot,o as st,p as ct,pt as lt,qt as ut,r as dt,s as ft,st as pt,t as mt,tt as ht,u as gt,v as _t,vn as H,wt as vt,xn as yt,yn as bt,zn as xt}from"./src.BnXM6qiK.js";import{n as St,t as Ct}from"./useEmotionTheme.C795Rarg.js";import{D as wt,F as Tt,I as Et,L as Dt,O as Ot,P as kt,R as At,U as jt,W as Mt,_ as Nt,c as Pt,d as Ft,f as It,g as Lt,k as Rt,l as zt,m as Bt,o as Vt,p as Ht,r as Ut,s as Wt,u as Gt,v as Kt,w as qt,x as Jt,y as Yt,z as Xt}from"./utils.DyQFaQ9q.js";import{a as Zt,o as Qt}from"./toString.BkSzPhlJ.js";import{a as $t,o as en}from"./eq.BGqw_fW_.js";import{C as tn,E as nn,Ft as rn,It as an,Lt as on,Pt as sn,S as cn,T as ln,_ as un,a as dn,b as fn,d as pn,f as mn,g as hn,h as gn,i as _n,l as vn,m as yn,n as bn,p as xn,r as Sn,t as Cn,u as wn,v as Tn,w as En,y as Dn}from"./utils.CU17Veq9.js";import{i as On,n as kn,r as An,t as jn}from"./_toKey.IZoVG-B2.js";import{a as Mn,c as Nn,d as Pn,f as Fn,l as In,p as Ln,u as Rn}from"./ErrorElement.xCwUz6pJ.js";import{t as zn}from"./v4.Dwn3ecIa.js";import{a as Bn,r as Vn,t as Hn}from"./DynamicIcon.D2luRNwf.js";import{r as Un,t as Wn}from"./UriUtil.iHepHDsL.js";import{_ as Gn,c as Kn,f as qn,g as Jn,m as Yn,n as Xn,p as Zn,s as Qn,u as $n,y as er}from"./useCopyToClipboard.qxi5xnmv.js";import{n as tr,t as nr}from"./useTimeout.Bx6_cYZk.js";import{t as rr}from"./preload-helper.CoWfPq16.js";import{r as ir,t as ar}from"./useWindowDimensionsContext.-OfdvZoJ.js";import{a as or,i as sr,n as cr,o as lr,r as ur,t as dr}from"./possibleConstructorReturn.VpVYTsiS.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var fr=i((e=>{var t=_();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),pr=i(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}})),mr=i(((e,t)=>
2{t.exports=function(e,t,n,r,i,a,o,s){if(!e){var c;if(t===void 0)c=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var l=[n,r,i,a,o,s],u=0;c=Error(t.replace(/%s/g,function(){return l[u++]})),c.name=`Invariant Violation`}throw c.framesToPop=1,c}}})),hr=i(((e,t)=>{t.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(i=n?n.call(r,u,d,l):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}})),gr=fr(),_r=n(g(),1),U=n(a()),vr=n(pr()),yr=n(mr()),br=n(hr()),xr=(e=>(e.BASE=`base`,e.BODY=`body`,e.HEAD=`head`,e.HTML=`html`,e.LINK=`link`,e.META=`meta`,e.NOSCRIPT=`noscript`,e.SCRIPT=`script`,e.STYLE=`style`,e.TITLE=`title`,e.FRAGMENT=`Symbol(react.fragment)`,e))(xr||{}),Sr={link:{rel:[`amphtml`,`canonical`,`alternate`]},script:{type:[`application/ld+json`]},meta:{charset:``,name:[`generator`,`robots`,`description`],property:[`og:type`,`og:title`,`og:url`,`og:image`,`og:image:alt`,`og:description`,`twitter:url`,`twitter:title`,`twitter:description`,`twitter:image`,`twitter:image:alt`,`twitter:card`,`twitter:site`]}},Cr=Object.values(xr),wr={accesskey:`accessKey`,charset:`charSet`,class:`className`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,"http-equiv":`httpEquiv`,itemprop:`itemProp`,tabindex:`tabIndex`},Tr=Object.entries(wr).reduce((e,[t,n])=>(e[n]=t,e),{}),Er=`data-rh`,Dr={DEFAULT_TITLE:`defaultTitle`,DEFER:`defer`,ENCODE_SPECIAL_CHARACTERS:`encodeSpecialCharacters`,ON_CHANGE_CLIENT_STATE:`onChangeClientState`,TITLE_TEMPLATE:`titleTemplate`,PRIORITIZE_SEO_TAGS:`prioritizeSeoTags`},Or=(e,t)=>{for(let n=e.length-1;n>=0;--n){let r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},kr=e=>{let t=Or(e,`title`),n=Or(e,Dr.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join(``)),n&&t)return n.replace(/%s/g,()=>t);let r=Or(e,Dr.DEFAULT_TITLE);return t||r||void 0},Ar=e=>Or(e,Dr.ON_CHANGE_CLIENT_STATE)||(()=>{}),jr=(e,t)=>t.filter(t=>t[e]!==void 0).map(t=>t[e]).reduce((e,t)=>({...e,...t}),{}),Mr=(e,t)=>t.filter(e=>e.base!==void 0).map(e=>e.base).reverse().reduce((t,n)=>{if(!t.length){let r=Object.keys(n);for(let i=0;i<r.length;i+=1){let a=r[i].toLowerCase();if(e.indexOf(a)!==-1&&n[a])return t.concat(n)}}return t},[]),Nr=e=>console&&typeof console.warn==`function`&&console.warn(e),Pr=(e,t,n)=>{let r={};return n.filter(t=>Array.isArray(t[e])?!0:(t[e]!==void 0&&Nr(`Helmet: ${e} should be of type "Array". Instead found type "${typeof t[e]}"`),!1)).map(t=>t[e]).reverse().reduce((e,n)=>{let i={};n.filter(e=>{let n,a=Object.keys(e);for(let r=0;r<a.length;r+=1){let i=a[r],o=i.toLowerCase();t.indexOf(o)!==-1&&!(n===`rel`&&e[n].toLowerCase()===`canonical`)&&!(o===`rel`&&e[o].toLowerCase()===`stylesheet`)&&(n=o),t.indexOf(i)!==-1&&(i===`innerHTML`||i===`cssText`||i===`itemprop`)&&(n=i)}if(!n||!e[n])return!1;let o=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),r[n][o]?!1:(i[n][o]=!0,!0)}).reverse().forEach(t=>e.push(t));let a=Object.keys(i);for(let e=0;e<a.length;e+=1){let t=a[e];r[t]={...r[t],...i[t]}}return e},[]).reverse()},Fr=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},Ir=e=>({baseTag:Mr([`href`],e),bodyAttributes:jr(`bodyAttributes`,e),defer:Or(e,Dr.DEFER),encode:Or(e,Dr.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:jr(`htmlAttributes`,e),linkTags:Pr(`link`,[`rel`,`href`],e),metaTags:Pr(`meta`,[`name`,`charset`,`http-equiv`,`property`,`itemprop`],e),noscriptTags:Pr(`noscript`,[`innerHTML`],e),onChangeClientState:Ar(e),scriptTags:Pr(`script`,[`src`,`innerHTML`],e),styleTags:Pr(`style`,[`cssText`],e),title:kr(e),titleAttributes:jr(`titleAttributes`,e),prioritizeSeoTags:Fr(e,Dr.PRIORITIZE_SEO_TAGS)}),Lr=e=>Array.isArray(e)?e.join(``):e,Rr=(e,t)=>{let n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},zr=(e,t)=>Array.isArray(e)?e.reduce((e,n)=>(Rr(n,t)?e.priority.push(n):e.default.push(n),e),{priority:[],default:[]}):{default:e,priority:[]},Br=(e,t)=>
2({...e,[t]:void 0}),Vr=[`noscript`,`script`,`style`],Hr=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`),Ur=e=>Object.keys(e).reduce((t,n)=>{let r=e[n]===void 0?`${n}`:`${n}="${e[n]}"`;return t?`${t} ${r}`:r},``),Wr=(e,t,n,r)=>{let i=Ur(n),a=Lr(t);return i?`<${e} ${Er}="true" ${i}>${Hr(a,r)}</${e}>`:`<${e} ${Er}="true">${Hr(a,r)}</${e}>`},Gr=(e,t,n=!0)=>t.reduce((t,r)=>{let i=r,a=Object.keys(i).filter(e=>!(e===`innerHTML`||e===`cssText`)).reduce((e,t)=>{let r=i[t]===void 0?t:`${t}="${Hr(i[t],n)}"`;return e?`${e} ${r}`:r},``),o=i.innerHTML||i.cssText||``;return`${t}<${e} ${Er}="true" ${a}${Vr.indexOf(e)===-1?`/>`:`>${o}</${e}>`}`},``),Kr=(e,t={})=>Object.keys(e).reduce((t,n)=>{let r=wr[n];return t[r||n]=e[n],t},t),qr=(e,t,n)=>{let r=Kr(n,{key:t,[Er]:!0});return[U.createElement(`title`,r,t)]},Jr=(e,t)=>t.map((t,n)=>{let r={key:n,[Er]:!0};return Object.keys(t).forEach(e=>{let n=wr[e]||e;n===`innerHTML`||n===`cssText`?r.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:r[n]=t[e]}),U.createElement(e,r)}),Yr=(e,t,n=!0)=>{switch(e){case`title`:return{toComponent:()=>qr(e,t.title,t.titleAttributes),toString:()=>Wr(e,t.title,t.titleAttributes,n)};case`bodyAttributes`:case`htmlAttributes`:return{toComponent:()=>Kr(t),toString:()=>Ur(t)};default:return{toComponent:()=>Jr(e,t),toString:()=>Gr(e,t,n)}}},Xr=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{let i=zr(e,Sr.meta),a=zr(t,Sr.link),o=zr(n,Sr.script);return{priorityMethods:{toComponent:()=>[...Jr(`meta`,i.priority),...Jr(`link`,a.priority),...Jr(`script`,o.priority)],toString:()=>`${Yr(`meta`,i.priority,r)} ${Yr(`link`,a.priority,r)} ${Yr(`script`,o.priority,r)}`},metaTags:i.default,linkTags:a.default,scriptTags:o.default}},Zr=e=>{let{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:i,noscriptTags:a,styleTags:o,title:s=``,titleAttributes:c,prioritizeSeoTags:l}=e,{linkTags:u,metaTags:d,scriptTags:f}=e,p={toComponent:()=>[],toString:()=>``};return l&&({priorityMethods:p,linkTags:u,metaTags:d,scriptTags:f}=Xr(e)),{priority:p,base:Yr(`base`,t,r),bodyAttributes:Yr(`bodyAttributes`,n,r),htmlAttributes:Yr(`htmlAttributes`,i,r),link:Yr(`link`,u,r),meta:Yr(`meta`,d,r),noscript:Yr(`noscript`,a,r),script:Yr(`script`,f,r),style:Yr(`style`,o,r),title:Yr(`title`,{title:s,titleAttributes:c},r)}},Qr=[],$r=!!(typeof window<`u`&&window.document&&window.document.createElement),ei=class{instances=[];canUseDOM=$r;context;value={setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Qr:this.instances,add:e=>{(this.canUseDOM?Qr:this.instances).push(e)},remove:e=>{let t=(this.canUseDOM?Qr:this.instances).indexOf(e);(this.canUseDOM?Qr:this.instances).splice(t,1)}}};constructor(e,t){this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Zr({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:``,titleAttributes:{}}))}},ti=parseInt(`18.3.1`.split(`.`)[0],10)>=19,ni=U.createContext({}),ri=class e extends U.Component{static canUseDOM=$r;helmetData;constructor(t){super(t),ti?this.helmetData=null:this.helmetData=new ei(this.props.context||{},e.canUseDOM)}render(){return ti?U.createElement(U.Fragment,null,this.props.children):U.createElement(ni.Provider,{value:this.helmetData.value},this.props.children)}},ii=(e,t)=>{let n=document.head||document.querySelector(`head`),r=n.querySelectorAll(`${e}[${Er}]`),i=[].slice.call(r),a=[],o;return t&&t.length&&t.forEach(t=>{let n=document.createElement(e);for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))if(e===`innerHTML`)n.innerHTML=t.innerHTML;else if(e===`cssText`){let e=t.cssText;n.appendChild(document.createTextNode(e))}else{let r=e,i=t[r]===void 0?``:t[r];n.setAttribute(e,i)}n.setAttribute(Er,`true`),i.some((e,t)=>(o=t,n.isEqualNode(e)))?i.splice(o,1):a.push(n)}
2),i.forEach(e=>e.parentNode?.removeChild(e)),a.forEach(e=>n.appendChild(e)),{oldTags:i,newTags:a}},ai=(e,t)=>{let n=document.getElementsByTagName(e)[0];if(!n)return;let r=n.getAttribute(Er),i=r?r.split(`,`):[],a=[...i],o=Object.keys(t);for(let e of o){let r=t[e]||``;n.getAttribute(e)!==r&&n.setAttribute(e,r),i.indexOf(e)===-1&&i.push(e);let o=a.indexOf(e);o!==-1&&a.splice(o,1)}for(let e=a.length-1;e>=0;--e)n.removeAttribute(a[e]);i.length===a.length?n.removeAttribute(Er):n.getAttribute(Er)!==o.join(`,`)&&n.setAttribute(Er,o.join(`,`))},oi=(e,t)=>{e!==void 0&&document.title!==e&&(document.title=Lr(e)),ai(`title`,t)},si=(e,t)=>{let{baseTag:n,bodyAttributes:r,htmlAttributes:i,linkTags:a,metaTags:o,noscriptTags:s,onChangeClientState:c,scriptTags:l,styleTags:u,title:d,titleAttributes:f}=e;ai(`body`,r),ai(`html`,i),oi(d,f);let p={baseTag:ii(`base`,n),linkTags:ii(`link`,a),metaTags:ii(`meta`,o),noscriptTags:ii(`noscript`,s),scriptTags:ii(`script`,l),styleTags:ii(`style`,u)},m={},h={};Object.keys(p).forEach(e=>{let{newTags:t,oldTags:n}=p[e];t.length&&(m[e]=t),n.length&&(h[e]=p[e].oldTags)}),t&&t(),c(e,m,h)},ci=null,li=e=>
2{ci&&cancelAnimationFrame(ci),e.defer?ci=requestAnimationFrame(()=>{si(e,()=>{ci=null})}):(si(e),ci=null)},ui=class extends U.Component{rendered=!1;shouldComponentUpdate(e){return!(0,br.default)(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){let{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){let{helmetInstances:e,setHelmet:t}=this.props.context,n=null,r=Ir(e.get().map(e=>{let{context:t,...n}=e.props;return n}));ri.canUseDOM?li(r):Zr&&(n=Zr(r)),t(n)}init(){if(this.rendered)return;this.rendered=!0;let{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},di=[],fi=e=>{let t={};for(let n of Object.keys(e))t[Tr[n]||n]=e[n];return t},pi=e=>{let t={};for(let n of Object.keys(e)){let r=wr[n];t[r||n]=e[n]}return t},mi=(e,t)=>{if(!$r)return;let n=document.getElementsByTagName(e)[0];if(!n)return;let r=`data-rh-managed`,i=n.getAttribute(r),a=i?i.split(`,`):[],o=Object.keys(t);for(let e of a)o.includes(e)||n.removeAttribute(e);for(let e of o){let r=t[e];r==null||r===!1?n.removeAttribute(e):r===!0?n.setAttribute(e,``):n.setAttribute(e,String(r))}o.length>0?n.setAttribute(r,o.join(`,`)):n.removeAttribute(r)},hi=()=>{let e={},t={};for(let n of di){let{htmlAttributes:r,bodyAttributes:i}=n.props;r&&Object.assign(e,fi(r)),i&&Object.assign(t,fi(i))}mi(`html`,e),mi(`body`,t)},gi=class extends U.Component{componentDidMount(){di.push(this),hi()}componentDidUpdate(){hi()}componentWillUnmount(){let e=di.indexOf(this);e!==-1&&di.splice(e,1),hi()}resolveTitle(){let{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(``):e):e||n||void 0}renderTitle(){let e=this.resolveTitle();if(e===void 0)return null;let t=this.props.titleAttributes||{};return U.createElement(`title`,pi(t),e)}renderBase(){let{base:e}=this.props;return e?U.createElement(`base`,pi(e)):null}renderMeta(){let{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>U.createElement(`meta`,{key:t,...pi(e)}))}renderLink(){let{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>U.createElement(`link`,{key:t,...pi(e)}))}renderScript(){let{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{innerHTML:n,...r}=e,i=pi(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),U.createElement(`script`,{key:t,...i})})}renderStyle(){let{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{cssText:n,...r}=e,i=pi(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),U.createElement(`style`,{key:t,...i})})}renderNoscript(){let{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{innerHTML:n,...r}=e,i=pi(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),U.createElement(`noscript`,{key:t,...i})})}render(){return U.createElement(U.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},_i=class extends U.Component{static defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1};shouldComponentUpdate(e){return!(0,vr.default)(Br(this.props,`helmetData`),Br(e,`helmetData`))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case`script`:case`noscript`:return{innerHTML:t};case`style`:return{cssText:t};default:throw Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case`title`:return{...t,[e.type]:r,titleAttributes:{...n}};case`body`:return{...t,bodyAttributes:{...n}};case`html`:return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(t=>{n={...n,[t]:e[t]}}),n}warnOnInvalidChildren(e,t){return(0,yr.default)(Cr.some(t=>e.type===t),typeof e.type==`function`?`You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.`:`Only elements types ${Cr.join(`, `)} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),(0,yr.default)(!t||typeof t==`string`||Array.isArray(t)&&!t.some(e=>typeof e!=`string`),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};
2return U.Children.forEach(e,e=>{if(!e||!e.props)return;let{children:r,...i}=e.props,a=Object.keys(i).reduce((e,t)=>(e[Tr[t]||t]=i[t],e),{}),{type:o}=e;switch(typeof o==`symbol`?o=o.toString():this.warnOnInvalidChildren(e,r),o){case`Symbol(react.fragment)`:t=this.mapChildrenToProps(r,t);break;case`link`:case`meta`:case`noscript`:case`script`:case`style`:n=this.flattenArrayTypeChildren(e,n,a,r);break;default:t=this.mapObjectTypeChildren(e,t,a,r);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){let{children:e,...t}=this.props,n={...t},{helmetData:r}=t;return e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof ei)&&(r=new ei(r.context,!0),delete n.helmetData),ti?U.createElement(gi,{...n}):r?U.createElement(ui,{...n,context:r.value}):U.createElement(ni.Consumer,null,e=>U.createElement(ui,{...n,context:e}))}},vi=class{constructor(e=``){this.prefix=e,this.count=0,this.offset=374,this.msb=1295,this.power=2}next(){let e=this.increment().toString(36);return this.prefix?`${this.prefix}${e}`:e}increment(){let e=this.count+this.offset;return e===this.msb&&(this.offset+=(this.msb+1)*9,this.msb=36**++this.power-1),this.count++,e}},yi=/(!?\(\s*min(-device-)?-width).+\(\s*max(-device)?-width/i,bi=/\(\s*min(-device)?-width/i,xi=/(!?\(\s*max(-device)?-width).+\(\s*min(-device)?-width/i,Si=/\(\s*max(-device)?-width/i,Ci=Fi(yi,xi,bi),wi=Fi(xi,yi,Si),Ti=/(!?\(\s*min(-device)?-height).+\(\s*max(-device)?-height/i,Ei=/\(\s*min(-device)?-height/i,Di=/(!?\(\s*max(-device)?-height).+\(\s*min(-device)?-height/i,Oi=/\(\s*max(-device)?-height/i,ki=Fi(Ti,Di,Ei),Ai=Fi(Di,Ti,Oi),ji=/print/i,Mi=/^print$/i,Ni=Number.MAX_VALUE;function Pi(e){let t=/(-?\d*\.?\d+)(ch|em|ex|px|rem)/.exec(e);if(t===null)return Ni;let n=t[1];switch(t[2]){case`ch`:n=parseFloat(n)*8.8984375;break;case`em`:case`rem`:n=parseFloat(n)*16;break;case`ex`:n=parseFloat(n)*8.296875;break;case`px`:n=parseFloat(n);break}return+n}function Fi(e,t,n){return function(r){return e.test(r)?!0:t.test(r)?!1:n.test(r)}}function Ii(e,t){let n=ji.test(e),r=Mi.test(e),i=ji.test(t),a=Mi.test(t);return n&&i?!r&&a?1:r&&!a?-1:e.localeCompare(t):n?1:i?-1:null}function Li(e,t){if(e===``)return-1;if(t===``)return 1;let n=Ii(e,t);if(n!==null)return n;let r=Ci(e)||ki(e),i=wi(e)||Ai(e),a=Ci(t)||ki(t),o=wi(t)||Ai(t);if(r&&o)return-1;if(i&&a)return 1;let s=Pi(e),c=Pi(t);return s===Ni&&c===Ni?e.localeCompare(t):s===Ni?1:c===Ni?-1:s>c?i?-1:1:s<c?i?1:-1:e.localeCompare(t)}var Ri=class{constructor(e,t,n){this.idGenerator=e,this.onNewCache=t,this.onNewValue=n,this.sortedCacheKeys=[],this.caches={}}getCache(e){if(!this.caches[e]){let t=new zi(this.idGenerator,this.onNewValue);t.key=e,this.sortedCacheKeys.push(e),this.sortedCacheKeys.sort(Li);let n=this.sortedCacheKeys.indexOf(e),r=n<this.sortedCacheKeys.length-1?this.sortedCacheKeys[n+1]:void 0;this.caches[e]=t,this.onNewCache(e,t,r)}return this.caches[e]}getSortedCacheKeys(){return this.sortedCacheKeys}},zi=class{constructor(e,t){this.cache={},this.idGenerator=e,this.onNewValue=t}addValue(e,t){let n=this.cache[e];if(n)return n;let r=this.idGenerator.next();return this.cache[e]=r,this.onNewValue(this,r,t),r}},Bi=/[A-Z]/g,Vi=/^ms-/,Hi={};function Ui(e){return e in Hi?Hi[e]:Hi[e]=e.replace(Bi,`-$&`).toLowerCase().replace(Vi,`-ms-`)}function Wi(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Gi(e,t,n){if(e.hasOwnProperty(t)){for(var r={},i=e[t],a=Wi(t),o=Object.keys(n),s=0;s<o.length;s++){var c=o[s];if(c===t)for(var l=0;l<i.length;l++)r[i[l]+a]=n[t];r[c]=n[c]}return r}return n}function Ki(e,t,n,r,i){for(var a=0,o=e.length;a<o;++a){var s=e[a](t,n,r,i);if(s)return s}}function qi(e,t){e.indexOf(t)===-1&&e.push(t)}function Ji(e,t){if(Array.isArray(t))for(var n=0,r=t.length;n<r;++n)qi(e,t[n]);else qi(e,t)}function Yi(e){return e instanceof Object&&!Array.isArray(e)}function Xi(e){var t=e.prefixMap,n=e.plugins;return function e(r){for(var i in r){var a=r[i];if(Yi(a))r[i]=e(a);else if(Array.isArray(a)){for(var o=[],s=0,c=a.length;s<c;++s)Ji(o,Ki(n,i,a[s],r,t)||a[s]);o.length>0&&(r[i]=o)}else{var l=Ki(n,i,a,r,t);l&&(r[i]=l),r=Gi(t,i,r)}}return r}}var W=[`Webkit`],Zi=[`Moz`],Qi=[`ms`],$i=[`Webkit`,`Moz`],G=[`Webkit`,`ms`],ea={plugins:[],prefixMap:{appearance:$i,textEmphasisPosition:W,textEmphasis:W,textEmphasisStyle:W,textEmphasisColor:W,boxDecorationBreak:W,maskImage:W,maskMode:W,maskRepeat:W,maskPosition:W,maskClip:W,maskOrigin:W,maskSize:W,maskComposite:W,mask:W,maskBorderSource:W,maskBorderMode:W,maskBorderSlice:W,maskBorderWidth:W,maskBorderOutset:W,maskBorderRepeat:W,maskBorder:W,maskType:W,textDecorationStyle:W,textDecorationSkip:W,textDecorationLine:W,textDecorationColor:W,userSelect:[`Webkit`,`Moz`,`ms`],backdropFilter:W,fontKerning:W,scrollSnapType:G,scrollSnapPointsX:G,scrollSnapPointsY:G,scrollSnapDestination:G,scrollSnapCoordinate:G,clipPath:W,shapeImageThreshold:W,shapeImageMargin:W,shapeImageOutside:W,filter:W,hyphens:G,flowInto:G,flowFrom:G,breakBefore:G,breakAfter:G,breakInside:G,regionFragment:G,writingMode:G,textOrientation:W,tabSize:Zi,fontFeatureSettings:W,columnCount:W,columnFill:W,columnGap:W,columnRule:W,columnRuleColor:W,columnRuleStyle:W,columnRuleWidth:W,columns:W,columnSpan:W,columnWidth:W,wrapFlow:Qi,wrapThrough:Qi,wrapMargin:Qi,textSizeAdjust:G}};function ta(e,t){if(typeof t==`string`&&t===`text`)return[`-webkit-text`,`text`]}var na=[`-webkit-`,`-moz-`,``],ra={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function ia(e,t){if(e===`cursor`&&ra.hasOwnProperty(t))return na.map(function(e){return e+t})}var aa=n(i(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=/-webkit-|-moz-|-ms-/;function r(e){return typeof e==`string`&&n.test(e)}t.exports=e.default}))()),oa=[`-webkit-`,``];function sa(e,t){if(typeof t==`string`&&!(0,aa.default)(t)&&t.indexOf(`cross-fade(`)>-1)return oa.map(function(e){return t.replace(/cross-fade\(/g,e+`cross-fade(`)})}var ca=[`-webkit-`,``];function la(e,t){if(typeof t==`string`&&!(0,aa.default)(t)&&t.indexOf(`filter(`)>-1)return ca.map(function(e){return t.replace(/filter\(/g,e+`filter(`)})}var ua={flex:[`-webkit-box`,`-moz-box`,`-ms-flexbox`,`-webkit-flex`,`flex`],"inline-flex":[`-webkit-inline-box`,`-moz-inline-box`,`-ms-inline-flexbox`,`-webkit-inline-flex`,`inline-flex`]};function da(e,t){if(e===`display`&&ua.hasOwnProperty(t))return ua[t]}var fa={"space-around":`justify`,"space-between":`justify`,"flex-start":`start`,"flex-end":`end`,"wrap-reverse":`multiple`,wrap:`multiple`},pa={alignItems:`WebkitBoxAlign`,justifyContent:`WebkitBoxPack`,flexWrap:`WebkitBoxLines`,flexGrow:`WebkitBoxFlex`};function ma(e,t,n){e===`flexDirection`&&typeof t==`string`&&(t.indexOf(`column`)>-1?n.WebkitBoxOrient=`vertical`:n.WebkitBoxOrient=`horizontal`,t.indexOf(`reverse`)>-1?n.WebkitBoxDirection=`reverse`:n.WebkitBoxDirection=`normal`),pa.hasOwnProperty(e)&&(n[pa[e]]=fa[t]||t)}var ha=[`-webkit-`,`-moz-`,``],ga=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;function _a(e,t){if(typeof t==`string`&&!(0,aa.default)(t)&&ga.test(t))return ha.map(function(e){return t.replace(ga,function(t){return e+t})})}var va=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);
2throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}();function ya(e){return typeof e==`number`&&!isNaN(e)}function ba(e){return typeof e==`string`&&e.includes(`/`)}var xa=[`center`,`end`,`start`,`stretch`],Sa={"inline-grid":[`-ms-inline-grid`,`inline-grid`],grid:[`-ms-grid`,`grid`]},Ca={alignSelf:function(e,t){xa.indexOf(e)>-1&&(t.msGridRowAlign=e)},gridColumn:function(e,t){if(ya(e))t.msGridColumn=e;else if(ba(e)){var n=va(e.split(`/`),2),r=n[0],i=n[1];Ca.gridColumnStart(+r,t);var a=va(i.split(/ ?span /),2),o=a[0],s=a[1];o===``?Ca.gridColumnEnd(+r+ +s,t):Ca.gridColumnEnd(+i,t)}else Ca.gridColumnStart(e,t)},gridColumnEnd:function(e,t){var n=t.msGridColumn;ya(e)&&ya(n)&&(t.msGridColumnSpan=e-n)},gridColumnStart:function(e,t){ya(e)&&(t.msGridColumn=e)},gridRow:function(e,t){if(ya(e))t.msGridRow=e;else if(ba(e)){var n=va(e.split(`/`),2),r=n[0],i=n[1];Ca.gridRowStart(+r,t);var a=va(i.split(/ ?span /),2),o=a[0],s=a[1];o===``?Ca.gridRowEnd(+r+ +s,t):Ca.gridRowEnd(+i,t)}else Ca.gridRowStart(e,t)},gridRowEnd:function(e,t){var n=t.msGridRow;ya(e)&&ya(n)&&(t.msGridRowSpan=e-n)},gridRowStart:function(e,t){ya(e)&&(t.msGridRow=e)},gridTemplateColumns:function(e,t){t.msGridColumns=e},gridTemplateRows:function(e,t){t.msGridRows=e},justifySelf:function(e,t){xa.indexOf(e)>-1&&(t.msGridColumnAlign=e)}};function wa(e,t,n){if(e===`display`&&t in Sa)return Sa[t];if(e in Ca){var r=Ca[e];r(t,n)}}var Ta=[`-webkit-`,``];function Ea(e,t){if(typeof t==`string`&&!(0,aa.default)(t)&&t.indexOf(`image-set(`)>-1)return Ta.map(function(e){return t.replace(/image-set\(/g,e+`image-set(`)})}var Da={marginBlockStart:[`WebkitMarginBefore`],marginBlockEnd:[`WebkitMarginAfter`],marginInlineStart:[`WebkitMarginStart`,`MozMarginStart`],marginInlineEnd:[`WebkitMarginEnd`,`MozMarginEnd`],paddingBlockStart:[`WebkitPaddingBefore`],paddingBlockEnd:[`WebkitPaddingAfter`],paddingInlineStart:[`WebkitPaddingStart`,`MozPaddingStart`],paddingInlineEnd:[`WebkitPaddingEnd`,`MozPaddingEnd`],borderBlockStart:[`WebkitBorderBefore`],borderBlockStartColor:[`WebkitBorderBeforeColor`],borderBlockStartStyle:[`WebkitBorderBeforeStyle`],borderBlockStartWidth:[`WebkitBorderBeforeWidth`],borderBlockEnd:[`WebkitBorderAfter`],borderBlockEndColor:[`WebkitBorderAfterColor`],borderBlockEndStyle:[`WebkitBorderAfterStyle`],borderBlockEndWidth:[`WebkitBorderAfterWidth`],borderInlineStart:[`WebkitBorderStart`,`MozBorderStart`],borderInlineStartColor:[`WebkitBorderStartColor`,`MozBorderStartColor`],borderInlineStartStyle:[`WebkitBorderStartStyle`,`MozBorderStartStyle`],borderInlineStartWidth:[`WebkitBorderStartWidth`,`MozBorderStartWidth`],borderInlineEnd:[`WebkitBorderEnd`,`MozBorderEnd`],borderInlineEndColor:[`WebkitBorderEndColor`,`MozBorderEndColor`],borderInlineEndStyle:[`WebkitBorderEndStyle`,`MozBorderEndStyle`],borderInlineEndWidth:[`WebkitBorderEndWidth`,`MozBorderEndWidth`]};function Oa(e,t,n){if(Object.prototype.hasOwnProperty.call(Da,e))for(var r=Da[e],i=0,a=r.length;i<a;++i)n[r[i]]=t}function ka(e,t){if(e===`position`&&t===`sticky`)return[`-webkit-sticky`,`sticky`]}var Aa=[`-webkit-`,`-moz-`,``],ja={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},Ma={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function Na(e,t){if(ja.hasOwnProperty(e)&&Ma.hasOwnProperty(t))return Aa.map(function(e){return e+t})}var Pa=r({default:()=>Ia});function Fa(e){return`-`+e.toLowerCase()}function Ia(e){if(za.hasOwnProperty(e))return za[e];var t=e.replace(La,Fa);return za[e]=Ra.test(t)?`-`+t:t}var La,Ra,za,Ba=t((()=>{La=/[A-Z]/g,Ra=/^ms-/,za={}})),Va=n(i(((t,n)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.default=a;var r=i((Ba(),e(Pa)));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return(0,r.default)(e)}n.exports=t.default}))()),Ha={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},Ua={Webkit:`-webkit-`,Moz:`-moz-`,ms:`-ms-`};function Wa(e,t){if((0,aa.default)(e))return e;for(var n=e.split(/,(?![^()]*(?:\([^()]*\))?\))/g),r=0,i=n.length;r<i;++r){var a=n[r],o=[a];for(var s in t){var c=(0,Va.default)(s);if(a.indexOf(c)>-1&&c!==`order`)for(var l=t[s],u=0,d=l.length;u<d;++u)o.unshift(a.replace(c,Ua[l[u]]+c))}n[r]=o.join(`,`)}return n.join(`,`)}function Ga(e,t,n,r){if(typeof t==`string`&&Ha.hasOwnProperty(e)){var i=Wa(t,r),a=i.split(/,(?![^()]
2*(?:\([^()]*\))?\))/g).filter(function(e){return!/-moz-|-ms-/.test(e)}).join(`,`);if(e.indexOf(`Webkit`)>-1)return a;var o=i.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(e){return!/-webkit-|-ms-/.test(e)}).join(`,`);return e.indexOf(`Moz`)>-1?o:(n[`Webkit`+Wi(e)]=a,n[`Moz`+Wi(e)]=o,i)}}var Ka=[ta,sa,ia,la,ma,_a,wa,Ea,Oa,ka,Na,Ga,da],qa=Xi({prefixMap:ea.prefixMap,plugins:Ka});function Ja(e,t,n,r){let i=e.getCache(n),a=``;for(let o in t){let s=t[o];if(s!=null)if(typeof s!=`object`){let e=`${Ui(o)}:${s}`,t=`${r}${e}`,n=i.cache[t];if(n!==void 0){a+=` `+n;continue}else{let n=``,c=qa({[o]:s});for(let t in c){let r=c[t],i=typeof r;if(i===`string`||i===`number`){let i=`${Ui(t)}:${r}`;i!==e&&(n+=`${i};`)}else if(Array.isArray(r)){let i=Ui(t);for(let t=0;t<r.length;t++){let a=`${i}:${r[t]}`;a!==e&&(n+=`${a};`)}}}n+=e;let l=i.addValue(t,{pseudo:r,block:n});a+=` `+l}}else o[0]===`:`?a+=` `+Ja(e,s,n,r+o):o.substring(0,6)===`@media`&&(a+=` `+Ja(e,s,o.substr(7),r))}return a.slice(1)}function Ya(e,t){let n=`.${e}`;return t&&(n+=t),n}function Xa(e){let t=``;for(let n in e)t+=`${n}{${Za(e[n])}}`;return t}function Za(e){let t=``;for(let n in e){let r=e[n];(typeof r==`string`||typeof r==`number`)&&(t+=`${Ui(n)}:${r};`)}return t.slice(0,-1)}function Qa(e,t){return`@keyframes ${e}{${t}}`}function $a(e,t){return`@font-face{font-family:${e};${t}}`}function eo(e,t){return`${e}{${t}}`}var to=/\.([^{:]+)(:[^{]+)?{(?:[^}]*;)?([^}]*?)}/g,no=/@keyframes ([^{]+){((?:(?:from|to|(?:\d+\.?\d*%))\{(?:[^}])*})*)}/g,ro=/@font-face\{font-family:([^;]+);([^}]*)\}/g;function io(e,t,n){let r;for(;r=t.exec(n);){let[,t,n,i]=r,a=n?`${n}${i}`:i;e.cache[a]=t,e.idGenerator.increment()}}function ao(e,t,n){let r;for(;r=t.exec(n);){let[,t,n]=r;e.cache[n]=t,e.idGenerator.increment()}}var oo=class{constructor(e={}){this.styleElements={};let t=new vi(e.prefix),n=(e,t,n)=>{let{pseudo:r,block:i}=n,a=this.styleElements[e.key].sheet,o=eo(Ya(t,r),i);try{a.insertRule(o,a.cssRules.length)}catch{}};if(this.styleCache=new Ri(t,(e,t,n)=>{let r=document.createElement(`style`);if(r.media=e,n===void 0)this.container.appendChild(r);else{let e=so(this.container.children,n);this.container.insertBefore(r,this.container.children[e])}this.styleElements[e]=r},n),this.keyframesCache=new zi(new vi(e.prefix),(e,t,n)=>{this.styleCache.getCache(``);let r=this.styleElements[``].sheet,i=Qa(t,Xa(n));try{r.insertRule(i,r.cssRules.length)}catch{}}),this.fontFaceCache=new zi(new vi(e.prefix),(e,t,n)=>{this.styleCache.getCache(``);let r=this.styleElements[``].sheet,i=$a(t,Za(n));try{r.insertRule(i,r.cssRules.length)}catch{}}),e.container&&(this.container=e.container),e.hydrate&&e.hydrate.length>0){if(!this.container){let t=e.hydrate[0].parentElement;t!=null&&(this.container=t)}for(let r=0;r<e.hydrate.length;r++){let i=e.hydrate[r],a=i.getAttribute(`data-hydrate`);if(a===`font-face`){ao(this.fontFaceCache,ro,i.textContent);continue}if(a===`keyframes`){ao(this.keyframesCache,no,i.textContent);continue}let o=i.media?i.media:``;this.styleElements[o]=i;let s=new zi(t,n);s.key=o,io(s,to,i.textContent),this.styleCache.sortedCacheKeys.push(o),this.styleCache.caches[o]=s}}if(!this.container){if(document.head===null)throw Error("No container provided and `document.head` was null");this.container=document.head}}renderStyle(e){return Ja(this.styleCache,e,``,``)}renderFontFace(e){let t=Za(e);return this.fontFaceCache.addValue(t,e)}renderKeyframes(e){let t=Xa(e);return this.keyframesCache.addValue(t,e)}};function so(e,t){let n=0;for(;n<e.length;n++){let r=e[n];if(r.tagName===`STYLE`&&r.media===t)return n}return-1}E();var co=({fontFaces:e})=>s(p,{styles:[l(e.map(e=>{let{family:t,weight:n,weightRange:r,url:i,style:a,unicodeRange:o}=e,s=r||n;return`
3      @font-face {
4        font-family: ${t};
5        src: url(${i}) format("woff2");
6        font-display: swap;
7        ${a?`font-style: ${a};`:``}
8        ${s?`font-weight: ${s};`:``}
9        ${o?`unicode-range: ${o};`:``}
10      }
11    `}))]}),lo=({fontSources:e})=>s(_i,{children:Object.entries(e).map(([e,t])=>s(`link`,{id:e,rel:`stylesheet`,href:t},e))});function uo(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}_e();function fo(e,t,n,r){return ye(e,function(e,i,a){t(r,e,n(e),a)}),r}et(),Zt();function po(e,t){return function(n,r){var i=Qt(n)?uo:fo,a=t?t():{};return i(n,e,De(r,2),a)}}on();
11var mo=Object.prototype.hasOwnProperty,ho=po(function(e,t,n){mo.call(e,n)?e[n].push(t):an(e,n,[t])});rn(),On(),y(),$t(),jn();function go(e,t,n,r){if(!en(e))return e;t=An(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=kn(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=en(u)?u:v(t[i+1])?[]:{})}sn(s,c,l),s=s[c]}return e}Mt(),On();function _o(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=jt(e,o);n(s,o)&&go(a,An(o,e),s)}return a}$e();function vo(e,t){return _o(e,t,function(t,n){return he(e,n)})}var yo=xt(function(e,t){return e==null?{}:vo(e,t)}),bo=class e{constructor(e,t,n,r,i){this.element=e,this.metadata=t,this.scriptRunId=n,this.activeScriptHash=r,this.fragmentId=i}get quiverElement(){if(this.lazyQuiverElement!==void 0)return this.lazyQuiverElement;if(this.element.type!==`table`&&this.element.type!==`dataframe`)throw Error(`elementType '${this.element.type}' is not a valid Quiver element!`);let e=new ut(this.element.type===`table`?this.element.table?.arrowData:this.element.dataframe?.arrowData);return this.lazyQuiverElement=e,e}get vegaLiteChartElement(){if(this.lazyVegaLiteChartElement!==void 0)return this.lazyVegaLiteChartElement;if(this.element.type!==`vegaLiteChart`)throw Error(`elementType '${this.element.type}' is not a valid VegaLiteChartElement!`);let e=this.element.vegaLiteChart,t=e.data?new ut(e.data):null,n=e.datasets.length>0?So(e.datasets):[],r={data:t,spec:e.spec,datasets:n,useContainerWidth:e.useContainerWidth,vegaLiteTheme:e.theme,id:e.id,selectionMode:e.selectionMode,formId:e.formId};return this.lazyVegaLiteChartElement=r,r}arrowAddRows(t,n){let r=this.element.type,i=new e(this.element,this.metadata,n,this.activeScriptHash,this.fragmentId);switch(r){case`table`:case`dataframe`:i.lazyQuiverElement=e.quiverAddRowsHelper(this.quiverElement,t);break;case`vegaLiteChart`:i.lazyVegaLiteChartElement=e.vegaLiteChartAddRowsHelper(this.vegaLiteChartElement,t);break;default:throw Error(`elementType '${this.element.type}' is not a valid arrowAddRows target!`)}return i}static quiverAddRowsHelper(e,t){if(t.hasName)throw Error(`Add rows cannot be used with a named dataset for this element.`);let n=new ut(t.data);return e.addRows(n)}static vegaLiteChartAddRowsHelper(e,t){let n=t.hasName?t.name:null,r=new ut(t.data);return ze(e,e=>{let t=xo(e.datasets,n);t?t.data=t.data.addRows(r):e.data=e.data?e.data.addRows(r):r})}accept(e){return e.visitElementNode(this)}debug(){return this.accept(new yt)}replaceTransientNodeWithSelf(e){if(e.scriptRunId!==this.scriptRunId||e.transientNodes.length===0)return this;let t=e.updateTransientNodes(e=>e.accept(new bt(this.scriptRunId)));return t.length===0?this:new Ve(this.scriptRunId,this,t,e.deltaMsgReceivedAt)}};function xo(e,t){return e.length===1?e[0]:e.find(e=>e.hasName&&e.name===t)}function So(e){return e.map(e=>({hasName:e.hasName,name:e.name,data:new ut(e.data)}))}var Co=class{constructor(e){this.fragmentIdsThisRun=e??[]}visitBlockNode(e){if(this.fragmentIdsThisRun.length>0&&e.fragmentId&&!this.fragmentIdsThisRun.includes(e.fragmentId))return e;let t=[],n=!1;return e.children.forEach(e=>{let r=e.accept(this);r!==e&&(n=!0),r!==void 0&&t.push(r)}),n?new H(e.activeScriptHash,t,e.deltaBlock,e.scriptRunId,e.fragmentId,e.deltaMsgReceivedAt):e}visitElementNode(e){return e}visitTransientNode(e){return e.anchor}},wo=class e{constructor(e){this.mainScriptHash=e}visitElementNode(e){if(e.activeScriptHash===this.mainScriptHash)return e}visitBlockNode(e){if(e.activeScriptHash!==this.mainScriptHash)return;let t=!1,n=[];for(let r of e.children){let e=r.accept(this);e!==r&&(t=!0),e!==void 0&&n.push(e)}return t?new H(e.activeScriptHash,n,e.deltaBlock,e.scriptRunId,e.fragmentId,e.deltaMsgReceivedAt):e}visitTransientNode(e){let t=e.anchor?.accept(this),n=e.updateTransientNodes(e=>e.accept(this));if(!(!t&&n.length===0))return n.length===0?t:new Ve(e.scriptRunId,t,n,e.deltaMsgReceivedAt)}static filterNode(t,n){let r=new e(n);return t.accept(r)}},To=class e{constructor(e){this.deltaPath=e}visitElementNode(e){}visitBlockNode(t){if(this.deltaPath.length===0)return;let[n,...r]=this.deltaPath;if(n<0||n>=t.children.length)return;if(r.length===0)return t.children[n];let i=new e(r);return t.children[n].accept(i)}visitTransientNode(e){return this.deltaPath.length===0?e.anchor:e.anchor?.accept(this)}static getNodeAtPath(t,n){let r=new e(n);return t.accept(r)}},Eo=class e{constructor(e,t,n){this.deltaPath=e,this.nodeToSet=t,this.scriptRunId=n}visitElementNode(e){if(this.deltaPath.length>0)throw Error(`'setIn' cannot be called on an ElementNode`);return this.nodeToSet instanceof Ve&&!this.nodeToSet.anchor?new Ve(this.nodeToSet.scriptRunId,e,this.nodeToSet.transientNodes,this.nodeToSet.deltaMsgReceivedAt):this.nodeToSet}visitTransientNode(e){if(this.deltaPath.length===0)return this.nodeToSet.replaceTransientNodeWithSelf(e);if(e.anchor){let t=e.anchor.accept(this);return new Ve(e.scriptRunId,t,e.transientNodes,e.deltaMsgReceivedAt)}throw Error(`TransientNode has no anchor to set node at`)}visitBlockNode(t){if(this.deltaPath.length===0)return this.nodeToSet instanceof Ve&&!this.nodeToSet.anchor?new Ve(this.nodeToSet.scriptRunId,t,this.nodeToSet.transientNodes,this.nodeToSet.deltaMsgReceivedAt):this.nodeToSet;let[n,...r]=this.deltaPath;if(n<0||n>t.children.length)throw Error(`Bad delta path index ${n} (should be between [0, ${t.children.length}])`);let i=[],a=new e(r,this.nodeToSet,this.scriptRunId);if(t.children[n]){let e=0;for(;e<t.children.length;){let r=t.children[e];if(e!==n){i.push(r),e++;continue}let o=r.accept(a);
11!(r instanceof Ve)&&o instanceof Ve&&o.anchor!==r?(i.push(o),i.push(r)):i.push(o),e++}}else{if(r.length>0)throw Error(`Cannot set a node at a delta path`);i=t.children.slice(),i[n]=this.nodeToSet}return new H(t.activeScriptHash,i,t.deltaBlock,this.scriptRunId,t.fragmentId,t.deltaMsgReceivedAt)}static setNodeAtPath(t,n,r,i){let a=new e(n,r,i);return t.accept(a)}},Do=class e{static empty(t=``,n=!0,r,i){let a=[],o;switch(Ft()){case Ut.NONE:break;case Ut.V1:n&&(o=Et(`Please wait...`));break;default:o=kt();break}o&&a.push(new bo(o,pe.create({}),Me,t));let s=new H(t,a,new oe({allowEmpty:!0}),Me),c=r||new H(t,[],new oe({allowEmpty:!0}),`NO_SCRIPT_RUN_ID`),l=new H(t,[],new oe({allowEmpty:!0}),Me),u=new H(t,[],new oe({allowEmpty:!0}),Me),d=i?{logo:i,activeScriptHash:t,scriptRunId:Me}:null;return new e(t,new H(t,[s,c,l,u]),d)}constructor(e,t,n=null){if(this.mainScriptHash=e,this.root=t,this.appLogo=n,this.root.children.length!==4||P(this.main)||P(this.sidebar)||P(this.event)||P(this.bottom))throw Error(`Invalid root node children! ${t}`)}get main(){let[e]=this.root.children;return e}get sidebar(){let[,e]=this.root.children;return e}get event(){let[,,e]=this.root.children;return e}get bottom(){let[,,,e]=this.root.children;return e}get logo(){return this.appLogo?.logo??null}appRootWithLogo(t,n){return new e(this.mainScriptHash,this.root,{logo:t,...n})}applyDelta(e,t,n){let{deltaPath:r,activeScriptHash:i}=n;switch(t.type){case`newElement`:{let a=t.newElement;return this.addElement(r,e,a,n,i,t.fragmentId)}case`addBlock`:{let n=Date.now();return this.addBlock(r,t.addBlock,e,i,t.fragmentId,n)}case`newTransient`:{let a=t.newTransient;return this.addTransient(r,e,a,n,i,t.fragmentId)}case`arrowAddRows`:try{return this.arrowAddRows(r,t.arrowAddRows,e)}catch(t){let a=Tt(St(t).message);return this.addElement(r,e,a,n,i)}default:throw Error(`Unrecognized deltaType: '${t.type}'`)}}ensureBlockNode(e,t=this.mainScriptHash){return e??new H(t)}filterMainScriptElements(t){let n=this.main.scriptRunId,r=new wo(t),i=this.root.children.map(e=>this.ensureBlockNode(e.accept(r),t)),a=this.appLogo?.activeScriptHash===t?this.appLogo:null;return new e(t,new H(t,i,new oe({allowEmpty:!0}),n),a)}clearStaleNodes(t,n){let r=new bt(t,n),i=this.root.children.map(e=>this.ensureBlockNode(e.accept(r))),a=n&&n.length>0||this.appLogo?.scriptRunId===t?this.appLogo:null;return new e(this.mainScriptHash,new H(this.mainScriptHash,i,new oe({allowEmpty:!0}),t),a)}clearTransientNodes(t){let n=new Co(t),r=this.root.children.map(e=>this.ensureBlockNode(e.accept(n)));return new e(this.mainScriptHash,new H(this.mainScriptHash,r,new oe({allowEmpty:!0}),this.main.scriptRunId),this.appLogo)}getElements(){return this.getActiveIds().elements}getActiveIds(){let e=new Te;return this.main.accept(e),this.sidebar.accept(e),this.event.accept(e),this.bottom.accept(e),{elements:e.elements,blockIds:e.blockIds}}addElement(t,n,r,i,a,o){let s=new bo(r,i,n,a,o);return new e(this.mainScriptHash,Eo.setNodeAtPath(this.root,t,s,n),this.appLogo)}addBlock(t,n,r,i,a,o){let s=To.getNodeAtPath(this.root,t),c=s instanceof Ve?s.anchor??s:s,l=[];c instanceof H&&c.deltaBlock.type===n.type&&(n.dialog&&c.deltaBlock.dialog&&n.id!==c.deltaBlock.id||(l=c.children));let u=new H(i,l,n,r,a,o);return new e(this.mainScriptHash,Eo.setNodeAtPath(this.root,t,u,r),this.appLogo)}addTransient(t,n,r,i,a,o,s){let c=new Ve(n,void 0,r.elements.map(e=>new bo(e,i,n,a,o)),s);return new e(this.mainScriptHash,Eo.setNodeAtPath(this.root,t,c,n),this.appLogo)}arrowAddRows(t,n,r){let i=To.getNodeAtPath(this.root,t);if(P(i)||!(i instanceof bo))throw Error(`Can't arrowAddRows: invalid deltaPath: ${t}`);let a=i.arrowAddRows(n,r);return new e(this.mainScriptHash,Eo.setNodeAtPath(this.root,t,a,r),this.appLogo)}getChildName(e){switch(e){case this.main:return`main`;case this.sidebar:return`sidebar`;case this.event:return`event`;case this.bottom:return`bottom`;default:return`unknown`}}debug(){let e=`AppRoot
12`;return this.root.children.forEach((t,n)=>{let r=n===this.root.children.length-1,i=this.getChildName(t),a=r?`└── `:`├── `,o=r?`    `:`│   `;e+=`${a}${i}:\n`;let s=new yt(o,!0);e+=t.accept(s)}),e}},Oo=n(_());k();function ko(e){"@babel/helpers - typeof";return ko=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ko(e)}var Ao=[`onClose`,`children`,`key`];function jo(e,t){return Po(e)||No(e,t)||Bo(e,t)||Mo()}
12function Mo(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
13In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function No(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Po(e){if(Array.isArray(e))return e}function Fo(){return Fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fo.apply(this,arguments)}function Io(e,t){if(e==null)return{};var n=Lo(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lo(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ro(e){return Ho(e)||Vo(e)||Bo(e)||zo()}function zo(){throw TypeError(`Invalid attempt to spread non-iterable instance.
14In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bo(e,t){if(e){if(typeof e==`string`)return Uo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Uo(e,t)}}function Vo(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ho(e){if(Array.isArray(e))return Uo(e)}function Uo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Wo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Wo(Object(n),!0).forEach(function(t){J(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Go(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Ko(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qo(e,t,n){return t&&Ko(e.prototype,t),n&&Ko(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Jo(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&Yo(e,t)}function Yo(e,t){return Yo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yo(e,t)}function Xo(e){var t=Qo();return function(){var n=$o(e),r;if(t){var i=$o(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Zo(this,r)}}function Zo(e,t){if(t&&(ko(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return q(e)}function q(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Qo(){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 $o(e){return $o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$o(e)}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var es,ts=function(e){Jo(n,e);var t=Xo(n);function n(e){var r;return Go(this,n),r=t.call(this,e),J(q(r),`state`,{isMounted:!1,toasts:[]}),J(q(r),`dismissHandlers`,{}),J(q(r),`toastId`,0),J(q(r),`getToastProps`,function(e){var t=r.props,n=t.autoF
14ocus,i=t.autoHideDuration,a=t.closeable,o=e.key||`toast-${r.toastId++}`;return K(K({autoFocus:n,autoHideDuration:i,closeable:a},e),{},{key:o})}),J(q(r),`show`,function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(r.state.toasts.map(function(e){return e.key}).includes(e.key))return r.update(e.key,e),e.key;var t=r.getToastProps(e);return r.setState(function(e){var n=e.toasts;return{toasts:[].concat(Ro(n),[t])}}),t.key}),J(q(r),`update`,function(e,t){r.setState(function(n){return{toasts:n.toasts.map(function(n){return n.key===e?K(K(K({},n),r.getToastProps(K({autoHideDuration:n.autoHideDuration},t))),{},{key:e},r.props.resetAutoHideTimerOnUpdate?{__updated:(+n.__updated||0)+1}:{}):n})}})}),J(q(r),`dismiss`,function(e){r.dismissHandlers[e]&&r.dismissHandlers[e]()}),J(q(r),`clearAll`,function(){Object.keys(r.dismissHandlers).forEach(function(e){r.dismissHandlers[e]()})}),J(q(r),`clear`,function(e){e===void 0?r.clearAll():r.dismiss(e)}),J(q(r),`internalOnClose`,function(e){delete r.dismissHandlers[e],r.setState(function(t){return{toasts:t.toasts.filter(function(t){return t.key!==e})}})}),J(q(r),`getOnCloseHandler`,function(e,t){return function(){r.internalOnClose(e),typeof t==`function`&&t()}}),J(q(r),`renderToast`,function(e){var t=e.onClose,n=e.children,i=e.key,a=Io(e,Ao),o=r.props.overrides,s=o.ToastBody,c=o.ToastCloseIcon,l=o.ToastInnerContainer,u=x(x({Body:Nn,CloseIcon:In,InnerContainer:Rn},{Body:s||{},CloseIcon:c||{},InnerContainer:l||{}}),e.overrides);return U.createElement(Mn,Fo({},a,{overrides:u,key:i,onClose:r.getOnCloseHandler(i,t)}),function(e){var t=e.dismiss;return r.dismissHandlers[i]=t,n})}),J(q(r),`getSharedProps`,function(){return{$placement:r.props.placement}}),es=q(r),r}return qo(n,[{key:`componentDidMount`,value:function(){this.setState({isMounted:!0})}},{key:`render`,value:function(){for(var e=this.getSharedProps(),t=this.props.overrides.Root,n=jo(b(t,Pn),2),r=n[0],i=n[1],a=this.state.toasts.length,o=[],s=a-1;s>=0;s--)o.push(this.renderToast(this.state.toasts[s]));var c=U.createElement(r,Fo({"data-baseweb":`toaster`},e,i),o);return this.state.isMounted?U.createElement(U.Fragment,null,this.props.usePortal&&typeof document<`u`&&document.body?Oo.createPortal(c,document.body):c,this.props.children):U.createElement(U.Fragment,null,this.props.children)}}]),n}(U.Component);J(ts,`defaultProps`,{autoFocus:!1,autoHideDuration:0,children:null,closeable:!0,overrides:{},placement:Ln.top,resetAutoHideTimerOnUpdate:!0,usePortal:!0});var ns={getRef:function(){return es},show:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRef();if(n)return n.show(K(K({},t),{},{children:e}))},info:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.show(e,K(K({},t),{},{kind:Fn.info}))},positive:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.show(e,K(K({},t),{},{kind:Fn.positive}))},warning:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.show(e,K(K({},t),{},{kind:Fn.warning}))},negative:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.show(e,K(K({},t),{},{kind:Fn.negative}))},update:function(e,t){var n=this.getRef();n&&n.update(e,t)},clear:function(e){var t=this.getRef();t&&t.clear(e)}},rs=U.forwardRef(function(e,t){return U.createElement(We,c({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 24 24`},e,{ref:t}),U.createElement(`path`,{fill:`none`,d:`M0 0h24v24H0V0z`}),U.createElement(`path`,{d:`M20.5 6c-2.61.7-5.67 1-8.5 1s-5.89-.3-8.5-1L3 8c1.86.5 4 .83 6 1v13h2v-6h2v6h2V9c2-.17 4.14-.5 6-1l-.5-2zM12 6c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z`}))});rs.displayName=`AccessibilityNew`;var is=U.forwardRef(function(e,t){return U.createElement(We,c({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 24 24`},e,{ref:t}),U.createElement(`path`,{fill:`none`,d:`M0 0h24v24H0V0z`}),U.createElement(`circle`,{cx:18,cy:4.54,r:2}),U.createElement(`path`,{d:`M15 17h-2c0 1.65-1.35 3-3 3s-3-1.35-3-3 
141.35-3 3-3v-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5zm3-3.5h-1.86l1.67-3.67C18.42 8.5 17.44 7 15.96 7h-5.2c-.81 0-1.54.47-1.87 1.2L8.22 10l1.92.53.65-1.53H13l-1.83 4.1c-.6 1.33.39 2.9 1.85 2.9H18v5h2v-5.5c0-1.1-.9-2-2-2z`}))});is.displayName=`AccessibleForward`;var as=U.forwardRef(function(e,t){return U.createElement(We,c({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 24 24`},e,{ref:t}),U.createElement(`path`,{fill:`none`,d:`M0 0h24v24H0V0z`}),U.createElement(`path`,{d:`M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5zm5.8-10l2.4-2.4.8.8c1.3 1.3 3 2.1 5.1 2.1V9c-1.5 0-2.7-.6-3.6-1.5l-1.9-1.9c-.5-.4-1-.6-1.6-.6s-1.1.2-1.4.6L7.8 8.4c-.4.4-.6.9-.6 1.4 0 .6.2 1.1.6 1.4L11 14v5h2v-6.2l-2.2-2.3zM19 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5z`}))});as.displayName=`DirectionsBike`;var os=U.forwardRef(function(e,t){return U.createElement(We,c({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 24 24`},e,{ref:t}),U.createElement(`path`,{fill:`none`,d:`M0 0h24v24H0V0z`}),U.createElement(`path`,{d:`M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2 7 1.4z`}))});os.displayName=`DirectionsRun`;var ss=U.forwardRef(function(e,t){return U.createElement(We,c({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 24 24`},e,{ref:t}),U.createElement(`path`,{fill:`none`,d:`M0 0h24v24H0V0z`}),U.createElement(`path`,{d:`M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z`}))});ss.displayName=`KeyboardArrowDown`;var cs=U.forwardRef(function(e,t){return U.createElement(We,c({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 24 24`},e,{ref:t}),U.createElement(`path`,{fill:`none`,d:`M0 0h24v24H0V0z`}),U.createElement(`path`,{d:`M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6 1.41 1.41z`}))});cs.displayName=`KeyboardArrowUp`;var ls=U.forwardRef(function(e,t){return U.createElement(We,c({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 24 24`},e,{ref:t}),U.createElement(`path`,{fill:`none`,d:`M0 0h24v24H0V0z`}),U.createElement(`path`,{d:`M10 8l-3.25 3.25c.31.12.56.27.77.39.37.23.59.36 1.15.36s.78-.13 1.15-.36c.46-.27 1.08-.64 2.19-.64s1.73.37 2.18.64c.37.22.6.36 1.15.36.55 0 .78-.13 1.15-.36.12-.07.26-.15.41-.23L10.48 5C8.93 3.45 7.5 2.99 5 3v2.5c1.82-.01 2.89.39 4 1.5l1 1zm12 8.5h-.02.02zm-16.65-1c.55 0 .78.14 1.15.36.45.27 1.07.64 2.18.64s1.73-.37 2.18-.64c.37-.23.59-.36 1.15-.36.55 0 .78.14 1.15.36.45.27 1.07.64 2.18.64s1.73-.37 2.18-.64c.37-.23.59-.36 1.15-.36.55 0 .78.14 1.15.36.45.27 1.06.63 2.16.64v-2c-.55 0-.78-.14-1.15-.36-.45-.27-1.07-.64-2.18-.64s-1.73.37-2.18.64c-.37.23-.6.36-1.15.36s-.78-.14-1.15-.36c-.45-.27-1.07-.64-2.18-.64s-1.73.37-2.18.64c-.37.23-.59.36-1.15.36-.55 0-.78-.14-1.15-.36-.45-.27-1.07-.64-2.18-.64s-1.73.37-2.18.64c-.37.23-.59.36-1.15.36v2c1.11 0 1.73-.37 2.2-.64.37-.23.6-.36 1.15-.36zM18.67 18c-1.11 0-1.73.37-2.18.64-.37.23-.6.36-1.15.36-.55 0-.78-.14-1.15-.36-.45-.27-1.07-.64-2.18-.64s-1.73.37-2.19.64c-.37.23-.59.36-1.15.36s-.78-.13-1.15-.36c-.45-.27-1.07-.64-2.18-.64s-1.73.37-2.19.64c-.37.23-.59.36-1.15.36v2c1.11 0 1.73-.37 2.19-.64.37-.23.6-.36 1.15-.36.55 0 .78.13 1.15.36.45.27 1.07.64 2.18.64s1.73-.37 2.19-.64c.37-.23.59-.36 1.15-.36.55 0 .78.14 1.15.36.45.27 1.07.64 2.18.64s1.72-.37 2.18-.64c.37-.23.59-.36 1.15-.36.55 0 .78.14 1.15.36.45.27 1.07.64 2.18.64v-2c-.56 0-.78-.13-1.15-.36-.45-.27-1.07-.64-2.18-.64z`}),U.createElement(`circle`,{cx:16.5,cy:5.5,r:2.5}))});ls.displayName=`Pool`;var us=U.forwardRef(function(e,t){return U.createElement(We,c({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 24 24`},e,{ref:t}),U.createElement(`path`,{fill:`none`,d:`M0 0h24v24H0z`}),U.createElement(`path`,{d:`M8.5 14.5L4 19l1.5 1.5L9 17h2l-2.5-2.5zM15 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 20.01L18 24l-2.99-3.01V19.5l-7.1-7.09c-.31.05-.61.07-.91.07v-2.16c1.66.03 3.61-.87 4.67-2.04l1.4-1.55c.19-.21.43-.38.69-.5.29-.14.62-.23.96-.23h.03C15.99 6.01 17 7.02 17 8.26v5.75c0 .84-.35 1.61-.92 2.16l-3.58-3.58v-2.27c-.63.52-1.43 1.02-2.29 1.39L16.5 18H18l3 3.01z`}))});us.displayName=`Rowing`;var ds=n(xe()),fs=n(tr()),ps=class extends U.Component{constructor(e){super(e),this.isKeyDown=!1,this.handle=void 0,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.handleKeyUpEvent=this.handleKeyUpEvent.bind(this),this.handle={}}componentDidMount(){var{filter:e,splitKey:t}=this.props;e&&(Xe.filter=e),Xe.unbind(this.props.keyName),Xe(this.props.keyName,{splitKey:t}
14,this.onKeyDown),document&&document.body.addEventListener(`keyup`,this.handleKeyUpEvent)}componentWillUnmount(){Xe.unbind(this.props.keyName),this.isKeyDown=!0,this.handle={},document&&document.body.removeEventListener(`keyup`,this.handleKeyUpEvent)}onKeyUp(e,t){var{onKeyUp:n,disabled:r}=this.props;!r&&n&&n(t.shortcut,e,t)}onKeyDown(e,t){var{onKeyDown:n,allowRepeat:r,disabled:i}=this.props;this.isKeyDown&&!r||(this.isKeyDown=!0,this.handle=t,!i&&n&&n(t.shortcut,e,t))}handleKeyUpEvent(e){this.isKeyDown&&(this.isKeyDown=!1,!(this.props.keyName&&this.props.keyName.indexOf(this.handle.shortcut)<0)&&(this.onKeyUp(e,this.handle),this.handle={}))}render(){return this.props.children||null}};ps.defaultProps={filter(e){var t=e.target||e.srcElement,n=t.tagName;return!(t.isContentEditable||n===`INPUT`||n===`SELECT`||n===`TEXTAREA`)}},ps.propTypes={keyName:fs.string,filter:fs.func,onKeyDown:fs.func,onKeyUp:fs.func,disabled:fs.bool,splitKey:fs.string};function ms({children:e}){let t=Ct();return u(m,{children:[s(ts,{placement:Ln.topRight,autoHideDuration:4*1e3,overrides:{Root:{style:{top:t.sizes.headerHeight,zIndex:t.zIndices.toast},props:{"data-testid":`stToastContainer`,className:`stToastContainer`}}}}),e]})}var hs=h(`div`,{target:`e1yxiy6j0`})(({theme:e})=>({marginLeft:e.spacing.lg})),gs=h(`header`,{target:`e1yxiy6j1`})(({theme:e,isTransparentBackground:t})=>({position:`absolute`,top:0,left:0,right:0,display:`flex`,alignItems:`center`,height:e.sizes.headerHeight,minHeight:e.sizes.headerHeight,width:`100%`,background:t?`transparent`:e.colors.bgColor,outline:`none`,zIndex:e.zIndices.header,pointerEvents:t?`none`:`auto`,fontSize:e.fontSizes.sm,"@media print":{position:`absolute`,background:`transparent`,"& *":{display:`none !important`},[`& ${hs}, & ${hs} *, & :has(${hs})`]:{display:`flex !important`},[`& ${hs} img`]:{display:`block !important`}}})),_s=h(`div`,{target:`e1yxiy6j2`})(({theme:e})=>({display:`flex`,alignItems:`center`,height:`100%`,width:`100%`,padding:0,pointerEvents:`auto`,position:`relative`,zIndex:e.zIndices.header})),vs=h(`div`,{target:`e1yxiy6j3`})(({theme:e})=>({display:`flex`,alignItems:`center`,justifyContent:`center`,marginLeft:e.spacing.lg,"@media print":{display:`none`}})),ys=h(`div`,{target:`e1yxiy6j4`})(()=>({flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,margin:0,border:0})),bs=h(`div`,{target:`e1yxiy6j5`})(()=>({display:`flex`,alignItems:`center`,flexShrink:0})),xs=h(`div`,{target:`e1yxiy6j6`})(({theme:e})=>({flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`flex-end`,marginLeft:`auto`,height:`100%`,minWidth:e.sizes.headerRightContentMaxWidth,marginRight:e.spacing.lg})),Ss=({hasSidebar:e,isSidebarOpen:t,onToggleSidebar:n,navigation:r,rightContent:i,logoComponent:a,showToolbar:o})=>{let{activeTheme:c}=(0,U.useContext)(Ie),l=a&&!t,d=e&&!t,f=o&&i,p=l||d||r||f;return s(gs,{className:`stAppHeader`,"data-testid":`stHeader`,isTransparentBackground:!p,children:p?s(_s,{className:`stAppToolbar`,"data-testid":`stToolbar`,theme:c.emotion,children:u(ys,{children:[u(bs,{children:[l?s(hs,{children:a}):null,d&&s(vs,{children:s(R,{kind:B.HEADER_NO_PADDING,onClick:n,"data-testid":`stExpandSidebarButton`,children:s(Hn,{size:`xl`,iconValue:`:material/keyboard_double_arrow_right:`,color:c.emotion.colors.fadedText60})})})]}),r,f?s(xs,{children:i}):null]})}):null})},Cs=(e,t)=>`max(
15    ${t}px,
16    calc(${e.spacing.xl} - ${t}px)
17  )`,ws=h(`section`,{target:`eelgd2m0`})(({theme:e,isCollapsed:t,adjustTop:n,sidebarWidth:r,windowInnerWidth:i})=>{let a=t?0:Math.min(200,i),o=t?0:Math.min(600,i*.9);return{position:`relative`,top:n?e.sizes.headerDecorationHeight:e.spacing.none,backgroundColor:e.colors.bgColor,color:e.colors.bodyText,colorScheme:T(e)?`light`:`dark`,zIndex:e.zIndices.header+1,minWidth:a,maxWidth:o,transform:t?`translateX(-${r}px)`:`none`,transition:`transform 300ms, min-width 300ms, max-width 300ms`,"&:focus":{outline:`none`},[`@media (max-width: ${e.breakpoints.md})`]:{boxShadow:t?`-2rem 0 2rem 2rem transparent`:e.shadows.sidebar},"@media print":{display:t?`none`:`initial`,height:`auto !important`,maxHeight:`99%`,boxShadow:`none`}}}),Ts=h(`div`,{target:`eelgd2m1`})(({hasPageNavAbove:e,theme:t})=>({paddingTop:e?t.spacing.twoXL:0,paddingBottom:t.sizes.sidebarTopSpace})),Es=h(`div`,{target:`eelgd2m2`})(({theme:e,scrollbarGutterSize:t})=>({position:`relative`,height:`100%`,width:`100%`,overflow:`auto`,scrollbarGutter:`stable both-edges`,paddingLeft:Cs(e,t),paddingRight:Cs(e,t)})),Ds=h(`div`,{target:`eelgd2m3`})(({theme:e})=>({position:`absolute`,width:`8px`,height:`100%`,cursor:`col-resize`,zIndex:e.zIndices.sidebarMobile,backgroundImage:e.showSidebarBorder?`linear-gradient(to right, transparent 20%, ${e.colors.borderColor} 28%, transparent 36%)`:`none`,"&:hover":{backgroundImage:`linear-gradient(to right, transparent 20%, ${e.colors.borderColor} 28%, transparent 44%)`}})),Os=h(`div`,{target:`eelgd2m4`})(({theme:e})=>({display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:e.spacing.lg,height:e.sizes.headerHeight})),ks=h(`a`,{target:`eelgd2m5`})({"&:hover":{opacity:`0.7`}}),As=h(`button`,{target:`eelgd2m6`})({background:`none`,border:`none`,padding:0,cursor:`pointer`,"&:hover":{opacity:`0.7`}});
17function js(e,t){return t===`small`?e.sizes.smallLogoHeight:t===`large`?e.sizes.largeLogoHeight:e.sizes.defaultLogoHeight}var Ms=h(`img`,{target:`eelgd2m7`})(({theme:e,size:t})=>({height:js(e,t),marginTop:t==`small`?e.spacing.xs:e.spacing.twoXS,marginBottom:t==`small`?e.spacing.xs:e.spacing.twoXS,marginLeft:e.spacing.none,zIndex:e.zIndices.header,objectFit:`contain`,objectPosition:`left`,verticalAlign:`middle`,maxWidth:`100%`})),Ns=h(`div`,{target:`eelgd2m8`})(({theme:e,size:t})=>({display:`flex`,alignItems:`center`,justifyContent:`flex-start`,height:js(e,t),marginTop:t==`small`?e.spacing.xs:e.spacing.twoXS,marginBottom:t==`small`?e.spacing.xs:e.spacing.twoXS,marginLeft:e.spacing.none,zIndex:e.zIndices.header,fontSize:js(e,t),lineHeight:e.lineHeights.none,color:e.colors.bodyText})),Ps=h(`div`,{target:`eelgd2m9`})(({theme:e})=>({height:e.sizes.largeLogoHeight})),Fs=h(`div`,{target:`eelgd2m10`})(({showSidebarCollapse:e,theme:t})=>({display:`inline`,visibility:e?`visible`:`hidden`,marginLeft:t.spacing.sm,transition:`left 300ms`,transitionDelay:`left 300ms`,color:T(t)?t.colors.fadedText60:t.colors.bodyText,lineHeight:`0`,"@media print":{visibility:`hidden`},[`@media (max-width: ${t.breakpoints.sm})`]:{visibility:`visible`}})),Is=(0,_r.getLogger)(`LogoComponent`),Ls={small:`lg`,medium:`xl`,large:`twoXL`},Rs=({appLogo:e,endpoints:t,collapsed:n=!1,componentName:r=`Logo`,dataTestId:i=`stLogo`})=>{let{resourceCrossOriginMode:a}=(0,U.useContext)(Un),{appPages:o,onPageChange:c,currentPageScriptHash:l}=(0,U.useContext)(me),u=(0,U.useMemo)(()=>o.find(e=>e.isDefault),[o]),d=o.length>1,f=u?.pageScriptHash===l,p=(0,U.useCallback)(()=>{u?.pageScriptHash&&!f&&c(u.pageScriptHash)},[u,c,f]);if(!e)return null;let m=e=>{Is.error(`Client Error: ${r} source error - ${e}`),t.sendClientErrorToHost(r,`Logo source failed to load`,`onerror triggered`,e)},h=n&&e.iconImage?e.iconImage:e.image,g=n&&e.iconImage?e.iconImageType:e.imageType,_=t.buildMediaURL(h),v=Wn(a,h),y=g===te.ImageType.ICON||g===te.ImageType.EMOJI,b=Ls[e.size]||`xl`,x=y?s(Ns,{size:e.size,className:`stLogo`,"data-testid":i,children:s(Hn,{iconValue:h,size:b})}):s(Ms,{src:_,size:e.size,alt:`Logo`,className:`stLogo`,"data-testid":i,onError:e=>m(_),crossOrigin:v});return e.link?s(ks,{href:e.link,target:`_blank`,rel:`noreferrer`,"data-testid":`stLogoLink`,"aria-label":y?`App Logo`:void 0,children:x}):d&&u&&!f?s(As,{onClick:p,"data-testid":`stLogoLink`,"aria-label":`Navigate to home page`,children:x}):s(`div`,{children:x})};function zs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zs(Object(n),!0).forEach(function(t){Yn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vs(e){if(Array.isArray(e))return e}function Hs(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Us(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
18In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ws(e,t){return Vs(e)||Hs(e,t)||lr(e,t)||Us()}var Gs=Symbol.for(`react.element`),Ks=Symbol.for(`react.transitional.element`),qs=Symbol.for(`react.fragment`);function Js(e){return e&&Jn(e)===`object`&&(e.$$typeof===Gs||e.$$typeof===Ks)&&e.type===qs}function Ys(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return U.Children.forEach(e,function(e){e==null&&!t.keepEmpty||(Array.isArray(e)?n=n.concat(Ys(e)):Js(e)&&e.props?n=n.concat(Ys(e.props.children,t)):n.push(e))}),n}var Xs={},Zs=[],Qs=function(e){Zs.push(e)};function $s(e,t){}function ec(e,t){}function tc(){Xs={}}function nc(e,t,n){!t&&!Xs[n]&&(e(!1,n),Xs[n]=!0)}function rc(e,t){nc($s,e,t)}function ic(e,t){nc(ec,e,t)}rc.preMessage=Qs,rc.resetWarned=tc,rc.noteOnce=ic;function ac(e){return e instanceof HTMLElement||e instanceof SVGElement}function oc(e){return e&&Jn(e)===`object`&&ac(e.nativeElement)?e.nativeElement:ac(e)?e:null}function sc(e){return oc(e)||(e instanceof U.Component?Oo.findDOMNode?.call(Oo.default,e):null)}var cc=i((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.ForwardRef=l,e.isMemo=function(e){return m(e)===f}})),lc=i(((e,t)=>{t.exports=cc()}))();function uc(e,t,n){var r=U.useRef({});return(!(`value`in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}var dc=Number(U.version.split(`.`)[0]),fc=function(e,t){typeof e==`function`?e(t):Jn(e)===`object`&&e&&`current`in e&&(e.current=t)},pc=function(){var e=[...arguments],t=e.filter(Boolean);return t.length<=1?t[0]:function(t){e.forEach(function(e){fc(e,t)})}},mc=function(){var e=[...arguments];return uc(function(){return pc.apply(void 0,e)},e,function(e,t){return e.length!==t.length||e.every(function(e,n){return e!==t[n]})})},hc=function(e){var t,n;if(!e)return!1;if(gc(e)&&dc>=19)return!0;var r=(0,lc.isMemo)(e)?e.type.type:e.type;return!(typeof r==`function`&&!((t=r.prototype)!=null&&t.render)&&r.$$typeof!==lc.ForwardRef||typeof e==`function`&&!((n=e.prototype)!=null&&n.render)&&e.$$typeof!==lc.ForwardRef)};function gc(e){return(0,U.isValidElement)(e)&&!Js(e)}var _c=function(e){if(e&&gc(e)){var t=e;return t.props.propertyIsEnumerable(`ref`)?t.props.ref:t.ref}return null},vc=U.createContext(null);function yc(e){var t=e.children,n=e.onBatchResize,r=U.useRef(0),i=U.useRef([]),a=U.useContext(vc),o=U.useCallback(function(e,t,o){r.current+=1;var s=r.current;i.current.push({size:e,element:t,data:o}),Promise.resolve().then(function(){s===r.current&&(n?.(i.current),i.current=[])}),a?.(e,t,o)},[n,a]);return U.createElement(vc.Provider,{value:o},t)}var bc=(function(){if(typeof Map<`u`)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t?(n=r,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,`size`,{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){t===void 0&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()})(),xc=typeof window<`u`&&typeof document<`u`&&window.document===document,Sc=(function(){return typeof global<`u`&&global.Math===Math?global:typeof self<`u`&&self.Math===Math?self:typeof window<`u`&&window.Math===Math?window:Function(`return this`)()})(),Cc=(function(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(Sc):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),wc=2;function Tc(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){Cc(a)}function s(){var e=Date.now();if(n){if(e-i<wc)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}var Ec=20,Dc=[`top`,`right`,`bottom`,`left`,`width`,`height`,`size`,`weight`],Oc=typeof MutationObserver<`u`,kc=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Tc(this.refresh.bind(this),Ec)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){!xc||this.connected_||(document.addEventListener(`transitionend`,this.onTransitionEnd_),window.addEventListener(`resize`,this.refresh),Oc?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener(`DOMSubtreeModified`,this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!xc||!this.connected_||(document.removeEventListener(`transitionend`,this.onTransitionEnd_),window.removeEventListener(`resize`,this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener(`DOMSubtreeModified`,this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?``:t;Dc.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||=new e,this.instance_},e.instance_=null,e}(),Ac=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,
18configurable:!0})}return e}),jc=(function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||Sc}),Mc=Hc(0,0,0,0);function Nc(e){return parseFloat(e)||0}function Pc(e){return[...arguments].slice(1).reduce(function(t,n){var r=e[`border-`+n+`-width`];return t+Nc(r)},0)}function Fc(e){for(var t=[`top`,`right`,`bottom`,`left`],n={},r=0,i=t;r<i.length;r++){var a=i[r],o=e[`padding-`+a];n[a]=Nc(o)}return n}function Ic(e){var t=e.getBBox();return Hc(0,0,t.width,t.height)}function Lc(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Mc;var r=jc(e).getComputedStyle(e),i=Fc(r),a=i.left+i.right,o=i.top+i.bottom,s=Nc(r.width),c=Nc(r.height);if(r.boxSizing===`border-box`&&(Math.round(s+a)!==t&&(s-=Pc(r,`left`,`right`)+a),Math.round(c+o)!==n&&(c-=Pc(r,`top`,`bottom`)+o)),!zc(e)){var l=Math.round(s+a)-t,u=Math.round(c+o)-n;Math.abs(l)!==1&&(s-=l),Math.abs(u)!==1&&(c-=u)}return Hc(i.left,i.top,s,c)}var Rc=(function(){return typeof SVGGraphicsElement<`u`?function(e){return e instanceof jc(e).SVGGraphicsElement}:function(e){return e instanceof jc(e).SVGElement&&typeof e.getBBox==`function`}})();function zc(e){return e===jc(e).document.documentElement}function Bc(e){return xc?Rc(e)?Ic(e):Lc(e):Mc}function Vc(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=Object.create((typeof DOMRectReadOnly<`u`?DOMRectReadOnly:Object).prototype);return Ac(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}function Hc(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Uc=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Hc(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Bc(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),Wc=function(){function e(e,t){var n=Vc(t);Ac(this,{target:e,contentRect:n})}return e}(),Gc=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new bc,typeof e!=`function`)throw TypeError(`The callback provided as parameter 1 is not a function.`);this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof jc(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)||(t.set(e,new Uc(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof jc(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new Wc(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Kc=typeof WeakMap<`u`?new WeakMap:new bc,qc=function(){function e(t){if(!(this instanceof e))throw TypeError(`Cannot call a class as a function.`);if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);var n=new Gc(t,kc.getInstance(),this);Kc.set(this,n)}return e}();[`observe`,`unobserve`,`disconnect`].forEach(function(e){qc.prototype[e]=function(){var t;return(t=Kc.get(this))[e].apply(t,arguments)}});var Jc=(function(){return Sc.ResizeObserver===void 0?qc:Sc.ResizeObserver})(),Yc=new Map;function Xc(e){e.forEach(function(e){var t,n=e.target;(t=Yc.get(n))==null||t.forEach(function(e){return e(n)})})}var Zc=new Jc(Xc);function Qc(e,t){Yc.has(e)||(Yc.set(e,new Set),Zc.observe(e)),Yc.get(e).add(t)}function $c(e,t){Yc.has(e)&&(Yc.get(e).delete(t),Yc.get(e).size||(Zc.unobserve(e),Yc.delete(e)))}function el(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(el=function(){return!!e})()}function tl(e){var t=el();return function(){var n,r=cr(e);
18if(t){var i=cr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dr(this,n)}}var nl=function(e){ur(n,e);var t=tl(n);function n(){return or(this,n),t.apply(this,arguments)}return sr(n,[{key:`render`,value:function(){return this.props.children}}]),n}(U.Component);function rl(e,t){var n=e.children,r=e.disabled,i=U.useRef(null),a=U.useRef(null),o=U.useContext(vc),s=typeof n==`function`,c=s?n(i):n,l=U.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!s&&U.isValidElement(c)&&hc(c),d=mc(u?_c(c):null,i),f=function(){return sc(i.current)||(i.current&&Jn(i.current)===`object`?sc(i.current?.nativeElement):null)||sc(a.current)};U.useImperativeHandle(t,function(){return f()});var p=U.useRef(e);p.current=e;var m=U.useCallback(function(e){var t=p.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),a=i.width,s=i.height,c=e.offsetWidth,u=e.offsetHeight,d=Math.floor(a),f=Math.floor(s);if(l.current.width!==d||l.current.height!==f||l.current.offsetWidth!==c||l.current.offsetHeight!==u){var m={width:d,height:f,offsetWidth:c,offsetHeight:u};l.current=m;var h=c===Math.round(a)?a:c,g=u===Math.round(s)?s:u,_=Bs(Bs({},m),{},{offsetWidth:h,offsetHeight:g});o?.(_,e,r),n&&Promise.resolve().then(function(){n(_,e)})}},[]);return U.useEffect(function(){var e=f();return e&&!r&&Qc(e,m),function(){return $c(e,m)}},[i.current,r]),U.createElement(nl,{ref:a},u?U.cloneElement(c,{ref:d}):c)}var il=U.forwardRef(rl),al=`rc-observer-key`;function ol(e,t){var n=e.children;return(typeof n==`function`?[n]:Ys(n)).map(function(n,r){var i=n?.key||`${al}-${r}`;return U.createElement(il,c({},e,{key:i,ref:r===0?t:void 0}),n)})}var sl=U.forwardRef(ol);sl.Collection=yc;function cl(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}var ll=cl()?U.useLayoutEffect:U.useEffect,ul=function(e,t){var n=U.useRef(!0);ll(function(){return e(n.current)},t),ll(function(){return n.current=!1,function(){n.current=!0}},[])},dl=[`prefixCls`,`invalidate`,`item`,`renderItem`,`responsive`,`responsiveDisabled`,`registerSize`,`itemKey`,`className`,`style`,`children`,`display`,`order`,`component`],fl=void 0;function pl(e,t){var n=e.prefixCls,r=e.invalidate,i=e.item,a=e.renderItem,o=e.responsive,s=e.responsiveDisabled,l=e.registerSize,u=e.itemKey,d=e.className,f=e.style,p=e.children,m=e.display,h=e.order,g=e.component,_=g===void 0?`div`:g,v=rt(e,dl),y=o&&!m;function b(e){l(u,e)}U.useEffect(function(){return function(){b(null)}},[]);var x=a&&i!==fl?a(i,{index:h}):p,S;r||(S={opacity:y?0:1,height:y?0:fl,overflowY:y?`hidden`:fl,order:o?h:fl,pointerEvents:y?`none`:fl,position:y?`absolute`:fl});var C={};y&&(C[`aria-hidden`]=!0);var w=U.createElement(_,c({className:(0,ds.default)(!r&&n,d),style:Bs(Bs({},S),f)},C,v,{ref:t}),x);return o&&(w=U.createElement(sl,{onResize:function(e){var t=e.offsetWidth;b(t)},disabled:s},w)),w}var ml=U.forwardRef(pl);ml.displayName=`Item`;function hl(e){var t=U.useRef();return t.current=e,U.useCallback(function(){var e,n=[...arguments];return(e=t.current)?.call.apply(e,[t].concat(n))},[])}var gl=function(e){return+setTimeout(e,16)},_l=function(e){return clearTimeout(e)};typeof window<`u`&&`requestAnimationFrame`in window&&(gl=function(e){return window.requestAnimationFrame(e)},_l=function(e){return window.cancelAnimationFrame(e)});var vl=0,yl=new Map;function bl(e){yl.delete(e)}var xl=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;vl+=1;var n=vl;function r(t){if(t===0)bl(n),e();else{var i=gl(function(){r(t-1)});yl.set(n,i)}}return r(t),n};xl.cancel=function(e){var t=yl.get(e);return bl(e),_l(t)};function Sl(e){if(typeof MessageChannel>`u`)xl(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function Cl(){var e=U.useRef(null);return function(t){e.current||(e.current=[],Sl(function(){(0,Oo.unstable_batchedUpdates)(function(){e.current.forEach(function(e){e()}),e.current=null})})),e.current.push(t)}}function wl(e,t){var n=Ws(U.useState(t),2),r=n[0],i=n[1];return[r,hl(function(t){e(function(){i(t)})})]}var Tl=U.createContext(null),El=[`component`],Dl=[`className`],Ol=[`className`],kl=U.forwardRef(function(e,t){var n=U.useContext(Tl);if(!n){var r=e.component,i=r===void 0?`div`:r,a=rt(e,El);return U.createElement(i,c({},a,{ref:t}))}var o=n.className,s=rt(n,Dl),l=e.className,u=rt(e,Ol);return U.createElement(Tl.Provider,{value:null},U.createElement(ml,c({ref:t,className:(0,ds.default)(o,l)},s,u)))});kl.displayName=`RawItem`;var Al=[`prefixCls`,`data`,`renderItem`,`renderRawItem`,`itemKey`,`itemWidth`,`ssr`,`style`,`className`,`maxCount`,`renderRest`,`renderRawRest`,`prefix`,`suffix`,`component`,`itemComponent`,`onVisibleChange`],jl=`responsive`,Ml=`invalidate`;function Nl(e){return`+ ${e.length} ...`}function Pl(e,t){var n=e.prefixCls,r=n===void 0?`rc-overflow`:n,i=e.data,a=i===void 0?[]:i,o=e.renderItem,s=e.renderRawItem,l=e.itemKey,u=e.itemWidth,d=u===void 0?10:u,f=e.ssr,p=e.style,m=e.className,h=e.maxCount,g=e.renderRest,_=e.renderRawRest,v=e.prefix,y=e.suffix,b=e.component,x=b===void 0?`div`:b,S=e.itemComponent,C=e.onVisibleChange,w=rt(e,Al),T=f===`full`,E=Cl(),D=Ws(wl(E,null),2),O=D[0],ee=D[1],k=O||0,A=Ws(wl(E,new Map),2),j=A[0],M=A[1],N=Ws(wl(E,0),2),P=N[0],te=N[1],ne=Ws(wl(E,0),2),F=ne[0],re=ne[1],ie=Ws(wl(E,0),2),ae=ie[0],oe=ie[1],se=Ws(wl(E,0),2),ce=se[0],le=se[1],I=Ws((0,U.useState)(null),2),L=I[0],ue=I[1],de=Ws((0,U.useState)(null),2),fe=de[0],pe=de[1],me=U.useMemo(function(){return fe===null&&T?2**53-1:fe||0},[fe,O]),he=Ws((0,U.useState)(!1),2),ge=he[0],_e=he[1],ve=`${r}-item`,ye=Math.max(P,F),be=h===jl,xe=a.length&&be,Se=h===Ml,Ce=xe||typeof h==`number`&&a.length>h,we=(0,U.useMemo)(function(){var e=a;return xe?e=O===null&&T?a:a.slice(0,Math.min(a.length,k/d)):typeof h==`number`&&(e=
18a.slice(0,h)),e},[a,d,O,h,xe]),Te=(0,U.useMemo)(function(){return xe?a.slice(me+1):a.slice(we.length)},[a,we,xe,me]),R=(0,U.useCallback)(function(e,t){return typeof l==`function`?l(e):(l&&e?.[l])??t},[l]),Ee=(0,U.useCallback)(o||function(e){return e},[o]);function z(e,t,n){fe===e&&(t===void 0||t===L)||(pe(e),n||(_e(e<a.length-1),C?.(e)),t!==void 0&&ue(t))}function De(e,t){ee(t.clientWidth)}function Oe(e,t){M(function(n){var r=new Map(n);return t===null?r.delete(e):r.set(e,t),r})}function B(e,t){re(t),te(F)}function ke(e,t){oe(t)}function Ae(e,t){le(t)}function je(e){return j.get(R(we[e],e))}ul(function(){if(k&&typeof ye==`number`&&we){var e=ae+ce,t=we.length,n=t-1;if(!t){z(0,null);return}for(var r=0;r<t;r+=1){var i=je(r);if(T&&(i||=0),i===void 0){z(r-1,void 0,!0);break}if(e+=i,n===0&&e<=k||r===n-1&&e+je(n)<=k){z(n,null);break}else if(e+ye>k){z(r-1,e-i-ce+F);break}}y&&je(0)+ce>k&&ue(null)}},[k,j,F,ae,ce,R,we]);var V=ge&&!!Te.length,Me={};L!==null&&xe&&(Me={position:`absolute`,left:L,top:0});var Ne={prefixCls:ve,responsive:xe,component:S,invalidate:Se},Pe=s?function(e,t){var n=R(e,t);return U.createElement(Tl.Provider,{key:n,value:Bs(Bs({},Ne),{},{order:t,item:e,itemKey:n,registerSize:Oe,display:t<=me})},s(e,t))}:function(e,t){var n=R(e,t);return U.createElement(ml,c({},Ne,{order:t,key:n,item:e,renderItem:Ee,itemKey:n,registerSize:Oe,display:t<=me}))},Fe={order:V?me:2**53-1,className:`${ve}-rest`,registerSize:B,display:V},Ie=g||Nl,Le=_?U.createElement(Tl.Provider,{value:Bs(Bs({},Ne),Fe)},_(Te)):U.createElement(ml,c({},Ne,Fe),typeof Ie==`function`?Ie(Te):Ie),Re=U.createElement(x,c({className:(0,ds.default)(!Se&&r,m),style:p,ref:t},w),v&&U.createElement(ml,c({},Ne,{responsive:be,responsiveDisabled:!xe,order:-1,className:`${ve}-prefix`,registerSize:ke,display:!0}),v),we.map(Pe),Ce?Le:null,y&&U.createElement(ml,c({},Ne,{responsive:be,responsiveDisabled:!xe,order:me,className:`${ve}-suffix`,registerSize:Ae,display:!0,style:Me}),y));return be?U.createElement(sl,{onResize:De,disabled:!xe},Re):Re}var Fl=U.forwardRef(Pl);Fl.displayName=`Overflow`,Fl.Item=kl,Fl.RESPONSIVE=jl,Fl.INVALIDATE=Ml;var Il=Fl,Ll=(e,t,n=!1,r)=>{if(n)return e.colors.fadedText40;if(r)return e.colors.bodyText;let i=T(e);return t?e.colors.bodyText:i?O(e.colors.bodyText,.2):O(e.colors.bodyText,.25)},Rl=h(`div`,{target:`e1lpckdq0`})(({theme:e})=>({position:`relative`,fontFamily:e.genericFonts.bodyFont})),zl=h(`ul`,{target:`e1lpckdq1`})(({theme:e})=>({listStyle:`none`,margin:e.spacing.none,paddingBottom:e.spacing.threeXS,paddingTop:e.spacing.none,paddingRight:e.spacing.none,paddingLeft:e.spacing.none})),Bl=h(`div`,{target:`e1lpckdq2`})(({disabled:e})=>({display:`flex`,flexDirection:`column`,cursor:e?`not-allowed`:`pointer`})),Vl=h(`span`,{target:`e1lpckdq3`})(({theme:e,isActive:t})=>({display:`inline-flex`,span:{fontWeight:t?e.fontWeights.bold:e.fontWeights.normal}})),Hl=h(`li`,{target:`e1lpckdq4`})(({theme:e})=>({marginTop:e.spacing.threeXS,marginBottom:e.spacing.threeXS})),Ul=h(`a`,{target:`e1lpckdq5`})(({theme:e,isActive:t,disabled:n})=>{let r={textDecoration:`none`,fontWeight:t?e.fontWeights.bold:e.fontWeights.normal};return{...r,display:`flex`,flexDirection:`row`,alignItems:`center`,gap:e.spacing.sm,borderRadius:e.radii.md2,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,marginTop:e.spacing.threeXS,marginBottom:e.spacing.threeXS,lineHeight:e.lineHeights.menuItem,color:Ll(e,t),backgroundColor:t?e.colors.darkenedBgMix25:`transparent`,...n&&{pointerEvents:`none`},"&:hover":{backgroundColor:e.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{...r},"&:focus":{outline:`none`},"&:focus-visible":{backgroundColor:e.colors.darkenedBgMix15},"@media print":{paddingLeft:e.spacing.none}}}),Wl=h(`span`,{target:`e1lpckdq6`})(({isActive:e,theme:t,disabled:n,isTopNav:r,label:i})=>({color:Ll(t,e,n,r),fontSize:t.fontSizes.sm,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,display:`table-cell`,"&::after":{content:`"${i}"`,fontWeight:t.fontWeights.bold,visibility:`hidden`,display:`block`,width:`fit-content`,height:0}})),Gl=h(`div`,{target:`e1lpckdq7`})(({isExpanded:e})=>({visibility:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`,transform:e?`rotate(0deg)`:`rotate(-90deg)`,transition:`transform 200ms ease`,flexShrink:0})),Kl=h(`span`,{target:`e1lpckdq8`})(()=>({overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,minWidth:0})),ql=h(`header`,{target:`e1lpckdq9`})(({theme:e})=>({fontSize:e.fontSizes.sm,fontWeight:e.fontWeights.semiBold,color:Ll(e,!1),lineHeight:e.lineHeights.small,paddingRight:e.spacing.sm,marginTop:e.spacing.sm,marginBottom:e.spacing.twoXS,display:`flex`,flexDirection:`row`,alignItems:`center`,gap:e.spacing.sm,cursor:`pointer`,userSelect:`none`,"&:hover":{[`& > ${Gl}`]:{visibility:`visible`}}})),Jl=h(`button`,{target:`e1lpckdq10`})(({theme:e})=>({fontSize:e.fontSizes.sm,fontFamily:`inherit`,lineHeight:e.lineHeights.base,color:Ll(e,!0),backgroundColor:e.colors.transparent,border:`none`,borderRadius:e.radii.default,marginTop:e.spacing.twoXS,marginLeft:e.spacing.none,marginBottom:e.spacing.none,marginRight:e.spacing.none,padding:`${e.spacing.threeXS} ${e.spacing.sm}`,"&:hover, &:active, &:focus":{border:`none`,outline:`none`,boxShadow:`none`},"&:hover":{backgroundColor:e.colors.darkenedBgMix15}})),Yl=h(`div`,{target:`e1lpckdq11`})(({theme:e})=>({paddingTop:e.spacing.lg,borderBottom:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`})),Xl=h(`div`,{target:`e1lpckdq12`})(({theme:e})=>({"&:not(:first-child)":{marginTop:e.spacing.lg}}
18)),Zl=h(`div`,{target:`e1lpckdq13`})(({theme:e})=>({display:`flex`,alignItems:`center`,width:`100%`,flexShrink:1,overflow:`hidden`,padding:`0 ${e.spacing.lg}`})),Ql=h(`div`,{target:`e1lpckdq14`})(({theme:e,isOpen:t})=>({display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,position:`relative`,lineHeight:e.lineHeights.menuItem,fontSize:e.fontSizes.sm,padding:`0 ${e.spacing.sm}`,color:Ll(e,!1,!1,!0),borderRadius:e.radii.default,marginRight:e.spacing.twoXS,"&:not(:first-of-type)":{marginLeft:e.spacing.twoXS},...t?{backgroundColor:e.colors.darkenedBgMix25}:{},"&:hover":{backgroundColor:e.colors.darkenedBgMix15}})),$l=h(`div`,{target:`e1lpckdq15`})(({theme:e})=>({marginRight:e.spacing.twoXS,"&:not(:first-of-type)":{marginLeft:e.spacing.twoXS}})),eu=h(`div`,{target:`e1lpckdq16`})(({theme:e})=>({margin:`${e.spacing.none} ${e.spacing.xs}`})),tu=h(`span`,{target:`e1lpckdq17`})(()=>({whiteSpace:`nowrap`})),nu=h(`div`,{target:`e1lpckdq18`})(({theme:e})=>({marginLeft:e.spacing.sm,marginTop:e.spacing.sm,marginBottom:e.spacing.sm,lineHeight:e.lineHeights.menuItem})),ru=h(`div`,{target:`e1lpckdq19`})(({theme:e})=>({padding:`${e.spacing.twoXS} ${e.spacing.none}`,fontSize:e.fontSizes.sm})),iu=h(`div`,{target:`e1lpckdq20`})(({theme:e})=>({marginLeft:e.spacing.twoXS})),au=h(`span`,{target:`e1lpckdq21`})({position:`absolute`,width:`1px`,height:`1px`,padding:0,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,border:0}),ou=({isActive:e,pageUrl:t,icon:n,onClick:r,isTopNav:i,isInDropdown:a,children:o,widgetsDisabled:c,isExternal:l,externalUrl:d})=>{let f=Ct(),p=c,m;m=i&&a?`stTopNavDropdownLink`:i?`stTopNavLink`:`stSidebarNavLink`;let h=i?`stTopNavLinkContainer`:`stSidebarNavLinkContainer`,g=l?!1:e;return s(Bl,{disabled:p,"data-testid":h,children:u(Ul,{"data-testid":m,isActive:g,disabled:p,href:l?d??t:t,onClick:r,"aria-current":g?`page`:void 0,target:l?`_blank`:void 0,rel:l?`noopener noreferrer`:void 0,children:[n?.length?s(Vl,{isActive:g,children:s(Hn,{size:`base`,iconValue:n,color:!g&&Vn(n)?f.colors.fadedText60:f.colors.bodyText})}
18):null,s(Wl,{isActive:g,disabled:p,isTopNav:i,label:o,children:s(ke,{source:o,allowHTML:!1,isLabel:!0,disableLinks:!0,truncate:!0,inheritFont:!0})}),l&&s(au,{children:`(opens in new tab)`})]})})};function su(e){return e.externalUrl??void 0}function cu(e){return!P(e.externalUrl)}function lu(e){return pu(e).length>1}function uu(e){return ho(e,e=>e.sectionHeader||``)}function du(e){return Object.keys(e).some(e=>e!==``)}function fu(e){if(!du(e))return{individualPages:Object.values(e).flat(),sections:{}};let t=e[``]||[],n={};return Object.entries(e).forEach(([e,t])=>{e&&(n[e]=t)}),{individualPages:t,sections:n}}function pu(e){return e.filter(e=>!e.isHidden)}var mu=({title:e,sections:t,handlePageChange:n,endpoints:r,pageLinkBaseUrl:i,currentPageScriptHash:a,hideChevron:o=!1,widgetsDisabled:c})=>{let[l,d]=(0,U.useState)(!1),f=Ct(),p=t.length>1;return P(t)||t.length===0||t[0].length===0?null:s(Xn,{triggerType:$n.click,placement:Kn.bottomLeft,content:()=>s(ru,{"data-testid":`stTopNavPopover`,children:t.map((e,t)=>{let o=e[0].sectionHeader;return e.map((e,t)=>{let l=cu(e),f=t=>{if(l){d(!1);return}t.preventDefault(),e.pageScriptHash&&n(e.pageScriptHash),d(!1)},m=String(e.pageName||``);return u(U.Fragment,{children:[t===0&&p&&s(nu,{children:s(ke,{source:o||``,allowHTML:!1,isLabel:!0,disableLinks:!0,truncate:!0,inheritFont:!0})}),s(eu,{children:s(ou,{icon:e.icon||null,isTopNav:!0,isInDropdown:!0,isActive:a===e.pageScriptHash,onClick:f,pageUrl:r.buildAppPageURL(i,e),widgetsDisabled:c,isExternal:l,externalUrl:su(e),children:m})})]},`${e.pageScriptHash}-${m}`)})})}),isOpen:l,onClickOutside:()=>d(!1),onClick:()=>l?d(!1):void 0,onEsc:()=>d(!1),renderAll:!0,popoverMargin:vn(f.spacing.twoXS),overrides:{Body:{style:()=>({...He(f),marginRight:f.spacing.lg,marginBottom:f.spacing.lg,maxHeight:`70vh`,minWidth:`8rem`,overflow:`auto`,maxWidth:`calc(${f.sizes.contentMaxWidth} - 2*${f.spacing.lg})`,[`@media (max-width: ${f.breakpoints.sm})`]:{maxWidth:`calc(100% - ${f.spacing.threeXL})`}})}},children:s(`div`,{children:u(Ql,{tabIndex:0,onClick:()=>d(!l),isOpen:l,"data-testid":`stTopNavSection`,children:[s(tu,{children:s(ke,{source:e,allowHTML:!1,isLabel:!0,disableLinks:!0,truncate:!0,inheritFont:!0})}),!o&&s(iu,{children:s(Bn,{content:l?cs:ss,size:`lg`})})]})})})},hu=({endpoints:e,widgetsDisabled:t})=>{let{pageLinkBaseUrl:n,currentPageScriptHash:r,appPages:i,onPageChange:a}=(0,U.useContext)(me),o=(0,U.useMemo)(()=>pu(i),[i]),{data:c,itemKey:l}=(0,U.useMemo)(()=>{let e=fu(uu(o));return{data:[...e.individualPages,...Object.values(e.sections)],itemKey:e=>Array.isArray(e)?e[0]?.sectionHeader??``:e.pageScriptHash??``}},[o]);return s(Il,{component:Zl,itemKey:l,data:c,maxCount:`responsive`,renderItem:(0,U.useCallback)((i,o)=>{if(Array.isArray(i))return s(mu,{sections:[i],title:i[0].sectionHeader||``,handlePageChange:a,endpoints:e,pageLinkBaseUrl:n,currentPageScriptHash:r,widgetsDisabled:t});let c=cu(i);return s($l,{children:s(ou,{isTopNav:!0,isInDropdown:!1,isActive:r===i.pageScriptHash,icon:i.icon,pageUrl:e.buildAppPageURL(n,i),onClick:e=>{c||(e.preventDefault(),i.pageScriptHash&&a(i.pageScriptHash))},widgetsDisabled:t,isExternal:c,externalUrl:su(i),children:String(i.pageName)})})},[a,e,n,r,t]),renderRest:(0,U.useCallback)(i=>{if(P(i))return null;let o=`${i.flat().length} more`;return s(mu,{hideChevron:!0,sections:i.map(e=>Array.isArray(e)?e:[e]),title:o,handlePageChange:a,endpoints:e,pageLinkBaseUrl:n,currentPageScriptHash:r,widgetsDisabled:t})},[a,e,n,r,t])})},gu=n(o()),Y=function(){return Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Y.apply(this,arguments)},_u={width:`100%`,height:`10px`,top:`0px`,left:`0px`,cursor:`row-resize`},vu={width:`10px`,height:`100%`,top:`0px`,left:`0px`,cursor:`col-resize`},yu={width:`20px`,height:`20px`,position:`absolute`,zIndex:1},bu={top:Y(Y({},_u),{top:`-5px`}),right:Y(Y({},vu),{left:void 0,right:`-5px`}),bottom:Y(Y({},_u),{top:void 0,bottom:`-5px`}),left:Y(Y({},vu),{left:`-5px`}),topRight:Y(Y({}
vendor: 13,540 bytes, line 18
18,yu),{right:`-10px`,top:`-10px`,cursor:`ne-resize`}),bottomRight:Y(Y({},yu),{right:`-10px`,bottom:`-10px`,cursor:`se-resize`}),bottomLeft:Y(Y({},yu),{left:`-10px`,bottom:`-10px`,cursor:`sw-resize`}),topLeft:Y(Y({},yu),{left:`-10px`,top:`-10px`,cursor:`nw-resize`})},xu=(0,U.memo)(function(e){var t=e.onResizeStart,n=e.direction,r=e.children,i=e.replaceStyles,a=e.className,o=(0,U.useCallback)(function(e){t(e,n)},[t,n]),s=(0,U.useCallback)(function(e){t(e,n)},[t,n]),c=(0,U.useMemo)(function(){return Y(Y({position:`absolute`,userSelect:`none`},bu[n]),i??{})},[i,n]);return(0,gu.jsx)(`div`,{className:a||void 0,style:c,onMouseDown:o,onTouchStart:s,children:r})}),Su=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Cu=function(){return Cu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Cu.apply(this,arguments)},wu={width:`auto`,height:`auto`},Tu=function(e,t,n){return Math.max(Math.min(e,n),t)},Eu=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},Du=function(e,t){return new RegExp(e,`i`).test(t)},Ou=function(e){return!!(e.touches&&e.touches.length)},ku=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},Au=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n},0),i=Math.abs(t[r]-e);return n===0||i<n?t[r]:e},ju=function(e){return e=e.toString(),e===`auto`||e.endsWith(`px`)||e.endsWith(`%`)||e.endsWith(`vh`)||e.endsWith(`vw`)||e.endsWith(`vmax`)||e.endsWith(`vmin`)?e:`${e}px`},Mu=function(e,t,n,r){if(e&&typeof e==`string`){if(e.endsWith(`px`))return Number(e.replace(`px`,``));if(e.endsWith(`%`)){var i=Number(e.replace(`%`,``))/100;return t*i}if(e.endsWith(`vw`)){var i=Number(e.replace(`vw`,``))/100;return n*i}if(e.endsWith(`vh`)){var i=Number(e.replace(`vh`,``))/100;return r*i}}return e},Nu=function(e,t,n,r,i,a,o){return r=Mu(r,e.width,t,n),i=Mu(i,e.height,t,n),a=Mu(a,e.width,t,n),o=Mu(o,e.height,t,n),{maxWidth:r===void 0?void 0:Number(r),maxHeight:i===void 0?void 0:Number(i),minWidth:a===void 0?void 0:Number(a),minHeight:o===void 0?void 0:Number(o)}},Pu=function(e){return Array.isArray(e)?e:[e,e]},Fu=`as.ref.style.className.grid.gridGap.snap.bounds.boundsByDirection.size.defaultSize.minWidth.minHeight.maxWidth.maxHeight.lockAspectRatio.lockAspectRatioExtraWidth.lockAspectRatioExtraHeight.enable.handleStyles.handleClasses.handleWrapperStyle.handleWrapperClass.children.onResizeStart.onResize.onResizeStop.handleComponent.scale.resizeRatio.snapGap`.split(`.`),Iu=`__resizable_base__`,Lu=function(e){Su(t,e);function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.delta={width:0,height:0},n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement(`div`);return t.style.width=`100%`,t.style.height=`100%`,t.style.position=`absolute`,t.style.transform=`scale(0, 0)`,t.style.left=`0`,t.style.flex=`0 0 100%`,t.classList?t.classList.add(Iu):t.className+=Iu,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.state={isResizing:!1,width:n.propsSize?.width??`auto`,height:n.propsSize?.height??`auto`,direction:`right`,original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:`100%`,width:`100%`,backgroundColor:`rgba(0,0,0,0)`,cursor:`auto`,opacity:0,position:`fixed`,zIndex:9999,top:`0`,left:`0`,bottom:`0`,right:`0`},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return Object.defineProperty(t.prototype,`parentNode`,{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`window`,{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`propsSize`,{get:function(){return this.props.size||this.props.defaultSize||wu},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`size`,{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;i!==`relative`&&(this.resizable.style.position=`relative`),e=this.resizable.style.width===`auto`?n:this.resizable.offsetWidth,t=this.resizable.style.height===`auto`?r:this.resizable.offsetHeight,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`sizeStyle`,{get:function(){var e=this,t=this.props.size,n=function(t){if(e.state[t]===void 0||e.state[t]===`auto`)return`auto`;if(e.propsSize&&e.propsSize[t]&&e.propsSize[t]?.toString().endsWith(`%`)){if(e.state[t].toString().endsWith(`%`))return e.state[t].toString();var n=e.getParentSize();return`${Number(e.state[t].toString().replace(`px`,``))/n[t]*100}%`}return ju(e.state[t])};return{width:t&&t.width!==void 0&&!this.state.isResizing?ju(t.width):n(`width`),height:t&&t.height!==void 0&&!this.state.isResizing?ju(t.height):n(`height`)}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;n!==`wrap`&&(t=!0,this.parentNode.style.flexWrap=`wrap`),e.style.position=`relative`,e.style.minWidth=`100%`,e.style.minHeight=`100%`;var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener(`mouseup`,this.onMouseUp),this.window.addEventListener(`mousemove`,this.onMouseMove),this.window.addEventListener(`mouseleave`,this.onMouseUp),this.window.addEventListener(`touchmove`,this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener(`touchend`,this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener(`mouseup`,this.onMouseUp),this.window.removeEventListener(`mousemove`,this.onMouseMove),this.window.removeEventListener(`mouseleave`,this.onMouseUp),this.window.removeEventListener(`touchmove`,this.onMouseMove,!0),this.window.removeEventListener(`touchend`,this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:e.flexBasis===`auto`?void 0:e.flexBasis})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return this.state[t]===`auto`&&this.state.original[t]===e&&(n===void 0||n===`auto`)?`auto`:e},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n=this.props.boundsByDirection,r=this.state.direction,i=n&&Du(`left`,r),a=n&&Du(`top`,r),o,s;if(this.props.bounds===`parent`){var c=this.parentNode;c&&(o=i?this.resizableRight-this.parentLeft:c.offsetWidth+(this.parentLeft-this.resizableLeft),s=a?this.resizableBottom-this.parentTop:c.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds===`window`?this.window&&(o=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,s=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),s=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),s&&Number.isFinite(s)&&(t=t&&t<s?t:s),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=Pu(this.props.resizeRatio||1),i=r[0],a=r[1],o=this.state,s=o.direction,c=o.original,l=this.props,u=l.lockAspectRatio,d=l.lockAspectRatioExtraHeight,f=l.lockAspectRatioExtraWidth,p=c.width,m=c.height,h=d||0,g=f||0;return Du(`right`,s)&&(p=c.width+(e-c.x)*i/n,u&&(m=(p-g)/this.ratio+h)),Du(`left`,s)&&(p=c.width-(e-c.x)*i/n,u&&(m=(p-g)/this.ratio+h)),Du(`bottom`,s)&&(m=c.height+(t-c.y)*a/n,u&&(p=(m-h)*this.ratio+g)),Du(`top`,s)&&(m=c.height-(t-c.y)*a/n,u&&(p=(m-h)*this.ratio+g)),{newWidth:p,newHeight:m}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,a=i.lockAspectRatio,o=i.lockAspectRatioExtraHeight,s=i.lockAspectRatioExtraWidth,c=r.width===void 0?10:r.width,l=n.width===void 0||n.width<0?e:n.width,u=r.height===void 0?10:r.height,d=n.height===void 0||n.height<0?t:n.height,f=o||0,p=s||0;if(a){var m=(u-f)*this.ratio+p,h=(d-f)*this.ratio+p,g=(c-p)/this.ratio+f,_=(l-p)/this.ratio+f,v=Math.max(c,m),y=Math.min(l,h),b=Math.max(u,g),x=Math.min(d,_);e=Tu(e,v,y),t=Tu(t,b,x)}else e=Tu(e,c,l),t=Tu(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if(this.props.bounds===`parent`){var t=this.parentNode;if(t){var n=t.getBoundingClientRect();this.parentLeft=n.left*e,this.parentTop=n.top*e}}if(this.props.bounds&&typeof this.props.bounds!=`string`){var r=this.props.bounds.getBoundingClientRect();this.targetLeft=r.left*e,this.targetTop=r.top*e}if(this.resizable){var i=this.resizable.getBoundingClientRect(),a=i.left,o=i.top,s=i.right,c=i.bottom;this.resizableLeft=a*e,this.resizableRight=s*e,this.resizableTop=o*e,this.resizableBottom=c*e}},t.prototype.onResizeStart=function(e,t){if(!(!this.resizable||!this.window)){var n=0,r=0;if(e.nativeEvent&&ku(e.nativeEvent)?(n=e.nativeEvent.clientX,r=e.nativeEvent.clientY):e.nativeEvent&&Ou(e.nativeEvent)&&(n=e.nativeEvent.touches[0].clientX,r=e.nativeEvent.touches[0].clientY),!(this.props.onResizeStart&&this.resizable&&this.props.onResizeStart(e,t,this.resizable)===!1)){this.props.size&&(this.props.size.height!==void 0&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),this.props.size.width!==void 0&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio==`number`?this.props.lockAspectRatio:this.size.width/this.size.height;var i,a=this.window.getComputedStyle(this.resizable);if(a.flexBasis!==`auto`){var o=this.parentNode;o&&(this.flexDir=this.window.getComputedStyle(o).flexDirection.startsWith(`row`)?`row`:`column`,i=a.flexBasis)}this.setBoundingClientRect(),this.bindEvents();var s={original:{x:n,y:r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Cu(Cu({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||`auto`}),direction:t,flexBasis:i};this.setState(s)}}},t.prototype.onMouseMove=function(e){var t=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Ou(e))try{e.preventDefault(),e.stopPropagation()}catch{}var n=this.props,r=n.maxWidth,i=n.maxHeight,a=n.minWidth,o=n.minHeight,s=Ou(e)?e.touches[0].clientX:e.clientX,c=Ou(e)?e.touches[0].clientY:e.clientY,l=this.state,u=l.direction,d=l.original,f=l.width,p=l.height,m=this.getParentSize(),h=Nu(m,this.window.innerWidth,this.window.innerHeight,r,i,a,o);r=h.maxWidth,i=h.maxHeight,a=h.minWidth,o=h.minHeight;var g=this.calculateNewSizeFromDirection(s,c),_=g.newHeight,v=g.newWidth,y=this.calculateNewMaxFromBoundary(r,i);this.props.snap&&this.props.snap.x&&(v=Au(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=Au(_,this.props.snap.y,this.props.snapGap));var b=this.calculateNewSizeFromAspectRatio(v,_,{width:y.maxWidth,height:y.maxHeight},{width:a,height:o});if(v=b.newWidth,_=b.newHeight,this.props.grid){var x=Eu(v,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),S=Eu(_,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),C=this.props.snapGap||0,w=C===0||Math.abs(x-v)<=C?x:v,T=C===0||Math.abs(S-_)<=C?S:_;v=w,_=T}var E={width:v-d.width,height:_-d.height};if(this.delta=E,f&&typeof f==`string`){if(f.endsWith(`%`)){var D=v/m.width*100;v=`${D}%`}else if(f.endsWith(`vw`)){var O=v/this.window.innerWidth*100;v=`${O}vw`}else if(f.endsWith(`vh`)){var ee=v/this.window.innerHeight*100;v=`${ee}vh`}}if(p&&typeof p==`string`){if(p.endsWith(`%`)){var D=_/m.height*100;_=`${D}%`}else if(p.endsWith(`vw`)){var O=_/this.window.innerWidth*100;_=`${O}vw`}else if(p.endsWith(`vh`)){var ee=_/this.window.innerHeight*100;_=`${ee}vh`}}var k={width:this.createSizeForCssProperty(v,`width`),height:this.createSizeForCssProperty(_,`height`)};this.flexDir===`row`?k.flexBasis=k.width:this.flexDir===`column`&&(k.flexBasis=k.height);var A=this.state.width!==k.width,j=this.state.height!==k.height,M=this.state.flexBasis!==k.flexBasis,N=A||j||M;N&&(0,Oo.flushSync)(function(){t.setState(k)}),this.props.onResize&&N&&this.props.onResize(e,u,this.resizable,E)}}
18,t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction;t.original,!(!n||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,this.delta),this.props.size&&this.setState({width:this.props.size.width??`auto`,height:this.props.size.height??`auto`}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Cu(Cu({},this.state.backgroundStyle),{cursor:`auto`})}))},t.prototype.updateSize=function(e){this.setState({width:e.width??`auto`,height:e.height??`auto`})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,i=t.handleClasses,a=t.handleWrapperStyle,o=t.handleWrapperClass,s=t.handleComponent;return n?(0,gu.jsx)(`div`,{className:o,style:a,children:Object.keys(n).map(function(t){return n[t]===!1?null:(0,gu.jsx)(xu,{direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:i&&i[t],children:s&&s[t]?s[t]:null},t)})}):null},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce(function(t,n){return Fu.indexOf(n)===-1&&(t[n]=e.props[n]),t},{}),n=Cu(Cu(Cu({position:`relative`,userSelect:this.state.isResizing?`none`:`auto`},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:`border-box`,flexShrink:0});return this.state.flexBasis&&(n.flexBasis=this.state.flexBasis),(0,gu.jsxs)(this.props.as||`div`,Cu({style:n,className:this.props.className},t,{ref:function(t){t&&(e.resizable=t)},children:[this.state.isResizing&&(0,gu.jsx)(`div`,{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:`div`,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(U.PureComponent),Ru=({header:e=``,children:t,isExpanded:n,onToggle:r})=>u(Xl,{children:[e&&u(ql,{"data-testid":`stNavSectionHeader`,onClick:r,isExpanded:n,children:[s(Kl,{children:s(ke,{source:e,allowHTML:!1,isLabel:!0,disableLinks:!0,truncate:!0,inheritFont:!0})}),s(Gl,{isExpanded:n,children:s(Hn,{iconValue:`:material/expand_more:`,size:`lg`})})]}),n&&t]}),zu=10,Bu=(0,_r.getLogger)(`SidebarNav`);function Vu({pageUrl:e,page:t,isActive:n,onClick:r,widgetsDisabled:i}){let a=t.pageName;return s(Hl,{children:s(ou,{isActive:n,pageUrl:e,icon:t.icon,onClick:r,widgetsDisabled:i,isExternal:cu(t),externalUrl:su(t),children:a})})}function Hu(e,t,n,r,i,a,o){let c=[],l=a;return Object.entries(e).forEach(([e,a])=>{let u=[...a],d=u,f=r[e];if(t){let e=o-l;e<=0?d=[]:u.length>e&&(d=u.slice(0,e))}f&&(l+=d.length),d.length>0&&c.push(s(Ru,{header:e,isExpanded:f,onToggle:()=>i(e),children:d.map(n)},e))}),{sections:c,updatedPageCount:l}}var Uu=({endpoints:e,collapseSidebar:t,hasSidebarElements:n,widgetsDisabled:r})=>{let[i,a]=(0,U.useState)(!1),{expandSidebarNav:o,sidebarNavVisibleItems:c}=(0,U.useContext)(Fe),{pageLinkBaseUrl:l,appPages:d,onPageChange:f,currentPageScriptHash:p}=(0,U.useContext)(me),m=j(c)&&c>0?c:zu,h=m+2,g=`stSidebarSectionsState-${l}`,[_,v]=(0,U.useState)(null),y=(0,U.useMemo)(()=>pu(d),[d]),b=(0,U.useMemo)(()=>fu(uu(y)),[y]),x=(0,U.useMemo)(()=>{if(!(Object.keys(b.sections).length>0))return y.length;let e=b.individualPages.length;return Object.entries(b.sections).forEach(([t,n])=>{_?.[t]&&(e+=n.length)}),e},[y.length,_,b]);(0,U.useEffect)(()=>{let e=L()&&window.localStorage.getItem(`sidebarNavState`)===`expanded`;!i&&(o||e)&&a(!0)},[i,o]),(0,U.useEffect)(()=>{let e={};if(L()){let t=window.localStorage.getItem(g);if(t)try{e=JSON.parse(t)}catch(e){Bu.warn(`Could not parse sidebar nav state from localStorage`,e)}}v(Object.keys(b.sections).reduce((t,n)=>(t[n]=e[n]??!0,t),{}))},[b.sections,g]),(0,U.useEffect)(()=>{L()&&_&&window.localStorage.setItem(g,JSON.stringify(_))},[_,g]);let S=(0,U.useCallback)(e=>{v(t=>t?{...t,[e]:!t[e]}:null)},[]),C=(0,U.useCallback)(()=>{let e=!i;L()&&(e?window.localStorage.setItem(`sidebarNavState`,`expanded`):window.localStorage.removeItem(`sidebarNavState`)),a(e)},[i]),w=(0,U.useCallback)((n,i)=>{let a=e.buildAppPageURL(l,n),o=n.pageScriptHash===p,c=cu(n);return s(Vu,{pageUrl:a,page:n,isActive:o,onClick:e=>{if(c){Re()&&t();return}e.preventDefault(),f(n.pageScriptHash),Re()&&t()},widgetsDisabled:r},`${n.pageName}-${i}`)},[t,p,e,f,l,r]);if(!_)return null;let T=[],E=n&&x>h&&!o,D=E&&!i,O=0;if(b.individualPages.length>0){let e=D?b.individualPages.slice(0,m):b.individualPages;T.push(...e.map(w)),O+=e.length}if(Object.keys(b.sections).length>0){let e=Hu(b.sections,D,w,_,S,O,m);T.push(...e.sections)}return u(Rl,{"data-testid":`stSidebarNav`,children:[s(zl,{"data-testid":`stSidebarNavItems`,children:T}),E&&s(Jl,{onClick:C,"data-testid":`stSidebarNavViewButton`,children:i?`View less`:`View ${x-m} more`}),n&&s(Yl,{"data-testid":`stSidebarNavSeparator`})]})};function Wu(e,t,n){switch(e){case N.SidebarState.EXPANDED:return!1;case N.SidebarState.COLLAPSED:return!0;case N.SidebarState.AUTO:default:return n<=t}}var Gu=e=>`stSidebarCollapsed-${e}`,Ku=e=>{if(!L())return null;let t=window.localStorage.getItem(Gu(e));return t===null?null:t===`true`},qu=(e,t)=>
18{L()&&window.localStorage.setItem(Gu(e),t.toString())};function Ju(e){return Number.isNaN(e)?Number.parseInt(`300`,10):Math.min(600,Math.max(200,e))}function Yu(e){return parseInt(e,10)-.02}var Xu=({endpoints:e,children:t,hasElements:n,isCollapsed:r,onToggleCollapse:i,widgetsDisabled:a})=>{let o=Ct(),c=Yu(o.breakpoints.md),{innerWidth:l}=ar(),{appPages:d}=(0,U.useContext)(me),{hideSidebarNav:f,appLogo:p,initialSidebarWidth:m,appRootRef:h}=(0,U.useContext)(Fe),g=ge(),_=(0,U.useRef)(null),v=L()?window.localStorage.getItem(`sidebarWidth`):void 0,[y,b]=(0,U.useState)(()=>(()=>{if(v){let e=Number.parseInt(v,10);return Number.isNaN(e)?null:Ju(e).toString()}return null})()||(j(m)?Ju(m).toString():`300`)),[x,S]=(0,U.useState)(l??1/0),[C,w]=(0,U.useState)(!1),T=(0,U.useCallback)(()=>{w(!0)},[]),E=(0,U.useCallback)(()=>{w(!1)},[]),D=(0,U.useCallback)(e=>{let t=Ju(e).toString();b(t),L()&&window.localStorage.setItem(`sidebarWidth`,t)},[]),O=(0,U.useCallback)((e,t,n,r)=>{n&&D(n.clientWidth||n.offsetWidth)},[D]);Ke(()=>{l<x&&l<=c&&!r&&i(!0,!1),S(l)},[l]),(0,U.useEffect)(()=>{let e=e=>{let t=_.current,n=h?.current,a=e.target;if(!t||!a)return;let o=t.contains(a),s=n?.contains(a)??!1;!o&&s&&l<=c&&!r&&i(!0)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[c,r,i,l,h]);function ee(){let e=j(m)?Ju(m).toString():`300`;b(e),L()&&window.localStorage.setItem(`sidebarWidth`,e)}let k=(0,U.useCallback)(()=>{i(!r)},[r,i]),A=()=>p?s(Rs,{appLogo:p,endpoints:e,collapsed:r,componentName:`Sidebar Logo`,dataTestId:`stSidebarLogo`}):s(Ps,{"data-testid":`stLogoSpacer`}),M=lu(d)&&!f;return s(Lu,{className:`stSidebar`,"data-testid":`stSidebar`,"aria-expanded":!r,enable:{top:!1,right:!0,bottom:!1,left:!1},handleStyles:{right:{width:`8px`,right:`-6px`}},handleComponent:{right:s(Ds,{onDoubleClick:ee})},size:{width:y,height:`auto`},as:ws,onResizeStop:O,isCollapsed:r,sidebarWidth:y,windowInnerWidth:l,children:u(Es,{"data-testid":`stSidebarContent`,ref:_,onMouseOver:T,onMouseOut:E,scrollbarGutterSize:g,children:[u(Os,{"data-testid":`stSidebarHeader`,children:[A(),s(Fs,{showSidebarCollapse:C,"data-testid":`stSidebarCollapseButton`,children:s(R,{kind:B.HEADER_NO_PADDING,onClick:k,children:s(Hn,{size:`xl`,iconValue:`:material/keyboard_double_arrow_left:`,color:o.colors.fadedText60})})})]}),M&&s(Uu,{endpoints:e,collapseSidebar:k,hasSidebarElements:n,widgetsDisabled:a}),s(Ts,{hasPageNavAbove:M,"data-testid":`stSidebarUserContent`,children:t})]})})};function Zu(e){return s(tt.Provider,{value:!0,children:s(Xu,{...e})})}var Qu=({children:e,...t})=>{let{activeTheme:n}=(0,U.useContext)(Ie),r=xn(n);return s(we,{theme:r.emotion,baseuiTheme:r.basewebTheme,children:s(Zu,{...t,children:e})})},$u=h(`div`,{target:`eqt0gmo0`})({display:`flex`,flexDirection:`row`,justifyContent:`flex-start`,alignItems:`stretch`,alignContent:`flex-start`,position:`absolute`,top:0,left:0,right:0,bottom:0,overflow:`hidden`,"@media print":{overflow:`visible`}}),ed=h(`section`,{target:`eqt0gmo1`})(({disableScrolling:e,theme:t})=>({display:`flex`,flexDirection:`column`,width:t.sizes.full,overflow:e?`hidden`:`auto`,alignItems:`center`,height:`100dvh`,"&:focus":{outline:`none`},"@media not print":{[`@media (max-width: ${t.breakpoints.md})`]:{position:`absolute`,top:0,left:0,right:0,bottom:0,height:`100dvh`}},"@media print":{overflow:`visible`}})),td=h(`div`,{target:`eqt0gmo2`})(({theme:e})=>({position:`sticky`,left:0,bottom:0,width:`100%`,zIndex:e.zIndices.bottom,"@media print":{position:`static`}})),nd=h(`div`,{target:`eqt0gmo3`})(({theme:e})=>({position:`relative`,bottom:0,width:`100%`,minWidth:`100%`,backgroundColor:e.colors.bgColor,display:`flex`,flexDirection:`column`,alignItems:`center`})),rd=e=>({[`@media (min-width: calc(${e.sizes.contentMaxWidth} + 2 * (${e.sizes.wideSidePadding} - ${e.spacing.lg})))`]:{paddingLeft:e.sizes.wideSidePadding,paddingRight:e.sizes.wideSidePadding},minWidth:`auto`,maxWidth:`initial`}),id=h(`div`,{target:`eqt0gmo4`})(({hasBottom:e,isWideMode:t,showPadding:n,hasHeader:r,showToolbar:i,hasTopNav:a,hasSidebar:o,embedded:s,theme:c})=>{let l=`2.25rem`,u=l;s?n||i?u=`6rem`:(r||o)&&(u=`4.5rem`):u=a?`8rem`:`6rem`;let d=n&&!e?`10rem`:c.spacing.lg;return{width:c.sizes.full,paddingLeft:c.spacing.lg,paddingRight:c.spacing.lg,paddingTop:u,paddingBottom:d,maxWidth:c.sizes.contentMaxWidth,...t&&rd(c),"@media print":{paddingTop:l}}}),ad=h(`div`,{target:`eqt0gmo5`})(({theme:e})=>({width:e.sizes.full})),od=h(`div`,{target:`eqt0gmo6`})({display:`none`}),sd=h(`div`,{target:`eqt0gmo7`})(({isWideMode:e,showPadding:t,theme:n})=>({width:n.sizes.full,paddingLeft:n.spacing.lg,paddingRight:n.spacing.lg,paddingTop:n.spacing.lg,paddingBottom:t?n.sizes.appDefaultBottomPadding:n.spacing.threeXL,maxWidth:n.sizes.contentMaxWidth,...e&&rd(n),"@media print":{paddingTop:n.spacing.none}})),cd=h(`div`,{target:`eqt0gmo8`})(({theme:e})=>({width:e.sizes.full,flexGrow:1})),ld=h(`div`,{target:`eqt0gmo9`})(({theme:e})=>({position:`relative`,bottom:e.spacing.none})),ud=h(`div`,{target:`eqt0gmo10`})(({theme:e})=>({width:e.sizes.full,minWidth:0,height:`100dvh`,[`@media (min-width: ${e.breakpoints.md})`]:{position:`relative`}}));function dd(e){let{className:t,tabIndex:n,children:r,isEmbedded:i,disableScrolling:a}=e;return s(ed,{tabIndex:n,className:t,isEmbedded:i,disableScrolling:a,ref:Qe(!0),"data-testid":`stAppScrollToBottomContainer`,children:r})}function fd(e){let{elements:t,widgetMgr:n,uploadClient:r,sendMessageToHost:i,endpoints:a,navigationPosition:o,topRightContent:c,wideMode:l,embedded:d,showPadding:f,disableScrolling:p,addScriptFinishedHandler:m,removeScriptFinishedHandler:h,widgetsDisabled:g,showToolbar:_,disableFullscreenMode:v,componentRegistry:y}=e;(0,U.useEffect)(()=>{let e=()=>{i({type:`UPDATE_HASH`,hash:window.location.hash})};return window.addEventListener(`hashchange`,e,!1),()=>window.removeEventListener(`hashchange`,e,!1)},[i]);let{activeTheme:b}=(0,U.useContext)(Ie),{appPages:x,pageLinkBaseUrl:S}=(0,U.useContext)(me),{initialSidebarState:C,appLogo:w,hideSidebarNav:T}=(0,U.useContext)(Fe),{innerWidth:E}=ar(),D=l?`wide`:`narrow`,O=!t.sidebar.isEmpty,ee=!t.event.isEmpty,k=!t.bottom.isEmpty,[A,j]=(0,U.useState)(!1),N=E>0&&(O||o===M.Position.SIDEBAR&&!T&&lu(x)||A);(0,U.useEffect)(()=>{N&&T&&!A&&j(!0)},[N,T,A]);let P=(0,U.useCallback)(()=>{!O&&A&&j(!1)},[O,A]);(0,U.useEffect)(()=>(m(P),()=>{h(P)}),[P,m,h]);let te=k?dd:ed,ne=e=>s(ht,{node:e,endpoints:a,widgetMgr:n,widgetsDisabled:g,uploadClient:r,disableFullscreenMode:v,componentRegistry:y,height:`auto`,isRoot:!0}),[F,re]=(0,U.useState)(()=>{let e=Ku(S);return e===null?Wu(C,parseInt(b.emotion.breakpoints.md,10),E):e});Ke(()=>{if(E>0&&N){let e=Ku(S);re(e===null?Wu(C,parseInt(b.emotion.breakpoints.md,10),E):e)}},[E,N,C,b.emotion.breakpoints.md,S]);let ie=(0,U.useCallback)((e,t=!0)=>{re(e),t&&qu(S,e)},[S]),ae=(0,U.useCallback)(()=>{ie(!F,!0)}
18,[ie,F]),oe=w?s(Rs,{appLogo:w,endpoints:a,collapsed:F||!N,componentName:`Header Logo`,dataTestId:`stHeaderLogo`}):null,se=oe&&(!N||F),ce=N&&F,le=o===M.Position.TOP&&lu(x),I=se||ce||le||_;return u($u,{className:`stAppViewContainer appview-container`,"data-testid":`stAppViewContainer`,"data-layout":D,children:[N&&s(it,{id:`Sidebar`,children:s(Qu,{endpoints:a,hasElements:O,isCollapsed:F,onToggleCollapse:ie,widgetsDisabled:g,children:s(ad,{children:ne(t.sidebar)})})}),u(ud,{children:[s(Ss,{hasSidebar:N,isSidebarOpen:N&&!F,onToggleSidebar:ae,navigation:o===M.Position.TOP&&lu(x)?s(hu,{endpoints:a,widgetsDisabled:g}):null,rightContent:c,logoComponent:oe,showToolbar:_}),u(te,{tabIndex:0,isEmbedded:d,disableScrolling:p,className:`stMain`,"data-testid":`stMain`,children:[s(it,{id:`Main`,children:s(id,{className:`stMainBlockContainer block-container`,"data-testid":`stMainBlockContainer`,isWideMode:l,showPadding:f,hasBottom:k,hasHeader:I,hasSidebar:N,showToolbar:_,hasTopNav:le,embedded:d,children:ne(t.main)})}),!k&&s(ld,{"data-testid":`stAppIframeResizerAnchor`,"data-iframe-height":!0}),k&&u(it,{id:`Bottom`,children:[s(cd,{}),s(td,{className:`stBottom`,"data-testid":`stBottom`,children:s(nd,{children:s(sd,{"data-testid":`stBottomBlockContainer`,isWideMode:l,showPadding:f,children:ne(t.bottom)})})})]})]})]}),ee&&s(it,{id:`Event`,children:s(ms,{children:s(od,{className:`stEvent`,"data-testid":`stEvent`,children:ne(t.event)})})})]})}var pd=h(`div`,{target:`e19wr9s00`})(({theme:e})=>({display:`flex`,gap:e.spacing.sm,alignItems:`center`,lineHeight:e.iconSizes.md})),md=({onClick:e})=>s(`div`,{className:`stAppDeployButton`,"data-testid":`stAppDeployButton`,children:s(R,{kind:B.HEADER_BUTTON,onClick:e,children:s(pd,{children:s(`span`,{children:`Deploy`})})})}),hd=U.forwardRef(function(e,t){return U.createElement(We,c({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 24 24`},e,{ref:t}),U.createElement(`path`,{fill:`none`,d:`M0 0h24v24H0V0z`}),U.createElement(`path`,{d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z`}))});hd.displayName=`MoreVert`;var gd=`video/webm`,_d=(0,_r.getLogger)(`ScreenCastRecorder`),vd=class{static isSupportedBrowser(){try{return j(navigator.mediaDevices)&&j(navigator.mediaDevices.getUserMedia)&&j(navigator.mediaDevices.getDisplayMedia)&&MediaRecorder.isTypeSupported(gd)}catch{return!1}}constructor({recordAudio:e,onErrorOrStop:t}){this.recordAudio=e,this.onErrorOrStopCallback=t,this.inputStream=null,this.recordedChunks=[],this.mediaRecorder=null}async initialize(){let e=(await navigator.mediaDevices.getDisplayMedia({video:!0})).getTracks();if(this.recordAudio){let t=await navigator.mediaDevices.getUserMedia({video:!1,audio:!0});e=e.concat(t.getAudioTracks())}this.recordedChunks=[],this.inputStream=new MediaStream(e),this.mediaRecorder=new MediaRecorder(this.inputStream,{mimeType:gd}),this.mediaRecorder.ondataavailable=e=>this.recordedChunks.push(e.data)}getState(){return this.mediaRecorder?this.mediaRecorder.state:`inactive`}start(){if(!this.mediaRecorder)return _d.warn(`ScreenCastRecorder.start: mediaRecorder is null`),!1;let e=e=>{_d.warn(`mediaRecorder.start threw an error: ${String(e)}`)};this.mediaRecorder.onerror=t=>{e(t),this.onErrorOrStopCallback()},this.mediaRecorder.onstop=()=>this.onErrorOrStopCallback();try{this.mediaRecorder.start()}catch(t){return e(t),!1}return!0}stop(){if(!this.mediaRecorder)return;let e,t=new Promise(t=>{e=t});return this.mediaRecorder.onstop=()=>e(),this.mediaRecorder.stop(),this.inputStream&&=(this.inputStream.getTracks().forEach(e=>e.stop()),null),t.then(()=>this.buildOutputBlob())}buildOutputBlob(){return new Blob(this.recordedChunks,{type:gd})}},yd=e=>d(`0%{box-shadow:0 0 `,e.spacing.twoXS,` `,e.colors.redTextColor,`;}50%{box-shadow:0 0 `,e.spacing.sm,` `,e.spacing.twoXS,` `,e.colors.redTextColor,`;}100%{box-shadow:0 0 `,e.spacing.twoXS,` `,e.colors.redTextColor,`;}`),bd=h(`div`,{target:`e84jzed0`})(({theme:e})=>({position:`absolute`,bottom:e.spacing.lg,right:e.spacing.sm,width:e.spacing.sm,height:e.spacing.sm,backgroundColor:e.colors.redTextColor,borderRadius:e.radii.full,boxShadow:`0 0 ${e.spacing.twoXS} ${e.colors.redTextColor}`,animation:`${yd(e)} 2s linear infinite`})),xd=h(`div`,{target:`e84jzed1`})(({theme:e})=>({borderTop:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,width:`100%`})),Sd=h(`div`,{target:`e84jzed2`})(({theme:e})=>({padding:e.spacing.sm,minWidth:e.sizes.appMainMenu,"@media print":{display:`none`}})),Cd=h(`div`,{target:`e84jzed3`})(({theme:e})=>({display:`flex`,flexDirection:`column`,alignItems:`stretch`,gap:e.spacing.xs})),wd=h(`span`,{target:`e84jzed4`})({lineHeight:`initial`}),Td=h(`button`,{target:`e84jzed5`})(({theme:e,isRecording:t})=>({display:`flex`,alignItems:`center`,padding:`${e.spacing.threeXS} ${e.spacing.sm}`,border:`none`,borderRadius:e.radii.default,backgroundColor:e.colors.transparent,cursor:`pointer`,fontSize:e.fontSizes.sm,lineHeight:`${e.lineHeights.small}rem`,textAlign:`left`,color:t?e.colors.redTextColor:e.colors.bodyText,fontWeight:t?e.fontWeights.bold:e.fontWeights.normal,transition:`background-color 100ms ease`,"&:hover, &:focus-visible":{backgroundColor:e.colors.darkenedBgMix15},"&:focus":{outline:`none`},"&:focus-visible":{boxShadow:e.shadows.focusRingMuted},'&[aria-disabled="true"]':{color:e.colors.fadedText60,cursor:`not-allowed`},'&[aria-disabled="true"]:hover':{backgroundColor:e.colors.transparent}})),Ed=h(`span`,{target:`e84jzed6`})(({theme:e})=>({display:`flex`,alignItems:`center`,width:`100%`,gap:e.spacing.sm})),Dd=h(`span`,{target:`e84jzed7`})({display:`inline-flex`,alignItems:`center`,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}),Od=h(`kbd`,{target:`e84jzed8`})(({theme:e})=>({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,whiteSpace:`nowrap`,fontSize:e.fontSizes.sm,opacity:.6,fontFamily:`inherit`,lineHeight:e.lineHeights.tight,letterSpacing:`0.01em`})),kd=h(`div`,{target:`e84jzed9`})(({theme:e})=>({display:`flex`,flexDirection:`row`,gap:e.spacing.threeXS,width:`100%`})),Ad=h(`button`,{target:`e84jzed10`})(({theme:e,isChecked:t})=>({display:`flex`,flex:1,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:e.spacing.twoXS,padding:`${e.spacing.xs} ${e.spacing.sm}`,border:`none`,borderRadius:e.radii.default,backgroundColor:t?e.colors.darkenedBgMix25:e.colors.transparent,cursor:`pointer`,fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.tight,color:e.colors.bodyText,transition:`background-color 100ms ease`,"&:hover":{backgroundColor:t?e.colors.darkenedBgMix25:e.colors.darkenedBgMix15},"&:focus":{outline:`none`},"&:focus-visible":{boxShadow:e.shadows.focusRingMuted,backgroundColor:t?e.colors.darkenedBgMix25:e.colors.darkenedBgMix15}})),jd=h(`span`,{target:`e84jzed11`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`}),Md=h(`button`,{target:`e84jzed12`})(({theme:e,isDisabled:t})=>({display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,padding:`${e.spacing.threeXS} ${e.spacing.sm}`,border:`none`,borderRadius:e.radii.default,backgroundColor:e.colors.transparent,cursor:t?`not-allowed`:`pointer`,color:t?e.colors.fadedText60:e.colors.bodyText,fontSize:e.fontSizes.sm,lineHeight:`${e.lineHeights.small}rem`,textAlign:`left`,fontWeight:e.fontWeights.normal,transition:`background-color 100ms ease`,"&:hover":{backgroundColor:t?e.colors.transparent:e.colors.darkenedBgMix15},"&:focus":{outline:`none`},"&:focus-visible":{backgroundColor:e.colors.darkenedBgMix15,boxSh
18adow:e.shadows.focusRingMuted}})),Nd=h(`div`,{target:`e84jzed13`})(({theme:e,isChecked:t,isDisabled:n})=>({display:`flex`,alignItems:`center`,flexShrink:0,width:`calc(2 * ${e.sizes.checkbox})`,minWidth:`calc(2 * ${e.sizes.checkbox})`,height:e.sizes.checkbox,minHeight:e.sizes.checkbox,padding:`0 ${e.spacing.threeXS}`,borderRadius:e.radii.full,backgroundColor:t&&!n?e.colors.primary:e.colors.borderColor,transition:`background-color 100ms ease`})),Pd=h(`div`,{target:`e84jzed14`})(({theme:e,isChecked:t,isDisabled:n})=>{let r=T(e),i=r?e.colors.bgColor:e.colors.bodyText;return n&&(i=r?e.colors.gray70:e.colors.gray90),{width:`calc(${e.sizes.checkbox} - ${e.spacing.twoXS})`,height:`calc(${e.sizes.checkbox} - ${e.spacing.twoXS})`,borderRadius:e.radii.full,backgroundColor:i,transform:t?`translateX(${e.sizes.checkbox})`:`none`,transition:`transform 100ms ease, background-color 100ms ease`}}),Fd=h(`div`,{target:`e84jzed15`})(({theme:e})=>({paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm})),Id=h(`div`,{target:`e84jzed16`})(({theme:e})=>({display:`flex`,alignItems:`center`,gap:e.spacing.sm,marginTop:e.spacing.xs,".stMenuVersionCopyButton":{opacity:0,pointerEvents:`none`,transition:`opacity 120ms ease`},"&:hover .stMenuVersionCopyButton, &:focus-within .stMenuVersionCopyButton":{opacity:1,pointerEvents:`auto`}})),Ld=h(`span`,{target:`e84jzed17`})(({theme:e})=>({display:`inline-flex`,alignItems:`center`,opacity:.6,fontSize:e.fontSizes.twoSm,lineHeight:e.lineHeights.menuItem,color:e.colors.bodyText,whiteSpace:`nowrap`})),Rd=[{label:`System`,icon:`:material/contrast:`},{label:`Light`,icon:`:material/light_mode:`}
18,{label:`Dark`,icon:`:material/dark_mode:`}];function zd(e,t){switch(e){case`System`:return t.find(e=>e.name===`Custom Theme Auto`||e.name===`Use system setting`);case`Light`:return t.find(e=>e.name===`Custom Theme Light`||e.name===nn.name);case`Dark`:return t.find(e=>e.name===`Custom Theme Dark`||e.name===ln.name)}}function Bd(e,t,n,r){if(t.length<=1)return[];let i=Dn(e);return Rd.map(e=>({type:`radio`,key:`theme-${e.label}`,label:e.label,icon:e.icon,checked:i===e.label,onSelect:()=>{let i=zd(e.label,t);i&&(r.enqueue(`menuClick`,{label:`changeTheme`}),n(i))}}))}var Vd=(0,U.memo)(function({item:e,tabIndex:t,itemIndex:n,setItemRef:r}){let{key:i,label:a,checked:o,disabled:c,onToggle:l}=e,d=(0,U.useCallback)(e=>{r(n,e)},[r,n]),f=(0,U.useCallback)(()=>{c||l()},[c,l]);return u(Md,{ref:d,type:`button`,isDisabled:c,role:`menuitemcheckbox`,"aria-checked":o,"aria-disabled":c||void 0,tabIndex:t,onClick:f,"data-testid":`stMainMenuItem-${i}`,children:[a,s(Nd,{isChecked:o,isDisabled:c,children:s(Pd,{isChecked:o,isDisabled:c})})]})}),Hd=(0,_r.getLogger)(`MainMenu`),Ud={COUNTDOWN:`Cancel recording`,RECORDING:`Stop recording`},Wd=new Set([`Enter`,` `,`Space`,`Spacebar`]);function Gd(e){return e.replace(/\.dev\d+/,`.dev`)}function Kd(e,t){window.open(e,`_blank`)||Hd.warn(`Failed to open "${t}" link. This may be due to a popup blocker. URL: ${e}`)}function qd(e){return e.type===`radio`}function Jd(e){return e.type===`toggle`}function Yd({isServerConnected:e,developmentMode:t,screenCastState:n,menuItems:r,hostMenuItems:i,quickRerunCallback:a,clearCacheCallback:o,printCallback:s,screencastCallback:c,aboutCallback:l,sendMessageToHost:u,isMinimalMode:d,themeSection:f,runOnSave:p,onRunOnSaveChange:m,allowRunOnSave:h,metricsMgr:g}){let _=!e,v=$d(r,i,u),y=ef(r,l);if(d)return[f,[...v,...y]];let b=Qd(n,s,c);return[f,Xd(t,a,_,p,m,h,g),Zd(t,o,_),[...b,...y],v]}function Xd(e,t,n,r,i,a,o){if(!e)return[];let s=[{type:`action`,key:`rerun`,label:`Rerun`,onClick:t,disabled:n,shortcut:`R`}];return a&&s.push({type:`toggle`,key:`autoRerun`,label:`Auto rerun`,checked:r,disabled:n,onToggle:()=>{o.enqueue(`menuClick`,{label:`autoRerun`}),i(!r)}}),s}function Zd(e,t,n){return e?[{type:`action`,key:`clearCache`,label:`Clear cache`,onClick:t,disabled:n,shortcut:`C`}]:[]}function Qd(e,t,n){let r=[{type:`action`,key:`print`,label:`Print`,onClick:t}];if(vd.isSupportedBrowser()){let t=Ud[e]||`Record screen`;r.push({type:`action`,key:`recordScreencast`,label:t,onClick:n,isRecording:!!Ud[e],shortcut:Ud[e]?`ESC`:void 0})}return r}function $d(e,t,n){let r=[],i=e?.reportABugUrl;i&&!e?.hideReportABug&&r.push({type:`action`,key:`report`,label:`Report a bug`,onClick:()=>Kd(i,`Report a bug`)});let a=e?.getHelpUrl;a&&!e?.hideGetHelp&&r.push({type:`action`,key:`community`,label:`Get help`,onClick:()=>Kd(a,`Get help`)});for(let i of t)i.type!==`separator`&&(i.key===`reportBug`&&e?.hideGetHelp||i.key===`about`&&e?.aboutSectionMd||r.push({type:`action`,key:`host-${i.key}`,label:i.label,onClick:()=>n({type:`MENU_ITEM_CALLBACK`,key:i.key})}));return r}function ef(e,t){return e?.aboutSectionMd?[{type:`action`,key:`about`,label:`About`,onClick:t}]:[]}var tf=(0,U.memo)(function({item:e,onItemClick:t,tabIndex:n,itemIndex:r,setItemRef:i}){return s(Td,{type:`button`,ref:(0,U.useCallback)(e=>{i(r,e)},[i,r]),onClick:()=>{e.disabled||t(e)},role:`menuitem`,"aria-disabled":e.disabled||void 0,tabIndex:n,isRecording:e.isRecording,"data-testid":`stMainMenuItem-${e.key}`,children:u(Ed,{children:[s(Dd,{"data-testid":`stMainMenuItemLabel`,children:e.label}),e.shortcut&&s(Od,{children:e.shortcut})]})})}),nf=(0,U.memo)(function({item:e,onRadioSelect:t,tabIndex:n,itemIndex:r,setItemRef:i}){return u(Ad,{type:`button`,ref:(0,U.useCallback)(e=>{i(r,e)},[i,r]),onClick:()=>{t(e)},role:`menuitemradio`,"aria-checked":e.checked,tabIndex:n,isChecked:e.checked,"data-testid":`stMainMenuItem-${e.key}`,children:[s(jd,{children:s(Hn,{iconValue:e.icon,size:`lg`})}),e.label]})});function rf({sections:e,closeMenu:t,metricsMgr:n,streamlitVersion:r}){let i=Ct(),a=(0,U.useRef)([]),o=(0,U.useMemo)(()=>e.flat(),[e]),[c,l]=(0,U.useState)(0),d=Math.max(0,o.length-1),f=o.length===0?-1:Math.min(c,d),p=e
18=>{l(e),a.current[e]?.focus()},m=(0,U.useCallback)(e=>{e&&a.current[0]?.focus()},[]),h=(0,U.useCallback)((e,t)=>{a.current[e]=t},[]),g=e=>{let t=e.target,n=a.current.findIndex(e=>e===t);n!==-1&&l(n)},_=e=>{n.enqueue(`menuClick`,{label:e.label}),e.onClick(),t()},v=e=>{e.onSelect()},y=e=>{if(o.length!==0)switch(e.key){case`ArrowDown`:e.preventDefault(),p(f>=d?0:f+1);break;case`ArrowUp`:e.preventDefault(),p(f<=0?d:f-1);break;case`Home`:e.preventDefault(),p(0);break;case`End`:e.preventDefault(),p(d);break;case`Escape`:e.preventDefault(),t(`escape`);break;case`Tab`:if(r)break;e.preventDefault(),t(e.shiftKey?`shift-tab`:`tab`);break;default:break}},b=e=>{switch(e.key){case`Tab`:e.shiftKey||(e.preventDefault(),t(`tab`));break;case`Escape`:e.preventDefault(),t(`escape`);break;default:break}},x=[],S=0,C=0;for(let t of e)if(t.length!==0)if(x.length>0&&(x.push(s(xd,{role:`separator`,"aria-hidden":`true`,"data-testid":`stMainMenuDivider`},`divider-${S}`)),S+=1),qd(t[0])){let e=C;x.push(s(kd,{role:`group`,"aria-label":`Theme`,"data-testid":`stThemeSwitcher`,children:t.map((t,n)=>{let r=e+n;return s(nf,{item:t,onRadioSelect:v,tabIndex:f===r?0:-1,itemIndex:r,setItemRef:h},t.key)})},`theme-radio-group`)),C+=t.length}else for(let e of t)Jd(e)?x.push(s(Vd,{item:e,tabIndex:f===C?0:-1,itemIndex:C,setItemRef:h},e.key)):x.push(s(tf,{item:e,onItemClick:_,tabIndex:f===C?0:-1,itemIndex:C,setItemRef:h},e.key)),C+=1;return u(Sd,{children:[s(Cd,{ref:m,"data-testid":`stMainMenuList`,"aria-label":`Main menu`,role:`menu`,onFocus:g,onKeyDown:y,children:x}),r&&s(Fd,{onKeyDown:b,children:u(Id,{children:[u(Ld,{children:[`Made with Streamlit v`,Gd(r)]}),s(ct,{text:r,buttonSize:i.iconSizes.md,iconSize:i.iconSizes.sm,className:`stMenuVersionCopyButton`,copyLabel:`Copy version to clipboard`,copiedLabel:`Copied`})]})})]})}function af(e){let{isServerConnected:t,developmentMode:n,screenCastState:r,menuItems:i,hostMenuItems:a,toolbarMode:o,metricsMgr:c,quickRerunCallback:l,clearCacheCallback:d,printCallback:f,screencastCallback:p,aboutCallback:m,sendMessageToHost:h,runOnSave:g,onRunOnSaveChange:_,allowRunOnSave:v,streamlitVersion:y}=e,b=Ct(),x=o===ce.ToolbarMode.MINIMAL,{activeTheme:S,availableThemes:C,setTheme:w}=(0,U.useContext)(Ie),T=(0,U.useMemo)(()=>Bd(S,C,w,c),[S,C,w,c]),E=(0,U.useMemo)(()=>Yd({isServerConnected:t,developmentMode:n,screenCastState:r,menuItems:i,hostMenuItems:a,quickRerunCallback:l,clearCacheCallback:d,printCallback:f,screencastCallback:p,aboutCallback:m,sendMessageToHost:h,isMinimalMode:x,themeSection:T,runOnSave:g,onRunOnSaveChange:_,allowRunOnSave:v,metricsMgr:c}),[t,n,r,i,a,l,d,f,p,m,h,x,T,g,_,v,c]),[D,O]=(0,U.useState)(!1),ee=(0,U.useRef)(null),k=(0,U.useRef)(`other`),A=(0,U.useCallback)(()=>{O(!0)},[]),j=(0,U.useCallback)(()=>{O(!1)},[]),M=(0,U.useCallback)(e=>{let t=k.current;k.current=`other`;let n=ee.current;return n&&(t===`tab`?qn(n):t===`shift-tab`?Zn(n):n.focus()),!1},[]),N=(0,U.useCallback)(e=>{Wd.has(e.key)&&(e.preventDefault(),e.currentTarget.click())},[]),P=E.some(e=>e.length>0);return x&&!P?null:s(ve,{focusLock:!0,returnFocus:M,accessibilityType:Qn.none,onOpen:A,onClose:j,placement:Kn.bottomRight,content:({close:e})=>s(rf,{sections:E,closeMenu:t=>{k.current=t??`other`,e()},metricsMgr:c,streamlitVersion:y}),overrides:{Body:{props:{"data-testid":`stMainMenuPopover`,className:`stMainMenuPopover`},style:{...He(b)}}},children:u(wd,{id:`MainMenu`,className:`stMainMenu`,"data-testid":`stMainMenu`,onKeyDown:N,children:[s(R,{ref:ee,kind:B.HEADER_NO_PADDING,"data-testid":`stMainMenuButton`,"aria-label":`Main menu`,"aria-haspopup":`menu`,"aria-expanded":D,children:s(Bn,{content:hd,size:`lg`})}),r===`RECORDING`&&s(bd,{"data-testid":`stMainMenuRecordingIndicator`})]})})}var of=(0,U.memo)(af);function sf(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function cf(e,t){e.classList?e.classList.add(t):sf(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function lf(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function uf(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=lf(e.className,t):e.setAttribute(`class`,lf(e.className&&e.className.baseVal||``,t))}var df={disabled:!1},ff=U.createContext(null),pf=function(e){return e.scrollTop},mf=`unmounted`,hf=`exited`,gf=`entering`,_f=`entered`,vf=`exiting`,yf=function(e){Gn(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=hf,r.appearStatus=gf):o=_f:o=t.unmountOnExit||t.mountOnEnter?mf:hf,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:hf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=gf):(n===`entering`||n===`entered`)&&(t=vf)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Oo.findDOMNode(this);n&&pf(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:mf})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.
vendor: 3,897 bytes, line 18
18isMounting:e,i=this.props.nodeRef?[r]:[Oo.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||df.disabled){this.safeSetState({status:_f},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:gf},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:_f},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Oo.findDOMNode(this);if(!t||df.disabled){this.safeSetState({status:hf},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:vf},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:hf},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Oo.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=er(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return U.createElement(ff.Provider,{value:null},typeof n==`function`?n(e,r):U.cloneElement(U.Children.only(n),r))},t}(U.Component);yf.contextType=ff,yf.propTypes={};function bf(){}yf.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:bf,onEntering:bf,onEntered:bf,onExit:bf,onExiting:bf,onExited:bf},yf.UNMOUNTED=mf,yf.EXITED=hf,yf.ENTERING=gf,yf.ENTERED=_f,yf.EXITING=vf;var xf=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return cf(e,t)})},Sf=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return uf(e,t)})},Cf=function(e){Gn(t,e);function t(){var t,n=[...arguments];return t=e.call.apply(e,[this].concat(n))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];
18return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&pf(e),r&&(this.appliedClasses[t][n]=r,xf(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&Sf(e,r),i&&Sf(e,i),a&&Sf(e,a)},n.render=function(){var e=this.props;e.classNames;var t=er(e,[`classNames`]);return U.createElement(yf,c({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(U.Component);Cf.defaultProps={classNames:``},Cf.propTypes={};var X=function(e){return e.CONNECTED=`CONNECTED`,e.DISCONNECTED_FOREVER=`DISCONNECTED_FOREVER`,e.INITIAL=`INITIAL`,e.PINGING_SERVER=`PINGING_SERVER`,e.CONNECTING=`CONNECTING`,e.STATIC_CONNECTING=`STATIC_CONNECTING`,e.STATIC_CONNECTED=`STATIC_CONNECTED`,e}({}),wf=`https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS`,Tf=`_stcore/stream`,Ef=`_stcore/health`,Df=`_stcore/host-config`,Of=2e3,kf=!(typeof navigator>`u`)&&/Android/i.test(navigator.userAgent)?60*1e3:15*1e3,Af=15*1e3;Promise.withResolvers===void 0&&(Promise.withResolvers=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return{resolve:e,reject:t,promise:n}});function jf(e){let t=document.cookie.match(`\\b${e}=([^;]*)\\b`);return t?t[1]:void 0}function Mf(){let e=`testData`;try{let{localStorage:t}=window;t.setItem(e,e),t.getItem(e),t.removeItem(e)}catch{return!1}return!0}function Nf(e){return Array.isArray(e)&&e.length>0&&e.every(e=>typeof e==`string`&&e.trim().length>0)}function Pf(e){return typeof structuredClone==`function`?structuredClone(e):JSON.parse(JSON.stringify(e))}function Ff(e){return Object.freeze(e),Array.isArray(e)?e.forEach(e=>{typeof e==`object`&&e&&!Object.isFrozen(e)&&Ff(e)}):Object.values(e).forEach(e=>{typeof e==`object`&&e&&!Object.isFrozen(e)&&Ff(e)}),e}var If=(()=>{let e=window.__streamlit;if(e)return Ff(Pf(e))})(),Lf={get BACKEND_BASE_URL(){return If?.BACKEND_BASE_URL},get HOST_CONFIG_BASE_URL(){return If?.HOST_CONFIG_BASE_URL},get DOWNLOAD_ASSETS_BASE_URL(){return If?.DOWNLOAD_ASSETS_BASE_URL},get MAIN_PAGE_BASE_URL(){return If?.MAIN_PAGE_BASE_URL},get CUSTOM_COMPONENT_CLIENT_ID(){return If?.CUSTOM_COMPONENT_CLIENT_ID},get LIGHT_THEME(){return If?.LIGHT_THEME},get DARK_THEME(){return If?.DARK_THEME},get ENABLE_RELOAD_BASED_ON_HARDCODED_STREAMLIT_VERSION(){return If?.ENABLE_RELOAD_BASED_ON_HARDCODED_STREAMLIT_VERSION},get HOST_CONFIG(){return If?.HOST_CONFIG}};function Rf(e){return e!=null}function zf(e){return e==null}var Bf=/\/+$/,Vf=/^\/+/;function Hf({hostname:e,port:t,pathname:n,protocol:r},i){let a=Uf(n,i);return`${r}//${e}${t?`:${t}`:``}/${a}`}function Uf(e,t){return e=e.replace(Bf,``).replace(Vf,``),t=t.replace(Bf,``).replace(Vf,``),e.length===0?t:`${e}/${t}`}var Wf=`https://data.streamlit.io/static.json`,Gf=(0,_r.getLogger)(`StaticConnection`);async function Kf(){let e=Mf(),t=``;if(e){let e=window.localStorage.getItem(`stStaticAssetUrl`);if(e)return e}try{let n=await fetch(Wf,{signal:AbortSignal.timeout(5e3)});n.ok?(t=(await n.json()).static_url??void 0,e&&t&&window.localStorage.setItem(`stStaticAssetUrl`,t)):Gf.error(`Failed to fetch static config url: `,n.status)}catch(e){Gf.error(`Failed to fetch static config url:`,e)}return t}async function qf(e,t){let n=`${t}/${e}/protos.pb`,r=await fetch(n,{signal:AbortSignal.timeout(5e3)});if(!r.ok)Gf.error(`Failed to fetch static app protos for id: ${e}`,r.status);else return r.arrayBuffer();return null}async function Jf(e,t,n,r){let i=await qf(e,t);if(!i){Gf.error(`Failed to retrieve static app protos`),r({message:`Failed to retrieve static app protos. Please confirm the id is correct and try again. Given static app id: ${e}`});return}fe.decode(new Uint8Array(i)).messages.forEach(e=>{n(e)})}async function Yf(e,t,n,r,i){t(X.STATIC_CONNECTING);let a=await Kf();i.setStaticConfigUrl(a),Jf(e,a,n,r),t(X.STATIC_CONNECTED)}var Xf=/\/+$/,Zf=/^\/+/;function Qf(){let e=Lf.HOST_CONFIG;if(!e)return!1;let{allowedOrigins:t,useExternalAuthToken:n}=e,r=!!Lf.BACKEND_BASE_URL,i=Nf(t);return r&&i&&typeof n==`boolean`}function $f(e){let t=new URL(e??window.location.href);return t.pathname=t.pathname.replace(Xf,``).replace(Zf,``),t}function ep(){let e=$f(Lf.BACKEND_BASE_URL),{pathname:t}=e;if(t===`/`)return[e];let n=t.split(`/`),r=[];for(;n.length>0;){let t=new URL(e);t.pathname=n.join(`/`),r.push(t),n.pop()}return r.length<=2?r:r.slice(0,2)}function tp({hostname:e,port:t,pathname:n,protocol:r},i){return`${r===`https:`?`wss`:`ws`}://${e}:${t}/${Uf(n,i)}`}function np(e){if(e!=null)switch(typeof e){case`object`:return JSON.stringify(e,null,2);case`string`:case`number`:case`boolean`:return String(e);default:return}}
18var rp=class extends Error{constructor(e,t,n={}){super(e),this.name=`FetchError`,this.url=t,this.isTimeout=n.isTimeout??!1,this.isNetworkError=n.isNetworkError??!1,this.response=n.response}};async function ip(e,t){let n=new AbortController,r=setTimeout(()=>n.abort(),t);try{let t=await fetch(e,{signal:n.signal});if(clearTimeout(r),!t.ok){let n;try{n=await t.json()}catch{try{n=await t.text()}catch{n=null}}throw new rp(`Request failed with status ${t.status}`,e,{response:{status:t.status,statusText:t.statusText,data:n}})}let i=await t.text();try{return{data:JSON.parse(i),url:e}}catch{return{data:i,url:e}}}catch(t){throw clearTimeout(r),t instanceof rp?t:t instanceof DOMException&&t.name===`AbortError`?new rp(`Connection timed out`,e,{isTimeout:!0}):t instanceof TypeError?new rp(t.message||`Network error`,e,{isNetworkError:!0}):new rp(t instanceof Error?t.message:`Unknown error`,e)}}var ap=(0,_r.getLogger)(`DoInitPings`),op=class extends Error{constructor(){super(`Ping cancelled`)}};function sp(e,t,n,r,i,a){let{promise:o,resolve:s,reject:c}=Promise.withResolvers(),l=0,u=0,d,f=()=>{},p=()=>{u++,u>=e.length&&(u=0),f()},m=e=>{let i=Math.random()*.4-.2,a=l===1?t:t*2**(l-1)*(1+i),o=Math.min(n,a);r(l,e,o),!(typeof window>`u`)&&(d=globalThis.setTimeout(p,o))},h=()=>{let t=e[u];new URL(Hf(t,``)).hostname===`localhost`?m({message:`Is Streamlit still running? If you accidentally stopped Streamlit, just restart it in your terminal:`,codeBlock:`streamlit run yourscript.py`}):m({message:`Streamlit server is not responding. Are you connected to the internet?`})},g=()=>{m({message:`Cannot connect to Streamlit (HTTP status: 403).
19
20If you are trying to access a Streamlit app running on another server, this could be due to the app's [CORS](${wf}) settings.`})},_=e=>{let t=`DoInitPings`;if(e)try{t=new URL(e).pathname}catch{ap.error(`unrecognized url: ${e}`)}return t};return f=()=>{let t=e[u],n=Hf(t,Ef),r=Lf.HOST_CONFIG_BASE_URL,o=Hf(r?$f(r):t,Df);ap.info(`Attempting to connect to ${n}.`),u===0&&l++,Promise.all([ip(n,Af),ip(o,Af)]).then(([e,t])=>{a(t.data),s(u)}).catch(e=>{let t=l>=6;if(e.isTimeout){if(t){let t=_(e.url);ap.error(`Client error: DoInitPings timed out`),i(`DoInitPings timed out`,`Connection timed out - ECONNABORTED`,t)}return m({message:`Connection timed out.`})}if(e.response){let{data:n,status:r,statusText:a}=e.response,o=_(e.url);if(r===0)return t&&(ap.error(`Client Error: response received with status ${r} when attempting to reach ${o}`),i(`Response received with status ${r}`,a,o)),h();if(r===403)return t&&(ap.error(`Client Error: response received with status ${r} when attempting to reach ${o}`),i(r,a,o)),g();t&&(ap.error(`Client Error: response received with status ${r} when attempting to reach ${o}`),i(r,a,o));let s=np(n);return m({message:`Connection failed with status ${r}${s?`, and response:`:`.`}`,...s&&{codeBlock:s}})}if(e.isNetworkError){if(t){let t=_(e.url);ap.error(`Client Error in reaching server endpoint - No response received when attempting to reach ${t}`),i(`No response received from server`,`Network error`,t)}return h()}if(t){let t=_(e.url);ap.error(`Client Error in reaching server endpoint - error in setting up request when attempting to reach ${t}`),i(`Error setting up request to server`,e.message??``,t)}return m({message:e.message})})},f(),{promise:o,cancel:()=>{Rf(d)&&globalThis.clearTimeout(d),c(new op)}}}var cp=(0,_r.getLogger)(`ForwardMessageCache`),lp=class{getAge(e){return e-this.scriptRunCount}constructor(e,t,n){this.scriptRunCount=0,this.encodedMsg=e,this.scriptRunCount=t,this.fragmentId=n}},up=class{constructor(){this.messages=new Map,this.scriptRunCount=0}incrementRunCount(e,t){this.scriptRunCount+=1,this.messages.forEach((n,r)=>{t.length>0&&(!n.fragmentId||!t.includes(n.fragmentId))||n.getAge(this.scriptRunCount)>e&&(cp.info(`Removing expired ForwardMsg [hash=${r}]`),this.messages.delete(r))})}getCachedMessageHashes(){return Array.from(this.messages.keys())}async processMessagePayload(e,t){if(this.maybeCacheMessage(e,t),e.type!==`refHash`)return e;let n=this.getCachedMessage(e.refHash,!0);if(Rf(n))cp.info(`Cached ForwardMsg HIT [hash=${e.refHash}]`);else throw Error(`Cached ForwardMsg MISS [hash=${e.refHash}]. This is not expected to happen. Please [report this bug](https://github.com/streamlit/streamlit/issues).`);if(!e.metadata)throw Error(`Reference ForwardMsg has no metadata. This is not expected to happen. Please [report this bug](https://github.com/streamlit/streamlit/issues).`);return n.metadata=re.decode(t).metadata,n}maybeCacheMessage(e,t){if(e.type!==`refHash`&&e.metadata?.cacheable){if(!e.hash){cp.error(`ForwardMsg has no hash. This is not expected to happen, please report this bug.`,e);return}this.getCachedMessage(e.hash,!0)===void 0&&(cp.info(`Caching ForwardMsg [hash=${e.hash}]`),this.messages.set(e.hash,new lp(t,this.scriptRunCount,e.delta?.fragmentId??void 0)))}}getCachedMessage(e,t){let n=this.messages.get(e);if(!zf(n))return t&&(n.scriptRunCount=this.scriptRunCount),re.decode(n.encodedMsg)}},Z=(0,_r.getLogger)(`WebsocketConnection`),dp=class{constructor(e){this.uriIndex=0,this.lastDispatchedMessageIndex=-1,this.nextMessageIndex=0,this.messageQueue={},this.state=X.INITIAL,this.args=e,this.cache=new up,this.stepFsm(`INITIALIZED`)}getBaseUriParts(){if(this.state===X.CONNECTED)return this.args.baseUriPartsList[this.uriIndex]}disconnect(){this.setFsmState(X.DISCONNECTED_FOREVER)}reconnect(){this.state===X.CONNECTED&&(this.closeConnection(),this.stepFsm(`CONNECTION_CLOSED`))}setFsmState(e,t){switch(Z.info(`New state: ${e}`),this.state=e,this.state){case X.PINGING_SERVER:this.pingServer();break;default:break}switch(this.args.onConnectionStateChange(e,t),this.state){case X.CONNECTING:this.connectToWebSocket();break;case X.DISCONNECTED_FOREVER:this.closeConnection();break;default:break}}stepFsm(e,t){if(Z.info(`State: ${this.state}; Event: ${e}`),e===`FATAL_ERROR`&&this.state!==X.DISCONNECTED_FOREVER){Z.error(`Client Error: Websocket connection encountered fatal error - ${t}`),this.args.sendClientError(`Websocket connection fatal error encountered`,t,`Websocket Connection`),this.setFsmState(X.DISCONNECTED_FOREVER,{message:t||`Unknown error`});return}switch(this.state){case X.INITIAL:if(e===`INITIALIZED`){this.args.enableBypass?(this.setFsmState(X.CONNECTING),this.pingServerInBackgroun
20d()):this.setFsmState(X.PINGING_SERVER);return}break;case X.CONNECTING:if(e===`CONNECTION_SUCCEEDED`){this.setFsmState(X.CONNECTED);return}if(e===`CONNECTION_TIMED_OUT`||e===`CONNECTION_ERROR`||e===`CONNECTION_CLOSED`){this.setFsmState(X.PINGING_SERVER);return}break;case X.CONNECTED:if(e===`CONNECTION_CLOSED`||e===`CONNECTION_ERROR`){this.setFsmState(X.PINGING_SERVER);return}break;case X.PINGING_SERVER:if(e===`SERVER_PING_SUCCEEDED`){this.setFsmState(X.CONNECTING);return}break;case X.DISCONNECTED_FOREVER:Z.warn(`Discarding ${e} while in ${X.DISCONNECTED_FOREVER}`);return;default:break}throw Error(`Unsupported state transition.
21State: ${this.state}\nEvent: ${e}`)}async pingServer(){let e=sp(this.args.baseUriPartsList,100,Of,this.args.onRetry,this.args.sendClientError,this.args.onHostConfigResp);this.pingRequest=e;try{this.uriIndex=await e.promise,this.pingRequest===e&&(this.pingRequest=void 0),this.stepFsm(`SERVER_PING_SUCCEEDED`)}catch(e){e instanceof op?Z.info(`Ping cancelled`):this.stepFsm(`FATAL_ERROR`,e instanceof Error?e.message:String(e))}finally{this.pingRequest===e&&(this.pingRequest=void 0)}}async pingServerInBackground(){let e=sp(this.args.baseUriPartsList,100,Of,this.args.onRetry,this.args.sendClientError,this.args.onHostConfigResp);this.pingRequest=e;try{this.uriIndex=await e.promise,Z.info(`Background pings completed successfully`)}catch(e){e instanceof op?Z.info(`Background pings cancelled`):this.stepFsm(`FATAL_ERROR`,e instanceof Error?e.message:String(e))}finally{this.pingRequest===e&&(this.pingRequest=void 0)}}async getSessionTokens(){let e=await this.args.claimHostAuthToken(),t=jf(`_streamlit_xsrf`);this.args.resetHostAuthToken();let n=this.args.getLastSessionId();return[e??t??`PLACEHOLDER_AUTH_TOKEN`,...n?[n]:[]]}async connectToWebSocket(){let e=tp(this.args.baseUriPartsList[this.uriIndex],Tf);if(Rf(this.websocket))throw Error(`Websocket already exists`);Z.info(`creating WebSocket`);
21let t=await this.getSessionTokens();this.websocket=new WebSocket(e,[`streamlit`,...t]),this.websocket.binaryType=`arraybuffer`,this.setConnectionTimeout(e);let n=this.websocket,r=()=>n===this.websocket;this.websocket.addEventListener(`message`,e=>{r()&&this.handleMessage(e.data).catch(e=>{let t=`Failed to process a Websocket message. ${e}`;Z.error(t),this.stepFsm(`FATAL_ERROR`,t)})}),this.websocket.addEventListener(`open`,()=>{r()&&(Z.info(`WebSocket onopen`),this.stepFsm(`CONNECTION_SUCCEEDED`))}),this.websocket.addEventListener(`close`,()=>{r()&&(Z.warn(`WebSocket onclose`),this.closeConnection(),this.stepFsm(`CONNECTION_CLOSED`))}),this.websocket.addEventListener(`error`,e=>{r()&&(Z.error(`Client Error: WebSocket onerror`),this.args.sendClientError(`Websocket connection onerror triggered`,`Error: ${e}`,`Websocket Connection`),this.closeConnection(),this.stepFsm(`CONNECTION_ERROR`))})}setConnectionTimeout(e){if(Rf(this.wsConnectionTimeout))throw Error(`WS timeout is already set`);let t=this.websocket;this.wsConnectionTimeout=globalThis.setTimeout(()=>{if(t===this.websocket){if(zf(this.wsConnectionTimeout)){Z.warn(`Timeout fired after cancellation`);return}if(zf(this.websocket)){this.closeConnection(),this.stepFsm(`FATAL_ERROR`,`Null Websocket in setConnectionTimeout`);return}this.websocket.readyState===0&&(Z.info(`Client error: ${e} timed out`),this.args.sendClientError(`Websocket connection timed out`,`${e} timed out`,`Websocket Connection`),this.closeConnection(),this.stepFsm(`CONNECTION_TIMED_OUT`))}},kf),Z.info(`Set WS timeout ${Number(this.wsConnectionTimeout)}`)}closeConnection(){this.websocket&&=(this.websocket.close(),void 0),Rf(this.wsConnectionTimeout)&&(Z.info(`Clearing WS timeout ${Number(this.wsConnectionTimeout)}`),globalThis.clearTimeout(this.wsConnectionTimeout),this.wsConnectionTimeout=void 0),this.pingRequest&&=(this.pingRequest.cancel(),void 0)}sendMessage(e){if(!this.websocket)return;let t=I.create(e),n=I.encode(t).finish();this.websocket.send(n)}incrementMessageCacheRunCount(e,t){this.cache.incrementRunCount(e,t)}getCachedMessageHashes(){return this.cache.getCachedMessageHashes()}async handleMessage(e){let t=this.nextMessageIndex;this.nextMessageIndex+=1;let n=new Uint8Array(e),r=re.decode(n);for(this.messageQueue[t]=await this.cache.processMessagePayload(r,n);this.lastDispatchedMessageIndex+1 in this.messageQueue;){let e=this.lastDispatchedMessageIndex+1;this.args.onMessage(this.messageQueue[e]),delete this.messageQueue[e],this.lastDispatchedMessageIndex=e}}},fp=(0,_r.getLogger)(`ConnectionManager`),pp=class{constructor(e){this.connectionState=X.INITIAL,this.setConnectionState=(e,t)=>{this.connectionState!==e&&(this.connectionState===X.CONNECTED&&e!==X.CONNECTED&&this.clearHeartbeatAckTimeout(),this.connectionState=e,this.props.connectionStateChanged(e)),t&&this.props.onConnectionError(t)},this.showRetryError=(e,t,n)=>{e>=6&&this.props.onConnectionError(t)},this.props=e,this.connect()}isConnected(){return this.connectionState===X.CONNECTED}getBaseUriParts(){if(this.websocketConnection instanceof dp)return this.websocketConnection.getBaseUriParts()}sendMessage(e){this.websocketConnection instanceof dp&&this.isConnected()?this.websocketConnection.sendMessage(e):fp.error(`Cannot send message when server is disconnected: ${e}`)}incrementMessageCacheRunCount(e,t){this.websocketConnection instanceof dp&&this.websocketConnection.incrementMessageCacheRunCount(e,t)}getCachedMessageHashes(){return this.websocketConnection instanceof dp?this.websocketConnection?.getCachedMessageHashes()??[]:[]}checkStaticConnection(){return new URLSearchParams(document.location.search).get(`staticAppId`)}async connect(){let e=this.checkStaticConnection();if(e)Yf(e,this.setConnectionState,this.props.onMessage,this.props.onConnectionError,this.props.endpoints),this.websocketConnection=null;else try{this.websocketConnection=await this.connectToRunningServer()}catch(e){let t=e instanceof Error?e:Error(`${e}`);fp.error(`Client Error: Websocket connection - ${t.message}`),this.props.sendClientError(`Failed to establish websocket connection`,t.message,`C
21onnection Manager`),this.setConnectionState(X.DISCONNECTED_FOREVER,{message:t.message})}}disconnect(){this.clearHeartbeatAckTimeout(),this.websocketConnection?.disconnect()}onHeartbeatSent(e){this.clearHeartbeatAckTimeout(),e&&(this.heartbeatAckTimeoutId=setTimeout(()=>{fp.warn(`Heartbeat ack not received within timeout, connection may be unhealthy`),this.heartbeatAckTimeoutId=void 0,this.isConnected()&&this.reconnect()},e))}reconnect(){this.clearHeartbeatAckTimeout(),this.websocketConnection?.reconnect()}onHeartbeatAckReceived(){this.clearHeartbeatAckTimeout()}clearHeartbeatAckTimeout(){this.heartbeatAckTimeoutId!==void 0&&(clearTimeout(this.heartbeatAckTimeoutId),this.heartbeatAckTimeoutId=void 0)}connectToRunningServer(){let e=ep(),t=Qf();return new dp({getLastSessionId:this.props.getLastSessionId,endpoints:this.props.endpoints,baseUriPartsList:e,onMessage:this.props.onMessage,onConnectionStateChange:this.setConnectionState,onRetry:this.showRetryError,claimHostAuthToken:this.props.claimHostAuthToken,resetHostAuthToken:this.props.resetHostAuthToken,sendClientError:this.props.sendClientError,onHostConfigResp:this.props.onHostConfigResp,enableBypass:t})}},mp=(0,_r.getLogger)(`DefaultStreamlitEndpoints`),hp=`/media`,gp=`/app/static/`,_p=`/_stcore/upload_file`,vp=`/component`,yp=`/_stcore/bidi-components`,bp=class{constructor(e){this.getServerUri=e.getServerUri,this.csrfEnabled=e.csrfEnabled,this.sendClientError=e.sendClientError,this.staticConfigUrl=null}setStaticConfigUrl(e){this.staticConfigUrl=e}sendClientErrorToHost(e,t,n,r,i){this.sendClientError(e,t,n,r,i)}async checkSourceUrlResponse(e,t,n){let r=n?`${t} ${n}`:t;try{let i=await fetch(e);i.ok||(mp.error(`Client Error: ${r} source error - ${i.status}`),this.sendClientErrorToHost(t,i.status,i.statusText,e,n))}catch(i){let a=i instanceof Error?i.message:`Unknown Error`;mp.error(`Client Error: ${r} fetch error - ${a}`),this.sendClientErrorToHost(t,`Error fetching source`,a,e,n)}}buildComponentURL(e,t){return Hf(this.requireServerUri(),`${vp}/${e}/${t}`)}buildBidiComponentURL(e,t){return Hf(this.requireServerUri(),`${yp}/${e}/${t}`)}setFileUploadClientConfig({prefix:e,headers:t}){this.fileUploadClientConfig={prefix:e,headers:t}}buildStaticUrl(e){let t=new URLSearchParams(document.location.search).get(`staticAppId`);return`${this.staticConfigUrl}/${t}${e}`}buildMediaURL(e){return this.staticConfigUrl&&(e.startsWith(hp)||e.startsWith(gp))?this.buildStaticUrl(e):e.startsWith(hp)||e.startsWith(gp)?Hf(this.requireServerUri(),e):e}buildDownloadUrl(e){if(!e.startsWith(hp))return e;let t=Lf.DOWNLOAD_ASSETS_BASE_URL;return Hf(t?$f(t):this.requireServerUri(),e)}buildFileUploadURL(e){return this.fileUploadClientConfig?Uf(this.fileUploadClientConfig.prefix,e):e.startsWith(_p)?Hf(this.requireServerUri(),e):e}buildAppPageURL(e,t){let n=t.urlPathname,r=t.isDefault?``:n;if(typeof e==`string`&&e.length>0)return`${e}/${r}`;let{port:i,protocol:a}=window.location,{pathname:o,hostname:s}=this.requireServerUri();return`${a}//${s}${i?`:${i}`:``}${o===`/`?`/`:`${o}/`}${r}`}async uploadFileUploaderFile(e,t,n,r,i){let a=new FormData,{name:o,webkitRelativePath:s}=t,c=s||o;a.append(o,t,c);let l=this.getAdditionalHeaders(),u=this.buildFileUploadURL(e);try{await this.csrfRequest(u,{signal:i,method:`PUT`,data:a,responseType:`text`,headers:l,onUploadProgress:r})}catch(e){mp.error(`Client Error: File uploader error on file upload - ${e}`);let t=e instanceof Error?e.message:`Unknown Error`;throw this.sendClientErrorToHost(`File Uploader`,`Error uploading file`,t,u),e}}getAdditionalHeaders(){let e={};return this.fileUploadClientConfig&&(e={...e,...this.fileUploadClientConfig.headers}),e}async deleteFileAtURL(e,t){let n=this.getAdditionalHeaders(),r=this.buildFileUploadURL(e);try{await this.csrfRequest(r,{method:`DELETE`,data:{sessionId:t},headers:n})}catch(e){mp.error(`Client Error: File uploader error on file delete - ${e}`);let t=e instanceof Error?e.message:`Unknown Error`;throw this.sendClientErrorToHost(`File Uploader`,`Error deleting file`,t,r),e}}requireServerUri(){let e=this.getServerUri();if(Rf(e))return this.cachedServerUri=e,e;
21if(Rf(this.cachedServerUri))return this.cachedServerUri;throw Error(`not connected to a server!`)}async csrfRequest(e,t){if(t.url=e,this.csrfEnabled){let e=jf(`_streamlit_xsrf`);Rf(e)&&(t.headers={"X-Xsrftoken":e,...t.headers},t.withCredentials=!0)}let{default:n}=await rr(async()=>{let{default:e}=await import(`./axios.BPGFmyVv.js`);return{default:e}},__vite__mapDeps([0,1]),import.meta.url);return n.request(t)}},xp=U.forwardRef(function(e,t){return U.createElement(We,c({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 8 8`},e,{ref:t}),U.createElement(`path`,{d:`M0 3v2h2V3H0zm3 0v2h2V3H3zm3 0v2h2V3H6z`}))});xp.displayName=`Ellipses`;var Sp=U.forwardRef(function(e,t){return U.createElement(We,c({iconAttrs:{fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`},iconVerticalAlign:`middle`,iconViewBox:`0 0 8 8`},e,{ref:t}),U.createElement(`path`,{d:`M3.09 0c-.06 0-.1.04-.13.09L.02 6.9c-.02.05-.03.13-.03.19v.81c0 .05.04.09.09.09h6.81c.05 0 .09-.04.09-.09v-.81c0-.05-.01-.14-.03-.19L4.01.09A.142.142 0 003.88 0h-.81zM3 3h1v2H3V3zm0 3h1v1H3V6z`}))});Sp.displayName=`Warning`;var Cp=`Connecting`,wp=`Connecting to Streamlit server`,Tp=`Connecting to static app`,Ep=`Error`,Dp=`Unable to connect to Streamlit server`;function Op(e){switch(e){case X.INITIAL:case X.PINGING_SERVER:case X.CONNECTING:return{icon:xp,label:Cp,tooltip:wp};case X.CONNECTED:return;case X.STATIC_CONNECTING:return{icon:xp,label:Cp,tooltip:Tp};case X.STATIC_CONNECTED:return;case X.DISCONNECTED_FOREVER:default:return{icon:Sp,label:Ep,tooltip:Dp}}}var kp=``+new URL(`../media/fireworks.B4d-_KUe.gif`,import.meta.url).href,Ap=h(`div`,{target:`e192nn00`})(({theme:e})=>({display:`flex`,alignItems:`center`,justifyContent:`center`,color:e.colors.gray60})),jp=h(`label`,{target:`e192nn01`})(({theme:e})=>({fontSize:e.fontSizes.sm,color:e.colors.gray60,textTransform:`uppercase`,marginTop:e.spacing.none,marginRight:e.spacing.lg,marginBottom:e.spacing.none,marginLeft:e.spacing.sm,whiteSpace:`nowrap`,maxWidth:e.sizes.appStatusMaxWidth,lineHeight:e.lineHeights.none})),Mp=h(`div`,{target:`e192nn02`})(({theme:e})=>({display:`flex`,alignItems:`center`,justifyContent:`center`,borderRadius:e.radii.sm,margin:`0 ${e.spacing.sm} 0 0`,paddingLeft:e.spacing.sm,height:e.sizes.appRunningMen})),Np=h(`label`,{target:`e192nn03`})(({isPrompt:e,theme:t})=>({fontSize:t.fontSizes.sm,color:e?t.colors.bodyText:t.colors.gray60,textTransform:e?`none`:`uppercase`,margin:`0 0 0 ${t.spacing.sm}`,whiteSpace:`nowrap`,maxWidth:t.sizes.appStatusMaxWidth,borderRadius:e?t.radii.sm:void 0})),Pp=h(`span`,{target:`e192nn04`})(({theme:e})=>({marginLeft:e.spacing.md,whiteSpace:`nowrap`,color:e.colors.bodyText})),Fp=h(`div`,{target:`e192nn05`})(({isNewYears:e,theme:t})=>({width:e?`2.2rem`:t.sizes.appRunningMen,height:e?`2.2rem`:t.sizes.appRunningMen,marginRight:`-${t.spacing.sm}`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`opacity 0.3s ease-in-out`,cursor:`wait`})),Ip=h(`div`,{target:`e192nn06`})({"&.StatusWidget-appear":{opacity:0}
21,"&.StatusWidget-appear-active":{opacity:1,transition:`opacity 200ms ease-out`},"&.StatusWidget-enter":{opacity:0},"&.StatusWidget-enter-active":{opacity:1,transition:`opacity 200ms ease-out`},"&.StatusWidget-exit":{opacity:1},"&.StatusWidget-exit-active":{opacity:0,transition:`opacity 200ms ease-out`}}),Lp=h(`div`,{target:`e192nn07`})({"&::first-letter":{textDecoration:`underline`}}),Rp=[{component:is,name:`accessible-forward`},{component:rs,name:`accessibility-new`},{component:as,name:`directions-bike`},{component:os,name:`directions-run`},{component:ls,name:`pool`},{component:us,name:`rowing`}],zp=()=>{let e=new Date,t=e.getMonth(),n=e.getDate();return t===11&&n===31||t===0&&n<=6},Bp=200,Vp=()=>{let[e,t]=(0,U.useState)(0),n=Ct(),r=(0,U.useMemo)(()=>zp(),[]);(0,U.useEffect)(()=>{if(r)return;let e=setInterval(()=>{t(e=>(e+1)%Rp.length)},Bp);return()=>clearInterval(e)},[r]);let i=Rp[e].component;return s(Fp,{isNewYears:r,"aria-label":`Running...`,role:`img`,"data-testid":`stStatusWidgetRunningIcon`,children:r?s(`img`,{src:kp,alt:`New Year's Celebration`,style:{width:`100%`,height:`100%`,objectFit:`contain`},"data-testid":`stStatusWidgetNewYearsIcon`}):s(i,{color:n.colors.fadedText60,"aria-hidden":`true`,"data-testid":`stStatusWidgetRunningManIcon`,style:{width:n.sizes.appRunningMen,height:n.sizes.appRunningMen}})})},Hp=500,Up=e=>s(Pp,{children:s(R,{kind:B.HEADER_BUTTON,disabled:e.disabled,containerWidth:!0,onClick:e.onClick,children:e.title})}),Wp=({connectionState:e,scriptRunState:t,rerunScript:n,stopScript:r,allowRunOnSave:i,showScriptChangedActions:a})=>{let[o,c]=(0,U.useState)(!1),l=Ct(),{clear:d,restart:f}=nr(()=>{c(!0)},Hp,{autoStart:!1}),p=()=>{i&&n(!0)},h=(e,t)=>{e===`a`&&!at(t)&&p()},g=e===X.CONNECTED,_=()=>{r()},v=()=>{n(!1)};(0,U.useEffect)(()=>{g&&(t===V.RUNNING||t===V.RERUN_REQUESTED)?f():d(),t===V.NOT_RUNNING&&c(!1)},[d,g,f,t]);let y=()=>{let e=t===V.STOP_REQUESTED;return o?u(Mp,{children:[s(Vp,{}),s(Up,{title:e?`Stopping...`:`Stop`,disabled:e,onClick:_})]}):s(m,{})},b=()=>{let e=t===V.RERUN_REQUESTED;return s(ps,{keyName:`a`,onKeyDown:h,children:u(Mp,{children:[s(Hn,{size:`lg`,iconValue:`:material/info:`,color:l.colors.fadedText60}),s(Np,{isPrompt:!0,children:`File change.`}),s(Up,{title:s(Lp,{children:`Rerun`}),disabled:e,onClick:v}),i&&s(Up,{title:s(Lp,{children:`Always rerun`}),disabled:e,onClick:p})]})})},x=()=>{let t=Op(e);return t===void 0?null:s(Ae,{content:t.tooltip,placement:vt.BOTTOM,children:u(Ap,{className:`stConnectionStatus`,"data-testid":`stConnectionStatus`,children:[s(Bn,{size:`sm`,content:t.icon}),s(jp,{children:t.label})]})})},S=()=>{if(g){if(t===V.RUNNING||t===V.RERUN_REQUESTED)return y();if(a)return b()}return x()},C=(0,U.useRef)(),w=(0,U.useRef)(null),T=C.current;if(C.current=S(),P(C.current)&&P(T))return s(m,{});let E,D;return j(C.current)?(E=!0,D=C.current):(E=!1,D=T),s(Cf,{appear:!0,in:E,timeout:200,unmountOnExit:!0,classNames:`StatusWidget`,nodeRef:w,children:s(Ip,{ref:w,className:`stStatusWidget`,"data-testid":`stStatusWidget`,children:D},`StatusWidget`)})},Gp=(0,U.memo)(({isFullScreen:e,setFullScreen:t,locale:n,mapboxToken:r,enforceDownloadInNewTab:i,resourceCrossOriginMode:a,showErrorLinks:o,pageLinkBaseUrl:c,currentPageScriptHash:l,onPageChange:u,navSections:d,appPages:f,initialSidebarState:p,initialSidebarWidth:m,appLogo:h,sidebarChevronDownshift:g,expandSidebarNav:_,sidebarNavVisibleItems:v,hideSidebarNav:y,appRootRef:b,activeTheme:x,setTheme:S,availableThemes:C,scriptRunState:w,scriptRunId:T,fragmentIdsThisRun:E,formsData:D,requestDeferredFile:O,children:ee})=>{let k=(0,U.useMemo)(()=>({locale:n,mapboxToken:r,enforceDownloadInNewTab:i,resourceCrossOriginMode:a,showErrorLinks:o}),[n,r,i,a,o]),A=(0,U.useMemo)(()=>({initialSidebarState:p,initialSidebarWidth:m,appLogo:h,sidebarChevronDownshift:g,expandSidebarNav:_,sidebarNavVisibleItems:v,hideSidebarNav:y,appRootRef:b}),[p,m,h,g,_,v,y,b]),j=(0,U.useMemo)(()=>({activeTheme:x,setTheme:S,availableThemes:C}),[x,S,C]),M=(0,U.useMemo)(()=>({pageLinkBaseUrl:c,currentPageScriptHash:l,onPageChange:u,navSections:d,appPages:f}),[c,l,u,d,f]),N=(0,U.useMemo)(()=>({isFullScreen:e,setFullScreen:t}),[e,t]),P=(0,U.useMemo)(()=>({scriptRunState:w,scriptRunId:T,fragmentIdsThisRun:E}),[w,T,E]),te=(0,U.useMemo)(()=>({formsData:D}),[D]),ne=(0,U.useMemo)(()=>({requestDeferredFile:O}),[O]);return s(Un.Provider,{value:k,children:s(Fe.Provider,{value:A,children:s(Ie.Provider,{value:j,children:s(me.Provider,{value:M,children:s(qe.Provider,{value:ne,children:s(ir.Provider,{value:N,children:s(Se.Provider,{value:P,children:s(pt.Provider,{value:te,children:ee})})})})})})})})}),Q=function(e){return e.ABOUT=`about`,e.CLEAR_CACHE=`clearCache`,e.CONNECTION_ERROR=`connectionError`,e.SCRIPT_COMPILE_ERROR=`scriptCompileError`,e.WARNING=`w
21arning`,e.DEPLOY_ERROR=`deployError`,e.DEPLOY_DIALOG=`deployDialog`,e}({}),Kp=h(`div`,{target:`e14li120`})(({theme:e})=>({"& > ul":{paddingLeft:e.spacing.twoXL}})),qp=h(`div`,{target:`e14li121`})(({theme:e,hasCodeBelow:t})=>({...t&&{marginBottom:e.spacing.lg}}));function Jp(e){let t=[],n=0,r=0,i=/\[([^\]]+)\]\(([^)]+)\)/g,a;for(;(a=i.exec(e))!==null;)a.index>n&&t.push(s(U.Fragment,{children:e.substring(n,a.index)},r++)),t.push(s(`a`,{href:a[2],target:`_blank`,rel:`noopener noreferrer`,children:a[1]},r++)),n=a.index+a[0].length;return n<e.length&&t.push(s(U.Fragment,{children:e.substring(n)},r++)),t}function Yp({message:e,codeBlock:t}){return u(m,{children:[s(qp,{hasCodeBelow:!!t,children:Jp(e)}),t&&s(Pe,{children:t})]})}var Xp=(0,U.memo)(Yp),Zp=U.createContext(0);D();function Qp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Qp(Object(n),!0).forEach(function(t){em(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function em(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tm=C(`div`,function(e){var t=e.$theme;return $p({},t.typography.LabelMedium)});tm.displayName=`Action`,tm.displayName=`Action`;var nm=C(`div`,function(e){var t=e.$theme;return $p({marginBottom:t.sizing.scale600,color:t.colors.contentPrimary},t.typography.ParagraphMedium)});nm.displayName=`Body`,nm.displayName=`Body`;var rm=C(`div`,function(e){var t=e.$theme;return{marginLeft:t.sizing.scale600,marginTop:t.sizing.scale600,marginRight:t.sizing.scale600,marginBottom:t.sizing.scale600}});rm.displayName=`Contents`,rm.displayName=`Contents`;var im=C(`img`,function(e){var t=e.$theme;return{borderTopLeftRadius:t.borders.surfaceBorderRadius,borderTopRightRadius:t.borders.surfaceBorderRadius,objectFit:`contain`,maxWidth:`100%`}});im.displayName=`HeaderImage`,im.displayName=`HeaderImage`;var am=C(`section`,function(e){var t=e.$theme;return{borderLeftWidth:`2px`,borderTopWidth:`2px`,borderRightWidth:`2px`,borderBottomWidth:`2px`,borderLeftStyle:`solid`,borderTopStyle:`solid`,borderRightStyle:`solid`,borderBottomStyle:`solid`,borderLeftColor:t.colors.borderOpaque,borderRightColor:t.colors.borderOpaque,borderTopColor:t.colors.borderOpaque,borderBottomColor:t.colors.borderOpaque,borderTopLeftRadius:t.borders.radius400,borderTopRightRadius:t.borders.radius400,borderBottomLeftRadius:t.borders.radius400,borderBottomRightRadius:t.borders.radius400,backgroundColor:t.colors.backgroundPrimary,overflow:`hidden`}});am.displayName=`Root`,am.displayName=`Root`;var om=C(`img`,function(e){var t=e.$theme;return $p($p({float:`right`,height:t.sizing.scale2400,width:t.sizing.scale2400,objectFit:`cover`,borderTopLeftRadius:t.borders.surfaceBorderRadius,borderTopRightRadius:t.borders.surfaceBorderRadius,borderBottomLeftRadius:t.borders.surfaceBorderRadius,borderBottomRightRadius:t.borders.surfaceBorderRadius},S(t.borders.border200)),{},{margin:`0 0 ${t.sizing.scale500} ${t.sizing.scale500}`})});om.displayName=`Thumbnail`,om.displayName=`Thumbnail`;var sm=C(`h1`,function(e){var t=e.$theme;return $p($p({},t.typography.HeadingSmall),{},{color:t.colors.contentPrimary,marginLeft:0,marginTop:0,marginRight:0,marginBottom:t.sizing.scale500,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0})});sm.displayName=`Title`,sm.displayName=`Title`,k();var cm=[`children`],lm=[`action`,`children`,`hasThumbnail`,`headerImage`,`thumbnail`,`title`,`overrides`];function um(){return um=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},um.apply(this,arguments)}function dm(e,t){if(e==null)return{};var n=fm(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fm(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function pm(e){return!!e.thumbnail}var mm=function(e){var t=e.children,n=dm(e,cm),r=[``,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];return U.createElement(Zp.Consumer,null,function(e){return U.createElement(sm,um({$as:r[e]},n),t)})};function hm(e){var t=e.action,n=e.children,r=e.hasThumbnail,i=e.headerImage,a=e.thumbnail,o=e.title,s=e.overrides,c=dm(e,lm),l=s.Action,u=s.Body,d=s.Contents,f=s.HeaderImage,p=s.Root,m=s.Thumbn
21ail,h=s.Title,g=A(l)||tm,_=A(u)||nm,v=A(d)||rm,y=A(f)||im,b=A(p)||am,x=A(m)||om,S=A(h)||mm,C=typeof i==`string`?{src:i}:i,T=r(e);return U.createElement(b,um({"data-baseweb":`card`},c,w(p)),i&&U.createElement(y,um({},C,w(f))),U.createElement(v,w(d),a&&U.createElement(x,um({src:a},w(m))),o&&U.createElement(S,um({$hasThumbnail:T},w(h)),o),U.createElement(_,w(u),n),t&&U.createElement(g,w(l),t)))}hm.defaultProps={action:null,children:null,hasThumbnail:pm,overrides:{}};var gm=`data:image/svg+xml,%3csvg%20width='32'%20height='19'%20viewBox='0%200%2032%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%202'%3e%3cpath%20id='path3858'%20d='M15.998%2011.078L10.3882%208.04522L0.650371%202.78157C0.641482%202.77247%200.623705%202.77248%200.614816%202.77248C0.259259%202.59975%20-0.105186%202.96338%200.0281476%203.32702L4.98994%2016.2698L4.99083%2016.2725C4.99616%2016.2852%205.00061%2016.298%205.00594%2016.3107C5.2095%2016.7934%205.65394%2017.0916%206.1375%2017.2089C6.17839%2017.218%206.20764%2017.2262%206.25673%2017.2362C6.30559%2017.2473%206.37394%2017.2625%206.43261%2017.2671C6.44239%2017.268%206.45128%2017.268%206.46106%2017.2689H6.46817C6.47528%2017.2698%206.48239%2017.2698%206.4895%2017.2707H6.49928C6.5055%2017.2716%206.51261%2017.2716%206.51883%2017.2716H6.53039C6.5375%2017.2725%206.54461%2017.2725%206.55172%2017.2725C12.8348%2017.9731%2019.1763%2017.9731%2025.4593%2017.2725C25.5349%2017.2725%2025.6087%2017.2689%2025.6798%2017.2616C25.7029%2017.2589%2025.7251%2017.2562%2025.7473%2017.2534C25.75%2017.2525%2025.7536%2017.2525%2025.7562%2017.2516C25.7713%2017.2498%2025.7864%2017.2471%2025.8016%2017.2443C25.8238%2017.2416%2025.846%2017.2371%2025.8682%2017.2325C25.9127%2017.2225%2025.9329%2017.2152%2025.9932%2017.194C26.0535%2017.1729%2026.1536%2017.1358%2026.2163%2017.1049C26.279%2017.074%2026.3224%2017.0443%2026.3749%2017.0107C26.4398%2016.9689%2026.5015%2016.9261%2026.5641%2016.8781C26.5911%2016.8569%2026.6096%2016.8434%2026.6291%2016.8243L26.6184%2016.818L15.998%2011.078Z'%20fill='%23FF2B2B'/%3e%3cpath%20id='path5063'%20d='M31.3616%202.78158H31.3527L21.6113%208.04524L27.0265%2016.2935L31.9758%203.32704V3.30886C32.1003%202.92704%2031.7181%202.58158%2031.3616%202.78158Z'%20fill='%237D353B'/%3e%3cpath%20id='path5101'%20d='M16.5171%200.278788C16.2682%20-0.0930318%2015.726%20-0.0930318%2015.486%200.278788L10.3882%208.04518L15.998%2011.0779L26.6291%2016.8242C26.6959%2016.7574%2026.7494%2016.6922%2026.806%2016.6234C26.886%2016.5225%2026.9607%2016.4143%2027.0265%2016.2934L21.6113%208.04518L16.5171%200.278788Z'%20fill='%23BD4043'/%3e%3c/g%3e%3c/svg%3e`,_m=`data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Frame'%3e%3cpath%20id='Vector'%20d='M5.95077%2010.7642L8.09076%2011.6685C8.34683%2011.157%208.61204%2010.6637%208.8864%2010.1887C9.16076%209.71374%209.46256%209.23875%209.79179%208.76376L8.25538%208.46232L5.95077%2010.7642ZM9.84666%2013.0387L12.9743%2016.1352C13.7426%2015.8429%2014.5656%2015.3954%2015.4436%2014.7925C16.3215%2014.1896%2017.1446%2013.5045%2017.9128%2012.7372C19.1931%2011.4584%2020.1946%2010.038%2020.917%208.47602C21.6395%206.91403%2021.955%205.47536%2021.8636%204.16C20.5466%204.06866%2019.1017%204.38379%2017.5287%205.10541C15.9557%205.82703%2014.529%206.82726%2013.2487%208.10608C12.4805%208.87337%2011.7946%209.69547%2011.191%2010.5724C10.5874%2011.4493%2010.1393%2012.2714%209.84666%2013.0387ZM14.7302%2011.2575C14.3096%2010.8373%2014.0992%2010.3212%2014.0992%209.70917C14.0992%209.09716%2014.3096%208.58107%2014.7302%208.16088C15.1509%207.7407%2015.6722%207.53061%2016.2941%207.53061C16.916%207.53061%2017.4373%207.7407%2017.8579%208.16088C18.2786%208.58107%2018.489%209.09716%2018.489%209.70917C18.489%2010.3212%2018.2786%2010.8373%2017.8579%2011.2575C17.4373%2011.6776%2016.916%2011.8877%2016.2941%2011.8877C15.6722%2011.8877%2015.1509%2011.6776%2014.7302%2011.2575ZM15.2515%2020.0539L17.5561%2017.752L17.2543%2016.2175C16.7788%2016.5463%2016.3032%2016.8432%2015.8277%2017.1081C15.3521%2017.373%2014.8583%2017.6333%2014.3461%2017.8891L15.2515%2020.0539ZM23.839%202.15956C24.1865%204.37009%2023.9716%206.52125%2023.1942%208.61304C22.4169%2010.7048%2
21021.0771%2012.7007%2019.1749%2014.6007L19.7236%2017.3136C19.7967%2017.679%2019.7784%2018.0352%2019.6687%2018.3823C19.559%2018.7294%2019.3761%2019.0309%2019.12%2019.2866L14.5108%2023.8904L12.2061%2018.4919L7.51461%2013.806L2.10974%2011.5041L6.69153%206.90033C6.9476%206.64457%207.25397%206.46188%207.61064%206.35227C7.9673%206.24265%208.32854%206.22438%208.69435%206.29746L11.4105%206.84553C13.3127%204.94556%2015.3064%203.6028%2017.3915%202.81724C19.4767%202.03168%2021.6258%201.81245%2023.839%202.15956ZM4.05769%2017.2862C4.69786%2016.6468%205.47978%2016.3225%206.40346%2016.3134C7.32713%2016.3042%208.10905%2016.6194%208.74922%2017.2588C9.38939%2017.8982%209.70491%2018.6792%209.69576%2019.6018C9.68662%2020.5243%209.36196%2021.3053%208.72179%2021.9448C8.26452%2022.4015%207.50089%2022.7943%206.43089%2023.1231C5.36089%2023.4519%203.88393%2023.7442%202%2024C2.25607%2022.1183%202.54872%2020.6431%202.87795%2019.5744C3.20718%2018.5056%203.60043%2017.7429%204.05769%2017.2862ZM5.62154%2018.8208C5.43863%2019.0035%205.25572%2019.3369%205.07282%2019.821C4.88991%2020.3051%204.76188%2020.7938%204.68872%2021.2871C5.18256%2021.214%205.67183%2021.0907%206.15653%2020.9171C6.64123%2020.7436%206.97504%2020.5655%207.15794%2020.3828C7.37743%2020.1635%207.49632%2019.8986%207.51461%2019.5881C7.5329%2019.2775%207.4323%2019.0126%207.21282%2018.7934C6.99333%2018.5741%206.72812%2018.4691%206.41718%2018.4782C6.10624%2018.4874%205.84102%2018.6015%205.62154%2018.8208Z'%20fill='%23A3A8B8'/%3e%3c/g%3e%3c/svg%3e`,vm=``+new URL(`../media/snowflake.JU2jBHL8.svg`,import.meta.url).href;function ym(){return{title:`Unable to deploy`,body:u(m,{children:[s(`p`,{children:`This Git tree is in a detached HEAD state.`}),s(`p`,{children:`Please commit the latest changes and push to GitHub to continue.`})]})}}function bm(e){return{title:`Unable to deploy`,body:s(ke,{source:`
22The app's main file \`${e}\` has
23not been pushed to GitHub. Please add it to continue.
24`,allowHTML:!1})}}var xm=`https://share.streamlit.io/deploy`,Sm=`https://streamlit.io/cloud`,Cm=`https://share.streamlit.io/cloud-getting-started`,wm=`https://share.streamlit.io/deployment-tutorial`,Tm=`https://share.streamlit.io/sis-about`,Em=`https://share.streamlit.io/snowflake-trial`,Dm=h(`p`,{target:`euwf8ug0`})({textAlign:`justify`});function Om(){return{title:`Unable to deploy`,body:u(Dm,{children:[`The app’s code is not connected to a remote GitHub repository. To deploy on Streamlit Community Cloud, please put your code in a GitHub repository and publish the current branch. Read more in`,` `,s(`a`,{href:Cm,rel:`noopener noreferrer`,target:`_blank`,children:`our documentation`}),`.`]})}}function km(e){let{colors:t,spacing:n,radii:r,breakpoints:i,sizes:a}=Ct(),{children:o}=e;return s(hm,{overrides:{Root:{style:{borderTopWidth:a.borderWidth,borderBottomWidth:a.borderWidth,borderLeftWidth:a.borderWidth,borderRightWidth:a.borderWidth,borderTopStyle:`solid`,borderBottomStyle:`none`,borderLeftStyle:`none`,borderRightStyle:`solid`,borderTopColor:t.borderColor,borderBottomColor:t.borderColor,borderLeftColor:t.borderColor,borderRightColor:t.borderColor,borderTopLeftRadius:`none`,borderTopRightRadius:`none`,borderBottomLeftRadius:`none`,borderBottomRightRadius:`none`,":last-child":{borderRightStyle:`none`,borderBottomRightRadius:r.xl},":first-child":{borderBottomLeftRadius:r.xl},[`@media (max-width: ${i.md})`]:{":last-child":{borderBottomLeftRadius:r.xl}}}},Contents:{style:{marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:`100%`}},Body:{style:{padding:n.twoXL,marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:`100%`,display:`flex`,flexDirection:`column`,[`@media (max-width: ${i.md})`]:{padding:n.xl}}}},children:o})}var Am=`data:image/svg+xml,%3csvg%20width='12'%20height='9'%20viewBox='0%200%2012%209'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.00009%206.78L1.68676%204.46667C1.42676%204.20667%201.00676%204.20667%200.746758%204.46667C0.486758%204.72667%200.486758%205.14667%200.746758%205.40667L3.53342%208.19334C3.79342%208.45334%204.21342%208.45334%204.47342%208.19334L11.5268%201.14C11.7868%200.880005%2011.7868%200.460005%2011.5268%200.200005C11.2668%20-0.0599951%2010.8468%20-0.0599951%2010.5868%200.200005L4.00009%206.78Z'%20fill='%23808495'/%3e%3c/svg%3e`,jm=h(`div`,{target:`ep91p7v0`})(({theme:e})=>({fontFamily:e.fonts.sansSerif,fontWeight:e.fontWeights.bold,fontSize:e.fontSizes.lg,marginTop:e.spacing.twoXL,marginBottom:e.spacing.twoXS,[`@media (max-width: ${e.breakpoints.md})`]:{marginTop:e.spacing.md}})),Mm=h(`div`,{target:`ep91p7v1`})(({theme:e})=>({fontFamily:e.fonts.sansSerif,fontWeight:e.fontWeights.normal,fontSize:e.fontSizes.md,marginTop:e.spacing.twoXS,marginBottom:e.spacing.md,[`@media (max-width: ${e.breakpoints.md})`]:{marginTop:e.spacing.md}})),Nm=h(`div`,{target:`ep91p7v2`})(({theme:e})=>({display:`grid`,maxWidth:`calc(1.25 * ${e.sizes.contentMaxWidth})`,gridTemplateColumns:`1fr 1fr 1fr`,gridGap:e.spacing.none,[`@media (max-width: ${e.breakpoints.md})`]:{gridTemplateColumns:`1fr`}})),Pm=h(`div`,{target:`ep91p7v3`})(({theme:e})=>({display:`inline-flex`,marginTop:e.spacing.sm,"& > span":{fontFamily:e.fonts.sansSerif,fontWeight:e.fontWeights.normal,fontSize:e.fontSizes.md,marginLeft:e.spacing.twoXL,color:e.colors.gray70},"& > img":{position:`absolute`,marginTop:e.spacing.sm}})),Fm=h(`div`,{target:`ep91p7v4`})(({theme:e})=>({display:`flex`,marginTop:e.spacing.threeXL,"& > button":{marginRight:e.spacing.twoXL},[`@media (max-width: ${e.breakpoints.md})`]:{marginTop:e.spacing.xl}}));function Im(e){let{children:t}=e;return u(Pm,{children:[s(`img`,{src:Am,alt:`Checkmark`}),s(`span`,{children:t})]})}function Lm({children:e}){let{colors:t,fontSizes:n,spacing:r}=Ct();return s(Ne,{style:{marginTop:r.none,marginLeft:r.none,marginRight:r.none,marginBottom:r.none,paddingTop:r.md,paddingRight:r.none,paddingBottom:r.none,paddingLeft:r.none,color:t.bodyText,fontSize:n.md,overflowY:`auto`}
24,children:e})}function Rm(e){let{children:t,onClose:n}=e;return u(Ee,{isOpen:!0,closeable:!0,onClose:n,size:`auto`,children:[s(Ce,{children:`Deploy this app using...`}),s(Lm,{children:t})]})}var{GitStates:zm}=ie,Bm=e=>{window.open(e,`_blank`)},Vm=e=>{if(e){let t=new URL(xm);return t.searchParams.set(`repository`,e.repository??``),t.searchParams.set(`branch`,e.branch??``),t.searchParams.set(`mainModule`,e.module??``),t.toString()}return Sm};function Hm(e){let{gitInfo:t,onClose:n,metricsMgr:r,showDeployError:i,isDeployErrorModalOpen:a}=e,o=(0,U.useCallback)(()=>{if(r.enqueue(`menuClick`,{label:`deployButtonInDialog`}),!t){let e=Om();i(e.title,e.body);return}let{repository:e,branch:o,module:s,untrackedFiles:c,state:l}=t;if((!e||!o||!s)&&l===zm.DEFAULT){let e=Om();i(e.title,e.body);return}if(l===zm.HEAD_DETACHED){let e=ym();i(e.title,e.body);return}if(s&&c?.includes(s)){let e=bm(s);i(e.title,e.body);return}a&&n(),Bm(Vm(t))},[r,t,a,i,n]);return s(Rm,{onClose:n,children:u(Nm,{children:[u(km,{children:[u(nm,{style:{flexGrow:1},children:[s(`img`,{src:gm,alt:`Streamlit Logo`,"data-testid":`stDeployDialogCommunityCloudIcon`}),s(jm,{children:`Streamlit Community Cloud`}),s(Mm,{children:`For community, always free`}),s(Im,{children:`For personal hobbies and learning`}),s(Im,{children:`Deploy unlimited public apps`}),s(Im,{children:`Explore and learn from Streamlit’s community and popular apps`})]}),s(tm,{children:u(Fm,{children:[s(R,{kind:B.PRIMARY,onClick:o,children:`Deploy now`}),s(R,{onClick:()=>{r.enqueue(`menuClick`,{label:`readMoreCommunityCloudInDeployDialog`}),Bm(Cm)},kind:B.MINIMAL,children:`Learn more`})]})})]}),u(km,{children:[u(nm,{style:{flexGrow:1},children:[s(`img`,{src:vm,alt:`Snowflake`,"data-testid":`stDeployDialogSnowflakeDeploymentIcon`}),s(jm,{children:`Snowflake`}),s(Mm,{children:`For enterprise`}),s(Im,{children:`Enterprise-level security, support, and fully managed infrastructure`}),s(Im,{children:`Deploy unlimited private apps with role-based sharing`}),s(Im,{children:`Integrate with Snowflake’s full data stack`})]}),s(tm,{children:u(Fm,{children:[s(R,{kind:B.SECONDARY,onClick:()=>{r.enqueue(`menuClick`,{label:`startTrialInDeployDialog`}),Bm(Em)},children:`Start trial`}),s(R,{onClick:()=>{r.enqueue(`menuClick`,{label:`learnMoreSnowflakeInDeployDialog`}),Bm(Tm)},kind:B.MINIMAL,children:`Learn more`})]})})]}),u(km,{children:[u(nm,{style:{flexGrow:2},children:[s(`img`,{src:_m,alt:`Rocket`,"data-testid":`stDeployDialogCustomDeploymentIcon`}),s(jm,{children:`Other platforms`}),s(Mm,{children:`For custom deployment `}),s(Im,{children:`Deploy on your own hardware or cloud service`}),s(Im,{children:`Set up and maintain your own authentication, resources, and costs`})]}),s(tm,{children:s(Fm,{children:s(R,{onClick:()=>{r.enqueue(`menuClick`,{label:`readMoreDeployTutorialInDeployDialog`}),Bm(wm)},kind:B.MINIMAL,children:`Learn more`})})})]})]})})}function Um(e){switch(e.type){case Q.ABOUT:return s(Wm,{...e});case Q.CLEAR_CACHE:return s(Gm,{...e});case Q.SCRIPT_COMPILE_ERROR:return s(Km,{...e});case Q.WARNING:case Q.CONNECTION_ERROR:return s(qm,{...e});case Q.DEPLOY_DIALOG:return s(Hm,{...e});case Q.DEPLOY_ERROR:return s(Jm,{...e});case void 0:return Ym(e);default:return Xm(e)}}function Wm(e){return u(Ee,{isOpen:!0,onClose:e.onClose,children:[s(Ce,{children:`About`}),s(z,{children:e.aboutSectionMd&&s(ke,{source:e.aboutSectionMd,allowHTML:!1})})]})}function Gm(e){let t=[`**Are you sure you want to clear the app's function caches?**`,`This will remove all cached entries from functions using`,"`@st.cache_data` and `@st.cache_resource`."].join(`  
25`);return s(`div`,{"data-testid":`stClearCacheDialog`,children:u(Ee,{isOpen:!0,onClose:e.onClose,children:[s(Ce,{children:`Clear caches`}),s(z,{children:s(ke,{source:t,allowHTML:!1})}),u(be,{children:[s(Oe,{autoFocus:!0,kind:B.GHOST,onClick:e.onClose,children:`Cancel`}),s(Oe,{kind:B.SECONDARY,onClick:e.confirmCallback,children:`Clear caches`})]})]})})}function Km(e){return u(Ee,{isOpen:!0,onClose:e.onClose,size:`auto`,autoFocus:!1,children:[s(Ce,{children:`Script execution error`}),s(z,{children:s(Pe,{children:e.exception?.message?e.exception.message:`No message`})}),s(be,{children:s(Oe,{kind:B.SECONDARY,onClick:e.onClose,children:`Close`})})]})}function qm(e){return u(Ee,{isOpen:!0,onClose:e.onClose,children:[s(Ce,{children:e.title}),s(z,{children:e.msg})]})}function Jm({title:e,msg:t,onClose:n,onContinue:r,onTryAgain:i}){return u(Ee,{isOpen:!0,onClose:n,children:[s(Ce,{children:e}),s(z,{children:s(Kp,{children:t})}),u(be,{children:[s(Oe,{kind:B.GHOST,onClick:i,children:`Try again`}),s(Oe,{kind:B.SECONDARY,onClick:()=>{n(),r&&r()},children:r?`Continue anyway`:`Close`})]})]})}function Ym({onClose:e}){return s(Ee,{isOpen:!1,onClose:e})}function Xm(e){return s(Ee,{isOpen:!0,onClose:e.onClose,children:s(z,{children:`Dialog type "${e.type}" not recognized.`})})}var Zm=h(`div`,{target:`epm40z20`})(({theme:e})=>({display:`flex`,gap:e.spacing.sm,alignItems:`center`,lineHeight:e.iconSizes.md})),Qm=h(`div`,{target:`epm40z21`})(({theme:e,icon:t})=>({background:`url("${t}") no-repeat center / contain`,width:e.iconSizes.base,height:e.iconSizes.base})),$m=h(`div`,{target:`epm40z22`})({display:`flex`,alignItems:`center`,flexDirection:`row`});function eh({label:e,icon:t,onClick:n}){return s(`div`,{className:`stToolbarActionButton`,"data-testid":`stToolbarActionButton`,children:s(R,{onClick:n,kind:B.HEADER_BUTTON,children:u(Zm,{children:[t&&s(Qm,{"data-testid":`stToolbarActionButtonIcon`,icon:t}),e&&s(`span`,{"data-testid":`stToolbarActionButtonLabel`,children:e})]})})})}function th({sendMessageToHost:e,hostToolbarItems:t,metricsMgr:n}){return s($m,{className:`stToolbarActions`,"data-testid":`stToolbarActions`,children:t.map(({key:t,label:r,icon:i})=>s(eh,{label:r,icon:i,onClick:()=>{n.enqueue(`menuClick`,{label:t}),e({type:`TOOLBAR_ITEM_CALLBACK`,key:t})}},t))})}var nh=n(f(),1),rh=d(`0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}`),ih=h(`div`,{target:`erg7rn60`})(({theme:e})=>({position:`fixed`,display:`flex`,justifyContent:`center`,alignItems:`center`,top:0,left:0,width:e.sizes.full,height:e.sizes.full,fontSize:`40vh`,color:e.colors.redTextColor,fontWeight:e.fontWeights.bold,opacity:`0.8`,textShadow:`1px 1px 10px ${e.colors.grayTextColor}`,transition:`opacity 0.3s ease-in-out`,animation:`${rh} 1s`})),ah=({countdown:e,endCallback:t})=>{let[n,r]=(0,U.useState)(e),i=()=>{let e=n-1;e>=0&&r(e),e===0&&t()};return s(ih,{"data-testid":`stCountdown`,onAnimationEnd:i,children:s(`span`,{children:n})},`frame${n}`)},oh=h(`label`,{target:`erxc94j0`})({margin:0}),sh=h(`div`,{target:`erxc94j1`})({margin:0}),ch=({onClose:e,toggleRecordAudio:t,recordAudio:n,startRecording:r})=>{let[i,a]=(0,U.useState)(n),o=(0,U.useCallback)(e=>{let{checked:n}=e.target;n!==i&&(a(n),t())},[i,t]),c=(0,U.useCallback)(()=>{r(),e()},[r,e]);return u(Ee,{isOpen:!0,onClose:e,children:[s(Ce,{children:`Record a screencast`}),u(z,{children:[s(`p`,{children:`This will record a video with the contents of your screen, so you can easily share what you're seeing with others.`}),s(`p`,{children:u(oh,{"data-testid":`stScreencastAudioCheckbox`,children:[s(`input`,{type:`checkbox`,name:`recordAudio`,"aria-label":`Also record audio`,checked:i,onChange:o}),` `,`Also record audio`]})}),s(sh,{"data-testid":`stScreencastInstruction`,children:s(ke,{source:"Press `Esc` any time to stop recording.",allowHTML:!1})})]}),s(be,{children:s(Oe,{kind:B.SECONDARY,onClick:c,children:`Start recording!`})})]})},lh=h(`div`,{target:`e15jpqoz0`})({display:`flex`}),uh=h(`div`,{target:`e15jpqoz1`})(({theme:e})=>({display:`flex`,alignItems:`center`,justifyItems:`center`,marginRight:e.spacing.twoXL,marginLeft:e.spacing.sm,fontSize:e.fontSizes.fourXL})),dh=h(`p`,{target:`e15jpqoz2`})(({theme:e})=>({margin:e.spacing.none})),fh=(0,U.memo)(({onClose:e})=>u(Ee,{isOpen:!0,onClose:e,children:[s(Ce,{children:`Record a screencast`}),s(z,{children:u(lh,{"data-testid":`stUnsupportedBrowserDialog`,children:[s(uh,{children:s(`span`,{role:`img`,"aria-label":`Alien Monster`,children:`👾`})}),s(dh,{children:`Due to limitations with some browsers, this feature is only supported on recent desktop versions of Chrome, Firefox, and Edge.`})]})})]})),ph=h(`video`,{target:`e13wfkbd0`})(({theme:e})=>({width:e.sizes.full,borderRadius:e.radii.sm})),mh=h(`div`,{target:`e13wfkbd1`})(({theme:e})=>({display:`flex`,flexDirection:`column`,width:e.sizes.full})),hh=h(`div`,{target:`e13wfkbd2`})(({theme:e})=>({display:`flex`,flexDirection:`row`,paddingTop:e.spacing.md,paddingBottom:e.spacing.md})),gh=h(`div`,{target:`e13wfkbd3`})(({theme:e})=>({paddingRight:e.spacing.lg,textAlign:`right`,color:e.colors.grayTextColor,fontWeight:e.fontWeights.bold,width:`6em`})),_h=h(`div`,{target:`e13wfkbd4`})(({theme:e})=>({flex:1,paddingRight:e.spacing.lg,marginRight:`6em`,[`@media (max-width: ${e.breakpoints.sm})`]:{marginRight:e.spacing.none}})),vh=h(`p`,{target:`e13wfkbd5`})(({theme:e})=>({marginTop:e.spacing.sm,marginBottom:e.spacing.none,fontSize:e.fontSizes.sm})),yh=h(`div`,{target:`e13wfkbd6`})(({theme:e})=>({marginTop:e.spacing.twoXS})),bh=({onClose:e,videoBlob:t,fileName:n})=>{let r=URL.createObjectURL(t),i=()=>{let t=document.createElement(`a`);t.setAttribute(`href`,r),t.setAttribute(`download`,`${n}.webm`),t.click(),e()};return u(Ee,{isOpen:!0,onClose:e,overrides:{Dialog:{style:{width:`80vw`}}},children:[s(Ce,{children:`Next steps`}),s(z,{children:u(mh,{"data-testid":`stVideoRecordedDialog`,children:[u(hh,{children:[s(gh,{children:`Step 1`}),u(_h,{children:[s(`p`,{children:`Preview your video below:`}),s(ph,{src:r,controls:!0})]})]}),u(hh,{children:[s(gh,{children:`Step 2`}),u(_h,{children:[s(yh,{children:s(R,{kind:B.SECONDARY,onClick:i,children:`Save video to disk`})}),u(vh,{children:[`This video is encoded in the`,` `,s(`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.`]})]})]}),u(hh,{children:[s(gh,{children:`Step 3`}),u(_h,{children:[`Share your video with the world on Twitter, LinkedIn, YouTube, or just plain email!`,` `,s(`span`,{role:`img`,"aria-label":`Happy`,children:`😀`})]})]})]})})]})},xh=(0,_r.getLogger)(`withScreencast`);function Sh(e){let t=t=>{let{testOverride:n}=t,r=(0,U.useRef)(null),[i,a]=(0,U.useState)(`streamlit-screencast`),[o,c]=(0,U.useState)(!1),[l,d]=(0,U.useState)(void 0),[f,p]=(0,U.useState)(n||`OFF`),m=(0,U.useCallback)(()=>{c(e=>!e)},[]),h=(0,U.useCallback)(async()=>
25{if(!(f===`OFF`||P(r.current))){if(f===`COUNTDOWN`){p(`OFF`);return}if(f===`RECORDING`){let e=r.current;!e||e.getState()===`inactive`?p(`OFF`):(d(await e.stop()),p(`PREVIEW_FILE`))}}},[f]),g=(0,U.useCallback)(async()=>{if(!vd.isSupportedBrowser()){p(`UNSUPPORTED`);return}r.current=new vd({recordAudio:o,onErrorOrStop:()=>{h().catch(e=>xh.warn(`withScreencast.stopRecording threw an error: ${e}`))}});try{await r.current.initialize()}catch(e){xh.warn(`ScreenCastRecorder.initialize error: ${e}`),p(`UNSUPPORTED`);return}p(`COUNTDOWN`)},[o,h]),_=(0,U.useCallback)(e=>{if(!vd.isSupportedBrowser()){p(`UNSUPPORTED`);return}if(f===`OFF`){a(e),p(`SETUP`);return}h().catch(e=>xh.warn(`withScreencast.stopRecording threw an error: ${e}`))},[f,h]),v=(0,U.useCallback)(()=>{if(P(r.current))throw Error(`Countdown finished but recorder is null`);r.current.start()?p(`RECORDING`):h().catch(e=>xh.warn(`withScreencast.stopRecording threw an error: ${e}`))},[h]),y=(0,U.useCallback)(()=>{p(`OFF`)},[]),b={currentState:f,toggleRecordAudio:m,startRecording:_,stopRecording:h};return u(`div`,{className:`withScreencast`,"data-testid":`stScreencast`,children:[s(e,{...t,screenCast:b}),f===`UNSUPPORTED`&&s(fh,{onClose:y}),f===`SETUP`&&s(ch,{recordAudio:o,onClose:y,startRecording:g,toggleRecordAudio:m}),f===`COUNTDOWN`&&s(ah,{countdown:3,endCallback:v}),f===`PREVIEW_FILE`&&l&&s(bh,{onClose:y,videoBlob:l,fileName:i})]})};return t.displayName=`withScreencast(${e.displayName||e.name||`Component`})`,(0,nh.default)(t,e)}var Ch=()=>{let{activeTheme:e}=(0,U.useContext)(Ie),{innerWidth:t}=ar();return{isMobile:t<parseInt(e.emotion.breakpoints.md,10)}},wh=`https://data.streamlit.io/metrics.json`,Th=(0,_r.getLogger)(`MetricsManager`),Eh=class{constructor(e){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId=``,this.pendingEvents=[],this.appHash=`Not initialized`,this.metadata={},this.setAppHash=e=>{this.appHash=e},this.setMetricsConfig=(e=``)=>{this.metricsUrl=e},this.sessionInfo=e}async initialize({gatherUsageStats:e,sendMessageToHost:t}){this.sendMessageToHost=t,this.actuallySendMetrics=e&&this.metricsUrl!==`off`,this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(Th.error(`Undefined metrics config - deactivating metrics tracking.`),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),Th.info(`Gather usage stats: `,this.actuallySendMetrics),this.initialized=!0}enqueue(e,t={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([e,t]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(e,t))}setMetadata(e){this.metadata=e}async requestDefaultMetricsConfig(){let e=L();if(e){let e=window.localStorage.getItem(`stMetricsConfig`);if(e){this.metricsUrl=e;return}}try{let t=await fetch(wh,{signal:AbortSignal.timeout(5e3)});t.ok?(this.metricsUrl=(await t.json()).url??void 0,e&&this.metricsUrl&&window.localStorage.setItem(`stMetricsConfig`,this.metricsUrl)):(this.metricsUrl=void 0,Th.error(`Failed to fetch metrics config: `,t.status))}catch(e){Th.error(`Failed to fetch metrics config:`,e)}}send(e,t={}){let n=this.buildEventProto(e,t);this.metricsUrl===`postMessage`?this.postMessageEvent(e,n):this.track(n)}sendPendingEvents(){this.pendingEvents.forEach(([e,t])=>{this.send(e,t)}),this.pendingEvents=[]}async track(e){let t=new Request(this.metricsUrl,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e.toJSON())});await fetch(t)}postMessageEvent(e,t){this.sendMessageToHost({type:`METRICS_EVENT`,eventName:e,data:t})}buildEventProto(e,t){let n=new ne({event:e,anonymousId:this.anonymousId,...this.getHostTrackingData(),...this.getInstallationData(),reportHash:this.appHash,dev:!1,source:`browser`,streamlitVersion:this.sessionInfo.current.streamlitVersion,isHello:this.sessionInfo.isHello,appId:this.sessionInfo.current.appId,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,serverOs:this.sessionInfo.current.serverOS,hasDisplay:this.sessionInfo.current.hasDisplay,isWebdriver:Dh(),...this.getContextData()});if(e===`menuClick`)n.label=t.label;else if(e===`pageProfile`)return new ne({...n,...t});return n}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3,machineIdV4:this.sessionInfo.current.installationIdV4}}getHostTrackingData(){return this.metadata?yo(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}}
25getAnonymousId(){if(!this.actuallySendMetrics)return;let e=`ajs_anonymous_id`,t=L(),n=le(e),r=t?window.localStorage.getItem(e):null,i=new Date;if(i.setFullYear(new Date().getFullYear()+1),n)this.anonymousId=n,t&&window.localStorage.setItem(e,n);else if(r){try{this.anonymousId=JSON.parse(r)}catch{this.anonymousId=r}Xt(e,this.anonymousId,i)}else this.anonymousId=zn(),Xt(e,this.anonymousId,i),t&&window.localStorage.setItem(e,this.anonymousId)}};function Dh(){return window.navigator?.webdriver??!1}var Oh=dt(),kh=class{constructor(){this.onSessionEvent=new Oh.Signal}handleSessionEventMsg(e){this.onSessionEvent.emit(e)}},Ah=h(`div`,{target:`e1vju3fw0`})(({theme:e})=>{let t=T(e);return{position:`absolute`,background:e.colors.bgColor,color:e.colors.bodyText,top:e.spacing.none,left:e.spacing.none,right:e.spacing.none,bottom:e.spacing.none,colorScheme:t?`light`:`dark`,overflow:`hidden`,"@media print":{float:`none`,height:e.sizes.full,position:`static`,overflow:`visible`}}}),jh=n(_t(),1);function Mh(){let e=new jh.default().getResult();return{browserName:e.browser.name||`Unknown`,browserVersion:e.browser.version||`Unknown`,deviceType:e.device.type||`desktop`,os:e.os.name||`Unknown`}}var Nh=(e,t)=>t==ce.ToolbarMode.DEVELOPER?!0:ce.ToolbarMode.VIEWER==t||ce.ToolbarMode.MINIMAL==t?!1:e||F();function Ph(e){return e||`Streamlit`}var Fh=class{constructor(e,t,n,r){this.hostCommunicationMgr=e,this.onUpdatePageUrl=t,this.onPageNotFound=n,this.onPageIconChange=r,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.hasSetDefaultFavicon=!1,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(e){return this.mainScriptHash!==e.mainScriptHash&&(this.isPageTitleSet=!1,this.isPageIconSet=!1,this.hasSetDefaultFavicon=!1),this.mainScriptHash=e.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=e.config?.hideSidebarNav??null),document.title=Ph(``),[{currentPageScriptHash:e.pageScriptHash,hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handleNavigation(e){let{sections:t,position:n,appPages:r}=e;this.appPages=r,this.hideSidebarNav=n===M.Position.HIDDEN;let i=e.pageScriptHash,a=r.find(e=>e.pageScriptHash===i),o=r.find(e=>e.isDefault);this.mainPage=o;let s=a.urlPathname;if(!this.isPageTitleSet){let e=Ph(a.pageName);document.title=e,this.hostCommunicationMgr.sendMessageToHost({type:`SET_PAGE_TITLE`,title:a.pageName??``})}return!this.isPageIconSet&&a.icon&&this.onPageIconChange(a.icon),[{appPages:r,navSections:t,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:e.expanded,sidebarNavVisibleItems:e.visibleItems??void 0,currentPageScriptHash:i},()=>{this.onUpdatePageUrl(o.urlPathname??``,s,a.isDefault??!1),this.hostCommunicationMgr.sendMessageToHost({type:`SET_APP_PAGES`,appPages:r}),this.hostCommunicationMgr.sendMessageToHost({type:`SET_CURRENT_PAGE_NAME`,currentPageName:a.isDefault?``:s,currentPageScriptHash:i})}]}handlePageNotFound(e){return this.onPageNotFound(e),[{currentPageScriptHash:this.mainScriptHash??``},()=>{this.hostCommunicationMgr.sendMessageToHost({type:`SET_CURRENT_PAGE_NAME`,currentPageName:``,currentPageScriptHash:this.mainScriptHash??``})}]}findPageByUrlPath(e){return this.appPages.find(t=>e.endsWith(`/`+t.urlPathname))??this.mainPage}handlePageConfigChanged(e){e.favicon&&(this.isPageIconSet=!0),e.title&&(this.isPageTitleSet=!0)}clearPageElements(e,t){return e.filterMainScriptElements(t)}};function Ih(e){return Object.entries(e).reduce((e,[t,n])=>(n!==void 0&&(e[t]=n),e),{})}function Lh(e,t){return e??t}function Rh(e,t){if(!e)return t;let n=ue(e.allowedOrigins)?e.allowedOrigins:void 0;return{...t,allowedOrigins:Lh(n,t.allowedOrigins),useExternalAuthToken:Lh(e.useExternalAuthToken,t.useExternalAuthToken),enableCustomParentMessages:Lh(e.enableCustomParentMessages,t.enableCustomParentMessages),blockErrorDialogs:Lh(e.blockErrorDialogs,t.blockErrorDialogs),mapboxToken:Lh(e.mapboxToken,t.mapboxToken),disableFullscreenMode:Lh(e.disableFullscreenMode,t.disableFullscreenMode),enforceDownloadInNewTab:Lh(e.enforceDownloadInNewTab,t.enforceDownloadInNewTab),resourceCrossOriginMode:Lh(e.resourceCrossOriginMode,t.resourceCrossOriginMode),setAnonymousCrossOriginPropertyOnMediaElements:t.setAnonymousCrossOriginPropertyOnMediaElements,metricsUrl:Lh(e.metricsUrl,t.metricsUrl)}}var zh=`<null>`,$=(0,_r.getLogger)(`App`),Bh=Sh(class extends U.PureComponent{constructor(e){super(e),this.sessionInfo=new Ue,this.metricsMgr=new Eh(this.sessionInfo),this.sessionEventDispatcher=new kh,this.embeddingId=Wt(),this.appRootRef=(0,U.createRef)(),this.deferredFileListeners=new Map,this.isInitializingConnectionManager=!0,this.hasReceivedNewSession=!1,this.showDeployError=(e,t,n
25)=>{let r={type:Q.DEPLOY_ERROR,title:e,msg:t,onContinue:n,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg};this.openDialog(r)},this.handleThemeMessage=(e,t)=>{let[,n,r]=mn(),i=fn(this.props.theme.activeTheme);e===n.name&&i?this.props.theme.setTheme(n):e===r.name&&i?this.props.theme.setTheme(r):t&&this.props.theme.setImportedTheme(t)},this.handleConnectionStateChanged=e=>{if($.info(`Connection state changed from ${this.state.connectionState} to ${e}`),e===X.CONNECTED){$.info(`Reconnected to server.`),this.state.connectionErrorDismissed&&this.setState({connectionErrorDismissed:!1});let e=this.state.scriptRunState===V.RUNNING,t=this.state.scriptRunState===V.RERUN_REQUESTED;!this.sessionInfo.last||e||t||this.state.fragmentIdsThisRun.length>0||this.state.autoReruns.length>0?($.info(`Requesting a script run.`),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})):this.state.dialog?.type===Q.CONNECTION_ERROR&&this.setState({dialog:null}),this.hostCommunicationMgr.sendMessageToHost({type:`WEBSOCKET_CONNECTED`})}else this.state.connectionState===X.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:`WEBSOCKET_DISCONNECTED`,attemptingToReconnect:e!==X.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.disconnect();this.isInitializingConnectionManager?this.setState({connectionState:e}):(0,Oo.flushSync)(()=>{this.setState({connectionState:e})})},this.handleGitInfoChanged=e=>{this.setState({gitInfo:e})},this.handleCustomParentMessage=e=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:`CUSTOM_PARENT_MESSAGE`,message:e.message}):$.error(`Sending messages to the host is disabled in line with the platform policy.`)},this.handleMessage=e=>{let t=(e,t,n)=>{let r=e[t];if(r in n)return n[r](e[r]);throw Error(`Cannot handle ${t} "${r}".`)};try{t(e,`type`,{newSession:e=>this.handleNewSession(e),sessionStatusChanged:e=>this.handleSessionStatusChanged(e),sessionEvent:e=>this.handleSessionEvent(e),delta:t=>this.handleDeltaMsg(t,e.metadata),pageConfigChanged:e=>this.handlePageConfigChanged(e),pageInfoChanged:e=>this.handlePageInfoChanged(e),pageNotFound:e=>this.handlePageNotFound(e),gitInfoChanged:e=>this.handleGitInfoChanged(e),scriptFinished:e=>this.handleScriptFinished(e),pageProfile:e=>this.handlePageProfileMsg(e),autoRerun:e=>this.handleAutoRerun(e),fileUrlsResponse:e=>this.uploadClient.onFileURLsResponse(e),deferredFileResponse:e=>this.handleDeferredFileResponse(e),parentMessage:e=>this.handleCustomParentMessage(e),logo:t=>this.handleLogo(t,e.metadata),navigation:e=>this.handleNavigation(e),authRedirect:e=>{qt()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:`REDIRECT_TO_URL`,url:e.url}):window.location.href=e.url},heartbeatAck:()=>this.handleHeartbeatAck()})}catch(e){let t=St(e);$.error(t),this.showError(`Bad message format`,{message:t.message})}},this.handleLogo=(e,t)=>{this.setState(n=>({elements:n.elements.appRootWithLogo(e,{activeScriptHash:t.activeScriptHash,scriptRunId:n.scriptRunId})}))},this.handlePageConfigChanged=e=>{let{title:t,favicon:n,layout:r,initialSidebarState:i,initialSidebarWidth:a,menuItems:o}=e;this.appNavigation.handlePageConfigChanged(e),t&&(this.hostCommunicationMgr.sendMessageToHost({type:`SET_PAGE_TITLE`,title:t}),document.title=t),n&&this.onPageIconChanged(n),r!==this.state.layout&&r!==N.Layout.LAYOUT_UNSET&&this.setState(e=>({layout:r,userSettings:{...e.userSettings,wideMode:r===N.Layout.WIDE}})),i!==this.state.initialSidebarState&&i!==N.SidebarState.SIDEBAR_UNSET&&this.setState(()=>({initialSidebarState:i}));let s=a?.pixelWidth===void 0?void 0:a.pixelWidth;j(s)&&s!==this.state.initialSidebarWidth&&this.setState(()=>({initialSidebarWidth:s})),o&&this.setState(e=>(o.clearAboutMd&&(o.aboutSectionMd=``),{menuItems:{...e.menuItems,...o}}))},this.handleQueryParamsFromWidget=e=>{this.setState({queryParams:e}),this.hostCommunicationMgr.sendMessageToHost({type:`SET_QUERY_PARAM`,queryParams:e?`?${e}`:``})},this.handlePageInfoChanged=e=>{let{queryString:t}=e,n=document.location.pathname+(t?`?${t}`:``);window.history.pushState({},``,n),this.setState({queryParams:t}),this.hostCommunicationMgr.sendMessageToHost({type:`SET_QUERY_PARAM`,queryParams:t?`?${t}`:``})},this.onPageNotFound=e=>{let t=e?`You have requested page /${e}, but no corresponding file was found in the app's pages/ directory`:`The page that you have requested does not seem to exist`;this.showError(`Page not found`,{message:`${t}. Running the app's main page.`})},this.handlePageNotFound=e=>{let{pageName:t}=e;this.maybeSetState(this.appNavigation.handlePageNotFound(t))},this.onPageIconChanged=e=>{je(e,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handleNavigation=e=>{this.setState({navigationPosition:e.position}),this.maybeSetState(this.appNavigation.handleNavigation(e))},this.handlePageProfileMsg=e=>{let t=se.toObject(e),n=Mh();this.metricsMgr.enqueue(`pageProfile`,{...t,isFragmentRun:!!t.isFragmentRun,numPages:this.state.appPages?.length,pageScriptHash:this.state.currentPageScriptHash,activeTheme:this.props.theme?.activeTheme?.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:n})},this.handleAutoRerun=e=>{let t=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(e.fragmentId,!0)},e.interval*1e3);this.setState(e=>({autoReruns:[...e.autoReruns,t]}))},this.handleSessionStatusChanged=e=>{this.setState(t=>{let{scriptRunState:n}=t,{dialog:r}=t;return e.scriptIsRunning&&t.scriptRunState!==V.STOP_REQUESTED?(n=V.RUNNING,j(r)&&r.type===Q.SCRIPT_COMPILE_ERROR&&(r=void 0)):!e.scriptIsRunning&&t.scriptRunState!==V.RERUN_REQUESTED&&t.scriptRunState!==V.COMPILATION_ERROR&&(n=V.NOT_RUNNING),{userSettings:{...t.userSettings,runOnSave:!!e.runOnSave},dialog:r,scriptRunState:n,scriptChangedOnDisk:e.scriptIsRunning?!1:t.scriptChangedOnDisk}})},this.handleSessionEvent=e=>{if(this.sessionEventDispatcher.handleSessionEventMsg(e),e.type===`scriptCompilationException`){this.setState({scriptRunState:V.COMPILATION_ERROR});let t={type:Q.SCRIPT_COMPILE_ERROR,exception:e.scriptCompilationException,onClose:()=>{}};this.maybeShowErrorDialog(t,e.scriptCompilationException?.message??`No message`)}else e.type===`scriptChangedOnDisk`&&this.setState({scriptChangedOnDisk:!0}
25)},this.maybeUpdatePageUrl=(e,t,n)=>{let r=this.getBaseUriParts();if(r){let i;i=ae.MAIN_PAGE_BASE_URL?$f(ae.MAIN_PAGE_BASE_URL).pathname:r.pathname;let a=Vt(document.location.pathname,i);if((a===``?e:a)!==t){let e=n?``:t,r=this.state.queryParams||At(),a=r?`?${r}`:``,o=`${i===`/`?``:i}/${e}${a}`;window.history.pushState({},``,o)}}},this.handleNewSession=e=>{let t=e.initialize;if(this.hasStreamlitVersionChanged(t)){window.location.reload();return}this.hasReceivedNewSession=!0,(!this.sessionInfo.isSet||!this.sessionInfo.current.isConnected)&&this.handleInitialization(e);let{appHash:n,currentPageScriptHash:r}=this.state,{scriptRunId:i,name:a,mainScriptPath:o,fragmentIdsThisRun:s,pageScriptHash:c,mainScriptHash:l}=e;if(s.length)this.setState({fragmentIdsThisRun:s,latestRunTime:performance.now()});else{this.cleanupAutoReruns();let t=e.config,n=e.customTheme;this.processThemeInput(n),this.setState({allowRunOnSave:t.allowRunOnSave,hideTopBar:t.hideTopBar,toolbarMode:t.toolbarMode,showErrorLinks:t.showErrorLinks,latestRunTime:performance.now(),mainScriptHash:l,fragmentIdsThisRun:s}),this.maybeSetState(this.appNavigation.handleNewSession(e)),!this.appNavigation.hasSetDefaultFavicon&&!this.appNavigation.isPageIconSet&&(this.appNavigation.hasSetDefaultFavicon=!0,this.onPageIconChanged(`./favicon.png`))}let u=Yt(this.sessionInfo.current.installationId+o);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(u),this.metricsMgr.enqueue(`updateReport`),n===u&&r===c?this.setState(e=>({elements:e.elements.clearTransientNodes(s),scriptRunId:i})):this.clearAppState(u,i,a,l)},this.handleInitialization=e=>{let t=e.initialize,n=e.config;this.sessionInfo.setCurrent(Ue.propsFromNewSessionMessage(e)),this.metricsMgr.initialize({gatherUsageStats:n.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(t.sessionStatus)},this.onHistoryChange=()=>{let{currentPageScriptHash:e}=this.state,t=this.appNavigation.findPageByUrlPath(document.location.pathname),n=document.location.toString().includes(`#`),r=t?.pageScriptHash===e;P(t)||n&&r||this.onPageChange(t.pageScriptHash,void 0,!0)},this.setAndSendTheme=e=>{this.props.theme.setTheme(e),this.hostCommunicationMgr.sendMessageToHost({type:`SET_THEME_CONFIG`,themeInfo:En(e.emotion)})},this.createThemeHash=e=>{if(!e)return`hash_for_undefined_custom_theme`;let t=tn(JSON.parse(JSON.stringify(e)));return Yt(JSON.stringify(t))},this.closeDialog=()=>{this.state.dialog?.type===Q.CONNECTION_ERROR?this.setState({dialog:void 0,connectionErrorDismissed:!0}):this.setState({dialog:void 0})},this.saveSettings=e=>{let{runOnSave:t}=this.state.userSettings,{runOnSave:n}=e;if(this.setState({userSettings:e}),t!==n&&this.isServerConnected()){let e=new I({setRunOnSave:n});e.type=`setRunOnSave`,this.sendBackMsg(e)}},this.handleRunOnSaveChange=e=>{this.saveSettings({...this.state.userSettings,runOnSave:e})},this.handleDeltaMsg=(e,t)=>{this.setState(n=>({elements:n.elements.applyDelta(n.scriptRunId,e,t)}))},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){let e=new I({debugShutdownRuntime:!0});e.type=`debugShutdownRuntime`,this.sendBackMsg(e)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){let e=new I({debugDisconnectWebsocket:!0});e.type=`debugDisconnectWebsocket`,this.sendBackMsg(e)}},this.debugClearForwardMsgCache=()=>{F()&&this.connectionManager?.websocketConnection?.cache.messages.clear()},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(e=>{clearInterval(e)}),this.setState({autoReruns:[]})},this.rerunScript=(e=!1)=>{if(this.closeDialog(),!this.isServerConnected()){$.error(`Cannot rerun script when disconnected from server.`);return}this.state.scriptRunState===V.RUNNING||this.state.scriptRunState===V.RERUN_REQUESTED||(this.setState({scriptRunState:V.RERUN_REQUESTED}),e===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){$.error(`Cannot load git information when disconnected from server.`);return}this.sendBackMsg(new I({loadGitInfo:!0}))}
25,this.onPageChange=(e,t,n)=>{let{elements:r,mainScriptHash:i}=this.state;this.cleanupAutoReruns();let a=this.appNavigation.clearPageElements(r,i),o=new Set(Array.from(a.getElements()).map(e=>Pt(e)).filter(Dt));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(o),void 0,e,void 0,t,n)},this.isAppInReadyState=e=>this.state.connectionState===X.CONNECTED&&this.state.scriptRunState===V.NOT_RUNNING&&e.scriptRunState===V.RUNNING&&e.connectionState===X.CONNECTED,this.sendRerunBackMsg=(e,t,n,r,i,a)=>{let o=this.getBaseUriParts();if(!o){$.error(`Cannot send rerun backMessage when disconnected from server.`);return}let{currentPageScriptHash:s}=this.state,c=i??this.getQueryString(),l=``,u={timezone:Lt(),timezoneOffset:Nt(),locale:It(),url:Kt(),isEmbedded:Jt(),colorScheme:this.getThemeColorScheme()};if(n)n!==s&&!a&&(c=Ht(i,this.widgetMgr.filterParamsForPageChange(At())),this.setState({queryParams:c}),this.hostCommunicationMgr.sendMessageToHost({type:`SET_QUERY_PARAM`,queryParams:c?`?${c}`:``}));else if(s)n=s;else{let e;e=ae.MAIN_PAGE_BASE_URL?$f(ae.MAIN_PAGE_BASE_URL).pathname:o.pathname,l=Vt(document.location.pathname,e),n=``}let d=this.connectionManager?.getCachedMessageHashes()??[];this.sendBackMsg(new I({rerunScript:{queryString:c,widgetStates:e,pageScriptHash:n,pageName:l,fragmentId:t,isAutoRerun:r,cachedMessageHashes:d,contextInfo:u}})),this.hasReceivedNewSession=!1},this.stopScript=()=>{if(!this.isServerConnected()){$.error(`Cannot stop app when disconnected from server.`);return}if(this.state.scriptRunState===V.NOT_RUNNING||this.state.scriptRunState===V.STOP_REQUESTED)return;let e=new I({stopScript:!0});e.type=`stopScript`,this.sendBackMsg(e),this.setState({scriptRunState:V.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){let e={type:Q.CLEAR_CACHE,confirmCallback:this.clearCache,onClose:()=>{}};this.openDialog(e)}else $.error(`Cannot clear cache: disconnected from server`)},this.openDeployDialog=()=>{let e={type:Q.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:this.state.dialog?.type===Q.DEPLOY_ERROR,metricsMgr:this.metricsMgr,gitInfo:this.state.gitInfo};this.openDialog(e)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){let e=new I({clearCache:!0});e.type=`clearCache`,this.sendBackMsg(e)}else $.error(`Cannot clear cache: disconnected from server`)},this.sendAppHeartbeat=e=>{if(this.isServerConnected()){let t=new I({appHeartbeat:!0});t.type=`appHeartbeat`,this.sendBackMsg(t),this.connectionManager?.onHeartbeatSent(e)}else $.error(`Cannot send app heartbeat: disconnected from server`)},this.handleHeartbeatAck=()=>{this.connectionManager?.onHeartbeatAckReceived()},this.sendBackMsg=e=>{this.connectionManager?($.info(e),this.connectionManager.sendMessage(e)):$.error(`Not connected. Cannot send back message: ${e}`)},this.handleConnectionError=e=>{this.state.connectionErrorDismissed||this.showError(`Connection error`,e,Q.CONNECTION_ERROR)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.aboutCallback=()=>{let{menuItems:e}=this.state,t={type:Q.ABOUT,onClose:this.closeDialog,aboutSectionMd:e?.aboutSectionMd};this.openDialog(t)},this.printCallback=()=>{let{scriptRunState:e}=this.state;if(e!==V.NOT_RUNNING){setTimeout(this.printCallback,500);return}let t;try{let e=Gt(this.embeddingId);t=e?.contentWindow?e.contentWindow.window:window}catch{t=window}finally{t||=window,t.print()}},this.screencastCallback=()=>{let{scriptName:e}=this.state,{startRecording:t}=this.props.screenCast;t(`streamlit-${e}-${Bt()}`)},this.handleFullScreen=e=>{this.setState({isFullScreen:e})},this.setLibConfig=e=>{this.setState({libConfig:e})},this.setAppConfig=e=>{this.setState({appConfig:e})},this.addScriptFinishedHandler=e=>{this.setState((t,n)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.concat(e)}))},this.removeScriptFinishedHandler=e=>{this.setState((t,n)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.filter(t=>t!==e)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{let{queryParams:e}=this.state,t=e&&e.length>0?e:document.location.search;return t.startsWith(`?`)?t.substring(1):t},this.getThemeColorScheme=()=>{let{activeTheme:e}=this.props.theme;return T(e.emotion)?`light`:`dark`},this.showDeployButton=()=>F()&&Nh(this.state.isOwner,this.state.toolbarMode)&&this.sessionInfo.isSet&&!this.sessionInfo.isHello,this.deployButtonClicked=()=>{this.metricsMgr.enqueue(`menuClick`,{label:`deployButtonInApp`}),this.sendLoadGitInfoBackMsg(),this.openDeployDialog()},this.requestFileURLs=(e,t)=>{let n=this.isServerConnected(),r=this.sessionInfo.isSet;if(n&&r){let n=new I({fileUrlsRequest:{requestId:e,fileNames:t.map(e=>e.name),sessionId:this.sessionInfo.current.sessionId}});n.type=`fileUrlsRequest`,this.sendBackMsg(n)}else $.warn(`Cannot request file URLs (isServerConnected: ${n}, isSessionInfoSet: ${r})`),this.uploadClient.onFileURLsResponse({responseId:e,errorMsg:`Connection lost. Please wait for the app to reconnect, then try again.`})},this.requestDeferredFile=e=>{let t=this.isServerConnected(),n=this.sessionInfo.isSet;if(!t||!n)return Promise.reject(Error(`Not connected to server or session not initialized`));let r=Promise.withResolvers(),i=this.deferredFileListeners.get(e)??new Set,a=e=>{i.delete(a),r.resolve(e)};i.add(a),this.deferredFileListeners.set(e,i);let o=new I({deferredFileRequest:{fileId:e,sessionId:this.sessionInfo.current.sessionId}});return o.type=`deferredFileRequest`,this.sendBackMsg(o),r.promise},this.handleDeferredFileResponse=e=>{let t=this.deferredFileListeners.get(e.fileId);if(!(!t||t.size===0)){for(let n of Array.from(t))try{n(e)}catch{}this.deferredFileListeners.delete(e.fileId)}},this.handleKeyDown=(e,t)=>{if(!((e===`c`||e===`r`)&&at(t)))switch(e){case`c`:Nh(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case`r`:this.rerunScript();break}},this.handleKeyUp=e=>{e===`esc`&&this.props.screenCast.stopRecording()},this.hasAppDefinedMenuItems=()=>{let{menuItems:e}=this.state;return!!(e?.aboutSectionMd||e?.getHelpUrl&&!e?.hideGetHelp||e?.reportABugUrl&&!e?.hideReportABug)},this.shouldShowToolbar=(e,t)=>
25{let n=!Jt()||Rt(),r;return r=this.state.toolbarMode===ce.ToolbarMode.MINIMAL?e.length>0||t.length>0||this.hasAppDefinedMenuItems():!0,n&&r},lt(),Ye(),Ze(),this.state={connectionState:X.INITIAL,elements:Do.empty(``,!0),isFullScreen:!1,scriptName:``,scriptRunId:zh,appHash:null,scriptRunState:V.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},connectionErrorDismissed:!1,layout:N.Layout.CENTERED,initialSidebarState:N.SidebarState.AUTO,initialSidebarWidth:void 0,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],showErrorLinks:ce.ShowErrorLinks.SHOW_ERROR_LINKS_AUTO,themeHash:``,gitInfo:null,formsData:ot(),appPages:[],navSections:[],currentPageScriptHash:``,mainScriptHash:``,hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:ce.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:``,queryParams:window.location?.search?.replace(/^\?/,``)??``,deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1,navigationPosition:M.Position.SIDEBAR,scriptChangedOnDisk:!1},this.connectionManager=null,this.widgetMgr=new mt({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:e=>this.setState({formsData:e})}),this.widgetMgr.setQueryParamsChangeHandler(this.handleQueryParamsFromWidget),this.hostCommunicationMgr=new nt({streamlitExecutionStartedAt:e.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:e=>{this.setState({inputsDisabled:e})},themeChanged:this.handleThemeMessage,pageChanged:e=>this.onPageChange(e),isOwnerChanged:e=>this.setState({isOwner:e}),fileUploadClientConfigChanged:e=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(e)},hostMenuItemsChanged:e=>{this.setState({hostMenuItems:e})},hostToolbarItemsChanged:e=>{this.setState({hostToolbarItems:e})},hostHideSidebarNavChanged:e=>{this.setState({hostHideSidebarNav:e})},sidebarChevronDownshiftChanged:e=>{this.setState({sidebarChevronDownshift:e})},pageLinkBaseUrlChanged:e=>{this.setState({pageLinkBaseUrl:e})},queryParamsChanged:e=>{this.setState({queryParams:e})},deployedAppMetadataChanged:e=>{this.setState({deployedAppMetadata:e})},restartWebsocketConnection:()=>{this.connectionManager||(this.setState({scriptRunState:V.RERUN_REQUESTED}),this.initializeConnectionManager())},terminateWebsocketConnection:()=>{this.connectionManager?.disconnect(),this.connectionManager=null}}),this.endpoints=new bp({getServerUri:this.getBaseUriParts,csrfEnabled:!0,sendClientError:(e,t,n,r,i)=>{this.hostCommunicationMgr.sendMessageToHost({type:`CLIENT_ERROR`,component:e,error:t,message:n,source:r,customComponentName:i})}}),this.uploadClient=new gt({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:e=>this.widgetMgr.setFormsWithUploadsInProgress(e),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new Ge(this.endpoints),this.appNavigation=new Fh(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}applyInitialHostConfig(){if(!Qf())return;let e=ae.HOST_CONFIG,t=Ih({allowedOrigins:e.allowedOrigins,useExternalAuthToken:e.useExternalAuthToken,enableCustomParentMessages:e.enableCustomParentMessages,blockErrorDialogs:e.blockErrorDialogs});this.hostCommunicationMgr.setAllowedOrigins(t),this.setAppConfig(t);let n=Ih({mapboxToken:e.mapboxToken,disableFullscreenMode:e.disableFullscreenMode,enforceDownloadInNewTab:e.enforceDownloadInNewTab,resourceCrossOriginMode:e.resourceCrossOriginMode});Object.keys(n).length>0&&this.setLibConfig(n),e.metricsUrl!==void 0&&this.metricsMgr.setMetricsConfig(e.metricsUrl)}initializeConnectionManager(){this.isInitializingConnectionManager=!0,this.applyInitialHostConfig(),this.connectionManager=new pp({getLastSessionId:()=>this.sessionInfo.last?.sessionId,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,sendClientError:(e,t,n
25)=>{this.hostCommunicationMgr.sendMessageToHost({type:`CLIENT_ERROR`,component:`Websocket Connection`,error:e,message:t,source:n})},onHostConfigResp:e=>{let{allowedOrigins:t,useExternalAuthToken:n,disableFullscreenMode:r,enableCustomParentMessages:i,mapboxToken:a,enforceDownloadInNewTab:o,metricsUrl:s,blockErrorDialogs:c,setAnonymousCrossOriginPropertyOnMediaElements:l,resourceCrossOriginMode:u}=Rh(ae.HOST_CONFIG,e),d={allowedOrigins:t,useExternalAuthToken:n,enableCustomParentMessages:i,blockErrorDialogs:c},f={mapboxToken:a,disableFullscreenMode:r,enforceDownloadInNewTab:o,resourceCrossOriginMode:u??(l?`anonymous`:void 0)};this.metricsMgr.setMetricsConfig(s),this.hostCommunicationMgr.setAllowedOrigins(d),this.setAppConfig(d),this.setLibConfig(f)}}),this.isInitializingConnectionManager=!1}componentDidMount(){this.initializeConnectionManager(),Be(this.state.scriptRunState),this.hostCommunicationMgr.sendMessageToHost({type:`SCRIPT_RUN_STATE_CHANGED`,scriptRunState:this.state.scriptRunState}),Ot()&&document.body.classList.add(`embedded`),qt()&&(window.iFrameResizer={heightCalculationMethod:()=>{let e=document.querySelectorAll(`[data-iframe-height]`),t=Array.from(e).map(e=>Math.ceil(e.getBoundingClientRect().bottom));return Math.max(0,...t)}},rr(()=>import(`./iframeResizer.contentWindow.DWzQ-oz2.js`).then(e=>n(e.default,1)),__vite__mapDeps([2,1]),import.meta.url)),this.hostCommunicationMgr.sendMessageToHost({type:`SET_THEME_CONFIG`,themeInfo:En(this.props.theme.activeTheme.emotion)}),this.metricsMgr.enqueue(`viewReport`),window.addEventListener(`popstate`,this.onHistoryChange,!1)}componentDidUpdate(e,t){if(window.prerenderReady===!1&&this.isAppInReadyState(t)&&(window.prerenderReady=!0),this.state.scriptRunState!==t.scriptRunState){if(Be(this.state.scriptRunState),this.state.scriptRunState===V.NOT_RUNNING)try{st(`script-run-cycle`,V.RUNNING,V.NOT_RUNNING)}catch{}this.hostCommunicationMgr.sendMessageToHost({type:`SCRIPT_RUN_STATE_CHANGED`,scriptRunState:this.state.scriptRunState})}}componentWillUnmount(){this.connectionManager?.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener(`popstate`,this.onHistoryChange,!1)}maybeShowErrorDialog(e,t){let{blockErrorDialogs:n}=this.state.appConfig;n||this.openDialog(e);let r=e.type===Q.SCRIPT_COMPILE_ERROR?e.type:e.title;this.hostCommunicationMgr.sendMessageToHost({type:`CLIENT_ERROR_DIALOG`,error:r,message:t})}showError(e,t,n=Q.WARNING){$.error(t.message);let r={type:n,title:e,msg:s(Xp,{message:t.message,codeBlock:t.codeBlock}),onClose:()=>{}};this.maybeShowErrorDialog(r,t.message)}hasStreamlitVersionChanged(e){let t;if(ae.ENABLE_RELOAD_BASED_ON_HARDCODED_STREAMLIT_VERSION===!0?t={version:`1.56.0`}.version:this.sessionInfo.isSet&&(t=this.sessionInfo.current.streamlitVersion),t){let{environmentInfo:n}=e;if(j(n)&&j(n.streamlitVersion))return t!=n.streamlitVersion}return!1}maybeSetState(e){if(e){let[t,n]=e;this.setState(t,n)}}processThemeInput(e){let t=this.createThemeHash(e);if(t===this.state.themeHash)return;this.setState({themeHash:t});let n=!fn(this.props.theme.activeTheme);if(e){let t=pn(e);this.props.theme.addThemes(t,{keepPresetThemes:!1});let n=un(t);if(n)this.setAndSendTheme(n);else if(t.length>1){let e=t.findIndex(e=>e.name===bn);this.setAndSendTheme(t[e])}else this.setAndSendTheme(t[0])}else if(this.props.theme.addThemes([]),n){let e=un([nn,ln]);e?this.setAndSendTheme(e):this.setAndSendTheme(wn())}(e?.fontFaces&&e.fontFaces.length>0||e?.fontSources&&e.fontSources.length>0)&&this.props.theme.setFonts(e)}handleScriptFinished(e){(e===re.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||e===re.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||e===re.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&(Promise.resolve().then(()=>{this.state.scriptFinishedHandlers.forEach(e=>e())}),(e===re.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||e===re.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&this.setState(({scriptRunId:e,fragmentIdsThisRun:t,elements:n})=>({elements:n.clearStaleNodes(e,t)}),()=>{this.removeInactiveWidgetState()}),this.connectionManager!==null&&e!==re.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.hasReceivedNewSession&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge,this.state.fragmentIdsThisRun))}clearAppState(e,t,n,r){this.setState(i=>({scriptRunId:t,scriptName:n,appHash:e,elements:this.appNavigation.clearPageElements(i.elements,r)}
25),()=>{this.removeInactiveWidgetState()})}removeInactiveWidgetState(){let{elements:e,blockIds:t}=this.state.elements.getActiveIds(),n=new Set([...Array.from(e).map(e=>Pt(e)).filter(Dt),...t]);this.widgetMgr.removeInactive(n)}openDialog(e){this.setState({dialog:e})}render(){let{allowRunOnSave:e,connectionState:t,dialog:n,elements:r,initialSidebarState:i,menuItems:a,isFullScreen:o,scriptRunId:c,scriptRunState:l,userSettings:d,hideTopBar:f,hideSidebarNav:p,expandSidebarNav:h,sidebarNavVisibleItems:g,currentPageScriptHash:_,hostHideSidebarNav:v,pageLinkBaseUrl:y,sidebarChevronDownshift:b,hostMenuItems:x,hostToolbarItems:S,libConfig:C,inputsDisabled:w,appPages:T,navSections:E,navigationPosition:D,scriptChangedOnDisk:O}=this.state,ee=this.props.isMobileViewport?M.Position.SIDEBAR:D,k=Nh(this.state.isOwner,this.state.toolbarMode),A=(0,ds.default)(`stApp`,zt(this.embeddingId),{"streamlit-embedded":Jt(),"streamlit-wide":d.wideMode}),j=n?Um({...n,onClose:this.closeDialog}):null,N=this.shouldShowToolbar(x,S),P=!Jt()||wt(),te=Ot();return s(Gp,{initialSidebarState:i,initialSidebarWidth:this.state.initialSidebarWidth,appRootRef:this.appRootRef,pageLinkBaseUrl:y,currentPageScriptHash:_,onPageChange:this.onPageChange,navSections:E,appPages:T,appLogo:r.logo,sidebarChevronDownshift:b,expandSidebarNav:h,sidebarNavVisibleItems:g,hideSidebarNav:p||v||ee===M.Position.TOP,isFullScreen:o,setFullScreen:this.handleFullScreen,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language,formsData:this.state.formsData,scriptRunState:l,scriptRunId:c,mapboxToken:C.mapboxToken,enforceDownloadInNewTab:C.enforceDownloadInNewTab,resourceCrossOriginMode:C.resourceCrossOriginMode,showErrorLinks:this.state.showErrorLinks,requestDeferredFile:this.requestDeferredFile,children:s(ps,{keyName:`r,c,esc`,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:u(Ah,{ref:this.appRootRef,className:A,"data-testid":`stApp`,"data-test-script-state":c==zh?`initial`:l,"data-test-connection-state":t,children:[s(fd,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:r,widgetMgr:this.widgetMgr,uploadClient:this.uploadClient,navigationPosition:ee,wideMode:d.wideMode,embedded:Jt(),showPadding:P,disableScrolling:te,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,widgetsDisabled:w||t!==X.CONNECTED,showToolbar:N,disableFullscreenMode:C.disableFullscreenMode,componentRegistry:this.componentRegistry,topRightContent:u(m,{children:[!f&&s(Wp,{connectionState:t,scriptRunState:l,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:e,showScriptChangedActions:O}),!f&&s(th,{hostToolbarItems:S,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr}),this.showDeployButton()&&!O&&s(md,{onClick:this.deployButtonClicked}),!f&&s(of,{isServerConnected:this.isServerConnected(),quickRerunCallback:this.rerunScript,clearCacheCallback:this.openClearCacheDialog,aboutCallback:this.aboutCallback,printCallback:this.printCallback,screencastCallback:this.screencastCallback,screenCastState:this.props.screenCast.currentState,hostMenuItems:x,developmentMode:k,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:a,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode,runOnSave:this.state.userSettings.runOnSave,onRunOnSaveChange:this.handleRunOnSaveChange,allowRunOnSave:e&&k,streamlitVersion:this.sessionInfo.isSet?this.sessionInfo.current.streamlitVersion:void 0})]})}),j]})})})}}),Vh=e=>{let{isMobile:t}=Ch();return s(Bh,{...e,isMobileViewport:t})},Hh=e=>e.find(e=>e.name===(Tn()===`dark`?Sn:_n)),Uh=e=>({...e,name:bn,displayName:Cn});function Wh(){let e=gn(),[t,n]=(0,U.useState)(e),[r,i]=(0,U.useState)(e.themeInput?.fontFaces??[]),[a,o]=(0,U.useState)(null),[s,c]=(0,U.useState)(()=>[...mn(),...fn(e)?[]:[e]]),l=(0,U.useRef)(s);(0,U.useEffect)(()=>{l.current=s},[s]);let u=(0,U.useCallback)((e,t={})=>{let{keepPresetThemes:n=!0}=t,r=[...n?mn():[],...e];l.current=r,c(r)},[]),d=(0,U.useCallback)((e,t={})=>{let{persist:r=!0}=t;n(t=>e===t?t:(r&&cn(e),e))},[]),f=(0,U.useCallback)(e=>{if(e.name===`Use system setting`){d(hn());return}if(e.name===`Custom Theme Auto`){let e=Hh(l.current);if(e){d(Uh(e));return}}d(e)},[d]),p=(0,U.useCallback)(()=>{let e=hn();t.name===`Use system setting`&&d(e,{persist:!1});let n=s.filter(e=>e.name!==Cn),r=n.some(e=>
25e.name===bn);if(r&&t.name===`Custom Theme Auto`){let e=Hh(n);e&&d(Uh(e),{persist:!1})}c(r?n:[wn(),...n])},[t.name,s,d]),m=(0,U.useCallback)(e=>{e.fontFaces&&i(e.fontFaces);let t=[...e.fontSources||[],...e.sidebar?.fontSources||[]],n={};t.forEach(e=>{e.sourceUrl&&e.configName&&(n[e.configName]=e.sourceUrl)}),o(Object.keys(n).length>0?n:null)},[]),h=(0,U.useCallback)(e=>{m(e),f(yn(dn,new de(e)))},[m,f]);return(0,U.useEffect)(()=>{let e=window.matchMedia(`(prefers-color-scheme: dark)`);return e.addEventListener(`change`,p),window.addEventListener(`afterprint`,p),()=>{window.removeEventListener(`afterprint`,p),e.removeEventListener(`change`,p)}},[p]),[{setTheme:f,activeTheme:t,addThemes:u,availableThemes:s,setFonts:m,setImportedTheme:h},r,a]}var Gh=({streamlitExecutionStartedAt:e})=>{let[t,n,r]=Wh(),{activeTheme:i}=t;return s(ft,{theme:i,children:s(Je,{children:u(Le,{children:[n.length>0&&s(co,{fontFaces:n}),r&&s(lo,{fontSources:r}),s(Vh,{theme:t,streamlitExecutionStartedAt:e})]})})})},Kh=Date.now(),qh=new oo({prefix:`st-`}),Jh=document.getElementById(`root`);if(!Jh)throw Error(`#root DOM element not found`);(0,gr.createRoot)(Jh).render(s(U.StrictMode,{children:s(ri,{children:s(ee,{value:qh,children:s(Gh,{streamlitExecutionStartedAt:Kh})})})}));export{Bs as a,ho as c,Ws as i,tl as n,ns as o,Jc as r,yo as s,Lu as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.