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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. streamlit/elements/widgets/data_editor.py +7 -1
  2. streamlit/static/index.html +1 -1
  3. streamlit/static/manifest.json +284 -284
  4. streamlit/static/static/js/{ErrorOutline.esm.sMJdFExW.js → ErrorOutline.esm.LtBTGAgi.js} +1 -1
  5. streamlit/static/static/js/{FileDownload.esm.CV-WYqBn.js → FileDownload.esm.DllwCvQc.js} +1 -1
  6. streamlit/static/static/js/{FileHelper.5nCh9KDY.js → FileHelper.DgwA_xYF.js} +1 -1
  7. streamlit/static/static/js/{FormClearHelper.-9RbsnV0.js → FormClearHelper.DyYuMYyM.js} +1 -1
  8. streamlit/static/static/js/{InputInstructions.2R3tBtW9.js → InputInstructions.ikAdmYQR.js} +1 -1
  9. streamlit/static/static/js/{Particles.DDHoXFxh.js → Particles.Cg5ey-rW.js} +1 -1
  10. streamlit/static/static/js/{ProgressBar.BxmfHxKu.js → ProgressBar.D1rDn4Rn.js} +1 -1
  11. streamlit/static/static/js/{StreamlitSyntaxHighlighter.BFWV0oqR.js → StreamlitSyntaxHighlighter.DU42g8NY.js} +1 -1
  12. streamlit/static/static/js/{Toolbar.DMgU0Vgw.js → Toolbar.0YdWjZhn.js} +1 -1
  13. streamlit/static/static/js/{base-input.BXTqYbyG.js → base-input.DYzkAUR7.js} +1 -1
  14. streamlit/static/static/js/{checkbox.5xWaqPqm.js → checkbox.YeQ8t-PZ.js} +1 -1
  15. streamlit/static/static/js/{createSuper.OIgV8wc-.js → createSuper.CXzRWZIx.js} +1 -1
  16. streamlit/static/static/js/{data-grid-overlay-editor.B4RIu9cw.js → data-grid-overlay-editor.vnwILR0p.js} +1 -1
  17. streamlit/static/static/js/{downloader.DwCJck8O.js → downloader.BdNzicWj.js} +1 -1
  18. streamlit/static/static/js/{embed.HKcgTiLB.js → embed.C_8wI7Q8.js} +1 -1
  19. streamlit/static/static/js/{es6.4AP97RGk.js → es6.D6UMoOIM.js} +2 -2
  20. streamlit/static/static/js/{iframeResizer.contentWindow.BZAsvL9q.js → iframeResizer.contentWindow.DM7vAi8H.js} +1 -1
  21. streamlit/static/static/js/{index.CxXo5UKy.js → index.0CGAg_-3.js} +1 -1
  22. streamlit/static/static/js/{index.CbiYVMT1.js → index.19XigCCW.js} +1 -1
  23. streamlit/static/static/js/{index.CqTPbV5Y.js → index.3bHSf9gi.js} +8 -8
  24. streamlit/static/static/js/{index.Da9gznCC.js → index.B1br6-J8.js} +1 -1
  25. streamlit/static/static/js/{index.DN4sfQLP.js → index.BDyX78eQ.js} +1 -1
  26. streamlit/static/static/js/{index.D52dMvK5.js → index.BEiPXRiB.js} +1 -1
  27. streamlit/static/static/js/{index.DfIRibXG.js → index.BGGsxMsK.js} +1 -1
  28. streamlit/static/static/js/{index.VFDFuf_7.js → index.BK8LGuo5.js} +1 -1
  29. streamlit/static/static/js/{index.Di9I2cid.js → index.BNH1O6vW.js} +1 -1
  30. streamlit/static/static/js/{index.CSbah0y4.js → index.BNJ18Gvk.js} +1 -1
  31. streamlit/static/static/js/{index.BKIlG7Ng.js → index.BSC_e7mC.js} +1 -1
  32. streamlit/static/static/js/{index.q4fLUQtC.js → index.BSsyTGMU.js} +1 -1
  33. streamlit/static/static/js/{index.DMU3coc2.js → index.BTeFWqxT.js} +1 -1
  34. streamlit/static/static/js/index.BVQ-x0jB.js +2 -0
  35. streamlit/static/static/js/{index.CbxllBj8.js → index.BtT26h8D.js} +1 -1
  36. streamlit/static/static/js/{index.NaDyAN1s.js → index.BuO127Fv.js} +1 -1
  37. streamlit/static/static/js/{index.CxbL5FgL.js → index.C4SaLgc9.js} +1 -1
  38. streamlit/static/static/js/{index.DY9Ac89e.js → index.C6PG_WI2.js} +1 -1
  39. streamlit/static/static/js/{index.BVuohWM1.js → index.C9ZwaDT3.js} +1 -1
  40. streamlit/static/static/js/{index.DkpEv0uV.js → index.CCH6P_Oz.js} +1 -1
  41. streamlit/static/static/js/{index.B0TPxAZ1.js → index.CJdAAsMS.js} +1 -1
  42. streamlit/static/static/js/{index.-3selq_5.js → index.CLw67zQa.js} +1 -1
  43. streamlit/static/static/js/{index.BHWBaOWH.js → index.COYdue8P.js} +1 -1
  44. streamlit/static/static/js/index.CPVPS6MS.js +1 -0
  45. streamlit/static/static/js/{index.L7erTnMm.js → index.CQRv0Buu.js} +1 -1
  46. streamlit/static/static/js/{index.BjQIH-3U.js → index.CTssS8CY.js} +1 -1
  47. streamlit/static/static/js/{index.BJas6XzW.js → index.CV56Xzvw.js} +1 -1
  48. streamlit/static/static/js/{index.DwJ9Vhsl.js → index.CVgZcb-2.js} +1 -1
  49. streamlit/static/static/js/{index.BrqtKtSu.js → index.CaMDX02c.js} +1 -1
  50. streamlit/static/static/js/{index.DRDE9rnx.js → index.Cc0FyOvj.js} +1 -1
  51. streamlit/static/static/js/{index.CP2YZ73v.js → index.CccNGpyY.js} +1 -1
  52. streamlit/static/static/js/{index.W-bl3NDo.js → index.CinPJsaI.js} +1 -1
  53. streamlit/static/static/js/{index.CIC9pLsG.js → index.Cys-qREe.js} +1 -1
  54. streamlit/static/static/js/{index.Dg5zbEp2.js → index.DATGLwZn.js} +1 -1
  55. streamlit/static/static/js/{index.Buc7XrOl.js → index.DDuPBAVu.js} +5 -5
  56. streamlit/static/static/js/{index.xZBTXGNC.js → index.DN77pJCq.js} +1 -1
  57. streamlit/static/static/js/{index.BNMLO-0p.js → index.DRgFBrOW.js} +1 -1
  58. streamlit/static/static/js/{index.RNTPpVde.js → index.Dc27IuI8.js} +1 -1
  59. streamlit/static/static/js/{index.DYKCsDvl.js → index.DdjNqo0t.js} +1 -1
  60. streamlit/static/static/js/{index.Ckcqwai8.js → index.DmQGepo0.js} +1 -1
  61. streamlit/static/static/js/{index.6UunrySF.js → index.DmaExHyk.js} +1 -1
  62. streamlit/static/static/js/{index.Cd1D2eGF.js → index.Dou8UoAD.js} +1 -1
  63. streamlit/static/static/js/{index.oyLQ4pue.js → index.Dt4MKWrN.js} +1 -1
  64. streamlit/static/static/js/{index.BMU6zZRk.js → index.M-iumICI.js} +1 -1
  65. streamlit/static/static/js/{index.XYozEjwK.js → index.NjN0yaAC.js} +1 -1
  66. streamlit/static/static/js/{index.BPmBNTel.js → index.OW6D7CJ5.js} +1 -1
  67. streamlit/static/static/js/{index.DBUdji-9.js → index.SnIe8o_F.js} +1 -1
  68. streamlit/static/static/js/{index.1ylynMAS.js → index.xg87JKI8.js} +1 -1
  69. streamlit/static/static/js/{input.CcvrgErO.js → input.-I2c-pPm.js} +1 -1
  70. streamlit/static/static/js/{main.eVHOp4Th.js → main.zgyqwsPV.js} +1 -1
  71. streamlit/static/static/js/{memory.Ck_sLv5Y.js → memory.BTaCc67b.js} +1 -1
  72. streamlit/static/static/js/{number-overlay-editor.DgcLMWOy.js → number-overlay-editor.Bp2-OIVN.js} +1 -1
  73. streamlit/static/static/js/{pandasStylerUtils.DqP0h70z.js → pandasStylerUtils.PlmC_Sod.js} +1 -1
  74. streamlit/static/static/js/{possibleConstructorReturn.C_51n46K.js → possibleConstructorReturn.D2vivPxX.js} +1 -1
  75. streamlit/static/static/js/{sandbox.Q-g3QIZJ.js → sandbox.C-NkJg85.js} +1 -1
  76. streamlit/static/static/js/{styled-components.e0V96rJw.js → styled-components.-ywQNIcz.js} +1 -1
  77. streamlit/static/static/js/{throttle.D3b5WILl.js → throttle.SbSFuU2P.js} +1 -1
  78. streamlit/static/static/js/{timepicker.Bpn70xGc.js → timepicker.BRg2LlYz.js} +1 -1
  79. streamlit/static/static/js/{toConsumableArray.DIN_ys1J.js → toConsumableArray.DmYuqCFN.js} +1 -1
  80. streamlit/static/static/js/uniqueId.DDLECwS_.js +1 -0
  81. streamlit/static/static/js/{useBasicWidgetState.DA3_qaXD.js → useBasicWidgetState.CSKMY_WY.js} +1 -1
  82. streamlit/static/static/js/{useIntlLocale.BSq6SANa.js → useIntlLocale.DrzrdT6m.js} +1 -1
  83. streamlit/static/static/js/{useTextInputAutoExpand.ytEW5QmA.js → useTextInputAutoExpand.BZ_dM91Q.js} +1 -1
  84. streamlit/static/static/js/{useUpdateUiValue.DOxWBNiI.js → useUpdateUiValue.y-s71G-M.js} +1 -1
  85. streamlit/static/static/js/{useWaveformController.BCmk6WLk.js → useWaveformController.Bumwfqnl.js} +1 -1
  86. streamlit/static/static/js/{withCalculatedWidth.ChdrMItN.js → withCalculatedWidth.Dl_TDMaA.js} +1 -1
  87. streamlit/static/static/js/{withFullScreenWrapper.7j_lzlaF.js → withFullScreenWrapper.CWEBbO_P.js} +1 -1
  88. streamlit/web/server/authlib_tornado_integration.py +60 -0
  89. streamlit/web/server/oidc_mixin.py +14 -3
  90. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/METADATA +1 -1
  91. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/RECORD +95 -95
  92. streamlit/static/static/js/index.B_AvdOKC.js +0 -1
  93. streamlit/static/static/js/index.q9puCQgK.js +0 -2
  94. streamlit/static/static/js/uniqueId.B27POWT6.js +0 -1
  95. {streamlit-1.52.1.data → streamlit-1.52.2.data}/scripts/streamlit.cmd +0 -0
  96. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/WHEEL +0 -0
  97. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/entry_points.txt +0 -0
  98. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{g as Z,r as i,aL as M,aI as $,aM as I}from"./index.CqTPbV5Y.js";async function q(l,e=16e3){if(!l||l.size===0)throw new Error("Invalid or empty blob provided");if(!window.AudioContext)throw new Error("AudioContext not supported in this browser");const o=new AudioContext;try{const n=await l.arrayBuffer(),r=await o.decodeAudioData(n),d=e??r.sampleRate,s=await J(r,d);return K(s,d)}finally{o.close()}}async function J(l,e){const{duration:o,numberOfChannels:n,sampleRate:r}=l,d=Math.ceil(o*e);if(!window.OfflineAudioContext)throw new Error("OfflineAudioContext not supported");const s=new OfflineAudioContext(1,d,e),p=s.createBufferSource();if(p.buffer=l,n>1){const h=s.createChannelSplitter(n),m=s.createChannelMerger(1);p.connect(h);for(let c=0;c<n;c++){const u=s.createGain();u.gain.value=1/n,h.connect(u,c),u.connect(m,0,0)}m.connect(s.destination)}else p.connect(s.destination);p.start(0);try{return await s.startRendering()}catch(h){throw new Error(`Failed to resample audio from ${r}Hz to ${e}Hz: ${h instanceof Error?h.message:String(h)}`)}}function K(l,e){const n=l.length,r=n*2+44,d=new ArrayBuffer(r),s=new DataView(d),p=l.getChannelData(0),h=(c,u)=>{for(let y=0;y<u.length;y++)s.setUint8(c+y,u.charCodeAt(y))};h(0,"RIFF"),s.setUint32(4,r-8,!0),h(8,"WAVE"),h(12,"fmt "),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,e,!0),s.setUint32(28,e*2,!0),s.setUint16(32,2,!0),s.setUint16(34,16,!0),h(36,"data"),s.setUint32(40,n*2,!0);let m=44;for(let c=0;c<n;c++){const u=Math.max(-1,Math.min(1,p[c]));s.setInt16(m,u*32767,!0),m+=2}return new Blob([d],{type:"audio/wav"})}class O{constructor(){this.wavesurfer=null,this.currentBlobUrl=null,this.events={},this.isPlaying=!1}initialize(e){this.wavesurfer=e,this.setupEventListeners()}setupEventListeners(){this.wavesurfer&&(this.teardownEventListeners(),this.handleTimeUpdate=e=>{this.events.onTimeUpdate?.(e*1e3)},this.handlePause=()=>{this.isPlaying=!1,this.events.onPause?.()},this.handlePlay=()=>{this.isPlaying=!0,this.events.onPlay?.()},this.handleFinish=()=>{this.isPlaying=!1,this.events.onFinish?.()},this.handleReady=()=>{this.events.onReady?.()},this.handleError=e=>{const o=e instanceof Error?e:new Error(String(e));this.events.onError?.(o)},this.wavesurfer.on("timeupdate",this.handleTimeUpdate),this.wavesurfer.on("pause",this.handlePause),this.wavesurfer.on("play",this.handlePlay),this.wavesurfer.on("finish",this.handleFinish),this.wavesurfer.on("ready",this.handleReady),this.wavesurfer.on("error",this.handleError))}setEventHandlers(e){this.events=e}async load(e){if(!this.wavesurfer)throw new Error("WaveSurfer not initialized");this.cleanupPreviousUrl();let o,n=null;try{if(e instanceof Blob)n=URL.createObjectURL(e),o=n;else if(e instanceof ArrayBuffer){const r=new Blob([e]);n=URL.createObjectURL(r),o=n}else o=e;this.currentBlobUrl=n,await this.wavesurfer.load(o)}catch(r){throw this.cleanupPreviousUrl(),r}}async play(){if(!this.wavesurfer)throw new Error("WaveSurfer not initialized");await this.wavesurfer.play()}pause(){this.wavesurfer&&this.wavesurfer.pause()}getDuration(){return this.wavesurfer?this.wavesurfer.getDuration()*1e3:0}getCurrentTime(){return this.wavesurfer?this.wavesurfer.getCurrentTime()*1e3:0}getIsPlaying(){return this.isPlaying}seekToStart(){this.wavesurfer&&this.wavesurfer.seekTo(0)}cleanupPreviousUrl(){this.currentBlobUrl&&(URL.revokeObjectURL(this.currentBlobUrl),this.currentBlobUrl=null)}destroy(){this.pause(),this.cleanupPreviousUrl(),this.wavesurfer&&(this.teardownEventListeners(),this.wavesurfer.empty(),this.wavesurfer=null),this.events={},this.isPlaying=!1,this.handleTimeUpdate=void 0,this.handlePause=void 0,this.handlePlay=void 0,this.handleFinish=void 0,this.handleReady=void 0,this.handleError=void 0}teardownEventListeners(){this.wavesurfer&&(this.handleTimeUpdate&&(this.wavesurfer.un("timeupdate",this.handleTimeUpdate),this.handleTimeUpdate=void 0),this.handlePause&&(this.wavesurfer.un("pause",this.handlePause),this.handlePause=void 0),this.handlePlay&&(this.wavesurfer.un("play",this.handlePlay),this.handlePlay=void 0),this.handleFinish&&(this.wavesurfer.un("finish",this.handleFinish),this.handleFinish=void 0),this.handleReady&&(this.wavesurfer.un("ready",this.handleReady),this.handleReady=void 0),this.handleError&&(this.wavesurfer.un("error",this.handleError),this.handleError=void 0))}}function W(l){return l.name==="NotAllowedError"||l.name==="PermissionDeniedError"||l.message?.toLowerCase().includes("permission denied")}class Q{constructor(e={}){this.wavesurfer=null,this.recordPlugin=null,this.isRecording=!1,this.recordEndResolve=null,this.recordEndReject=null,this.events={},this.options=e}initialize(e,o){this.wavesurfer=e;try{const n={renderRecordedAudio:!1,mimeType:"audio/webm"};this.recordPlugin=e.registerPlugin(o.create(n)),this.setupEventListeners()}catch(n){const r=n instanceof Error?n:new Error(String(n));throw W(r)?(this.events.onPermissionDenied?.(),new Error("Microphone permission denied")):(this.events.onError?.(r),r)}}setupEventListeners(){this.recordPlugin&&(this.recordPlugin.on("record-start",()=>{this.isRecording=!0,this.events.onRecordStart?.()}),this.recordPlugin.on("record-end",e=>{this.isRecording=!1,this.events.onRecordEnd?.(e),this.recordEndResolve&&e&&e.size>0?(this.recordEndResolve(e),this.recordEndResolve=null,this.recordEndReject=null):this.recordEndReject?(this.recordEndReject(new Error("Invalid or empty recording")),this.recordEndResolve=null,this.recordEndReject=null):(this.recordEndResolve=null,this.recordEndReject=null)}),this.recordPlugin.on("record-progress",e=>{this.events.onRecordProgress?.(e)}))}setEventHandlers(e){this.events=e}async startRecording(){if(!this.recordPlugin)throw new Error("Record plugin not initialized");if(this.isRecording)return;const e=typeof this.options.sampleRate=="number"?this.options.sampleRate:void 0,o={};e!==void 0&&(o.sampleRate={ideal:e}),await this.startRecordingWithConstraints(o,e!==void 0)}async startRecordingWithConstraints(e,o){if(!this.recordPlugin)throw new Error("Record plugin not initialized");try{const n=Object.keys(e).length?e:void 0;await this.recordPlugin.startRecording(n)}catch(n){const r=n instanceof Error?n:new Error(String(n));if(W(r))throw this.events.onPermissionDenied?.(),new Error("Microphone permission denied");if(o&&(r.name==="OverconstrainedError"||r.name==="NotReadableError")){this.options.sampleRate=void 0,await this.startRecordingWithConstraints({},!1);return}throw this.events.onError?.(r),r}}async stopRecording(){if(!this.recordPlugin||!this.isRecording)throw new Error("Not currently recording");try{return new Promise((e,o)=>{this.recordEndResolve=e,this.recordEndReject=o,this.recordPlugin?.stopRecording()})}catch(e){const o=e instanceof Error?e:new Error(String(e));throw this.events.onError?.(o),o}}cancelRecording(){this.recordPlugin&&this.isRecording&&(this.recordPlugin.stopRecording(),this.isRecording=!1,this.recordEndResolve=null,this.recordEndReject=null)}destroy(){this.cancelRecording(),this.recordPlugin&&(this.recordPlugin.destroy(),this.recordPlugin=null),this.wavesurfer=null,this.events={}}}const X=4,Y=4,ee=8,re=0,te=16e3;function se({containerRef:l,sampleRate:e,events:o,waveformPadding:n=0}){const r=Z(),[d,s]=i.useState("idle"),[p,h]=i.useState(null),[m,c]=i.useState(!1),u=i.useRef(null),y=i.useRef(null),a=i.useRef(null),f=i.useRef(o),S=i.useRef(!1),D=i.useRef(!1),E=i.useRef(new Set),P=i.useRef(!1),b=e===void 0?te:e,A=i.useCallback(()=>{E.current.clear(),c(!1),y.current&&(y.current.destroy(),y.current=null),a.current&&(a.current.destroy(),a.current=null),u.current&&(u.current.destroy(),u.current=null),S.current=!1,P.current=!1,s("idle"),h(null)},[]),x=i.useCallback(()=>{const t=Array.from(E.current);E.current.clear(),t.forEach(w=>{w.resolve()})},[]),_=i.useCallback(t=>{c(!1);const w=Array.from(E.current);E.current.clear(),w.forEach(v=>{v.reject(t)})},[]),T=i.useCallback(t=>{const w={onPlay:()=>{c(!0),f.current.onPlaybackPlay?.()},onPause:()=>{c(!1),f.current.onPlaybackPause?.()},onFinish:()=>{c(!1),f.current.onPlaybackFinish?.()},onReady:()=>{x()},onError:v=>{c(!1),_(v),f.current.onError?.(v)}};t.setEventHandlers(w)},[x,_]);i.useEffect(()=>{f.current=o,a.current&&T(a.current)},[o,T]);const U=i.useCallback(async()=>{if(!(S.current||D.current||!l.current)){D.current=!0;try{const[t,w]=await Promise.all([M(()=>import("./wavesurfer.esm.vI8Eid4k.js"),[],import.meta.url),M(()=>import("./record.B-tDciZb.js"),[],import.meta.url)]),v=t.default,B=w.default,k=v.create({container:l.current,waveColor:r.colors.primary,progressColor:r.colors.bodyText,height:n>0?$(r.sizes.largestElementHeight)-2*n:"auto",barWidth:X,barGap:Y,barRadius:ee,cursorWidth:re,interact:!0});u.current=k,P.current=!1;const C=new Q({sampleRate:b});C.initialize(k,B),C.setEventHandlers({onRecordProgress:g=>{f.current.onProgressMs?.(g)},onPermissionDenied:()=>{f.current.onPermissionDenied(),s("idle")},onError:g=>{f.current.onError(g),s("idle")}}),y.current=C;const R=new O;R.initialize(k),a.current=R,T(R),S.current=!0}catch(t){const w=t instanceof Error?t:new Error(String(t));f.current.onError?.(w)}finally{D.current=!1}}},[l,r,b,T,n]);i.useEffect(()=>(U(),()=>{A()}),[A,U]),i.useEffect(()=>{const t=u.current;if(t){if(d==="recording"){t.setOptions({waveColor:r.colors.primary,progressColor:r.colors.primary});return}if(P.current){t.setOptions({interact:!0,waveColor:I(r.colors.fadedText40,r.colors.secondaryBg),progressColor:r.colors.bodyText});return}t.setOptions({waveColor:r.colors.primary,progressColor:r.colors.bodyText})}},[d,r.colors.bodyText,r.colors.fadedText40,r.colors.primary,r.colors.secondaryBg]);const F=i.useCallback(async()=>{if(d!=="recording"){if(S.current||await U(),!y.current)throw new Error("Record backend not initialized");u.current&&u.current.setOptions({waveColor:r.colors.primary,progressColor:r.colors.primary}),P.current=!1,await y.current.startRecording(),s("recording"),h(null),c(!1),f.current.onRecordStart?.()}},[d,U,r.colors.primary]),L=i.useCallback(()=>{a.current&&u.current&&(a.current.destroy(),a.current=new O,a.current.initialize(u.current),E.current.clear(),c(!1),T(a.current)),P.current=!1},[T]),z=i.useCallback(()=>{a.current?.seekToStart(),c(!1),P.current=!0,u.current&&u.current.setOptions({interact:!0,waveColor:I(r.colors.fadedText40,r.colors.secondaryBg),progressColor:r.colors.bodyText})},[r.colors.bodyText,r.colors.fadedText40,r.colors.secondaryBg]),H=i.useCallback(async()=>{if(d!=="recording")throw new Error("Not currently recording");if(!y.current||!a.current)throw new Error("Backends not initialized");try{const t=await y.current.stopRecording();h(t),await new Promise((k,C)=>{if(!a.current){C(new Error("Player not initialized"));return}const R={resolve:()=>{E.current.delete(R),k()},reject:g=>{E.current.delete(R),C(g)}};E.current.add(R),a.current.load(t).catch(g=>{E.current.delete(R),C(g instanceof Error?g:new Error(String(g)))})}),s("idle"),c(!1),z();const v={durationMs:a.current?.getDuration()??0,sampleRate:typeof b=="number"?b:null,mimeType:t.type||"audio/webm",size:t.size},B={blob:t,meta:v};return f.current.onRecordReady?.(t),B}catch(t){const w=t instanceof Error?t:new Error(String(t));return c(!1),s("idle"),f.current.onError(w),{blob:new Blob,meta:{durationMs:0,sampleRate:null,mimeType:"audio/webm",size:0}}}},[d,z,b]),j=i.useCallback(async t=>{const w=t??p;if(!w){const v=new Error("No recorded audio to approve");f.current.onError(v);return}try{const v=await q(w,b);await f.current.onApprove?.(v),h(null),s("idle")}catch(v){const B=v instanceof Error?v:new Error(String(v));f.current.onError(B)}},[p,b]),N=i.useCallback(()=>{d==="recording"&&y.current?.cancelRecording(),L(),h(null),s("idle"),c(!1),P.current=!1,f.current.onCancel?.()},[d,L]),V=i.useMemo(()=>({isPlaying:()=>a.current?.getIsPlaying()??!1,play:async()=>{if(!a.current)throw new Error("Player not initialized");await a.current.play()},pause:()=>{a.current?.pause()},load:async t=>{if(S.current||await U(),!a.current)throw new Error("Player not initialized");await a.current.load(t),z()},getCurrentTimeMs:()=>a.current?.getCurrentTime()??0,getDurationMs:()=>a.current?.getDuration()??0}),[z,U]),G=i.useCallback(t=>{f.current=t},[]);return i.useEffect(()=>()=>{A()},[A]),{state:d,isPlaybackPlaying:m,mountRef:l,start:F,stop:H,approve:j,cancel:N,destroy:A,playback:V,setEventHandlers:G}}export{se as u};
