@stlite/desktop 0.42.5 → 0.44.0

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 (163) hide show
  1. package/bin/dump_artifacts.js +1 -1
  2. package/build/asset-manifest.json +79 -74
  3. package/build/index.html +1 -1
  4. package/build/static/css/8050.c24b25fa.chunk.css +1 -0
  5. package/build/static/css/9699.7ce51b75.chunk.css +1 -0
  6. package/build/static/css/main.fb5f4d99.css +1 -0
  7. package/build/static/js/1046.ea522608.chunk.js +1 -0
  8. package/build/static/js/1122.422f58fc.chunk.js +1 -0
  9. package/build/static/js/1189.71b89117.chunk.js +1 -0
  10. package/build/static/js/1261.242b7386.chunk.js +1 -0
  11. package/build/static/js/142.dbf9ec20.chunk.js +1 -0
  12. package/build/static/js/144.046792d9.chunk.js +1 -0
  13. package/build/static/js/1729.d59ed152.chunk.js +1 -0
  14. package/build/static/js/1740.2c71a97a.chunk.js +1 -0
  15. package/build/static/js/1839.0d0dcac8.chunk.js +1 -0
  16. package/build/static/js/2372.844b5190.chunk.js +2 -0
  17. package/build/static/js/2372.844b5190.chunk.js.LICENSE.txt +10 -0
  18. package/build/static/js/2385.2cbc4e3c.chunk.js +1 -0
  19. package/build/static/js/2448.e6f85eda.chunk.js +1 -0
  20. package/build/static/js/2753.c27b6faa.chunk.js +1 -0
  21. package/build/static/js/2873.f5c04f3b.chunk.js +1 -0
  22. package/build/static/js/2940.dd2240b9.chunk.js +1 -0
  23. package/build/static/js/3208.55e0b2fa.chunk.js +1 -0
  24. package/build/static/js/4021.ec2e87b0.chunk.js +1 -0
  25. package/build/static/js/4482.a9238ad0.chunk.js +1 -0
  26. package/build/static/js/4494.6bb6fb20.chunk.js +1 -0
  27. package/build/static/js/4694.aa16aaee.chunk.js +1 -0
  28. package/build/static/js/4721.2185bda3.chunk.js +1 -0
  29. package/build/static/js/4724.374578aa.chunk.js +1 -0
  30. package/build/static/js/4785.76a05d79.chunk.js +1 -0
  31. package/build/static/js/4831.391fe620.chunk.js +1 -0
  32. package/build/static/js/4949.391c96be.chunk.js +2 -0
  33. package/build/static/js/{2961.54b0c743.chunk.js.LICENSE.txt → 4949.391c96be.chunk.js.LICENSE.txt} +15 -15
  34. package/build/static/js/5299.beb80829.chunk.js +1 -0
  35. package/build/static/js/6093.209cd165.chunk.js +1 -0
  36. package/build/static/js/6134.b9e5b2db.chunk.js +1 -0
  37. package/build/static/js/6679.f4ee1d77.chunk.js +2 -0
  38. package/build/static/js/6679.f4ee1d77.chunk.js.LICENSE.txt +62 -0
  39. package/build/static/js/6802.df955c77.chunk.js +1 -0
  40. package/build/static/js/6865.12e417bf.chunk.js +1 -0
  41. package/build/static/js/698.116a166b.chunk.js +1 -0
  42. package/build/static/js/7125.afecc159.chunk.js +1 -0
  43. package/build/static/js/{7332.2f57919b.chunk.js → 7332.cb5400eb.chunk.js} +1 -1
  44. package/build/static/js/7579.ea965a43.chunk.js +1 -0
  45. package/build/static/js/7696.c9589682.chunk.js +1 -0
  46. package/build/static/js/790.4b5acd65.chunk.js +1 -0
  47. package/build/static/js/8050.029f3dc8.chunk.js +1 -0
  48. package/build/static/js/8097.4837946f.chunk.js +2 -0
  49. package/build/static/js/{3603.e3f6f11d.chunk.js → 8186.2f2e42e5.chunk.js} +2 -2
  50. package/build/static/js/865.143ae622.chunk.js +1 -0
  51. package/build/static/js/8801.77babe65.chunk.js +1 -0
  52. package/build/static/js/8850.6abc7336.chunk.js +1 -0
  53. package/build/static/js/9005.87bae37e.chunk.js +1 -0
  54. package/build/static/js/9166.f234f6b4.chunk.js +2 -0
  55. package/build/static/js/9166.f234f6b4.chunk.js.LICENSE.txt +13 -0
  56. package/build/static/js/9311.7c7348b0.chunk.js +1 -0
  57. package/build/static/js/9320.14465db9.chunk.js +1 -0
  58. package/build/static/js/9449.a2c361bb.chunk.js +2 -0
  59. package/build/static/js/9449.a2c361bb.chunk.js.LICENSE.txt +40 -0
  60. package/build/static/js/9699.df050cd6.chunk.js +1 -0
  61. package/build/static/js/9813.1821ef79.chunk.js +1 -0
  62. package/build/static/js/main.ca9c9d66.js +28 -0
  63. package/build/static/js/{main.52e22014.js.LICENSE.txt → main.ca9c9d66.js.LICENSE.txt} +23 -23
  64. package/build/static/media/SourceCodePro-Bold.17a68a0751a813474a0e.woff2 +0 -0
  65. package/build/static/media/SourceCodePro-BoldItalic.d45b7a3df103d441d78b.woff2 +0 -0
  66. package/build/static/media/SourceCodePro-Italic.ec122a420df4175e74f2.woff2 +0 -0
  67. package/build/static/media/SourceCodePro-Regular.84b900b88d09398d86b0.woff2 +0 -0
  68. package/build/static/media/SourceCodePro-SemiBold.17291d1c493cb25eb2c3.woff2 +0 -0
  69. package/build/static/media/SourceCodePro-SemiBoldItalic.f879ae27307c3926522b.woff2 +0 -0
  70. package/build/static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2 +0 -0
  71. package/build/static/media/SourceSansPro-BoldItalic.1d664be59d2eb5fef029.woff2 +0 -0
  72. package/build/static/media/SourceSansPro-Italic.8a9bfea74d43927d6eec.woff2 +0 -0
  73. package/build/static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2 +0 -0
  74. package/build/static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2 +0 -0
  75. package/build/static/media/SourceSansPro-SemiBoldItalic.befb0a2824eabc5ce36b.woff2 +0 -0
  76. package/build/static/media/SourceSerifPro-Bold.d7975b56594770699ae0.woff2 +0 -0
  77. package/build/static/media/SourceSerifPro-BoldItalic.913697a7178b128caa4c.woff2 +0 -0
  78. package/build/static/media/SourceSerifPro-Italic.d3529cb5797663ac5d88.woff2 +0 -0
  79. package/build/static/media/SourceSerifPro-Regular.e6c37aa3926474cc93e1.woff2 +0 -0
  80. package/build/static/media/SourceSerifPro-SemiBold.5c1d378dd5990ef334ca.woff2 +0 -0
  81. package/build/static/media/SourceSerifPro-SemiBoldItalic.249e948b885d0c7d30a8.woff2 +0 -0
  82. package/build/static/media/index.c05687ef19f5bac24939.cjs +1 -0
  83. package/build/static/media/index.cf5b321a6e04bf47c12e.cjs +1 -0
  84. package/build/static/media/index.db61103fb7fdd62b9c44.cjs +1 -0
  85. package/build/static/media/index.f29488c1099d5e3883ac.cjs +1 -0
  86. package/package.json +5 -5
  87. package/build/static/css/5099.60b7ada4.chunk.css +0 -1
  88. package/build/static/css/main.73ab603a.css +0 -1
  89. package/build/static/js/1318.57c335d2.chunk.js +0 -1
  90. package/build/static/js/142.3d0fb3e3.chunk.js +0 -1
  91. package/build/static/js/172.0ee3e7c6.chunk.js +0 -5
  92. package/build/static/js/1839.29b0ce99.chunk.js +0 -1
  93. package/build/static/js/2327.b8572a38.chunk.js +0 -1
  94. package/build/static/js/2775.c1ed54fa.chunk.js +0 -5
  95. package/build/static/js/291.aa03bc71.chunk.js +0 -1
  96. package/build/static/js/2961.54b0c743.chunk.js +0 -2
  97. package/build/static/js/3580.31cb6ce5.chunk.js +0 -1
  98. package/build/static/js/3744.6440bac0.chunk.js +0 -2
  99. package/build/static/js/3744.6440bac0.chunk.js.LICENSE.txt +0 -5
  100. package/build/static/js/3975.5538132d.chunk.js +0 -1
  101. package/build/static/js/4140.edb6c36a.chunk.js +0 -1
  102. package/build/static/js/4141.623ab362.chunk.js +0 -9
  103. package/build/static/js/4320.5977ee6b.chunk.js +0 -2
  104. package/build/static/js/4320.5977ee6b.chunk.js.LICENSE.txt +0 -20
  105. package/build/static/js/5093.304fcb1e.chunk.js +0 -1
  106. package/build/static/js/5099.51feed45.chunk.js +0 -1
  107. package/build/static/js/5177.21c4f353.chunk.js +0 -2
  108. package/build/static/js/5241.0326c97c.chunk.js +0 -1
  109. package/build/static/js/5440.c7134ed1.chunk.js +0 -1
  110. package/build/static/js/5617.837c33c0.chunk.js +0 -1
  111. package/build/static/js/6557.fd2f35c8.chunk.js +0 -1
  112. package/build/static/js/6679.a8b5d830.chunk.js +0 -2
  113. package/build/static/js/6679.a8b5d830.chunk.js.LICENSE.txt +0 -60
  114. package/build/static/js/6683.aab9fa01.chunk.js +0 -1
  115. package/build/static/js/6756.2cb6963c.chunk.js +0 -1
  116. package/build/static/js/6862.886eab8e.chunk.js +0 -1
  117. package/build/static/js/6865.b0803b6b.chunk.js +0 -1
  118. package/build/static/js/6913.30734208.chunk.js +0 -17
  119. package/build/static/js/6939.c09d92c1.chunk.js +0 -1
  120. package/build/static/js/787.a500c8a4.chunk.js +0 -1
  121. package/build/static/js/792.04aad606.chunk.js +0 -1
  122. package/build/static/js/8035.dc118cc9.chunk.js +0 -1
  123. package/build/static/js/8295.c3cd87de.chunk.js +0 -1
  124. package/build/static/js/8418.aed275df.chunk.js +0 -1
  125. package/build/static/js/8486.e56533d6.chunk.js +0 -1
  126. package/build/static/js/865.9e23130b.chunk.js +0 -1
  127. package/build/static/js/9004.6a66722a.chunk.js +0 -1
  128. package/build/static/js/9042.a6fcbc74.chunk.js +0 -5
  129. package/build/static/js/9107.b49ea9ea.chunk.js +0 -5
  130. package/build/static/js/9130.8e10440e.chunk.js +0 -1
  131. package/build/static/js/9166.1a468fb9.chunk.js +0 -2
  132. package/build/static/js/9166.1a468fb9.chunk.js.LICENSE.txt +0 -13
  133. package/build/static/js/9382.c417d448.chunk.js +0 -1
  134. package/build/static/js/9615.c725e9d2.chunk.js +0 -1
  135. package/build/static/js/9733.e3808291.chunk.js +0 -2
  136. package/build/static/js/9733.e3808291.chunk.js.LICENSE.txt +0 -8
  137. package/build/static/js/9915.fe11690a.chunk.js +0 -1
  138. package/build/static/js/main.52e22014.js +0 -28
  139. package/build/static/media/SourceCodePro-Bold.52ac8f3034507f1d9e53.ttf +0 -0
  140. package/build/static/media/SourceCodePro-BoldItalic.05b618077343fbbd92b7.ttf +0 -0
  141. package/build/static/media/SourceCodePro-Italic.454577c22304619db035.ttf +0 -0
  142. package/build/static/media/SourceCodePro-Regular.70cc7ff27245e82ad414.ttf +0 -0
  143. package/build/static/media/SourceCodePro-SemiBold.4d4c53c06b5bebed1cf3.ttf +0 -0
  144. package/build/static/media/SourceCodePro-SemiBoldItalic.2f5470bc8b2cd27a5c4b.ttf +0 -0
  145. package/build/static/media/SourceSansPro-Bold.12e6acd2589d00c9d0aa.ttf +0 -0
  146. package/build/static/media/SourceSansPro-BoldItalic.7c4f9b00300acb82f0f6.ttf +0 -0
  147. package/build/static/media/SourceSansPro-Italic.3c01996d38a55834ddcb.ttf +0 -0
  148. package/build/static/media/SourceSansPro-Regular.efa76f8326aa5cee3bdd.ttf +0 -0
  149. package/build/static/media/SourceSansPro-SemiBold.43cc81b496222dc9ce3c.ttf +0 -0
  150. package/build/static/media/SourceSansPro-SemiBoldItalic.c30987e28fc21daba1ae.ttf +0 -0
  151. package/build/static/media/SourceSerifPro-Bold.bada4fe17051c992f22f.ttf +0 -0
  152. package/build/static/media/SourceSerifPro-BoldItalic.9f9b1eb2d82e26bb2f4a.ttf +0 -0
  153. package/build/static/media/SourceSerifPro-Italic.90931d6ad253cd8de8e4.ttf +0 -0
  154. package/build/static/media/SourceSerifPro-Regular.6f22301c30206f4bad62.ttf +0 -0
  155. package/build/static/media/SourceSerifPro-SemiBold.b27cb117978bab2c80a3.ttf +0 -0
  156. package/build/static/media/SourceSerifPro-SemiBoldItalic.1266f2c17835efdcff7b.ttf +0 -0
  157. package/build/static/media/index.09797f5e19b3c0491904.cjs +0 -1
  158. package/build/static/media/index.1e3d64b0fcde879f0060.cjs +0 -1
  159. package/build/static/media/index.85823dd8655ed4119d0c.cjs +0 -1
  160. package/build/static/media/index.b599194a631d76b49328.cjs +0 -1
  161. /package/build/static/css/{4320.1edfa457.chunk.css → 9449.1edfa457.chunk.css} +0 -0
  162. /package/build/static/js/{5177.21c4f353.chunk.js.LICENSE.txt → 8097.4837946f.chunk.js.LICENSE.txt} +0 -0
  163. /package/build/static/js/{3603.e3f6f11d.chunk.js.LICENSE.txt → 8186.2f2e42e5.chunk.js.LICENSE.txt} +0 -0
