@stlite/desktop 0.63.1 → 0.64.1

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 (27) hide show
  1. package/README.md +1 -1
  2. package/bin/dump_artifacts.js +1 -1
  3. package/build/asset-manifest.json +15 -14
  4. package/build/index.html +1 -1
  5. package/build/static/css/{main.fc8432ac.css → main.43acb583.css} +1 -1
  6. package/build/static/js/1122.0c68dfae.chunk.js +1 -0
  7. package/build/static/js/{144.e524055a.chunk.js → 144.40c147b9.chunk.js} +1 -1
  8. package/build/static/js/{1740.0e2e5bba.chunk.js → 1740.b3a702b0.chunk.js} +1 -1
  9. package/build/static/js/4482.ee44d0ee.chunk.js +17 -0
  10. package/build/static/js/{4785.3cf5ba35.chunk.js → 4785.604ebc5f.chunk.js} +1 -1
  11. package/build/static/js/4831.27f049a3.chunk.js +5 -0
  12. package/build/static/js/5299.999e0128.chunk.js +9 -0
  13. package/build/static/js/{6134.8ad13d14.chunk.js → 6134.a44cfca0.chunk.js} +1 -1
  14. package/build/static/js/6944.6d6c54f3.chunk.js +1 -0
  15. package/build/static/js/main.352f76e7.js +28 -0
  16. package/build/static/media/MaterialSymbols-Rounded.ec07649f7a20048d5730.woff2 +0 -0
  17. package/package.json +5 -5
  18. package/wheels/stlite_lib-0.1.0-py3-none-any.whl +0 -0
  19. package/wheels/streamlit-1.37.1-cp312-none-any.whl +0 -0
  20. package/build/static/js/1122.6e3ebec6.chunk.js +0 -1
  21. package/build/static/js/4482.98a18a0a.chunk.js +0 -17
  22. package/build/static/js/4831.1e1e6a8e.chunk.js +0 -5
  23. package/build/static/js/5299.37cca9f0.chunk.js +0 -9
  24. package/build/static/js/main.71e75b37.js +0 -28
  25. package/build/static/media/MaterialSymbols-Outlined.909d2dce4aba724ad02f.woff2 +0 -0
  26. package/wheels/streamlit-1.36.0-cp312-none-any.whl +0 -0
  27. /package/build/static/js/{main.71e75b37.js.LICENSE.txt → main.352f76e7.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[144],{10144:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});n(5057);var i=n(10266),o=n(51135),s=n(82160);const r=(0,s.Z)("div",{target:"e115fcil2"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg}}),""),l=(0,s.Z)("div",{target:"e115fcil1"})((()=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0})),""),d=(0,s.Z)("div",{target:"e115fcil0"})((e=>{let{theme:t}=e;return{fontFamily:t.genericFonts.bodyFont,fontSize:t.fontSizes.sm,color:t.colors.fadedText60,textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}}),"");var a=n(96266),c=function(e){return e[e.OriginalWidth=-1]="OriginalWidth",e[e.ColumnWidth=-2]="ColumnWidth",e[e.AutoWidth=-3]="AutoWidth",e}(c||{});const h=(0,i.Z)((function(e){let{width:t,isFullScreen:n,element:i,height:s,endpoints:h}=e;const u=(0,o.KA)(i.imgs);let m;const p=i.width;if(p===c.OriginalWidth||p===c.AutoWidth)m=void 0;else if(p===c.ColumnWidth)m=t;else{if(!(p>0))throw Error(`Invalid image width: ${p}`);m=p}const g={};return s&&n?(g.maxHeight=s,g["object-fit"]="contain"):(g.width=m,p===c.AutoWidth&&(g.maxWidth="100%")),(0,a.jsx)(r,{style:{width:t},children:u.map(((e,t)=>{const n=e;return(0,a.jsxs)(l,{"data-testid":"stImage",children:[(0,a.jsx)("img",{style:g,src:h.buildMediaURL(n.url),alt:t.toString()}),n.caption&&(0,a.jsx)(d,{"data-testid":"stImageCaption",style:g,children:` ${n.caption} `})]},t)}))})}))},10266:(e,t,n)=>{n.d(t,{Z:()=>x});var i=n(5057),o=n(56129),s=n.n(o),r=n(47206),l=n(53136),d=n(88916),a=n(73401),c=n(31808),h=n(82160);const u=(0,h.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:n}=e;const i=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:n.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:n.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:n.colors.fadedText60,borderRadius:"50%",...i,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:n.colors.bodyText,transition:"none"}}}),""),m=(0,h.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:n}=e;return{"&:hover":{[u]:{opacity:1,transform:"scale(1)",transition:"none"}},...n?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:"2.875rem",overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var p=n(96266);class g extends i.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels("2.875rem");return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:n}=this.state,{children:i,width:o,height:s,disableFullscreenMode:r}=this.props;let c=l.d,h=this.zoomIn,g="View fullscreen";return e&&(c=d.m,h=this.zoomOut,g="Exit fullscreen"),(0,p.jsxs)(m,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,p.jsx)(u,{"data-testid":"StyledFullScreenButton",onClick:h,title:g,isExpanded:e,children:(0,p.jsx)(a.Z,{content:c})}),i(e?{width:t,height:n,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:o,height:s,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}g.contextType=c.E;const w=(0,r.b)(g);const x=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class n extends i.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:n,height:i,disableFullscreenMode:o}=this.props;return(0,p.jsx)(w,{width:n,height:i,disableFullscreenMode:t||o,children:t=>{let{width:n,height:i,expanded:o,expand:s,collapse:r}=t;return(0,p.jsx)(e,{...this.props,width:n,height:i,isFullScreen:o,expand:s,collapse:r})}})}}}return n.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,s()(n,e)}},53136:(e,t,n)=>{n.d(t,{d:()=>r});var i=n(7896),o=n(5057),s=n(63947),r=o.forwardRef((function(e,t){return o.createElement(s.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),o.createElement("path",{d:"M0 0v4l1.5-1.5L3 4l1-1-1.5-1.5L4 0H0zm5 4L4 5l1.5 1.5L4 8h4V4L6.5 5.5 5 4z"}))}));r.displayName="FullscreenEnter"},88916:(e,t,n)=>{n.d(t,{m:()=>r});var i=n(7896),o=n(5057),s=n(63947),r=o.forwardRef((function(e,t){return o.createElement(s.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),o.createElement("path",{d:"M1 0L0 1l1.5 1.5L0 4h4V0L2.5 1.5 1 0zm3 4v4l1.5-1.5L7 8l1-1-1.5-1.5L8 4H4z"}))}));r.displayName="FullscreenExit"}}]);
