streamlit-nightly 1.41.2.dev20250129__py2.py3-none-any.whl → 1.41.2.dev20250130__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. streamlit/static/index.html +1 -1
  2. streamlit/static/static/js/{FileDownload.esm.BRa5vd9e.js → FileDownload.esm.BW2GD_iE.js} +1 -1
  3. streamlit/static/static/js/{FormClearHelper.ljFWvSck.js → FormClearHelper.DZ1scmYc.js} +1 -1
  4. streamlit/static/static/js/{Hooks.De1PrUXp.js → Hooks.DPFxqsrt.js} +1 -1
  5. streamlit/static/static/js/{InputInstructions.CEsavkWx.js → InputInstructions.kmEglyPj.js} +1 -1
  6. streamlit/static/static/js/{ProgressBar.BZTQQebk.js → ProgressBar.DlpiRykl.js} +1 -1
  7. streamlit/static/static/js/{RenderInPortalIfExists.CuEFo7dc.js → RenderInPortalIfExists.Io9TPjT5.js} +1 -1
  8. streamlit/static/static/js/{Toolbar.CaxqEUPP.js → Toolbar.CsJK79V5.js} +1 -1
  9. streamlit/static/static/js/{base-input.B6AaP3td.js → base-input.BUELT8YC.js} +3 -3
  10. streamlit/static/static/js/{createSuper.D7_Fl5t1.js → createSuper.CborHI-x.js} +1 -1
  11. streamlit/static/static/js/{data-grid-overlay-editor.BX12LERY.js → data-grid-overlay-editor.BpRK_Fjy.js} +1 -1
  12. streamlit/static/static/js/{downloader.DWYjgqPp.js → downloader.BL7woS2R.js} +1 -1
  13. streamlit/static/static/js/{es6.DCc0GTNa.js → es6.BLJirovP.js} +2 -2
  14. streamlit/static/static/js/{iframeResizer.contentWindow.iwuMEJhu.js → iframeResizer.contentWindow.CsDiWEwe.js} +1 -1
  15. streamlit/static/static/js/{index.BcY2FDkH.js → index.51fCwYSO.js} +60 -60
  16. streamlit/static/static/js/{index.BUL6xLUk.js → index.7ACWibTY.js} +64 -62
  17. streamlit/static/static/js/{index.BBRfYSxH.js → index.8xuJfNGL.js} +1 -1
  18. streamlit/static/static/js/{index.CrB3fibm.js → index.BB4dPXdd.js} +4 -4
  19. streamlit/static/static/js/{index.ChNzpoS7.js → index.BL_l30n0.js} +1 -1
  20. streamlit/static/static/js/{index.BTjymjxh.js → index.BShMn81Q.js} +1 -1
  21. streamlit/static/static/js/{index.jIjP6QfT.js → index.BcDqsbhj.js} +1 -1
  22. streamlit/static/static/js/{index.CTQGpXI9.js → index.Bkuwp1nX.js} +1 -1
  23. streamlit/static/static/js/{index.D9SEA40p.js → index.BmCbxpl1.js} +2 -2
  24. streamlit/static/static/js/{index.BxWiASCs.js → index.BnfnxD0E.js} +1 -1
  25. streamlit/static/static/js/{index.DdcWwbek.js → index.BrgcQXer.js} +1 -1
  26. streamlit/static/static/js/{index.DELEWrxT.js → index.CFagjgA1.js} +1 -1
  27. streamlit/static/static/js/{index.2zVwJ0eA.js → index.CJNFcs5M.js} +2 -2
  28. streamlit/static/static/js/{index.7-DGlsNh.js → index.CQHr3YZb.js} +1 -1
  29. streamlit/static/static/js/{index.Bg4pM6qu.js → index.CUHtehzq.js} +1 -1
  30. streamlit/static/static/js/{index.Chdikg1z.js → index.CZ_IlLc4.js} +1 -1
  31. streamlit/static/static/js/{index.yhqp6zYN.js → index.C_NO_6ev.js} +15 -15
  32. streamlit/static/static/js/{index.AohBUIz3.js → index.ChEJ9NpI.js} +2 -2
  33. streamlit/static/static/js/{index.Dx9Rd9qT.js → index.CmIDjHns.js} +1 -1
  34. streamlit/static/static/js/{index.CsSEGaWI.js → index.CoZfJLg6.js} +1 -1
  35. streamlit/static/static/js/{index.yIm2Ga5C.js → index.CozJANOl.js} +1 -1
  36. streamlit/static/static/js/{index.CxFdXhSM.js → index.CsBE1tR7.js} +2 -2
  37. streamlit/static/static/js/{index.C7tf6_1u.js → index.CuHtZ9Dm.js} +1 -1
  38. streamlit/static/static/js/{index.KY0dn4XU.js → index.D1dEn4mm.js} +2 -2
  39. streamlit/static/static/js/{index.CNanii7w.js → index.DBlRI9-8.js} +1 -1
  40. streamlit/static/static/js/{index.L_klDikn.js → index.DLNHCVdY.js} +1 -1
  41. streamlit/static/static/js/{index.CDw02ioE.js → index.DRX-oomt.js} +1 -1
  42. streamlit/static/static/js/{index.DxweLaK5.js → index.DRw2m5d2.js} +1 -1
  43. streamlit/static/static/js/{index.--iJ4xZi.js → index.DUQzVbMl.js} +1 -1
  44. streamlit/static/static/js/{index.ahtq8S1b.js → index.DkKHo5zC.js} +1 -1
  45. streamlit/static/static/js/{index.DtX9sEm-.js → index.DqAa92Lj.js} +1 -1
  46. streamlit/static/static/js/{index.Bd3-JERV.js → index.DtJw0w2z.js} +2 -2
  47. streamlit/static/static/js/{index.oJs4BkL9.js → index.GPnu42nG.js} +3 -3
  48. streamlit/static/static/js/{index.gCbwCs-u.js → index.HWM8Jo0D.js} +2 -2
  49. streamlit/static/static/js/{index.DAKqTTs8.js → index.YT8U9SBb.js} +1 -1
  50. streamlit/static/static/js/index.Yz4zfxAi.js +1 -0
  51. streamlit/static/static/js/{index.T8-3ekvQ.js → index.k2qCiWKR.js} +1 -1
  52. streamlit/static/static/js/{input.BA0Jwiql.js → input.Cc_gque8.js} +2 -2
  53. streamlit/static/static/js/{memory.B_n18ChL.js → memory.dOywlvNB.js} +1 -1
  54. streamlit/static/static/js/{mergeWith.DQ31UZmZ.js → mergeWith.B3UEYpBK.js} +1 -1
  55. streamlit/static/static/js/{number-overlay-editor.CNZdoUeS.js → number-overlay-editor.vtZ5cHrO.js} +1 -1
  56. streamlit/static/static/js/{possibleConstructorReturn.BYxVZJys.js → possibleConstructorReturn.C28aC5bE.js} +1 -1
  57. streamlit/static/static/js/{sandbox.xZY-LHHi.js → sandbox.Bu9R-BjJ.js} +1 -1
  58. streamlit/static/static/js/{textarea.4T4nZym2.js → textarea.BuehYUL9.js} +2 -2
  59. streamlit/static/static/js/{timepicker.DbhTD5md.js → timepicker.BoUQqla6.js} +1 -1
  60. streamlit/static/static/js/{toConsumableArray.Ulusdt7-.js → toConsumableArray.1TsnLTQZ.js} +1 -1
  61. streamlit/static/static/js/{uniqueId.CO20A1NT.js → uniqueId.DWzkKvg-.js} +1 -1
  62. streamlit/static/static/js/{useBasicWidgetState.C-8MSbfp.js → useBasicWidgetState.S-yUfhr7.js} +1 -1
  63. streamlit/static/static/js/{useOnInputChange.G-wGwNH8.js → useOnInputChange.z9TKe1o4.js} +1 -1
  64. streamlit/static/static/js/{withFullScreenWrapper.CI1ebDYc.js → withFullScreenWrapper.DNSRZFsQ.js} +1 -1
  65. {streamlit_nightly-1.41.2.dev20250129.dist-info → streamlit_nightly-1.41.2.dev20250130.dist-info}/METADATA +1 -1
  66. {streamlit_nightly-1.41.2.dev20250129.dist-info → streamlit_nightly-1.41.2.dev20250130.dist-info}/RECORD +70 -70
  67. streamlit/static/static/js/index.k9lj8BwU.js +0 -1
  68. {streamlit_nightly-1.41.2.dev20250129.data → streamlit_nightly-1.41.2.dev20250130.data}/scripts/streamlit.cmd +0 -0
  69. {streamlit_nightly-1.41.2.dev20250129.dist-info → streamlit_nightly-1.41.2.dev20250130.dist-info}/WHEEL +0 -0
  70. {streamlit_nightly-1.41.2.dev20250129.dist-info → streamlit_nightly-1.41.2.dev20250130.dist-info}/entry_points.txt +0 -0
  71. {streamlit_nightly-1.41.2.dev20250129.dist-info → streamlit_nightly-1.41.2.dev20250130.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- import{bx as w,r as g,bH as ae,bI as T,bJ as x,y as le,C as ce,j as S,bK as se,ay as ue,z as de,bt as fe,aF as ge,bC as he,bu as be,bd as me,bL as ve,bM as pe}from"./index.BUL6xLUk.js";import{a as ye}from"./useBasicWidgetState.C-8MSbfp.js";import"./FormClearHelper.ljFWvSck.js";var C=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),$e=Object.freeze({top:"top",right:"right",bottom:"bottom",left:"left"});function q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function P(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?q(Object(o),!0).forEach(function(r){G(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function G(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ke(e){var t=e.$disabled,o=e.$checked,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.colors;return t?c.tickFillDisabled:o||i?"transparent":r?c.borderNegative:n?c.borderSelected:c.tickBorder}function Te(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,i=r.sizing,l=i.scale300,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n="Right";break;default:case"right":n="Left";break}return r.direction==="rtl"&&n==="Left"?n="Right":r.direction==="rtl"&&n==="Right"&&(n="Left"),G({},"padding".concat(n),l)}function xe(e){var t=e.$disabled,o=e.$checked,r=e.$isIndeterminate,i=e.$error,l=e.$isHovered,n=e.$isActive,c=e.$theme,a=c.colors;return t?o||r?a.tickFillDisabled:a.tickFill:i&&(r||o)?n?a.tickFillErrorSelectedHoverActive:l?a.tickFillErrorSelectedHover:a.tickFillErrorSelected:i?n?a.tickFillErrorHoverActive:l?a.tickFillErrorHover:a.tickFillError:r||o?n?a.tickFillSelectedHoverActive:l?a.tickFillSelectedHover:a.tickFillSelected:n?a.tickFillActive:l?a.tickFillHover:a.tickFill}function we(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var M=w("label",function(e){var t=e.$disabled,o=e.$labelPlacement;return{flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:o==="top"||o==="bottom"?"center":"flex-start",cursor:t?"not-allowed":"pointer",userSelect:"none"}});M.displayName="Root";M.displayName="Root";var _=w("span",function(e){var t=e.$checked,o=e.$disabled,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.sizing,a=l.animation,s=o?l.colors.tickMarkFillDisabled:r?l.colors.tickMarkFillError:l.colors.tickMarkFill,$=encodeURIComponent(`
1
+ import{bw as x,r as g,bG as ae,bH as T,bI as w,y as le,C as ce,j as S,bJ as se,ay as ue,z as de,bs as fe,aE as ge,bB as he,bt as be,bc as me,bK as ve,bL as pe}from"./index.7ACWibTY.js";import{a as ye}from"./useBasicWidgetState.S-yUfhr7.js";import"./FormClearHelper.DZ1scmYc.js";var L=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),$e=Object.freeze({top:"top",right:"right",bottom:"bottom",left:"left"});function q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function P(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?q(Object(o),!0).forEach(function(r){G(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function G(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ke(e){var t=e.$disabled,o=e.$checked,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.colors;return t?c.tickFillDisabled:o||i?"transparent":r?c.borderNegative:n?c.borderSelected:c.tickBorder}function Te(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,i=r.sizing,l=i.scale300,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n="Right";break;default:case"right":n="Left";break}return r.direction==="rtl"&&n==="Left"?n="Right":r.direction==="rtl"&&n==="Right"&&(n="Left"),G({},"padding".concat(n),l)}function we(e){var t=e.$disabled,o=e.$checked,r=e.$isIndeterminate,i=e.$error,l=e.$isHovered,n=e.$isActive,c=e.$theme,a=c.colors;return t?o||r?a.tickFillDisabled:a.tickFill:i&&(r||o)?n?a.tickFillErrorSelectedHoverActive:l?a.tickFillErrorSelectedHover:a.tickFillErrorSelected:i?n?a.tickFillErrorHoverActive:l?a.tickFillErrorHover:a.tickFillError:r||o?n?a.tickFillSelectedHoverActive:l?a.tickFillSelectedHover:a.tickFillSelected:n?a.tickFillActive:l?a.tickFillHover:a.tickFill}function xe(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var M=x("label",function(e){var t=e.$disabled,o=e.$labelPlacement;return{flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:o==="top"||o==="bottom"?"center":"flex-start",cursor:t?"not-allowed":"pointer",userSelect:"none"}});M.displayName="Root";M.displayName="Root";var _=x("span",function(e){var t=e.$checked,o=e.$disabled,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.sizing,a=l.animation,s=o?l.colors.tickMarkFillDisabled:r?l.colors.tickMarkFillError:l.colors.tickMarkFill,$=encodeURIComponent(`
2
2
  <svg width="14" height="4" viewBox="0 0 14 4" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M14 0.5H0V3.5H14V0.5Z" fill="`.concat(s,`"/>
4
4
  </svg>
@@ -6,4 +6,4 @@ import{bx as w,r as g,bH as ae,bI as T,bJ as x,y as le,C as ce,j as S,bK as se,a
6
6
  <svg width="17" height="13" viewBox="0 0 17 13" fill="none" xmlns="http://www.w3.org/2000/svg">
7
7
  <path d="M6.50002 12.6L0.400024 6.60002L2.60002 4.40002L6.50002 8.40002L13.9 0.900024L16.1 3.10002L6.50002 12.6Z" fill="`.concat(s,`"/>
8
8
  </svg>
9
- `)),h=l.borders.checkboxBorderRadius,b=ke(e);return{flex:"0 0 auto",transitionDuration:a.timing200,transitionTimingFunction:a.easeOutCurve,transitionProperty:"background-image, border-color, background-color",width:c.scale700,height:c.scale700,left:"4px",top:"4px",boxSizing:"border-box",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftWidth:"3px",borderRightWidth:"3px",borderTopWidth:"3px",borderBottomWidth:"3px",borderLeftColor:b,borderRightColor:b,borderTopColor:b,borderBottomColor:b,borderTopLeftRadius:h,borderTopRightRadius:h,borderBottomRightRadius:h,borderBottomLeftRadius:h,outline:n&&t?"3px solid ".concat(l.colors.accent):"none",display:"inline-block",verticalAlign:"middle",backgroundImage:i?"url('data:image/svg+xml,".concat($,"');"):t?"url('data:image/svg+xml,".concat(u,"');"):null,backgroundColor:xe(e),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain",marginTop:l.sizing.scale0,marginBottom:l.sizing.scale0,marginLeft:l.sizing.scale0,marginRight:l.sizing.scale0}});_.displayName="Checkmark";_.displayName="Checkmark";var I=w("div",function(e){var t=e.$theme,o=t.typography;return P(P(P({verticalAlign:"middle"},Te(e)),{},{color:we(e)},o.LabelMedium),{},{lineHeight:"24px"})});I.displayName="Label";I.displayName="Label";var H=w("input",{opacity:0,width:0,height:0,overflow:"hidden",margin:0,padding:0,position:"absolute"});H.displayName="Input";H.displayName="Input";var z=w("div",function(e){var t=e.$theme.colors.toggleFill;return e.$disabled?t=e.$theme.colors.toggleFillDisabled:e.$checked&&e.$error?t=e.$theme.colors.tickFillErrorSelected:e.$checked&&(t=e.$theme.colors.toggleFillChecked),{backgroundColor:t,borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(e.$theme.colors.accent):e.$isHovered&&!e.$disabled?e.$theme.lighting.shadow500:e.$theme.lighting.shadow400,outline:"none",height:e.$theme.sizing.scale700,width:e.$theme.sizing.scale700,transform:e.$checked?"translateX(".concat(e.$theme.direction==="rtl"?"-100%":"100%",")"):null,transition:"transform ".concat(e.$theme.animation.timing200)}});z.displayName="Toggle";z.displayName="Toggle";var D=w("div",function(e){var t=e.$theme.colors.toggleTrackFill;return e.$disabled?t=e.$theme.colors.toggleTrackFillDisabled:e.$error&&e.$checked&&(t=e.$theme.colors.tickFillError),{alignItems:"center",backgroundColor:t,borderTopLeftRadius:"7px",borderTopRightRadius:"7px",borderBottomRightRadius:"7px",borderBottomLeftRadius:"7px",display:"flex",height:e.$theme.sizing.scale550,marginTop:e.$theme.sizing.scale200,marginBottom:e.$theme.sizing.scale100,marginLeft:e.$theme.sizing.scale200,marginRight:e.$theme.sizing.scale100,width:e.$theme.sizing.scale1000}});D.displayName="ToggleTrack";D.displayName="ToggleTrack";function E(e){"@babel/helpers - typeof";return E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},y.apply(this,arguments)}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ce(e,t,o){return t&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fe(e,t){if(typeof t!="function"&&t!==null)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&&B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},B(e,t)}function Le(e){var t=Pe();return function(){var r=F(e),i;if(t){var l=F(this).constructor;i=Reflect.construct(r,arguments,l)}else i=r.apply(this,arguments);return Oe(this,i)}}function Oe(e,t){if(t&&(E(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},F(e)}function p(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var Ee=function(t){return t.stopPropagation()},K=function(e){Fe(o,e);var t=Le(o);function o(){var r;Re(this,o);for(var i=arguments.length,l=new Array(i),n=0;n<i;n++)l[n]=arguments[n];return r=t.call.apply(t,[this].concat(l)),p(v(r),"state",{isFocused:r.props.autoFocus||!1,isFocusVisible:!1,isHovered:!1,isActive:!1}),p(v(r),"onMouseEnter",function(c){r.setState({isHovered:!0}),r.props.onMouseEnter(c)}),p(v(r),"onMouseLeave",function(c){r.setState({isHovered:!1,isActive:!1}),r.props.onMouseLeave(c)}),p(v(r),"onMouseDown",function(c){r.setState({isActive:!0}),r.props.onMouseDown(c)}),p(v(r),"onMouseUp",function(c){r.setState({isActive:!1}),r.props.onMouseUp(c)}),p(v(r),"onFocus",function(c){r.setState({isFocused:!0}),r.props.onFocus(c),ae(c)&&r.setState({isFocusVisible:!0})}),p(v(r),"onBlur",function(c){r.setState({isFocused:!1}),r.props.onBlur(c),r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1})}),r}return Ce(o,[{key:"componentDidMount",value:function(){var i=this.props,l=i.autoFocus,n=i.inputRef;l&&n.current&&n.current.focus()}},{key:"render",value:function(){var i=this.props,l=i.overrides,n=l===void 0?{}:l,c=i.onChange,a=i.labelPlacement,s=a===void 0?this.props.checkmarkType===C.toggle?"left":"right":a,$=i.inputRef,u=i.isIndeterminate,h=i.error,b=i.disabled,R=i.value,f=i.name,m=i.type,d=i.checked,L=i.children,O=i.required,Y=i.title,j=n.Root,V=n.Checkmark,W=n.Label,A=n.Input,N=n.Toggle,U=n.ToggleTrack,Z=T(j)||M,J=T(V)||_,Q=T(W)||I,ee=T(A)||H,te=T(N)||z,re=T(U)||D,oe={onChange:c,onFocus:this.onFocus,onBlur:this.onBlur},ie={onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},k={$isFocused:this.state.isFocused,$isFocusVisible:this.state.isFocusVisible,$isHovered:this.state.isHovered,$isActive:this.state.isActive,$error:h,$checked:d,$isIndeterminate:u,$required:O,$disabled:b,$value:R},X=L&&g.createElement(Q,y({$labelPlacement:s},k,x(W)),this.props.containsInteractiveElement?g.createElement("div",{onClick:function(ne){return ne.preventDefault()}},L):L);return g.createElement(Z,y({"data-baseweb":"checkbox",title:Y||null,$labelPlacement:s},k,ie,x(j)),(s==="top"||s==="left")&&X,this.props.checkmarkType===C.toggle?g.createElement(re,y({},k,x(U)),g.createElement(te,y({},k,x(N)))):g.createElement(J,y({},k,x(V))),g.createElement(ee,y({value:R,name:f,checked:d,required:O,"aria-label":this.props["aria-label"]||this.props.ariaLabel,"aria-checked":u?"mixed":d,"aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":h||null,"aria-required":O||null,disabled:b,type:m,ref:$,onClick:Ee},k,oe,x(A))),(s==="bottom"||s==="right")&&X)}}]),o}(g.Component);p(K,"defaultProps",{overrides:{},checked:!1,containsInteractiveElement:!1,disabled:!1,autoFocus:!1,isIndeterminate:!1,inputRef:g.createRef(),error:!1,type:"checkbox",checkmarkType:C.default,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function Be({width:e,element:t,disabled:o,widgetMgr:r,fragmentId:i}){var R;const[l,n]=ye({getStateFromWidgetMgr:Me,getDefaultStateFromProto:_e,getCurrStateFromProto:Ie,updateWidgetMgrState:He,element:t,widgetMgr:r,fragmentId:i}),c=g.useCallback(f=>{n({value:f.target.checked,fromUi:!0})},[n]),a=le(),{colors:s,spacing:$,sizes:u}=a,h=ce(a),b=o?s.fadedText40:s.bodyText;return S(pe,{className:"row-widget stCheckbox","data-testid":"stCheckbox",width:e,children:S(K,{checked:l,disabled:o,onChange:c,"aria-label":t.label,checkmarkType:t.type===se.StyleType.TOGGLE?C.toggle:C.default,labelPlacement:$e.right,overrides:{Root:{style:({$isFocusVisible:f})=>({marginBottom:$.none,marginTop:$.none,backgroundColor:f?s.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:f})=>{let m=h?s.bgColor:s.bodyText;return o&&(m=h?s.gray70:s.gray90),{width:`calc(${u.checkbox} - ${a.spacing.twoXS})`,height:`calc(${u.checkbox} - ${a.spacing.twoXS})`,transform:f?`translateX(${u.checkbox})`:"",backgroundColor:m,boxShadow:""}}},ToggleTrack:{style:({$checked:f,$isHovered:m})=>{let d=s.fadedText40;return m&&!o&&(d=s.fadedText20),f&&!o&&(d=s.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:a.spacing.twoXS,paddingLeft:a.spacing.threeXS,paddingRight:a.spacing.threeXS,width:`calc(2 * ${u.checkbox})`,minWidth:`calc(2 * ${u.checkbox})`,height:u.checkbox,minHeight:u.checkbox,borderBottomLeftRadius:a.radii.full,borderTopLeftRadius:a.radii.full,borderBottomRightRadius:a.radii.full,borderTopRightRadius:a.radii.full,backgroundColor:d}}},Checkmark:{style:({$isFocusVisible:f,$checked:m})=>{const d=m&&!o?s.primary:s.fadedText40;return{outline:0,width:u.checkbox,height:u.checkbox,marginTop:a.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:f&&m?`0 0 0 0.2rem ${ue(s.primary,.5)}`:"",borderLeftWidth:u.borderWidth,borderRightWidth:u.borderWidth,borderTopWidth:u.borderWidth,borderBottomWidth:u.borderWidth,borderLeftColor:d,borderRightColor:d,borderTopColor:d,borderBottomColor:d}}},Label:{style:{lineHeight:a.lineHeights.small,paddingLeft:a.spacing.sm,position:"relative",color:b}}},children:de(ve,{visibility:fe((R=t.labelVisibility)==null?void 0:R.value),"data-testid":"stWidgetLabel",children:[S(ge,{source:t.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),t.help&&S(he,{color:b,children:S(be,{content:t.help,placement:me.TOP_RIGHT})})]})})})}function Me(e,t){return e.getBoolValue(t)}function _e(e){return e.default??null}function Ie(e){return e.value??null}function He(e,t,o,r){t.setBoolValue(e,o.value,{fromUi:o.fromUi},r)}const We=g.memo(Be);export{We as default};
9
+ `)),h=l.borders.checkboxBorderRadius,b=ke(e);return{flex:"0 0 auto",transitionDuration:a.timing200,transitionTimingFunction:a.easeOutCurve,transitionProperty:"background-image, border-color, background-color",width:c.scale700,height:c.scale700,left:"4px",top:"4px",boxSizing:"border-box",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftWidth:"3px",borderRightWidth:"3px",borderTopWidth:"3px",borderBottomWidth:"3px",borderLeftColor:b,borderRightColor:b,borderTopColor:b,borderBottomColor:b,borderTopLeftRadius:h,borderTopRightRadius:h,borderBottomRightRadius:h,borderBottomLeftRadius:h,outline:n&&t?"3px solid ".concat(l.colors.accent):"none",display:"inline-block",verticalAlign:"middle",backgroundImage:i?"url('data:image/svg+xml,".concat($,"');"):t?"url('data:image/svg+xml,".concat(u,"');"):null,backgroundColor:we(e),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain",marginTop:l.sizing.scale0,marginBottom:l.sizing.scale0,marginLeft:l.sizing.scale0,marginRight:l.sizing.scale0}});_.displayName="Checkmark";_.displayName="Checkmark";var I=x("div",function(e){var t=e.$theme,o=t.typography;return P(P(P({verticalAlign:"middle"},Te(e)),{},{color:xe(e)},o.LabelMedium),{},{lineHeight:"24px"})});I.displayName="Label";I.displayName="Label";var H=x("input",{opacity:0,width:0,height:0,overflow:"hidden",margin:0,padding:0,position:"absolute"});H.displayName="Input";H.displayName="Input";var z=x("div",function(e){var t=e.$theme.colors.toggleFill;return e.$disabled?t=e.$theme.colors.toggleFillDisabled:e.$checked&&e.$error?t=e.$theme.colors.tickFillErrorSelected:e.$checked&&(t=e.$theme.colors.toggleFillChecked),{backgroundColor:t,borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(e.$theme.colors.accent):e.$isHovered&&!e.$disabled?e.$theme.lighting.shadow500:e.$theme.lighting.shadow400,outline:"none",height:e.$theme.sizing.scale700,width:e.$theme.sizing.scale700,transform:e.$checked?"translateX(".concat(e.$theme.direction==="rtl"?"-100%":"100%",")"):null,transition:"transform ".concat(e.$theme.animation.timing200)}});z.displayName="Toggle";z.displayName="Toggle";var D=x("div",function(e){var t=e.$theme.colors.toggleTrackFill;return e.$disabled?t=e.$theme.colors.toggleTrackFillDisabled:e.$error&&e.$checked&&(t=e.$theme.colors.tickFillError),{alignItems:"center",backgroundColor:t,borderTopLeftRadius:"7px",borderTopRightRadius:"7px",borderBottomRightRadius:"7px",borderBottomLeftRadius:"7px",display:"flex",height:e.$theme.sizing.scale550,marginTop:e.$theme.sizing.scale200,marginBottom:e.$theme.sizing.scale100,marginLeft:e.$theme.sizing.scale200,marginRight:e.$theme.sizing.scale100,width:e.$theme.sizing.scale1000}});D.displayName="ToggleTrack";D.displayName="ToggleTrack";function E(e){"@babel/helpers - typeof";return E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},y.apply(this,arguments)}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Le(e,t,o){return t&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ce(e,t){if(typeof t!="function"&&t!==null)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&&B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},B(e,t)}function Fe(e){var t=Pe();return function(){var r=C(e),i;if(t){var l=C(this).constructor;i=Reflect.construct(r,arguments,l)}else i=r.apply(this,arguments);return Oe(this,i)}}function Oe(e,t){if(t&&(E(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},C(e)}function p(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var Ee=function(t){return t.stopPropagation()},K=function(e){Ce(o,e);var t=Fe(o);function o(){var r;Re(this,o);for(var i=arguments.length,l=new Array(i),n=0;n<i;n++)l[n]=arguments[n];return r=t.call.apply(t,[this].concat(l)),p(v(r),"state",{isFocused:r.props.autoFocus||!1,isFocusVisible:!1,isHovered:!1,isActive:!1}),p(v(r),"onMouseEnter",function(c){r.setState({isHovered:!0}),r.props.onMouseEnter(c)}),p(v(r),"onMouseLeave",function(c){r.setState({isHovered:!1,isActive:!1}),r.props.onMouseLeave(c)}),p(v(r),"onMouseDown",function(c){r.setState({isActive:!0}),r.props.onMouseDown(c)}),p(v(r),"onMouseUp",function(c){r.setState({isActive:!1}),r.props.onMouseUp(c)}),p(v(r),"onFocus",function(c){r.setState({isFocused:!0}),r.props.onFocus(c),ae(c)&&r.setState({isFocusVisible:!0})}),p(v(r),"onBlur",function(c){r.setState({isFocused:!1}),r.props.onBlur(c),r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1})}),r}return Le(o,[{key:"componentDidMount",value:function(){var i=this.props,l=i.autoFocus,n=i.inputRef;l&&n.current&&n.current.focus()}},{key:"render",value:function(){var i=this.props,l=i.overrides,n=l===void 0?{}:l,c=i.onChange,a=i.labelPlacement,s=a===void 0?this.props.checkmarkType===L.toggle?"left":"right":a,$=i.inputRef,u=i.isIndeterminate,h=i.error,b=i.disabled,R=i.value,f=i.name,m=i.type,d=i.checked,F=i.children,O=i.required,Y=i.title,j=n.Root,V=n.Checkmark,W=n.Label,A=n.Input,N=n.Toggle,U=n.ToggleTrack,Z=T(j)||M,J=T(V)||_,Q=T(W)||I,ee=T(A)||H,te=T(N)||z,re=T(U)||D,oe={onChange:c,onFocus:this.onFocus,onBlur:this.onBlur},ie={onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},k={$isFocused:this.state.isFocused,$isFocusVisible:this.state.isFocusVisible,$isHovered:this.state.isHovered,$isActive:this.state.isActive,$error:h,$checked:d,$isIndeterminate:u,$required:O,$disabled:b,$value:R},X=F&&g.createElement(Q,y({$labelPlacement:s},k,w(W)),this.props.containsInteractiveElement?g.createElement("div",{onClick:function(ne){return ne.preventDefault()}},F):F);return g.createElement(Z,y({"data-baseweb":"checkbox",title:Y||null,$labelPlacement:s},k,ie,w(j)),(s==="top"||s==="left")&&X,this.props.checkmarkType===L.toggle?g.createElement(re,y({},k,w(U)),g.createElement(te,y({},k,w(N)))):g.createElement(J,y({},k,w(V))),g.createElement(ee,y({value:R,name:f,checked:d,required:O,"aria-label":this.props["aria-label"]||this.props.ariaLabel,"aria-checked":u?"mixed":d,"aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":h||null,"aria-required":O||null,disabled:b,type:m,ref:$,onClick:Ee},k,oe,w(A))),(s==="bottom"||s==="right")&&X)}}]),o}(g.Component);p(K,"defaultProps",{overrides:{},checked:!1,containsInteractiveElement:!1,disabled:!1,autoFocus:!1,isIndeterminate:!1,inputRef:g.createRef(),error:!1,type:"checkbox",checkmarkType:L.default,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function Be({width:e,element:t,disabled:o,widgetMgr:r,fragmentId:i}){var R;const[l,n]=ye({getStateFromWidgetMgr:Me,getDefaultStateFromProto:_e,getCurrStateFromProto:Ie,updateWidgetMgrState:He,element:t,widgetMgr:r,fragmentId:i}),c=g.useCallback(f=>{n({value:f.target.checked,fromUi:!0})},[n]),a=le(),{colors:s,spacing:$,sizes:u}=a,h=ce(a),b=o?s.fadedText40:s.bodyText;return S(pe,{className:"row-widget stCheckbox","data-testid":"stCheckbox",width:e,children:S(K,{checked:l,disabled:o,onChange:c,"aria-label":t.label,checkmarkType:t.type===se.StyleType.TOGGLE?L.toggle:L.default,labelPlacement:$e.right,overrides:{Root:{style:({$isFocusVisible:f})=>({marginBottom:$.none,marginTop:$.none,backgroundColor:f?s.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:f})=>{let m=h?s.bgColor:s.bodyText;return o&&(m=h?s.gray70:s.gray90),{width:`calc(${u.checkbox} - ${a.spacing.twoXS})`,height:`calc(${u.checkbox} - ${a.spacing.twoXS})`,transform:f?`translateX(${u.checkbox})`:"",backgroundColor:m,boxShadow:""}}},ToggleTrack:{style:({$checked:f,$isHovered:m})=>{let d=s.fadedText40;return m&&!o&&(d=s.fadedText20),f&&!o&&(d=s.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:a.spacing.twoXS,paddingLeft:a.spacing.threeXS,paddingRight:a.spacing.threeXS,width:`calc(2 * ${u.checkbox})`,minWidth:`calc(2 * ${u.checkbox})`,height:u.checkbox,minHeight:u.checkbox,borderBottomLeftRadius:a.radii.full,borderTopLeftRadius:a.radii.full,borderBottomRightRadius:a.radii.full,borderTopRightRadius:a.radii.full,backgroundColor:d}}},Checkmark:{style:({$isFocusVisible:f,$checked:m})=>{const d=m&&!o?s.primary:s.fadedText40;return{outline:0,width:u.checkbox,height:u.checkbox,marginTop:a.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:f&&m?`0 0 0 0.2rem ${ue(s.primary,.5)}`:"",borderLeftWidth:u.borderWidth,borderRightWidth:u.borderWidth,borderTopWidth:u.borderWidth,borderBottomWidth:u.borderWidth,borderLeftColor:d,borderRightColor:d,borderTopColor:d,borderBottomColor:d}}},Label:{style:{lineHeight:a.lineHeights.small,paddingLeft:a.spacing.sm,position:"relative",color:b}}},children:de(ve,{visibility:fe((R=t.labelVisibility)==null?void 0:R.value),"data-testid":"stWidgetLabel",children:[S(ge,{source:t.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),t.help&&S(he,{color:b,children:S(be,{content:t.help,placement:me.TOP_RIGHT})})]})})})}function Me(e,t){return e.getBoolValue(t)}function _e(e){return e.default??null}function Ie(e){return e.value??null}function He(e,t,o,r){t.setBoolValue(e,o.value,{fromUi:o.fromUi},r)}const We=g.memo(Be);export{We as default};
@@ -1 +1 @@
1
- import{R as m,aG as B,b9 as i,j as e,ba as h,br as p,b8 as w,bb as D}from"./index.BUL6xLUk.js";import{c as k}from"./createDownloadLinkElement.DZMwyjvU.js";function R(n,a,t){return k({enforceDownloadInNewTab:t,url:n.buildMediaURL(a),filename:""})}function y(n){const{disabled:a,element:t,widgetMgr:s,width:l,endpoints:d,fragmentId:r}=n,c={width:l},{libConfig:{enforceDownloadInNewTab:u=!1}}=m.useContext(B);let o=i.SECONDARY;t.type==="primary"?o=i.PRIMARY:t.type==="tertiary"&&(o=i.TERTIARY);const f=()=>{s.setTriggerValue(t,{fromUi:!0},r),R(d,t.url,u).click()},b=t.help?l:!0;return e("div",{className:"stDownloadButton","data-testid":"stDownloadButton",style:c,children:e(h,{help:t.help,children:e(p,{kind:o,size:w.SMALL,disabled:a,onClick:f,fluidWidth:t.useContainerWidth?b:!1,children:e(D,{icon:t.icon,label:t.label})})})})}export{y as default};
1
+ import{R as m,aF as B,b8 as i,j as e,b9 as h,bq as p,b7 as w,ba as D}from"./index.7ACWibTY.js";import{c as k}from"./createDownloadLinkElement.DZMwyjvU.js";function R(n,a,t){return k({enforceDownloadInNewTab:t,url:n.buildMediaURL(a),filename:""})}function y(n){const{disabled:a,element:t,widgetMgr:s,width:l,endpoints:d,fragmentId:r}=n,c={width:l},{libConfig:{enforceDownloadInNewTab:u=!1}}=m.useContext(B);let o=i.SECONDARY;t.type==="primary"?o=i.PRIMARY:t.type==="tertiary"&&(o=i.TERTIARY);const f=()=>{s.setTriggerValue(t,{fromUi:!0},r),R(d,t.url,u).click()},b=t.help?l:!0;return e("div",{className:"stDownloadButton","data-testid":"stDownloadButton",style:c,children:e(h,{help:t.help,children:e(p,{kind:o,size:w.SMALL,disabled:a,onClick:f,fluidWidth:t.useContainerWidth?b:!1,children:e(D,{icon:t.icon,label:t.label})})})})}export{y as default};
@@ -1 +1 @@
1
- import{r as i,E as L,_ as W,n as d,C as $,y as V,j as s,z as D,bq as K}from"./index.BUL6xLUk.js";import{I as N}from"./InputInstructions.CEsavkWx.js";import{i as _}from"./inputUtils.CQWz5UKz.js";import{T as j}from"./textarea.4T4nZym2.js";import"./base-input.B6AaP3td.js";var H=i.forwardRef(function(t,r){var c={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(L,W({iconAttrs:c,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});H.displayName="Send";const A=d("div",{target:"e1xgt8o30"})(({theme:t,width:r})=>({borderRadius:t.radii.chatInput,display:"flex",backgroundColor:t.colors.widgetBackgroundColor??t.colors.secondaryBg,width:`${r}px`})),M=d("div",{target:"e1xgt8o31"})(({theme:t})=>({backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.chatInput,display:"flex",alignItems:"center"})),F=d("button",{target:"e1xgt8o32"})(({theme:t,disabled:r,extended:c})=>{const u=$(t),[o,g]=u?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:c?"0":t.radii.chatInput,borderTopLeftRadius:c?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:r?o:g,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:u?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),G=d("div",{target:"e1xgt8o33"})({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,pointerEvents:"none"}),U=d("div",{target:"e1xgt8o34"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),O=6.5,R=1;function Z({width:t,element:r,widgetMgr:c,fragmentId:u}){const o=V(),[g,h]=i.useState(!1),[p,f]=i.useState(r.default),[b,y]=i.useState(0),a=i.useRef(null),x=i.useRef({minHeight:0,maxHeight:0}),E=()=>{let e=0;const{current:n}=a;if(n){const l=n.placeholder;n.placeholder="",n.style.height="auto",e=n.scrollHeight,n.placeholder=l,n.style.height=""}return e},I=()=>{a.current&&a.current.focus(),p&&(c.setStringTriggerValue(r,p,{fromUi:!0},u),h(!1),f(""),y(0))},B=e=>{const{metaKey:n,ctrlKey:l,shiftKey:z}=e;_(e)&&!z&&!l&&!n&&(e.preventDefault(),I())},w=e=>{const{value:n}=e.target,{maxChars:l}=r;l!==0&&n.length>l||(h(n!==""),f(n),y(E()))};i.useEffect(()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";f(e),h(e!=="")}},[r]),i.useEffect(()=>{if(a.current){const{offsetHeight:e}=a.current;x.current.minHeight=e,x.current.maxHeight=e*O}},[a]);const{disabled:C,placeholder:m,maxChars:T}=r,{minHeight:k,maxHeight:S}=x.current,v=b>0&&a.current?Math.abs(b-k)>R:!1;return s(A,{className:"stChatInput","data-testid":"stChatInput",width:t,children:D(M,{children:[s(j,{inputRef:a,value:p,placeholder:m,onChange:w,onKeyDown:B,"aria-label":m,disabled:C,rows:1,overrides:{Root:{style:{minHeight:o.sizes.minElementHeight,outline:"none",backgroundColor:o.colors.transparent,borderBottomLeftRadius:o.radii.chatInput,borderBottomRightRadius:o.radii.chatInput,borderTopLeftRadius:o.radii.chatInput,borderTopRightRadius:o.radii.chatInput,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:o.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:o.lineHeights.inputWidget,backgroundColor:o.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:v?`${b+R}px`:"auto",maxHeight:S?`${S}px`:"none",paddingLeft:o.spacing.lg,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,paddingRight:`calc(${o.iconSizes.xl} + 2 * ${o.spacing.sm} + ${o.spacing.sm})`}}}}),t>o.breakpoints.hideWidgetDetails&&s(U,{children:s(N,{dirty:g,value:p,maxLength:T,type:"chat",inForm:!1})}),s(G,{children:s(F,{onClick:I,disabled:!g||C,extended:v,"data-testid":"stChatInputSubmitButton",children:s(K,{content:H,size:"xl",color:"inherit"})})})]})})}export{Z as default};
1
+ import{r as i,E as L,_ as W,n as d,C as $,y as V,j as s,z as D,bp as K}from"./index.7ACWibTY.js";import{I as N}from"./InputInstructions.kmEglyPj.js";import{i as _}from"./inputUtils.CQWz5UKz.js";import{T as j}from"./textarea.BuehYUL9.js";import"./base-input.BUELT8YC.js";var H=i.forwardRef(function(t,r){var c={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(L,W({iconAttrs:c,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});H.displayName="Send";const A=d("div",{target:"e1xgt8o30"})(({theme:t,width:r})=>({borderRadius:t.radii.chatInput,display:"flex",backgroundColor:t.colors.widgetBackgroundColor??t.colors.secondaryBg,width:`${r}px`})),M=d("div",{target:"e1xgt8o31"})(({theme:t})=>({backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.chatInput,display:"flex",alignItems:"center"})),F=d("button",{target:"e1xgt8o32"})(({theme:t,disabled:r,extended:c})=>{const u=$(t),[o,g]=u?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:c?"0":t.radii.chatInput,borderTopLeftRadius:c?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:r?o:g,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:u?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),G=d("div",{target:"e1xgt8o33"})({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,pointerEvents:"none"}),U=d("div",{target:"e1xgt8o34"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),O=6.5,R=1;function Z({width:t,element:r,widgetMgr:c,fragmentId:u}){const o=V(),[g,h]=i.useState(!1),[p,f]=i.useState(r.default),[b,y]=i.useState(0),a=i.useRef(null),x=i.useRef({minHeight:0,maxHeight:0}),E=()=>{let e=0;const{current:n}=a;if(n){const l=n.placeholder;n.placeholder="",n.style.height="auto",e=n.scrollHeight,n.placeholder=l,n.style.height=""}return e},I=()=>{a.current&&a.current.focus(),p&&(c.setStringTriggerValue(r,p,{fromUi:!0},u),h(!1),f(""),y(0))},B=e=>{const{metaKey:n,ctrlKey:l,shiftKey:z}=e;_(e)&&!z&&!l&&!n&&(e.preventDefault(),I())},w=e=>{const{value:n}=e.target,{maxChars:l}=r;l!==0&&n.length>l||(h(n!==""),f(n),y(E()))};i.useEffect(()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";f(e),h(e!=="")}},[r]),i.useEffect(()=>{if(a.current){const{offsetHeight:e}=a.current;x.current.minHeight=e,x.current.maxHeight=e*O}},[a]);const{disabled:C,placeholder:m,maxChars:T}=r,{minHeight:k,maxHeight:S}=x.current,v=b>0&&a.current?Math.abs(b-k)>R:!1;return s(A,{className:"stChatInput","data-testid":"stChatInput",width:t,children:D(M,{children:[s(j,{inputRef:a,value:p,placeholder:m,onChange:w,onKeyDown:B,"aria-label":m,disabled:C,rows:1,overrides:{Root:{style:{minHeight:o.sizes.minElementHeight,outline:"none",backgroundColor:o.colors.transparent,borderBottomLeftRadius:o.radii.chatInput,borderBottomRightRadius:o.radii.chatInput,borderTopLeftRadius:o.radii.chatInput,borderTopRightRadius:o.radii.chatInput,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:o.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:o.lineHeights.inputWidget,backgroundColor:o.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:v?`${b+R}px`:"auto",maxHeight:S?`${S}px`:"none",paddingLeft:o.spacing.lg,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,paddingRight:`calc(${o.iconSizes.xl} + 2 * ${o.spacing.sm} + ${o.spacing.sm})`}}}}),t>o.breakpoints.hideWidgetDetails&&s(U,{children:s(N,{dirty:g,value:p,maxLength:T,type:"chat",inForm:!1})}),s(G,{children:s(F,{onClick:I,disabled:!g||C,extended:v,"data-testid":"stChatInputSubmitButton",children:s(K,{content:H,size:"xl",color:"inherit"})})})]})})}export{Z as default};
@@ -1,4 +1,4 @@
1
- var xL=Object.defineProperty;var wL=(t,e,r)=>e in t?xL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>wL(t,typeof e!="symbol"?e+"":e,r);import{g as oA,r as it,ao as Wt,p as $e,d as VM,aW as yu,_ as jM,j as ms,z as Ll,aX as Gy,F as aE,aY as Wy,aZ as TL,a_ as lE,a$ as EL,aG as SL,b0 as CL,b1 as PL,n as HM,C as GM,b2 as T1,b3 as cE,aD as IL,y as ML,b4 as uE}from"./index.BUL6xLUk.js";import{_ as Gn,a as RL,C as BL}from"./toConsumableArray.Ulusdt7-.js";import{b as Fu,a as Lu,_ as l2,c as Gd,d as c2}from"./possibleConstructorReturn.BYxVZJys.js";import{a as OL,T as DL}from"./Toolbar.CaxqEUPP.js";import{u as WM,E as XM,w as FL}from"./withFullScreenWrapper.CI1ebDYc.js";import{u as LL}from"./useBasicWidgetState.C-8MSbfp.js";import{u as kL,s as NL}from"./threshold.B8r8f5kt.js";import"./FormClearHelper.ljFWvSck.js";import"./value.iufjd77T.js";function UL(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in t)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}async function aA(t,e,r,i){return i._parse(t,e,r,i)}function Ni(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const v_=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hE&&parseFloat(hE[1]);const tg=globalThis,Wf=globalThis.process||{},zL=globalThis.navigator||{};function qM(t){var i,n;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((n=process.versions)!=null&&n.electron))return!0;const r=typeof navigator<"u"&&navigator.userAgent;return!!(r&&r.indexOf("Electron")>=0)}function ku(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||qM()}function VL(t){return ku()?qM()?"Electron":(zL.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $M="4.0.7";function jL(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}class HL{constructor(e,r,i="sessionStorage"){this.storage=jL(i),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){const r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}}function WL(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function XL(t,e=8){const r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var mm;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(mm||(mm={}));const qL=10;function fE(t){return typeof t!="string"?t:(t=t.toUpperCase(),mm[t]||mm.WHITE)}function $L(t,e,r){return!ku&&typeof t=="string"&&(e&&(t=`\x1B[${fE(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${fE(r)+qL}m${t}\x1B[49m`)),t}function ZL(t,e=["constructor"]){const r=Object.getPrototypeOf(t),i=Object.getOwnPropertyNames(r),n=t;for(const o of i){const s=n[o];typeof s=="function"&&(e.find(f=>o===f)||(n[o]=s.bind(t)))}}function u2(t,e){if(!t)throw new Error("Assertion failed")}function Xf(){var e,r,i;let t;if(ku()&&tg.performance)t=(r=(e=tg==null?void 0:tg.performance)==null?void 0:e.now)==null?void 0:r.call(e);else if("hrtime"in Wf){const n=(i=Wf==null?void 0:Wf.hrtime)==null?void 0:i.call(Wf);t=n[0]*1e3+n[1]/1e6}else t=Date.now();return t}const qf={debug:ku()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},KL={enabled:!0,level:0};function $f(){}const dE={},AE={once:!0};class lA{constructor({id:e}={id:""}){this.VERSION=$M,this._startTs=Xf(),this._deltaTs=Xf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new HL(`__probe-${this.id}__`,KL),this.timeStamp(`${this.id} started`),ZL(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Xf()-this._startTs).toPrecision(10))}getDelta(){return Number((Xf()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,qf.warn,arguments,AE)}error(e){return this._getLogFunction(0,e,qf.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,qf.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,qf.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,qf.debug||qf.info,arguments,AE)}table(e,r,i){return r?this._getLogFunction(e,r,console.table||$f,i&&[i],{tag:JL(r)}):$f}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||$f)}group(e,r,i={collapsed:!1}){const n=pE({logLevel:e,message:r,opts:i}),{collapsed:o}=i;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,r,i={}){return this.group(e,r,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||$f)}withGroup(e,r,i){this.group(e,r)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ZM(e)}_getLogFunction(e,r,i,n,o){if(this._shouldLog(e)){o=pE({logLevel:e,message:r,args:n,opts:o}),i=i||o.method,u2(i),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Xf();const s=o.tag||o.message;if(o.once&&s)if(!dE[s])dE[s]=Xf();else return $f;return r=YL(this.id,o.message,o),i.bind(console,r,...o.args)}return $f}}lA.VERSION=$M;function ZM(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return u2(Number.isFinite(e)&&e>=0),e}function pE(t){const{logLevel:e,message:r}=t;t.logLevel=ZM(e);const i=t.args?Array.from(t.args):[];for(;i.length&&i.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&i.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const n=typeof t.message;return u2(n==="string"||n==="object"),Object.assign(t,{args:i},t.opts)}function YL(t,e,r){if(typeof e=="string"){const i=r.time?XL(WL(r.total)):"";e=r.time?`${t}: ${i} ${e}`:`${t}: ${e}`,e=$L(e,r.color,r.background)}return e}function JL(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}globalThis.probe={};const KM=new lA({id:"@probe.gl/log"});function YM(t,e){return JM(t||{},e)}function JM(t,e,r=0){if(r>3)return e;const i={...t};for(const[n,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?i[n]=JM(i[n]||{},e[n],r+1):i[n]=e[n];return i}function QL(t){var e;globalThis.loaders||(globalThis.loaders={}),(e=globalThis.loaders).modules||(e.modules={}),Object.assign(globalThis.loaders.modules,t)}function ek(t){var r,i;return((i=(r=globalThis.loaders)==null?void 0:r.modules)==null?void 0:i[t])||null}const tk="latest";function rk(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const QM=rk();function Pc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const Sa=typeof process!="object"||String(process)!=="[object process]"||process.browser,h2=typeof importScripts=="function",ik=typeof window<"u"&&typeof window.orientation<"u",gE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);gE&&parseFloat(gE[1]);class nk{constructor(e,r){U(this,"name");U(this,"workerThread");U(this,"isRunning",!0);U(this,"result");U(this,"_resolve",()=>{});U(this,"_reject",()=>{});this.name=e,this.workerThread=r,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,r){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:r})}done(e){Pc(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Pc(this.isRunning),this.isRunning=!1,this._reject(e)}}class Xy{terminate(){}}const qy=new Map;function sk(t){Pc(t.source&&!t.url||!t.source&&t.url);let e=qy.get(t.source||t.url);return e||(t.url&&(e=ok(t.url),qy.set(t.url,e)),t.source&&(e=eR(t.source),qy.set(t.source,e))),Pc(e),e}function ok(t){if(!t.startsWith("http"))return t;const e=ak(t);return eR(e)}function eR(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function ak(t){return`try {
1
+ var xL=Object.defineProperty;var wL=(t,e,r)=>e in t?xL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>wL(t,typeof e!="symbol"?e+"":e,r);import{g as oA,r as it,ao as Wt,p as $e,d as VM,aV as yu,_ as jM,j as ms,z as Ll,aW as Gy,F as aE,aX as Wy,aY as TL,aZ as lE,a_ as EL,aF as SL,a$ as CL,b0 as PL,n as HM,C as GM,b1 as T1,b2 as cE,aC as IL,y as ML,b3 as uE}from"./index.7ACWibTY.js";import{_ as Gn,a as RL,C as BL}from"./toConsumableArray.1TsnLTQZ.js";import{b as Fu,a as Lu,_ as l2,c as Gd,d as c2}from"./possibleConstructorReturn.C28aC5bE.js";import{a as OL,T as DL}from"./Toolbar.CsJK79V5.js";import{u as WM,E as XM,w as FL}from"./withFullScreenWrapper.DNSRZFsQ.js";import{u as LL}from"./useBasicWidgetState.S-yUfhr7.js";import{u as kL,s as NL}from"./threshold.B8r8f5kt.js";import"./FormClearHelper.DZ1scmYc.js";import"./value.iufjd77T.js";function UL(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in t)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}async function aA(t,e,r,i){return i._parse(t,e,r,i)}function Ni(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const v_=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hE&&parseFloat(hE[1]);const tg=globalThis,Wf=globalThis.process||{},zL=globalThis.navigator||{};function qM(t){var i,n;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((n=process.versions)!=null&&n.electron))return!0;const r=typeof navigator<"u"&&navigator.userAgent;return!!(r&&r.indexOf("Electron")>=0)}function ku(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||qM()}function VL(t){return ku()?qM()?"Electron":(zL.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $M="4.0.7";function jL(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}class HL{constructor(e,r,i="sessionStorage"){this.storage=jL(i),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){const r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}}function WL(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function XL(t,e=8){const r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var mm;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(mm||(mm={}));const qL=10;function fE(t){return typeof t!="string"?t:(t=t.toUpperCase(),mm[t]||mm.WHITE)}function $L(t,e,r){return!ku&&typeof t=="string"&&(e&&(t=`\x1B[${fE(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${fE(r)+qL}m${t}\x1B[49m`)),t}function ZL(t,e=["constructor"]){const r=Object.getPrototypeOf(t),i=Object.getOwnPropertyNames(r),n=t;for(const o of i){const s=n[o];typeof s=="function"&&(e.find(f=>o===f)||(n[o]=s.bind(t)))}}function u2(t,e){if(!t)throw new Error("Assertion failed")}function Xf(){var e,r,i;let t;if(ku()&&tg.performance)t=(r=(e=tg==null?void 0:tg.performance)==null?void 0:e.now)==null?void 0:r.call(e);else if("hrtime"in Wf){const n=(i=Wf==null?void 0:Wf.hrtime)==null?void 0:i.call(Wf);t=n[0]*1e3+n[1]/1e6}else t=Date.now();return t}const qf={debug:ku()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},KL={enabled:!0,level:0};function $f(){}const dE={},AE={once:!0};class lA{constructor({id:e}={id:""}){this.VERSION=$M,this._startTs=Xf(),this._deltaTs=Xf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new HL(`__probe-${this.id}__`,KL),this.timeStamp(`${this.id} started`),ZL(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Xf()-this._startTs).toPrecision(10))}getDelta(){return Number((Xf()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,qf.warn,arguments,AE)}error(e){return this._getLogFunction(0,e,qf.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,qf.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,qf.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,qf.debug||qf.info,arguments,AE)}table(e,r,i){return r?this._getLogFunction(e,r,console.table||$f,i&&[i],{tag:JL(r)}):$f}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||$f)}group(e,r,i={collapsed:!1}){const n=pE({logLevel:e,message:r,opts:i}),{collapsed:o}=i;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,r,i={}){return this.group(e,r,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||$f)}withGroup(e,r,i){this.group(e,r)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ZM(e)}_getLogFunction(e,r,i,n,o){if(this._shouldLog(e)){o=pE({logLevel:e,message:r,args:n,opts:o}),i=i||o.method,u2(i),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Xf();const s=o.tag||o.message;if(o.once&&s)if(!dE[s])dE[s]=Xf();else return $f;return r=YL(this.id,o.message,o),i.bind(console,r,...o.args)}return $f}}lA.VERSION=$M;function ZM(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return u2(Number.isFinite(e)&&e>=0),e}function pE(t){const{logLevel:e,message:r}=t;t.logLevel=ZM(e);const i=t.args?Array.from(t.args):[];for(;i.length&&i.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&i.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const n=typeof t.message;return u2(n==="string"||n==="object"),Object.assign(t,{args:i},t.opts)}function YL(t,e,r){if(typeof e=="string"){const i=r.time?XL(WL(r.total)):"";e=r.time?`${t}: ${i} ${e}`:`${t}: ${e}`,e=$L(e,r.color,r.background)}return e}function JL(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}globalThis.probe={};const KM=new lA({id:"@probe.gl/log"});function YM(t,e){return JM(t||{},e)}function JM(t,e,r=0){if(r>3)return e;const i={...t};for(const[n,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?i[n]=JM(i[n]||{},e[n],r+1):i[n]=e[n];return i}function QL(t){var e;globalThis.loaders||(globalThis.loaders={}),(e=globalThis.loaders).modules||(e.modules={}),Object.assign(globalThis.loaders.modules,t)}function ek(t){var r,i;return((i=(r=globalThis.loaders)==null?void 0:r.modules)==null?void 0:i[t])||null}const tk="latest";function rk(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const QM=rk();function Pc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const Sa=typeof process!="object"||String(process)!=="[object process]"||process.browser,h2=typeof importScripts=="function",ik=typeof window<"u"&&typeof window.orientation<"u",gE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);gE&&parseFloat(gE[1]);class nk{constructor(e,r){U(this,"name");U(this,"workerThread");U(this,"isRunning",!0);U(this,"result");U(this,"_resolve",()=>{});U(this,"_reject",()=>{});this.name=e,this.workerThread=r,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,r){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:r})}done(e){Pc(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Pc(this.isRunning),this.isRunning=!1,this._reject(e)}}class Xy{terminate(){}}const qy=new Map;function sk(t){Pc(t.source&&!t.url||!t.source&&t.url);let e=qy.get(t.source||t.url);return e||(t.url&&(e=ok(t.url),qy.set(t.url,e)),t.source&&(e=eR(t.source),qy.set(t.source,e))),Pc(e),e}function ok(t){if(!t.startsWith("http"))return t;const e=ak(t);return eR(e)}function eR(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function ak(t){return`try {
2
2
  importScripts('${t}');
3
3
  } catch (error) {
4
4
  console.error(error);
@@ -1,2 +1,2 @@
1
- import{bx as Z,by as J,r as f,bz as Q,y as Y,bA as s,j as S,z as ee,bt as te,bB as re,bC as ne,bu as oe,bd as ie,bv as ae,br as ue,b9 as j,b8 as W,bb as le}from"./index.BUL6xLUk.js";import{a as ce}from"./useBasicWidgetState.C-8MSbfp.js";import"./FormClearHelper.ljFWvSck.js";var se={primary:"primary",secondary:"secondary",tertiary:"tertiary"},G={default:"default",pill:"pill",round:"round",circle:"circle",square:"square"},fe={mini:"mini",default:"default",compact:"compact",large:"large"},P=Object.freeze({radio:"radio",checkbox:"checkbox"}),z=Z("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==G.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});z.displayName="StyledRoot";z.displayName="StyledRoot";function D(e){"@babel/helpers - typeof";return D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(e)}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(n){N(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function de(e,t){return he(e)||me(e,t)||be(e,t)||ye()}function ye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function be(e,t){if(e){if(typeof e=="string")return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(e,t)}}function X(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function me(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,p;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,p=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw p}}return n}}function he(e){if(Array.isArray(e))return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ve(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 Se(e,t,r){return t&&ve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oe(e,t){if(typeof t!="function"&&t!==null)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&&$(e,t)}function $(e,t){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$(e,t)}function _e(e){var t=we();return function(){var n=k(e),o;if(t){var i=k(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Ee(this,o)}}function Ee(e,t){if(t&&(D(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K(e)}function K(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function we(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},k(e)}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var F=function(e){Oe(r,e);var t=_e(r);function r(){var n;ge(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),N(K(n),"childRefs",{}),n}return Se(r,[{key:"render",value:function(){var o=this,i=this.props,a=i.overrides,p=a===void 0?{}:a,c=i.mode,C=c===void 0?P.checkbox:c,d=i.children,y=i.selected,m=i.disabled,l=i.onClick,E=i.kind,h=i.shape,w=i.size,A=J(p.Root,z),O=de(A,2),_=O[0],L=O[1],H=this.props["aria-label"]||this.props.ariaLabel,g=C===P.radio,V=f.Children.count(d);return f.createElement(Q.Consumer,null,function(q){return f.createElement(_,M({"aria-label":H||q.buttongroup.ariaLabel,"data-baseweb":"button-group",role:g?"radiogroup":"group",$shape:h,$length:d.length},L),f.Children.map(d,function(b,R){if(!f.isValidElement(b))return null;var B=b.props.isSelected?b.props.isSelected:Le(y,R);return g&&(o.childRefs[R]=f.createRef()),f.cloneElement(b,{disabled:m||b.props.disabled,isSelected:B,ref:g?o.childRefs[R]:void 0,tabIndex:!g||B||g&&(!y||y===-1)&&R===0?0:-1,onKeyDown:function(u){if(g){var v=Number(y)?Number(y):0;if(u.key==="ArrowUp"||u.key==="ArrowLeft"){u.preventDefault&&u.preventDefault();var I=v-1<0?V-1:v-1;l&&l(u,I),o.childRefs[I].current&&o.childRefs[I].current.focus()}if(u.key==="ArrowDown"||u.key==="ArrowRight"){u.preventDefault&&u.preventDefault();var T=v+1>V-1?0:v+1;l&&l(u,T),o.childRefs[T].current&&o.childRefs[T].current.focus()}}},kind:E,onClick:function(u){m||(b.props.onClick&&b.props.onClick(u),l&&l(u,R))},shape:h,size:w,overrides:pe({BaseButton:{style:function(u){var v=u.$theme;return d.length===1?{}:h!==G.default?{marginLeft:v.sizing.scale100,marginRight:v.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":B,role:g?"radio":"checkbox"}}},b.props.overrides)})}))})}}]),r}(f.Component);N(F,"defaultProps",{disabled:!1,onClick:function(){},shape:G.default,size:fe.default,kind:se.secondary});function Re(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function Ce(e,t,r){return e==s.ClickMode.MULTI_SELECT?Re(t,r??[]):r!=null&&r.includes(t)?[]:[t]}function Pe(e){return e.length===0?-1:e[0]}function ke(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function Ae(e,t,r){const n=r===s.Style.PILLS?j.PILLS:r===s.Style.BORDERLESS?j.BORDERLESS_ICON:j.SEGMENTED_CONTROL,o=r===s.Style.BORDERLESS?W.XSMALL:W.MEDIUM,i=r===s.Style.BORDERLESS?"lg":"base";return{element:S(le,{icon:t,label:e,iconSize:i}),kind:n,size:o}}function Be(e,t,r,n){return r.indexOf(n)>-1?!0:t!==s.ClickMode.SINGLE_SELECT||e!==s.SelectionVisualization.ALL_UP_TO_SELECTED?!1:r.length>0&&n<r[0]}function Ie(e,t){return e&&(t=`${t}Active`),t}function Te(e,t){const r={flexWrap:"wrap",maxWidth:"fit-content"};switch(e){case s.Style.BORDERLESS:return{...r,columnGap:t.threeXS,rowGap:t.threeXS};case s.Style.PILLS:return{...r,columnGap:t.twoXS,rowGap:t.twoXS};case s.Style.SEGMENTED_CONTROL:return{...r,columnGap:t.none,rowGap:t.twoXS,"::after":{content:"''",flex:1e4}};default:return r}}function je(e,t,r,n,o,i){const a=Be(r,n,o,t);let p=e.content,c=e.contentIcon;return a&&(p=e.selectedContent?e.selectedContent:p,c=e.selectedContentIcon?e.selectedContentIcon:c),f.forwardRef(function(d,y){const{element:m,kind:l,size:E}=Ae(p??"",c??void 0,i),h=Ie(!!(a&&!e.selectedContent&&!e.selectedContentIcon),l);return S(ue,{...d,size:E,kind:h,children:m})})}function De(e,t){return e.getIntArrayValue(t)}function Me(e){return e.default??null}function $e(e){return e.value??null}function Ge(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o}=e,{clickMode:i,options:a,selectionVisualization:p,style:c,label:C,labelVisibility:d,help:y}=r,m=Y(),[l,E]=ce({getStateFromWidgetMgr:De,getDefaultStateFromProto:Me,getCurrStateFromProto:$e,updateWidgetMgrState:ke,element:r,widgetMgr:o,fragmentId:n}),h=(O,_)=>{const L=Ce(i,_,l);E({value:L,fromUi:!0})};let w;i===s.ClickMode.SINGLE_SELECT?w=P.radio:i===s.ClickMode.MULTI_SELECT&&(w=P.checkbox);const A=f.useMemo(()=>a.map((O,_)=>{const L=je(O,_,p,i,l,c);return S(L,{},`${O.content}-${_}`)}),[i,a,p,c,l]);return ee("div",{className:"stButtonGroup","data-testid":"stButtonGroup",children:[S(ae,{label:C,disabled:t,labelVisibility:te((d==null?void 0:d.value)??re.LabelVisibilityOptions.COLLAPSED),children:y&&S(ne,{children:S(oe,{content:y,placement:ie.TOP})})}),S(F,{disabled:t,mode:w,onClick:h,selected:i===s.ClickMode.MULTI_SELECT?l:Pe(l),overrides:{Root:{style:f.useCallback(()=>Te(c,m.spacing),[c,m.spacing])}},children:A})]})}const Ue=f.memo(Ge);export{Ue as default};
1
+ import{bw as Z,bx as J,r as f,by as Q,y as Y,bz as s,j as S,z as ee,bs as te,bA as re,bB as ne,bt as oe,bc as ie,bu as ae,bq as ue,b8 as j,b7 as W,ba as le}from"./index.7ACWibTY.js";import{a as ce}from"./useBasicWidgetState.S-yUfhr7.js";import"./FormClearHelper.DZ1scmYc.js";var se={primary:"primary",secondary:"secondary",tertiary:"tertiary"},G={default:"default",pill:"pill",round:"round",circle:"circle",square:"square"},fe={mini:"mini",default:"default",compact:"compact",large:"large"},C=Object.freeze({radio:"radio",checkbox:"checkbox"}),z=Z("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==G.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});z.displayName="StyledRoot";z.displayName="StyledRoot";function D(e){"@babel/helpers - typeof";return D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(e)}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(n){N(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function de(e,t){return he(e)||me(e,t)||be(e,t)||ye()}function ye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function be(e,t){if(e){if(typeof e=="string")return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(e,t)}}function X(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function me(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,p;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,p=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw p}}return n}}function he(e){if(Array.isArray(e))return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ve(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 Se(e,t,r){return t&&ve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oe(e,t){if(typeof t!="function"&&t!==null)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&&$(e,t)}function $(e,t){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$(e,t)}function _e(e){var t=we();return function(){var n=k(e),o;if(t){var i=k(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Ee(this,o)}}function Ee(e,t){if(t&&(D(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K(e)}function K(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function we(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},k(e)}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var q=function(e){Oe(r,e);var t=_e(r);function r(){var n;ge(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),N(K(n),"childRefs",{}),n}return Se(r,[{key:"render",value:function(){var o=this,i=this.props,a=i.overrides,p=a===void 0?{}:a,c=i.mode,P=c===void 0?C.checkbox:c,d=i.children,y=i.selected,m=i.disabled,l=i.onClick,E=i.kind,h=i.shape,w=i.size,A=J(p.Root,z),O=de(A,2),_=O[0],L=O[1],F=this.props["aria-label"]||this.props.ariaLabel,g=P===C.radio,V=f.Children.count(d);return f.createElement(Q.Consumer,null,function(H){return f.createElement(_,M({"aria-label":F||H.buttongroup.ariaLabel,"data-baseweb":"button-group",role:g?"radiogroup":"group",$shape:h,$length:d.length},L),f.Children.map(d,function(b,R){if(!f.isValidElement(b))return null;var B=b.props.isSelected?b.props.isSelected:Le(y,R);return g&&(o.childRefs[R]=f.createRef()),f.cloneElement(b,{disabled:m||b.props.disabled,isSelected:B,ref:g?o.childRefs[R]:void 0,tabIndex:!g||B||g&&(!y||y===-1)&&R===0?0:-1,onKeyDown:function(u){if(g){var v=Number(y)?Number(y):0;if(u.key==="ArrowUp"||u.key==="ArrowLeft"){u.preventDefault&&u.preventDefault();var I=v-1<0?V-1:v-1;l&&l(u,I),o.childRefs[I].current&&o.childRefs[I].current.focus()}if(u.key==="ArrowDown"||u.key==="ArrowRight"){u.preventDefault&&u.preventDefault();var T=v+1>V-1?0:v+1;l&&l(u,T),o.childRefs[T].current&&o.childRefs[T].current.focus()}}},kind:E,onClick:function(u){m||(b.props.onClick&&b.props.onClick(u),l&&l(u,R))},shape:h,size:w,overrides:pe({BaseButton:{style:function(u){var v=u.$theme;return d.length===1?{}:h!==G.default?{marginLeft:v.sizing.scale100,marginRight:v.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":B,role:g?"radio":"checkbox"}}},b.props.overrides)})}))})}}]),r}(f.Component);N(q,"defaultProps",{disabled:!1,onClick:function(){},shape:G.default,size:fe.default,kind:se.secondary});function Re(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function Pe(e,t,r){return e==s.ClickMode.MULTI_SELECT?Re(t,r??[]):r!=null&&r.includes(t)?[]:[t]}function Ce(e){return e.length===0?-1:e[0]}function ke(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function Ae(e,t,r){const n=r===s.Style.PILLS?j.PILLS:r===s.Style.BORDERLESS?j.BORDERLESS_ICON:j.SEGMENTED_CONTROL,o=r===s.Style.BORDERLESS?W.XSMALL:W.MEDIUM,i=r===s.Style.BORDERLESS?"lg":"base";return{element:S(le,{icon:t,label:e,iconSize:i}),kind:n,size:o}}function Be(e,t,r,n){return r.indexOf(n)>-1?!0:t!==s.ClickMode.SINGLE_SELECT||e!==s.SelectionVisualization.ALL_UP_TO_SELECTED?!1:r.length>0&&n<r[0]}function Ie(e,t){return e&&(t=`${t}Active`),t}function Te(e,t){const r={flexWrap:"wrap",maxWidth:"fit-content"};switch(e){case s.Style.BORDERLESS:return{...r,columnGap:t.threeXS,rowGap:t.threeXS};case s.Style.PILLS:return{...r,columnGap:t.twoXS,rowGap:t.twoXS};case s.Style.SEGMENTED_CONTROL:return{...r,columnGap:t.none,rowGap:t.twoXS,"::after":{content:"''",flex:1e4}};default:return r}}function je(e,t,r,n,o,i){const a=Be(r,n,o,t);let p=e.content,c=e.contentIcon;return a&&(p=e.selectedContent?e.selectedContent:p,c=e.selectedContentIcon?e.selectedContentIcon:c),f.forwardRef(function(d,y){const{element:m,kind:l,size:E}=Ae(p??"",c??void 0,i),h=Ie(!!(a&&!e.selectedContent&&!e.selectedContentIcon),l);return S(ue,{...d,size:E,kind:h,children:m})})}function De(e,t){return e.getIntArrayValue(t)}function Me(e){return e.default??null}function $e(e){return e.value??null}function Ge(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o}=e,{clickMode:i,options:a,selectionVisualization:p,style:c,label:P,labelVisibility:d,help:y}=r,m=Y(),[l,E]=ce({getStateFromWidgetMgr:De,getDefaultStateFromProto:Me,getCurrStateFromProto:$e,updateWidgetMgrState:ke,element:r,widgetMgr:o,fragmentId:n}),h=(O,_)=>{const L=Pe(i,_,l);E({value:L,fromUi:!0})};let w;i===s.ClickMode.SINGLE_SELECT?w=C.radio:i===s.ClickMode.MULTI_SELECT&&(w=C.checkbox);const A=f.useMemo(()=>a.map((O,_)=>{const L=je(O,_,p,i,l,c);return S(L,{},`${O.content}-${_}`)}),[i,a,p,c,l]);return ee("div",{className:"stButtonGroup","data-testid":"stButtonGroup",children:[S(ae,{label:P,disabled:t,labelVisibility:te((d==null?void 0:d.value)??re.LabelVisibilityOptions.COLLAPSED),children:y&&S(ne,{children:S(oe,{content:y,placement:ie.TOP})})}),S(q,{disabled:t,mode:w,onClick:h,selected:i===s.ClickMode.MULTI_SELECT?l:Ce(l),overrides:{Root:{style:f.useCallback(()=>Te(c,m.spacing),[c,m.spacing])}},children:A})]})}const Ue=f.memo(Ge);export{Ue as default};
@@ -1 +1 @@
1
- import{n as a,bo as S,i as x,R as p,aG as f,c2 as g,j as i,c3 as m,z as T,aF as $}from"./index.BUL6xLUk.js";const h=a(S,{shouldForwardProp:x,target:"e1ira7tx0"})(({theme:e,usingCustomTheme:s})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,radius:e.radii.md,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:s?e.colors.primary:e.colors.blue70,flexGrow:0,flexShrink:0})),b=a("div",{target:"e1ira7tx1"})(({theme:e,width:s,cache:t})=>({width:s,...t?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),C=a("div",{target:"e1ira7tx2"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),y=a("div",{target:"e1ira7tx3"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"})),z=e=>{const s=Math.floor(e/3600),t=Math.floor(e%3600/60),n=e%60;if(s===0&&t===0)return`(${n.toFixed(1)} seconds)`;if(s===0){const l=`${t} minute${t===1?"":"s"}`,d=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${l}${d})`}const o=`${s} hour${s===1?"":"s"}`,r=t===0?"":`, ${t} minute${t===1?"":"s"}`,c=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${o}${r}${c})`};function v({width:e,element:s}){const{activeTheme:t}=p.useContext(f),n=!g(t),{cache:o,showTime:r}=s,[c,l]=p.useState(0);return p.useEffect(()=>{if(!r)return;const d=setInterval(()=>{l(u=>u+.1)},100);return()=>clearInterval(d)},[r]),i(b,{className:m({stSpinner:!0,stCacheSpinner:o}),"data-testid":"stSpinner",width:e,cache:o,children:T(y,{children:[i(h,{usingCustomTheme:n}),i($,{source:s.text,allowHTML:!1}),r&&i(C,{children:z(c)})]})})}export{v as default};
1
+ import{n as a,bn as S,i as x,R as p,aF as f,c1 as g,j as i,c2 as m,z as T,aE as $}from"./index.7ACWibTY.js";const h=a(S,{shouldForwardProp:x,target:"e1ira7tx0"})(({theme:e,usingCustomTheme:s})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,radius:e.radii.md,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:s?e.colors.primary:e.colors.blue70,flexGrow:0,flexShrink:0})),b=a("div",{target:"e1ira7tx1"})(({theme:e,width:s,cache:t})=>({width:s,...t?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),C=a("div",{target:"e1ira7tx2"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),y=a("div",{target:"e1ira7tx3"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"})),z=e=>{const s=Math.floor(e/3600),t=Math.floor(e%3600/60),n=e%60;if(s===0&&t===0)return`(${n.toFixed(1)} seconds)`;if(s===0){const l=`${t} minute${t===1?"":"s"}`,d=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${l}${d})`}const o=`${s} hour${s===1?"":"s"}`,r=t===0?"":`, ${t} minute${t===1?"":"s"}`,c=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${o}${r}${c})`};function v({width:e,element:s}){const{activeTheme:t}=p.useContext(f),n=!g(t),{cache:o,showTime:r}=s,[c,l]=p.useState(0);return p.useEffect(()=>{if(!r)return;const d=setInterval(()=>{l(u=>u+.1)},100);return()=>clearInterval(d)},[r]),i(b,{className:m({stSpinner:!0,stCacheSpinner:o}),"data-testid":"stSpinner",width:e,cache:o,children:T(y,{children:[i(h,{usingCustomTheme:n}),i($,{source:s.text,allowHTML:!1}),r&&i(C,{children:z(c)})]})})}export{v as default};
@@ -1 +1 @@
1
- import{n as t,M as d,j as c,b5 as l,b6 as g,J as e}from"./index.BUL6xLUk.js";const f=t("iframe",{target:"e1q9bkxk0"})(({theme:o,disableScrolling:n})=>({colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:n?"hidden":void 0}));function F({element:o,width:n}){const i=o.hasWidth?o.width:n,r=s(o.src),a=d(r)?void 0:s(o.srcdoc);return c(f,{className:"stIFrame","data-testid":"stIFrame",allow:l,disableScrolling:!o.scrolling,src:r,srcDoc:a,width:i,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:g,title:"st.iframe"})}function s(o){return e(o)||o===""?void 0:o}export{F as default};
1
+ import{n as t,M as d,j as c,b4 as l,b5 as g,J as e}from"./index.7ACWibTY.js";const f=t("iframe",{target:"e1q9bkxk0"})(({theme:o,disableScrolling:n})=>({colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:n?"hidden":void 0}));function F({element:o,width:n}){const i=o.hasWidth?o.width:n,r=s(o.src),a=d(r)?void 0:s(o.srcdoc);return c(f,{className:"stIFrame","data-testid":"stIFrame",allow:l,disableScrolling:!o.scrolling,src:r,srcDoc:a,width:i,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:g,title:"st.iframe"})}function s(o){return e(o)||o===""?void 0:o}export{F as default};
@@ -1 +1 @@
1
- import{n as o,z as m,j as i,aF as S}from"./index.BUL6xLUk.js";import{S as g,T as y}from"./Toolbar.CaxqEUPP.js";import{w as W,u as b,E as M}from"./withFullScreenWrapper.CI1ebDYc.js";const L=o("div",{target:"evl31sl0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg,maxWidth:"100%",width:"fit-content"})),O=o("div",{target:"evl31sl1"})(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0,">img":{borderRadius:t.radii.default}})),E=o("div",{target:"evl31sl2"})(({theme:t})=>({textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}));var p;(function(t){t[t.OriginalWidth=-1]="OriginalWidth",t[t.ColumnWidth=-2]="ColumnWidth",t[t.AutoWidth=-3]="AutoWidth",t[t.MinImageOrContainer=-4]="MinImageOrContainer",t[t.MaxImageOrContainer=-5]="MaxImageOrContainer"})(p||(p={}));function F({element:t,width:u,endpoints:f,disableFullscreenMode:x}){const{expanded:n,width:w,height:r,expand:C,collapse:h}=b(M),d=n?w:u;let l;const a=t.width;if([-1,-3,-4].includes(a))l=void 0;else if([-2,-5].includes(a))l=d;else if(a>0)l=a;else throw Error(`Invalid image width: ${a}`);const e={};return r&&n?(e.maxHeight=r,e.objectFit="contain"):(e.width=l,e.maxWidth="100%"),m(g,{width:d,height:r,useContainerWidth:n,topCentered:!0,children:[i(y,{target:g,isFullScreen:n,onExpand:C,onCollapse:h,disableFullscreenMode:x}),i(L,{className:"stImage","data-testid":"stImage",children:t.imgs.map((I,c)=>{const s=I;return m(O,{"data-testid":"stImageContainer",children:[i("img",{style:e,src:f.buildMediaURL(s.url),alt:c.toString()}),s.caption&&i(E,{"data-testid":"stImageCaption",style:e,children:i(S,{source:s.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]},c)})})]})}const R=W(F);export{R as default};
1
+ import{n as o,z as m,j as i,aE as S}from"./index.7ACWibTY.js";import{S as g,T as y}from"./Toolbar.CsJK79V5.js";import{w as W,u as b,E as M}from"./withFullScreenWrapper.DNSRZFsQ.js";const E=o("div",{target:"evl31sl0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg,maxWidth:"100%",width:"fit-content"})),L=o("div",{target:"evl31sl1"})(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0,">img":{borderRadius:t.radii.default}})),O=o("div",{target:"evl31sl2"})(({theme:t})=>({textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}));var p;(function(t){t[t.OriginalWidth=-1]="OriginalWidth",t[t.ColumnWidth=-2]="ColumnWidth",t[t.AutoWidth=-3]="AutoWidth",t[t.MinImageOrContainer=-4]="MinImageOrContainer",t[t.MaxImageOrContainer=-5]="MaxImageOrContainer"})(p||(p={}));function T({element:t,width:u,endpoints:f,disableFullscreenMode:x}){const{expanded:n,width:w,height:r,expand:C,collapse:h}=b(M),d=n?w:u;let l;const a=t.width;if([-1,-3,-4].includes(a))l=void 0;else if([-2,-5].includes(a))l=d;else if(a>0)l=a;else throw Error(`Invalid image width: ${a}`);const e={};return r&&n?(e.maxHeight=r,e.objectFit="contain"):(e.width=l,e.maxWidth="100%"),m(g,{width:d,height:r,useContainerWidth:n,topCentered:!0,children:[i(y,{target:g,isFullScreen:n,onExpand:C,onCollapse:h,disableFullscreenMode:x}),i(E,{className:"stImage","data-testid":"stImage",children:t.imgs.map((I,c)=>{const s=I;return m(L,{"data-testid":"stImageContainer",children:[i("img",{style:e,src:f.buildMediaURL(s.url),alt:c.toString()}),s.caption&&i(O,{"data-testid":"stImageCaption",style:e,children:i(S,{source:s.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]},c)})})]})}const R=W(T);export{R as default};