1
+ import{g as Z,r as i,aL as M,aI as $,aM as I}from"./index.3bHSf9gi.js";async function q(l,e=16e3){if(!l||l.size===0)throw new Error("Invalid or empty blob provided");if(!window.AudioContext)throw new Error("AudioContext not supported in this browser");const o=new AudioContext;try{const n=await l.arrayBuffer(),r=await o.decodeAudioData(n),d=e??r.sampleRate,s=await J(r,d);return K(s,d)}finally{o.close()}}async function J(l,e){const{duration:o,numberOfChannels:n,sampleRate:r}=l,d=Math.ceil(o*e);if(!window.OfflineAudioContext)throw new Error("OfflineAudioContext not supported");const s=new OfflineAudioContext(1,d,e),p=s.createBufferSource();if(p.buffer=l,n>1){const h=s.createChannelSplitter(n),m=s.createChannelMerger(1);p.connect(h);for(let c=0;c<n;c++){const u=s.createGain();u.gain.value=1/n,h.connect(u,c),u.connect(m,0,0)}m.connect(s.destination)}else p.connect(s.destination);p.start(0);try{return await s.startRendering()}catch(h){throw new Error(`Failed to resample audio from ${r}Hz to ${e}Hz: ${h instanceof Error?h.message:String(h)}`)}}function K(l,e){const n=l.length,r=n*2+44,d=new ArrayBuffer(r),s=new DataView(d),p=l.getChannelData(0),h=(c,u)=>{for(let y=0;y<u.length;y++)s.setUint8(c+y,u.charCodeAt(y))};h(0,"RIFF"),s.setUint32(4,r-8,!0),h(8,"WAVE"),h(12,"fmt "),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,e,!0),s.setUint32(28,e*2,!0),s.setUint16(32,2,!0),s.setUint16(34,16,!0),h(36,"data"),s.setUint32(40,n*2,!0);let m=44;for(let c=0;c<n;c++){const u=Math.max(-1,Math.min(1,p[c]));s.setInt16(m,u*32767,!0),m+=2}return new Blob([d],{type:"audio/wav"})}class O{constructor(){this.wavesurfer=null,this.currentBlobUrl=null,this.events={},this.isPlaying=!1}initialize(e){this.wavesurfer=e,this.setupEventListeners()}setupEventListeners(){this.wavesurfer&&(this.teardownEventListeners(),this.handleTimeUpdate=e=>{this.events.onTimeUpdate?.(e*1e3)},this.handlePause=()=>{this.isPlaying=!1,this.events.onPause?.()},this.handlePlay=()=>{this.isPlaying=!0,this.events.onPlay?.()},this.handleFinish=()=>{this.isPlaying=!1,this.events.onFinish?.()},this.handleReady=()=>{this.events.onReady?.()},this.handleError=e=>{const o=e instanceof Error?e:new Error(String(e));this.events.onError?.(o)},this.wavesurfer.on("timeupdate",this.handleTimeUpdate),this.wavesurfer.on("pause",this.handlePause),this.wavesurfer.on("play",this.handlePlay),this.wavesurfer.on("finish",this.handleFinish),this.wavesurfer.on("ready",this.handleReady),this.wavesurfer.on("error",this.handleError))}setEventHandlers(e){this.events=e}async load(e){if(!this.wavesurfer)throw new Error("WaveSurfer not initialized");this.cleanupPreviousUrl();let o,n=null;try{if(e instanceof Blob)n=URL.createObjectURL(e),o=n;else if(e instanceof ArrayBuffer){const r=new Blob([e]);n=URL.createObjectURL(r),o=n}else o=e;this.currentBlobUrl=n,await this.wavesurfer.load(o)}catch(r){throw this.cleanupPreviousUrl(),r}}async play(){if(!this.wavesurfer)throw new Error("WaveSurfer not initialized");await this.wavesurfer.play()}pause(){this.wavesurfer&&this.wavesurfer.pause()}getDuration(){return this.wavesurfer?this.wavesurfer.getDuration()*1e3:0}getCurrentTime(){return this.wavesurfer?this.wavesurfer.getCurrentTime()*1e3:0}getIsPlaying(){return this.isPlaying}seekToStart(){this.wavesurfer&&this.wavesurfer.seekTo(0)}cleanupPreviousUrl(){this.currentBlobUrl&&(URL.revokeObjectURL(this.currentBlobUrl),this.currentBlobUrl=null)}destroy(){this.pause(),this.cleanupPreviousUrl(),this.wavesurfer&&(this.teardownEventListeners(),this.wavesurfer.empty(),this.wavesurfer=null),this.events={},this.isPlaying=!1,this.handleTimeUpdate=void 0,this.handlePause=void 0,this.handlePlay=void 0,this.handleFinish=void 0,this.handleReady=void 0,this.handleError=void 0}teardownEventListeners(){this.wavesurfer&&(this.handleTimeUpdate&&(this.wavesurfer.un("timeupdate",this.handleTimeUpdate),this.handleTimeUpdate=void 0),this.handlePause&&(this.wavesurfer.un("pause",this.handlePause),this.handlePause=void 0),this.handlePlay&&(this.wavesurfer.un("play",this.handlePlay),this.handlePlay=void 0),this.handleFinish&&(this.wavesurfer.un("finish",this.handleFinish),this.handleFinish=void 0),this.handleReady&&(this.wavesurfer.un("ready",this.handleReady),this.handleReady=void 0),this.handleError&&(this.wavesurfer.un("error",this.handleError),this.handleError=void 0))}}function W(l){return l.name==="NotAllowedError"||l.name==="PermissionDeniedError"||l.message?.toLowerCase().includes("permission denied")}class Q{constructor(e={}){this.wavesurfer=null,this.recordPlugin=null,this.isRecording=!1,this.recordEndResolve=null,this.recordEndReject=null,this.events={},this.options=e}initialize(e,o){this.wavesurfer=e;try{const n={renderRecordedAudio:!1,mimeType:"audio/webm"};this.recordPlugin=e.registerPlugin(o.create(n)),this.setupEventListeners()}catch(n){const r=n instanceof Error?n:new Error(String(n));throw W(r)?(this.events.onPermissionDenied?.(),new Error("Microphone permission denied")):(this.events.onError?.(r),r)}}setupEventListeners(){this.recordPlugin&&(this.recordPlugin.on("record-start",()=>{this.isRecording=!0,this.events.onRecordStart?.()}),this.recordPlugin.on("record-end",e=>{this.isRecording=!1,this.events.onRecordEnd?.(e),this.recordEndResolve&&e&&e.size>0?(this.recordEndResolve(e),this.recordEndResolve=null,this.recordEndReject=null):this.recordEndReject?(this.recordEndReject(new Error("Invalid or empty recording")),this.recordEndResolve=null,this.recordEndReject=null):(this.recordEndResolve=null,this.recordEndReject=null)}),this.recordPlugin.on("record-progress",e=>{this.events.onRecordProgress?.(e)}))}setEventHandlers(e){this.events=e}async startRecording(){if(!this.recordPlugin)throw new Error("Record plugin not initialized");if(this.isRecording)return;const e=typeof this.options.sampleRate=="number"?this.options.sampleRate:void 0,o={};e!==void 0&&(o.sampleRate={ideal:e}),await this.startRecordingWithConstraints(o,e!==void 0)}async startRecordingWithConstraints(e,o){if(!this.recordPlugin)throw new Error("Record plugin not initialized");try{const n=Object.keys(e).length?e:void 0;await this.recordPlugin.startRecording(n)}catch(n){const r=n instanceof Error?n:new Error(String(n));if(W(r))throw this.events.onPermissionDenied?.(),new Error("Microphone permission denied");if(o&&(r.name==="OverconstrainedError"||r.name==="NotReadableError")){this.options.sampleRate=void 0,await this.startRecordingWithConstraints({},!1);return}throw this.events.onError?.(r),r}}async stopRecording(){if(!this.recordPlugin||!this.isRecording)throw new Error("Not currently recording");try{return new Promise((e,o)=>{this.recordEndResolve=e,this.recordEndReject=o,this.recordPlugin?.stopRecording()})}catch(e){const o=e instanceof Error?e:new Error(String(e));throw this.events.onError?.(o),o}}cancelRecording(){this.recordPlugin&&this.isRecording&&(this.recordPlugin.stopRecording(),this.isRecording=!1,this.recordEndResolve=null,this.recordEndReject=null)}destroy(){this.cancelRecording(),this.recordPlugin&&(this.recordPlugin.destroy(),this.recordPlugin=null),this.wavesurfer=null,this.events={}}}const X=4,Y=4,ee=8,re=0,te=16e3;function se({containerRef:l,sampleRate:e,events:o,waveformPadding:n=0}){const r=Z(),[d,s]=i.useState("idle"),[p,h]=i.useState(null),[m,c]=i.useState(!1),u=i.useRef(null),y=i.useRef(null),a=i.useRef(null),f=i.useRef(o),S=i.useRef(!1),D=i.useRef(!1),E=i.useRef(new Set),P=i.useRef(!1),b=e===void 0?te:e,A=i.useCallback(()=>{E.current.clear(),c(!1),y.current&&(y.current.destroy(),y.current=null),a.current&&(a.current.destroy(),a.current=null),u.current&&(u.current.destroy(),u.current=null),S.current=!1,P.current=!1,s("idle"),h(null)},[]),x=i.useCallback(()=>{const t=Array.from(E.current);E.current.clear(),t.forEach(w=>{w.resolve()})},[]),_=i.useCallback(t=>{c(!1);const w=Array.from(E.current);E.current.clear(),w.forEach(v=>{v.reject(t)})},[]),T=i.useCallback(t=>{const w={onPlay:()=>{c(!0),f.current.onPlaybackPlay?.()},onPause:()=>{c(!1),f.current.onPlaybackPause?.()},onFinish:()=>{c(!1),f.current.onPlaybackFinish?.()},onReady:()=>{x()},onError:v=>{c(!1),_(v),f.current.onError?.(v)}};t.setEventHandlers(w)},[x,_]);i.useEffect(()=>{f.current=o,a.current&&T(a.current)},[o,T]);const U=i.useCallback(async()=>{if(!(S.current||D.current||!l.current)){D.current=!0;try{const[t,w]=await Promise.all([M(()=>import("./wavesurfer.esm.vI8Eid4k.js"),[],import.meta.url),M(()=>import("./record.B-tDciZb.js"),[],import.meta.url)]),v=t.default,B=w.default,k=v.create({container:l.current,waveColor:r.colors.primary,progressColor:r.colors.bodyText,height:n>0?$(r.sizes.largestElementHeight)-2*n:"auto",barWidth:X,barGap:Y,barRadius:ee,cursorWidth:re,interact:!0});u.current=k,P.current=!1;const C=new Q({sampleRate:b});C.initialize(k,B),C.setEventHandlers({onRecordProgress:g=>{f.current.onProgressMs?.(g)},onPermissionDenied:()=>{f.current.onPermissionDenied(),s("idle")},onError:g=>{f.current.onError(g),s("idle")}}),y.current=C;const R=new O;R.initialize(k),a.current=R,T(R),S.current=!0}catch(t){const w=t instanceof Error?t:new Error(String(t));f.current.onError?.(w)}finally{D.current=!1}}},[l,r,b,T,n]);i.useEffect(()=>(U(),()=>{A()}),[A,U]),i.useEffect(()=>{const t=u.current;if(t){if(d==="recording"){t.setOptions({waveColor:r.colors.primary,progressColor:r.colors.primary});return}if(P.current){t.setOptions({interact:!0,waveColor:I(r.colors.fadedText40,r.colors.secondaryBg),progressColor:r.colors.bodyText});return}t.setOptions({waveColor:r.colors.primary,progressColor:r.colors.bodyText})}},[d,r.colors.bodyText,r.colors.fadedText40,r.colors.primary,r.colors.secondaryBg]);const F=i.useCallback(async()=>{if(d!=="recording"){if(S.current||await U(),!y.current)throw new Error("Record backend not initialized");u.current&&u.current.setOptions({waveColor:r.colors.primary,progressColor:r.colors.primary}),P.current=!1,await y.current.startRecording(),s("recording"),h(null),c(!1),f.current.onRecordStart?.()}},[d,U,r.colors.primary]),L=i.useCallback(()=>{a.current&&u.current&&(a.current.destroy(),a.current=new O,a.current.initialize(u.current),E.current.clear(),c(!1),T(a.current)),P.current=!1},[T]),z=i.useCallback(()=>{a.current?.seekToStart(),c(!1),P.current=!0,u.current&&u.current.setOptions({interact:!0,waveColor:I(r.colors.fadedText40,r.colors.secondaryBg),progressColor:r.colors.bodyText})},[r.colors.bodyText,r.colors.fadedText40,r.colors.secondaryBg]),H=i.useCallback(async()=>{if(d!=="recording")throw new Error("Not currently recording");if(!y.current||!a.current)throw new Error("Backends not initialized");try{const t=await y.current.stopRecording();h(t),await new Promise((k,C)=>{if(!a.current){C(new Error("Player not initialized"));return}const R={resolve:()=>{E.current.delete(R),k()},reject:g=>{E.current.delete(R),C(g)}};E.current.add(R),a.current.load(t).catch(g=>{E.current.delete(R),C(g instanceof Error?g:new Error(String(g)))})}),s("idle"),c(!1),z();const v={durationMs:a.current?.getDuration()??0,sampleRate:typeof b=="number"?b:null,mimeType:t.type||"audio/webm",size:t.size},B={blob:t,meta:v};return f.current.onRecordReady?.(t),B}catch(t){const w=t instanceof Error?t:new Error(String(t));return c(!1),s("idle"),f.current.onError(w),{blob:new Blob,meta:{durationMs:0,sampleRate:null,mimeType:"audio/webm",size:0}}}},[d,z,b]),j=i.useCallback(async t=>{const w=t??p;if(!w){const v=new Error("No recorded audio to approve");f.current.onError(v);return}try{const v=await q(w,b);await f.current.onApprove?.(v),h(null),s("idle")}catch(v){const B=v instanceof Error?v:new Error(String(v));f.current.onError(B)}},[p,b]),N=i.useCallback(()=>{d==="recording"&&y.current?.cancelRecording(),L(),h(null),s("idle"),c(!1),P.current=!1,f.current.onCancel?.()},[d,L]),V=i.useMemo(()=>({isPlaying:()=>a.current?.getIsPlaying()??!1,play:async()=>{if(!a.current)throw new Error("Player not initialized");await a.current.play()},pause:()=>{a.current?.pause()},load:async t=>{if(S.current||await U(),!a.current)throw new Error("Player not initialized");await a.current.load(t),z()},getCurrentTimeMs:()=>a.current?.getCurrentTime()??0,getDurationMs:()=>a.current?.getDuration()??0}),[z,U]),G=i.useCallback(t=>{f.current=t},[]);return i.useEffect(()=>()=>{A()},[A]),{state:d,isPlaybackPlaying:m,mountRef:l,start:F,stop:H,approve:j,cancel:N,destroy:A,playback:V,setEventHandlers:G}}export{se as u};
@@ -1 +1 @@
1
- import{h as l,f as h,j as s,d as n}from"./index.CqTPbV5Y.js";const o=t=>{const a=e=>{const{width:i,elementRef:c}=h();return s(n,{ref:c,children:s(t,{...e,width:i})})};return a.displayName=`withCalculatedWidth(${t.displayName||t.name})`,l(a,t)};export{o as w};
1
+ import{h as l,f as h,j as s,d as n}from"./index.3bHSf9gi.js";const o=t=>{const a=e=>{const{width:i,elementRef:c}=h();return s(n,{ref:c,children:s(t,{...e,width:i})})};return a.displayName=`withCalculatedWidth(${t.displayName||t.name})`,l(a,t)};export{o as w};
@@ -1 +1 @@
1
- import{r as n,x as m,b0 as p,b1 as h,g as x,f as y,j as i,h as g}from"./index.CqTPbV5Y.js";const f=n.createContext(null);f.displayName="ElementFullscreenContext";const w=m("div",{target:"e13s7uld0"})(({theme:e,isExpanded:t})=>({width:"100%",height:"100%",...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:e.colors.bgColor,zIndex:e.zIndices.fullscreenWrapper,padding:e.spacing.md,paddingTop:e.sizes.fullScreenHeaderHeight,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"}:{}})),C=()=>{const{setFullScreen:e}=n.useContext(p),[t,s]=n.useState(!1),{fullHeight:a,fullWidth:c}=h(),l=n.useCallback(r=>{s(r),e(r)},[e]),u=n.useCallback(()=>{document.body.style.overflow="hidden",l(!0)},[l]),o=n.useCallback(()=>{document.body.style.overflow="unset",l(!1)},[l]),d=n.useCallback(r=>{r.keyCode===27&&t&&o()},[o,t]);return n.useEffect(()=>(document.addEventListener("keydown",d,!1),()=>{document.removeEventListener("keydown",d,!1)}),[d]),n.useMemo(()=>({expanded:t,zoomIn:u,zoomOut:o,fullHeight:a,fullWidth:c}),[t,u,o,a,c])},F=({children:e})=>{const t=x(),{expanded:s,fullHeight:a,fullWidth:c,zoomIn:l,zoomOut:u}=C(),{width:o,elementRef:d}=y(),r=n.useMemo(()=>({width:s?c:o,height:s?a:void 0,expanded:s,expand:l,collapse:u}),[s,a,c,o,l,u]);return i(f.Provider,{value:r,children:i(w,{ref:d,isExpanded:s,"data-testid":"stFullScreenFrame",theme:t,children:e})})};function b(e){const t=s=>i(F,{children:i(e,{...s})});return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,g(t,e)}export{f as E,b as w};
1
+ import{r as n,x as m,b0 as p,b1 as h,g as x,f as y,j as i,h as g}from"./index.3bHSf9gi.js";const f=n.createContext(null);f.displayName="ElementFullscreenContext";const w=m("div",{target:"e13s7uld0"})(({theme:e,isExpanded:t})=>({width:"100%",height:"100%",...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:e.colors.bgColor,zIndex:e.zIndices.fullscreenWrapper,padding:e.spacing.md,paddingTop:e.sizes.fullScreenHeaderHeight,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"}:{}})),C=()=>{const{setFullScreen:e}=n.useContext(p),[t,s]=n.useState(!1),{fullHeight:a,fullWidth:c}=h(),l=n.useCallback(r=>{s(r),e(r)},[e]),u=n.useCallback(()=>{document.body.style.overflow="hidden",l(!0)},[l]),o=n.useCallback(()=>{document.body.style.overflow="unset",l(!1)},[l]),d=n.useCallback(r=>{r.keyCode===27&&t&&o()},[o,t]);return n.useEffect(()=>(document.addEventListener("keydown",d,!1),()=>{document.removeEventListener("keydown",d,!1)}),[d]),n.useMemo(()=>({expanded:t,zoomIn:u,zoomOut:o,fullHeight:a,fullWidth:c}),[t,u,o,a,c])},F=({children:e})=>{const t=x(),{expanded:s,fullHeight:a,fullWidth:c,zoomIn:l,zoomOut:u}=C(),{width:o,elementRef:d}=y(),r=n.useMemo(()=>({width:s?c:o,height:s?a:void 0,expanded:s,expand:l,collapse:u}),[s,a,c,o,l,u]);return i(f.Provider,{value:r,children:i(w,{ref:d,isExpanded:s,"data-testid":"stFullScreenFrame",theme:t,children:e})})};function b(e){const t=s=>i(F,{children:i(e,{...s})});return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,g(t,e)}export{f as E,b as w};
@@ -14,6 +14,7 @@
14
14
 
15
15
  from __future__ import annotations
16
16
 
17
+ import json
17
18
  from typing import TYPE_CHECKING, Any
18
19
 
19
20
  from authlib.integrations.base_client import (
@@ -29,6 +30,65 @@ if TYPE_CHECKING:
29
30
 
30
31
 
31
32
  class TornadoIntegration(FrameworkIntegration):
33
+ """Authlib framework integration for Tornado.
34
+
35
+ Authlib always tracks state in sessions (post 1.6.6+), but Tornado doesn't have persistent
36
+ sessions like Flask/Django, so we override the state data methods to use only the cache.
37
+ This is compatible with both older authlib versions and authlib 1.6.6+.
38
+ """
39
+
40
+ def _get_cache_data(self, key: str) -> dict[str, Any] | None:
41
+ """Get and decode JSON data from cache.
42
+
43
+ This reimplements the cache data retrieval logic directly rather than
44
+ relying on authlib's private _get_cache_data method, ensuring stability
45
+ across authlib versions.
46
+ """
47
+ value = self.cache.get(key)
48
+ if not value:
49
+ return None
50
+ try:
51
+ result = json.loads(value)
52
+ if isinstance(result, dict):
53
+ return result
54
+ return None
55
+ except (TypeError, ValueError):
56
+ return None
57
+
58
+ def get_state_data(
59
+ self,
60
+ session: dict[str, Any], # noqa: ARG002
61
+ state: str,
62
+ ) -> dict[str, Any] | None:
63
+ """Get OAuth state data from cache.
64
+
65
+ Overridden to use cache directly without requiring session persistence,
66
+ since Tornado doesn't have persistent sessions across requests.
67
+ The session parameter is unused but required by the parent class signature.
68
+ """
69
+ if not self.cache:
70
+ return None
71
+ key = f"_state_{self.name}_{state}"
72
+ cached_value = self._get_cache_data(key)
73
+ if cached_value:
74
+ return cached_value.get("data")
75
+ return None
76
+
77
+ def clear_state_data(
78
+ self,
79
+ session: dict[str, Any], # noqa: ARG002
80
+ state: str,
81
+ ) -> None:
82
+ """Clear OAuth state data from cache.
83
+
84
+ Overridden to use cache directly without requiring session persistence,
85
+ since Tornado doesn't have persistent sessions across requests.
86
+ The session parameter is unused but required by the parent class signature.
87
+ """
88
+ if self.cache:
89
+ key = f"_state_{self.name}_{state}"
90
+ self.cache.delete(key)
91
+
32
92
  def update_token(
33
93
  self,
34
94
  token: dict[str, Any],
@@ -83,11 +83,20 @@ class TornadoOAuth2App(OAuth2Mixin, OpenIDMixin, BaseApp):
83
83
  "state": request_handler.get_argument("state"),
84
84
  }
85
85
 
86
- session = None
86
+ # Authlib 1.6.6+ always writes state to session even when cache is available.
87
+ # We also override state access to use the cache instead of session in `TornadoIntegration`.
88
+ session: dict[str, Any] = {}
87
89
 
88
90
  claims_options = kwargs.pop("claims_options", None)
89
91
  state_data = self.framework.get_state_data(session, params.get("state"))
90
92
  self.framework.clear_state_data(session, params.get("state"))
93
+
94
+ if not state_data:
95
+ raise OAuthError(
96
+ error="invalid_state",
97
+ description="OAuth state not found or expired. Please try logging in again.",
98
+ )
99
+
91
100
  params = self._format_state_params(state_data, params) # type: ignore[attr-defined]
92
101
  token = self.fetch_access_token(**params, **kwargs)
93
102
 
@@ -100,11 +109,13 @@ class TornadoOAuth2App(OAuth2Mixin, OpenIDMixin, BaseApp):
100
109
 
101
110
  def _save_authorize_data(self, **kwargs: Any) -> None:
102
111
  """Authlib underlying uses the concept of "session" to store state data.
103
- In Tornado, we don't have a session, so we use the framework's cache option.
112
+ In Tornado, we don't have a session, so we use an empty dict as a placeholder.
113
+ We also override state access to use the cache instead of session in `TornadoIntegration`.
114
+ Authlib 1.6.6+ always writes state to session even when cache is available.
104
115
  """
105
116
  state = kwargs.pop("state", None)
106
117
  if state:
107
- session = None
118
+ session: dict[str, Any] = {}
108
119
  self.framework.set_state_data(session, state, kwargs)
109
120
  else:
110
121
  raise RuntimeError("Missing state value")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamlit
3
- Version: 1.52.1
3
+ Version: 1.52.2
4
4
  Summary: A faster way to build and share data apps
5
5
  Home-page: https://streamlit.io
6
6
  Author: Snowflake Inc
@@ -134,7 +134,7 @@ streamlit/elements/widgets/camera_input.py,sha256=eqbKk2ddzenhYQVCO58vecuHjb1X_T
134
134
  streamlit/elements/widgets/chat.py,sha256=-rimUxWORUaL6vFJkGAkqgTw75fCzSTU7KEAbdTtA1E,38599
135
135
  streamlit/elements/widgets/checkbox.py,sha256=y-JxK_13taW1NQfWfTycTocpD11Ww8Fd4etHNv9SehQ,13996
136
136
  streamlit/elements/widgets/color_picker.py,sha256=q1BUL-3jYkyu4GpBaildsfb-V3v68y9qdT7apIuWhQQ,10028
137
- streamlit/elements/widgets/data_editor.py,sha256=nvp2D_Pxrwd3lt3T4KSOvNoF1pBSsR5rY7Pyb2VJJvw,44009
137
+ streamlit/elements/widgets/data_editor.py,sha256=dvD8FXyyZ-gC-_ULzG86WUzMOlUP_nWTBtdTReKKDz8,44341
138
138
  streamlit/elements/widgets/file_uploader.py,sha256=5OshpgSGcOwfOi7DOvLUcwSGRTnwgxO3r0tStH66vKw,21218
139
139
  streamlit/elements/widgets/multiselect.py,sha256=H-vpAG_GMqqqfO7zR217PIcsIx6vnwW6AisqcOYcrCA,21083
140
140
  streamlit/elements/widgets/number_input.py,sha256=pBx5o6P76I6x1QfXzcLUbI1FysjIjVFprLu50LDTwgU,25195
@@ -394,111 +394,111 @@ streamlit/runtime/state/session_state.py,sha256=-rjx26R3xMr9BM0iGWlHVSVKhnaKOxke
394
394
  streamlit/runtime/state/session_state_proxy.py,sha256=Z_Hw4214J1l7SjrnrFnCwul7p32yaKK2wpFtrghKEAQ,5585
395
395
  streamlit/runtime/state/widgets.py,sha256=txMNEqJQPyJsSKMN7eCn7DeIhYa7qIOEVkUVXYTFbds,6057
396
396
  streamlit/static/favicon.png,sha256=if5cVgw7azxKOvV5FpGixga7JLn23rfnHcy1CdWI1-E,1019
397
- streamlit/static/index.html,sha256=gf-cGkq5jC32soLLHXRNf1yBKwrtulvDYzZOuOmFfmM,1522
398
- streamlit/static/manifest.json,sha256=e_87oMY62yNKLSoh3YDCuoYxmmq024A8CxAOdGvY-8s,53101
397
+ streamlit/static/index.html,sha256=cIFCHdBrz8kUJLStdR4-QNrNnkz9UTTVWbUYYYQu8x8,1522
398
+ streamlit/static/manifest.json,sha256=2v51g8rg7ALWDX6Hf-Z78-oLZdFgLi1tTT_u3O7R2_o,53101
399
399
  streamlit/static/static/css/index.BpABIXK9.css,sha256=H-pl7l6AGJ-cFM_l5k83HNdKud66jD1scyhzmJ4Gp-I,29951
400
400
  streamlit/static/static/css/index.DgR7E2CV.css,sha256=XaAj_mKlhpcUTyfDwggG3Sd2DgaiU4U749jeLKb9FBI,12683
401
401
  streamlit/static/static/css/index.DzuxGC_t.css,sha256=1D1iN9VtJEU7H_zye_YV2guXskYkxI7PXbq1YXw5JOw,35092
402
- streamlit/static/static/js/ErrorOutline.esm.sMJdFExW.js,sha256=86tELO0rMGDhWry0rfgJtYs9zSwA46VQe0MjdywONgk,499
403
- streamlit/static/static/js/FileDownload.esm.CV-WYqBn.js,sha256=Vmu4cm_cR_Ih3VA1eMkrdISA5EITc09NZUaiatGZRuk,918
404
- streamlit/static/static/js/FileHelper.5nCh9KDY.js,sha256=dxqgSgwiLkAbD2o1B6-mZZjdu0ELjUL53VRUfNR_yiQ,61640
405
- streamlit/static/static/js/FormClearHelper.-9RbsnV0.js,sha256=HDBzgOgae8zn5LunQXtybzsxVwGd54kiPToQnUOC5QI,611
402
+ streamlit/static/static/js/ErrorOutline.esm.LtBTGAgi.js,sha256=YQIZwfhz3X-w2rOOkysIoyRbhfkNB2UsH4XCgC915oc,499
403
+ streamlit/static/static/js/FileDownload.esm.DllwCvQc.js,sha256=NqVkoBF1tws7EM7bWOq8xPTQFcFeTdMh2KvfeDCvKd0,918
404
+ streamlit/static/static/js/FileHelper.DgwA_xYF.js,sha256=xE_pm6eqi1AD_EWVhPcZxXQs3o_ASK69Qp5LwBC__nI,61640
405
+ streamlit/static/static/js/FormClearHelper.DyYuMYyM.js,sha256=wOol0n3dlp43XWp6aTHoOLZxuO0vutOsx5x_V-q-fV4,611
406
406
  streamlit/static/static/js/IFrameUtil.DefezniK.js,sha256=vHcPNVM2AZouiO3NiM8fcBjO0JE9niGWSdld1T5AQeQ,564
407
- streamlit/static/static/js/InputInstructions.2R3tBtW9.js,sha256=6AucSuTstcAhTdWQVt_IpQdtcUXLPVRzAk1VLnpt5gs,918
408
- streamlit/static/static/js/Particles.DDHoXFxh.js,sha256=OTgQNAyQHAKKcsSfbPoXWsZqsSKhGcsBxembFqmrIxE,615
409
- streamlit/static/static/js/ProgressBar.BxmfHxKu.js,sha256=w-Y9tG-EjrTex8c1GKDQ34Mtzm7VyL3ewhmJ-RhlokE,13316
410
- streamlit/static/static/js/StreamlitSyntaxHighlighter.BFWV0oqR.js,sha256=oJFR6Pw0I51kFSWm8IBucew_FK-d9cF8aJsy6qKkKfU,1611511
411
- streamlit/static/static/js/Toolbar.DMgU0Vgw.js,sha256=7VZp5ELIOXtgu9CCmPKl0TaUGlwPk8XrfRkUgKoVWSY,2908
407
+ streamlit/static/static/js/InputInstructions.ikAdmYQR.js,sha256=M_EYQ8tI8qX4H8c5Bf9BtZRkxMWS9FhAgg0vSj_HJcg,918
408
+ streamlit/static/static/js/Particles.Cg5ey-rW.js,sha256=5rP2HyvelcQ9bwVCuIzTbpYTRkyAJYmpZjO3kCdNX30,615
409
+ streamlit/static/static/js/ProgressBar.D1rDn4Rn.js,sha256=g57HuoUfCyXXxp4BUpHkNYtXLQV56zEjXelbkenFB2M,13316
410
+ streamlit/static/static/js/StreamlitSyntaxHighlighter.DU42g8NY.js,sha256=iLOozhcbncehB5xvF5l3uvVRAGcW-TzPBuFrCRRFqnc,1611511
411
+ streamlit/static/static/js/Toolbar.0YdWjZhn.js,sha256=w0R8dLURc0UHStDE4EuLSpBVeZh5YTnYq9OJCpeHmRU,2908
412
412
  streamlit/static/static/js/UploadFileInfo.C-jY39rj.js,sha256=Z_hcytEoaAX1saJgsfX1UoComwwlMcjCUZ8ldwuQJI8,151
413
413
  streamlit/static/static/js/_arrayIncludes.B19Iyn2B.js,sha256=JP-DCSLwDMyVDLPMC1_99tqHMMNzTx8SwAT1rVKXIAA,127
414
414
  streamlit/static/static/js/_baseIndexOf.BTknn6Gb.js,sha256=qpBWPWZljEJmX5vLgn6Tup6ZhVl54fGKj7xVTKZ2Ep0,258
415
- streamlit/static/static/js/base-input.BXTqYbyG.js,sha256=wIGXU7ERzl8aF2GXPReNJ34Yztjbl14b1zQWbbOVI54,21771
416
- streamlit/static/static/js/checkbox.5xWaqPqm.js,sha256=4XVPuHd8xMMz7O9idPbMrol6X5uFboEe7q6cztE7Js8,11243
415
+ streamlit/static/static/js/base-input.DYzkAUR7.js,sha256=0HmR9iK6lKdiRGLdLD67ap_2Xhaeq7M5t2vObksxf9Y,21771
416
+ streamlit/static/static/js/checkbox.YeQ8t-PZ.js,sha256=SkwP7Otjiu9aZvLxMWi5dEsHZpUj72J3kc-EJ6MEjsg,11243
417
417
  streamlit/static/static/js/createDownloadLinkElement.ZaXNnPK4.js,sha256=t3JOyJKeD8uMEytlbOaJ7wXS2j4w1YZZeMk2a2-Tyn8,366
418
- streamlit/static/static/js/createSuper.OIgV8wc-.js,sha256=g-ARMk402hFEBQegl52UrkrUJrqVVmZQmY2OPvxDJ0w,389
419
- streamlit/static/static/js/data-grid-overlay-editor.B4RIu9cw.js,sha256=DKXv6oJq_P9iD1yzk_lZREFf9RKYzF-8l5tWjOMyBoQ,4382
420
- streamlit/static/static/js/downloader.DwCJck8O.js,sha256=xthhVkEHk9n2okRmrusGLxyNOrjADvGN05NenveGyFg,2510
421
- streamlit/static/static/js/embed.HKcgTiLB.js,sha256=x0u-FqZC_3dC3qtNuDyfkOqoYbEt-b1Z1TZS0XlgpSQ,831363
422
- streamlit/static/static/js/es6.4AP97RGk.js,sha256=c9p1Lt3zFDz_4BeGnG4wZYyyu1KxdGxjZANQHxpxYdM,14634
423
- streamlit/static/static/js/iframeResizer.contentWindow.BZAsvL9q.js,sha256=Hw96KbuCowExx1IOi0jBFyUvqy_W-5D_DYEEnXPURGU,14407
424
- streamlit/static/static/js/index.-3selq_5.js,sha256=aAlHyqx6DM3c-0Cs73JWkRguAW-3dIH_6hOqXtrNsl8,23217
425
- streamlit/static/static/js/index.1ylynMAS.js,sha256=Y7XEEA1FWaUYrCf2vdXkAlZ8H5uxMKlqVRZKHTkzCLs,1344
426
- streamlit/static/static/js/index.6UunrySF.js,sha256=LS48dAkp_HKd_Ywkvzd3cRg8QnGgl7NSonKOzBlqOKE,4798743
418
+ streamlit/static/static/js/createSuper.CXzRWZIx.js,sha256=76pQJwkrB8j3NSryJ5cPC-09L5nGxZDYaFc2zwhHRek,389
419
+ streamlit/static/static/js/data-grid-overlay-editor.vnwILR0p.js,sha256=35smYTkHpHkWXiah3T_6iPs_icgzX4JHA_Ynv1ZD2lg,4382
420
+ streamlit/static/static/js/downloader.BdNzicWj.js,sha256=x3_S62rIfmlA_2Fq41gutxm8L7FRMixuEyb-JAkgUhM,2510
421
+ streamlit/static/static/js/embed.C_8wI7Q8.js,sha256=GTs5SWPX7cLcIaivAZ8HsOLNzSc_R0587rcOxokU8so,831363
422
+ streamlit/static/static/js/es6.D6UMoOIM.js,sha256=S5qHnQ2GtS7exm7h6CuzwteHEsx0eOI4kyd7BaNM2sg,14634
423
+ streamlit/static/static/js/iframeResizer.contentWindow.DM7vAi8H.js,sha256=dkg_RNkSODfQytheBOiP-OGy2umTygoMwQB7nKH2oA4,14407
424
+ streamlit/static/static/js/index.0CGAg_-3.js,sha256=7LdTwZouX_Quu2awoDk3uwOPG-PEJCarlp8rJIX0dcE,2997
425
+ streamlit/static/static/js/index.19XigCCW.js,sha256=xlTmhfDjmdt6-XaNek-1w9ya5TMU0vBuxu_TwrHLwPM,13715
426
+ streamlit/static/static/js/index.3bHSf9gi.js,sha256=7K5zgwkFgZh4dPNTiPxhJWsFVAnZiqRcDkjIekiJ7iw,2267361
427
427
  streamlit/static/static/js/index.8HslT92O.js,sha256=Ahu9KsYwa_TyEGNbQBWydVmpBAsTcDdi0zdwD-Wf8ME,27051
428
- streamlit/static/static/js/index.B0TPxAZ1.js,sha256=k2Q54HVMc-deIK-9fWLgXQRxUL1rYUduNkIPkrY3slY,2224
429
428
  streamlit/static/static/js/index.B0yp3bM1.js,sha256=4kXtnLYxZdiAX3eD2TnoEExhmItBNt79aFjvFP3pxOU,36273
430
- streamlit/static/static/js/index.BHWBaOWH.js,sha256=ngoEeYljSeAc0mSXmnnupckoTHU2cpo8isXda61sXD4,1115
431
- streamlit/static/static/js/index.BJas6XzW.js,sha256=ezbCG6BswKG0cTyojf_rXVIWHpbRI_L-z7jXMvw8gbw,18462
432
- streamlit/static/static/js/index.BKIlG7Ng.js,sha256=vLkErMeLjfSSV63q-EZvecVzpmkBmjsIRVEvbxp9FR8,828422
433
- streamlit/static/static/js/index.BMU6zZRk.js,sha256=mVXu6KvmFQkksdJwlptBwreb9iGcMhZpu66566cByrQ,2539
434
- streamlit/static/static/js/index.BNMLO-0p.js,sha256=5KebvMXuyr8svWmypl44fQpej2M3ToR-6ScwIQlAltA,190379
435
- streamlit/static/static/js/index.BPmBNTel.js,sha256=QWXklvXYKIRD2kVGXc5gs-HChvzaVjx5twCDe4NFJJU,442
436
- streamlit/static/static/js/index.BVuohWM1.js,sha256=vrv78xNvP51U6I6SVO1rkq3IDow4a2tzbuajUIUVBlI,2504
437
- streamlit/static/static/js/index.B_AvdOKC.js,sha256=I3kepsxCtAultSR1n6y4ECQ-B6PWv_cUqPPkjc0zpqI,1505
438
- streamlit/static/static/js/index.BjQIH-3U.js,sha256=VjK1rPYRSHmp2_6EKPVIkXcmKt3fboDZ27f8pTCRz_8,3899
439
- streamlit/static/static/js/index.BrqtKtSu.js,sha256=xtdXghMQVVj-vEX71pUm3AOmgYw4Tse_viTVFkFWG0c,9146
440
- streamlit/static/static/js/index.Buc7XrOl.js,sha256=YjSP3DynL18m-x1wOm9rxkyTLupwSxV1lOJ381RNYcI,449683
441
- streamlit/static/static/js/index.CIC9pLsG.js,sha256=FMrDxhqp23qQr2NRS_MpKO6RTsvnaAVAw0S-lGXuxNg,1166
442
- streamlit/static/static/js/index.CP2YZ73v.js,sha256=iL3l2MoEtVcKHAxBPNn1W0UpAxKQNr9NWJSEpCqi60o,1763
443
- streamlit/static/static/js/index.CSbah0y4.js,sha256=v1IOE1iFe8XU2yX4o56LhKIrCVjsUh6JSGZM5oWz8Is,100018
444
- streamlit/static/static/js/index.CbiYVMT1.js,sha256=nAM01fTA5olrYVMqWymQot6TJw-iZRNmN_UitiT7n5Y,13715
445
- streamlit/static/static/js/index.CbxllBj8.js,sha256=vA1vLmV_lSiMvk5TpYTeT1QLX8aABlGV248couN4WOQ,19441
446
- streamlit/static/static/js/index.Cd1D2eGF.js,sha256=dyWyIUUmtQWi-oK51tdWhepZnu-BBqif4VXUJIY3fsc,271162
447
- streamlit/static/static/js/index.Ckcqwai8.js,sha256=m7aHWcT5KkTVPBiclKLkiBNjI8-4vONVpJDxEHryNR8,35681
448
- streamlit/static/static/js/index.CqTPbV5Y.js,sha256=oeFDrIHJ9hU61hkVuqxCz-KVHhg8rc5W4TTH14qyMKw,2265821
449
- streamlit/static/static/js/index.CxXo5UKy.js,sha256=0JXpC523km1TRsNN2FapyRa8Yiazm0vRUrpsYPA4W5U,2997
450
- streamlit/static/static/js/index.CxbL5FgL.js,sha256=qrsW2sOerwwsSG3CrM7y5qw4p1EG944fa-v2VaO-12c,1397
451
- streamlit/static/static/js/index.D52dMvK5.js,sha256=CU5ksJKSZIyaH_biuvD_bzPm2JWAncioKuJrSMsbHlI,3240
452
- streamlit/static/static/js/index.DBUdji-9.js,sha256=Dr0mw1_7yA3rt5P8CpnZ7Pv7C76kRg42YzXUZ_Hvf3s,24493
453
- streamlit/static/static/js/index.DMU3coc2.js,sha256=ma9DphWPIMstfORqqYZmee8yeB3xAtAiAY9c2pSSUCQ,4637
454
- streamlit/static/static/js/index.DN4sfQLP.js,sha256=ONwb0Mujaxh4FeK1OCYeLSRRYeUzHw1QmkJCMnfmhIs,2950
455
- streamlit/static/static/js/index.DRDE9rnx.js,sha256=XaDNEWaEInTw49onRzVqKCPjlDx3cBC3pyJWtaa6asM,878
456
- streamlit/static/static/js/index.DY9Ac89e.js,sha256=esR8Fy0OoUij1Np3Z99PekeDklrNctJn7m27cjMuKok,18998
457
- streamlit/static/static/js/index.DYKCsDvl.js,sha256=yUbLmNhwA8IQAkXfJcKv6KNsY8bLcHUdtAwjxb8iVec,3281
458
- streamlit/static/static/js/index.Da9gznCC.js,sha256=pLt0bUxgVbnHj4fe8TB6sCKiaJIxiyLhzaKkEWDjx-0,3764
459
- streamlit/static/static/js/index.DfIRibXG.js,sha256=RYYQFN8TEYHp-RPr1DnjhA6lWF-lBuDIBZ8ZfgITLZU,226889
460
- streamlit/static/static/js/index.Dg5zbEp2.js,sha256=3qeTIjQGsIKWiavc3_toGLtYYeoHjp1VNPYufVe2hhk,2701588
461
- streamlit/static/static/js/index.Di9I2cid.js,sha256=-5VX5z3tfHoE0K4aPHDSPjTre56AFXktjqo5Q0SlmVY,679
462
- streamlit/static/static/js/index.DkpEv0uV.js,sha256=R36nuqrVpkNFJHz9vhymgjIkXKUxOVY1fS7SzlfcNrM,7641
463
- streamlit/static/static/js/index.DwJ9Vhsl.js,sha256=CZCWE7BvTO9Ssmx4gq_pU4MKXHiSYYkmIflsf-yt6y0,19017
464
- streamlit/static/static/js/index.L7erTnMm.js,sha256=c3bZq4i9C72kKHl_dGLUmqLfN7rebc7BL1n2SUWpJeo,672
465
- streamlit/static/static/js/index.NaDyAN1s.js,sha256=2hbv4_-ca03taq6KMM7CgJfuHu576fu_VCirAsRZiq8,1603
466
- streamlit/static/static/js/index.RNTPpVde.js,sha256=mKXXb9mkeO5jHE3kYJhuNdJERoXqgYL_HEj9JmNPql0,2800
467
- streamlit/static/static/js/index.VFDFuf_7.js,sha256=vJp37F0mbBhUpCCiHRKY0Iy210y2YiM5zxLwJ5gDhHk,5442
468
- streamlit/static/static/js/index.W-bl3NDo.js,sha256=TYYpGjjspWojIXsmR841OT3x5Gfc0baIN0U2oA9OV-w,5820
469
- streamlit/static/static/js/index.XYozEjwK.js,sha256=FzgAGwhf0ISq-EDnI3IkbwDfONqvJntmJ3xHb19jqSs,7021
470
- streamlit/static/static/js/index.oyLQ4pue.js,sha256=HIOaIo0xag4fefrWJorjsEmWo2jmUSsbdyIyEDh8vKM,8353
471
- streamlit/static/static/js/index.q4fLUQtC.js,sha256=uvH_O1mqMHJ57uJplFN9JoMtUNjudPXaZB9jlQF08Qw,13387
472
- streamlit/static/static/js/index.q9puCQgK.js,sha256=Z9DiANkw4UJpN7LdI08MYS519AIYnY9DOk77YNH3sHs,13430
473
- streamlit/static/static/js/index.xZBTXGNC.js,sha256=RvvXNn1q9l53oluuxpJ__r6w_rO2RnsOVU9nnTg0gww,13587
474
- streamlit/static/static/js/input.CcvrgErO.js,sha256=MryM7XwPjU6DT1CoUBM1fY00P2WxVoF7fPziKuXoWUw,5235
429
+ streamlit/static/static/js/index.B1br6-J8.js,sha256=SuaLtbDhdhdlcKO661C_XEe-8_qNsAPWDr1gsqeN97U,3764
430
+ streamlit/static/static/js/index.BDyX78eQ.js,sha256=HqRatfMh75ykzbe5vEmHk3qNJvkRPKcED0-ndftSxoo,2950
431
+ streamlit/static/static/js/index.BEiPXRiB.js,sha256=LXOUeiiihtvtGrPqixI6XsvMqCiyZcCcWGOW3lmVcYA,3240
432
+ streamlit/static/static/js/index.BGGsxMsK.js,sha256=LkRSQHRWrXo16ynSPVao5gVqTocnAI6Hl5YZRGt_v0E,226889
433
+ streamlit/static/static/js/index.BK8LGuo5.js,sha256=x6oaIltFtJQdGjl12fPx4gTX4aQi55j0hecYmAjTRiI,5442
434
+ streamlit/static/static/js/index.BNH1O6vW.js,sha256=INnvzb6KlxGWGCSudZiMJrEWFwiwc5iiwPv1qnvybbo,679
435
+ streamlit/static/static/js/index.BNJ18Gvk.js,sha256=4toprwuty938bjbTx_nJ5Q74VO7YzWeer1iSONq5n4A,100018
436
+ streamlit/static/static/js/index.BSC_e7mC.js,sha256=kHt1pmt8eVvEHtSJJdqICasEFPMXjPSQ9-W1qzUwP58,828422
437
+ streamlit/static/static/js/index.BSsyTGMU.js,sha256=sSBQ9YcAfnKLTRJrjGea_m81oVauCYqx8pOCxjsIZrQ,13387
438
+ streamlit/static/static/js/index.BTeFWqxT.js,sha256=kY1uGk2ackYA_oQD9KT_irAGAkZgv2u6WAm2SIEwzjQ,4637
439
+ streamlit/static/static/js/index.BVQ-x0jB.js,sha256=e3ihTn0e63xG3Z6af_xuEJmmlUQQ9obqPzdfmFT4wb4,13469
440
+ streamlit/static/static/js/index.BtT26h8D.js,sha256=CaYSK_HdmI3VP-6u5ky-wCuJPIRfc_UwP1ONrg21rLE,19441
441
+ streamlit/static/static/js/index.BuO127Fv.js,sha256=SdypPIw1OUWx72uiJ21TBhERHtoOH3KWgxbHnAlRT2A,1603
442
+ streamlit/static/static/js/index.C4SaLgc9.js,sha256=6_mu8vrhn0M9mon-EvO-muMd_6yOLbTtdFO-GP1_Mko,1397
443
+ streamlit/static/static/js/index.C6PG_WI2.js,sha256=dNfukoY1flSyz0qNp7ku9Nktc4VhTShgCwM3TJJHJHs,18998
444
+ streamlit/static/static/js/index.C9ZwaDT3.js,sha256=H9u8Lm61voS7jXM5rdcAh_xkr7dBk04RMUysrR6PWCQ,2504
445
+ streamlit/static/static/js/index.CCH6P_Oz.js,sha256=yJhsqloQk9ey0gZscaVR_vQL7nFl2KW-9xuIoYvD6Y0,7641
446
+ streamlit/static/static/js/index.CJdAAsMS.js,sha256=_huUSjOfzKEJCjYjhLEZ_o0mxpwTswDRk542ep9IK38,2224
447
+ streamlit/static/static/js/index.CLw67zQa.js,sha256=ME4qt5ISpJi6h56tbkpPA9LB5ngzV6M9Gh6piWBapjo,23217
448
+ streamlit/static/static/js/index.COYdue8P.js,sha256=hTf_5-5tRgc3hkLQ6fpRuuoXg3HQ6NerS6AW52NTT2c,1115
449
+ streamlit/static/static/js/index.CPVPS6MS.js,sha256=bxFFFeBqnWt5aVuDPcnipUVIokuhsUTPvgfsv8wAMjo,1551
450
+ streamlit/static/static/js/index.CQRv0Buu.js,sha256=G1s5FSiK6CoPrKKX27gaNZbSA_-ZsWHWGfVsW2BQLD0,672
451
+ streamlit/static/static/js/index.CTssS8CY.js,sha256=EFsWdn1azv5pf7DLaKlnIKESAeYBD2M2TeYW3zX2QE8,3899
452
+ streamlit/static/static/js/index.CV56Xzvw.js,sha256=ea0s_1mSCuhZ5Is8JLYQ7LJQB5WCFR0DzvtH833GX44,18462
453
+ streamlit/static/static/js/index.CVgZcb-2.js,sha256=dV3EX_flSoNf1-RNbJDEMNnG_Y86M4XO66ijZL6IVFA,19017
454
+ streamlit/static/static/js/index.CaMDX02c.js,sha256=1WIF1ZKLJdLZQn1QiivpywHUDw62dL-OdzSB9nmLaUM,9146
455
+ streamlit/static/static/js/index.Cc0FyOvj.js,sha256=Se76Rmi4iNhGKwK6Jfx8tDEFWiAannh-79ceU2e5UCE,878
456
+ streamlit/static/static/js/index.CccNGpyY.js,sha256=1NdC5MCW0Wo6Acu50dAeqpk8VqO8EZxGMfKND1_1Q5k,1763
457
+ streamlit/static/static/js/index.CinPJsaI.js,sha256=8SGh84z6gF155cVaYnef5rZ1PuDr26SsOZanJg216LM,5820
458
+ streamlit/static/static/js/index.Cys-qREe.js,sha256=v5V_Cs7VGp2JA9fnSqATdPfD1lC745dzk753Kg3hAh8,1166
459
+ streamlit/static/static/js/index.DATGLwZn.js,sha256=g18mDn21n22o5VYSjok3ye6Z9IjHLK5x7O9EpulD8Yo,2701588
460
+ streamlit/static/static/js/index.DDuPBAVu.js,sha256=mTHJaTyMp-2DrpKwU8BQOvlvqbVdTWPWK3N919aH0vQ,449683
461
+ streamlit/static/static/js/index.DN77pJCq.js,sha256=vHOPmcysLnexPlkHeN_bZm8B2-hVdDgolZhItirpSW8,13587
462
+ streamlit/static/static/js/index.DRgFBrOW.js,sha256=puLZ0aM7Bqy8-LV09THgYwIlpk1vpdrdo0LgHugvW_Y,190379
463
+ streamlit/static/static/js/index.Dc27IuI8.js,sha256=29utgXqdAiLtl8R38di1a2GC2h5libbuEVBmTFGGDbM,2800
464
+ streamlit/static/static/js/index.DdjNqo0t.js,sha256=jEHD7k7P8q-sMT6UBUSTsBPaD3BIcsywrlr2kvII3CA,3281
465
+ streamlit/static/static/js/index.DmQGepo0.js,sha256=jt-J32Codfr4WFeo8Cdn9EzVvhLsXf6Z3ui8fOyINlQ,35681
466
+ streamlit/static/static/js/index.DmaExHyk.js,sha256=7X5uZ52_-5eg_iWaNhPPmF14PcN1KGNxu7e9yu32qHs,4798743
467
+ streamlit/static/static/js/index.Dou8UoAD.js,sha256=Xm6WRevpAW2b9O2gGimpiRKwSbTTczORwm78o-Zjtyo,271162
468
+ streamlit/static/static/js/index.Dt4MKWrN.js,sha256=zb-CpS2Iyc0v9AZHVBgU2-pNFj5ikjxstFEWDZiPQHI,8353
469
+ streamlit/static/static/js/index.M-iumICI.js,sha256=CE10bHnfVRciGptU1_F6I4F5i7RXVVfEupU3zYDkORY,2539
470
+ streamlit/static/static/js/index.NjN0yaAC.js,sha256=np0nUUjEH941e7xvx1RrM8Jv9pWdkr_TuxyG3f8nAQE,7021
471
+ streamlit/static/static/js/index.OW6D7CJ5.js,sha256=v7gGkVViZ1e9qDKRg6EV-BWr_xAWc7VZBg5cw0_A_iA,442
472
+ streamlit/static/static/js/index.SnIe8o_F.js,sha256=B22UosktUohaxm38kTCbbu1W-hfep7AEIHr2M2Ipasg,24493
473
+ streamlit/static/static/js/index.xg87JKI8.js,sha256=_xTEROY8EC7L7Qhqd2bjXnOuO-vr9eoUVd6GQ1Pm3pc,1344
474
+ streamlit/static/static/js/input.-I2c-pPm.js,sha256=cSt71y4O-lpAP1IkbvxfwP49rD2sOerMiJ_LAtEKIkA,5235
475
475
  streamlit/static/static/js/inputUtils.CptNuJwn.js,sha256=v9SUbdkM8OJ6aT_EfTucTRNZh059kZ9Mut2oyTmv_98,124
476
- streamlit/static/static/js/main.eVHOp4Th.js,sha256=rGJC9VAMJma4xdM2oW8SEzC_ih051QRI7XMjP9q8E50,117288
477
- streamlit/static/static/js/memory.Ck_sLv5Y.js,sha256=DRKB5NYxgTC0bszjCASmxSsyUctD9BHD_dJeAXR3U6E,3041
476
+ streamlit/static/static/js/main.zgyqwsPV.js,sha256=PCMCNR1jFAx76t4TTpnbvPV_gLruvBPLpwYLJXaNR5I,117288
477
+ streamlit/static/static/js/memory.BTaCc67b.js,sha256=cWDGUEAEZf6emnwY3h-qDVA0RhCmrrYGN-d8zYUzYuk,3041
478
478
  streamlit/static/static/js/moment.C3j7ZXd7.js,sha256=361X1vE4d2RmLxzJi928kpUW1LLvetYlMmdjpnCD7kE,60781
479
- streamlit/static/static/js/number-overlay-editor.DgcLMWOy.js,sha256=klWnPGPzExpDMKu3jnk2tKudaBXGgweM7DB-McBgarM,16635
480
- streamlit/static/static/js/pandasStylerUtils.DqP0h70z.js,sha256=ohyOx5nUrxKjJRcctU4HhLY4W2gRMALBoS7TfjpspnU,779141
481
- streamlit/static/static/js/possibleConstructorReturn.C_51n46K.js,sha256=jp2vXrueRiVbO-AWGSInwX9k_MnS2MOUunY4JcBIQ1o,1461
479
+ streamlit/static/static/js/number-overlay-editor.Bp2-OIVN.js,sha256=iVP3sI8EHm0B5ZOxDlJlcteLs1cifDc2GHZpiTRAu3w,16635
480
+ streamlit/static/static/js/pandasStylerUtils.PlmC_Sod.js,sha256=7cyvGFxdQhU2k0UhLgARdP6_frnmmJ2fdwUY-S-ic68,779141
481
+ streamlit/static/static/js/possibleConstructorReturn.D2vivPxX.js,sha256=_bPTDe46r8vyS6iTBJIIYI2iPiMsdaskV4buZQTaY_0,1461
482
482
  streamlit/static/static/js/record.B-tDciZb.js,sha256=Aai3tbEV-riFzv2RgooHGVxyNm4ZaFFQNYqZOOIb0Lg,7118
483
- streamlit/static/static/js/sandbox.Q-g3QIZJ.js,sha256=d4232TdVe8YJyjB624F4bLlKzzVgN59HRzsvIZcnuaY,2960
483
+ streamlit/static/static/js/sandbox.C-NkJg85.js,sha256=UTihrut2zkBYtwVvLVy5fVTsY3uOirlCW_I742yDBsc,2960
484
484
  streamlit/static/static/js/sprintf.D7DtBTRn.js,sha256=dLZEkTCGwWgkxMOITY-fqjbGVuUO9nFw7MwCANBdisk,3434
485
- streamlit/static/static/js/styled-components.e0V96rJw.js,sha256=HsfX0hwZa36UHdZx5smrnoYoQMtCFytyql3ANs_JT28,468
485
+ streamlit/static/static/js/styled-components.-ywQNIcz.js,sha256=uV8o0mgJCu6p_4qoVxFEFbb3mBbNeN9uo5liM0d_nto,468
486
486
  streamlit/static/static/js/threshold.Q1mXg5rX.js,sha256=yYpjiHRsh76qUlfcY27pJ1APL3BfswYnsO2WdEoQpH0,5698
487
- streamlit/static/static/js/throttle.D3b5WILl.js,sha256=h0oUw17paUWtTKEUNwc1OzqrJZuOE--mokIxxs2cRoM,1262
488
- streamlit/static/static/js/timepicker.Bpn70xGc.js,sha256=P4kMYv336BUebIvoS-Ds4pjKGbI4MshXzUEDcZtRnws,89220
487
+ streamlit/static/static/js/throttle.SbSFuU2P.js,sha256=PghJOPjqwz-ii2vV5zKV5MZrBR691-WzQibNf-lFnbk,1262
488
+ streamlit/static/static/js/timepicker.BRg2LlYz.js,sha256=2wjkQ8C8EI3yWH3z10dGfYOeDv02BUHiJUt2pX67sao,89220
489
489
  streamlit/static/static/js/timer.C2hYhUse.js,sha256=Qkocm5ZVuaJAEZbZ7fx1poL7mW3IxJKWkb51moWAloo,7408
490
- streamlit/static/static/js/toConsumableArray.DIN_ys1J.js,sha256=LBY7t35fh75tM8Ns6oVwFw_fgNo6ub6kajq9IZ5VK1A,1587
491
- streamlit/static/static/js/uniqueId.B27POWT6.js,sha256=XJzkJ2V8wJve-gZqe10KlDYxoBNn-ZvlrQiIS9Pqprs,97
490
+ streamlit/static/static/js/toConsumableArray.DmYuqCFN.js,sha256=lgMUv71bn4UXEcpvvOvrb9f4oxH5ntZeftTde_wG7zo,1587
491
+ streamlit/static/static/js/uniqueId.DDLECwS_.js,sha256=GjNiz886cdKeqh_zNw_2qdDFsTvgjSzfax8y9qv-Wow,97
492
492
  streamlit/static/static/js/urls.BwSlolu9.js,sha256=oj7KbEdZXmm91zYfQyVjZY6MYvu7aKe2nX2Uzq_T5c4,275
493
- streamlit/static/static/js/useBasicWidgetState.DA3_qaXD.js,sha256=v7ZEFhHDls6PycBINImXMitRB8uR2l7kq0i_hsokhEA,953
494
- streamlit/static/static/js/useIntlLocale.BSq6SANa.js,sha256=10yosREI0jt_QdHtpJ8BIhZtNhBjH9k43z0xmH0DMyM,109676
495
- streamlit/static/static/js/useTextInputAutoExpand.ytEW5QmA.js,sha256=uDUB3bp9IaTmnFFaYdc3lOn0uWAuDk5rMYYgjuojRns,6641
496
- streamlit/static/static/js/useUpdateUiValue.DOxWBNiI.js,sha256=z9BmdwKeEoF8Q_aFZuwc0ENp9htXFbXAAemMZHP28W4,615
497
- streamlit/static/static/js/useWaveformController.BCmk6WLk.js,sha256=bkLp3rXQxNz7E7kgmfoL_YZGUAlhcuR8TUSyNRrbYB0,12358
493
+ streamlit/static/static/js/useBasicWidgetState.CSKMY_WY.js,sha256=148BYiIVUDzTvbWI3f6HH7xhLQ8FozCtHMBXDTAWHvI,953
494
+ streamlit/static/static/js/useIntlLocale.DrzrdT6m.js,sha256=xKB8MVRYjXIK2NeZyhbfLgatEMF-IRmU2Q5E3TnJnsk,109676
495
+ streamlit/static/static/js/useTextInputAutoExpand.BZ_dM91Q.js,sha256=1YX_1iqn68kF-PomaVZRdIA12fThGHwBKd37Uc0hIhE,6641
496
+ streamlit/static/static/js/useUpdateUiValue.y-s71G-M.js,sha256=5udyhX3Dsg63K2pZEupsvor8-m3pKdErIxCur8uq_e4,615
497
+ streamlit/static/static/js/useWaveformController.Bumwfqnl.js,sha256=XsYP5QA4qemls9HKqSQK30jQoC5id8-fomk2jaFxr_4,12358
498
498
  streamlit/static/static/js/value.B4vHRSi7.js,sha256=uIpGr-7oD2QuR1fYWtKral2T1mh9NFVAHxRV-qiQ6Fs,15042
499
499
  streamlit/static/static/js/wavesurfer.esm.vI8Eid4k.js,sha256=MWghbVpZJa15YG6v_wx7RFe57fzm7VeEZTx_SY3vDN0,29840
500
- streamlit/static/static/js/withCalculatedWidth.ChdrMItN.js,sha256=eET2r4mRr9C1ug6gKsDe-xwy5bJhnKPFnTStLhpBtok,260
501
- streamlit/static/static/js/withFullScreenWrapper.7j_lzlaF.js,sha256=E_Ke5Prv8J0Ho787QNkoQCWRIb9_eC6g-mlp2HcLMNE,1542
500
+ streamlit/static/static/js/withCalculatedWidth.Dl_TDMaA.js,sha256=oUM9snxQYIKm1oYiTnnh-E_UYnCV5OVnxVr2stHNxWY,260
501
+ streamlit/static/static/js/withFullScreenWrapper.CWEBbO_P.js,sha256=zwBT_Q9jIB-onZkh901ElZIFGOQ58PWen7vuNFSt0Sc,1542
502
502
  streamlit/static/static/media/KaTeX_AMS-Regular.BQhdFMY1.woff2,sha256=DN04fJWQoan5eUVgAi27WWVKfYbxh6oMgUla1C06cwg,28076
503
503
  streamlit/static/static/media/KaTeX_AMS-Regular.DMm9YOAa.woff,sha256=MNqR6EyJP4deJSaJ-uvcWQsocRReitx_mp1NvYzgslE,33516
504
504
  streamlit/static/static/media/KaTeX_AMS-Regular.DRggAlZN.ttf,sha256=aFNIQLz90r_7bw6N60hoTdAefwTqKBMmdXevuQbeHRM,63632
@@ -598,23 +598,23 @@ streamlit/web/cache_storage_manager_config.py,sha256=rdqrbEX0tRnlUAiqJWOn3i-0ZXr
598
598
  streamlit/web/cli.py,sha256=D_EcX9i5bP318wPaUiW0mXKyRTrwRX1pka6udfhNxQw,14120
599
599
  streamlit/web/server/__init__.py,sha256=asjQHAKdEIg-5gtWUUyJOYgo70i8Iul3R2W4XvUmA5g,1145
600
600
  streamlit/web/server/app_static_file_handler.py,sha256=5_arD5lfRJvPcPSKOlLL_k30F2ejI4RU1h-H0TBcLu0,3224
601
- streamlit/web/server/authlib_tornado_integration.py,sha256=CVE0h6dpC8kp7oxmOIWO62GpISuf2bTSB8p87fvrkkY,2318
601
+ streamlit/web/server/authlib_tornado_integration.py,sha256=TVLskSscldIzSmIsk6UfFqzdGMNOuGyRU5ntrhv79JU,4458
602
602
  streamlit/web/server/bidi_component_request_handler.py,sha256=E5isV5kLkYeskS2OhdY2MvyQVZ88x7K7p11qT-rbHuk,6932
603
603
  streamlit/web/server/browser_websocket_handler.py,sha256=pV4SDZWGGLLT8rrR8aowlq7Mtj21t_B22SLlNhG3vLM,10966
604
604
  streamlit/web/server/component_file_utils.py,sha256=F6OVuFkKiYEcJwkxF8qJm17P5fckvTo40Eivr_uw2bA,3568
605
605
  streamlit/web/server/component_request_handler.py,sha256=PHGirH9dvR3JElo-wxyr2IP2BU8PVkyJMKqhX_wcC-A,3718
606
606
  streamlit/web/server/media_file_handler.py,sha256=qjtzVmb3LNCLQSZUlfL5bzO5i4Ok4BB-xWlD8LQ8dGc,5562
607
607
  streamlit/web/server/oauth_authlib_routes.py,sha256=4hmpk2LCT4u5uEG94fkM4rnrDPO6uh6SPU0kCwcQgqw,7653
608
- streamlit/web/server/oidc_mixin.py,sha256=SxDYPhyKMHUl3N_FvEzpKebXOG9KA6WQv-XJHgi4Trs,4641
608
+ streamlit/web/server/oidc_mixin.py,sha256=dXEjeFsLRU4GivPyeIa3N_9_zXtTY7zC7_JSJR4wciw,5247
609
609
  streamlit/web/server/routes.py,sha256=9OpM1dBS_TL9F2gpNTYXkH481AbmVySQSa2Q-Ct21QA,9799
610
610
  streamlit/web/server/server.py,sha256=sveV3HOxaCt8t_y_Ppq77F_zbLsrwOFwZOtfh6J0UwM,19444
611
611
  streamlit/web/server/server_util.py,sha256=ycuGHLl8bEr0K4wCuSKdLmrbD-khYrr6SOuROFGNj4Q,6094
612
612
  streamlit/web/server/stats_request_handler.py,sha256=M1g40mgy78f316gP7_W8I__Q4e9x0NoNjiNLQdH58ds,3848
613
613
  streamlit/web/server/upload_file_request_handler.py,sha256=xPorcytfBNs_JhFtrUxkfKbK6jB9CjcexFpdQpQydF8,5822
614
614
  streamlit/web/server/websocket_headers.py,sha256=2OHv6G9hLJ0UX8oHDG3UJ86_KK4SJJD8FXOCsZjCKek,2229
615
- streamlit-1.52.1.data/scripts/streamlit.cmd,sha256=k9768SaQCkiYAPaTp7JtkhAHEHflNQfu6fAM4pri6zo,676
616
- streamlit-1.52.1.dist-info/METADATA,sha256=jkYb7aUA15End85WxMb8TqmMv1f7RVAJlQ9CyrHXPNs,9778
617
- streamlit-1.52.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
618
- streamlit-1.52.1.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
619
- streamlit-1.52.1.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
620
- streamlit-1.52.1.dist-info/RECORD,,
615
+ streamlit-1.52.2.data/scripts/streamlit.cmd,sha256=k9768SaQCkiYAPaTp7JtkhAHEHflNQfu6fAM4pri6zo,676
616
+ streamlit-1.52.2.dist-info/METADATA,sha256=qJoCuuxMXgGN02xDY8AhtZSf4mPUVPXRgrB6mGPr6Po,9778
617
+ streamlit-1.52.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
618
+ streamlit-1.52.2.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
619
+ streamlit-1.52.2.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
620
+ streamlit-1.52.2.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- import{x as c,r as a,j as o,l as u,ak as g,Z as f,S as x}from"./index.CqTPbV5Y.js";const S=c("div",{target:"e4ygpqr0"})(({theme:e,cache:n})=>({...n?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),T=c("div",{target:"e4ygpqr1"})(({theme:e})=>({display:"flex",alignItems:"center",width:"100%",gap:e.spacing.sm})),$=c("div",{target:"e4ygpqr2"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"baseline"})),y=c("div",{target:"e4ygpqr3"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),h=e=>{const n=Math.floor(e/3600),t=Math.floor(e%3600/60),s=e%60;if(n===0&&t===0)return`(${s.toFixed(1)} seconds)`;if(n===0){const d=`${t} minute${t===1?"":"s"}`,p=s===0?"":`, ${s.toFixed(1)} seconds`;return`(${d}${p})`}const l=`${n} hour${n===1?"":"s"}`,r=t===0?"":`, ${t} minute${t===1?"":"s"}`,i=s===0?"":`, ${s.toFixed(1)} seconds`;return`(${l}${r}${i})`};function v({element:e}){const{cache:n,showTime:t}=e,[s,l]=a.useState(0),r=a.useRef(null);return a.useEffect(()=>{if(!t)return;r.current=Date.now();const i=()=>{if(r.current!==null){const m=(Date.now()-r.current)/1e3;l(m)}};i();const d=setInterval(i,100);return()=>clearInterval(d)},[t]),o(S,{className:g({stSpinner:!0,stCacheSpinner:n}),"data-testid":"stSpinner",cache:n,children:u(T,{children:[o(f,{size:"lg",iconValue:"spinner"}),u($,{children:[o(x,{source:e.text,allowHTML:!1}),t&&o(y,{children:h(s)})]})]})})}const b=a.memo(v);export{b as default};
@@ -1,2 +0,0 @@
1
- import{H as _,r as u,Q as ao,ct as O,ck as co,W as io,g as lo,j as m,R as I,cu as fo,x as D,X as H}from"./index.CqTPbV5Y.js";function go(o,e,r,t){for(var n=-1,s=o==null?0:o.length;++n<s;)r=e(r,o[n],n,o);return r}function Co(o){return function(e){return o?.[e]}}var xo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},po=Co(xo),mo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bo="\\u0300-\\u036f",ho="\\ufe20-\\ufe2f",Ro="\\u20d0-\\u20ff",So=bo+ho+Ro,yo="["+So+"]",Eo=RegExp(yo,"g");function vo(o){return o=_(o),o&&o.replace(mo,po).replace(Eo,"")}var wo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Bo(o){return o.match(wo)||[]}var Fo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function ko(o){return Fo.test(o)}var V="\\ud800-\\udfff",To="\\u0300-\\u036f",Ao="\\ufe20-\\ufe2f",Uo="\\u20d0-\\u20ff",Io=To+Ao+Uo,J="\\u2700-\\u27bf",Z="a-z\\xdf-\\xf6\\xf8-\\xff",zo="\\xac\\xb1\\xd7\\xf7",Lo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Oo="\\u2000-\\u206f",Mo=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",G="A-Z\\xc0-\\xd6\\xd8-\\xde",Wo="\\ufe0e\\ufe0f",Y=zo+Lo+Oo+Mo,q="['’]",M="["+Y+"]",jo="["+Io+"]",K="\\d+",$o="["+J+"]",X="["+Z+"]",Q="[^"+V+Y+K+J+Z+G+"]",No="\\ud83c[\\udffb-\\udfff]",Po="(?:"+jo+"|"+No+")",_o="[^"+V+"]",oo="(?:\\ud83c[\\udde6-\\uddff]){2}",eo="[\\ud800-\\udbff][\\udc00-\\udfff]",w="["+G+"]",Do="\\u200d",W="(?:"+X+"|"+Q+")",Ho="(?:"+w+"|"+Q+")",j="(?:"+q+"(?:d|ll|m|re|s|t|ve))?",$="(?:"+q+"(?:D|LL|M|RE|S|T|VE))?",ro=Po+"?",to="["+Wo+"]?",Vo="(?:"+Do+"(?:"+[_o,oo,eo].join("|")+")"+to+ro+")*",Jo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Go=to+ro+Vo,Yo="(?:"+[$o,oo,eo].join("|")+")"+Go,qo=RegExp([w+"?"+X+"+"+j+"(?="+[M,w,"$"].join("|")+")",Ho+"+"+$+"(?="+[M,w+W,"$"].join("|")+")",w+"?"+W+"+"+j,w+"+"+$,Zo,Jo,K,Yo].join("|"),"g");function Ko(o){return o.match(qo)||[]}function Xo(o,e,r){return o=_(o),e=e,e===void 0?ko(o)?Ko(o):Bo(o):o.match(e)||[]}var Qo="['’]",oe=RegExp(Qo,"g");function ee(o){return function(e){return go(Xo(vo(e).replace(oe,"")),o,"")}}var re=ee(function(o,e,r){return o+(r?"-":"")+e.toLowerCase()});const F=u.createContext(null);F.displayName="BidiComponentContext";const B=ao.getLogger("BidiComponent"),N="__",A="__streamlit_arrow_ref__",te="$$STREAMLIT_INTERNAL_KEY",ne=(o,e)=>{if(o&&typeof o=="object"&&!Array.isArray(o)){if(typeof o[A]=="string"){const t=o[A],n=e[t];if(n)try{return O(n)}catch{return null}return null}const r={};for(const[t,n]of Object.entries(o))if(n&&typeof n=="object"&&!Array.isArray(n)&&typeof n[A]=="string"){const s=n[A],a=e[s];if(a)try{r[t]=O(a)}catch{r[t]=null}else r[t]=null}else r[t]=n;return r}return o},se=({arrowBlobs:o,arrowData:e,bytes:r,data:t,json:n,mixedJson:s})=>{switch(t){case"json":return n?JSON.parse(n):null;case"arrowData":return e??null;case"bytes":return r??null;case"mixed":{if(s&&o&&s){const a=JSON.parse(s),i={};return o&&Object.entries(o).forEach(([f,l])=>{l?.data&&(i[f]=l.data)}),ne(a,i)}return null}case"any":case void 0:return null;default:co(t)}},ue=(o,e="--st")=>{const r={};return Object.entries(o).forEach(([t,n])=>{const s=re(t),a=`${e}-${s}`;if(typeof n=="boolean"){r[a]=n?"1":"0";return}r[a]=String(n)}),r},ae=o=>({primaryColor:o.colors.primary,backgroundColor:o.colors.bgColor,secondaryBackgroundColor:o.colors.secondaryBg,textColor:o.colors.bodyText,linkColor:o.colors.link,linkUnderline:o.linkUnderline,headingFont:o.genericFonts.headingFont,codeFont:o.genericFonts.codeFont,baseRadius:o.radii.default,buttonRadius:o.radii.button,baseFontSize:typeof o.fontSizes.baseFontSize=="number"?`${o.fontSizes.baseFontSize}px`:String(o.fontSizes.baseFontSize),baseFontWeight:o.fontWeights.normal,codeFontWeight:o.fontWeights.code,codeFontSize:o.fontSizes.codeFontSize,headingFontSizes:[o.fontSizes.h1FontSize,o.fontSizes.h2FontSize,o.fontSizes.h3FontSize,o.fontSizes.h4FontSize,o.fontSizes.h5FontSize,o.fontSizes.h6FontSize],headingFontWeights:[o.fontWeights.h1FontWeight,o.fontWeights.h2FontWeight,o.fontWeights.h3FontWeight,o.fontWeights.h4FontWeight,o.fontWeights.h5FontWeight,o.fontWeights.h6FontWeight],borderColor:o.colors.borderColor,dataframeBorderColor:o.colors.dataframeBorderColor,dataframeHeaderBackgroundColor:o.colors.dataframeHeaderBackgroundColor,codeBackgroundColor:o.colors.codeBackgroundColor,font:o.genericFonts.bodyFont,chartCategoricalColors:o.colors.chartCategoricalColors,chartSequentialColors:o.colors.chartSequentialColors,headingColor:o.colors.headingColor,borderColorLight:o.colors.borderColorLight,codeTextColor:o.colors.codeTextColor,widgetBorderColor:o.colors.widgetBorderColor,redColor:o.colors.redColor,orangeColor:o.colors.orangeColor,yellowColor:o.colors.yellowColor,blueColor:o.colors.blueColor,greenColor:o.colors.greenColor,violetColor:o.colors.violetColor,grayColor:o.colors.grayColor,redBackgroundColor:o.colors.redBackgroundColor,orangeBackgroundColor:o.colors.orangeBackgroundColor,yellowBackgroundColor:o.colors.yellowBackgroundColor,blueBackgroundColor:o.colors.blueBackgroundColor,greenBackgroundColor:o.colors.greenBackgroundColor,violetBackgroundColor:o.colors.violetBackgroundColor,grayBackgroundColor:o.colors.grayBackgroundColor,redTextColor:o.colors.redTextColor,orangeTextColor:o.colors.orangeTextColor,yellowTextColor:o.colors.yellowTextColor,blueTextColor:o.colors.blueTextColor,greenTextColor:o.colors.greenTextColor,violetTextColor:o.colors.violetTextColor,grayTextColor:o.colors.grayTextColor}),ce=u.memo(({element:o,children:e,widgetMgr:r,fragmentId:t,componentRegistry:n})=>{const{arrowData:s,bytes:a,componentName:i,cssContent:f,cssSourcePath:l,data:d,htmlContent:c,id:S,jsContent:b,json:x,jsSourcePath:p,mixed:g}=o,y=u.useMemo(()=>({id:o.id,formId:o.formId}),[o.id,o.formId]),k=u.useCallback(()=>{const v=r.getJsonValue(y);if(!v)return{};try{return JSON.parse(v)}catch(z){const R=io(z);return B.warn("Failed to parse widget JSON value; returning empty object.",{widgetId:y.id,formId:y.formId,error:R.message}),{}}},[y,r]),T=u.useMemo(()=>se({arrowBlobs:g?.arrowBlobs||void 0,arrowData:s?.data||void 0,bytes:a,data:d,json:x,mixedJson:g?.json||void 0}),[d,x,s?.data,a,g?.json,g?.arrowBlobs]),h=lo(),E=u.useMemo(()=>ae(h),[h]),C=u.useMemo(()=>({componentName:i,componentRegistry:n,cssContent:f?.trim(),cssSourcePath:l||void 0,data:T,fragmentId:t,getWidgetValue:k,htmlContent:c?.trim(),id:S,formId:o.formId||void 0,jsContent:b||void 0,jsSourcePath:p||void 0,theme:E,widgetMgr:r}),[i,n,f,l,t,k,c,S,o.formId,b,p,T,E,r]);return m(F.Provider,{value:C,children:e})}),no=(o,e)=>{if(o instanceof Error)return o;const r=e?`${e}: ${String(o)}`:String(o);return new Error(r)},U=(o,e,r)=>{const t=no(o,r);B.error(`BidiComponent Error: ${t.message}`,o),e(t)},ie=(o,e)=>{try{const t=document.createRange().createContextualFragment(o);e.appendChild(t)}catch(r){B.warn("createContextualFragment failed, falling back to innerHTML",r),e.innerHTML=o}},so=({containerRef:o,setError:e,skip:r=!1})=>{const t=u.useRef(null),{htmlContent:n,cssContent:s,cssSourcePath:a,componentName:i,componentRegistry:{getBidiComponentURL:f}}=I(F),l=u.useMemo(()=>{if(a)return f(i,a)},[i,a,f]);return u.useEffect(()=>{if(r)return;const d=o.current;if(d)try{if(t.current?.parentNode===d&&d.removeChild(t.current),t.current=document.createElement("div"),n){const c=document.createElement("div");ie(n,c),t.current.appendChild(c)}if(s){const c=document.createElement("style");c.textContent=s,t.current.appendChild(c)}else if(l){const c=document.createElement("link");c.href=l,c.rel="stylesheet",c.onerror=()=>{U(new Error(`Failed to load CSS from ${l}`),e)},t.current.appendChild(c)}d.appendChild(t.current)}catch(c){U(c,e,"Failed to process HTML/CSS content")}},[n,s,o,l,e,r]),t};class le{constructor(){this.hashSeed=2166136261,this.hashPrime=16777619,this.cache=new Map}computeHash(e){let r=this.hashSeed;for(let t=0;t<e.length;t++)r^=e.charCodeAt(t),r=Math.imul(r>>>0,this.hashPrime)>>>0;return(r>>>0).toString(16)}getOrCreateUrlForJs(e,r){const t=this.computeHash(e),n=this.cache.get(t);if(n)return{url:n,hash:t};const s=`${e}
2
- //# sourceURL=${r}-${t}.js`,a=new Blob([s],{type:"text/javascript"}),i=URL.createObjectURL(a);return this.cache.set(t,i),{url:i,hash:t}}}const de=new le,fe="events";function ge(o){if(o.includes(N))throw new Error("Base component id must not contain the delimiter sequence");return`${te}_${o}${N}${fe}`}const P=async({componentId:o,componentIdForWidgetMgr:e,componentName:r,data:t,formId:n,fragmentId:s,getWidgetValue:a,moduleUrl:i,parentElement:f,widgetMgr:l})=>{const d=await import(i);if(!d)throw new Error("JS module does not exist.");if(!d.default||typeof d.default!="function")throw new Error("JS module does not have a default export function.");const c=(b,x)=>{let p={};try{p={...a(),[b]:x}}catch(g){B.error(`Failed to get existing value for ${b}`,g),p={[b]:x}}l.setJsonValue({id:e,formId:n},p,{fromUi:!0},s)},S=(b,x)=>{if(n){B.warn("BidiComponent: setTriggerValue ignored inside st.form. Triggers are not allowed in forms; use setStateValue and form submit instead.");return}const p=ge(e);l.setTriggerValue({id:p,formId:n},{fromUi:!0},s,{event:b,value:x})};return d.default({name:r,data:t,key:o,parentElement:f,setStateValue:c,setTriggerValue:S})},uo=({containerRef:o,setError:e,skip:r=!1})=>{const n=`st-bidi-component-${u.useMemo(()=>fo(),[])}`,{componentName:s,data:a,formId:i,fragmentId:f,getWidgetValue:l,id:d,jsContent:c,jsSourcePath:S,theme:b,widgetMgr:x,componentRegistry:{getBidiComponentURL:p}}=I(F),g=u.useMemo(()=>{if(S)return p(s,S)},[s,S,p]),y=u.useRef(),k=u.useRef(),T=u.useRef(!1);u.useEffect(()=>{const{current:h}=o;if(r||!c&&!g||!h)return;(async()=>{try{if(c){const{url:C}=de.getOrCreateUrlForJs(c,`st-bidi-${s}`);y.current=await P({componentId:n,componentIdForWidgetMgr:d,componentName:s,data:a,formId:i,fragmentId:f,getWidgetValue:l,moduleUrl:C,parentElement:h,widgetMgr:x})}else if(g){const C=g;try{await new Promise((v,z)=>{const R=document.createElement("script");R.type="module",R.src=C,R.async=!0,R.onload=()=>v(),R.onerror=()=>z(new Error(`Failed to load script from ${g}`)),document.head.appendChild(R),k.current=R}),y.current=await P({componentId:n,componentIdForWidgetMgr:d,componentName:s,data:a,formId:i,fragmentId:f,getWidgetValue:l,moduleUrl:C,parentElement:h,widgetMgr:x})}catch(v){throw no(v,`Failed to load or execute script from ${g}`)}}}catch(C){T.current||U(C,e)}})()},[n,s,o,a,i,f,l,d,c,g,e,r,x,b]),u.useEffect(()=>()=>{T.current=!0;const h=y.current;h&&Promise.resolve(h).then(C=>{C?.()}).catch(C=>{B.error("Failed to run custom component cleanup",C)});const E=k.current;E?.parentNode&&E.parentNode.removeChild(E)},[])},Ce=D("div",{target:"e10xsstg0"})(({cssCustomProperties:o})=>({...o,display:"contents"})),L=D("div",{target:"e10xsstg1"})({width:"100%",height:"100%"}),xe=u.memo(()=>{const o=u.useRef(null),e=u.useRef(null),[r,t]=u.useState(!1),[n,s]=u.useState(null),{id:a}=I(F);u.useEffect(()=>{if(o.current)try{if(o.current.shadowRoot){e.current=o.current.shadowRoot,t(!0);return}e.current=o.current.attachShadow({mode:"open"}),t(!0)}catch(f){U(f,s,"Failed to create shadow DOM")}},[a]);const i=!r||!!n;return so({containerRef:e,setError:s,skip:i}),uo({containerRef:e,setError:s,skip:i}),n?m(H,{name:"BidiComponent Error",message:n.message,stack:n.stack}):m(L,{ref:o,"data-testid":"stBidiComponentIsolated"})}),pe=u.memo(()=>{const o=u.useRef(null),[e,r]=u.useState(null),t=!!e;return so({containerRef:o,setError:r,skip:t}),uo({containerRef:o,setError:r,skip:t}),e?m(H,{name:"BidiComponent Error",message:e.message,stack:e.stack}):m(L,{ref:o,"data-testid":"stBidiComponentRegular"})}),me=({children:o})=>{const{theme:e}=I(F),r=u.useMemo(()=>ue(e),[e]);return m(Ce,{cssCustomProperties:r,children:o})},be=({element:o,widgetMgr:e,fragmentId:r,componentRegistry:t})=>{const{isolateStyles:n}=o;return m(ce,{element:o,widgetMgr:e,fragmentId:r,componentRegistry:t,children:m(L,{className:"stBidiComponent",children:m(me,{children:n?m(xe,{}):m(pe,{})})})})},Re=u.memo(be);export{F as BidiComponentContext,Re as default};
@@ -1 +0,0 @@
1
- import{H as i}from"./index.CqTPbV5Y.js";var n=0;function u(r){var t=++n;return i(r)+t}export{u};