@stlite/desktop 0.21.2 → 0.22.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 (96) hide show
  1. package/README.md +11 -2
  2. package/build/asset-manifest.json +93 -93
  3. package/build/electron/main.js +60 -10
  4. package/build/index.html +1 -1
  5. package/build/static/css/{6.03f87ee7.chunk.css → 6.69790b96.chunk.css} +1 -1
  6. package/build/static/css/{main.b6e9910c.chunk.css → main.7bc75681.chunk.css} +1 -1
  7. package/build/static/js/{0.db2b8db1.chunk.js → 0.14aa4233.chunk.js} +1 -1
  8. package/build/static/js/{1.d8a95919.chunk.js → 1.176aded5.chunk.js} +1 -1
  9. package/build/static/js/{10.dae52f04.chunk.js → 10.e5ea6d64.chunk.js} +1 -1
  10. package/build/static/js/{11.9fe45850.chunk.js → 11.5e15526e.chunk.js} +2 -2
  11. package/build/static/js/{11.9fe45850.chunk.js.LICENSE.txt → 11.5e15526e.chunk.js.LICENSE.txt} +0 -0
  12. package/build/static/js/{12.209a1965.chunk.js → 12.8105987b.chunk.js} +2 -2
  13. package/build/static/js/{12.209a1965.chunk.js.LICENSE.txt → 12.8105987b.chunk.js.LICENSE.txt} +0 -0
  14. package/build/static/js/{13.a3dda2ea.chunk.js → 13.6f270c1f.chunk.js} +2 -2
  15. package/build/static/js/{13.a3dda2ea.chunk.js.LICENSE.txt → 13.6f270c1f.chunk.js.LICENSE.txt} +0 -0
  16. package/build/static/js/{14.86cd17bd.chunk.js → 14.3da5e7a9.chunk.js} +1 -1
  17. package/build/static/js/{15.1bdac30d.chunk.js → 15.91a85aa0.chunk.js} +2 -2
  18. package/build/static/js/{15.1bdac30d.chunk.js.LICENSE.txt → 15.91a85aa0.chunk.js.LICENSE.txt} +0 -0
  19. package/build/static/js/{16.be849095.chunk.js → 16.650490ee.chunk.js} +2 -2
  20. package/build/static/js/{16.be849095.chunk.js.LICENSE.txt → 16.650490ee.chunk.js.LICENSE.txt} +0 -0
  21. package/build/static/js/{17.cc750fa1.chunk.js → 17.4c6481b3.chunk.js} +1 -1
  22. package/build/static/js/{18.5007c118.chunk.js → 18.e3d4364d.chunk.js} +2 -2
  23. package/build/static/js/{18.5007c118.chunk.js.LICENSE.txt → 18.e3d4364d.chunk.js.LICENSE.txt} +0 -0
  24. package/build/static/js/{19.1d97adb1.chunk.js → 19.9004a138.chunk.js} +3 -3
  25. package/build/static/js/{19.1d97adb1.chunk.js.LICENSE.txt → 19.9004a138.chunk.js.LICENSE.txt} +0 -0
  26. package/build/static/js/{2.42f468c9.chunk.js → 2.26deed5e.chunk.js} +2 -2
  27. package/build/static/js/{2.42f468c9.chunk.js.LICENSE.txt → 2.26deed5e.chunk.js.LICENSE.txt} +0 -0
  28. package/build/static/js/{20.d86738b4.chunk.js → 20.1e287e6d.chunk.js} +1 -1
  29. package/build/static/js/{21.8fca1019.chunk.js → 21.cc58bd99.chunk.js} +1 -1
  30. package/build/static/js/{22.d22eb326.chunk.js → 22.fe58abe1.chunk.js} +2 -2
  31. package/build/static/js/{22.d22eb326.chunk.js.LICENSE.txt → 22.fe58abe1.chunk.js.LICENSE.txt} +0 -0
  32. package/build/static/js/{23.703a0005.chunk.js → 23.ee721415.chunk.js} +3 -3
  33. package/build/static/js/{23.703a0005.chunk.js.LICENSE.txt → 23.ee721415.chunk.js.LICENSE.txt} +0 -0
  34. package/build/static/js/{24.bbdd8ad5.chunk.js → 24.36b10d26.chunk.js} +2 -2
  35. package/build/static/js/{24.bbdd8ad5.chunk.js.LICENSE.txt → 24.36b10d26.chunk.js.LICENSE.txt} +0 -0
  36. package/build/static/js/{25.7a13965c.chunk.js → 25.edf85627.chunk.js} +2 -2
  37. package/build/static/js/{25.7a13965c.chunk.js.LICENSE.txt → 25.edf85627.chunk.js.LICENSE.txt} +0 -0
  38. package/build/static/js/{26.5d02767c.chunk.js → 26.99f3cc19.chunk.js} +2 -2
  39. package/build/static/js/{26.5d02767c.chunk.js.LICENSE.txt → 26.99f3cc19.chunk.js.LICENSE.txt} +0 -0
  40. package/build/static/js/{27.a1975825.chunk.js → 27.d7aacc94.chunk.js} +2 -2
  41. package/build/static/js/{27.a1975825.chunk.js.LICENSE.txt → 27.d7aacc94.chunk.js.LICENSE.txt} +0 -0
  42. package/build/static/js/{28.8fe6cf95.chunk.js → 28.d24eb9cf.chunk.js} +3 -3
  43. package/build/static/js/{28.8fe6cf95.chunk.js.LICENSE.txt → 28.d24eb9cf.chunk.js.LICENSE.txt} +0 -0
  44. package/build/static/js/{29.2a3ece9e.chunk.js → 29.fbb528d8.chunk.js} +2 -2
  45. package/build/static/js/{29.2a3ece9e.chunk.js.LICENSE.txt → 29.fbb528d8.chunk.js.LICENSE.txt} +0 -0
  46. package/build/static/js/{3.82223a8f.chunk.js → 3.f4fb8871.chunk.js} +1 -1
  47. package/build/static/js/{30.99b51097.chunk.js → 30.32ab2cb4.chunk.js} +2 -2
  48. package/build/static/js/{30.99b51097.chunk.js.LICENSE.txt → 30.32ab2cb4.chunk.js.LICENSE.txt} +0 -0
  49. package/build/static/js/{31.ff33aa2d.chunk.js → 31.9c06312e.chunk.js} +2 -2
  50. package/build/static/js/{31.ff33aa2d.chunk.js.LICENSE.txt → 31.9c06312e.chunk.js.LICENSE.txt} +0 -0
  51. package/build/static/js/{32.a0448bd6.chunk.js → 32.a1f2009d.chunk.js} +2 -2
  52. package/build/static/js/{32.a0448bd6.chunk.js.LICENSE.txt → 32.a1f2009d.chunk.js.LICENSE.txt} +0 -0
  53. package/build/static/js/{33.4e785a88.chunk.js → 33.1d5fce1c.chunk.js} +2 -2
  54. package/build/static/js/{33.4e785a88.chunk.js.LICENSE.txt → 33.1d5fce1c.chunk.js.LICENSE.txt} +0 -0
  55. package/build/static/js/{34.a91bbe12.chunk.js → 34.edb9c338.chunk.js} +2 -2
  56. package/build/static/js/{34.a91bbe12.chunk.js.LICENSE.txt → 34.edb9c338.chunk.js.LICENSE.txt} +0 -0
  57. package/build/static/js/{35.d2720d0c.chunk.js → 35.6bd7c1ed.chunk.js} +2 -2
  58. package/build/static/js/{35.d2720d0c.chunk.js.LICENSE.txt → 35.6bd7c1ed.chunk.js.LICENSE.txt} +0 -0
  59. package/build/static/js/{36.19b6ded6.chunk.js → 36.be12d12e.chunk.js} +2 -2
  60. package/build/static/js/{36.19b6ded6.chunk.js.LICENSE.txt → 36.be12d12e.chunk.js.LICENSE.txt} +0 -0
  61. package/build/static/js/{37.c8ade714.chunk.js → 37.b845d4ba.chunk.js} +2 -2
  62. package/build/static/js/{37.c8ade714.chunk.js.LICENSE.txt → 37.b845d4ba.chunk.js.LICENSE.txt} +0 -0
  63. package/build/static/js/{38.a8e76ebd.chunk.js → 38.0e8cfb78.chunk.js} +2 -2
  64. package/build/static/js/{38.a8e76ebd.chunk.js.LICENSE.txt → 38.0e8cfb78.chunk.js.LICENSE.txt} +0 -0
  65. package/build/static/js/{39.815183b5.chunk.js → 39.73c851be.chunk.js} +2 -2
  66. package/build/static/js/{39.815183b5.chunk.js.LICENSE.txt → 39.73c851be.chunk.js.LICENSE.txt} +0 -0
  67. package/build/static/js/{40.5e639584.chunk.js → 40.1fc38a50.chunk.js} +2 -2
  68. package/build/static/js/{40.5e639584.chunk.js.LICENSE.txt → 40.1fc38a50.chunk.js.LICENSE.txt} +0 -0
  69. package/build/static/js/{41.1811bda2.chunk.js → 41.4ddf36bc.chunk.js} +2 -2
  70. package/build/static/js/{41.1811bda2.chunk.js.LICENSE.txt → 41.4ddf36bc.chunk.js.LICENSE.txt} +0 -0
  71. package/build/static/js/{42.ccc87d41.chunk.js → 42.e5620440.chunk.js} +2 -2
  72. package/build/static/js/{42.ccc87d41.chunk.js.LICENSE.txt → 42.e5620440.chunk.js.LICENSE.txt} +0 -0
  73. package/build/static/js/{43.dd888752.chunk.js → 43.44eb58de.chunk.js} +2 -2
  74. package/build/static/js/{43.dd888752.chunk.js.LICENSE.txt → 43.44eb58de.chunk.js.LICENSE.txt} +0 -0
  75. package/build/static/js/{44.14f2e50d.chunk.js → 44.35b43369.chunk.js} +2 -2
  76. package/build/static/js/{44.14f2e50d.chunk.js.LICENSE.txt → 44.35b43369.chunk.js.LICENSE.txt} +0 -0
  77. package/build/static/js/{45.61ea1afe.chunk.js → 45.91664b3c.chunk.js} +2 -2
  78. package/build/static/js/{45.61ea1afe.chunk.js.LICENSE.txt → 45.91664b3c.chunk.js.LICENSE.txt} +0 -0
  79. package/build/static/js/{46.3201e0ba.chunk.js → 46.e9639103.chunk.js} +2 -2
  80. package/build/static/js/{46.3201e0ba.chunk.js.LICENSE.txt → 46.e9639103.chunk.js.LICENSE.txt} +0 -0
  81. package/build/static/js/{47.f6442eb9.chunk.js → 47.77b33a34.chunk.js} +2 -2
  82. package/build/static/js/{47.f6442eb9.chunk.js.LICENSE.txt → 47.77b33a34.chunk.js.LICENSE.txt} +0 -0
  83. package/build/static/js/6.8496e815.chunk.js +2 -0
  84. package/build/static/js/{6.cfeb0558.chunk.js.LICENSE.txt → 6.8496e815.chunk.js.LICENSE.txt} +0 -0
  85. package/build/static/js/{7.e179a232.chunk.js → 7.54bbd037.chunk.js} +2 -2
  86. package/build/static/js/{7.e179a232.chunk.js.LICENSE.txt → 7.54bbd037.chunk.js.LICENSE.txt} +0 -0
  87. package/build/static/js/{8.89ddb52f.chunk.js → 8.934b1bbd.chunk.js} +2 -2
  88. package/build/static/js/{8.89ddb52f.chunk.js.LICENSE.txt → 8.934b1bbd.chunk.js.LICENSE.txt} +0 -0
  89. package/build/static/js/{9.ea63c205.chunk.js → 9.8ff376a2.chunk.js} +1 -1
  90. package/build/static/js/main.118127a6.chunk.js +28 -0
  91. package/build/static/js/{main.984ac8f5.chunk.js.LICENSE.txt → main.118127a6.chunk.js.LICENSE.txt} +0 -0
  92. package/build/static/js/runtime-main.fe933feb.js +1 -0
  93. package/package.json +7 -5
  94. package/build/static/js/6.cfeb0558.chunk.js +0 -2
  95. package/build/static/js/main.984ac8f5.chunk.js +0 -28
  96. package/build/static/js/runtime-main.bae92e60.js +0 -1