@@ -1,5 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9042],{53370:(t,e,r)=>{r.d(e,{Z:()=>u});r(5057);var n=r(46434),o=r(18950),i=r(45490);const a=r(21371).F4`
2
- 50% {
3
- color: rgba(0, 0, 0, 0);
4
- }
5
- `,s=(0,i.Z)("span",{target:"e1y2jo8h0"})((({includeDot:t,shouldBlink:e,theme:r})=>({...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:r.colors.gray,margin:"0 5px"}}:{},...e?{color:r.colors.red,animationName:`${a}`,animationDuration:"0.5s",animationIterationCount:5}:{}})),"");var l=r(96266);const u=({dirty:t,value:e,maxLength:r,className:i,type:a="single"})=>{const u=[],c=(t,e=!1)=>{u.push((0,l.jsx)(s,{includeDot:u.length>0,shouldBlink:e,children:t},u.length))};return t&&("multiline"===a?(0,n.Ge)()?c("Press \u2318+Enter to apply"):c("Press Ctrl+Enter to apply"):"single"===a&&c("Press Enter to apply")),r&&("chat"!==a||t)&&c(`${e.length}/${r}`,t&&e.length>=r),(0,l.jsx)(o.X7,{"data-testid":"InputInstructions",className:i,children:u})}},86324:(t,e,r)=>{r.r(e),r.d(e,{default:()=>y});var n=r(5057),o=r(30124),i=r(98927),a=r(98209),s=r(53370),l=r(18950),u=r(4337),c=r(89401),p=r(46434);const d=(0,r(45490).Z)("div",{target:"e1q7aese0"})((({width:t})=>({position:"relative",width:t})),"");var h=r(96266);class f extends n.PureComponent{constructor(...t){super(...t),this.formClearHelper=new a.Kz,this.state={dirty:!1,value:this.initialValue},this.commitWidgetValue=t=>{this.props.widgetMgr.setStringValue(this.props.element,this.state.value,t),this.setState({dirty:!1})},this.onFormCleared=()=>{this.setState(((t,e)=>({value:e.element.default})),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0})},this.onChange=t=>{const{value:e}=t.target,{element:r}=this.props,{maxChars:n}=r;0!==n&&e.length>n||((0,p.$b)(this.props.element)?this.setState({dirty:!1,value:e},(()=>this.commitWidgetValue({fromUi:!0}))):this.setState({dirty:!0,value:e}))},this.onKeyPress=t=>{"Enter"===t.key&&this.state.dirty&&this.commitWidgetValue({fromUi:!0})}}get initialValue(){const t=this.props.widgetMgr.getStringValue(this.props.element);return void 0!==t?t:this.props.element.default}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:t}=this.props.element;t&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:t}=this.props.element;this.props.element.setValue=!1,this.setState({value:t},(()=>{this.commitWidgetValue({fromUi:!1})}))}getTypeString(){return this.props.element.type===i.oi.Type.PASSWORD?"password":"text"}render(){var t;const{dirty:e,value:r}=this.state,{element:n,width:i,disabled:a,widgetMgr:f}=this.props,{placeholder:y}=n;return this.formClearHelper.manageFormClearListener(f,n.formId,this.onFormCleared),(0,h.jsxs)(d,{className:"row-widget stTextInput",width:i,children:[(0,h.jsx)(l.ON,{label:n.label,disabled:a,labelVisibility:(0,p.iF)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),children:n.help&&(0,h.jsx)(l.dT,{children:(0,h.jsx)(u.ZP,{content:n.help,placement:c.ug.TOP_RIGHT})})}),(0,h.jsx)(o.Z,{value:r,placeholder:y,onBlur:this.onBlur,onChange:this.onChange,onKeyPress:this.onKeyPress,"aria-label":n.label,disabled:a,type:this.getTypeString(),autoComplete:n.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:"1.4",paddingRight:".5rem",paddingLeft:".5rem",paddingBottom:".5rem",paddingTop:".5rem"}},Root:{style:{borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px"}}}}),(0,h.jsx)(s.Z,{dirty:e,value:r,maxLength:n.maxChars})]})}}const y=f},30124:(t,e,r)=>{r.d(e,{Z:()=>x});var n=r(5057),o=r(80099),i=r(91224),a=r(97135),s=r(4547),l=r(18150);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}var c=["Root","StartEnhancer","EndEnhancer"],p=["startEnhancer","endEnhancer","overrides"];function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},d.apply(this,arguments)}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function y(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function g(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j(t);if(e){var o=j(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===u(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return v(t)}(this,r)}}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function j(t){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},j(t)}function w(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var O=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(j,t);var e,r,u,f=g(j);function j(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,j);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return w(v(t=f.call.apply(f,[this].concat(r))),"state",{isFocused:t.props.autoFocus||!1}),w(v(t),"onFocus",(function(e){t.setState({isFocused:!0}),t.props.onFocus(e)})),w(v(t),"onBlur",(function(e){t.setState({isFocused:!1}),t.props.onBlur(e)})),t}return e=j,(r=[{key:"render",value:function(){var t=this.props,e=t.startEnhancer,r=t.endEnhancer,u=t.overrides,f=u.Root,m=u.StartEnhancer,b=u.EndEnhancer,g=y(u,c),v=y(t,p),j=h((0,o.jb)(f,s.fC),2),w=j[0],O=j[1],x=h((0,o.jb)(m,s.Fp),2),E=x[0],C=x[1],F=h((0,o.jb)(b,s.Fp),2),T=F[0],V=F[1],B=(0,i.t)(this.props,this.state);return n.createElement(w,d({"data-baseweb":"input"},B,O,{$adjoined:P(e,r),$hasIconTrailing:this.props.clearable||"password"==this.props.type}),S(e)&&n.createElement(E,d({},B,C,{$position:l.Xf.start}),"function"===typeof e?e(B):e),n.createElement(a.Z,d({},v,{overrides:g,adjoined:P(e,r),onFocus:this.onFocus,onBlur:this.onBlur})),S(r)&&n.createElement(T,d({},B,V,{$position:l.Xf.end}),"function"===typeof r?r(B):r))}}])&&m(e.prototype,r),u&&m(e,u),Object.defineProperty(e,"prototype",{writable:!1}),j}(n.Component);function P(t,e){return S(t)&&S(e)?l.y4.both:S(t)?l.y4.left:S(e)?l.y4.right:l.y4.none}function S(t){return Boolean(t||0===t)}w(O,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:l.NO.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});const x=O}}]);
@@ -1,5 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9107],{53370:(e,t,r)=>{r.d(t,{Z:()=>u});r(5057);var n=r(46434),o=r(18950),i=r(45490);const a=r(21371).F4`
2
- 50% {
3
- color: rgba(0, 0, 0, 0);
4
- }
5
- `,s=(0,i.Z)("span",{target:"e1y2jo8h0"})((({includeDot:e,shouldBlink:t,theme:r})=>({...e?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:r.colors.gray,margin:"0 5px"}}:{},...t?{color:r.colors.red,animationName:`${a}`,animationDuration:"0.5s",animationIterationCount:5}:{}})),"");var l=r(96266);const u=({dirty:e,value:t,maxLength:r,className:i,type:a="single"})=>{const u=[],c=(e,t=!1)=>{u.push((0,l.jsx)(s,{includeDot:u.length>0,shouldBlink:t,children:e},u.length))};return e&&("multiline"===a?(0,n.Ge)()?c("Press \u2318+Enter to apply"):c("Press Ctrl+Enter to apply"):"single"===a&&c("Press Enter to apply")),r&&("chat"!==a||e)&&c(`${t.length}/${r}`,e&&t.length>=r),(0,l.jsx)(o.X7,{"data-testid":"InputInstructions",className:i,children:u})}},99107:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var n=r(5057),o=r(98209),i=r(76866),a=r(53370),s=r(18950),l=r(4337),u=r(89401),c=r(46434);const p=(0,r(45490).Z)("div",{target:"eqs61l00"})({name:"1om1ktf",styles:"div{border-width:1px;}"});var d=r(96266);class f extends n.PureComponent{constructor(...e){super(...e),this.formClearHelper=new o.Kz,this.state={dirty:!1,value:this.initialValue},this.commitWidgetValue=e=>{this.props.widgetMgr.setStringValue(this.props.element,this.state.value,e),this.setState({dirty:!1})},this.onFormCleared=()=>{this.setState(((e,t)=>({value:t.element.default})),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0})},this.onChange=e=>{const{value:t}=e.target,{element:r}=this.props,{maxChars:n}=r;0!==n&&t.length>n||((0,c.$b)(this.props.element)?this.setState({dirty:!1,value:t},(()=>this.commitWidgetValue({fromUi:!0}))):this.setState({dirty:!0,value:t}))},this.isEnterKeyPressed=e=>{const{keyCode:t,key:r}=e;return"Enter"===r||13===t||10===t},this.onKeyDown=e=>{const{metaKey:t,ctrlKey:r}=e,{dirty:n}=this.state;this.isEnterKeyPressed(e)&&(r||t)&&n&&(e.preventDefault(),this.commitWidgetValue({fromUi:!0}))}}get initialValue(){const e=this.props.widgetMgr.getStringValue(this.props.element);return void 0!==e?e:this.props.element.default}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:e},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var e;const{element:t,disabled:r,width:n,widgetMgr:o}=this.props,{value:f,dirty:h}=this.state,y={width:n},{height:m,placeholder:b}=t;return this.formClearHelper.manageFormClearListener(o,t.formId,this.onFormCleared),(0,d.jsxs)("div",{className:"stTextArea",style:y,children:[(0,d.jsx)(s.ON,{label:t.label,disabled:r,labelVisibility:(0,c.iF)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),children:t.help&&(0,d.jsx)(s.dT,{children:(0,d.jsx)(l.ZP,{content:t.help,placement:u.ug.TOP_RIGHT})})}),(0,d.jsx)(p,{children:(0,d.jsx)(i.Z,{"data-testid":"stTextArea",value:f,placeholder:b,onBlur:this.onBlur,onChange:this.onChange,onKeyDown:this.onKeyDown,"aria-label":t.label,disabled:r,overrides:{Input:{style:{lineHeight:"1.4",height:m?`${m}px`:"",minHeight:"95px",resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:"1rem",paddingLeft:"1rem",paddingBottom:"1rem",paddingTop:"1rem"}}}})}),(0,d.jsx)(a.Z,{dirty:h,value:f,maxLength:t.maxChars,type:"multiline"})]})}}const h=f},76866:(e,t,r)=>{r.d(t,{Z:()=>C});var n=r(5057),o=r(80099),i=r(97135),a=r(18150),s=r(53381),l=r(4547);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var d=(0,s.zo)("div",(function(e){return c(c({},(0,l.d5)(c(c({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})}));d.displayName="StyledTextAreaRoot",d.displayName="StyledTextAreaRoot";var f=(0,s.zo)("div",(function(e){return(0,l.hB)(c({$positive:!1},e))}));f.displayName="StyledTextareaContainer",f.displayName="StyledTextareaContainer";var h=(0,s.zo)("textarea",(function(e){return c(c({},(0,l.Hx)(e)),{},{resize:e.$resize||"none"})}));function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function w(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=P(e);if(t){var o=P(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}(this,r)}}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}h.displayName="StyledTextarea",h.displayName="StyledTextarea";var S=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new 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&&O(e,t)}(u,e);var t,r,s,l=w(u);function u(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return x(j(e=l.call.apply(l,[this].concat(r))),"state",{isFocused:e.props.autoFocus||!1}),x(j(e),"onFocus",(function(t){e.setState({isFocused:!0}),e.props.onFocus(t)})),x(j(e),"onBlur",(function(t){e.setState({isFocused:!1}),e.props.onBlur(t)})),e}return t=u,(r=[{key:"render",value:function(){var e=this.props.overrides,t=void 0===e?{}:e,r=b((0,o.jb)(t.Root,d),2),s=r[0],l=r[1],u=(0,o.aO)({Input:{component:h},InputContainer:{component:f}},t);return n.createElement(s,m({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},l),n.createElement(i.Z,m({},this.props,{type:a.iB.textarea,overrides:u,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}])&&v(t.prototype,r),s&&v(t,s),Object.defineProperty(t,"prototype",{writable:!1}),u}(n.Component);x(S,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:a.NO.default});const C=S}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9130],{83201:(e,t,i)=>{i.d(t,{$:()=>c,Z:()=>p});var s=i(5057),n=i(31476),a=i(23878),l=i(16449),r=i(80099),o=i(35450),d=i(96266);let c;!function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"}(c||(c={}));const p=function({value:e,width:t,size:i=c.SMALL,overrides:p}){const g=(0,n.u)(),h={xs:g.spacing.twoXS,sm:g.spacing.sm,md:g.spacing.lg,lg:g.spacing.xl,xl:g.spacing.twoXL},{activeTheme:m}=s.useContext(o.E),u=!(0,a.MJ)(m),x={BarContainer:{style:{marginTop:g.spacing.none,marginBottom:g.spacing.none,marginRight:g.spacing.none,marginLeft:g.spacing.none}},Bar:{style:({$theme:e})=>({width:t?t.toString():void 0,marginTop:g.spacing.none,marginBottom:g.spacing.none,marginRight:g.spacing.none,marginLeft:g.spacing.none,height:h[i],backgroundColor:e.colors.progressbarTrackFill,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})},BarProgress:{style:()=>({backgroundColor:u?g.colors.primary:g.colors.blue70,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})}};return(0,d.jsx)(l.Z,{value:e,overrides:(0,r.aO)(x,p)})}},90747:(e,t,i)=>{i.d(t,{R:()=>s});class s{setStatus(e){return new s(this.name,this.size,this.id,e)}constructor(e,t,i,s){this.name=void 0,this.size=void 0,this.status=void 0,this.id=void 0,this.name=e,this.size=t,this.id=i,this.status=s}}},49130:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ce});var s=i(10458),n=i.n(s),a=i(65873),l=i.n(a),r=i(5057),o=i(98927),d=i(98209),c=i(46434);let p;!function(e){e.Gigabyte="gb",e.Megabyte="mb",e.Kilobyte="kb",e.Byte="b"}(p||(p={}));const g=(0,c.rA)()?1024:1e3,h=[p.Gigabyte,p.Megabyte,p.Kilobyte,p.Byte],m=(e,t,i=1)=>{if(t||(t=p.Byte),i<0&&(i=0),e<0)throw new Error("Size must be greater than or equal to 0");const s=h.indexOf(t);return s&&e>g/2?m(e/g,h[s-1],i):`${e.toFixed(i)}${t.toUpperCase()}`};var u=i(18950),x=i(4337),f=i(89401),b=i(71096),y=i(46401),S=i(45490);const j=(0,S.Z)("section",{target:"eqdbnj015"})((({isDisabled:e,theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.lg,backgroundColor:t.colors.secondaryBg,borderRadius:t.radii.lg,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${t.colors.primary}`},color:e?t.colors.gray:t.colors.bodyText})),""),w=(0,S.Z)("div",{target:"eqdbnj014"})((()=>({marginRight:"auto",alignItems:"center",display:"flex"})),""),F=(0,S.Z)("span",{target:"eqdbnj013"})((({theme:e})=>({color:e.colors.darkenedBgMix100,marginRight:e.spacing.lg})),""),v=(0,S.Z)("span",{target:"eqdbnj012"})((({theme:e})=>({marginBottom:e.spacing.twoXS})),""),I=(0,S.Z)("div",{target:"eqdbnj011"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"}),z=(0,S.Z)("div",{target:"eqdbnj010"})((({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),""),B=(0,S.Z)("ul",{target:"eqdbnj09"})((()=>({listStyleType:"none",marginBottom:0})),""),M=(0,S.Z)("li",{target:"eqdbnj08"})((({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),""),L=(0,S.Z)("div",{target:"eqdbnj07"})((({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),""),Z=(0,S.Z)("div",{target:"eqdbnj06"})((({theme:e})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),""),R=(0,S.Z)("div",{target:"eqdbnj05"})((({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),""),C=(0,S.Z)("span",{target:"eqdbnj04"})((({theme:e})=>({marginRight:e.spacing.twoXS})),""),k=(0,S.Z)("div",{target:"eqdbnj03"})((({theme:e})=>({display:"flex",padding:e.spacing.twoXS,color:e.colors.darkenedBgMix100})),""),U=(0,S.Z)("small",{target:"eqdbnj02"})((({theme:e})=>({color:e.colors.danger,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),""),P=(0,S.Z)("span",{target:"eqdbnj01"})({name:"0",styles:""}),T=e=>({[j]:{display:"flex",flexDirection:"column",alignItems:"flex-start"},[w]:{marginBottom:e.spacing.lg},[F]:{display:"none"},[z]:{paddingRight:e.spacing.lg},[R]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[Z]:{width:e.sizes.full},[L]:{flexDirection:"column"},[U]:{height:"auto",whiteSpace:"initial"},[P]:{display:"none"},[M]:{margin:e.spacing.none,padding:e.spacing.none}}),X=(0,S.Z)("div",{target:"eqdbnj00"})((({theme:e})=>e.inSidebar?T(e):{[`@media (max-width: ${e.breakpoints.sm})`]:T(e)}),"");var E=i(44071),D=i(87509),q=i(43056),A=i(96266);const N=({multiple:e,acceptedExtensions:t,maxSizeBytes:i})=>(0,A.jsxs)(w,{children:[(0,A.jsx)(F,{children:(0,A.jsx)(D.ZP,{content:E.n,size:"threeXL"})}),(0,A.jsxs)(I,{children:[(0,A.jsxs)(v,{children:["Drag and drop file",e?"s":""," here"]}),(0,A.jsxs)(q.x,{children:[`Limit ${m(i,p.Byte,0)} per file`,t.length?` \u2022 ${t.join(", ").replace(/\./g,"").toUpperCase()}`:null]})]})]}),V=({onDrop:e,multiple:t,acceptedExtensions:i,maxSizeBytes:s,disabled:n,label:a})=>(0,A.jsx)(b.ZP,{onDrop:e,multiple:t,accept:i.length?i:void 0,maxSize:s,disabled:n,useFsAccessApi:!1,children:({getRootProps:e,getInputProps:l})=>(0,A.jsxs)(j,{...e(),"data-testid":"stFileUploadDropzone",isDisabled:n,"aria-label":a,children:[(0,A.jsx)("input",{...l()}),(0,A.jsx)(N,{multiple:t,acceptedExtensions:i,maxSizeBytes:s}),(0,A.jsx)(y.ZP,{kind:y.nW.SECONDARY,disabled:n,size:y.V5.SMALL,children:"Browse files"})]})});var $=i(56129),O=i.n($),H=i(75427),W=i(5642);const _=(0,S.Z)("div",{target:"e1ws6rcx1"})((({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),""),G=(0,S.Z)("div",{target:"e1ws6rcx0"})((({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),""),K=({className:e,currentPage:t,totalPages:i,onNext:s,onPrevious:n})=>(0,A.jsxs)(_,{className:e,children:[(0,A.jsx)(q.x,{children:`Showing page ${t} of ${i}`}),(0,A.jsxs)(G,{children:[(0,A.jsx)(y.ZP,{onClick:n,kind:y.nW.MINIMAL,children:(0,A.jsx)(D.ZP,{content:H.s,size:"xl"})}),(0,A.jsx)(y.ZP,{onClick:s,kind:y.nW.MINIMAL,children:(0,A.jsx)(D.ZP,{content:W._,size:"xl"})})]})]});var J=i(83754);const Y=(e,t)=>Math.ceil(e.length/t),Q=e=>O()((({pageSize:t,items:i,resetOnAdd:s,...n})=>{const[a,l]=(0,r.useState)(0),[o,d]=(0,r.useState)(Y(i,t)),c=(0,J.D)(i);(0,r.useEffect)((()=>{c&&c.length!==i.length&&d(Y(i,t)),c&&c.length<i.length?s&&l(0):a+1>=o&&l(o-1)}),[i,a,t,c,s,o]);const p=i.slice(a*t,a*t+t);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(e,{items:p,...n}),i.length>t?(0,A.jsx)(K,{className:"streamlit-paginator",pageSize:t,totalPages:o,currentPage:a+1,onNext:()=>{l(Math.min(a+1,o-1))},onPrevious:()=>{l(Math.max(0,a-1))}}):null]})}),e);var ee=i(15766),te=i(31906),ie=i(13324),se=i(83201);const ne=({fileInfo:e})=>"uploading"===e.status.type?(0,A.jsx)(se.Z,{value:e.status.progress,size:se.$.SMALL,overrides:{Bar:{style:{marginLeft:0,marginTop:"4px"}}}}):"error"===e.status.type?(0,A.jsxs)(U,{children:[(0,A.jsx)(C,{"data-testid":"stUploadedFileErrorMessage",children:e.status.errorMessage}),(0,A.jsx)(P,{children:(0,A.jsx)(D.ZP,{content:ee.j,size:"lg"})})]}):"uploaded"===e.status.type?(0,A.jsx)(q.x,{children:m(e.size,p.Byte)}):null,ae=({fileInfo:e,onDelete:t})=>(0,A.jsxs)(R,{className:"uploadedFile",children:[(0,A.jsx)(k,{children:(0,A.jsx)(D.ZP,{content:te.h,size:"twoXL"})}),(0,A.jsxs)(L,{className:"uploadedFileData",children:[(0,A.jsx)(Z,{className:"uploadedFileName",title:e.name,children:e.name}),(0,A.jsx)(ne,{fileInfo:e})]}),(0,A.jsx)("div",{"data-testid":"fileDeleteBtn",children:(0,A.jsx)(y.ZP,{onClick:()=>t(e.id),kind:y.nW.MINIMAL,children:(0,A.jsx)(D.ZP,{content:ie.U,size:"lg"})})})]}),le=Q((({items:e,onDelete:t})=>(0,A.jsx)(B,{children:e.map((e=>(0,A.jsx)(M,{children:(0,A.jsx)(ae,{fileInfo:e,onDelete:t})},e.id)))}))),re=e=>(0,A.jsx)(z,{children:(0,A.jsx)(le,{...e})});var oe=i(90747);class de extends r.PureComponent{constructor(e){super(e),this.formClearHelper=new d.Kz,this.localFileIdCounter=1,this.componentDidUpdate=e=>{const{element:t,widgetMgr:i}=this.props;if(e.disabled!==this.props.disabled&&this.props.disabled)return this.reset(),void i.setFileUploaderStateValue(t,new o.xO,{fromUi:!1});if("ready"!==this.status)return;const s=this.createWidgetValue();if(void 0===s)return;const n=i.getFileUploaderStateValue(t);l().isEqual(s,n)||i.setFileUploaderStateValue(t,s,{fromUi:!0})},this.reset=()=>{this.setState({files:[]})},this.dropHandler=(e,t)=>{const{element:i}=this.props,{multipleFiles:s}=i;if(!s&&0===e.length&&t.length>1){const i=t.findIndex((e=>1===e.errors.length&&"too-many-files"===e.errors[0].code));i>=0&&(e.push(t[i].file),t.splice(i,1))}if(!s&&e.length>0&&this.state.files.length>0&&this.removeFile(this.state.files[0].id),e.forEach(this.uploadFile),t.length>0){const e=t.map((e=>{const{file:t}=e;return new oe.R(t.name,t.size,this.nextLocalFileId(),{type:"error",errorMessage:this.getErrorMessage(e.errors[0].code,e.file)})}));this.addFiles(e)}},this.uploadFile=e=>{const t=n().CancelToken.source(),i=new oe.R(e.name,e.size,this.nextLocalFileId(),{type:"uploading",cancelToken:t,progress:1});this.addFile(i),this.props.uploadClient.uploadFile(this.props.element,e,(e=>this.onUploadProgress(e,i.id)),t.token).then((e=>this.onUploadComplete(i.id,e))).catch((e=>{n().isCancel(e)||this.updateFile(i.id,i.setStatus({type:"error",errorMessage:e?e.toString():"Unknown error"}))}))},this.onUploadComplete=(e,t)=>{this.setState((e=>({newestServerFileId:Math.max(e.newestServerFileId,t)})));const i=this.getFile(e);null!=i&&"uploading"===i.status.type&&this.updateFile(i.id,i.setStatus({type:"uploaded",serverFileId:t}))},this.getErrorMessage=(e,t)=>{switch(e){case"file-too-large":return`File must be ${m(this.maxUploadSizeInBytes,p.Byte)} or smaller.`;case"file-invalid-type":return`${t.type} files are not allowed.`;case"file-too-small":return"File size is too small.";case"too-many-files":return"Only one file is allowed.";default:return"Unexpected error. Please try again."}},this.deleteFile=e=>{const t=this.getFile(e);null!=t&&("uploading"===t.status.type&&t.status.cancelToken.cancel(),this.removeFile(e))},this.addFile=e=>{this.setState((t=>({files:[...t.files,e]})))},this.addFiles=e=>{this.setState((t=>({files:[...t.files,...e]})))},this.removeFile=e=>{this.setState((t=>({files:t.files.filter((t=>t.id!==e))})))},this.getFile=e=>this.state.files.find((t=>t.id===e)),this.updateFile=(e,t)=>{this.setState((i=>({files:i.files.map((i=>i.id===e?t:i))})))},this.onUploadProgress=(e,t)=>{const i=this.getFile(t);if(null==i||"uploading"!==i.status.type)return;const s=Math.round(100*e.loaded/e.total);i.status.progress!==s&&this.updateFile(t,i.setStatus({type:"uploading",cancelToken:i.status.cancelToken,progress:s}))},this.onFormCleared=()=>{this.setState({files:[]},(()=>{const e=this.createWidgetValue();null!=e&&this.props.widgetMgr.setFileUploaderStateValue(this.props.element,e,{fromUi:!0})}))},this.state=this.initialValue}get initialValue(){const e={files:[],newestServerFileId:0},{widgetMgr:t,element:i}=this.props,s=t.getFileUploaderStateValue(i);if(null==s)return e;const{maxFileId:n,uploadedFileInfo:a}=s;return null==n||0===n||null==a?e:{files:a.map((e=>{const t=e.name,i=e.size,s=e.id;return new oe.R(t,i,this.nextLocalFileId(),{type:"uploaded",serverFileId:s})})),newestServerFileId:Number(n)}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){return((e,t,i)=>{if(e<0)throw Error("Size must be 0 or greater");const s=h.findIndex((e=>e===t)),n=h.findIndex((e=>e===i));if(-1===s||-1===n)throw Error("Unexpected byte unit provided");if(s===n)return e;const a=Math.abs(s-n),l=g**a;return s>n?e/l:e*l})(this.props.element.maxUploadSizeMb,p.Megabyte,p.Byte)}get status(){return this.state.files.some((e=>"uploading"===e.status.type))?"updating":"ready"}createWidgetValue(){if(0===this.state.newestServerFileId)return;const e=this.state.files.filter((e=>"uploaded"===e.status.type)).map((e=>{const{name:t,size:i,status:s}=e;return new o.jM({id:s.serverFileId,name:t,size:i})}));return new o.xO({maxFileId:this.state.newestServerFileId,uploadedFileInfo:e})}render(){var e;const{files:t}=this.state,{element:i,disabled:s,widgetMgr:n}=this.props,a=i.type;this.formClearHelper.manageFormClearListener(n,i.formId,this.onFormCleared);const l=t.slice().reverse();return(0,A.jsxs)(X,{"data-testid":"stFileUploader",children:[(0,A.jsx)(u.ON,{label:i.label,disabled:s,labelVisibility:(0,c.iF)(null===(e=i.labelVisibility)||void 0===e?void 0:e.value),children:i.help&&(0,A.jsx)(u.dT,{children:(0,A.jsx)(x.ZP,{content:i.help,placement:f.ug.TOP_RIGHT})})}),(0,A.jsx)(V,{onDrop:this.dropHandler,multiple:i.multipleFiles,acceptedExtensions:a,maxSizeBytes:this.maxUploadSizeInBytes,label:i.label,disabled:s}),l.length>0&&(0,A.jsx)(re,{items:l,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0})]})}nextLocalFileId(){return this.localFileIdCounter++}}const ce=de}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 9166.1a468fb9.chunk.js.LICENSE.txt */
2
- (globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9166],{96457:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var i=r(85471),n=r(5057),o=r(95421),a=n.forwardRef((function(e,t){return n.createElement(o.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),n.createElement("rect",{width:24,height:24,fill:"none"}),n.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))}));a.displayName="SwitchCamera"},85585:(e,t,r)=>{"use strict";r.d(t,{n:()=>a});var i=r(31478),n=r(5057),o=r(95421),a=n.forwardRef((function(e,t){return n.createElement(o.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))}));a.displayName="Video"},30967:(e,t,r)=>{"use strict";r.d(t,{X:()=>a});var i=r(31478),n=r(5057),o=r(95421),a=n.forwardRef((function(e,t){return n.createElement(o.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))}));a.displayName="X"},74947:function(e,t,r){var i;i=function(e){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(e,t,r){"use strict";r.r(t);var i=r("react"),n=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),o=function(){return o=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)},a=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r};function s(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)}"undefined"!==typeof window&&(void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise((function(r,i){t.call(navigator,e,r,i)})):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}));var c=function(e){function t(t){var r=e.call(this,t)||this;return r.canvas=null,r.ctx=null,r.requestUserMediaId=0,r.unmounted=!1,r.state={hasUserMedia:!1},r}return n(t,e),t.prototype.componentDidMount=function(){var e=this.state,t=this.props;this.unmounted=!1,s()?(e.hasUserMedia||this.requestUserMedia(),t.children&&"function"!=typeof t.children&&console.warn("children must be a function")):t.onUserMediaError("getUserMedia not supported")},t.prototype.componentDidUpdate=function(e){var t=this.props;if(s()){var r=JSON.stringify(e.audioConstraints)!==JSON.stringify(t.audioConstraints),i=JSON.stringify(e.videoConstraints)!==JSON.stringify(t.videoConstraints),n=e.minScreenshotWidth!==t.minScreenshotWidth,o=e.minScreenshotHeight!==t.minScreenshotHeight;(i||n||o)&&(this.canvas=null,this.ctx=null),(r||i)&&(this.stopAndCleanup(),this.requestUserMedia())}else t.onUserMediaError("getUserMedia not supported")},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},t.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map((function(t){e.removeTrack(t),t.stop()})),e.getAudioTracks().map((function(t){e.removeTrack(t),t.stop()}))):e.stop())},t.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(t.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},t.prototype.getScreenshot=function(e){var t=this.state,r=this.props;if(!t.hasUserMedia)return null;var i=this.getCanvas(e);return i&&i.toDataURL(r.screenshotFormat,r.screenshotQuality)},t.prototype.getCanvas=function(e){var t=this.state,r=this.props;if(!this.video)return null;if(!t.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var i=this.video.videoWidth,n=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var o=i/n;n=(i=r.minScreenshotWidth||this.video.clientWidth)/o,r.minScreenshotHeight&&n<r.minScreenshotHeight&&(i=(n=r.minScreenshotHeight)*o)}this.canvas=document.createElement("canvas"),this.canvas.width=(null===e||void 0===e?void 0:e.width)||i,this.canvas.height=(null===e||void 0===e?void 0:e.height)||n,this.ctx=this.canvas.getContext("2d")}var a=this.ctx,s=this.canvas;return a&&s&&(r.mirrored&&(a.translate(s.width,0),a.scale(-1,1)),a.imageSmoothingEnabled=r.imageSmoothing,a.drawImage(this.video,0,0,(null===e||void 0===e?void 0:e.width)||s.width,(null===e||void 0===e?void 0:e.height)||s.height),r.mirrored&&(a.scale(-1,1),a.translate(-s.width,0))),s},t.prototype.requestUserMedia=function(){var e=this,r=this.props,i=function(i,n){var o={video:"undefined"===typeof n||n};r.audio&&(o.audio="undefined"===typeof i||i),e.requestUserMediaId++;var a=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(o).then((function(r){e.unmounted||a!==e.requestUserMediaId?t.stopMediaStream(r):e.handleUserMedia(null,r)})).catch((function(t){e.handleUserMedia(t)}))};if("mediaDevices"in navigator)i(r.audioConstraints,r.videoConstraints);else{var n=function(e){return{optional:[{sourceId:e}]}},o=function(e){var t=e.deviceId;return"string"===typeof t?t:Array.isArray(t)&&t.length>0?t[0]:"object"===typeof t&&t.ideal?t.ideal:null};MediaStreamTrack.getSources((function(e){var t=null,a=null;e.forEach((function(e){"audio"===e.kind?t=e.id:"video"===e.kind&&(a=e.id)}));var s=o(r.audioConstraints);s&&(t=s);var c=o(r.videoConstraints);c&&(a=c),i(n(t),n(a))}))}},t.prototype.handleUserMedia=function(e,t){var r=this.props;if(e||!t)return this.setState({hasUserMedia:!1}),void r.onUserMediaError(e);this.stream=t;try{this.video&&(this.video.srcObject=t),this.setState({hasUserMedia:!0})}catch(i){this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(t)})}r.onUserMedia(t)},t.prototype.render=function(){var e=this,t=this.state,r=this.props,n=r.audio,s=(r.forceScreenshotSourceSize,r.onUserMedia,r.onUserMediaError,r.screenshotFormat,r.screenshotQuality,r.minScreenshotWidth,r.minScreenshotHeight,r.audioConstraints,r.videoConstraints,r.imageSmoothing,r.mirrored),c=r.style,d=void 0===c?{}:c,u=r.children,l=a(r,["audio","forceScreenshotSourceSize","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),h=s?o(o({},d),{transform:(d.transform||"")+" scaleX(-1)"}):d,f={getScreenshot:this.getScreenshot.bind(this)};return i.createElement(i.Fragment,null,i.createElement("video",o({autoPlay:!0,src:t.src,muted:!n,playsInline:!0,ref:function(t){e.video=t},style:h},l)),u&&u(f))},t.defaultProps={audio:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},t}(i.Component);t.default=c},react:function(t,r){t.exports=e}}).default},e.exports=i(r(5057))},85471:(e,t,r)=>{"use strict";function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},i.apply(this,arguments)}r.d(t,{Z:()=>i})}}]);
@@ -1,13 +0,0 @@
1
- /*! exports provided: default */
2
-
3
- /*! no static exports found */
4
-
5
- /*! react */
6
-
7
- /*!******************************!*\
8
- !*** ./src/react-webcam.tsx ***!
9
- \******************************/
10
-
11
- /*!**************************************************************************************!*\
12
- !*** external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} ***!
13
- \**************************************************************************************/
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9382],{29382:(t,e,i)=>{i.r(e),i.d(e,{default:()=>V});var a=i(5057),n=i(31476),s=i(95870),o=i(40807),r=i.n(o),h=i(82601),d=i(55927),l=i(11787),c=i(55177),g=i(42915),u=i(79220);const f=(0,i(45490).Z)("div",{target:"e1827qsy0"})((({theme:t})=>({"&.vega-embed":{".vega-actions":{zIndex:t.zIndices.popupMenu},summary:{height:"auto",zIndex:t.zIndices.menuButton}}})),"");var p=i(96266);const m={DATAFRAME_INDEX:"(index)"},w="source",v=new Set(["datetimeIndex","float_64Index","int_64Index","rangeIndex","timedeltaIndex","uint_64Index"]);class b extends a.PureComponent{constructor(...t){super(...t),this.vegaView=void 0,this.vegaFinalizer=void 0,this.defaultDataName=w,this.element=null,this.state={error:void 0},this.finalizeView=()=>{this.vegaFinalizer&&this.vegaFinalizer(),this.vegaFinalizer=void 0,this.vegaView=void 0},this.generateSpec=()=>{const{element:t,theme:e}=this.props,i=JSON.parse(t.get("spec")),a=JSON.parse(t.get("useContainerWidth"));if(i.config=function(t,e){const{colors:i,fontSizes:a,genericFonts:n}=e,s={labelFont:n.bodyFont,titleFont:n.bodyFont,labelFontSize:a.twoSmPx,titleFontSize:a.twoSmPx},o={background:i.bgColor,axis:{labelColor:i.bodyText,titleColor:i.bodyText,gridColor:i.fadedText10,...s},legend:{labelColor:i.bodyText,titleColor:i.bodyText,...s},title:{color:i.bodyText,subtitleColor:i.bodyText,...s},header:{labelColor:i.bodyText},view:{continuousHeight:300,continuousWidth:400}};if(!t)return o;return r()({},o,t)}(i.config,e),this.props.height?(i.width=this.props.width-38,i.height=this.props.height):a&&(i.width=this.props.width-38),i.padding||(i.padding={}),null==i.padding.bottom&&(i.padding.bottom=20),i.datasets)throw new Error("Datasets should not be passed as part of the spec");return i}}async componentDidMount(){try{await this.createView()}catch(t){const e=(0,l.b)(t);this.setState({error:e})}}componentWillUnmount(){this.finalizeView()}async componentDidUpdate(t){const{element:e,theme:i}=t,{element:a,theme:n}=this.props,o=e.get("spec"),r=a.get("spec");if(!this.vegaView||o!==r||i!==n||t.width!==this.props.width||t.height!==this.props.height){(0,s.ji)("Vega spec changed.");try{await this.createView()}catch(u){const t=(0,l.b)(u);this.setState({error:t})}return}const h=e.get("data"),d=a.get("data");(h||d)&&this.updateData(this.defaultDataName,h,d);const c=y(e)||{},g=y(a)||{};for(const[s,l]of Object.entries(g)){const t=s||this.defaultDataName,e=c[t];this.updateData(t,e,l)}for(const s of Object.keys(c))g.hasOwnProperty(s)||s===this.defaultDataName||this.updateData(s,null,null);this.vegaView.resize().runAsync()}updateData(t,e,i){if(!this.vegaView)throw new Error("Chart has not been drawn yet");if(!i||!i.get("data")){return void(this.vegaView._runtime.data.hasOwnProperty(t)&&this.vegaView.remove(t,g.truthy))}if(!e||!e.get("data"))return void this.vegaView.insert(t,x(i));const[a,n]=(0,d.oo)(e.get("data")),[o,r]=(0,d.oo)(i.get("data"));if(function(t,e,i,a,n,s){if(i!==s)return!1;if(e>=n)return!1;if(0===e)return!1;const o=t.get("data"),r=a.get("data"),h=s-1,l=e-1;if((0,d.Fm)(o,h,0)!==(0,d.Fm)(r,h,0)||(0,d.Fm)(o,h,l)!==(0,d.Fm)(r,h,l))return!1;return!0}(e,a,n,i,o,r))a<o&&this.vegaView.insert(t,x(i,a));else{const e=g.changeset().remove(g.truthy).insert(x(i));this.vegaView.change(t,e),(0,s.ji)(`Had to clear the ${t} dataset before inserting data through Vega view.`)}}async createView(){if((0,s.ji)("Creating a new Vega view."),!this.element)throw Error("Element missing.");this.finalizeView();const t=this.props.element,e=this.generateSpec(),i={ast:!0,expr:u.N},{vgSpec:a,view:n,finalize:o}=await(0,c.ZP)(this.element,e,i);this.vegaView=n,this.vegaFinalizer=o;const r=function(t){const e=y(t);if(null==e)return null;const i={};for(const[a,n]of Object.entries(e))i[a]=x(n);return i}(t),h=r?Object.keys(r):[];if(1===h.length){const[t]=h;this.defaultDataName=t}else 0===h.length&&a.data&&(this.defaultDataName=w);const d=function(t){const e=t.get("data");if(!e)return null;return x(e)}(t);if(d&&n.insert(this.defaultDataName,d),r)for(const[s,l]of Object.entries(r))n.insert(s,l);await n.runAsync(),this.vegaView.resize().runAsync()}render(){if(this.state.error)throw this.state.error;return(0,p.jsx)(f,{"data-testid":"stVegaLiteChart",ref:t=>{this.element=t}})}}function y(t){if(!t.get("datasets")||t.get("datasets").isEmpty())return null;const e={};return t.get("datasets").forEach((t=>{if(!t)return;const i=t.get("hasName")?t.get("name"):null;e[i]=t.get("data")})),e}function x(t,e=0){if(!t.get("data"))return[];if(!t.get("index"))return[];if(!t.get("columns"))return[];const i=[],[a,n]=(0,d.oo)(t.get("data")),s=t.get("index").get("type"),o=v.has(s);for(let r=e;r<a;r++){const e={};o&&(e[m.DATAFRAME_INDEX]=(0,d.l$)(t.get("index"),0,r));for(let i=0;i<n;i++)e[(0,d.l$)(t.get("columns"),0,i)]=(0,d.Fm)(t.get("data"),i,r);i.push(e)}return i}const V=(0,n.b)((0,h.Z)(b))}}]);
@@ -1 +0,0 @@
1
- (globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9615],{48610:(t,i,e)=>{"use strict";e.r(i),e.d(i,{default:()=>u});e(5057);var o=e(89733),n=e(99960),d=e(82601),a=e(29241),r=e(45490);const l=(0,r.Z)("div",{target:"ebxwdo62"})((({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg})),""),s=(0,r.Z)("div",{target:"ebxwdo61"})((()=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0})),""),h=(0,r.Z)("div",{target:"ebxwdo60"})((({theme:t})=>({fontFamily:t.genericFonts.bodyFont,fontSize:t.fontSizes.sm,color:t.colors.fadedText60,textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:"0.125rem"})),"");var c,g=e(96266);!function(t){t[t.OriginalWidth=-1]="OriginalWidth",t[t.ColumnWidth=-2]="ColumnWidth",t[t.AutoWidth=-3]="AutoWidth"}(c||(c={}));const u=(0,d.Z)((function({width:t,isFullScreen:i,element:e,height:d,endpoints:r}){const u=(0,n.$R)(e.imgs);let p;const m=e.width;if(m===c.OriginalWidth||m===c.AutoWidth)p=void 0;else if(m===c.ColumnWidth)p=t;else{if(!(m>0))throw Error(`Invalid image width: ${m}`);p=m}const w={};return d&&i?(w.maxHeight=d,w["object-fit"]="contain"):(w.width=p,m===c.AutoWidth&&(w.maxWidth="100%")),(0,g.jsx)(l,{style:{width:t},children:u.map(((t,i)=>{const e=t;return(0,g.jsxs)(s,{"data-testid":"stImage",children:[e.markup?(0,o.ZP)((0,a.kB)(e.markup)):(0,g.jsx)("img",{style:w,src:r.buildMediaURL(e.url),alt:i.toString()}),e.caption&&(0,g.jsx)(h,{"data-testid":"caption",style:w,children:` ${e.caption} `})]},i)}))})}))},24875:()=>{}}]);