1
+ "use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[144],{10144:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});n(5057);var i=n(10266),o=n(25161),s=n(82160);const r=(0,s.Z)("div",{target:"e115fcil2"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg}}),""),l=(0,s.Z)("div",{target:"e115fcil1"})((()=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0})),""),d=(0,s.Z)("div",{target:"e115fcil0"})((e=>{let{theme:t}=e;return{fontFamily:t.genericFonts.bodyFont,fontSize:t.fontSizes.sm,color:t.colors.fadedText60,textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}}),"");var a=n(96266),c=function(e){return e[e.OriginalWidth=-1]="OriginalWidth",e[e.ColumnWidth=-2]="ColumnWidth",e[e.AutoWidth=-3]="AutoWidth",e}(c||{});const h=(0,i.Z)((function(e){let{width:t,isFullScreen:n,element:i,height:s,endpoints:h}=e;const u=(0,o.KA)(i.imgs);let m;const p=i.width;if(p===c.OriginalWidth||p===c.AutoWidth)m=void 0;else if(p===c.ColumnWidth)m=t;else{if(!(p>0))throw Error(`Invalid image width: ${p}`);m=p}const g={};return s&&n?(g.maxHeight=s,g["object-fit"]="contain"):(g.width=m,p===c.AutoWidth&&(g.maxWidth="100%")),(0,a.jsx)(r,{style:{width:t},children:u.map(((e,t)=>{const n=e;return(0,a.jsxs)(l,{"data-testid":"stImage",children:[(0,a.jsx)("img",{style:g,src:h.buildMediaURL(n.url),alt:t.toString()}),n.caption&&(0,a.jsx)(d,{"data-testid":"stImageCaption",style:g,children:` ${n.caption} `})]},t)}))})}))},10266:(e,t,n)=>{n.d(t,{Z:()=>x});var i=n(5057),o=n(56129),s=n.n(o),r=n(47206),l=n(53136),d=n(88916),a=n(73401),c=n(31808),h=n(82160);const u=(0,h.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:n}=e;const i=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:n.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:n.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:n.colors.fadedText60,borderRadius:"50%",...i,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:n.colors.bodyText,transition:"none"}}}),""),m=(0,h.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:n}=e;return{"&:hover":{[u]:{opacity:1,transform:"scale(1)",transition:"none"}},...n?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:"2.875rem",overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var p=n(96266);class g extends i.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels("2.875rem");return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:n}=this.state,{children:i,width:o,height:s,disableFullscreenMode:r}=this.props;let c=l.d,h=this.zoomIn,g="View fullscreen";return e&&(c=d.m,h=this.zoomOut,g="Exit fullscreen"),(0,p.jsxs)(m,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,p.jsx)(u,{"data-testid":"StyledFullScreenButton",onClick:h,title:g,isExpanded:e,children:(0,p.jsx)(a.Z,{content:c})}),i(e?{width:t,height:n,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:o,height:s,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}g.contextType=c.E;const w=(0,r.b)(g);const x=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class n extends i.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:n,height:i,disableFullscreenMode:o}=this.props;return(0,p.jsx)(w,{width:n,height:i,disableFullscreenMode:t||o,children:t=>{let{width:n,height:i,expanded:o,expand:s,collapse:r}=t;return(0,p.jsx)(e,{...this.props,width:n,height:i,isFullScreen:o,expand:s,collapse:r})}})}}}return n.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,s()(n,e)}},53136:(e,t,n)=>{n.d(t,{d:()=>r});var i=n(7896),o=n(5057),s=n(63947),r=o.forwardRef((function(e,t){return o.createElement(s.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),o.createElement("path",{d:"M0 0v4l1.5-1.5L3 4l1-1-1.5-1.5L4 0H0zm5 4L4 5l1.5 1.5L4 8h4V4L6.5 5.5 5 4z"}))}));r.displayName="FullscreenEnter"},88916:(e,t,n)=>{n.d(t,{m:()=>r});var i=n(7896),o=n(5057),s=n(63947),r=o.forwardRef((function(e,t){return o.createElement(s.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),o.createElement("path",{d:"M1 0L0 1l1.5 1.5L0 4h4V0L2.5 1.5 1 0zm3 4v4l1.5-1.5L7 8l1-1-1.5-1.5L8 4H4z"}))}));r.displayName="FullscreenExit"}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1740],{31740:(t,e,i)=>{i.r(e),i.d(e,{default:()=>c});var s=i(5057),l=i(44088),n=i(92649),r=i(38830),d=i(2648),a=i(31808),o=i(51135),u=i(96266);const c=function(t){const{disabled:e,element:i,widgetMgr:c,width:b,endpoints:h,fragmentId:f}=t,w={width:b},{libConfig:{enforceDownloadInNewTab:k=!1}}=s.useContext(a.E),p="primary"===i.type?l.nW.PRIMARY:l.nW.SECONDARY,g=(0,o.v_)(),m=!i.help||b;return(0,u.jsx)("div",{className:"row-widget stDownloadButton","data-testid":"stDownloadButton",style:w,children:(0,u.jsx)(n.t,{help:i.help,children:(0,u.jsx)(r.ZP,{kind:p,size:l.V5.SMALL,disabled:e,onClick:()=>{if(c.setTriggerValue(i,{fromUi:!0},f),i.url.startsWith("/media"))return void(0,o.uP)(g,i.url);const t=function(t,e,i){const s=document.createElement("a"),l=t.buildMediaURL(e);return s.setAttribute("href",l),i?s.setAttribute("target","_blank"):s.setAttribute("target","_self"),s.setAttribute("download",""),s}(h,i.url,k);t.click()},fluidWidth:!!i.useContainerWidth&&m,children:(0,u.jsx)(d.ZP,{source:i.label,allowHTML:!1,isLabel:!0,largerLabel:!0,disableLinks:!0})})})})}}}]);
1
+ "use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1740],{31740:(t,e,i)=>{i.r(e),i.d(e,{default:()=>c});var s=i(5057),l=i(44088),n=i(92649),r=i(38830),d=i(2648),a=i(31808),o=i(25161),u=i(96266);const c=function(t){const{disabled:e,element:i,widgetMgr:c,width:b,endpoints:h,fragmentId:f}=t,w={width:b},{libConfig:{enforceDownloadInNewTab:k=!1}}=s.useContext(a.E),p="primary"===i.type?l.nW.PRIMARY:l.nW.SECONDARY,g=(0,o.v_)(),m=!i.help||b;return(0,u.jsx)("div",{className:"row-widget stDownloadButton","data-testid":"stDownloadButton",style:w,children:(0,u.jsx)(n.t,{help:i.help,children:(0,u.jsx)(r.ZP,{kind:p,size:l.V5.SMALL,disabled:e,onClick:()=>{if(c.setTriggerValue(i,{fromUi:!0},f),i.url.startsWith("/media"))return void(0,o.uP)(g,i.url);const t=function(t,e,i){const s=document.createElement("a"),l=t.buildMediaURL(e);return s.setAttribute("href",l),i?s.setAttribute("target","_blank"):s.setAttribute("target","_self"),s.setAttribute("download",""),s}(h,i.url,k);t.click()},fluidWidth:!!i.useContainerWidth&&m,children:(0,u.jsx)(d.ZP,{source:i.label,allowHTML:!1,isLabel:!0,largerLabel:!0,disableLinks:!0})})})})}}}]);
@@ -0,0 +1,17 @@
1
+ "use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[4482],{49441:(t,e,a)=>{a.d(e,{Z:()=>m});var n=a(5057),i=a(66904),r=a.n(i),o=a(7742),s=a.n(o);const c=(0,a(82160).Z)("div",{target:"ecnfqzf0"})((()=>({"@media print":{display:"none"}})),"");var d=a(96266);const l=t=>{let{className:e,scriptRunId:a,numParticles:n,numParticleTypes:i,ParticleComponent:o}=t;return(0,d.jsx)(c,{className:s()(e,"stHidden"),"data-testid":`${e}`,children:r()(n).map((t=>{const e=Math.floor(Math.random()*i);return(0,d.jsx)(o,{particleType:e},a+t)}))})},m=(0,n.memo)(l)},48833:(t,e,a)=>{a.r(e),a.d(e,{NUM_FLAKES:()=>u,default:()=>k});var n=a(5057);const i=a.p+"static/media/flake-0.beded754e8024c73d9d2.png",r=a.p+"static/media/flake-1.8077dc154e0bf900aa73.png",o=a.p+"static/media/flake-2.e3f07d06933dd0e84c24.png";var s=a(49441),c=a(82160),d=a(21371);const l=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Math.random()*(t-e)+e},m=(0,c.Z)("img",{target:"ekdfb790"})((t=>{let{theme:e}=t;return{position:"fixed",top:"-150px",marginLeft:"-75px",zIndex:e.zIndices.balloons,left:`${l(90,10)}vw`,animationDelay:`${l(4e3)}ms`,height:"150px",width:"150px",pointerEvents:"none",animationDuration:"3000ms",animationName:d.F4`
2
+ from {
3
+ transform:
4
+ translateY(0)
5
+ rotateX(${l(360)}deg)
6
+ rotateY(${l(360)}deg)
7
+ rotateZ(${l(360)}deg);
8
+ }
9
+
10
+ to {
11
+ transform:
12
+ translateY(calc(100vh + ${150}px))
13
+ rotateX(0)
14
+ rotateY(0)
15
+ rotateZ(0);
16
+ }
17
+ `,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1}}),"");var p=a(96266);const u=100,f=[i,r,o],g=f.length,h=t=>{let{particleType:e}=t;return(0,p.jsx)(m,{src:f[e]})},x=function(t){let{scriptRunId:e}=t;return(0,p.jsx)(s.Z,{className:"snow",scriptRunId:e,numParticleTypes:g,numParticles:u,ParticleComponent:h})},k=(0,n.memo)(x)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[4785],{94785:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var n=r(5057),u=r(51135),s=r(96266);function d(e){let{element:t,width:r,endpoints:d,elementMgr:i}=e;const a=(0,n.useRef)(null),{startTime:o,endTime:c,loop:l,autoplay:m}=t,f=(0,n.useMemo)((()=>{if(!t.id)return!0;const e=i.getElementState(t.id,"preventAutoplay");return e||i.setElementState(t.id,"preventAutoplay",!0),null!==e&&void 0!==e&&e}),[t.id,i]);(0,n.useEffect)((()=>{a.current&&(a.current.currentTime=o)}),[o]),(0,n.useEffect)((()=>{const e=a.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}}),[t]),(0,n.useEffect)((()=>{const e=a.current;if(!e)return;let t=!1;const r=()=>{c>0&&e.currentTime>=c&&(l?(e.currentTime=o||0,e.play()):t||(t=!0,e.pause()))};return c>0&&e.addEventListener("timeupdate",r),()=>{e&&c>0&&e.removeEventListener("timeupdate",r)}}),[c,l,o]),(0,n.useEffect)((()=>{const e=a.current;if(!e)return;const t=()=>{l&&(e.currentTime=o||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}}),[l,o]);const p=(0,u.O0)(t.url),v=d.buildMediaURL(p);return(0,s.jsx)("audio",{"data-testid":"stAudio",id:"audio",ref:a,controls:!0,autoPlay:m&&!f,src:v,className:"stAudio",style:{width:r}})}}}]);
1
+ "use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[4785],{94785:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var n=r(5057),u=r(25161),s=r(96266);function d(e){let{element:t,width:r,endpoints:d,elementMgr:i}=e;const a=(0,n.useRef)(null),{startTime:o,endTime:c,loop:l,autoplay:m}=t,f=(0,n.useMemo)((()=>{if(!t.id)return!0;const e=i.getElementState(t.id,"preventAutoplay");return e||i.setElementState(t.id,"preventAutoplay",!0),null!==e&&void 0!==e&&e}),[t.id,i]);(0,n.useEffect)((()=>{a.current&&(a.current.currentTime=o)}),[o]),(0,n.useEffect)((()=>{const e=a.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}}),[t]),(0,n.useEffect)((()=>{const e=a.current;if(!e)return;let t=!1;const r=()=>{c>0&&e.currentTime>=c&&(l?(e.currentTime=o||0,e.play()):t||(t=!0,e.pause()))};return c>0&&e.addEventListener("timeupdate",r),()=>{e&&c>0&&e.removeEventListener("timeupdate",r)}}),[c,l,o]),(0,n.useEffect)((()=>{const e=a.current;if(!e)return;const t=()=>{l&&(e.currentTime=o||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}}),[l,o]);const p=(0,u.O0)(t.url),v=d.buildMediaURL(p);return(0,s.jsx)("audio",{"data-testid":"stAudio",id:"audio",ref:a,controls:!0,autoPlay:m&&!f,src:v,className:"stAudio",style:{width:r}})}}}]);
@@ -0,0 +1,5 @@
1
+ "use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[4831],{94778:(t,e,i)=>{i.d(e,{Z:()=>d});i(5057);var s=i(50120),r=i(93905),o=i(82160);const n=i(21371).F4`
2
+ 50% {
3
+ color: rgba(0, 0, 0, 0);
4
+ }
5
+ `,a=(0,o.Z)("span",{target:"edlqvik0"})((t=>{let{includeDot:e,shouldBlink:i,theme:s}=t;return{...e?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:s.colors.gray,margin:"0 5px"}}:{},...i?{color:s.colors.red,animationName:`${n}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=i(96266);const d=t=>{let{dirty:e,value:i,maxLength:o,className:n,type:d="single",inForm:h}=t;const u=[],c=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u.push((0,l.jsx)(a,{includeDot:u.length>0,shouldBlink:e,children:t},u.length))};if(e){const t=h?"submit form":"apply";if("multiline"===d){c(`Press ${(0,s.Ge)()?"\u2318":"Ctrl"}+Enter to ${t}`)}else"single"===d&&c(`Press Enter to ${t}`)}return o&&("chat"!==d||e)&&c(`${i.length}/${o}`,e&&i.length>=o),(0,l.jsx)(r.X7,{"data-testid":"InputInstructions",className:n,children:u})}},52955:(t,e,i)=>{i.d(e,{K:()=>r});var s=i(50120);class r{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(t,e,i){null!=this.formClearListener&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),(0,s.bM)(e)&&(this.formClearListener=t.addFormClearedListener(e,i),this.lastWidgetMgr=t,this.lastFormId=e))}disconnect(){var t;null===(t=this.formClearListener)||void 0===t||t.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}},44831:(t,e,i)=>{i.r(e),i.d(e,{default:()=>M});var s=i(5057),r=i(52707),o=i(84332),n=i(47206),a=i(59500),l=i(52955),d=i(70714),h=i(60913),u=i(96216),c=i(21034),m=i(98790),p=i(73401),g=i(30124),f=i(94778),b=i(38944),v=i(93905),y=i(50120),x=i(82160);const I=(0,x.Z)("div",{target:"e116k4er3"})((t=>{let{theme:e}=t;return{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:e.sizes.minElementHeight,borderWidth:e.sizes.borderWidth,borderStyle:"solid",borderColor:e.colors.widgetBorderColor||e.colors.widgetBackgroundColor||e.colors.bgColor,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:e.radii.default,overflow:"hidden","&.focused":{borderColor:e.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:e.spacing.none}}}}),""),C=(0,x.Z)("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),V=(0,x.Z)("button",{target:"e116k4er1"})((t=>{let{theme:e}=t;return{margin:e.spacing.none,border:"none",height:e.sizes.full,display:"flex",alignItems:"center",width:"32px",justifyContent:"center",color:e.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:e.colors.widgetBackgroundColor||e.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:e.colors.white,backgroundColor:e.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:e.radii.default,borderBottomRightRadius:e.radii.default},"&:disabled":{cursor:"not-allowed",color:e.colors.fadedText40}}}),""),w=(0,x.Z)("div",{target:"e116k4er0"})((t=>{let{theme:e,clearable:i}=t;return{position:"absolute",marginRight:e.spacing.twoXS,left:0,right:64+(i?12:0)+"px"}}),"");var F=i(72581),D=i.n(F),k=i(96266);class S extends s.PureComponent{constructor(t){super(t),this.formClearHelper=new l.K,this.id=void 0,this.inputRef=s.createRef(),this.formatValue=t=>{if((0,y.le)(t))return null;const{format:e,step:i}=this.props.element;let s=function(t){return null==t||""===t?void 0:t}(e);if(null==s){const t=i.toString();if(this.isFloatData()&&0!==i&&t.includes(".")){s=`%0.${t.split(".")[1].length}f`}}if(null==s)return t.toString();try{return(0,a.sprintf)(s,t)}catch(r){return(0,d.KE)(`Error in sprintf(${s}, ${t}): ${r}`),String(t)}},this.isIntData=()=>this.props.element.dataType===h.Y2.DataType.INT,this.isFloatData=()=>this.props.element.dataType===h.Y2.DataType.FLOAT,this.getMin=()=>this.props.element.hasMin?this.props.element.min:-1/0,this.getMax=()=>this.props.element.hasMax?this.props.element.max:1/0,this.getStep=()=>{const{step:t}=this.props.element;return t||(this.isIntData()?1:.01)},this.commitWidgetValue=t=>{const{value:e}=this.state,{element:i,widgetMgr:s,fragmentId:r}=this.props,o=this.props.element,n=this.getMin(),a=this.getMax();if((0,y.bb)(e)&&(n>e||e>a)){const t=this.inputRef.current;t&&t.reportValidity()}else{var l;const n=null!==(l=null!==e&&void 0!==e?e:o.default)&&void 0!==l?l:null;this.isIntData()?s.setIntValue(i,n,t,r):s.setDoubleValue(i,n,t,r),this.setState({dirty:!1,value:n,formattedValue:this.formatValue(n)})}},this.onFormCleared=()=>{this.setState(((t,e)=>{var i;return{value:null!==(i=e.element.default)&&void 0!==i?i:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0}),this.setState({isFocused:!1})},this.onFocus=()=>{this.setState({isFocused:!0})},this.onChange=t=>{const{value:e}=t.target;if(""===e)this.setState({dirty:!0,value:null,formattedValue:null});else{let t;t=this.isIntData()?parseInt(e,10):parseFloat(e),this.setState({dirty:!0,value:t,formattedValue:e})}},this.onKeyDown=t=>{const{key:e}=t;switch(e){case"ArrowUp":t.preventDefault(),this.modifyValueUsingStep("increment")();break;case"ArrowDown":t.preventDefault(),this.modifyValueUsingStep("decrement")()}},this.onKeyPress=t=>{"Enter"===t.key&&(this.state.dirty&&this.commitWidgetValue({fromUi:!0}),(0,y.$b)(this.props.element)&&this.props.widgetMgr.submitForm(this.props.element.formId,this.props.fragmentId))},this.modifyValueUsingStep=t=>()=>{const{value:e}=this.state,i=this.getStep();switch(t){case"increment":this.canIncrement&&this.setState({dirty:!0,value:(null!==e&&void 0!==e?e:this.getMin())+i},(()=>{this.commitWidgetValue({fromUi:!0})}));break;case"decrement":this.canDecrement&&this.setState({dirty:!0,value:(null!==e&&void 0!==e?e:this.getMax())-i},(()=>{this.commitWidgetValue({fromUi:!0})}))}},this.state={dirty:!1,value:this.initialValue,formattedValue:this.formatValue(this.initialValue),isFocused:!1},this.id=D()("number_input_")}get initialValue(){var t;const e=this.isIntData()?this.props.widgetMgr.getIntValue(this.props.element):this.props.widgetMgr.getDoubleValue(this.props.element);return null!==(t=null!==e&&void 0!==e?e:this.props.element.default)&&void 0!==t?t:null}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:null!==t&&void 0!==t?t:null,formattedValue:this.formatValue(null!==t&&void 0!==t?t:null)},(()=>{this.commitWidgetValue({fromUi:!1})}))}get canDecrement(){return!(0,y.le)(this.state.value)&&this.state.value-this.getStep()>=this.getMin()}get canIncrement(){return!(0,y.le)(this.state.value)&&this.state.value+this.getStep()<=this.getMax()}render(){var t;const{element:e,width:i,disabled:s,widgetMgr:n,theme:a}=this.props,{formattedValue:l,dirty:d,isFocused:h}=this.state,x={width:i},F=!this.canDecrement||s,D=!this.canIncrement||s,S=(0,y.le)(e.default)&&!s;return this.formClearHelper.manageFormClearListener(n,e.formId,this.onFormCleared),(0,k.jsxs)("div",{className:"stNumberInput","data-testid":"stNumberInput",style:x,children:[(0,k.jsx)(b.O,{label:e.label,disabled:s,labelVisibility:(0,y.iF)(null===(t=e.labelVisibility)||void 0===t?void 0:t.value),htmlFor:this.id,children:e.help&&(0,k.jsx)(v.dT,{children:(0,k.jsx)(c.Z,{content:e.help,placement:m.u.TOP_RIGHT})})}),(0,k.jsxs)(I,{className:h?"focused":"","data-testid":"stNumberInputContainer",children:[(0,k.jsx)(g.Z,{type:"number",inputRef:this.inputRef,value:null!==l&&void 0!==l?l:"",placeholder:e.placeholder,onBlur:this.onBlur,onFocus:this.onFocus,onChange:this.onChange,onKeyPress:this.onKeyPress,onKeyDown:this.onKeyDown,clearable:S,clearOnEscape:S,disabled:s,"aria-label":e.label,id:this.id,overrides:{ClearIcon:{props:{overrides:{Svg:{style:{color:a.colors.darkGray,transform:"scale(1.4)",width:a.spacing.twoXL,marginRight:"-1.25em",":hover":{fill:a.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInput-Input",step:this.getStep(),min:this.getMin(),max:this.getMax()},style:{lineHeight:a.lineHeights.inputWidget,paddingRight:a.spacing.sm,paddingLeft:a.spacing.sm,paddingBottom:a.spacing.sm,paddingTop:a.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0})}}}),i>u.A.hideNumberInputControls&&(0,k.jsxs)(C,{children:[(0,k.jsx)(V,{className:"step-down","data-testid":"stNumberInput-StepDown",onClick:this.modifyValueUsingStep("decrement"),disabled:F,tabIndex:-1,children:(0,k.jsx)(p.Z,{content:r.W,size:"xs",color:this.canDecrement?"inherit":"disabled"})}),(0,k.jsx)(V,{className:"step-up","data-testid":"stNumberInput-StepUp",onClick:this.modifyValueUsingStep("increment"),disabled:D,tabIndex:-1,children:(0,k.jsx)(p.Z,{content:o.v,size:"xs",color:this.canIncrement?"inherit":"disabled"})})]})]}),i>u.A.hideWidgetDetails&&(0,k.jsx)(w,{clearable:S,children:(0,k.jsx)(f.Z,{dirty:d,value:null!==l&&void 0!==l?l:"",inForm:(0,y.$b)({formId:e.formId})})})]})}}const M=(0,n.b)(S)}}]);
@@ -0,0 +1,9 @@
1
+ "use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[5299],{62817:(t,a,e)=>{e.r(a),e.d(a,{NUM_BALLOONS:()=>h,default:()=>k});var n=e(5057);const i=e.p+"static/media/balloon-0.0e6e96ece0ea0719d6b6.png",o=e.p+"static/media/balloon-1.a503c271109e9a0fdd2d.png",s=e.p+"static/media/balloon-2.872250f3bf3a8965d655.png",r=e.p+"static/media/balloon-3.e772fafd3bfc55fb439b.png",c=e.p+"static/media/balloon-4.1a74162473d81c9cb9ee.png",l=e.p+"static/media/balloon-5.edb75c74c54165b29856.png";var m=e(49441),p=e(82160),d=e(21371);const u=d.F4`
2
+ from {
3
+ transform: translateY(calc(100vh + ${300}px));
4
+ }
5
+
6
+ to {
7
+ transform: translateY(0);
8
+ }
9
+ `,f=(0,p.Z)("img",{target:"earwcwy0"})((t=>{let{theme:a}=t;return{position:"fixed",top:"-300px",marginLeft:"-60.5px",zIndex:a.zIndices.balloons,left:60*Math.random()+20+"vw",animationDelay:1e3*Math.random()+"ms",height:"300px",width:"121px",pointerEvents:"none",animationDuration:"750ms",animationName:u,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1}}),"");var b=e(96266);const h=30,g=[i,o,s,r,c,l],x=g.length,v=t=>{let{particleType:a}=t;return(0,b.jsx)(f,{src:g[a]})},y=t=>{let{scriptRunId:a}=t;return(0,b.jsx)(m.Z,{className:"balloons",scriptRunId:a,numParticleTypes:x,numParticles:h,ParticleComponent:v})},k=(0,n.memo)(y)},49441:(t,a,e)=>{e.d(a,{Z:()=>p});var n=e(5057),i=e(66904),o=e.n(i),s=e(7742),r=e.n(s);const c=(0,e(82160).Z)("div",{target:"ecnfqzf0"})((()=>({"@media print":{display:"none"}})),"");var l=e(96266);const m=t=>{let{className:a,scriptRunId:e,numParticles:n,numParticleTypes:i,ParticleComponent:s}=t;return(0,l.jsx)(c,{className:r()(a,"stHidden"),"data-testid":`${a}`,children:o()(n).map((t=>{const a=Math.floor(Math.random()*i);return(0,l.jsx)(s,{particleType:a},e+t)}))})},p=(0,n.memo)(m)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[6134],{26134:(e,t,r)=>{r.r(t),r.d(t,{default:()=>l});var a=r(5057),n=r(60913),s=r(94046),i=r(51135),d=r(96266);const o=528;function l(e){let{element:t,width:r,endpoints:l,elementMgr:u}=e;const c=(0,a.useRef)(null),{type:p,url:m,startTime:f,subtitles:h,endTime:v,loop:y,autoplay:E,muted:T}=t,g=(0,i.O0)(m),k=(0,i.KA)(h),L=(0,a.useMemo)((()=>{if(!t.id)return!0;const e=u.getElementState(t.id,"preventAutoplay");return e||u.setElementState(t.id,"preventAutoplay",!0),null!==e&&void 0!==e&&e}),[t.id,u]);(0,a.useEffect)((()=>{c.current&&(c.current.currentTime=f)}),[f]),(0,a.useEffect)((()=>{const e=c.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}}),[t]),(0,a.useEffect)((()=>{const e=c.current;if(!e)return;let t=!1;const r=()=>{v>0&&e.currentTime>=v&&(y?(e.currentTime=f||0,e.play()):t||(t=!0,e.pause()))};return v>0&&e.addEventListener("timeupdate",r),()=>{e&&v>0&&e.removeEventListener("timeupdate",r)}}),[v,y,f]),(0,a.useEffect)((()=>{const e=c.current;if(!e)return;const t=()=>{y&&(e.currentTime=f||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}}),[y,f]);const w=e=>{const{startTime:r,endTime:a,loop:n,autoplay:s,muted:i}=t,d=new URL(e);if(r&&!isNaN(r)&&d.searchParams.append("start",r.toString()),a&&!isNaN(a)&&d.searchParams.append("end",a.toString()),n){d.searchParams.append("loop","1");const e=d.pathname.split("/").pop();e&&d.searchParams.append("playlist",e)}return s&&d.searchParams.append("autoplay","1"),i&&d.searchParams.append("mute","1"),d.toString()};if(p===n.nk.Type.YOUTUBE_IFRAME){const e=0!==r?.75*r:o;return(0,d.jsx)("iframe",{"data-testid":"stVideo",title:g,src:w(g),width:r,height:e,style:{colorScheme:"normal"},frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,d.jsx)("video",{"data-testid":"stVideo",ref:c,controls:!0,muted:T,autoPlay:E&&!L,src:l.buildMediaURL(g),className:"stVideo",style:{width:r,height:0===r?o:void 0},crossOrigin:s.td&&k.length>0?"anonymous":void 0,children:k&&k.map(((e,t)=>(0,d.jsx)("track",{kind:"captions",src:l.buildMediaURL(e.url),label:e.label,default:0===t},t)))})}}}]);
1
+ "use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[6134],{26134:(e,t,r)=>{r.r(t),r.d(t,{default:()=>l});var a=r(5057),n=r(60913),s=r(94046),i=r(25161),d=r(96266);const o=528;function l(e){let{element:t,width:r,endpoints:l,elementMgr:u}=e;const c=(0,a.useRef)(null),{type:p,url:m,startTime:f,subtitles:h,endTime:v,loop:y,autoplay:E,muted:T}=t,g=(0,i.O0)(m),k=(0,i.KA)(h),L=(0,a.useMemo)((()=>{if(!t.id)return!0;const e=u.getElementState(t.id,"preventAutoplay");return e||u.setElementState(t.id,"preventAutoplay",!0),null!==e&&void 0!==e&&e}),[t.id,u]);(0,a.useEffect)((()=>{c.current&&(c.current.currentTime=f)}),[f]),(0,a.useEffect)((()=>{const e=c.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}}),[t]),(0,a.useEffect)((()=>{const e=c.current;if(!e)return;let t=!1;const r=()=>{v>0&&e.currentTime>=v&&(y?(e.currentTime=f||0,e.play()):t||(t=!0,e.pause()))};return v>0&&e.addEventListener("timeupdate",r),()=>{e&&v>0&&e.removeEventListener("timeupdate",r)}}),[v,y,f]),(0,a.useEffect)((()=>{const e=c.current;if(!e)return;const t=()=>{y&&(e.currentTime=f||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}}),[y,f]);const w=e=>{const{startTime:r,endTime:a,loop:n,autoplay:s,muted:i}=t,d=new URL(e);if(r&&!isNaN(r)&&d.searchParams.append("start",r.toString()),a&&!isNaN(a)&&d.searchParams.append("end",a.toString()),n){d.searchParams.append("loop","1");const e=d.pathname.split("/").pop();e&&d.searchParams.append("playlist",e)}return s&&d.searchParams.append("autoplay","1"),i&&d.searchParams.append("mute","1"),d.toString()};if(p===n.nk.Type.YOUTUBE_IFRAME){const e=0!==r?.75*r:o;return(0,d.jsx)("iframe",{"data-testid":"stVideo",title:g,src:w(g),width:r,height:e,style:{colorScheme:"normal"},frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,d.jsx)("video",{"data-testid":"stVideo",ref:c,controls:!0,muted:T,autoPlay:E&&!L,src:l.buildMediaURL(g),className:"stVideo",style:{width:r,height:0===r?o:void 0},crossOrigin:s.td&&k.length>0?"anonymous":void 0,children:k&&k.map(((e,t)=>(0,d.jsx)("track",{kind:"captions",src:l.buildMediaURL(e.url),label:e.label,default:0===t},t)))})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[6944],{76944:(e,t,r)=>{r.r(t),r.d(t,{default:()=>M});var n=r(5057),o=r(47206),i=r(50482),c=r.n(i),a=Object.freeze({radio:"radio",checkbox:"checkbox"}),l=(Object.freeze({change:"change"}),"default"),u=r(80099),s=r(74338),f=(0,r(53381).zo)("div",(function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=1===r?void 0:t!==l?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}}));function d(e){return d="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},d(e)}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p.apply(this,arguments)}function h(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 y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){C(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],c=!0,a=!1;try{for(r=r.call(e);!(c=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);c=!0);}catch(l){a=!0,o=l}finally{try{c||null==r.return||r.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return v(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 v(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 v(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 m(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 g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function O(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=w(e);if(t){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}(this,r)}}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}f.displayName="StyledRoot",f.displayName="StyledRoot";var j=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(c,e);var t,r,o,i=O(c);function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(E(e=i.call.apply(i,[this].concat(r))),"childRefs",{}),e}return t=c,r=[{key:"render",value:function(){var e=this,t=this.props,r=t.overrides,o=void 0===r?{}:r,i=t.mode,c=void 0===i?a.checkbox:i,d=t.children,h=t.selected,v=t.disabled,m=t.onClick,g=t.kind,O=t.shape,E=t.size,w=b((0,u.jb)(o.Root,f),2),C=w[0],j=w[1],S=this.props["aria-label"]||this.props.ariaLabel,k=c===a.radio,L=n.Children.count(d);return n.createElement(s.R.Consumer,null,(function(t){return n.createElement(C,p({"aria-label":S||t.buttongroup.ariaLabel,"data-baseweb":"button-group",role:k?"radiogroup":"group",$shape:O,$length:d.length},j),n.Children.map(d,(function(t,r){if(!n.isValidElement(t))return null;var o=t.props.isSelected?t.props.isSelected:function(e,t){return!(!Array.isArray(e)&&"number"!==typeof e)&&(Array.isArray(e)?e.includes(t):e===t)}(h,r);return k&&(e.childRefs[r]=n.createRef()),n.cloneElement(t,{disabled:v||t.props.disabled,isSelected:o,ref:k?e.childRefs[r]:void 0,tabIndex:!k||o||k&&(!h||-1===h)&&0===r?0:-1,onKeyDown:function(t){if(k){var r=Number(h)?Number(h):0;if("ArrowUp"===t.key||"ArrowLeft"===t.key){t.preventDefault&&t.preventDefault();var n=r-1<0?L-1:r-1;m&&m(t,n),e.childRefs[n].current&&e.childRefs[n].current.focus()}if("ArrowDown"===t.key||"ArrowRight"===t.key){t.preventDefault&&t.preventDefault();var o=r+1>L-1?0:r+1;m&&m(t,o),e.childRefs[o].current&&e.childRefs[o].current.focus()}}},kind:g,onClick:function(e){v||(t.props.onClick&&t.props.onClick(e),m&&m(e,r))},shape:O,size:E,overrides:y({BaseButton:{style:function(e){var t=e.$theme;return 1===d.length?{}:O!==l?{marginLeft:t.sizing.scale100,marginRight:t.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":o,role:k?"radio":"checkbox"}}},t.props.overrides)})})))}))}}],r&&m(t.prototype,r),o&&m(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);C(j,"defaultProps",{disabled:!1,onClick:function(){},shape:l,size:"default",kind:"secondary"});var S=r(44088),k=r(38830),L=r(44005),R=r(60913),_=r(52955),I=r(96266);function P(e,t,r,n){let o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];r.setIntArrayValue(t,e,{fromUi:o},n)}function A(e){return(0,I.jsx)(L.p,{size:"lg",iconValue:e})}function x(e,t,r,o,i){var c;const a=function(e,t,r,n){return r.indexOf(n)>-1||t===R.hE.ClickMode.SINGLE_SELECT&&e===R.hE.SelectionVisualization.ALL_UP_TO_SELECTED&&r.length>0&&n<r[0]}(r,o,i,t),l=function(e,t,r){return e&&r?r:t}(a,null!==(c=e.content)&&void 0!==c?c:"",e.selectedContent),u=!a||e.selectedContent?S.nW.BORDERLESS_ICON:S.nW.BORDERLESS_ICON_ACTIVE;return(0,n.forwardRef)((function(e,t){return(0,I.jsx)(k.ZP,{...e,size:S.V5.XSMALL,kind:u,children:A(l)})}))}const M=function(e){const{disabled:t,element:r,fragmentId:i,widgetMgr:l}=e,{clickMode:u,default:s,options:f,value:d,selectionVisualization:p}=r,h=(0,o.u)(),[y,b]=(0,n.useState)(function(e,t){const r=e.getIntArrayValue(t);return null!==r&&void 0!==r?r:t.default}(l,r)||[]),v=n.useRef(r),m=n.useRef(void 0);(0,n.useEffect)((()=>{if(!r.formId)return;const e=new _.K;return e.manageFormClearListener(l,r.formId,(()=>{b(s)})),()=>{e.disconnect()}}),[r.formId,l,s]);const g=(0,n.useMemo)((()=>JSON.stringify(d)),[d]);let O;(0,n.useEffect)((()=>{const e=JSON.parse(g);if(v.current.setValue)b(e),P(y,v.current,l,i,!1),v.current.setValue=!1;else{if(c()(y,m.current))return;const e=void 0!==m.current;P(y,v.current,l,i,e)}m.current=y}),[y,l,i,g]),u===R.hE.ClickMode.SINGLE_SELECT?O=a.radio:u===R.hE.ClickMode.MULTI_SELECT&&(O=a.checkbox);const E=f.map(((e,t)=>{const r=x(e,t,p,u,y);return(0,I.jsx)(r,{},`${e.content}-${t}`)}));return(0,I.jsx)(j,{disabled:t,mode:O,onClick:(e,t)=>{const r=function(e,t,r){return e==R.hE.ClickMode.MULTI_SELECT?function(e,t){return t.includes(e)?t.filter((t=>t!==e)):[...t,e]}(t,null!==r&&void 0!==r?r:[]):[t]}(u,t,y);b(r)},selected:u===R.hE.ClickMode.MULTI_SELECT?y:(w=y,0===w.length?-1:w[0]),overrides:{Root:{style:{flexWrap:"wrap",gap:h.spacing.threeXS},props:{"data-testid":"stButtonGroup"}}},children:E});var w}},52955:(e,t,r)=>{r.d(t,{K:()=>o});var n=r(50120);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){null!=this.formClearListener&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,n.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);