@@ -1,2 +1,2 @@
1
- /*! For license information please see 22.d22eb326.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[22],{1269:function(e,t,r){"use strict";r.d(t,"b",(function(){return f})),r.d(t,"a",(function(){return d}));var n=r(0),o=r.n(n),i=r(61),a=r(53),s=r(18),c=r(1483),u=r(11),l=r(1);let d;!function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"}(d||(d={}));var f=function({value:e,width:t,size:r=d.SMALL,overrides:n}){const f=Object(i.c)(),p={xs:f.spacing.twoXS,sm:f.spacing.sm,md:f.spacing.lg,lg:f.spacing.xl,xl:f.spacing.twoXL},{activeTheme:g}=o.a.useContext(a.a),b=!Object(s.isPresetTheme)(g),m={BarContainer:{style:{marginTop:f.spacing.none,marginBottom:f.spacing.none,marginRight:f.spacing.none,marginLeft:f.spacing.none}},Bar:{style:({$theme:e})=>({width:t?t.toString():void 0,marginTop:f.spacing.none,marginBottom:f.spacing.none,marginRight:f.spacing.none,marginLeft:f.spacing.none,height:p[r],backgroundColor:e.colors.progressbarTrackFill,borderTopLeftRadius:f.spacing.twoXS,borderTopRightRadius:f.spacing.twoXS,borderBottomLeftRadius:f.spacing.twoXS,borderBottomRightRadius:f.spacing.twoXS})},BarProgress:{style:({$theme:e})=>({backgroundColor:b?f.colors.primary:f.colors.blue70,borderTopLeftRadius:f.spacing.twoXS,borderTopRightRadius:f.spacing.twoXS,borderBottomLeftRadius:f.spacing.twoXS,borderBottomRightRadius:f.spacing.twoXS})}};return Object(l.jsx)(c.a,{value:e,overrides:Object(u.e)(m,n)})}},1483:function(e,t,r){"use strict";var n,o=r(0),i=r.n(o),a=r(11),s="small",c="medium",u="large",l=r(22),d=r(77);function f(){return(f=Object.assign||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}).apply(this,arguments)}function p(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t;return(t={},b(t,s,"2px"),b(t,c,"4px"),b(t,u,"8px"),t)[e]}var h=Object(l.a)("div",(function(e){return{width:"100%"}}));h.displayName="StyledRoot";var y=Object(l.a)("div",(function(e){var t=e.$theme.sizing;return{display:"flex",marginLeft:t.scale500,marginRight:t.scale500,marginTop:t.scale500,marginBottom:t.scale500}}));y.displayName="StyledBarContainer";var v=Object(l.a)("div",(function(e){var t=e.$theme,r=e.$size,n=e.$steps,o=t.colors,i=t.sizing,a=t.borders.useRoundedCorners?i.scale0:0;return g({borderTopLeftRadius:a,borderTopRightRadius:a,borderBottomRightRadius:a,borderBottomLeftRadius:a,backgroundColor:Object(d.c)(o.progressbarTrackFill,"0.16"),height:m(r),flex:1,overflow:"hidden"},n<2?{}:{marginLeft:i.scale300,":first-child":{marginLeft:"0"}})}));v.displayName="StyledBar";var O=Object(l.a)("div",(function(e){var t=e.$theme,r=e.$value,n=e.$successValue,o=e.$steps,i=e.$index,a=t.colors,s=t.sizing,c=t.borders,u="".concat(100-r/n*100,"%"),l="awaits",d="inProgress",f="completed",p="default";if(o>1){var b=n/o,m=r/n*100,h=Math.floor(m/b);p=i<h?f:i===h?d:l}var y=c.useRoundedCorners?s.scale0:0,v={transform:"translateX(-".concat(u,")")},O=p===d?{animationDuration:"2.1s",animationIterationCount:"infinite",animationTimingFunction:t.animation.linearCurve,animationName:{"0%":{transform:"translateX(-102%)",opacity:1},"50%":{transform:"translateX(0%)",opacity:1},"100%":{transform:"translateX(0%)",opacity:0}}}:p===f?{transform:"translateX(0%)"}:{transform:"translateX(-102%)"};return g({borderTopLeftRadius:y,borderTopRightRadius:y,borderBottomRightRadius:y,borderBottomLeftRadius:y,backgroundColor:a.accent,height:"100%",width:"100%",transform:"translateX(-102%)",transition:"transform 0.5s"},o>1?O:v)}));O.displayName="StyledBarProgress";var j=Object(l.a)("div",(function(e){var t=e.$theme,r=e.$isLeft,n=void 0!==r&&r,o=e.$size,i=void 0===o?c:o,a=t.colors,s=t.sizing,u=t.borders.useRoundedCorners?s.scale0:0,l=m(i),d={display:"inline-block",flex:1,marginLeft:"auto",marginRight:"auto",transitionProperty:"background-position",animationDuration:"1.5s",animationIterationCount:"infinite",animationTimingFunction:t.animation.linearCurve,backgroundSize:"300% auto",backgroundRepeat:"no-repeat",backgroundPositionX:n?"-50%":"150%",backgroundImage:"linear-gradient(".concat(n?"90":"270","deg, transparent 0%, ").concat(a.accent," 25%, ").concat(a.accent," 75%, transparent 100%)"),animationName:n?{"0%":{backgroundPositionX:"-50%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"150%"}}:{"0%":{backgroundPositionX:"150%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"-50%"}}};return g(g({},n?{borderTopLeftRadius:u,borderBottomLeftRadius:u}:{borderTopRightRadius:u,borderBottomRightRadius:u}),{},{height:l},d)}));j.displayName="StyledInfiniteBar";var w=Object(l.a)("div",(function(e){return g(g({textAlign:"center"},e.$theme.typography.font150),{},{color:e.$theme.colors.contentTertiary})}));w.displayName="StyledLabel";var R=(b(n={},u,{d:"M47.5 4H71.5529C82.2933 4 91 12.9543 91 24C91 35.0457 82.2933 44 71.5529 44H23.4471C12.7067 44 4 35.0457 4 24C4 12.9543 12.7067 4 23.4471 4H47.5195",width:95,height:48,strokeWidth:8,typography:"LabelLarge"}),b(n,c,{d:"M39 2H60.5833C69.0977 2 76 9.16344 76 18C76 26.8366 69.0977 34 60.5833 34H17.4167C8.90228 34 2 26.8366 2 18C2 9.16344 8.90228 2 17.4167 2H39.0195",width:78,height:36,strokeWidth:4,typography:"LabelMedium"}),b(n,s,{d:"M32 1H51.6271C57.9082 1 63 6.37258 63 13C63 19.6274 57.9082 25 51.6271 25H12.3729C6.09181 25 1 19.6274 1 13C1 6.37258 6.09181 1 12.3729 1H32.0195",width:64,height:26,strokeWidth:2,typography:"LabelSmall"}),n);Object(l.a)("div",(function(e){var t=e.$size,r=e.$inline;return{width:R[t].width+"px",height:R[t].height+"px",position:"relative",display:r?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}})).displayName="StyledProgressBarRoundedRoot";var k=Object(l.a)("svg",(function(e){var t=e.$size;return{width:R[t].width+"px",height:R[t].height+"px",position:"absolute",fill:"none"}}));k.displayName="_StyledProgressBarRoundedSvg";Object(l.c)(k,(function(e){return function(t){return i.a.createElement(e,f({viewBox:"0 0 ".concat(R[t.$size].width," ").concat(R[t.$size].height),xmlns:"http://www.w3.org/2000/svg"},t))}}));var P=Object(l.a)("path",(function(e){var t=e.$theme,r=e.$size;return{stroke:t.colors.backgroundTertiary,strokeWidth:R[r].strokeWidth+"px"}}));P.displayName="_StyledProgressBarRoundedTrackBackground";Object(l.c)(P,(function(e){return function(t){return i.a.createElement(e,f({d:R[t.$size].d},t))}}));var $=Object(l.a)("path",(function(e){var t=e.$theme,r=e.$size,n=e.$visible,o=e.$pathLength,i=e.$pathProgress;return{visibility:n?"visible":"hidden",stroke:t.colors.borderAccent,strokeWidth:R[r].strokeWidth+"px",strokeDasharray:o,strokeDashoffset:o*(1-i)+""}}));$.displayName="_StyledProgressBarRoundedTrackForeground";Object(l.c)($,(function(e){return function(t){return i.a.createElement(e,f({d:R[t.$size].d},t))}}));function S(e){return(S="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})(e)}function L(){return(L=Object.assign||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}).apply(this,arguments)}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){o=!0,i=c}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return B(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 B(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 B(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 C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(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 X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=A(e);if(t){var o=A(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return E(this,r)}}function E(e,t){return!t||"object"!==S(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object(l.a)("div",(function(e){var t=e.$theme,r=e.$size;return g({color:t.colors.contentPrimary},t.typography[R[r].typography])})).displayName="StyledProgressBarRoundedText";var M,N,D,_=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}}),t&&X(e,t)}(s,e);var t,r,n,i=z(s);function s(){return C(this,s),i.apply(this,arguments)}return t=s,(r=[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.ariaLabel,r=e.overrides,n=void 0===r?{}:r,i=e.getProgressLabel,s=e.value,c=e.size,u=e.steps,l=e.successValue,d=e.showLabel,f=e.infinite,p=e.errorMessage,g=x(Object(a.c)(n.Root,h),2),b=g[0],m=g[1],R=x(Object(a.c)(n.BarContainer,y),2),k=R[0],P=R[1],$=x(Object(a.c)(n.Bar,v),2),S=$[0],B=$[1],C=x(Object(a.c)(n.BarProgress,O),2),T=C[0],X=C[1],z=x(Object(a.c)(n.Label,w),2),E=z[0],A=z[1],M=x(Object(a.c)(n.InfiniteBar,j),2),N=M[0],D=M[1],_={$infinite:f,$size:c,$steps:u,$successValue:l,$value:s};return o.createElement(b,L({"data-baseweb":"progress-bar",role:"progressbar","aria-label":t||i(s,l),"aria-valuenow":f?null:s,"aria-valuemin":f?null:0,"aria-valuemax":f?null:l,"aria-invalid":!!p||null,"aria-errormessage":p},_,m),o.createElement(k,L({},_,P),f?o.createElement(o.Fragment,null,o.createElement(N,L({$isLeft:!0,$size:_.$size},D)),o.createElement(N,L({$size:_.$size},D))):function(){for(var e=[],t=0;t<u;t++)e.push(o.createElement(S,L({key:t},_,B),o.createElement(T,L({$index:t},_,X))));return e}()),d&&o.createElement(E,L({},_,A),i(s,l)))}}])&&T(t.prototype,r),n&&T(t,n),s}(o.Component);D={getProgressLabel:function(e,t){return"".concat(Math.round(e/t*100),"% Loaded")},infinite:!1,overrides:{},showLabel:!1,size:c,steps:1,successValue:100,value:0},(N="defaultProps")in(M=_)?Object.defineProperty(M,N,{value:D,enumerable:!0,configurable:!0,writable:!0}):M[N]=D;t.a=_},1801:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return i}));r(0);var n=r(1269),o=r(1);var i=function({element:e,width:t}){return Object(o.jsx)("div",{className:"stProgress",children:Object(o.jsx)(n.b,{value:e.value,width:t})})}}}]);
1
+ /*! For license information please see 22.fe58abe1.chunk.js.LICENSE.txt */
2
+ (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[22],{1274:function(e,t,r){"use strict";r.d(t,"b",(function(){return f})),r.d(t,"a",(function(){return d}));var n=r(0),o=r.n(n),i=r(61),a=r(53),s=r(18),c=r(1488),u=r(11),l=r(1);let d;!function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"}(d||(d={}));var f=function({value:e,width:t,size:r=d.SMALL,overrides:n}){const f=Object(i.c)(),p={xs:f.spacing.twoXS,sm:f.spacing.sm,md:f.spacing.lg,lg:f.spacing.xl,xl:f.spacing.twoXL},{activeTheme:g}=o.a.useContext(a.a),b=!Object(s.isPresetTheme)(g),m={BarContainer:{style:{marginTop:f.spacing.none,marginBottom:f.spacing.none,marginRight:f.spacing.none,marginLeft:f.spacing.none}},Bar:{style:({$theme:e})=>({width:t?t.toString():void 0,marginTop:f.spacing.none,marginBottom:f.spacing.none,marginRight:f.spacing.none,marginLeft:f.spacing.none,height:p[r],backgroundColor:e.colors.progressbarTrackFill,borderTopLeftRadius:f.spacing.twoXS,borderTopRightRadius:f.spacing.twoXS,borderBottomLeftRadius:f.spacing.twoXS,borderBottomRightRadius:f.spacing.twoXS})},BarProgress:{style:({$theme:e})=>({backgroundColor:b?f.colors.primary:f.colors.blue70,borderTopLeftRadius:f.spacing.twoXS,borderTopRightRadius:f.spacing.twoXS,borderBottomLeftRadius:f.spacing.twoXS,borderBottomRightRadius:f.spacing.twoXS})}};return Object(l.jsx)(c.a,{value:e,overrides:Object(u.e)(m,n)})}},1488:function(e,t,r){"use strict";var n,o=r(0),i=r.n(o),a=r(11),s="small",c="medium",u="large",l=r(22),d=r(77);function f(){return(f=Object.assign||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}).apply(this,arguments)}function p(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t;return(t={},b(t,s,"2px"),b(t,c,"4px"),b(t,u,"8px"),t)[e]}var h=Object(l.a)("div",(function(e){return{width:"100%"}}));h.displayName="StyledRoot";var y=Object(l.a)("div",(function(e){var t=e.$theme.sizing;return{display:"flex",marginLeft:t.scale500,marginRight:t.scale500,marginTop:t.scale500,marginBottom:t.scale500}}));y.displayName="StyledBarContainer";var v=Object(l.a)("div",(function(e){var t=e.$theme,r=e.$size,n=e.$steps,o=t.colors,i=t.sizing,a=t.borders.useRoundedCorners?i.scale0:0;return g({borderTopLeftRadius:a,borderTopRightRadius:a,borderBottomRightRadius:a,borderBottomLeftRadius:a,backgroundColor:Object(d.c)(o.progressbarTrackFill,"0.16"),height:m(r),flex:1,overflow:"hidden"},n<2?{}:{marginLeft:i.scale300,":first-child":{marginLeft:"0"}})}));v.displayName="StyledBar";var O=Object(l.a)("div",(function(e){var t=e.$theme,r=e.$value,n=e.$successValue,o=e.$steps,i=e.$index,a=t.colors,s=t.sizing,c=t.borders,u="".concat(100-r/n*100,"%"),l="awaits",d="inProgress",f="completed",p="default";if(o>1){var b=n/o,m=r/n*100,h=Math.floor(m/b);p=i<h?f:i===h?d:l}var y=c.useRoundedCorners?s.scale0:0,v={transform:"translateX(-".concat(u,")")},O=p===d?{animationDuration:"2.1s",animationIterationCount:"infinite",animationTimingFunction:t.animation.linearCurve,animationName:{"0%":{transform:"translateX(-102%)",opacity:1},"50%":{transform:"translateX(0%)",opacity:1},"100%":{transform:"translateX(0%)",opacity:0}}}:p===f?{transform:"translateX(0%)"}:{transform:"translateX(-102%)"};return g({borderTopLeftRadius:y,borderTopRightRadius:y,borderBottomRightRadius:y,borderBottomLeftRadius:y,backgroundColor:a.accent,height:"100%",width:"100%",transform:"translateX(-102%)",transition:"transform 0.5s"},o>1?O:v)}));O.displayName="StyledBarProgress";var j=Object(l.a)("div",(function(e){var t=e.$theme,r=e.$isLeft,n=void 0!==r&&r,o=e.$size,i=void 0===o?c:o,a=t.colors,s=t.sizing,u=t.borders.useRoundedCorners?s.scale0:0,l=m(i),d={display:"inline-block",flex:1,marginLeft:"auto",marginRight:"auto",transitionProperty:"background-position",animationDuration:"1.5s",animationIterationCount:"infinite",animationTimingFunction:t.animation.linearCurve,backgroundSize:"300% auto",backgroundRepeat:"no-repeat",backgroundPositionX:n?"-50%":"150%",backgroundImage:"linear-gradient(".concat(n?"90":"270","deg, transparent 0%, ").concat(a.accent," 25%, ").concat(a.accent," 75%, transparent 100%)"),animationName:n?{"0%":{backgroundPositionX:"-50%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"150%"}}:{"0%":{backgroundPositionX:"150%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"-50%"}}};return g(g({},n?{borderTopLeftRadius:u,borderBottomLeftRadius:u}:{borderTopRightRadius:u,borderBottomRightRadius:u}),{},{height:l},d)}));j.displayName="StyledInfiniteBar";var w=Object(l.a)("div",(function(e){return g(g({textAlign:"center"},e.$theme.typography.font150),{},{color:e.$theme.colors.contentTertiary})}));w.displayName="StyledLabel";var R=(b(n={},u,{d:"M47.5 4H71.5529C82.2933 4 91 12.9543 91 24C91 35.0457 82.2933 44 71.5529 44H23.4471C12.7067 44 4 35.0457 4 24C4 12.9543 12.7067 4 23.4471 4H47.5195",width:95,height:48,strokeWidth:8,typography:"LabelLarge"}),b(n,c,{d:"M39 2H60.5833C69.0977 2 76 9.16344 76 18C76 26.8366 69.0977 34 60.5833 34H17.4167C8.90228 34 2 26.8366 2 18C2 9.16344 8.90228 2 17.4167 2H39.0195",width:78,height:36,strokeWidth:4,typography:"LabelMedium"}),b(n,s,{d:"M32 1H51.6271C57.9082 1 63 6.37258 63 13C63 19.6274 57.9082 25 51.6271 25H12.3729C6.09181 25 1 19.6274 1 13C1 6.37258 6.09181 1 12.3729 1H32.0195",width:64,height:26,strokeWidth:2,typography:"LabelSmall"}),n);Object(l.a)("div",(function(e){var t=e.$size,r=e.$inline;return{width:R[t].width+"px",height:R[t].height+"px",position:"relative",display:r?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}})).displayName="StyledProgressBarRoundedRoot";var k=Object(l.a)("svg",(function(e){var t=e.$size;return{width:R[t].width+"px",height:R[t].height+"px",position:"absolute",fill:"none"}}));k.displayName="_StyledProgressBarRoundedSvg";Object(l.c)(k,(function(e){return function(t){return i.a.createElement(e,f({viewBox:"0 0 ".concat(R[t.$size].width," ").concat(R[t.$size].height),xmlns:"http://www.w3.org/2000/svg"},t))}}));var P=Object(l.a)("path",(function(e){var t=e.$theme,r=e.$size;return{stroke:t.colors.backgroundTertiary,strokeWidth:R[r].strokeWidth+"px"}}));P.displayName="_StyledProgressBarRoundedTrackBackground";Object(l.c)(P,(function(e){return function(t){return i.a.createElement(e,f({d:R[t.$size].d},t))}}));var $=Object(l.a)("path",(function(e){var t=e.$theme,r=e.$size,n=e.$visible,o=e.$pathLength,i=e.$pathProgress;return{visibility:n?"visible":"hidden",stroke:t.colors.borderAccent,strokeWidth:R[r].strokeWidth+"px",strokeDasharray:o,strokeDashoffset:o*(1-i)+""}}));$.displayName="_StyledProgressBarRoundedTrackForeground";Object(l.c)($,(function(e){return function(t){return i.a.createElement(e,f({d:R[t.$size].d},t))}}));function S(e){return(S="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})(e)}function L(){return(L=Object.assign||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}).apply(this,arguments)}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){o=!0,i=c}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return B(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 B(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 B(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 C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(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 X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=A(e);if(t){var o=A(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return E(this,r)}}function E(e,t){return!t||"object"!==S(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object(l.a)("div",(function(e){var t=e.$theme,r=e.$size;return g({color:t.colors.contentPrimary},t.typography[R[r].typography])})).displayName="StyledProgressBarRoundedText";var M,N,D,_=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}}),t&&X(e,t)}(s,e);var t,r,n,i=z(s);function s(){return C(this,s),i.apply(this,arguments)}return t=s,(r=[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.ariaLabel,r=e.overrides,n=void 0===r?{}:r,i=e.getProgressLabel,s=e.value,c=e.size,u=e.steps,l=e.successValue,d=e.showLabel,f=e.infinite,p=e.errorMessage,g=x(Object(a.c)(n.Root,h),2),b=g[0],m=g[1],R=x(Object(a.c)(n.BarContainer,y),2),k=R[0],P=R[1],$=x(Object(a.c)(n.Bar,v),2),S=$[0],B=$[1],C=x(Object(a.c)(n.BarProgress,O),2),T=C[0],X=C[1],z=x(Object(a.c)(n.Label,w),2),E=z[0],A=z[1],M=x(Object(a.c)(n.InfiniteBar,j),2),N=M[0],D=M[1],_={$infinite:f,$size:c,$steps:u,$successValue:l,$value:s};return o.createElement(b,L({"data-baseweb":"progress-bar",role:"progressbar","aria-label":t||i(s,l),"aria-valuenow":f?null:s,"aria-valuemin":f?null:0,"aria-valuemax":f?null:l,"aria-invalid":!!p||null,"aria-errormessage":p},_,m),o.createElement(k,L({},_,P),f?o.createElement(o.Fragment,null,o.createElement(N,L({$isLeft:!0,$size:_.$size},D)),o.createElement(N,L({$size:_.$size},D))):function(){for(var e=[],t=0;t<u;t++)e.push(o.createElement(S,L({key:t},_,B),o.createElement(T,L({$index:t},_,X))));return e}()),d&&o.createElement(E,L({},_,A),i(s,l)))}}])&&T(t.prototype,r),n&&T(t,n),s}(o.Component);D={getProgressLabel:function(e,t){return"".concat(Math.round(e/t*100),"% Loaded")},infinite:!1,overrides:{},showLabel:!1,size:c,steps:1,successValue:100,value:0},(N="defaultProps")in(M=_)?Object.defineProperty(M,N,{value:D,enumerable:!0,configurable:!0,writable:!0}):M[N]=D;t.a=_},1806:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return i}));r(0);var n=r(1274),o=r(1);var i=function({element:e,width:t}){return Object(o.jsx)("div",{className:"stProgress",children:Object(o.jsx)(n.b,{value:e.value,width:t})})}}}]);
@@ -1,6 +1,6 @@
1
- /*! For license information please see 23.703a0005.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[23],{1270:function(t,e,r){"use strict";r(0);var n=r(33),o=r(111),i=r(5);const a=r(40).c`
1
+ /*! For license information please see 23.ee721415.chunk.js.LICENSE.txt */
2
+ (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[23],{1275:function(t,e,r){"use strict";r(0);var n=r(33),o=r(113),i=r(5);const a=r(40).c`
3
3
  50% {
4
4
  color: rgba(0, 0, 0, 0);
5
5
  }
6
- `,s=Object(i.a)("span",{target:"e1m4n6jn0"})((({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(1);e.a=({dirty:t,value:e,maxLength:r,className:i,type:a="single"})=>{const c=[],u=(t,e=!1)=>{c.push(Object(l.jsx)(s,{includeDot:c.length>0,shouldBlink:e,children:t},c.length))};return t&&("multiline"===a?Object(n.f)()?u("Press \u2318+Enter to apply"):u("Press Ctrl+Enter to apply"):u("Press Enter to apply")),r&&u(`${e.length}/${r}`,t&&e.length>=r),Object(l.jsx)(o.a,{className:i,children:c})}},1371:function(t,e,r){"use strict";var n=r(0),o=r(11),i=r(1304),a=r(1377),s=r(1243),l=r(78);function c(t){return(c="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})(t)}function u(){return(u=Object.assign||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}).apply(this,arguments)}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(l){o=!0,i=l}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return h(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 h(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 h(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 f(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 d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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||function(t,e){return t.__proto__=e,t})(t,e)}function y(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 Date.prototype.toString.call(Reflect.construct(Date,[],(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 g(this,r)}}function g(t,e){return!e||"object"!==c(e)&&"function"!==typeof e?v(t):e}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:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var w=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}}),e&&b(t,e)}(g,t);var e,r,c,h=y(g);function g(){var t;d(this,g);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return O(v(t=h.call.apply(h,[this].concat(r))),"state",{isFocused:t.props.autoFocus||!1}),O(v(t),"onFocus",(function(e){t.setState({isFocused:!0}),t.props.onFocus(e)})),O(v(t),"onBlur",(function(e){t.setState({isFocused:!1}),t.props.onBlur(e)})),t}return e=g,(r=[{key:"render",value:function(){var t=this.props,e=t.startEnhancer,r=t.endEnhancer,c=t.overrides,h=c.Root,d=c.StartEnhancer,m=c.EndEnhancer,b=f(c,["Root","StartEnhancer","EndEnhancer"]),y=f(t,["startEnhancer","endEnhancer","overrides"]),g=p(Object(o.c)(h,s.d),2),v=g[0],j=g[1],O=p(Object(o.c)(d,s.c),2),w=O[0],x=O[1],E=p(Object(o.c)(m,s.c),2),P=E[0],C=E[1],F=Object(i.a)(this.props,this.state);return n.createElement(v,u({"data-baseweb":"input"},F,j,{$adjoined:S(e,r),$hasIconTrailing:this.props.clearable||"password"==this.props.type}),e&&n.createElement(w,u({},F,x,{$position:l.c.start}),"function"===typeof e?e(F):e),n.createElement(a.a,u({},y,{overrides:b,adjoined:S(e,r),onFocus:this.onFocus,onBlur:this.onBlur})),r&&n.createElement(P,u({},F,C,{$position:l.c.end}),"function"===typeof r?r(F):r))}}])&&m(e.prototype,r),c&&m(e,c),g}(n.Component);function S(t,e){return t&&e?l.a.both:t?l.a.left:e?l.a.right:l.a.none}O(w,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",error:!1,onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:l.d.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text"}),e.a=w},1791:function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return y}));var n=r(0),o=r.n(n),i=r(1371),a=r(15),s=r(190),l=r(1270),c=r(111),u=r(112),p=r(50),h=r(33),f=r(5);const d=Object(f.a)("div",{target:"edfmue0"})((({theme:t,width:e})=>({position:"relative",width:e})),"");var m=r(1);class b extends o.a.PureComponent{constructor(...t){super(...t),this.formClearHelper=new s.b,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({value:this.props.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||(Object(h.h)(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===a.v.Type.PASSWORD?"password":"text"}render(){var t;const{dirty:e,value:r}=this.state,{element:n,width:o,disabled:a,widgetMgr:s}=this.props,{placeholder:f}=n;return this.formClearHelper.manageFormClearListener(s,n.formId,this.onFormCleared),Object(m.jsxs)(d,{className:"row-widget stTextInput",width:o,children:[Object(m.jsx)(c.d,{label:n.label,disabled:a,labelVisibility:Object(h.j)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),children:n.help&&Object(m.jsx)(c.b,{children:Object(m.jsx)(u.a,{content:n.help,placement:p.b.TOP_RIGHT})})}),Object(m.jsx)(i.a,{value:r,placeholder:f,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"}}}}),Object(m.jsx)(l.a,{dirty:e,value:r,maxLength:n.maxChars})]})}}var y=b}}]);
6
+ `,s=Object(i.a)("span",{target:"e1m4n6jn0"})((({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(1);e.a=({dirty:t,value:e,maxLength:r,className:i,type:a="single"})=>{const c=[],u=(t,e=!1)=>{c.push(Object(l.jsx)(s,{includeDot:c.length>0,shouldBlink:e,children:t},c.length))};return t&&("multiline"===a?Object(n.f)()?u("Press \u2318+Enter to apply"):u("Press Ctrl+Enter to apply"):u("Press Enter to apply")),r&&u(`${e.length}/${r}`,t&&e.length>=r),Object(l.jsx)(o.a,{className:i,children:c})}},1376:function(t,e,r){"use strict";var n=r(0),o=r(11),i=r(1309),a=r(1382),s=r(1248),l=r(78);function c(t){return(c="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})(t)}function u(){return(u=Object.assign||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}).apply(this,arguments)}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(l){o=!0,i=l}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return h(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 h(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 h(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 f(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 d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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||function(t,e){return t.__proto__=e,t})(t,e)}function y(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 Date.prototype.toString.call(Reflect.construct(Date,[],(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 g(this,r)}}function g(t,e){return!e||"object"!==c(e)&&"function"!==typeof e?v(t):e}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:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var w=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}}),e&&b(t,e)}(g,t);var e,r,c,h=y(g);function g(){var t;d(this,g);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return O(v(t=h.call.apply(h,[this].concat(r))),"state",{isFocused:t.props.autoFocus||!1}),O(v(t),"onFocus",(function(e){t.setState({isFocused:!0}),t.props.onFocus(e)})),O(v(t),"onBlur",(function(e){t.setState({isFocused:!1}),t.props.onBlur(e)})),t}return e=g,(r=[{key:"render",value:function(){var t=this.props,e=t.startEnhancer,r=t.endEnhancer,c=t.overrides,h=c.Root,d=c.StartEnhancer,m=c.EndEnhancer,b=f(c,["Root","StartEnhancer","EndEnhancer"]),y=f(t,["startEnhancer","endEnhancer","overrides"]),g=p(Object(o.c)(h,s.d),2),v=g[0],j=g[1],O=p(Object(o.c)(d,s.c),2),w=O[0],x=O[1],E=p(Object(o.c)(m,s.c),2),P=E[0],C=E[1],F=Object(i.a)(this.props,this.state);return n.createElement(v,u({"data-baseweb":"input"},F,j,{$adjoined:S(e,r),$hasIconTrailing:this.props.clearable||"password"==this.props.type}),e&&n.createElement(w,u({},F,x,{$position:l.c.start}),"function"===typeof e?e(F):e),n.createElement(a.a,u({},y,{overrides:b,adjoined:S(e,r),onFocus:this.onFocus,onBlur:this.onBlur})),r&&n.createElement(P,u({},F,C,{$position:l.c.end}),"function"===typeof r?r(F):r))}}])&&m(e.prototype,r),c&&m(e,c),g}(n.Component);function S(t,e){return t&&e?l.a.both:t?l.a.left:e?l.a.right:l.a.none}O(w,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",error:!1,onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:l.d.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text"}),e.a=w},1796:function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return y}));var n=r(0),o=r.n(n),i=r(1376),a=r(15),s=r(193),l=r(1275),c=r(113),u=r(114),p=r(50),h=r(33),f=r(5);const d=Object(f.a)("div",{target:"edfmue0"})((({theme:t,width:e})=>({position:"relative",width:e})),"");var m=r(1);class b extends o.a.PureComponent{constructor(...t){super(...t),this.formClearHelper=new s.b,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({value:this.props.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||(Object(h.h)(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===a.v.Type.PASSWORD?"password":"text"}render(){var t;const{dirty:e,value:r}=this.state,{element:n,width:o,disabled:a,widgetMgr:s}=this.props,{placeholder:f}=n;return this.formClearHelper.manageFormClearListener(s,n.formId,this.onFormCleared),Object(m.jsxs)(d,{className:"row-widget stTextInput",width:o,children:[Object(m.jsx)(c.d,{label:n.label,disabled:a,labelVisibility:Object(h.j)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),children:n.help&&Object(m.jsx)(c.b,{children:Object(m.jsx)(u.a,{content:n.help,placement:p.b.TOP_RIGHT})})}),Object(m.jsx)(i.a,{value:r,placeholder:f,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"}}}}),Object(m.jsx)(l.a,{dirty:e,value:r,maxLength:n.maxChars})]})}}var y=b}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 24.bbdd8ad5.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[24],{1269:function(e,t,s){"use strict";s.d(t,"b",(function(){return g})),s.d(t,"a",(function(){return h}));var i=s(0),r=s.n(i),o=s(61),a=s(53),n=s(18),l=s(1483),d=s(11),c=s(1);let h;!function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"}(h||(h={}));var g=function({value:e,width:t,size:s=h.SMALL,overrides:i}){const g=Object(o.c)(),u={xs:g.spacing.twoXS,sm:g.spacing.sm,md:g.spacing.lg,lg:g.spacing.xl,xl:g.spacing.twoXL},{activeTheme:p}=r.a.useContext(a.a),m=!Object(n.isPresetTheme)(p),b={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:u[s],backgroundColor:e.colors.progressbarTrackFill,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})},BarProgress:{style:({$theme:e})=>({backgroundColor:m?g.colors.primary:g.colors.blue70,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})}};return Object(c.jsx)(l.a,{value:e,overrides:Object(d.e)(b,i)})}},1370:function(e,t,s){"use strict";s.d(t,"a",(function(){return i}));class i{setStatus(e){return new i(this.name,this.size,this.id,e)}constructor(e,t,s,i){this.name=void 0,this.size=void 0,this.status=void 0,this.id=void 0,this.name=e,this.size=t,this.id=s,this.status=i}}},1777:function(e,t,s){"use strict";s.r(t),s.d(t,"default",(function(){return Q}));var i,r=s(1754),o=s(1341),a=s.n(o),n=s(36),l=s.n(n),d=s(0),c=s.n(d),h=s(15),g=s(41),u=s(50),p=s(112),m=s(111),b=s(190),f=s(19),j=s(33),S=s(1370),w=s(1269),x=s(5),R=s(20);function O(e,t){switch(e){case i.XSMALL:return{padding:`${t.spacing.twoXS} ${t.spacing.sm}`,fontSize:t.fontSizes.sm};case i.SMALL:return{padding:`${t.spacing.twoXS} ${t.spacing.md}`};case i.LARGE:return{padding:`${t.spacing.md} ${t.spacing.md}`};default:return{padding:`${t.spacing.xs} ${t.spacing.md}`}}}!function(e){e.XSMALL="xsmall",e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}(i||(i={}));const F=Object(x.a)("div",{target:"ejtjsn29"})((({theme:e,width:t})=>({position:"relative",width:"100%",objectFit:"contain"})),""),v=Object(x.a)("div",{target:"ejtjsn28"})((({theme:e,width:t})=>({backgroundColor:e.colors.secondaryBg,borderRadius:`${e.radii.md} ${e.radii.md} 0 0`,width:t,height:9*t/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),""),C=Object(x.a)("p",{target:"ejtjsn27"})((({theme:e})=>({marginTop:e.spacing.sm,textAlign:"center"})),""),I=Object(x.a)("img",{target:"ejtjsn26"})((({theme:e,opacity:t})=>({borderRadius:`${e.radii.md} ${e.radii.md} 0 0`,objectFit:"contain",opacity:t})),""),y=Object(x.a)("a",{target:"ejtjsn25"})((({theme:e})=>({color:e.colors.primary,display:"block",textDecoration:"none"})),""),E=Object(x.a)("span",{target:"ejtjsn24"})((({theme:e})=>({display:"flex",alignItems:"center"})),""),M=Object(x.a)("div",{target:"ejtjsn23"})((({theme:e})=>({position:"absolute",top:e.spacing.lg,right:e.spacing.lg,zIndex:1,color:e.colors.fadedText40,mixBlendMode:"difference",opacity:.6})),""),T=(Object(x.a)("div",{target:"ejtjsn22"})((({theme:e})=>({display:"flex"})),""),Object(x.a)("div",{target:"ejtjsn21"})((({theme:e})=>({height:"fit-content",width:"100%",position:"absolute",bottom:0})),"")),P=Object(x.a)("button",{target:"ejtjsn20"})((({theme:e})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:e.colors.lightenedBg05,border:`1px solid ${e.colors.fadedText10}`,borderRadius:`0 0 ${e.radii.md} ${e.radii.md}`,"&:hover":{borderColor:e.colors.primary,color:e.colors.primary},"&:active":{color:e.colors.white,borderColor:e.colors.primary,backgroundColor:e.colors.primary},"&:focus:not(:active)":{borderColor:e.colors.primary,color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:e.colors.fadedText40},fontWeight:e.fontWeights.normal,padding:`${e.spacing.xs} ${e.spacing.md}`,margin:0,lineHeight:e.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{boxShadow:`0 0 0 0.2rem ${Object(R.g)(e.colors.primary,.5)}`,outline:"none"},...O(i.MEDIUM,e)})),"");var L=s(1);var U=function({disabled:e,onClick:t,children:s,progress:i}){return Object(L.jsxs)(P,{disabled:e||!1,onClick:t||(()=>{}),progress:i||null,children:[s,i&&Object(L.jsx)(T,{children:Object(L.jsx)(w.b,{value:i,size:w.a.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},BarProgress:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},BarContainer:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}}}})})]})},k=s(1752),$=s(23),X=s(249);let D;!function(e){e.USER="user",e.ENVIRONMENT="environment"}(D||(D={}));var A=({switchFacingMode:e})=>Object(L.jsx)(M,{children:Object(L.jsx)(u.c,{content:"Switch camera",placement:u.b.TOP_RIGHT,children:Object(L.jsx)($.d,{kind:$.b.MINIMAL,onClick:e,children:Object(L.jsx)(g.b,{content:k.a,size:"twoXL",color:X.a.white})})})}),B=s(1753),N=s(61),z=s(406),G=s(1676),_=s.n(G),V=s(44);let W;!function(e){e.PENDING="pending",e.SUCCESS="success",e.ERROR="error"}(W||(W={}));const H=({width:e})=>Object(L.jsxs)(v,{width:e,children:[Object(L.jsx)(g.b,{size:"threeXL",color:X.a.gray60,content:B.a}),Object(L.jsxs)(C,{children:["This app would like to use your camera.",Object(L.jsx)(y,{href:V.b,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]});var J=({handleCapture:e,width:t,disabled:s,clearPhotoInProgress:i,setClearPhotoInProgress:r,facingMode:o,setFacingMode:a})=>{const[n,l]=Object(d.useState)(W.PENDING),c=Object(d.useRef)(null);const h=Object(N.c)();return Object(L.jsxs)(F,{width:t,children:[n===W.SUCCESS||s||i?z.isMobile&&Object(L.jsx)(A,{switchFacingMode:a}):Object(L.jsx)(H,{width:t}),Object(L.jsx)(v,{hidden:n!==W.SUCCESS&&!s&&!i,width:t,children:!s&&Object(L.jsx)(_.a,{audio:!1,ref:c,screenshotFormat:"image/jpeg",screenshotQuality:1,width:t,height:9*t/16,style:{borderRadius:`${h.radii.md} ${h.radii.md} 0 0`},onUserMediaError:()=>{l(W.ERROR)},onUserMedia:()=>{l(W.SUCCESS),r(!1)},videoConstraints:{width:{ideal:t},facingMode:o}})}),Object(L.jsx)(U,{onClick:function(){if(null!==c.current){const t=c.current.getScreenshot();e(t)}},disabled:n!==W.SUCCESS||s||i,children:"Take Photo"})]})};class q extends c.a.PureComponent{constructor(e){super(e),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new b.b,this.getProgress=()=>{if(this.state.files.length>0&&"uploading"===this.state.files[this.state.files.length-1].status.type){return this.state.files[this.state.files.length-1].status.progress}},this.setClearPhotoInProgress=e=>{this.setState({clearPhotoInProgress:e})},this.setFacingMode=()=>{this.setState((e=>({facingMode:e.facingMode===D.USER?D.ENVIRONMENT:D.USER})))},this.handleCapture=e=>{if(null===e)return Promise.resolve();this.setState({imgSrc:e,shutter:!0,minShutterEffectPassed:!1});var t,s;return(t=e,s=`camera-input-${(new Date).toISOString().replace(/:/g,"_")}.jpg`,fetch(t).then((e=>e.arrayBuffer())).then((e=>new File([e],s,{type:"image/jpeg"})))).then((e=>this.uploadFile(e))).then((()=>{return e=150,new Promise((t=>setTimeout(t,e)));var e})).then((()=>{this.setState({imgSrc:e,shutter:this.state.shutter,minShutterEffectPassed:!0})})).catch((e=>{Object(f.b)(e)}))},this.removeCapture=()=>{0!==this.state.files.length&&(this.state.files.forEach((e=>this.deleteFile(e.id))),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=e=>{const{element:t,widgetMgr:s}=this.props;if(e.disabled!==this.props.disabled&&this.props.disabled)return this.reset(),void s.setFileUploaderStateValue(t,new h.h,{fromUi:!1});if("ready"!==this.status)return;const i=this.createWidgetValue();if(void 0===i)return;const r=s.getFileUploaderStateValue(t);l.a.isEqual(i,r)||s.setFileUploaderStateValue(t,i,{fromUi:!0})},this.onFormCleared=()=>{this.setState({files:[]},(()=>{const e=this.createWidgetValue();null!=e&&(this.setState({imgSrc:null}),this.props.widgetMgr.setFileUploaderStateValue(this.props.element,e,{fromUi:!0}))}))},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.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((s=>({files:s.files.map((s=>s.id===e?t:s))})))},this.onUploadComplete=(e,t)=>{this.setState((e=>({newestServerFileId:Math.max(e.newestServerFileId,t),shutter:!1})));const s=this.getFile(e);null!=s&&"uploading"===s.status.type&&this.updateFile(s.id,s.setStatus({type:"uploaded",serverFileId:t}))},this.onUploadProgress=(e,t)=>{const s=this.getFile(t);if(null==s||"uploading"!==s.status.type)return;const i=Math.round(100*e.loaded/e.total);s.status.progress!==i&&this.updateFile(t,s.setStatus({type:"uploading",cancelToken:s.status.cancelToken,progress:i}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=e=>{const t=a.a.CancelToken.source(),s=new S.a(e.name,e.size,this.nextLocalFileId(),{type:"uploading",cancelToken:t,progress:1});this.addFile(s),this.props.uploadClient.uploadFile(this.props.element,e,(e=>this.onUploadProgress(e,s.id)),t.token).then((e=>this.onUploadComplete(s.id,e))).catch((e=>{a.a.isCancel(e)||this.updateFile(s.id,s.setStatus({type:"error",errorMessage:e?e.toString():"Unknown error"}))}))},this.state=this.initialValue}get initialValue(){const e={files:[],newestServerFileId:0,imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:D.USER},{widgetMgr:t,element:s}=this.props,i=t.getFileUploaderStateValue(s);if(null==i)return e;const{maxFileId:r,uploadedFileInfo:o}=i;return null==r||0===r||null==o?e:{files:o.map((e=>{const t=e.name,s=e.size,i=e.id;return new S.a(t,s,this.nextLocalFileId(),{type:"uploaded",serverFileId:i})})),newestServerFileId:Number(r),imgSrc:0===o.length?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:D.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}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:s,status:i}=e;return new h.w({id:i.serverFileId,name:t,size:s})}));return new h.h({maxFileId:this.state.newestServerFileId,uploadedFileInfo:e})}render(){var e;const{element:t,widgetMgr:s,disabled:i,width:o}=this.props;return this.formClearHelper.manageFormClearListener(s,t.formId,this.onFormCleared),Object(L.jsxs)(F,{width:o,className:"row-widget","data-testid":"stCameraInput",children:[Object(L.jsx)(m.d,{label:t.label,disabled:i,labelVisibility:Object(j.j)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),children:t.help&&Object(L.jsx)(m.b,{children:Object(L.jsx)(p.a,{content:t.help,placement:u.b.TOP_RIGHT})})}),this.state.imgSrc?Object(L.jsxs)(L.Fragment,{children:[Object(L.jsx)(v,{width:o,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&Object(L.jsx)(I,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:o,height:9*o/16})}),Object(L.jsx)(U,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||i,children:this.getProgress()?"Uploading...":Object(L.jsxs)(E,{children:[Object(L.jsx)(g.b,{content:r.a,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):Object(L.jsx)(J,{handleCapture:this.handleCapture,width:o,disabled:i,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode})]})}nextLocalFileId(){return this.localFileIdCounter++}}var Q=q}}]);
1
+ /*! For license information please see 24.36b10d26.chunk.js.LICENSE.txt */
2
+ (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[24],{1274:function(e,t,s){"use strict";s.d(t,"b",(function(){return g})),s.d(t,"a",(function(){return h}));var i=s(0),r=s.n(i),o=s(61),a=s(53),n=s(18),l=s(1488),d=s(11),c=s(1);let h;!function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"}(h||(h={}));var g=function({value:e,width:t,size:s=h.SMALL,overrides:i}){const g=Object(o.c)(),u={xs:g.spacing.twoXS,sm:g.spacing.sm,md:g.spacing.lg,lg:g.spacing.xl,xl:g.spacing.twoXL},{activeTheme:p}=r.a.useContext(a.a),m=!Object(n.isPresetTheme)(p),b={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:u[s],backgroundColor:e.colors.progressbarTrackFill,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})},BarProgress:{style:({$theme:e})=>({backgroundColor:m?g.colors.primary:g.colors.blue70,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})}};return Object(c.jsx)(l.a,{value:e,overrides:Object(d.e)(b,i)})}},1375:function(e,t,s){"use strict";s.d(t,"a",(function(){return i}));class i{setStatus(e){return new i(this.name,this.size,this.id,e)}constructor(e,t,s,i){this.name=void 0,this.size=void 0,this.status=void 0,this.id=void 0,this.name=e,this.size=t,this.id=s,this.status=i}}},1782:function(e,t,s){"use strict";s.r(t),s.d(t,"default",(function(){return Q}));var i,r=s(1759),o=s(1346),a=s.n(o),n=s(36),l=s.n(n),d=s(0),c=s.n(d),h=s(15),g=s(41),u=s(50),p=s(114),m=s(113),b=s(193),f=s(19),j=s(33),S=s(1375),w=s(1274),x=s(5),R=s(20);function O(e,t){switch(e){case i.XSMALL:return{padding:`${t.spacing.twoXS} ${t.spacing.sm}`,fontSize:t.fontSizes.sm};case i.SMALL:return{padding:`${t.spacing.twoXS} ${t.spacing.md}`};case i.LARGE:return{padding:`${t.spacing.md} ${t.spacing.md}`};default:return{padding:`${t.spacing.xs} ${t.spacing.md}`}}}!function(e){e.XSMALL="xsmall",e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}(i||(i={}));const F=Object(x.a)("div",{target:"ejtjsn29"})((({theme:e,width:t})=>({position:"relative",width:"100%",objectFit:"contain"})),""),v=Object(x.a)("div",{target:"ejtjsn28"})((({theme:e,width:t})=>({backgroundColor:e.colors.secondaryBg,borderRadius:`${e.radii.md} ${e.radii.md} 0 0`,width:t,height:9*t/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),""),C=Object(x.a)("p",{target:"ejtjsn27"})((({theme:e})=>({marginTop:e.spacing.sm,textAlign:"center"})),""),I=Object(x.a)("img",{target:"ejtjsn26"})((({theme:e,opacity:t})=>({borderRadius:`${e.radii.md} ${e.radii.md} 0 0`,objectFit:"contain",opacity:t})),""),y=Object(x.a)("a",{target:"ejtjsn25"})((({theme:e})=>({color:e.colors.primary,display:"block",textDecoration:"none"})),""),E=Object(x.a)("span",{target:"ejtjsn24"})((({theme:e})=>({display:"flex",alignItems:"center"})),""),M=Object(x.a)("div",{target:"ejtjsn23"})((({theme:e})=>({position:"absolute",top:e.spacing.lg,right:e.spacing.lg,zIndex:1,color:e.colors.fadedText40,mixBlendMode:"difference",opacity:.6})),""),T=(Object(x.a)("div",{target:"ejtjsn22"})((({theme:e})=>({display:"flex"})),""),Object(x.a)("div",{target:"ejtjsn21"})((({theme:e})=>({height:"fit-content",width:"100%",position:"absolute",bottom:0})),"")),P=Object(x.a)("button",{target:"ejtjsn20"})((({theme:e})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:e.colors.lightenedBg05,border:`1px solid ${e.colors.fadedText10}`,borderRadius:`0 0 ${e.radii.md} ${e.radii.md}`,"&:hover":{borderColor:e.colors.primary,color:e.colors.primary},"&:active":{color:e.colors.white,borderColor:e.colors.primary,backgroundColor:e.colors.primary},"&:focus:not(:active)":{borderColor:e.colors.primary,color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:e.colors.fadedText40},fontWeight:e.fontWeights.normal,padding:`${e.spacing.xs} ${e.spacing.md}`,margin:0,lineHeight:e.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{boxShadow:`0 0 0 0.2rem ${Object(R.g)(e.colors.primary,.5)}`,outline:"none"},...O(i.MEDIUM,e)})),"");var L=s(1);var U=function({disabled:e,onClick:t,children:s,progress:i}){return Object(L.jsxs)(P,{disabled:e||!1,onClick:t||(()=>{}),progress:i||null,children:[s,i&&Object(L.jsx)(T,{children:Object(L.jsx)(w.b,{value:i,size:w.a.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},BarProgress:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},BarContainer:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}}}})})]})},k=s(1757),$=s(23),X=s(254);let D;!function(e){e.USER="user",e.ENVIRONMENT="environment"}(D||(D={}));var A=({switchFacingMode:e})=>Object(L.jsx)(M,{children:Object(L.jsx)(u.c,{content:"Switch camera",placement:u.b.TOP_RIGHT,children:Object(L.jsx)($.d,{kind:$.b.MINIMAL,onClick:e,children:Object(L.jsx)(g.b,{content:k.a,size:"twoXL",color:X.a.white})})})}),B=s(1758),N=s(61),z=s(409),G=s(1681),_=s.n(G),V=s(44);let W;!function(e){e.PENDING="pending",e.SUCCESS="success",e.ERROR="error"}(W||(W={}));const H=({width:e})=>Object(L.jsxs)(v,{width:e,children:[Object(L.jsx)(g.b,{size:"threeXL",color:X.a.gray60,content:B.a}),Object(L.jsxs)(C,{children:["This app would like to use your camera.",Object(L.jsx)(y,{href:V.b,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]});var J=({handleCapture:e,width:t,disabled:s,clearPhotoInProgress:i,setClearPhotoInProgress:r,facingMode:o,setFacingMode:a})=>{const[n,l]=Object(d.useState)(W.PENDING),c=Object(d.useRef)(null);const h=Object(N.c)();return Object(L.jsxs)(F,{width:t,children:[n===W.SUCCESS||s||i?z.isMobile&&Object(L.jsx)(A,{switchFacingMode:a}):Object(L.jsx)(H,{width:t}),Object(L.jsx)(v,{hidden:n!==W.SUCCESS&&!s&&!i,width:t,children:!s&&Object(L.jsx)(_.a,{audio:!1,ref:c,screenshotFormat:"image/jpeg",screenshotQuality:1,width:t,height:9*t/16,style:{borderRadius:`${h.radii.md} ${h.radii.md} 0 0`},onUserMediaError:()=>{l(W.ERROR)},onUserMedia:()=>{l(W.SUCCESS),r(!1)},videoConstraints:{width:{ideal:t},facingMode:o}})}),Object(L.jsx)(U,{onClick:function(){if(null!==c.current){const t=c.current.getScreenshot();e(t)}},disabled:n!==W.SUCCESS||s||i,children:"Take Photo"})]})};class q extends c.a.PureComponent{constructor(e){super(e),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new b.b,this.getProgress=()=>{if(this.state.files.length>0&&"uploading"===this.state.files[this.state.files.length-1].status.type){return this.state.files[this.state.files.length-1].status.progress}},this.setClearPhotoInProgress=e=>{this.setState({clearPhotoInProgress:e})},this.setFacingMode=()=>{this.setState((e=>({facingMode:e.facingMode===D.USER?D.ENVIRONMENT:D.USER})))},this.handleCapture=e=>{if(null===e)return Promise.resolve();this.setState({imgSrc:e,shutter:!0,minShutterEffectPassed:!1});var t,s;return(t=e,s=`camera-input-${(new Date).toISOString().replace(/:/g,"_")}.jpg`,fetch(t).then((e=>e.arrayBuffer())).then((e=>new File([e],s,{type:"image/jpeg"})))).then((e=>this.uploadFile(e))).then((()=>{return e=150,new Promise((t=>setTimeout(t,e)));var e})).then((()=>{this.setState({imgSrc:e,shutter:this.state.shutter,minShutterEffectPassed:!0})})).catch((e=>{Object(f.b)(e)}))},this.removeCapture=()=>{0!==this.state.files.length&&(this.state.files.forEach((e=>this.deleteFile(e.id))),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=e=>{const{element:t,widgetMgr:s}=this.props;if(e.disabled!==this.props.disabled&&this.props.disabled)return this.reset(),void s.setFileUploaderStateValue(t,new h.h,{fromUi:!1});if("ready"!==this.status)return;const i=this.createWidgetValue();if(void 0===i)return;const r=s.getFileUploaderStateValue(t);l.a.isEqual(i,r)||s.setFileUploaderStateValue(t,i,{fromUi:!0})},this.onFormCleared=()=>{this.setState({files:[]},(()=>{const e=this.createWidgetValue();null!=e&&(this.setState({imgSrc:null}),this.props.widgetMgr.setFileUploaderStateValue(this.props.element,e,{fromUi:!0}))}))},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.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((s=>({files:s.files.map((s=>s.id===e?t:s))})))},this.onUploadComplete=(e,t)=>{this.setState((e=>({newestServerFileId:Math.max(e.newestServerFileId,t),shutter:!1})));const s=this.getFile(e);null!=s&&"uploading"===s.status.type&&this.updateFile(s.id,s.setStatus({type:"uploaded",serverFileId:t}))},this.onUploadProgress=(e,t)=>{const s=this.getFile(t);if(null==s||"uploading"!==s.status.type)return;const i=Math.round(100*e.loaded/e.total);s.status.progress!==i&&this.updateFile(t,s.setStatus({type:"uploading",cancelToken:s.status.cancelToken,progress:i}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=e=>{const t=a.a.CancelToken.source(),s=new S.a(e.name,e.size,this.nextLocalFileId(),{type:"uploading",cancelToken:t,progress:1});this.addFile(s),this.props.uploadClient.uploadFile(this.props.element,e,(e=>this.onUploadProgress(e,s.id)),t.token).then((e=>this.onUploadComplete(s.id,e))).catch((e=>{a.a.isCancel(e)||this.updateFile(s.id,s.setStatus({type:"error",errorMessage:e?e.toString():"Unknown error"}))}))},this.state=this.initialValue}get initialValue(){const e={files:[],newestServerFileId:0,imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:D.USER},{widgetMgr:t,element:s}=this.props,i=t.getFileUploaderStateValue(s);if(null==i)return e;const{maxFileId:r,uploadedFileInfo:o}=i;return null==r||0===r||null==o?e:{files:o.map((e=>{const t=e.name,s=e.size,i=e.id;return new S.a(t,s,this.nextLocalFileId(),{type:"uploaded",serverFileId:i})})),newestServerFileId:Number(r),imgSrc:0===o.length?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:D.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}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:s,status:i}=e;return new h.w({id:i.serverFileId,name:t,size:s})}));return new h.h({maxFileId:this.state.newestServerFileId,uploadedFileInfo:e})}render(){var e;const{element:t,widgetMgr:s,disabled:i,width:o}=this.props;return this.formClearHelper.manageFormClearListener(s,t.formId,this.onFormCleared),Object(L.jsxs)(F,{width:o,className:"row-widget","data-testid":"stCameraInput",children:[Object(L.jsx)(m.d,{label:t.label,disabled:i,labelVisibility:Object(j.j)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),children:t.help&&Object(L.jsx)(m.b,{children:Object(L.jsx)(p.a,{content:t.help,placement:u.b.TOP_RIGHT})})}),this.state.imgSrc?Object(L.jsxs)(L.Fragment,{children:[Object(L.jsx)(v,{width:o,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&Object(L.jsx)(I,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:o,height:9*o/16})}),Object(L.jsx)(U,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||i,children:this.getProgress()?"Uploading...":Object(L.jsxs)(E,{children:[Object(L.jsx)(g.b,{content:r.a,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):Object(L.jsx)(J,{handleCapture:this.handleCapture,width:o,disabled:i,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode})]})}nextLocalFileId(){return this.localFileIdCounter++}}var Q=q}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 25.7a13965c.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[25],{1269:function(e,t,i){"use strict";i.d(t,"b",(function(){return p})),i.d(t,"a",(function(){return g}));var s=i(0),a=i.n(s),n=i(61),l=i(53),r=i(18),o=i(1483),d=i(11),c=i(1);let g;!function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"}(g||(g={}));var p=function({value:e,width:t,size:i=g.SMALL,overrides:s}){const p=Object(n.c)(),h={xs:p.spacing.twoXS,sm:p.spacing.sm,md:p.spacing.lg,lg:p.spacing.xl,xl:p.spacing.twoXL},{activeTheme:m}=a.a.useContext(l.a),u=!Object(r.isPresetTheme)(m),b={BarContainer:{style:{marginTop:p.spacing.none,marginBottom:p.spacing.none,marginRight:p.spacing.none,marginLeft:p.spacing.none}},Bar:{style:({$theme:e})=>({width:t?t.toString():void 0,marginTop:p.spacing.none,marginBottom:p.spacing.none,marginRight:p.spacing.none,marginLeft:p.spacing.none,height:h[i],backgroundColor:e.colors.progressbarTrackFill,borderTopLeftRadius:p.spacing.twoXS,borderTopRightRadius:p.spacing.twoXS,borderBottomLeftRadius:p.spacing.twoXS,borderBottomRightRadius:p.spacing.twoXS})},BarProgress:{style:({$theme:e})=>({backgroundColor:u?p.colors.primary:p.colors.blue70,borderTopLeftRadius:p.spacing.twoXS,borderTopRightRadius:p.spacing.twoXS,borderBottomLeftRadius:p.spacing.twoXS,borderBottomRightRadius:p.spacing.twoXS})}};return Object(c.jsx)(o.a,{value:e,overrides:Object(d.e)(b,s)})}},1370:function(e,t,i){"use strict";i.d(t,"a",(function(){return 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}}},1767:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return ge}));var s=i(1341),a=i.n(s),n=i(36),l=i.n(n),r=i(0),o=i.n(r),d=i(15),c=i(190),g=i(33);let p;!function(e){e.Gigabyte="gb",e.Megabyte="mb",e.Kilobyte="kb",e.Byte="b"}(p||(p={}));const h=Object(g.g)()?1024:1e3,m=[p.Gigabyte,p.Megabyte,p.Kilobyte,p.Byte],u=(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=m.indexOf(t);return s&&e>h/2?u(e/h,m[s-1],i):`${e.toFixed(i)}${t.toUpperCase()}`};var b=i(111),x=i(112),j=i(50),f=i(1693),v=i(23),O=i(5);const y=Object(O.a)("section",{target:"exg6vvm15"})((({isDisabled:e,theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.lg,backgroundColor:t.colors.secondaryBg,borderRadius:t.radii.md,":focus":{outline:"none",boxShadow:`0 0 0 1px ${t.colors.primary}`},color:e?t.colors.gray:t.colors.bodyText})),""),S=Object(O.a)("div",{target:"exg6vvm14"})((({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex"})),""),w=Object(O.a)("span",{target:"exg6vvm13"})((({theme:e})=>({color:e.colors.darkenedBgMix100,marginRight:e.spacing.lg})),""),F=Object(O.a)("span",{target:"exg6vvm12"})((({theme:e})=>({marginBottom:e.spacing.twoXS})),""),I=Object(O.a)("div",{target:"exg6vvm11"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"}),z=Object(O.a)("div",{target:"exg6vvm10"})((({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),""),B=Object(O.a)("ul",{target:"exg6vvm9"})((({theme:e})=>({listStyleType:"none",marginBottom:0})),""),M=Object(O.a)("li",{target:"exg6vvm8"})((({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),""),L=Object(O.a)("div",{target:"exg6vvm7"})((({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),""),R=Object(O.a)("div",{target:"exg6vvm6"})((({theme:e})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),""),U=Object(O.a)("div",{target:"exg6vvm5"})((({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),""),k=Object(O.a)("span",{target:"exg6vvm4"})((({theme:e})=>({marginRight:e.spacing.twoXS})),""),C=Object(O.a)("div",{target:"exg6vvm3"})((({theme:e})=>({display:"flex",padding:e.spacing.twoXS,color:e.colors.darkenedBgMix100})),""),T=Object(O.a)("small",{target:"exg6vvm2"})((({theme:e})=>({color:e.colors.danger,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),""),X=Object(O.a)("span",{target:"exg6vvm1"})({name:"0",styles:""}),E=e=>({[y]:{display:"flex",flexDirection:"column",alignItems:"flex-start"},[S]:{marginBottom:e.spacing.lg},[w]:{display:"none"},[z]:{paddingRight:e.spacing.lg},[U]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[R]:{width:e.sizes.full},[L]:{flexDirection:"column"},[T]:{height:"auto",whiteSpace:"initial"},[X]:{display:"none"},[M]:{margin:e.spacing.none,padding:e.spacing.none}}),D=Object(O.a)("div",{target:"exg6vvm0"})((({theme:e})=>e.inSidebar?E(e):{[`@media (max-width: ${e.breakpoints.sm})`]:E(e)}),"");var P=i(1758),A=i(41),N=i(311),V=i(1);var $=({multiple:e,acceptedExtensions:t,maxSizeBytes:i})=>Object(V.jsxs)(S,{children:[Object(V.jsx)(w,{children:Object(V.jsx)(A.b,{content:P.a,size:"threeXL"})}),Object(V.jsxs)(I,{children:[Object(V.jsxs)(F,{children:["Drag and drop file",e?"s":""," here"]}),Object(V.jsxs)(N.a,{children:[`Limit ${u(i,p.Byte,0)} per file`,t.length?` \u2022 ${t.join(", ").replace(/\./g,"").toUpperCase()}`:null]})]})]});var H=({onDrop:e,multiple:t,acceptedExtensions:i,maxSizeBytes:s,disabled:a,label:n})=>Object(V.jsx)(f.a,{onDrop:e,multiple:t,accept:i.length?i:void 0,maxSize:s,disabled:a,children:({getRootProps:e,getInputProps:l})=>Object(V.jsxs)(y,{...e(),"data-testid":"stFileUploadDropzone",isDisabled:a,"aria-label":n,children:[Object(V.jsx)("input",{...l()}),Object(V.jsx)($,{multiple:t,acceptedExtensions:i,maxSizeBytes:s}),Object(V.jsx)(v.d,{kind:v.b.PRIMARY,disabled:a,size:v.c.SMALL,children:"Browse files"})]})}),G=i(87),W=i.n(G),q=i(1759),J=i(1145);const K=Object(O.a)("div",{target:"e1f8s2qs1"})((({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),""),Y=Object(O.a)("div",{target:"e1f8s2qs0"})((({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),"");var _=({className:e,currentPage:t,totalPages:i,onNext:s,onPrevious:a})=>Object(V.jsxs)(K,{className:e,children:[Object(V.jsx)(N.a,{children:`Showing page ${t} of ${i}`}),Object(V.jsxs)(Y,{children:[Object(V.jsx)(v.d,{onClick:a,kind:v.b.MINIMAL,children:Object(V.jsx)(A.b,{content:q.a,size:"xl"})}),Object(V.jsx)(v.d,{onClick:s,kind:v.b.MINIMAL,children:Object(V.jsx)(A.b,{content:J.a,size:"xl"})})]})]}),Q=i(407);const Z=(e,t)=>Math.ceil(e.length/t);var ee=e=>W()((({pageSize:t,items:i,resetOnAdd:s,...a})=>{const[n,l]=Object(r.useState)(0),[o,d]=Object(r.useState)(Z(i,t)),c=Object(Q.b)(i);Object(r.useEffect)((()=>{c&&c.length!==i.length&&d(Z(i,t)),c&&c.length<i.length?s&&l(0):n+1>=o&&l(o-1)}),[i,n,t,c,s,o]);const g=i.slice(n*t,n*t+t);return Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(e,{items:g,...a}),i.length>t?Object(V.jsx)(_,{className:"streamlit-paginator",pageSize:t,totalPages:o,currentPage:n+1,onNext:()=>{l(Math.min(n+1,o-1))},onPrevious:()=>{l(Math.max(0,n-1))}}):null]})}),e),te=i(1760),ie=i(1761),se=i(1762),ae=i(1269);const ne=({fileInfo:e})=>"uploading"===e.status.type?Object(V.jsx)(ae.b,{value:e.status.progress,size:ae.a.SMALL,overrides:{Bar:{style:{marginLeft:0,marginTop:"4px"}}}}):"error"===e.status.type?Object(V.jsxs)(T,{children:[Object(V.jsx)(k,{"data-testid":"stUploadedFileErrorMessage",children:e.status.errorMessage}),Object(V.jsx)(X,{children:Object(V.jsx)(A.b,{content:te.a,size:"lg"})})]}):"uploaded"===e.status.type?Object(V.jsx)(N.a,{children:u(e.size,p.Byte)}):null;var le=({fileInfo:e,onDelete:t})=>Object(V.jsxs)(U,{className:"uploadedFile",children:[Object(V.jsx)(C,{children:Object(V.jsx)(A.b,{content:ie.a,size:"twoXL"})}),Object(V.jsxs)(L,{className:"uploadedFileData",children:[Object(V.jsx)(R,{className:"uploadedFileName",title:e.name,children:e.name}),Object(V.jsx)(ne,{fileInfo:e})]}),Object(V.jsx)("div",{"data-testid":"fileDeleteBtn",children:Object(V.jsx)(v.d,{onClick:()=>t(e.id),kind:v.b.MINIMAL,children:Object(V.jsx)(A.b,{content:se.a,size:"lg"})})})]});const re=ee((({items:e,onDelete:t})=>Object(V.jsx)(B,{children:e.map((e=>Object(V.jsx)(M,{children:Object(V.jsx)(le,{fileInfo:e,onDelete:t})},e.id)))})));var oe=e=>Object(V.jsx)(z,{children:Object(V.jsx)(re,{...e})}),de=i(1370);class ce extends o.a.PureComponent{constructor(e){super(e),this.formClearHelper=new c.b,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 d.h,{fromUi:!1});if("ready"!==this.status)return;const s=this.createWidgetValue();if(void 0===s)return;const a=i.getFileUploaderStateValue(t);l.a.isEqual(s,a)||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 de.a(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=a.a.CancelToken.source(),i=new de.a(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=>{a.a.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 ${u(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:a,uploadedFileInfo:n}=s;return null==a||0===a||null==n?e:{files:n.map((e=>{const t=e.name,i=e.size,s=e.id;return new de.a(t,i,this.nextLocalFileId(),{type:"uploaded",serverFileId:s})})),newestServerFileId:Number(a)}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){return((e,t,i)=>{if(e<0)throw Error("Size must be 0 or greater");const s=m.findIndex((e=>e===t)),a=m.findIndex((e=>e===i));if(-1===s||-1===a)throw Error("Unexpected byte unit provided");if(s===a)return e;const n=Math.abs(s-a),l=h**n;return s>a?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 d.w({id:s.serverFileId,name:t,size:i})}));return new d.h({maxFileId:this.state.newestServerFileId,uploadedFileInfo:e})}render(){var e;const{files:t}=this.state,{element:i,disabled:s,widgetMgr:a}=this.props,n=i.type;this.formClearHelper.manageFormClearListener(a,i.formId,this.onFormCleared);const l=t.slice().reverse();return Object(V.jsxs)(D,{"data-testid":"stFileUploader",children:[Object(V.jsx)(b.d,{label:i.label,disabled:s,labelVisibility:Object(g.j)(null===(e=i.labelVisibility)||void 0===e?void 0:e.value),children:i.help&&Object(V.jsx)(b.b,{children:Object(V.jsx)(x.a,{content:i.help,placement:j.b.TOP_RIGHT})})}),Object(V.jsx)(H,{onDrop:this.dropHandler,multiple:i.multipleFiles,acceptedExtensions:n,maxSizeBytes:this.maxUploadSizeInBytes,label:i.label,disabled:s}),l.length>0&&Object(V.jsx)(oe,{items:l,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0})]})}nextLocalFileId(){return this.localFileIdCounter++}}var ge=ce}}]);
1
+ /*! For license information please see 25.edf85627.chunk.js.LICENSE.txt */
2
+ (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[25],{1274:function(e,t,i){"use strict";i.d(t,"b",(function(){return p})),i.d(t,"a",(function(){return g}));var s=i(0),a=i.n(s),n=i(61),l=i(53),r=i(18),o=i(1488),d=i(11),c=i(1);let g;!function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"}(g||(g={}));var p=function({value:e,width:t,size:i=g.SMALL,overrides:s}){const p=Object(n.c)(),h={xs:p.spacing.twoXS,sm:p.spacing.sm,md:p.spacing.lg,lg:p.spacing.xl,xl:p.spacing.twoXL},{activeTheme:m}=a.a.useContext(l.a),u=!Object(r.isPresetTheme)(m),b={BarContainer:{style:{marginTop:p.spacing.none,marginBottom:p.spacing.none,marginRight:p.spacing.none,marginLeft:p.spacing.none}},Bar:{style:({$theme:e})=>({width:t?t.toString():void 0,marginTop:p.spacing.none,marginBottom:p.spacing.none,marginRight:p.spacing.none,marginLeft:p.spacing.none,height:h[i],backgroundColor:e.colors.progressbarTrackFill,borderTopLeftRadius:p.spacing.twoXS,borderTopRightRadius:p.spacing.twoXS,borderBottomLeftRadius:p.spacing.twoXS,borderBottomRightRadius:p.spacing.twoXS})},BarProgress:{style:({$theme:e})=>({backgroundColor:u?p.colors.primary:p.colors.blue70,borderTopLeftRadius:p.spacing.twoXS,borderTopRightRadius:p.spacing.twoXS,borderBottomLeftRadius:p.spacing.twoXS,borderBottomRightRadius:p.spacing.twoXS})}};return Object(c.jsx)(o.a,{value:e,overrides:Object(d.e)(b,s)})}},1375:function(e,t,i){"use strict";i.d(t,"a",(function(){return 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}}},1772:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return ge}));var s=i(1346),a=i.n(s),n=i(36),l=i.n(n),r=i(0),o=i.n(r),d=i(15),c=i(193),g=i(33);let p;!function(e){e.Gigabyte="gb",e.Megabyte="mb",e.Kilobyte="kb",e.Byte="b"}(p||(p={}));const h=Object(g.g)()?1024:1e3,m=[p.Gigabyte,p.Megabyte,p.Kilobyte,p.Byte],u=(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=m.indexOf(t);return s&&e>h/2?u(e/h,m[s-1],i):`${e.toFixed(i)}${t.toUpperCase()}`};var b=i(113),x=i(114),j=i(50),f=i(1698),v=i(23),O=i(5);const y=Object(O.a)("section",{target:"exg6vvm15"})((({isDisabled:e,theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.lg,backgroundColor:t.colors.secondaryBg,borderRadius:t.radii.md,":focus":{outline:"none",boxShadow:`0 0 0 1px ${t.colors.primary}`},color:e?t.colors.gray:t.colors.bodyText})),""),S=Object(O.a)("div",{target:"exg6vvm14"})((({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex"})),""),w=Object(O.a)("span",{target:"exg6vvm13"})((({theme:e})=>({color:e.colors.darkenedBgMix100,marginRight:e.spacing.lg})),""),F=Object(O.a)("span",{target:"exg6vvm12"})((({theme:e})=>({marginBottom:e.spacing.twoXS})),""),I=Object(O.a)("div",{target:"exg6vvm11"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"}),z=Object(O.a)("div",{target:"exg6vvm10"})((({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),""),B=Object(O.a)("ul",{target:"exg6vvm9"})((({theme:e})=>({listStyleType:"none",marginBottom:0})),""),M=Object(O.a)("li",{target:"exg6vvm8"})((({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),""),L=Object(O.a)("div",{target:"exg6vvm7"})((({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),""),R=Object(O.a)("div",{target:"exg6vvm6"})((({theme:e})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),""),U=Object(O.a)("div",{target:"exg6vvm5"})((({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),""),k=Object(O.a)("span",{target:"exg6vvm4"})((({theme:e})=>({marginRight:e.spacing.twoXS})),""),C=Object(O.a)("div",{target:"exg6vvm3"})((({theme:e})=>({display:"flex",padding:e.spacing.twoXS,color:e.colors.darkenedBgMix100})),""),T=Object(O.a)("small",{target:"exg6vvm2"})((({theme:e})=>({color:e.colors.danger,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),""),X=Object(O.a)("span",{target:"exg6vvm1"})({name:"0",styles:""}),E=e=>({[y]:{display:"flex",flexDirection:"column",alignItems:"flex-start"},[S]:{marginBottom:e.spacing.lg},[w]:{display:"none"},[z]:{paddingRight:e.spacing.lg},[U]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[R]:{width:e.sizes.full},[L]:{flexDirection:"column"},[T]:{height:"auto",whiteSpace:"initial"},[X]:{display:"none"},[M]:{margin:e.spacing.none,padding:e.spacing.none}}),D=Object(O.a)("div",{target:"exg6vvm0"})((({theme:e})=>e.inSidebar?E(e):{[`@media (max-width: ${e.breakpoints.sm})`]:E(e)}),"");var P=i(1763),A=i(41),N=i(315),V=i(1);var $=({multiple:e,acceptedExtensions:t,maxSizeBytes:i})=>Object(V.jsxs)(S,{children:[Object(V.jsx)(w,{children:Object(V.jsx)(A.b,{content:P.a,size:"threeXL"})}),Object(V.jsxs)(I,{children:[Object(V.jsxs)(F,{children:["Drag and drop file",e?"s":""," here"]}),Object(V.jsxs)(N.a,{children:[`Limit ${u(i,p.Byte,0)} per file`,t.length?` \u2022 ${t.join(", ").replace(/\./g,"").toUpperCase()}`:null]})]})]});var H=({onDrop:e,multiple:t,acceptedExtensions:i,maxSizeBytes:s,disabled:a,label:n})=>Object(V.jsx)(f.a,{onDrop:e,multiple:t,accept:i.length?i:void 0,maxSize:s,disabled:a,children:({getRootProps:e,getInputProps:l})=>Object(V.jsxs)(y,{...e(),"data-testid":"stFileUploadDropzone",isDisabled:a,"aria-label":n,children:[Object(V.jsx)("input",{...l()}),Object(V.jsx)($,{multiple:t,acceptedExtensions:i,maxSizeBytes:s}),Object(V.jsx)(v.d,{kind:v.b.PRIMARY,disabled:a,size:v.c.SMALL,children:"Browse files"})]})}),G=i(87),W=i.n(G),q=i(1764),J=i(1150);const K=Object(O.a)("div",{target:"e1f8s2qs1"})((({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),""),Y=Object(O.a)("div",{target:"e1f8s2qs0"})((({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),"");var _=({className:e,currentPage:t,totalPages:i,onNext:s,onPrevious:a})=>Object(V.jsxs)(K,{className:e,children:[Object(V.jsx)(N.a,{children:`Showing page ${t} of ${i}`}),Object(V.jsxs)(Y,{children:[Object(V.jsx)(v.d,{onClick:a,kind:v.b.MINIMAL,children:Object(V.jsx)(A.b,{content:q.a,size:"xl"})}),Object(V.jsx)(v.d,{onClick:s,kind:v.b.MINIMAL,children:Object(V.jsx)(A.b,{content:J.a,size:"xl"})})]})]}),Q=i(410);const Z=(e,t)=>Math.ceil(e.length/t);var ee=e=>W()((({pageSize:t,items:i,resetOnAdd:s,...a})=>{const[n,l]=Object(r.useState)(0),[o,d]=Object(r.useState)(Z(i,t)),c=Object(Q.b)(i);Object(r.useEffect)((()=>{c&&c.length!==i.length&&d(Z(i,t)),c&&c.length<i.length?s&&l(0):n+1>=o&&l(o-1)}),[i,n,t,c,s,o]);const g=i.slice(n*t,n*t+t);return Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(e,{items:g,...a}),i.length>t?Object(V.jsx)(_,{className:"streamlit-paginator",pageSize:t,totalPages:o,currentPage:n+1,onNext:()=>{l(Math.min(n+1,o-1))},onPrevious:()=>{l(Math.max(0,n-1))}}):null]})}),e),te=i(1765),ie=i(1766),se=i(1767),ae=i(1274);const ne=({fileInfo:e})=>"uploading"===e.status.type?Object(V.jsx)(ae.b,{value:e.status.progress,size:ae.a.SMALL,overrides:{Bar:{style:{marginLeft:0,marginTop:"4px"}}}}):"error"===e.status.type?Object(V.jsxs)(T,{children:[Object(V.jsx)(k,{"data-testid":"stUploadedFileErrorMessage",children:e.status.errorMessage}),Object(V.jsx)(X,{children:Object(V.jsx)(A.b,{content:te.a,size:"lg"})})]}):"uploaded"===e.status.type?Object(V.jsx)(N.a,{children:u(e.size,p.Byte)}):null;var le=({fileInfo:e,onDelete:t})=>Object(V.jsxs)(U,{className:"uploadedFile",children:[Object(V.jsx)(C,{children:Object(V.jsx)(A.b,{content:ie.a,size:"twoXL"})}),Object(V.jsxs)(L,{className:"uploadedFileData",children:[Object(V.jsx)(R,{className:"uploadedFileName",title:e.name,children:e.name}),Object(V.jsx)(ne,{fileInfo:e})]}),Object(V.jsx)("div",{"data-testid":"fileDeleteBtn",children:Object(V.jsx)(v.d,{onClick:()=>t(e.id),kind:v.b.MINIMAL,children:Object(V.jsx)(A.b,{content:se.a,size:"lg"})})})]});const re=ee((({items:e,onDelete:t})=>Object(V.jsx)(B,{children:e.map((e=>Object(V.jsx)(M,{children:Object(V.jsx)(le,{fileInfo:e,onDelete:t})},e.id)))})));var oe=e=>Object(V.jsx)(z,{children:Object(V.jsx)(re,{...e})}),de=i(1375);class ce extends o.a.PureComponent{constructor(e){super(e),this.formClearHelper=new c.b,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 d.h,{fromUi:!1});if("ready"!==this.status)return;const s=this.createWidgetValue();if(void 0===s)return;const a=i.getFileUploaderStateValue(t);l.a.isEqual(s,a)||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 de.a(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=a.a.CancelToken.source(),i=new de.a(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=>{a.a.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 ${u(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:a,uploadedFileInfo:n}=s;return null==a||0===a||null==n?e:{files:n.map((e=>{const t=e.name,i=e.size,s=e.id;return new de.a(t,i,this.nextLocalFileId(),{type:"uploaded",serverFileId:s})})),newestServerFileId:Number(a)}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){return((e,t,i)=>{if(e<0)throw Error("Size must be 0 or greater");const s=m.findIndex((e=>e===t)),a=m.findIndex((e=>e===i));if(-1===s||-1===a)throw Error("Unexpected byte unit provided");if(s===a)return e;const n=Math.abs(s-a),l=h**n;return s>a?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 d.w({id:s.serverFileId,name:t,size:i})}));return new d.h({maxFileId:this.state.newestServerFileId,uploadedFileInfo:e})}render(){var e;const{files:t}=this.state,{element:i,disabled:s,widgetMgr:a}=this.props,n=i.type;this.formClearHelper.manageFormClearListener(a,i.formId,this.onFormCleared);const l=t.slice().reverse();return Object(V.jsxs)(D,{"data-testid":"stFileUploader",children:[Object(V.jsx)(b.d,{label:i.label,disabled:s,labelVisibility:Object(g.j)(null===(e=i.labelVisibility)||void 0===e?void 0:e.value),children:i.help&&Object(V.jsx)(b.b,{children:Object(V.jsx)(x.a,{content:i.help,placement:j.b.TOP_RIGHT})})}),Object(V.jsx)(H,{onDrop:this.dropHandler,multiple:i.multipleFiles,acceptedExtensions:n,maxSizeBytes:this.maxUploadSizeInBytes,label:i.label,disabled:s}),l.length>0&&Object(V.jsx)(oe,{items:l,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0})]})}nextLocalFileId(){return this.localFileIdCounter++}}var ge=ce}}]);