@stlite/desktop 0.101.0 → 0.101.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 (106) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/assets/{ArrowVegaLiteChart-BPRH3gBe-BAbt2P_J.js → ArrowVegaLiteChart-CatHU5ye-DE4k_KZP.js} +1 -1
  3. package/build/assets/{Audio-CoZBGqWO-DVgjOuuv.js → Audio-Y9nq0mPc-DJn2U9cz.js} +1 -1
  4. package/build/assets/{AudioInput-CP7K7uZB-DEV8Xl4i.js → AudioInput-Csthtpwn-Gk0F2DgH.js} +1 -1
  5. package/build/assets/{Balloons-Dskp5L92-ZNEwM3D8.js → Balloons-CAfRmkgd-z1flYTjg.js} +1 -1
  6. package/build/assets/{BidiComponent-DxYVG75b-CJQGNxg7.js → BidiComponent-C0W-jB8K-D7KrGlkt.js} +1 -1
  7. package/build/assets/{Button-5Ajtxbwn-BDegkHP-.js → Button-CtzCBW58-BD91cO69.js} +1 -1
  8. package/build/assets/{ButtonGroup-pGxlWp89-DmbuGG5M.js → ButtonGroup-tARGP97W-k1H0Zd3f.js} +1 -1
  9. package/build/assets/{CameraInput-vKKDhL6--Bpo-2dKV.js → CameraInput-CiV08N6Y-BKRxm_ar.js} +1 -1
  10. package/build/assets/{ChatInput-B6oFIFHm-uQa-NGtx.js → ChatInput-CFv2o38z-D_M_04yy.js} +1 -1
  11. package/build/assets/{Checkbox-DkJE55dj-CY83TfqD.js → Checkbox-DWGcKBjY-KBwPglLJ.js} +1 -1
  12. package/build/assets/{ColorPicker-BMz1lxCB-B2MaPR-H.js → ColorPicker-DFXf_KfZ-CnAPoS0z.js} +1 -1
  13. package/build/assets/{ComponentInstance-Cemgj4S0-BMxea-Y3.js → ComponentInstance-Dlz3boBV-ElD3LiR-.js} +1 -1
  14. package/build/assets/{DataFrame-CE79SZpX-CVHFe_Oz.js → DataFrame-ZHi5iyDV-DOvZAfc9.js} +5 -5
  15. package/build/assets/{DateInput-CEc2d-u8-CCDK405-.js → DateInput-DY0AqEEz-CqSRF0qe.js} +1 -1
  16. package/build/assets/{DateTimeInput-Dxlp0suj-lPuiAonQ.js → DateTimeInput-CXPUXbNs-be2fi1AZ.js} +1 -1
  17. package/build/assets/{DeckGlJsonChart-BW5EAwx1-BE5y5UXu.js → DeckGlJsonChart-3OvaJ57f-UNRd4a-y.js} +1 -1
  18. package/build/assets/{DownloadButton-DV8eX00c-kOA1BAvU.js → DownloadButton-DmVVeFJl-Do7BZpDb.js} +1 -1
  19. package/build/assets/{ErrorOutline.esm-iPLqAm6s-BL6R0-E8.js → ErrorOutline.esm-YgtldkCQ-CemIM7Sw.js} +1 -1
  20. package/build/assets/{Feedback-MVQzrJry-Dd1sPXaV.js → Feedback-BcHw2pQG-CaKtB97h.js} +1 -1
  21. package/build/assets/{FileDownload.esm-8YapEt7k-NoDtFt6j.js → FileDownload.esm-DA6EBJWo-CxqNcH-o.js} +1 -1
  22. package/build/assets/{FileUploader-Bq3BegdV-B3r5TUWB.js → FileUploader-Dpa-JOXx-BcyQjtX1.js} +1 -1
  23. package/build/assets/{FormSubmitContent-DD_l2XQL-BimOkDO8.js → FormSubmitContent-BjnJlt70-CMef_LQq.js} +1 -1
  24. package/build/assets/{GraphVizChart-j4WovvTA-C0wWJ_pD.js → GraphVizChart-DvlJXY81-DgyqPG63.js} +1 -1
  25. package/build/assets/{Html-D79N9lS4-DAD924qV.js → Html-B0_sFMha-C_dmalFu.js} +1 -1
  26. package/build/assets/{IFrame-C-0ir_lX-COQZFQmq.js → IFrame-DRaylZUz-BDLId26Q.js} +1 -1
  27. package/build/assets/{ImageList-DITlvS6g-BFNsGTg4.js → ImageList-C_I_gGvM-DLKWaXo_.js} +1 -1
  28. package/build/assets/{InputInstructions-nOmuO-zQ-DLhhHeOF.js → InputInstructions-BQBBgzXB-CiqDziMj.js} +1 -1
  29. package/build/assets/{Json-dkGVRbLV-BZzUtwOp.js → Json-C6_T-DWT-DkBsT-1G.js} +1 -1
  30. package/build/assets/{LinkButton-CxeesGpD-XutrRy0n.js → LinkButton-6uqUWhGF-D7wFQ281.js} +1 -1
  31. package/build/assets/{MenuButton-UcWUeA29-CQZ7nqVP.js → MenuButton-Bmt95URR-DWfL9ITb.js} +1 -1
  32. package/build/assets/{Metric-E6w6g5y9-Dk-6h2Zo.js → Metric-SKreeL3S-D11O16iU.js} +1 -1
  33. package/build/assets/{Multiselect-C_J-6rRf-BBLmmdLo.js → Multiselect-C7QmmmLa-DswxpHA8.js} +1 -1
  34. package/build/assets/{NumberInput-CmmPAj3n-BvWR0X5L.js → NumberInput-zpxbqqaI-BemEeZnC.js} +1 -1
  35. package/build/assets/{PageLink-B_F10WTa-BFWV94JC.js → PageLink-CS25U8sD-DuDcJ3as.js} +1 -1
  36. package/build/assets/{Particles-Dg4BbwYl-DxeaHInY.js → Particles-CvcHVa3B-D8gsFknc.js} +1 -1
  37. package/build/assets/{PlotlyChart-D4XY8twK-DVP8NFHB.js → PlotlyChart-CvayS3p7-Chny3tV_.js} +1 -1
  38. package/build/assets/{Progress-B1iI3faW-BbsFPR94.js → Progress-DGYWLpfg-CRiA40l6.js} +1 -1
  39. package/build/assets/{ProgressBar-Dxdjhh5v-CTb2XLYl.js → ProgressBar-DhIwITyC-B3HjvnkD.js} +1 -1
  40. package/build/assets/{Radio-BrYX5pm0-CF7BRVxx.js → Radio-DpOh-J7A-CQZUGZrw.js} +1 -1
  41. package/build/assets/{Selectbox-sP6HTvqf-DlF5ZFtf.js → Selectbox-3CDAXdnY-CsatfdqB.js} +1 -1
  42. package/build/assets/{Slider-D98WJ7GD-BEhH17Zd.js → Slider-DMZ19nRR-D59HIM6O.js} +1 -1
  43. package/build/assets/{Snow-BEe0B8y4-DD2qBOW1.js → Snow-5YC5Tskh-CYK5UTTk.js} +1 -1
  44. package/build/assets/{Spinner-iDUBO9CD-D_zDEDrL.js → Spinner-B3_-SaXN-McIq5xMY.js} +1 -1
  45. package/build/assets/{StreamlitSyntaxHighlighter-B0XLn_aG-C0Kyhnly.js → StreamlitSyntaxHighlighter-BQaPTFQq-D7Uj2Adi.js} +1 -1
  46. package/build/assets/{Table-BN3amuUX-_h5zNOPx.js → Table-Bc9x-fDk-DqKxodLp.js} +1 -1
  47. package/build/assets/{TableChart.esm-BEJJfW1D-DZXow7YN.js → TableChart.esm-DqSB-klz-DFWt0snW.js} +1 -1
  48. package/build/assets/{TextArea-BEB_9fLu-CW8pYEVM.js → TextArea-B1xQzjI6-B02nvgg-.js} +1 -1
  49. package/build/assets/{TextInput-CnKuZu4D-BpWqERh9.js → TextInput-D1xd0P97-BixpGDSG.js} +1 -1
  50. package/build/assets/{TimeInput-p5WNkWhN-5G1YCgeW.js → TimeInput-DuMfskY4-BipgeoUn.js} +1 -1
  51. package/build/assets/{Toast-CamIWrFG-D9p31VL8.js → Toast-CJKq1jpo-CCJnP6c1.js} +1 -1
  52. package/build/assets/{Video-QwWFy5xP-BpsExZGv.js → Video-B1N4EHQq-nnkWrBjK.js} +1 -1
  53. package/build/assets/{WidgetLabel-UxhCOQGD-Outa0e9S.js → WidgetLabel-CQfHGtry-H2bBW1_F.js} +1 -1
  54. package/build/assets/{WidgetLabelHelpIcon-B9x-Yn7N-DaZaIL2I.js → WidgetLabelHelpIcon-C6IRqJ_I-CThDB-RY.js} +1 -1
  55. package/build/assets/{WidgetLabelHelpIconInline-DpAdsUdv-BJmzytr_.js → WidgetLabelHelpIconInline-BTmzKeRa-Duj2btUF.js} +1 -1
  56. package/build/assets/{_baseAssignValue-5yAp7ssZ-B_y2bL7u.js → _baseAssignValue-CvLdsscI-CrqCsrMj.js} +1 -1
  57. package/build/assets/{base-input-BruRHirU-Dc9fKcQ_.js → base-input-Drzzu2Q6-ChupVbXS.js} +1 -1
  58. package/build/assets/{checkbox-SGVQt8CZ-CUyChNRB.js → checkbox-BlFkpHIT--ezfhS9t.js} +1 -1
  59. package/build/assets/{constants-BAtobv15-hfdyP7sx.js → constants-yZa2TGaZ-C7XGmSjZ.js} +1 -1
  60. package/build/assets/{createDownloadLinkElement-hdE2s_AI-2rp2KBS8.js → createDownloadLinkElement-CnWgptKS-DPufZYcx.js} +1 -1
  61. package/build/assets/{createSuper-DStVJdot-BgJXIEaD.js → createSuper-DfsXhqeB-CdsievJ8.js} +1 -1
  62. package/build/assets/{data-grid-overlay-editor-CpKwlh0F-Ot5bveZo.js → data-grid-overlay-editor-BylJk6rz-B2d0C4wn.js} +1 -1
  63. package/build/assets/{downloader-CZ7qD7NY-DO5yuo_B.js → downloader-CZ7qD7NY-bknF4iTS.js} +1 -1
  64. package/build/assets/{embed-BWbkDQKD-CQt2Xn8d.js → embed-C21m9f7b-B4FzBzhy.js} +1 -1
  65. package/build/assets/{es6-BxevHr5y-BFwhOTke.js → es6-BxevHr5y-CS3OejqZ.js} +1 -1
  66. package/build/assets/{formatNumber-CK08KwyC-BpCoyciY.js → formatNumber-B9NmJPl4-Bduke_Pe.js} +1 -1
  67. package/build/assets/{iconPosition-CaL2HY1u-D4CYRoRA.js → iconPosition-Cpqwt3HE-D1Z0gR4v.js} +1 -1
  68. package/build/assets/{iframeResizer.contentWindow-DwDNXvbk-Cmn9AtXP.js → iframeResizer.contentWindow-CaUMNiuy-bR3yN29o.js} +1 -1
  69. package/build/assets/{index-BWg7VeLm-DVMf1gfQ.js → index-B7jxgHEF-tvzMtMrO.js} +1 -1
  70. package/build/assets/{index-cRrBqQzO-ixGPBxWO.js → index-DINISCAW-ClgNywT7.js} +1 -1
  71. package/build/assets/{index-B14K3STS-DjuURwqx.js → index-DZZFubxH-pza9foUu.js} +1 -1
  72. package/build/assets/{index-CC2oI2tl-B1Janb2E.js → index-Dk9oWC2N-Cm5J-5pS.js} +1 -1
  73. package/build/assets/{index-DtJJZPfU-CoZOkYgP.js → index-DmoOfsTG-CbezIXlt.js} +1 -1
  74. package/build/assets/{index-B4fa-n2i.js → index-lR-QVdnh.js} +5 -5
  75. package/build/assets/{input-CK4OtyRn-yU_-c-Kx.js → input-CClPhvPt-ZRbRIlPm.js} +1 -1
  76. package/build/assets/{memory-C-LDMFc2-CqsiY5qN.js → memory-C-LDMFc2-grfew3Ct.js} +1 -1
  77. package/build/assets/{moment-C29_LcvN-KXJiUm6M.js → moment-C29_LcvN-DWLtgoJ3.js} +1 -1
  78. package/build/assets/{number-overlay-editor-Cdrkus19-CUUZ-u43.js → number-overlay-editor-CQ3u-ilh-C8RlzGdo.js} +1 -1
  79. package/build/assets/{pandasStylerUtils-CY1NqKTm-DwfIUg29.js → pandasStylerUtils-lPQUevWP-DCEaT5gM.js} +1 -1
  80. package/build/assets/{possibleConstructorReturn-Dp3x_67l-DW084-po.js → possibleConstructorReturn-BHiKHPYz-Ct6Qmz2B.js} +1 -1
  81. package/build/assets/{reactJsonViewCompat-BhHQdMb3-D8YsIkW1.js → reactJsonViewCompat-BZlB_0r4-DL51cX9L.js} +1 -1
  82. package/build/assets/{sandbox-DbnteG5V-DNuXtcQa.js → sandbox-DbnteG5V-HPERfLXa.js} +1 -1
  83. package/build/assets/{select-zCQ7w46r-igC065UB.js → select-DyvsciAf-taVHCqSw.js} +1 -1
  84. package/build/assets/{sprintfjs-COS3ohU3-DoDOU6OA.js → sprintfjs-pgmg3ABV-kczlFpH1.js} +1 -1
  85. package/build/assets/{stateful-menu-B1me4S43-BQ0PQHe9.js → stateful-menu-CW-YE2l8-eSvRA0_x.js} +1 -1
  86. package/build/assets/{styled-components-CQF9Arpx-CYVHnd6_.js → styled-components-BDZ1Vzrp-DV4YFEHI.js} +1 -1
  87. package/build/assets/{styled-components-k0rbnWKx-D5DoPNuy.js → styled-components-CZBaXqHz-WpjbtMki.js} +1 -1
  88. package/build/assets/{styled-components-vQd9mwpf-HK_7dsCd.js → styled-components-Cxzc3DcQ-Dx1RKHWs.js} +1 -1
  89. package/build/assets/{timepicker-EzC3uiD--BM84grrq.js → timepicker-Bp949u0W-CdL6sZaL.js} +1 -1
  90. package/build/assets/{toConsumableArray-BtKF-zGi-DY9ZxPdB.js → toConsumableArray-8hd4ivs--CUX5d2F_.js} +1 -1
  91. package/build/assets/{useBasicWidgetState-BMBMOmTg-D4BUrDbU.js → useBasicWidgetState-D3zHnRUK-J72gaU7U.js} +1 -1
  92. package/build/assets/{useIntlLocale-DqYWg-Yk-vlpPga3p.js → useIntlLocale-DdLGxiZO-DJttkOFe.js} +1 -1
  93. package/build/assets/{useSelectCommon-CTMZGTGc-Ce0_Hd3P.js → useSelectCommon-CZP9dNty-DYUDYQZN.js} +1 -1
  94. package/build/assets/{useTextInputAutoExpand-CnKMosrs-B4eb5Sf7.js → useTextInputAutoExpand-D9pA1iXq-B_21ViwV.js} +1 -1
  95. package/build/assets/{useUpdateUiValue-B9f-9GF1-ClPAYOW9.js → useUpdateUiValue-CsBMIrnj-BopSFNwe.js} +1 -1
  96. package/build/assets/{useWaveformController-vz6xEIpB-By40P5gh.js → useWaveformController-rxqEhP00-CEw8q0Aj.js} +1 -1
  97. package/build/assets/{utils-C0gaaqVX-vUUpSioz.js → utils-CotIDfd1-2L45u02v.js} +1 -1
  98. package/build/assets/{withCalculatedWidth-B-DDl_d6-BCYIlY-Q.js → withCalculatedWidth-DwrWHMUR-B2yMBY1O.js} +1 -1
  99. package/build/assets/{withFullScreenWrapper-CuXVCIWH-BixTXCsJ.js → withFullScreenWrapper-tGGSjEWy-BaPaU-BF.js} +1 -1
  100. package/build/assets/worker-BOAT2Vs2-B55LI3Y4.js +1020 -0
  101. package/build/electron/worker.js +9 -9
  102. package/build/index.html +1 -1
  103. package/package.json +3 -3
  104. package/wheels/stlite_lib-0.1.0-py3-none-any.whl +0 -0
  105. package/wheels/streamlit-1.57.0-cp313-none-any.whl +0 -0
  106. package/build/assets/worker-au3nYZmM-CULfdmAh.js +0 -930
@@ -1 +1 @@
1
- import{$r as e,Ha as t,Wa as n,ut as r,wn as i}from"./index-B4fa-n2i.js";import{n as a}from"./ProgressBar-Dxdjhh5v-CTb2XLYl.js";var o=n(t(),1),s=i(`div`,{target:`e18r7x300`})(({theme:e})=>({paddingBottom:e.spacing.sm,lineHeight:`normal`}),``);function c({element:t}){return e.jsxs(`div`,{className:`stProgress`,"data-testid":`stProgress`,children:[e.jsx(s,{children:e.jsx(r,{source:t.text,allowHTML:!1,isLabel:!0})}),e.jsx(a,{value:t.value})]})}var l=(0,o.memo)(c);export{l as default};
1
+ import{$r as e,Ha as t,Wa as n,ut as r,wn as i}from"./index-lR-QVdnh.js";import{n as a}from"./ProgressBar-DhIwITyC-B3HjvnkD.js";var o=n(t(),1),s=i(`div`,{target:`e18r7x300`})(({theme:e})=>({paddingBottom:e.spacing.sm,lineHeight:`normal`}),``);function c({element:t}){return e.jsxs(`div`,{className:`stProgress`,"data-testid":`stProgress`,children:[e.jsx(s,{children:e.jsx(r,{source:t.text,allowHTML:!1,isLabel:!0})}),e.jsx(a,{value:t.value})]})}var l=(0,o.memo)(c);export{l as default};
@@ -1,2 +1,2 @@
1
- import{$n as e,$r as t,Ha as n,La as r,Wa as i,Zi as a,fa as o,sr as s,ui as c}from"./index-B4fa-n2i.js";var l=i(n(),1),u={small:`small`,medium:`medium`,large:`large`},d;function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?p(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t;return(t={},h(t,u.small,`2px`),h(t,u.medium,`4px`),h(t,u.large,`8px`),t)[e]}var _=a(`div`,function(e){return{width:`100%`}});_.displayName=`StyledRoot`,_.displayName=`StyledRoot`;var v=a(`div`,function(e){var t=e.$theme.sizing;return{display:`flex`,marginLeft:t.scale500,marginRight:t.scale500,marginTop:t.scale500,marginBottom:t.scale500}});v.displayName=`StyledBarContainer`,v.displayName=`StyledBarContainer`;var y=a(`div`,function(e){var t=e.$theme,n=e.$size,r=e.$steps,i=t.colors,a=t.sizing,o=t.borders.useRoundedCorners?a.scale0:0;return m({borderTopLeftRadius:o,borderTopRightRadius:o,borderBottomRightRadius:o,borderBottomLeftRadius:o,backgroundColor:s(i.progressbarTrackFill,`0.16`),height:g(n),flex:1,overflow:`hidden`},r<2?{}:{marginLeft:a.scale300,":first-child":{marginLeft:`0`}})});y.displayName=`StyledBar`,y.displayName=`StyledBar`;var b=a(`div`,function(e){var t=e.$theme,n=e.$value,r=e.$successValue,i=e.$steps,a=e.$index,o=e.$maxValue,s=e.$minValue,c=s===void 0?0:s,l=o||r,u=t.colors,d=t.sizing,f=t.borders,p=`${100-(n-c)*100/(l-c)}%`,h={default:`default`,awaits:`awaits`,inProgress:`inProgress`,completed:`completed`},g=h.default;if(i>1){var _=(l-c)/i,v=(n-c)/(l-c)*100,y=Math.floor(v/_);g=a<y?h.completed:a===y?h.inProgress:h.awaits}var b=f.useRoundedCorners?d.scale0:0,x={transform:`translateX(-${p})`},S=g===h.inProgress?{animationDuration:`2.1s`,animationIterationCount:`infinite`,animationTimingFunction:t.animation.linearCurve,animationName:{"0%":{transform:`translateX(-102%)`,opacity:1},"50%":{transform:`translateX(0%)`,opacity:1},"100%":{transform:`translateX(0%)`,opacity:0}}}:g===h.completed?{transform:`translateX(0%)`}:{transform:`translateX(-102%)`};return m({borderTopLeftRadius:b,borderTopRightRadius:b,borderBottomRightRadius:b,borderBottomLeftRadius:b,backgroundColor:u.accent,height:`100%`,width:`100%`,transform:`translateX(-102%)`,transition:`transform 0.5s`},i>1?S:x)});b.displayName=`StyledBarProgress`,b.displayName=`StyledBarProgress`;var x=a(`div`,function(e){var t=e.$theme,n=e.$isLeft,r=n===void 0?!1:n,i=e.$size,a=i===void 0?u.medium:i,o=t.colors,s=t.sizing,c=t.borders.useRoundedCorners?s.scale0:0,l=g(a),d={display:`inline-block`,flex:1,marginLeft:`auto`,marginRight:`auto`,transitionProperty:`background-position`,animationDuration:`1.5s`,animationIterationCount:`infinite`,animationTimingFunction:t.animation.linearCurve,backgroundSize:`300% auto`,backgroundRepeat:`no-repeat`,backgroundPositionX:r?`-50%`:`150%`,backgroundImage:`linear-gradient(${r?`90`:`270`}deg, transparent 0%, ${o.accent} 25%, ${o.accent} 75%, transparent 100%)`,animationName:r?{"0%":{backgroundPositionX:`-50%`},"33%":{backgroundPositionX:`50%`},"66%":{backgroundPositionX:`50%`},"100%":{backgroundPositionX:`150%`}}:{"0%":{backgroundPositionX:`150%`},"33%":{backgroundPositionX:`50%`},"66%":{backgroundPositionX:`50%`},"100%":{backgroundPositionX:`-50%`}}};return m(m({},r?{borderTopLeftRadius:c,borderBottomLeftRadius:c}:{borderTopRightRadius:c,borderBottomRightRadius:c}),{},{height:l},d)});x.displayName=`StyledInfiniteBar`,x.displayName=`StyledInfiniteBar`;var S=a(`div`,function(e){return m(m({textAlign:`center`},e.$theme.typography.font150),{},{color:e.$theme.colors.contentTertiary})});S.displayName=`StyledLabel`,S.displayName=`StyledLabel`;var C=(d={},h(d,u.large,{d:`M47.5 4H71.5529C82.2933 4 91 12.9543 91 24C91 35.0457 82.2933 44 71.5529 44H23.4471C12.7067 44 4 35.0457 4 24C4 12.9543 12.7067 4 23.4471 4H47.5195`,width:95,height:48,strokeWidth:8,typography:`LabelLarge`}),h(d,u.medium,{d:`M39 2H60.5833C69.0977 2 76 9.16344 76 18C76 26.8366 69.0977 34 60.5833 34H17.4167C8.90228 34 2 26.8366 2 18C2 9.16344 8.90228 2 17.4167 2H39.0195`,width:78,height:36,strokeWidth:4,typography:`LabelMedium`}),h(d,u.small,{d:`M32 1H51.6271C57.9082 1 63 6.37258 63 13C63 19.6274 57.9082 25 51.6271 25H12.3729C6.09181 25 1 19.6274 1 13C1 6.37258 6.09181 1 12.3729 1H32.0195`,width:64,height:26,strokeWidth:2,typography:`LabelSmall`}),d),w=a(`div`,function(e){var t=e.$size,n=e.$inline;return{width:C[t].width+`px`,height:C[t].height+`px`,position:`relative`,display:n?`inline-flex`:`flex`,alignItems:`center`,justifyContent:`center`}});w.displayName=`StyledProgressBarRoundedRoot`,w.displayName=`StyledProgressBarRoundedRoot`;var T=a(`svg`,function(e){var t=e.$size;return{width:C[t].width+`px`,height:C[t].height+`px`,position:`absolute`,fill:`none`}});T.displayName=`_StyledProgressBarRoundedSvg`,T.displayName=`_StyledProgressBarRoundedSvg`,r(T,function(e){return function(t){return l.createElement(e,f({viewBox:`0 0 ${C[t.$size].width} ${C[t.$size].height}`,xmlns:`http://www.w3.org/2000/svg`},t))}});var E=a(`path`,function(e){var t=e.$theme,n=e.$size;return{stroke:t.colors.backgroundTertiary,strokeWidth:C[n].strokeWidth+`px`}});E.displayName=`_StyledProgressBarRoundedTrackBackground`,E.displayName=`_StyledProgressBarRoundedTrackBackground`,r(E,function(e){return function(t){return l.createElement(e,f({d:C[t.$size].d},t))}});var D=a(`path`,function(e){var t=e.$theme,n=e.$size,r=e.$visible,i=e.$pathLength,a=e.$pathProgress;return{visibility:r?`visible`:`hidden`,stroke:t.colors.borderAccent,strokeWidth:C[n].strokeWidth+`px`,strokeDasharray:i,strokeDashoffset:i*(1-a)+``}});D.displayName=`_StyledProgressBarRoundedTrackForeground`,D.displayName=`_StyledProgressBarRoundedTrackForeground`,r(D,function(e){return function(t){return l.createElement(e,f({d:C[t.$size].d},t))}});var O=a(`div`,function(e){var t=e.$theme,n=e.$size;return m({color:t.colors.contentPrimary},t.typography[C[n].typography])});O.displayName=`StyledProgressBarRoundedText`,O.displayName=`StyledProgressBarRoundedText`;function k(e){"@babel/helpers - typeof";return k=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},k(e)}var A=[`overrides`,`getProgressLabel`,`value`,`size`,`steps`,`successValue`,`minValue`,`maxValue`,`showLabel`,`infinite`,`errorMessage`,`forwardedRef`];function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function M(e,t){return L(e)||I(e,t)||P(e,t)||N()}function N(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{$n as e,$r as t,Ha as n,La as r,Wa as i,Zi as a,fa as o,sr as s,ui as c}from"./index-lR-QVdnh.js";var l=i(n(),1),u={small:`small`,medium:`medium`,large:`large`},d;function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?p(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t;return(t={},h(t,u.small,`2px`),h(t,u.medium,`4px`),h(t,u.large,`8px`),t)[e]}var _=a(`div`,function(e){return{width:`100%`}});_.displayName=`StyledRoot`,_.displayName=`StyledRoot`;var v=a(`div`,function(e){var t=e.$theme.sizing;return{display:`flex`,marginLeft:t.scale500,marginRight:t.scale500,marginTop:t.scale500,marginBottom:t.scale500}});v.displayName=`StyledBarContainer`,v.displayName=`StyledBarContainer`;var y=a(`div`,function(e){var t=e.$theme,n=e.$size,r=e.$steps,i=t.colors,a=t.sizing,o=t.borders.useRoundedCorners?a.scale0:0;return m({borderTopLeftRadius:o,borderTopRightRadius:o,borderBottomRightRadius:o,borderBottomLeftRadius:o,backgroundColor:s(i.progressbarTrackFill,`0.16`),height:g(n),flex:1,overflow:`hidden`},r<2?{}:{marginLeft:a.scale300,":first-child":{marginLeft:`0`}})});y.displayName=`StyledBar`,y.displayName=`StyledBar`;var b=a(`div`,function(e){var t=e.$theme,n=e.$value,r=e.$successValue,i=e.$steps,a=e.$index,o=e.$maxValue,s=e.$minValue,c=s===void 0?0:s,l=o||r,u=t.colors,d=t.sizing,f=t.borders,p=`${100-(n-c)*100/(l-c)}%`,h={default:`default`,awaits:`awaits`,inProgress:`inProgress`,completed:`completed`},g=h.default;if(i>1){var _=(l-c)/i,v=(n-c)/(l-c)*100,y=Math.floor(v/_);g=a<y?h.completed:a===y?h.inProgress:h.awaits}var b=f.useRoundedCorners?d.scale0:0,x={transform:`translateX(-${p})`},S=g===h.inProgress?{animationDuration:`2.1s`,animationIterationCount:`infinite`,animationTimingFunction:t.animation.linearCurve,animationName:{"0%":{transform:`translateX(-102%)`,opacity:1},"50%":{transform:`translateX(0%)`,opacity:1},"100%":{transform:`translateX(0%)`,opacity:0}}}:g===h.completed?{transform:`translateX(0%)`}:{transform:`translateX(-102%)`};return m({borderTopLeftRadius:b,borderTopRightRadius:b,borderBottomRightRadius:b,borderBottomLeftRadius:b,backgroundColor:u.accent,height:`100%`,width:`100%`,transform:`translateX(-102%)`,transition:`transform 0.5s`},i>1?S:x)});b.displayName=`StyledBarProgress`,b.displayName=`StyledBarProgress`;var x=a(`div`,function(e){var t=e.$theme,n=e.$isLeft,r=n===void 0?!1:n,i=e.$size,a=i===void 0?u.medium:i,o=t.colors,s=t.sizing,c=t.borders.useRoundedCorners?s.scale0:0,l=g(a),d={display:`inline-block`,flex:1,marginLeft:`auto`,marginRight:`auto`,transitionProperty:`background-position`,animationDuration:`1.5s`,animationIterationCount:`infinite`,animationTimingFunction:t.animation.linearCurve,backgroundSize:`300% auto`,backgroundRepeat:`no-repeat`,backgroundPositionX:r?`-50%`:`150%`,backgroundImage:`linear-gradient(${r?`90`:`270`}deg, transparent 0%, ${o.accent} 25%, ${o.accent} 75%, transparent 100%)`,animationName:r?{"0%":{backgroundPositionX:`-50%`},"33%":{backgroundPositionX:`50%`},"66%":{backgroundPositionX:`50%`},"100%":{backgroundPositionX:`150%`}}:{"0%":{backgroundPositionX:`150%`},"33%":{backgroundPositionX:`50%`},"66%":{backgroundPositionX:`50%`},"100%":{backgroundPositionX:`-50%`}}};return m(m({},r?{borderTopLeftRadius:c,borderBottomLeftRadius:c}:{borderTopRightRadius:c,borderBottomRightRadius:c}),{},{height:l},d)});x.displayName=`StyledInfiniteBar`,x.displayName=`StyledInfiniteBar`;var S=a(`div`,function(e){return m(m({textAlign:`center`},e.$theme.typography.font150),{},{color:e.$theme.colors.contentTertiary})});S.displayName=`StyledLabel`,S.displayName=`StyledLabel`;var C=(d={},h(d,u.large,{d:`M47.5 4H71.5529C82.2933 4 91 12.9543 91 24C91 35.0457 82.2933 44 71.5529 44H23.4471C12.7067 44 4 35.0457 4 24C4 12.9543 12.7067 4 23.4471 4H47.5195`,width:95,height:48,strokeWidth:8,typography:`LabelLarge`}),h(d,u.medium,{d:`M39 2H60.5833C69.0977 2 76 9.16344 76 18C76 26.8366 69.0977 34 60.5833 34H17.4167C8.90228 34 2 26.8366 2 18C2 9.16344 8.90228 2 17.4167 2H39.0195`,width:78,height:36,strokeWidth:4,typography:`LabelMedium`}),h(d,u.small,{d:`M32 1H51.6271C57.9082 1 63 6.37258 63 13C63 19.6274 57.9082 25 51.6271 25H12.3729C6.09181 25 1 19.6274 1 13C1 6.37258 6.09181 1 12.3729 1H32.0195`,width:64,height:26,strokeWidth:2,typography:`LabelSmall`}),d),w=a(`div`,function(e){var t=e.$size,n=e.$inline;return{width:C[t].width+`px`,height:C[t].height+`px`,position:`relative`,display:n?`inline-flex`:`flex`,alignItems:`center`,justifyContent:`center`}});w.displayName=`StyledProgressBarRoundedRoot`,w.displayName=`StyledProgressBarRoundedRoot`;var T=a(`svg`,function(e){var t=e.$size;return{width:C[t].width+`px`,height:C[t].height+`px`,position:`absolute`,fill:`none`}});T.displayName=`_StyledProgressBarRoundedSvg`,T.displayName=`_StyledProgressBarRoundedSvg`,r(T,function(e){return function(t){return l.createElement(e,f({viewBox:`0 0 ${C[t.$size].width} ${C[t.$size].height}`,xmlns:`http://www.w3.org/2000/svg`},t))}});var E=a(`path`,function(e){var t=e.$theme,n=e.$size;return{stroke:t.colors.backgroundTertiary,strokeWidth:C[n].strokeWidth+`px`}});E.displayName=`_StyledProgressBarRoundedTrackBackground`,E.displayName=`_StyledProgressBarRoundedTrackBackground`,r(E,function(e){return function(t){return l.createElement(e,f({d:C[t.$size].d},t))}});var D=a(`path`,function(e){var t=e.$theme,n=e.$size,r=e.$visible,i=e.$pathLength,a=e.$pathProgress;return{visibility:r?`visible`:`hidden`,stroke:t.colors.borderAccent,strokeWidth:C[n].strokeWidth+`px`,strokeDasharray:i,strokeDashoffset:i*(1-a)+``}});D.displayName=`_StyledProgressBarRoundedTrackForeground`,D.displayName=`_StyledProgressBarRoundedTrackForeground`,r(D,function(e){return function(t){return l.createElement(e,f({d:C[t.$size].d},t))}});var O=a(`div`,function(e){var t=e.$theme,n=e.$size;return m({color:t.colors.contentPrimary},t.typography[C[n].typography])});O.displayName=`StyledProgressBarRoundedText`,O.displayName=`StyledProgressBarRoundedText`;function k(e){"@babel/helpers - typeof";return k=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},k(e)}var A=[`overrides`,`getProgressLabel`,`value`,`size`,`steps`,`successValue`,`minValue`,`maxValue`,`showLabel`,`infinite`,`errorMessage`,`forwardedRef`];function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function M(e,t){return L(e)||I(e,t)||P(e,t)||N()}function N(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P(e,t){if(e){if(typeof e==`string`)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(e,t)}}function F(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function L(e){if(Array.isArray(e))return e}function R(e,t){if(e==null)return{};var n=z(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function z(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function B(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function V(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function H(e,t,n){return t&&V(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function U(e,t){if(typeof t!=`function`&&t!==null)throw 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&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function G(e){var t=J();return function(){var n=Y(e),r;if(t){var i=Y(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return K(this,r)}}function K(e,t){if(t&&(k(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return q(e)}function q(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function J(){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 Y(e){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Y(e)}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Z=function(t){U(r,t);var n=G(r);function r(){return B(this,r),n.apply(this,arguments)}return H(r,[{key:`componentDidMount`,value:function(){}},{key:`render`,value:function(){var t=this.props,n=t.overrides,r=n===void 0?{}:n,i=t.getProgressLabel,a=t.value,o=t.size,s=t.steps,c=t.successValue,u=t.minValue,d=t.maxValue,f=t.showLabel,p=t.infinite,m=t.errorMessage,h=t.forwardedRef,g=R(t,A),C=this.props[`aria-label`]||this.props.ariaLabel,w=d===100?c:d,T=M(e(r.Root,_),2),E=T[0],D=T[1],O=M(e(r.BarContainer,v),2),k=O[0],N=O[1],P=M(e(r.Bar,y),2),F=P[0],I=P[1],L=M(e(r.BarProgress,b),2),z=L[0],B=L[1],V=M(e(r.Label,S),2),H=V[0],U=V[1],W=M(e(r.InfiniteBar,x),2),G=W[0],K=W[1],q={$infinite:p,$size:o,$steps:s,$successValue:w,$minValue:u,$maxValue:w,$value:a};function J(){for(var e=[],t=0;t<s;t++)e.push(l.createElement(F,j({key:t},q,I),l.createElement(z,j({$index:t},q,B))));return e}return l.createElement(E,j({ref:h,"data-baseweb":`progress-bar`,role:`progressbar`,"aria-label":C||i(a,w,u),"aria-valuenow":p?null:a,"aria-valuemin":p?null:u,"aria-valuemax":p?null:w,"aria-invalid":m?!0:null,"aria-errormessage":m},g,q,D),l.createElement(k,j({},q,N),p?l.createElement(l.Fragment,null,l.createElement(G,j({$isLeft:!0,$size:q.$size},K)),l.createElement(G,j({$size:q.$size},K))):J()),f&&l.createElement(H,j({},q,U),i(a,w,u)))}}]),r}(l.Component);X(Z,`defaultProps`,{getProgressLabel:function(e,t,n){return`${Math.round((e-n)/(t-n)*100)}% Loaded`},infinite:!1,overrides:{},showLabel:!1,size:u.medium,steps:1,successValue:100,minValue:0,maxValue:100,value:0});var Q=l.forwardRef(function(e,t){return l.createElement(Z,j({forwardedRef:t},e))});Q.displayName=`ProgressBar`;var $=(e=>(e.EXTRASMALL=`xs`,e.SMALL=`sm`,e))($||{});function ee({value:e,size:n=`sm`,overrides:r}){let i=o(),a={xs:i.spacing.twoXS,sm:i.spacing.sm,md:i.spacing.lg,lg:i.spacing.xl,xl:i.spacing.twoXL},s={BarContainer:{style:{marginTop:i.spacing.none,marginBottom:i.spacing.none,marginRight:i.spacing.none,marginLeft:i.spacing.none}},Bar:{style:({$theme:e})=>({marginTop:i.spacing.none,marginBottom:i.spacing.none,marginRight:i.spacing.none,marginLeft:i.spacing.none,height:a[n],backgroundColor:e.colors.progressbarTrackFill,borderTopLeftRadius:i.spacing.twoXS,borderTopRightRadius:i.spacing.twoXS,borderBottomLeftRadius:i.spacing.twoXS,borderBottomRightRadius:i.spacing.twoXS})},BarProgress:{style:()=>({backgroundColor:i.colors.secondary,borderTopLeftRadius:i.spacing.twoXS,borderTopRightRadius:i.spacing.twoXS,borderBottomLeftRadius:i.spacing.twoXS,borderBottomRightRadius:i.spacing.twoXS})}};return t.jsx(Q,{value:e,overrides:c(s,r)})}export{ee as n,$ as t};
@@ -1,3 +1,3 @@
1
- import{$n as e,$r as t,Ha as n,J as r,Jt as i,Sn as a,Vr as o,Wa as s,Zi as c,fa as l,kr as u,ni as d,ut as f}from"./index-B4fa-n2i.js";import{t as p}from"./WidgetLabel-UxhCOQGD-Outa0e9S.js";import{t as m}from"./WidgetLabelHelpIconInline-DpAdsUdv-BJmzytr_.js";import{n as h}from"./useBasicWidgetState-BMBMOmTg-D4BUrDbU.js";var g=s(n(),1),_={vertical:`vertical`,horizontal:`horizontal`};function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?v(Object(n),!0).forEach(function(t){b(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=0,S=1,C=2;function w(e){return e.$isActive?C:e.$isHovered?S:x}function T(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,i=e.$isFocusVisible,a=e.$error;if(n)return t.tickFillDisabled;if(r)if(a)switch(w(e)){case x:return t.tickFillErrorSelected;case S:return t.tickFillErrorSelectedHover;case C:return t.tickFillErrorSelectedHoverActive}else switch(w(e)){case x:return t.tickFillSelected;case S:return t.tickFillSelectedHover;case C:return t.tickFillSelectedHoverActive}else return i?t.borderSelected:a?t.tickBorderError:t.tickBorder;return null}function E(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(w(e)){case x:return t.tickFillError;case S:return t.tickFillErrorHover;case C:return t.tickFillErrorHoverActive}else switch(w(e)){case x:return t.tickFill;case S:return t.tickFillHover;case C:return t.tickFillActive}}function D(e){var t=e.$labelPlacement,n=t===void 0?``:t,r=e.$theme,i;switch(n){case`top`:i=`Bottom`;break;case`bottom`:i=`Top`;break;case`left`:i=r.direction===`rtl`?`Left`:`Right`;break;default:case`right`:i=r.direction===`rtl`?`Right`:`Left`;break}var a=r.sizing.scale300;return b({},`padding${i}`,a)}function ee(e){var t=e.$disabled,n=e.$theme.colors;return t?n.contentSecondary:n.contentPrimary}var O=c(`div`,function(e){var t=e.$disabled,n=e.$align;return{display:`flex`,flexWrap:`wrap`,flexDirection:n===`horizontal`?`row`:`column`,alignItems:n===`horizontal`?`center`:`flex-start`,cursor:t?`not-allowed`:`pointer`,"-webkit-tap-highlight-color":`transparent`}});O.displayName=`RadioGroupRoot`,O.displayName=`RadioGroupRoot`;var k=c(`label`,function(e){var t,n=e.$disabled,r=e.$hasDescription,i=e.$labelPlacement,a=e.$theme,o=e.$align,s=a.sizing,c=o===`horizontal`,l=a.direction===`rtl`?`Left`:`Right`;return t={flexDirection:i===`top`||i===`bottom`?`column`:`row`,display:`flex`,alignItems:`center`,cursor:n?`not-allowed`:`pointer`,marginTop:s.scale200},b(t,`margin${l}`,c?s.scale200:null),b(t,`marginBottom`,r&&!c?null:s.scale200),t});k.displayName=`Root`,k.displayName=`Root`;var A=c(`div`,function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:E(e),borderTopLeftRadius:`50%`,borderTopRightRadius:`50%`,borderBottomRightRadius:`50%`,borderBottomLeftRadius:`50%`,height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});A.displayName=`RadioMarkInner`,A.displayName=`RadioMarkInner`;var j=c(`div`,function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:`center`,backgroundColor:T(e),borderTopLeftRadius:`50%`,borderTopRightRadius:`50%`,borderBottomRightRadius:`50%`,borderBottomLeftRadius:`50%`,boxShadow:e.$isFocusVisible&&e.$checked?`0 0 0 3px ${e.$theme.colors.accent}`:`none`,display:`flex`,height:r.scale700,justifyContent:`center`,marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:`none`,verticalAlign:`middle`,width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});j.displayName=`RadioMarkOuter`,j.displayName=`RadioMarkOuter`;var M=c(`div`,function(e){var t=e.$theme.typography;return y(y({verticalAlign:`middle`},D(e)),{},{color:ee(e)},t.LabelMedium)});M.displayName=`Label`,M.displayName=`Label`;var N=c(`input`,{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:`rect(0 0 0 0)`,position:`absolute`});N.displayName=`Input`,N.displayName=`Input`;var P=c(`div`,function(e){var t,n=e.$theme,r=e.$align,i=r===`horizontal`,a=n.direction===`rtl`?`Right`:`Left`,o=n.direction===`rtl`?`Left`:`Right`;return y(y({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:`auto`},b(t,`margin${a}`,r===`horizontal`?null:n.sizing.scale900),b(t,`margin${o}`,i?n.sizing.scale200:null),b(t,`maxWidth`,`240px`),t))});P.displayName=`Description`,P.displayName=`Description`;function F(e){"@babel/helpers - typeof";return F=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},F(e)}function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I.apply(this,arguments)}function te(e,t){return ie(e)||R(e,t)||re(e,t)||ne()}function ne(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{$n as e,$r as t,Ha as n,J as r,Jt as i,Sn as a,Vr as o,Wa as s,Zi as c,fa as l,kr as u,ni as d,ut as f}from"./index-lR-QVdnh.js";import{t as p}from"./WidgetLabel-CQfHGtry-H2bBW1_F.js";import{t as m}from"./WidgetLabelHelpIconInline-BTmzKeRa-Duj2btUF.js";import{n as h}from"./useBasicWidgetState-D3zHnRUK-J72gaU7U.js";var g=s(n(),1),_={vertical:`vertical`,horizontal:`horizontal`};function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?v(Object(n),!0).forEach(function(t){b(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=0,S=1,C=2;function w(e){return e.$isActive?C:e.$isHovered?S:x}function T(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,i=e.$isFocusVisible,a=e.$error;if(n)return t.tickFillDisabled;if(r)if(a)switch(w(e)){case x:return t.tickFillErrorSelected;case S:return t.tickFillErrorSelectedHover;case C:return t.tickFillErrorSelectedHoverActive}else switch(w(e)){case x:return t.tickFillSelected;case S:return t.tickFillSelectedHover;case C:return t.tickFillSelectedHoverActive}else return i?t.borderSelected:a?t.tickBorderError:t.tickBorder;return null}function E(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(w(e)){case x:return t.tickFillError;case S:return t.tickFillErrorHover;case C:return t.tickFillErrorHoverActive}else switch(w(e)){case x:return t.tickFill;case S:return t.tickFillHover;case C:return t.tickFillActive}}function D(e){var t=e.$labelPlacement,n=t===void 0?``:t,r=e.$theme,i;switch(n){case`top`:i=`Bottom`;break;case`bottom`:i=`Top`;break;case`left`:i=r.direction===`rtl`?`Left`:`Right`;break;default:case`right`:i=r.direction===`rtl`?`Right`:`Left`;break}var a=r.sizing.scale300;return b({},`padding${i}`,a)}function ee(e){var t=e.$disabled,n=e.$theme.colors;return t?n.contentSecondary:n.contentPrimary}var O=c(`div`,function(e){var t=e.$disabled,n=e.$align;return{display:`flex`,flexWrap:`wrap`,flexDirection:n===`horizontal`?`row`:`column`,alignItems:n===`horizontal`?`center`:`flex-start`,cursor:t?`not-allowed`:`pointer`,"-webkit-tap-highlight-color":`transparent`}});O.displayName=`RadioGroupRoot`,O.displayName=`RadioGroupRoot`;var k=c(`label`,function(e){var t,n=e.$disabled,r=e.$hasDescription,i=e.$labelPlacement,a=e.$theme,o=e.$align,s=a.sizing,c=o===`horizontal`,l=a.direction===`rtl`?`Left`:`Right`;return t={flexDirection:i===`top`||i===`bottom`?`column`:`row`,display:`flex`,alignItems:`center`,cursor:n?`not-allowed`:`pointer`,marginTop:s.scale200},b(t,`margin${l}`,c?s.scale200:null),b(t,`marginBottom`,r&&!c?null:s.scale200),t});k.displayName=`Root`,k.displayName=`Root`;var A=c(`div`,function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:E(e),borderTopLeftRadius:`50%`,borderTopRightRadius:`50%`,borderBottomRightRadius:`50%`,borderBottomLeftRadius:`50%`,height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});A.displayName=`RadioMarkInner`,A.displayName=`RadioMarkInner`;var j=c(`div`,function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:`center`,backgroundColor:T(e),borderTopLeftRadius:`50%`,borderTopRightRadius:`50%`,borderBottomRightRadius:`50%`,borderBottomLeftRadius:`50%`,boxShadow:e.$isFocusVisible&&e.$checked?`0 0 0 3px ${e.$theme.colors.accent}`:`none`,display:`flex`,height:r.scale700,justifyContent:`center`,marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:`none`,verticalAlign:`middle`,width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});j.displayName=`RadioMarkOuter`,j.displayName=`RadioMarkOuter`;var M=c(`div`,function(e){var t=e.$theme.typography;return y(y({verticalAlign:`middle`},D(e)),{},{color:ee(e)},t.LabelMedium)});M.displayName=`Label`,M.displayName=`Label`;var N=c(`input`,{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:`rect(0 0 0 0)`,position:`absolute`});N.displayName=`Input`,N.displayName=`Input`;var P=c(`div`,function(e){var t,n=e.$theme,r=e.$align,i=r===`horizontal`,a=n.direction===`rtl`?`Right`:`Left`,o=n.direction===`rtl`?`Left`:`Right`;return y(y({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:`auto`},b(t,`margin${a}`,r===`horizontal`?null:n.sizing.scale900),b(t,`margin${o}`,i?n.sizing.scale200:null),b(t,`maxWidth`,`240px`),t))});P.displayName=`Description`,P.displayName=`Description`;function F(e){"@babel/helpers - typeof";return F=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},F(e)}function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I.apply(this,arguments)}function te(e,t){return ie(e)||R(e,t)||re(e,t)||ne()}function ne(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(e,t){if(e){if(typeof e==`string`)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}}function L(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function ie(e){if(Array.isArray(e))return e}function ae(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function se(e,t,n){return t&&oe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ce(e,t){if(typeof t!=`function`&&t!==null)throw 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&&z(e,t)}function z(e,t){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},z(e,t)}function le(e){var t=de();return function(){var n=V(e),r;if(t){var i=V(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ue(this,r)}}function ue(e,t){if(t&&(F(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return B(e)}function B(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function de(){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 V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var U=function(t){ce(r,t);var n=le(r);function r(){var e;ae(this,r);var t=[...arguments];return e=n.call.apply(n,[this].concat(t)),H(B(e),`state`,{isFocusVisible:!1,focusedRadioIndex:-1}),H(B(e),`handleFocus`,function(t,n){u(t)&&e.setState({isFocusVisible:!0}),e.setState({focusedRadioIndex:n}),e.props.onFocus&&e.props.onFocus(t)}),H(B(e),`handleBlur`,function(t,n){e.state.isFocusVisible!==!1&&e.setState({isFocusVisible:!1}),e.setState({focusedRadioIndex:-1}),e.props.onBlur&&e.props.onBlur(t)}),e}return se(r,[{key:`render`,value:function(){var t=this,n=this.props.overrides,r=te(e((n===void 0?{}:n).RadioGroupRoot,O),2),i=r[0],a=r[1];return g.createElement(i,I({id:this.props.id,role:`radiogroup`,"aria-describedby":this.props[`aria-describedby`],"aria-errormessage":this.props[`aria-errormessage`],"aria-invalid":this.props.error||null,"aria-label":this.props[`aria-label`],"aria-labelledby":this.props[`aria-labelledby`],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},a),g.Children.map(this.props.children,function(e,n){if(!g.isValidElement(e))return null;var r=t.props.value===e.props.value;return g.cloneElement(e,{align:t.props.align,autoFocus:t.props.autoFocus,checked:r,disabled:t.props.disabled||e.props.disabled,error:t.props.error,isFocused:t.state.focusedRadioIndex===n,isFocusVisible:t.state.isFocusVisible,tabIndex:n===0&&!t.props.value||r?`0`:`-1`,labelPlacement:t.props.labelPlacement,name:t.props.name,onBlur:function(e){return t.handleBlur(e,n)},onFocus:function(e){return t.handleFocus(e,n)},onChange:t.props.onChange,onMouseEnter:t.props.onMouseEnter,onMouseLeave:t.props.onMouseLeave})}))}}]),r}(g.Component);H(U,`defaultProps`,{name:``,value:``,disabled:!1,autoFocus:!1,labelPlacement:`right`,align:`vertical`,error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function W(e){"@babel/helpers - typeof";return W=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},W(e)}function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G.apply(this,arguments)}function K(e,t){return he(e)||me(e,t)||pe(e,t)||fe()}function fe(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pe(e,t){if(e){if(typeof e==`string`)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return q(e,t)}}function q(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function me(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function he(e){if(Array.isArray(e))return e}function ge(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t,n){return t&&_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ye(e,t){if(typeof t!=`function`&&t!==null)throw 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&&J(e,t)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}function be(e){var t=Se();return function(){var n=X(e),r;if(t){var i=X(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xe(this,r)}}function xe(e,t){if(t&&(W(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Y(e)}function Y(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Se(){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 X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(e){return e===`top`||e===`left`}function we(e){return e===`bottom`||e===`right`}var Te=function(e){return e.stopPropagation()},Q=function(t){ye(r,t);var n=be(r);function r(){var e;ge(this,r);var t=[...arguments];return e=n.call.apply(n,[this].concat(t)),Z(Y(e),`state`,{isActive:!1,isHovered:!1}),Z(Y(e),`onMouseEnter`,function(t){e.setState({isHovered:!0}),e.props.onMouseEnter&&e.props.onMouseEnter(t)}),Z(Y(e),`onMouseLeave`,function(t){e.setState({isHovered:!1}),e.props.onMouseLeave&&e.props.onMouseLeave(t)}),Z(Y(e),`onMouseDown`,function(t){e.setState({isActive:!0}),e.props.onMouseDown&&e.props.onMouseDown(t)}),Z(Y(e),`onMouseUp`,function(t){e.setState({isActive:!1}),e.props.onMouseUp&&e.props.onMouseUp(t)}),e}return ve(r,[{key:`componentDidMount`,value:function(){var e;this.props.autoFocus&&(e=this.props.inputRef)!=null&&e.current&&this.props.inputRef.current.focus()}},{key:`render`,value:function(){var t=this.props.overrides,n=t===void 0?{}:t,r=K(e(n.Root,k),2),i=r[0],a=r[1],o=K(e(n.Label,M),2),s=o[0],c=o[1],l=K(e(n.Input,N),2),u=l[0],d=l[1],f=K(e(n.Description,P),2),p=f[0],m=f[1],h=K(e(n.RadioMarkInner,A),2),_=h[0],v=h[1],y=K(e(n.RadioMarkOuter,j),2),b=y[0],x=y[1],S={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},C=g.createElement(s,G({},S,c),this.props.containsInteractiveElement?g.createElement(`div`,{onClick:function(e){return e.preventDefault()}},this.props.children):this.props.children);return g.createElement(g.Fragment,null,g.createElement(i,G({"data-baseweb":`radio`,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},S,a),Ce(this.props.labelPlacement)&&C,g.createElement(b,G({},S,x),g.createElement(_,G({},S,v))),g.createElement(u,G({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:Te,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:`radio`,value:this.props.value},S,d)),we(this.props.labelPlacement)&&C),!!this.props.description&&g.createElement(p,G({},S,m),this.props.description))}}]),r}(g.Component);Z(Q,`defaultProps`,{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:g.createRef(),align:`vertical`,error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function Ee(e){let t=parseFloat(e.sizes.checkbox),n=parseFloat(e.spacing.threeXS),r=a(t.toString()),o=Math.round(r*.375),s=Math.round(a((t-n).toString()));return s>=r&&--s,[i(o,`px`),i(s,`px`)]}function De({disabled:e,horizontal:n,value:i,onChange:a,options:o,captions:s,label:c,labelVisibility:u,help:d}){let[h,v]=(0,g.useState)(i??null);(0,g.useEffect)(()=>{i!==h&&v(i??null)},[i]);let y=(0,g.useCallback)(e=>{let t=parseInt(e.target.value,10);v(t),a(t)},[a]),b=l(),x=s.length>0,S=o.length>0,C=S?o:[`No options to select.`],w=e||!S,T=e=>e==``&&n&&x?`&nbsp;`:e,[E,D]=Ee(b);return t.jsxs(`div`,{className:`stRadio`,"data-testid":`stRadio`,children:[t.jsx(p,{label:c,disabled:w,labelVisibility:u,children:d&&t.jsx(m,{content:d,placement:r.TOP_RIGHT,label:c})}),t.jsx(U,{onChange:y,value:h===null?void 0:h.toString(),disabled:w,align:n?_.horizontal:_.vertical,"aria-label":c,"data-testid":`stRadioGroup`,overrides:{RadioGroupRoot:{style:{gap:x?b.spacing.sm:b.spacing.none,minHeight:b.sizes.minElementHeight}}},children:C.map((e,n)=>t.jsxs(Q,{value:n.toString(),overrides:{Root:{style:({$isFocusVisible:e})=>({marginBottom:b.spacing.none,marginTop:b.spacing.none,marginRight:x?b.spacing.sm:b.spacing.lg,paddingLeft:b.spacing.none,alignItems:`start`,paddingRight:b.spacing.threeXS,backgroundColor:e?b.colors.darkenedBgMix25:``})},RadioMarkOuter:{style:({$checked:e})=>({width:b.sizes.checkbox,height:b.sizes.checkbox,marginTop:`0.35rem`,marginRight:b.spacing.none,marginLeft:b.spacing.none,backgroundColor:e&&!w?b.colors.primary:b.colors.borderColor})},RadioMarkInner:{style:({$checked:e})=>({height:e?E:D,width:e?E:D})},Label:{style:{color:w?b.colors.fadedText40:b.colors.bodyText,position:`relative`,top:b.spacing.px}}},children:[t.jsx(f,{source:e,allowHTML:!1,isLabel:!0,largerLabel:!0}),x&&t.jsx(f,{source:T(s[n]),allowHTML:!1,isCaption:!0,isLabel:!0})]},n))})]})}var $=(0,g.memo)(De);function Oe({disabled:e,element:n,widgetMgr:r,fragmentId:i}){let[a,s]=h({getStateFromWidgetMgr:ke,getDefaultStateFromProto:Ae,getCurrStateFromProto:je,updateWidgetMgrState:Me,element:n,widgetMgr:r,fragmentId:i,formClearBehavior:`resetValueOnly`,queryParamBinding:n.queryParamKey?{paramKey:n.queryParamKey,valueType:`string_value`,clearable:o(n.default)}:void 0}),{horizontal:c,options:l,captions:u,label:f,labelVisibility:p,help:m}=n,_=(0,g.useCallback)(e=>{s({value:l[e]??null,fromUi:!0})},[s,l]),v=(0,g.useMemo)(()=>{if(a===null)return null;let e=l.lastIndexOf(a);return e>=0?e:null},[a,l]);return t.jsx($,{label:f,onChange:_,options:l,captions:u,disabled:e,horizontal:c,labelVisibility:d(p?.value),value:v,help:m})}function ke(e,t){return e.getStringValue(t)}function Ae(e){return e.options.length===0||o(e.default)?null:e.options[e.default]}function je(e){return e.rawValue??null}function Me(e,t,n,r){t.setStringValue(e,n.value,{fromUi:n.fromUi},r)}var Ne=(0,g.memo)(Oe);export{Ne as default};
@@ -1 +1 @@
1
- import{$r as e,Ha as t,P as n,Sn as r,Vn as i,Vr as a,Wa as o,er as s,fa as c,ni as l,pa as u}from"./index-B4fa-n2i.js";import{t as d}from"./WidgetLabel-UxhCOQGD-Outa0e9S.js";import{t as f}from"./WidgetLabelHelpIcon-B9x-Yn7N-DaZaIL2I.js";import{n as p}from"./useBasicWidgetState-BMBMOmTg-D4BUrDbU.js";import{i as m,r as h}from"./select-zCQ7w46r-igC065UB.js";import{r as g,t as _}from"./useSelectCommon-CTMZGTGc-Ce0_Hd3P.js";var v=o(t(),1),y=(0,v.memo)(({disabled:t,value:a,onChange:o,options:l,label:p,labelVisibility:y,help:b,placeholder:x,clearable:S,acceptNewOptions:C,filterMode:w})=>{let T=c(),E=(0,v.useContext)(n),[D,O]=(0,v.useState)(a),k=(0,v.useRef)(D);u(()=>{O(a),k.current=null},[a]);let A=(0,v.useCallback)(e=>{if(e.type===`remove`){k.current=e.option?.value,O(null);return}if(k.current=null,e.type===`clear`){O(null),o(null);return}let[t]=e.value;O(t.value),o(t.value)},[o]),j=(0,v.useCallback)(()=>{k.current!==null&&O(k.current)},[]),{placeholder:M,disabled:N,selectOptions:P,inputReadOnly:F,valueToUiSingle:I,createFilterOptions:L}=_({options:l,isMulti:!1,acceptNewOptions:C,filterMode:w,placeholderInput:x}),R=t||N,z=(0,v.useMemo)(()=>L(),[L]),B=I(D);return e.jsxs(`div`,{className:`stSelectbox`,"data-testid":`stSelectbox`,children:[e.jsx(d,{label:p,labelVisibility:y,disabled:R,children:b&&e.jsx(f,{content:b,label:p})}),e.jsx(h,{creatable:C,disabled:R,labelKey:`label`,"aria-label":p||``,onChange:A,onBlur:j,options:P,filterOptions:z,clearable:S||!1,escapeClearsValue:S||!1,value:B,valueKey:`value`,placeholder:M,ignoreCase:!1,overrides:{Root:{style:()=>({lineHeight:T.lineHeights.inputWidget,fontWeight:T.fontWeights.normal})},Dropdown:{component:g,style:{boxShadow:`none`,overflow:`hidden`}},ClearIcon:{props:{overrides:{Svg:{style:{color:T.colors.grayTextColor,padding:T.spacing.threeXS,height:T.sizes.clearIconSize,width:T.sizes.clearIconSize,":hover":{fill:T.colors.bodyText}}}}}},ControlContainer:{style:({$isFocused:e})=>{let t=i(T.colors,e);return{height:T.sizes.minElementHeight,borderLeftWidth:T.sizes.borderWidth,borderRightWidth:T.sizes.borderWidth,borderTopWidth:T.sizes.borderWidth,borderBottomWidth:T.sizes.borderWidth,borderTopColor:t,borderRightColor:t,borderBottomColor:t,borderLeftColor:t}}},IconsContainer:{style:()=>({paddingRight:T.spacing.sm})},ValueContainer:{style:()=>({flexGrow:1,paddingRight:T.spacing.sm,paddingLeft:T.spacing.sm,paddingBottom:T.spacing.sm,paddingTop:T.spacing.sm,marginLeft:T.sizes.tagMarginInsideBorder})},Placeholder:{style:()=>({color:R?T.colors.fadedText40:T.colors.fadedText60,position:`absolute`,pointerEvents:`none`})},InputContainer:{style:()=>({marginLeft:T.spacing.none,position:`relative`,minWidth:T.spacing.threeXS,flexGrow:0})},Input:{props:{readOnly:F},style:()=>({lineHeight:T.lineHeights.inputWidget,color:T.colors.bodyText,caretColor:T.colors.bodyText})},DropdownContainer:{style:()=>({...s(T),maxHeight:`min(${T.sizes.maxDropdownHeight}, 70vh)`,overflow:`hidden`})},Popover:{props:{ignoreBoundary:E,popoverMargin:r(T.spacing.twoXS),overrides:{Body:{style:()=>({overflow:`hidden`})}}}},SingleValue:{style:()=>({marginLeft:T.spacing.none})},SelectArrow:{component:m,props:{style:{...R&&{cursor:`not-allowed`}},overrides:{Svg:{style:()=>({width:T.iconSizes.xl,height:T.iconSizes.xl})}}}}}})]})}),b=(e,t)=>e.getStringValue(t),x=e=>e.options.length===0||a(e.default)?null:e.options[e.default],S=e=>e.rawValue??null,C=(e,t,n,r)=>{t.setStringValue(e,n.value,{fromUi:n.fromUi},r)},w=(0,v.memo)(({disabled:t,element:n,widgetMgr:r,fragmentId:i})=>{let{options:o,help:s,label:c,labelVisibility:u,placeholder:d,acceptNewOptions:f,filterMode:m}=n,[h,g]=p({getStateFromWidgetMgr:b,getDefaultStateFromProto:x,getCurrStateFromProto:S,updateWidgetMgrState:C,element:n,widgetMgr:r,fragmentId:i,formClearBehavior:`resetValueOnly`,queryParamBinding:n.queryParamKey?{paramKey:n.queryParamKey,valueType:`string_value`,clearable:a(n.default)}:void 0}),_=(0,v.useCallback)(e=>{g({value:e,fromUi:!0})},[g]),w=a(n.default)&&!t;return e.jsx(y,{label:c,labelVisibility:l(u?.value),options:o,disabled:t,onChange:_,value:h,help:s,placeholder:d,clearable:w,acceptNewOptions:f??!1,filterMode:m})});export{w as default};
1
+ import{$r as e,Ha as t,P as n,Sn as r,Vn as i,Vr as a,Wa as o,er as s,fa as c,ni as l,pa as u}from"./index-lR-QVdnh.js";import{t as d}from"./WidgetLabel-CQfHGtry-H2bBW1_F.js";import{t as f}from"./WidgetLabelHelpIcon-C6IRqJ_I-CThDB-RY.js";import{n as p}from"./useBasicWidgetState-D3zHnRUK-J72gaU7U.js";import{i as m,r as h}from"./select-DyvsciAf-taVHCqSw.js";import{r as g,t as _}from"./useSelectCommon-CZP9dNty-DYUDYQZN.js";var v=o(t(),1),y=(0,v.memo)(({disabled:t,value:a,onChange:o,options:l,label:p,labelVisibility:y,help:b,placeholder:x,clearable:S,acceptNewOptions:C,filterMode:w})=>{let T=c(),E=(0,v.useContext)(n),[D,O]=(0,v.useState)(a),k=(0,v.useRef)(D);u(()=>{O(a),k.current=null},[a]);let A=(0,v.useCallback)(e=>{if(e.type===`remove`){k.current=e.option?.value,O(null);return}if(k.current=null,e.type===`clear`){O(null),o(null);return}let[t]=e.value;O(t.value),o(t.value)},[o]),j=(0,v.useCallback)(()=>{k.current!==null&&O(k.current)},[]),{placeholder:M,disabled:N,selectOptions:P,inputReadOnly:F,valueToUiSingle:I,createFilterOptions:L}=_({options:l,isMulti:!1,acceptNewOptions:C,filterMode:w,placeholderInput:x}),R=t||N,z=(0,v.useMemo)(()=>L(),[L]),B=I(D);return e.jsxs(`div`,{className:`stSelectbox`,"data-testid":`stSelectbox`,children:[e.jsx(d,{label:p,labelVisibility:y,disabled:R,children:b&&e.jsx(f,{content:b,label:p})}),e.jsx(h,{creatable:C,disabled:R,labelKey:`label`,"aria-label":p||``,onChange:A,onBlur:j,options:P,filterOptions:z,clearable:S||!1,escapeClearsValue:S||!1,value:B,valueKey:`value`,placeholder:M,ignoreCase:!1,overrides:{Root:{style:()=>({lineHeight:T.lineHeights.inputWidget,fontWeight:T.fontWeights.normal})},Dropdown:{component:g,style:{boxShadow:`none`,overflow:`hidden`}},ClearIcon:{props:{overrides:{Svg:{style:{color:T.colors.grayTextColor,padding:T.spacing.threeXS,height:T.sizes.clearIconSize,width:T.sizes.clearIconSize,":hover":{fill:T.colors.bodyText}}}}}},ControlContainer:{style:({$isFocused:e})=>{let t=i(T.colors,e);return{height:T.sizes.minElementHeight,borderLeftWidth:T.sizes.borderWidth,borderRightWidth:T.sizes.borderWidth,borderTopWidth:T.sizes.borderWidth,borderBottomWidth:T.sizes.borderWidth,borderTopColor:t,borderRightColor:t,borderBottomColor:t,borderLeftColor:t}}},IconsContainer:{style:()=>({paddingRight:T.spacing.sm})},ValueContainer:{style:()=>({flexGrow:1,paddingRight:T.spacing.sm,paddingLeft:T.spacing.sm,paddingBottom:T.spacing.sm,paddingTop:T.spacing.sm,marginLeft:T.sizes.tagMarginInsideBorder})},Placeholder:{style:()=>({color:R?T.colors.fadedText40:T.colors.fadedText60,position:`absolute`,pointerEvents:`none`})},InputContainer:{style:()=>({marginLeft:T.spacing.none,position:`relative`,minWidth:T.spacing.threeXS,flexGrow:0})},Input:{props:{readOnly:F},style:()=>({lineHeight:T.lineHeights.inputWidget,color:T.colors.bodyText,caretColor:T.colors.bodyText})},DropdownContainer:{style:()=>({...s(T),maxHeight:`min(${T.sizes.maxDropdownHeight}, 70vh)`,overflow:`hidden`})},Popover:{props:{ignoreBoundary:E,popoverMargin:r(T.spacing.twoXS),overrides:{Body:{style:()=>({overflow:`hidden`})}}}},SingleValue:{style:()=>({marginLeft:T.spacing.none})},SelectArrow:{component:m,props:{style:{...R&&{cursor:`not-allowed`}},overrides:{Svg:{style:()=>({width:T.iconSizes.xl,height:T.iconSizes.xl})}}}}}})]})}),b=(e,t)=>e.getStringValue(t),x=e=>e.options.length===0||a(e.default)?null:e.options[e.default],S=e=>e.rawValue??null,C=(e,t,n,r)=>{t.setStringValue(e,n.value,{fromUi:n.fromUi},r)},w=(0,v.memo)(({disabled:t,element:n,widgetMgr:r,fragmentId:i})=>{let{options:o,help:s,label:c,labelVisibility:u,placeholder:d,acceptNewOptions:f,filterMode:m}=n,[h,g]=p({getStateFromWidgetMgr:b,getDefaultStateFromProto:x,getCurrStateFromProto:S,updateWidgetMgrState:C,element:n,widgetMgr:r,fragmentId:i,formClearBehavior:`resetValueOnly`,queryParamBinding:n.queryParamKey?{paramKey:n.queryParamKey,valueType:`string_value`,clearable:a(n.default)}:void 0}),_=(0,v.useCallback)(e=>{g({value:e,fromUi:!0})},[g]),w=a(n.default)&&!t;return e.jsx(y,{label:c,labelVisibility:l(u?.value),options:o,disabled:t,onChange:_,value:h,help:s,placeholder:d,clearable:w,acceptNewOptions:f??!1,filterMode:m})});export{w as default};
@@ -1,2 +1,2 @@
1
- import{$n as e,$r as t,Fn as n,Ha as r,In as i,Wa as a,Xt as o,Zi as s,fa as c,kr as l,kt as u,ni as d,pa as f,st as p,ut as m,wi as h,wn as g}from"./index-B4fa-n2i.js";import{n as _}from"./moment-C29_LcvN-KXJiUm6M.js";import{t as v}from"./formatNumber-CK08KwyC-BpCoyciY.js";import{t as y}from"./formatMoment-DEtsTHwA-B6aCAROQ.js";import{t as b}from"./WidgetLabel-UxhCOQGD-Outa0e9S.js";import{t as x}from"./WidgetLabelHelpIcon-B9x-Yn7N-DaZaIL2I.js";import{n as S}from"./useBasicWidgetState-BMBMOmTg-D4BUrDbU.js";import{t as C}from"./withCalculatedWidth-B-DDl_d6-BCYIlY-Q.js";var w=a(r(),1),T={},E={},D={},O={},k;function A(){if(k)return O;k=1,Object.defineProperty(O,"__esModule",{value:!0}),O.Direction=void 0;var e;return function(e){e.Right=`to right`,e.Left=`to left`,e.Down=`to bottom`,e.Up=`to top`}(e||(O.Direction=e={})),O}var j;function M(){return j||(j=1,function(e){var t=D&&D.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.isIOS=e.useThumbOverlap=e.assertUnreachable=e.voidFn=e.getTrackBackground=e.replaceAt=e.schd=e.translate=e.getClosestThumbIndex=e.translateThumbs=e.getPaddingAndBorder=e.getMargin=e.checkInitialOverlap=e.checkValuesAgainstBoundaries=e.checkBoundaries=e.isVertical=e.relativeValue=e.normalizeValue=e.isStepDivisible=e.isTouchEvent=e.getStepDecimals=void 0;var n=w.default,r=A();e.getStepDecimals=function(e){var t=e.toString().split(`.`)[1];return t?t.length:0};function i(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}e.isTouchEvent=i;function a(e,t,n){var r=(t-e)/n,i=Number(r.toFixed(8));return parseInt(i.toString(),10)===i}e.isStepDivisible=a;function o(t,n,r,i,a,o,s){var c=1e11;if(t=Math.round(t*c)/c,!o){var l=s[n-1],u=s[n+1];if(l&&l>t)return l;if(u&&u<t)return u}if(t>i)return i;if(t<r)return r;var d=Math.floor(t*c-r*c)%Math.floor(a*c),f=Math.floor(t*c-Math.abs(d)),p=d===0?t:f/c,m=Math.abs(d/c)<a/2?p:p+a,h=(0,e.getStepDecimals)(a);return parseFloat(m.toFixed(h))}e.normalizeValue=o;function s(e,t,n){return(e-t)/(n-t)}e.relativeValue=s;function c(e){return e===r.Direction.Up||e===r.Direction.Down}e.isVertical=c;function l(e,t,n){if(t>=n)throw RangeError(`min (${t}) is equal/bigger than max (${n})`);if(e<t)throw RangeError(`value (${e}) is smaller than min (${t})`);if(e>n)throw RangeError(`value (${e}) is bigger than max (${n})`)}e.checkBoundaries=l;function u(e,t,n){return e<t?t:e>n?n:e}e.checkValuesAgainstBoundaries=u;function d(e){if(!(e.length<2)&&!e.slice(1).every(function(t,n){return e[n]<=t}))throw RangeError(`values={[${e}]} needs to be sorted when allowOverlap={false}`)}e.checkInitialOverlap=d;function f(e){var t=window.getComputedStyle(e);return{top:parseInt(t[`margin-top`],10),bottom:parseInt(t[`margin-bottom`],10),left:parseInt(t[`margin-left`],10),right:parseInt(t[`margin-right`],10)}}e.getMargin=f;function p(e){var t=window.getComputedStyle(e);return{top:parseInt(t[`padding-top`],10)+parseInt(t[`border-top-width`],10),bottom:parseInt(t[`padding-bottom`],10)+parseInt(t[`border-bottom-width`],10),left:parseInt(t[`padding-left`],10)+parseInt(t[`border-left-width`],10),right:parseInt(t[`padding-right`],10)+parseInt(t[`border-right-width`],10)}}e.getPaddingAndBorder=p;function m(e,t,n){var r=n?-1:1;e.forEach(function(e,n){return g(e,r*t[n].x,t[n].y)})}e.translateThumbs=m;function h(e,t,n,r){for(var i=0,a=C(e[0],t,n,r),o=1;o<e.length;o++){var s=C(e[o],t,n,r);s<a&&(a=s,i=o)}return i}e.getClosestThumbIndex=h;function g(e,t,n){e.style.transform=`translate(${t}px, ${n}px)`}e.translate=g,e.schd=function(e){var t=[],n=null;return function(){t=[...arguments],!n&&(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))}};function _(e,t,n){var r=e.slice(0);return r[t]=n,r}e.replaceAt=_;function v(e){var t=e.values,n=e.colors,i=e.min,a=e.max,o=e.direction,s=o===void 0?r.Direction.Right:o,c=e.rtl,l=c===void 0?!1:c;l&&s===r.Direction.Right?s=r.Direction.Left:l&&r.Direction.Left&&(s=r.Direction.Right);var u=t.slice(0).sort(function(e,t){return e-t}).map(function(e){return(e-i)/(a-i)*100}).reduce(function(e,t,r){return`${e}, ${n[r]} ${t}%, ${n[r+1]} ${t}%`},``);return`linear-gradient(${s}, ${n[0]} 0%${u}, ${n[n.length-1]} 100%)`}e.getTrackBackground=v;function y(){}e.voidFn=y;function b(e){throw Error(`Didn't expect to get here`)}e.assertUnreachable=b;var x=function(e,n,r,i,a){return a===void 0&&(a=function(e){return e}),Math.ceil(t([e],Array.from(e.children),!0).reduce(function(e,t){var o=Math.ceil(t.getBoundingClientRect().width);if(t.innerText&&t.innerText.includes(r)&&t.childElementCount===0){var s=t.cloneNode(!0);s.innerHTML=a(n.toFixed(i)),s.style.visibility=`hidden`,document.body.appendChild(s),o=Math.ceil(s.getBoundingClientRect().width),document.body.removeChild(s)}return o>e?o:e},e.getBoundingClientRect().width))},S=function(e,n,r,i,a,o,s){s===void 0&&(s=function(e){return e});var c=[],l=function(e){var u=x(r[e],i[e],a,o,s),d=n[e].x;n.forEach(function(n,f){var p=n.x,m=x(r[f],i[f],a,o,s);e!==f&&(d>=p&&d<=p+m||d+u>=p&&d+u<=p+m)&&(c.includes(f)||(c.push(e),c.push(f),c=t(t([],c,!0),[e,f],!1),l(f)))})};return l(e),Array.from(new Set(c.sort()))};e.useThumbOverlap=function(r,i,a,o,s,c){o===void 0&&(o=.1),s===void 0&&(s=` - `),c===void 0&&(c=function(e){return e});var l=(0,e.getStepDecimals)(o),u=(0,n.useState)({}),d=u[0],f=u[1],p=(0,n.useState)(c(i[a].toFixed(l))),m=p[0],h=p[1];return(0,n.useEffect)(function(){if(r){var e=r.getThumbs();if(e.length<1)return;var n={},o=r.getOffsets(),u=S(a,o,e,i,s,l,c),d=c(i[a].toFixed(l));if(u.length){var p=u.reduce(function(e,n,r,i){return e.length?t(t([],e,!0),[o[i[r]].x],!1):[o[i[r]].x]},[]);if(Math.min.apply(Math,p)===o[a].x){var m=[];u.forEach(function(e){m.push(i[e].toFixed(l))}),d=Array.from(new Set(m.sort(function(e,t){return parseFloat(e)-parseFloat(t)}))).map(c).join(s);var g=Math.min.apply(Math,p),_=Math.max.apply(Math,p),v=e[u[p.indexOf(_)]].getBoundingClientRect().width;n.left=`${Math.abs(g-(_+v))/2}px`,n.transform=`translate(-50%, 0)`}else n.visibility=`hidden`}h(d),f(n)}},[r,i]),[m,d]};function C(e,t,n,r){var i=e.getBoundingClientRect(),a=i.left,o=i.top,s=i.width,l=i.height;return c(r)?Math.abs(n-(o+l/2)):Math.abs(t-(a+s/2))}e.isIOS=function(){var e=navigator.userAgentData?.platform||navigator.platform;return[`iPad Simulator`,`iPhone Simulator`,`iPod Simulator`,`iPad`,`iPhone`,`iPod`].includes(e)||navigator.userAgent.includes(`Mac`)&&`ontouchend`in document}}(D)),D}var N;function ee(){if(N)return E;N=1;var e=E&&E.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),t=E&&E.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),n=E&&E.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=E&&E.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r},i=E&&E.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(E,"__esModule",{value:!0});var a=r(w.default),o=M(),s=A(),c=[`ArrowRight`,`ArrowUp`,`k`,`PageUp`],l=[`ArrowLeft`,`ArrowDown`,`j`,`PageDown`];return E.default=function(t){e(n,t);function n(e){var n=t.call(this,e)||this;if(n.trackRef=a.createRef(),n.thumbRefs=[],n.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:Array(n.props.values.length).fill(0).map(function(e,t){return t}),isChanged:!1,markOffsets:[]},n.getOffsets=function(){var e=n.props,t=e.direction,r=e.values,i=e.min,a=e.max,c=n.trackRef.current;if(!c)return console.warn(`No track element found.`),[];var l=c.getBoundingClientRect(),u=(0,o.getPaddingAndBorder)(c);return n.getThumbs().map(function(e,n){var c={x:0,y:0},d=e.getBoundingClientRect(),f=(0,o.getMargin)(e);switch(t){case s.Direction.Right:return c.x=(f.left+u.left)*-1,c.y=((d.height-l.height)/2+u.top)*-1,c.x+=l.width*(0,o.relativeValue)(r[n],i,a)-d.width/2,c;case s.Direction.Left:return c.x=(f.right+u.right)*-1,c.y=((d.height-l.height)/2+u.top)*-1,c.x+=l.width-l.width*(0,o.relativeValue)(r[n],i,a)-d.width/2,c;case s.Direction.Up:return c.x=((d.width-l.width)/2+f.left+u.left)*-1,c.y=-u.left,c.y+=l.height-l.height*(0,o.relativeValue)(r[n],i,a)-d.height/2,c;case s.Direction.Down:return c.x=((d.width-l.width)/2+f.left+u.left)*-1,c.y=-u.left,c.y+=l.height*(0,o.relativeValue)(r[n],i,a)-d.height/2,c;default:return(0,o.assertUnreachable)(t)}})},n.getThumbs=function(){return n.trackRef&&n.trackRef.current?Array.from(n.trackRef.current.children).filter(function(e){return e.hasAttribute(`aria-valuenow`)}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},n.getTargetIndex=function(e){return n.getThumbs().findIndex(function(t){return t===e.target||t.contains(e.target)})},n.addTouchEvents=function(e){document.addEventListener(`touchmove`,n.schdOnTouchMove,{passive:!1}),document.addEventListener(`touchend`,n.schdOnEnd,{passive:!1}),document.addEventListener(`touchcancel`,n.schdOnEnd,{passive:!1})},n.addMouseEvents=function(e){document.addEventListener(`mousemove`,n.schdOnMouseMove),document.addEventListener(`mouseup`,n.schdOnEnd)},n.onMouseDownTrack=function(e){var t;if(!(e.button!==0||(0,o.isIOS)()))if(e.persist(),e.preventDefault(),n.addMouseEvents(e.nativeEvent),n.props.values.length>1&&n.props.draggableTrack){if(n.thumbRefs.some(function(t){return t.current?.contains(e.target)}))return;n.setState({draggedTrackPos:[e.clientX,e.clientY]},function(){return n.onMove(e.clientX,e.clientY)})}else{var r=(0,o.getClosestThumbIndex)(n.thumbRefs.map(function(e){return e.current}),e.clientX,e.clientY,n.props.direction);(t=n.thumbRefs[r].current)==null||t.focus(),n.setState({draggedThumbIndex:r},function(){return n.onMove(e.clientX,e.clientY)})}},n.onResize=function(){(0,o.translateThumbs)(n.getThumbs(),n.getOffsets(),n.props.rtl),n.calculateMarkOffsets()},n.onTouchStartTrack=function(e){var t;if(e.persist(),n.addTouchEvents(e.nativeEvent),n.props.values.length>1&&n.props.draggableTrack){if(n.thumbRefs.some(function(t){return t.current?.contains(e.target)}))return;n.setState({draggedTrackPos:[e.touches[0].clientX,e.touches[0].clientY]},function(){return n.onMove(e.touches[0].clientX,e.touches[0].clientY)})}else{var r=(0,o.getClosestThumbIndex)(n.thumbRefs.map(function(e){return e.current}),e.touches[0].clientX,e.touches[0].clientY,n.props.direction);(t=n.thumbRefs[r].current)==null||t.focus(),n.setState({draggedThumbIndex:r},function(){return n.onMove(e.touches[0].clientX,e.touches[0].clientY)})}},n.onMouseOrTouchStart=function(e){if(!n.props.disabled){var t=(0,o.isTouchEvent)(e);if(!(!t&&e.button!==0)){var r=n.getTargetIndex(e);r!==-1&&(t?n.addTouchEvents(e):n.addMouseEvents(e),n.setState({draggedThumbIndex:r,thumbZIndexes:n.state.thumbZIndexes.map(function(e,t){return t===r?Math.max.apply(Math,n.state.thumbZIndexes):e<=n.state.thumbZIndexes[r]?e:e-1})}))}}},n.onMouseMove=function(e){e.preventDefault(),n.onMove(e.clientX,e.clientY)},n.onTouchMove=function(e){e.preventDefault(),n.onMove(e.touches[0].clientX,e.touches[0].clientY)},n.onKeyDown=function(e){var t=n.props,r=t.values,i=t.onChange,a=t.step,u=t.rtl,d=t.direction,f=n.state.isChanged,p=n.getTargetIndex(e.nativeEvent),m=u||d===s.Direction.Left||d===s.Direction.Down?-1:1;p!==-1&&(c.includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:p,isChanged:!0}),i((0,o.replaceAt)(r,p,n.normalizeValue(r[p]+m*(e.key===`PageUp`?a*10:a),p)))):l.includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:p,isChanged:!0}),i((0,o.replaceAt)(r,p,n.normalizeValue(r[p]-m*(e.key===`PageDown`?a*10:a),p)))):e.key===`Tab`?n.setState({draggedThumbIndex:-1},function(){f&&n.fireOnFinalChange()}):f&&n.fireOnFinalChange())},n.onKeyUp=function(e){var t=n.state.isChanged;n.setState({draggedThumbIndex:-1},function(){t&&n.fireOnFinalChange()})},n.onMove=function(e,t){var r=n.state,i=r.draggedThumbIndex,a=r.draggedTrackPos,c=n.props,l=c.direction,u=c.min,d=c.max,f=c.onChange,p=c.values,m=c.step,h=c.rtl;if(i===-1&&a[0]===-1&&a[1]===-1)return null;var g=n.trackRef.current;if(!g)return null;var _=g.getBoundingClientRect(),v=(0,o.isVertical)(l)?_.height:_.width;if(a[0]!==-1&&a[1]!==-1){var y=e-a[0],b=t-a[1],x=0;switch(l){case s.Direction.Right:case s.Direction.Left:x=y/v*(d-u);break;case s.Direction.Down:case s.Direction.Up:x=b/v*(d-u);break;default:(0,o.assertUnreachable)(l)}if(h&&(x*=-1),Math.abs(x)>=m/2){for(var S=0;S<n.thumbRefs.length;S++){if(p[S]===d&&Math.sign(x)===1||p[S]===u&&Math.sign(x)===-1)return;var C=p[S]+x;C>d?x=d-p[S]:C<u&&(x=u-p[S])}for(var w=p.slice(0),S=0;S<n.thumbRefs.length;S++)w=(0,o.replaceAt)(w,S,n.normalizeValue(p[S]+x,S));n.setState({draggedTrackPos:[e,t]}),f(w)}}else{var T=0;switch(l){case s.Direction.Right:T=(e-_.left)/v*(d-u)+u;break;case s.Direction.Left:T=(v-(e-_.left))/v*(d-u)+u;break;case s.Direction.Down:T=(t-_.top)/v*(d-u)+u;break;case s.Direction.Up:T=(v-(t-_.top))/v*(d-u)+u;break;default:(0,o.assertUnreachable)(l)}h&&(T=d+u-T),Math.abs(p[i]-T)>=m/2&&f((0,o.replaceAt)(p,i,n.normalizeValue(T,i)))}},n.normalizeValue=function(e,t){var r=n.props,i=r.min,a=r.max,s=r.step,c=r.allowOverlap,l=r.values;return(0,o.normalizeValue)(e,t,i,a,s,c,l)},n.onEnd=function(e){if(e.preventDefault(),document.removeEventListener(`mousemove`,n.schdOnMouseMove),document.removeEventListener(`touchmove`,n.schdOnTouchMove),document.removeEventListener(`mouseup`,n.schdOnEnd),document.removeEventListener(`touchend`,n.schdOnEnd),document.removeEventListener(`touchcancel`,n.schdOnEnd),n.state.draggedThumbIndex===-1&&n.state.draggedTrackPos[0]===-1&&n.state.draggedTrackPos[1]===-1)return null;n.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){n.fireOnFinalChange()})},n.fireOnFinalChange=function(){n.setState({isChanged:!1});var e=n.props,t=e.onFinalChange,r=e.values;t&&t(r)},n.updateMarkRefs=function(e){if(!e.renderMark){n.numOfMarks=void 0,n.markRefs=void 0;return}n.numOfMarks=(e.max-e.min)/n.props.step,n.markRefs=[];for(var t=0;t<n.numOfMarks+1;t++)n.markRefs[t]=a.createRef()},n.calculateMarkOffsets=function(){if(!(!n.props.renderMark||!n.trackRef||!n.numOfMarks||!n.markRefs||n.trackRef.current===null)){for(var e=window.getComputedStyle(n.trackRef.current),t=parseInt(e.width,10),r=parseInt(e.height,10),i=parseInt(e.paddingLeft,10),a=parseInt(e.paddingTop,10),o=[],c=0;c<n.numOfMarks+1;c++){var l=9999,u=9999;if(n.markRefs[c].current){var d=n.markRefs[c].current.getBoundingClientRect();l=d.height,u=d.width}n.props.direction===s.Direction.Left||n.props.direction===s.Direction.Right?o.push([Math.round(t/n.numOfMarks*c+i-u/2),-Math.round((l-r)/2)]):o.push([Math.round(r/n.numOfMarks*c+a-l/2),-Math.round((u-t)/2)])}n.setState({markOffsets:o})}},e.step===0)throw Error(`"step" property should be a positive number`);return n.schdOnMouseMove=(0,o.schd)(n.onMouseMove),n.schdOnTouchMove=(0,o.schd)(n.onTouchMove),n.schdOnEnd=(0,o.schd)(n.onEnd),n.thumbRefs=e.values.map(function(){return a.createRef()}),n.updateMarkRefs(e),n}return n.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.values,r=t.min,i=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener(`resize`,e.onResize)},unobserve:function(){return window.removeEventListener(`resize`,e.onResize)}},document.addEventListener(`touchstart`,this.onMouseOrTouchStart,{passive:!1}),document.addEventListener(`mousedown`,this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,o.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(t){return(0,o.checkBoundaries)(t,e.props.min,e.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,o.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),n.forEach(function(e){(0,o.isStepDivisible)(r,e,i)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},n.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.max,i=n.min,a=n.step,s=n.values,c=n.rtl;(e.max!==r||e.min!==i||e.step!==a)&&this.updateMarkRefs(this.props),(0,o.translateThumbs)(this.getThumbs(),this.getOffsets(),c),(e.max!==r||e.min!==i||e.step!==a||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),s.forEach(function(e){(0,o.isStepDivisible)(i,e,a)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},n.prototype.componentWillUnmount=function(){document.removeEventListener(`mousedown`,this.onMouseOrTouchStart,{passive:!1}),document.removeEventListener(`mousemove`,this.schdOnMouseMove),document.removeEventListener(`touchmove`,this.schdOnTouchMove),document.removeEventListener(`touchstart`,this.onMouseOrTouchStart),document.removeEventListener(`mouseup`,this.schdOnEnd),document.removeEventListener(`touchend`,this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},n.prototype.render=function(){var e=this,t=this.props,n=t.label,r=t.labelledBy,a=t.renderTrack,c=t.renderThumb,l=t.renderMark,u=l===void 0?function(){return null}:l,d=t.values,f=t.min,p=t.max,m=t.allowOverlap,h=t.disabled,g=this.state,_=g.draggedThumbIndex,v=g.thumbZIndexes,y=g.markOffsets;return a({props:{style:{transform:`scale(1)`,cursor:_>-1?`grabbing`:this.props.draggableTrack?(0,o.isVertical)(this.props.direction)?`ns-resize`:`ew-resize`:d.length===1&&!h?`pointer`:`inherit`},onMouseDown:h?o.voidFn:this.onMouseDownTrack,onTouchStart:h?o.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:h,children:i(i([],y.map(function(t,n,r){return u({props:{style:e.props.direction===s.Direction.Left||e.props.direction===s.Direction.Right?{position:`absolute`,left:`${t[0]}px`,marginTop:`${t[1]}px`}:{position:`absolute`,top:`${t[0]}px`,marginLeft:`${t[1]}px`},key:`mark${n}`,ref:e.markRefs[n]},index:n})}),!0),d.map(function(t,i){var a=e.state.draggedThumbIndex===i;return c({index:i,value:t,isDragged:a,props:{style:{position:`absolute`,zIndex:v[i],cursor:h?`inherit`:a?`grabbing`:`grab`,userSelect:`none`,touchAction:`none`,WebkitUserSelect:`none`,MozUserSelect:`none`,msUserSelect:`none`},key:i,tabIndex:h?void 0:0,"aria-valuemax":m?p:d[i+1]||p,"aria-valuemin":m?f:d[i-1]||f,"aria-valuenow":t,draggable:!1,ref:e.thumbRefs[i],"aria-label":n,"aria-labelledby":r,role:`slider`,onKeyDown:h?o.voidFn:e.onKeyDown,onKeyUp:h?o.voidFn:e.onKeyUp}})}),!0)})},n.defaultProps={label:`Accessibility label`,labelledBy:null,step:1,direction:s.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(a.Component),E}var P;function F(){return P||(P=1,function(e){var t=T&&T.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0,e.Range=t(ee()).default;var n=M();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return n.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return n.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return n.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return n.checkValuesAgainstBoundaries}});var r=A();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return r.Direction}})}(T)),T}var te=F();function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?I(Object(n),!0).forEach(function(t){ne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var re=s(`div`,{position:`relative`,width:`100%`});re.displayName=`Root`,re.displayName=`Root`,re.displayName=`StyledRoot`;var ie=s(`div`,function(e){var t=e.$theme,n=e.$value,r=n===void 0?[]:n,i=e.$disabled,a=e.$isDragged,o=t.sizing,s=`inherit`;return i?s=`not-allowed`:a?s=`grabbing`:r.length===1&&(s=`pointer`),{paddingTop:o.scale600,paddingBottom:o.scale600,paddingRight:o.scale600,paddingLeft:o.scale600,display:`flex`,cursor:s,backgroundColor:t.colors.sliderTrackFill}});ie.displayName=`Track`,ie.displayName=`Track`,ie.displayName=`StyledTrack`;var R=s(`div`,function(e){var t=e.$theme,n=e.$value,r=n===void 0?[]:n,i=e.$min,a=e.$max,o=e.$disabled,s=t.colors,c=t.borders,l=t.direction,u=t.borders.useRoundedCorners?c.radius100:0;return{borderTopLeftRadius:u,borderTopRightRadius:u,borderBottomRightRadius:u,borderBottomLeftRadius:u,background:te.getTrackBackground({values:r,colors:r.length===1?[o?s.borderOpaque:s.primary,o?s.backgroundSecondary:s.borderOpaque]:[o?s.backgroundSecondary:s.borderOpaque,o?s.borderOpaque:s.primary,o?s.backgroundSecondary:s.borderOpaque],min:i||0,max:a||0,rtl:l===`rtl`}),height:`2px`,width:`100%`,alignSelf:`center`,cursor:o?`not-allowed`:`inherit`}});R.displayName=`InnerTrack`,R.displayName=`InnerTrack`,R.displayName=`StyledInnerTrack`;var ae=s(`div`,function(e){return{width:`4px`,height:`2px`,backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:`16px`}});ae.displayName=`Mark`,ae.displayName=`Mark`,ae.displayName=`StyledMark`;var z=s(`div`,function(e){return L(L({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});z.displayName=`Tick`,z.displayName=`Tick`,z.displayName=`StyledTick`;var B=s(`div`,function(e){var t=e.$theme.sizing;return{display:`flex`,justifyContent:`space-between`,alignItems:`center`,paddingRight:t.scale600,paddingLeft:t.scale600,paddingBottom:t.scale400}});B.displayName=`TickBar`,B.displayName=`TickBar`,B.displayName=`StyledTickBar`;var V=s(`div`,function(e){var t=e.$theme,n=e.$value,r=n===void 0?[]:n,i=e.$thumbIndex,a=e.$disabled,o=r.length===2&&i===0,s=r.length===2&&i===1;return t.direction===`rtl`&&(s||o)&&(o=!o,s=!s),{height:`24px`,width:`24px`,borderTopLeftRadius:`24px`,borderTopRightRadius:`24px`,borderBottomLeftRadius:`24px`,borderBottomRightRadius:`24px`,display:`flex`,justifyContent:`center`,alignItems:`center`,backgroundColor:a?t.colors.sliderHandleFillDisabled:t.colors.sliderHandleFill,outline:`none`,boxShadow:e.$isFocusVisible?`0 0 0 3px ${t.colors.accent}`:`0 1px 4px rgba(0, 0, 0, 0.12)`,cursor:a?`not-allowed`:`inherit`}});V.displayName=`Thumb`,V.displayName=`Thumb`,V.displayName=`StyledThumb`;var H=s(`div`,function(e){var t=e.$disabled,n=e.$theme;return{position:`absolute`,top:`-16px`,width:`4px`,height:`20px`,backgroundColor:t?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});H.displayName=`InnerThumb`,H.displayName=`InnerThumb`,H.displayName=`StyledInnerThumb`;var U=s(`div`,function(e){var t=e.$disabled,n=e.$theme;return L(L({position:`absolute`,top:`-${n.sizing.scale1400}`},n.typography.font200),{},{backgroundColor:t?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:`48px`,borderBottomRightRadius:`48px`,borderTopLeftRadius:`48px`,borderTopRightRadius:`48px`,whiteSpace:`nowrap`})});U.displayName=`ThumbValue`,U.displayName=`ThumbValue`,U.displayName=`StyledThumbValue`;function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?W(Object(n),!0).forEach(function(t){se(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G.apply(this,arguments)}function K(e,t){return ue(e)||le(e,t)||q(e,t)||ce()}function ce(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{$n as e,$r as t,Fn as n,Ha as r,In as i,Wa as a,Xt as o,Zi as s,fa as c,kr as l,kt as u,ni as d,pa as f,st as p,ut as m,wi as h,wn as g}from"./index-lR-QVdnh.js";import{n as _}from"./moment-C29_LcvN-DWLtgoJ3.js";import{t as v}from"./formatNumber-B9NmJPl4-Bduke_Pe.js";import{t as y}from"./formatMoment-DEtsTHwA-B6aCAROQ.js";import{t as b}from"./WidgetLabel-CQfHGtry-H2bBW1_F.js";import{t as x}from"./WidgetLabelHelpIcon-C6IRqJ_I-CThDB-RY.js";import{n as S}from"./useBasicWidgetState-D3zHnRUK-J72gaU7U.js";import{t as C}from"./withCalculatedWidth-DwrWHMUR-B2yMBY1O.js";var w=a(r(),1),T={},E={},D={},O={},k;function A(){if(k)return O;k=1,Object.defineProperty(O,"__esModule",{value:!0}),O.Direction=void 0;var e;return function(e){e.Right=`to right`,e.Left=`to left`,e.Down=`to bottom`,e.Up=`to top`}(e||(O.Direction=e={})),O}var j;function M(){return j||(j=1,function(e){var t=D&&D.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.isIOS=e.useThumbOverlap=e.assertUnreachable=e.voidFn=e.getTrackBackground=e.replaceAt=e.schd=e.translate=e.getClosestThumbIndex=e.translateThumbs=e.getPaddingAndBorder=e.getMargin=e.checkInitialOverlap=e.checkValuesAgainstBoundaries=e.checkBoundaries=e.isVertical=e.relativeValue=e.normalizeValue=e.isStepDivisible=e.isTouchEvent=e.getStepDecimals=void 0;var n=w.default,r=A();e.getStepDecimals=function(e){var t=e.toString().split(`.`)[1];return t?t.length:0};function i(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}e.isTouchEvent=i;function a(e,t,n){var r=(t-e)/n,i=Number(r.toFixed(8));return parseInt(i.toString(),10)===i}e.isStepDivisible=a;function o(t,n,r,i,a,o,s){var c=1e11;if(t=Math.round(t*c)/c,!o){var l=s[n-1],u=s[n+1];if(l&&l>t)return l;if(u&&u<t)return u}if(t>i)return i;if(t<r)return r;var d=Math.floor(t*c-r*c)%Math.floor(a*c),f=Math.floor(t*c-Math.abs(d)),p=d===0?t:f/c,m=Math.abs(d/c)<a/2?p:p+a,h=(0,e.getStepDecimals)(a);return parseFloat(m.toFixed(h))}e.normalizeValue=o;function s(e,t,n){return(e-t)/(n-t)}e.relativeValue=s;function c(e){return e===r.Direction.Up||e===r.Direction.Down}e.isVertical=c;function l(e,t,n){if(t>=n)throw RangeError(`min (${t}) is equal/bigger than max (${n})`);if(e<t)throw RangeError(`value (${e}) is smaller than min (${t})`);if(e>n)throw RangeError(`value (${e}) is bigger than max (${n})`)}e.checkBoundaries=l;function u(e,t,n){return e<t?t:e>n?n:e}e.checkValuesAgainstBoundaries=u;function d(e){if(!(e.length<2)&&!e.slice(1).every(function(t,n){return e[n]<=t}))throw RangeError(`values={[${e}]} needs to be sorted when allowOverlap={false}`)}e.checkInitialOverlap=d;function f(e){var t=window.getComputedStyle(e);return{top:parseInt(t[`margin-top`],10),bottom:parseInt(t[`margin-bottom`],10),left:parseInt(t[`margin-left`],10),right:parseInt(t[`margin-right`],10)}}e.getMargin=f;function p(e){var t=window.getComputedStyle(e);return{top:parseInt(t[`padding-top`],10)+parseInt(t[`border-top-width`],10),bottom:parseInt(t[`padding-bottom`],10)+parseInt(t[`border-bottom-width`],10),left:parseInt(t[`padding-left`],10)+parseInt(t[`border-left-width`],10),right:parseInt(t[`padding-right`],10)+parseInt(t[`border-right-width`],10)}}e.getPaddingAndBorder=p;function m(e,t,n){var r=n?-1:1;e.forEach(function(e,n){return g(e,r*t[n].x,t[n].y)})}e.translateThumbs=m;function h(e,t,n,r){for(var i=0,a=C(e[0],t,n,r),o=1;o<e.length;o++){var s=C(e[o],t,n,r);s<a&&(a=s,i=o)}return i}e.getClosestThumbIndex=h;function g(e,t,n){e.style.transform=`translate(${t}px, ${n}px)`}e.translate=g,e.schd=function(e){var t=[],n=null;return function(){t=[...arguments],!n&&(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))}};function _(e,t,n){var r=e.slice(0);return r[t]=n,r}e.replaceAt=_;function v(e){var t=e.values,n=e.colors,i=e.min,a=e.max,o=e.direction,s=o===void 0?r.Direction.Right:o,c=e.rtl,l=c===void 0?!1:c;l&&s===r.Direction.Right?s=r.Direction.Left:l&&r.Direction.Left&&(s=r.Direction.Right);var u=t.slice(0).sort(function(e,t){return e-t}).map(function(e){return(e-i)/(a-i)*100}).reduce(function(e,t,r){return`${e}, ${n[r]} ${t}%, ${n[r+1]} ${t}%`},``);return`linear-gradient(${s}, ${n[0]} 0%${u}, ${n[n.length-1]} 100%)`}e.getTrackBackground=v;function y(){}e.voidFn=y;function b(e){throw Error(`Didn't expect to get here`)}e.assertUnreachable=b;var x=function(e,n,r,i,a){return a===void 0&&(a=function(e){return e}),Math.ceil(t([e],Array.from(e.children),!0).reduce(function(e,t){var o=Math.ceil(t.getBoundingClientRect().width);if(t.innerText&&t.innerText.includes(r)&&t.childElementCount===0){var s=t.cloneNode(!0);s.innerHTML=a(n.toFixed(i)),s.style.visibility=`hidden`,document.body.appendChild(s),o=Math.ceil(s.getBoundingClientRect().width),document.body.removeChild(s)}return o>e?o:e},e.getBoundingClientRect().width))},S=function(e,n,r,i,a,o,s){s===void 0&&(s=function(e){return e});var c=[],l=function(e){var u=x(r[e],i[e],a,o,s),d=n[e].x;n.forEach(function(n,f){var p=n.x,m=x(r[f],i[f],a,o,s);e!==f&&(d>=p&&d<=p+m||d+u>=p&&d+u<=p+m)&&(c.includes(f)||(c.push(e),c.push(f),c=t(t([],c,!0),[e,f],!1),l(f)))})};return l(e),Array.from(new Set(c.sort()))};e.useThumbOverlap=function(r,i,a,o,s,c){o===void 0&&(o=.1),s===void 0&&(s=` - `),c===void 0&&(c=function(e){return e});var l=(0,e.getStepDecimals)(o),u=(0,n.useState)({}),d=u[0],f=u[1],p=(0,n.useState)(c(i[a].toFixed(l))),m=p[0],h=p[1];return(0,n.useEffect)(function(){if(r){var e=r.getThumbs();if(e.length<1)return;var n={},o=r.getOffsets(),u=S(a,o,e,i,s,l,c),d=c(i[a].toFixed(l));if(u.length){var p=u.reduce(function(e,n,r,i){return e.length?t(t([],e,!0),[o[i[r]].x],!1):[o[i[r]].x]},[]);if(Math.min.apply(Math,p)===o[a].x){var m=[];u.forEach(function(e){m.push(i[e].toFixed(l))}),d=Array.from(new Set(m.sort(function(e,t){return parseFloat(e)-parseFloat(t)}))).map(c).join(s);var g=Math.min.apply(Math,p),_=Math.max.apply(Math,p),v=e[u[p.indexOf(_)]].getBoundingClientRect().width;n.left=`${Math.abs(g-(_+v))/2}px`,n.transform=`translate(-50%, 0)`}else n.visibility=`hidden`}h(d),f(n)}},[r,i]),[m,d]};function C(e,t,n,r){var i=e.getBoundingClientRect(),a=i.left,o=i.top,s=i.width,l=i.height;return c(r)?Math.abs(n-(o+l/2)):Math.abs(t-(a+s/2))}e.isIOS=function(){var e=navigator.userAgentData?.platform||navigator.platform;return[`iPad Simulator`,`iPhone Simulator`,`iPod Simulator`,`iPad`,`iPhone`,`iPod`].includes(e)||navigator.userAgent.includes(`Mac`)&&`ontouchend`in document}}(D)),D}var N;function ee(){if(N)return E;N=1;var e=E&&E.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),t=E&&E.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),n=E&&E.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=E&&E.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r},i=E&&E.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(E,"__esModule",{value:!0});var a=r(w.default),o=M(),s=A(),c=[`ArrowRight`,`ArrowUp`,`k`,`PageUp`],l=[`ArrowLeft`,`ArrowDown`,`j`,`PageDown`];return E.default=function(t){e(n,t);function n(e){var n=t.call(this,e)||this;if(n.trackRef=a.createRef(),n.thumbRefs=[],n.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:Array(n.props.values.length).fill(0).map(function(e,t){return t}),isChanged:!1,markOffsets:[]},n.getOffsets=function(){var e=n.props,t=e.direction,r=e.values,i=e.min,a=e.max,c=n.trackRef.current;if(!c)return console.warn(`No track element found.`),[];var l=c.getBoundingClientRect(),u=(0,o.getPaddingAndBorder)(c);return n.getThumbs().map(function(e,n){var c={x:0,y:0},d=e.getBoundingClientRect(),f=(0,o.getMargin)(e);switch(t){case s.Direction.Right:return c.x=(f.left+u.left)*-1,c.y=((d.height-l.height)/2+u.top)*-1,c.x+=l.width*(0,o.relativeValue)(r[n],i,a)-d.width/2,c;case s.Direction.Left:return c.x=(f.right+u.right)*-1,c.y=((d.height-l.height)/2+u.top)*-1,c.x+=l.width-l.width*(0,o.relativeValue)(r[n],i,a)-d.width/2,c;case s.Direction.Up:return c.x=((d.width-l.width)/2+f.left+u.left)*-1,c.y=-u.left,c.y+=l.height-l.height*(0,o.relativeValue)(r[n],i,a)-d.height/2,c;case s.Direction.Down:return c.x=((d.width-l.width)/2+f.left+u.left)*-1,c.y=-u.left,c.y+=l.height*(0,o.relativeValue)(r[n],i,a)-d.height/2,c;default:return(0,o.assertUnreachable)(t)}})},n.getThumbs=function(){return n.trackRef&&n.trackRef.current?Array.from(n.trackRef.current.children).filter(function(e){return e.hasAttribute(`aria-valuenow`)}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},n.getTargetIndex=function(e){return n.getThumbs().findIndex(function(t){return t===e.target||t.contains(e.target)})},n.addTouchEvents=function(e){document.addEventListener(`touchmove`,n.schdOnTouchMove,{passive:!1}),document.addEventListener(`touchend`,n.schdOnEnd,{passive:!1}),document.addEventListener(`touchcancel`,n.schdOnEnd,{passive:!1})},n.addMouseEvents=function(e){document.addEventListener(`mousemove`,n.schdOnMouseMove),document.addEventListener(`mouseup`,n.schdOnEnd)},n.onMouseDownTrack=function(e){var t;if(!(e.button!==0||(0,o.isIOS)()))if(e.persist(),e.preventDefault(),n.addMouseEvents(e.nativeEvent),n.props.values.length>1&&n.props.draggableTrack){if(n.thumbRefs.some(function(t){return t.current?.contains(e.target)}))return;n.setState({draggedTrackPos:[e.clientX,e.clientY]},function(){return n.onMove(e.clientX,e.clientY)})}else{var r=(0,o.getClosestThumbIndex)(n.thumbRefs.map(function(e){return e.current}),e.clientX,e.clientY,n.props.direction);(t=n.thumbRefs[r].current)==null||t.focus(),n.setState({draggedThumbIndex:r},function(){return n.onMove(e.clientX,e.clientY)})}},n.onResize=function(){(0,o.translateThumbs)(n.getThumbs(),n.getOffsets(),n.props.rtl),n.calculateMarkOffsets()},n.onTouchStartTrack=function(e){var t;if(e.persist(),n.addTouchEvents(e.nativeEvent),n.props.values.length>1&&n.props.draggableTrack){if(n.thumbRefs.some(function(t){return t.current?.contains(e.target)}))return;n.setState({draggedTrackPos:[e.touches[0].clientX,e.touches[0].clientY]},function(){return n.onMove(e.touches[0].clientX,e.touches[0].clientY)})}else{var r=(0,o.getClosestThumbIndex)(n.thumbRefs.map(function(e){return e.current}),e.touches[0].clientX,e.touches[0].clientY,n.props.direction);(t=n.thumbRefs[r].current)==null||t.focus(),n.setState({draggedThumbIndex:r},function(){return n.onMove(e.touches[0].clientX,e.touches[0].clientY)})}},n.onMouseOrTouchStart=function(e){if(!n.props.disabled){var t=(0,o.isTouchEvent)(e);if(!(!t&&e.button!==0)){var r=n.getTargetIndex(e);r!==-1&&(t?n.addTouchEvents(e):n.addMouseEvents(e),n.setState({draggedThumbIndex:r,thumbZIndexes:n.state.thumbZIndexes.map(function(e,t){return t===r?Math.max.apply(Math,n.state.thumbZIndexes):e<=n.state.thumbZIndexes[r]?e:e-1})}))}}},n.onMouseMove=function(e){e.preventDefault(),n.onMove(e.clientX,e.clientY)},n.onTouchMove=function(e){e.preventDefault(),n.onMove(e.touches[0].clientX,e.touches[0].clientY)},n.onKeyDown=function(e){var t=n.props,r=t.values,i=t.onChange,a=t.step,u=t.rtl,d=t.direction,f=n.state.isChanged,p=n.getTargetIndex(e.nativeEvent),m=u||d===s.Direction.Left||d===s.Direction.Down?-1:1;p!==-1&&(c.includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:p,isChanged:!0}),i((0,o.replaceAt)(r,p,n.normalizeValue(r[p]+m*(e.key===`PageUp`?a*10:a),p)))):l.includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:p,isChanged:!0}),i((0,o.replaceAt)(r,p,n.normalizeValue(r[p]-m*(e.key===`PageDown`?a*10:a),p)))):e.key===`Tab`?n.setState({draggedThumbIndex:-1},function(){f&&n.fireOnFinalChange()}):f&&n.fireOnFinalChange())},n.onKeyUp=function(e){var t=n.state.isChanged;n.setState({draggedThumbIndex:-1},function(){t&&n.fireOnFinalChange()})},n.onMove=function(e,t){var r=n.state,i=r.draggedThumbIndex,a=r.draggedTrackPos,c=n.props,l=c.direction,u=c.min,d=c.max,f=c.onChange,p=c.values,m=c.step,h=c.rtl;if(i===-1&&a[0]===-1&&a[1]===-1)return null;var g=n.trackRef.current;if(!g)return null;var _=g.getBoundingClientRect(),v=(0,o.isVertical)(l)?_.height:_.width;if(a[0]!==-1&&a[1]!==-1){var y=e-a[0],b=t-a[1],x=0;switch(l){case s.Direction.Right:case s.Direction.Left:x=y/v*(d-u);break;case s.Direction.Down:case s.Direction.Up:x=b/v*(d-u);break;default:(0,o.assertUnreachable)(l)}if(h&&(x*=-1),Math.abs(x)>=m/2){for(var S=0;S<n.thumbRefs.length;S++){if(p[S]===d&&Math.sign(x)===1||p[S]===u&&Math.sign(x)===-1)return;var C=p[S]+x;C>d?x=d-p[S]:C<u&&(x=u-p[S])}for(var w=p.slice(0),S=0;S<n.thumbRefs.length;S++)w=(0,o.replaceAt)(w,S,n.normalizeValue(p[S]+x,S));n.setState({draggedTrackPos:[e,t]}),f(w)}}else{var T=0;switch(l){case s.Direction.Right:T=(e-_.left)/v*(d-u)+u;break;case s.Direction.Left:T=(v-(e-_.left))/v*(d-u)+u;break;case s.Direction.Down:T=(t-_.top)/v*(d-u)+u;break;case s.Direction.Up:T=(v-(t-_.top))/v*(d-u)+u;break;default:(0,o.assertUnreachable)(l)}h&&(T=d+u-T),Math.abs(p[i]-T)>=m/2&&f((0,o.replaceAt)(p,i,n.normalizeValue(T,i)))}},n.normalizeValue=function(e,t){var r=n.props,i=r.min,a=r.max,s=r.step,c=r.allowOverlap,l=r.values;return(0,o.normalizeValue)(e,t,i,a,s,c,l)},n.onEnd=function(e){if(e.preventDefault(),document.removeEventListener(`mousemove`,n.schdOnMouseMove),document.removeEventListener(`touchmove`,n.schdOnTouchMove),document.removeEventListener(`mouseup`,n.schdOnEnd),document.removeEventListener(`touchend`,n.schdOnEnd),document.removeEventListener(`touchcancel`,n.schdOnEnd),n.state.draggedThumbIndex===-1&&n.state.draggedTrackPos[0]===-1&&n.state.draggedTrackPos[1]===-1)return null;n.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){n.fireOnFinalChange()})},n.fireOnFinalChange=function(){n.setState({isChanged:!1});var e=n.props,t=e.onFinalChange,r=e.values;t&&t(r)},n.updateMarkRefs=function(e){if(!e.renderMark){n.numOfMarks=void 0,n.markRefs=void 0;return}n.numOfMarks=(e.max-e.min)/n.props.step,n.markRefs=[];for(var t=0;t<n.numOfMarks+1;t++)n.markRefs[t]=a.createRef()},n.calculateMarkOffsets=function(){if(!(!n.props.renderMark||!n.trackRef||!n.numOfMarks||!n.markRefs||n.trackRef.current===null)){for(var e=window.getComputedStyle(n.trackRef.current),t=parseInt(e.width,10),r=parseInt(e.height,10),i=parseInt(e.paddingLeft,10),a=parseInt(e.paddingTop,10),o=[],c=0;c<n.numOfMarks+1;c++){var l=9999,u=9999;if(n.markRefs[c].current){var d=n.markRefs[c].current.getBoundingClientRect();l=d.height,u=d.width}n.props.direction===s.Direction.Left||n.props.direction===s.Direction.Right?o.push([Math.round(t/n.numOfMarks*c+i-u/2),-Math.round((l-r)/2)]):o.push([Math.round(r/n.numOfMarks*c+a-l/2),-Math.round((u-t)/2)])}n.setState({markOffsets:o})}},e.step===0)throw Error(`"step" property should be a positive number`);return n.schdOnMouseMove=(0,o.schd)(n.onMouseMove),n.schdOnTouchMove=(0,o.schd)(n.onTouchMove),n.schdOnEnd=(0,o.schd)(n.onEnd),n.thumbRefs=e.values.map(function(){return a.createRef()}),n.updateMarkRefs(e),n}return n.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.values,r=t.min,i=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener(`resize`,e.onResize)},unobserve:function(){return window.removeEventListener(`resize`,e.onResize)}},document.addEventListener(`touchstart`,this.onMouseOrTouchStart,{passive:!1}),document.addEventListener(`mousedown`,this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,o.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(t){return(0,o.checkBoundaries)(t,e.props.min,e.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,o.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),n.forEach(function(e){(0,o.isStepDivisible)(r,e,i)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},n.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.max,i=n.min,a=n.step,s=n.values,c=n.rtl;(e.max!==r||e.min!==i||e.step!==a)&&this.updateMarkRefs(this.props),(0,o.translateThumbs)(this.getThumbs(),this.getOffsets(),c),(e.max!==r||e.min!==i||e.step!==a||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),s.forEach(function(e){(0,o.isStepDivisible)(i,e,a)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},n.prototype.componentWillUnmount=function(){document.removeEventListener(`mousedown`,this.onMouseOrTouchStart,{passive:!1}),document.removeEventListener(`mousemove`,this.schdOnMouseMove),document.removeEventListener(`touchmove`,this.schdOnTouchMove),document.removeEventListener(`touchstart`,this.onMouseOrTouchStart),document.removeEventListener(`mouseup`,this.schdOnEnd),document.removeEventListener(`touchend`,this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},n.prototype.render=function(){var e=this,t=this.props,n=t.label,r=t.labelledBy,a=t.renderTrack,c=t.renderThumb,l=t.renderMark,u=l===void 0?function(){return null}:l,d=t.values,f=t.min,p=t.max,m=t.allowOverlap,h=t.disabled,g=this.state,_=g.draggedThumbIndex,v=g.thumbZIndexes,y=g.markOffsets;return a({props:{style:{transform:`scale(1)`,cursor:_>-1?`grabbing`:this.props.draggableTrack?(0,o.isVertical)(this.props.direction)?`ns-resize`:`ew-resize`:d.length===1&&!h?`pointer`:`inherit`},onMouseDown:h?o.voidFn:this.onMouseDownTrack,onTouchStart:h?o.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:h,children:i(i([],y.map(function(t,n,r){return u({props:{style:e.props.direction===s.Direction.Left||e.props.direction===s.Direction.Right?{position:`absolute`,left:`${t[0]}px`,marginTop:`${t[1]}px`}:{position:`absolute`,top:`${t[0]}px`,marginLeft:`${t[1]}px`},key:`mark${n}`,ref:e.markRefs[n]},index:n})}),!0),d.map(function(t,i){var a=e.state.draggedThumbIndex===i;return c({index:i,value:t,isDragged:a,props:{style:{position:`absolute`,zIndex:v[i],cursor:h?`inherit`:a?`grabbing`:`grab`,userSelect:`none`,touchAction:`none`,WebkitUserSelect:`none`,MozUserSelect:`none`,msUserSelect:`none`},key:i,tabIndex:h?void 0:0,"aria-valuemax":m?p:d[i+1]||p,"aria-valuemin":m?f:d[i-1]||f,"aria-valuenow":t,draggable:!1,ref:e.thumbRefs[i],"aria-label":n,"aria-labelledby":r,role:`slider`,onKeyDown:h?o.voidFn:e.onKeyDown,onKeyUp:h?o.voidFn:e.onKeyUp}})}),!0)})},n.defaultProps={label:`Accessibility label`,labelledBy:null,step:1,direction:s.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(a.Component),E}var P;function F(){return P||(P=1,function(e){var t=T&&T.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0,e.Range=t(ee()).default;var n=M();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return n.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return n.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return n.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return n.checkValuesAgainstBoundaries}});var r=A();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return r.Direction}})}(T)),T}var te=F();function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?I(Object(n),!0).forEach(function(t){ne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var re=s(`div`,{position:`relative`,width:`100%`});re.displayName=`Root`,re.displayName=`Root`,re.displayName=`StyledRoot`;var ie=s(`div`,function(e){var t=e.$theme,n=e.$value,r=n===void 0?[]:n,i=e.$disabled,a=e.$isDragged,o=t.sizing,s=`inherit`;return i?s=`not-allowed`:a?s=`grabbing`:r.length===1&&(s=`pointer`),{paddingTop:o.scale600,paddingBottom:o.scale600,paddingRight:o.scale600,paddingLeft:o.scale600,display:`flex`,cursor:s,backgroundColor:t.colors.sliderTrackFill}});ie.displayName=`Track`,ie.displayName=`Track`,ie.displayName=`StyledTrack`;var R=s(`div`,function(e){var t=e.$theme,n=e.$value,r=n===void 0?[]:n,i=e.$min,a=e.$max,o=e.$disabled,s=t.colors,c=t.borders,l=t.direction,u=t.borders.useRoundedCorners?c.radius100:0;return{borderTopLeftRadius:u,borderTopRightRadius:u,borderBottomRightRadius:u,borderBottomLeftRadius:u,background:te.getTrackBackground({values:r,colors:r.length===1?[o?s.borderOpaque:s.primary,o?s.backgroundSecondary:s.borderOpaque]:[o?s.backgroundSecondary:s.borderOpaque,o?s.borderOpaque:s.primary,o?s.backgroundSecondary:s.borderOpaque],min:i||0,max:a||0,rtl:l===`rtl`}),height:`2px`,width:`100%`,alignSelf:`center`,cursor:o?`not-allowed`:`inherit`}});R.displayName=`InnerTrack`,R.displayName=`InnerTrack`,R.displayName=`StyledInnerTrack`;var ae=s(`div`,function(e){return{width:`4px`,height:`2px`,backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:`16px`}});ae.displayName=`Mark`,ae.displayName=`Mark`,ae.displayName=`StyledMark`;var z=s(`div`,function(e){return L(L({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});z.displayName=`Tick`,z.displayName=`Tick`,z.displayName=`StyledTick`;var B=s(`div`,function(e){var t=e.$theme.sizing;return{display:`flex`,justifyContent:`space-between`,alignItems:`center`,paddingRight:t.scale600,paddingLeft:t.scale600,paddingBottom:t.scale400}});B.displayName=`TickBar`,B.displayName=`TickBar`,B.displayName=`StyledTickBar`;var V=s(`div`,function(e){var t=e.$theme,n=e.$value,r=n===void 0?[]:n,i=e.$thumbIndex,a=e.$disabled,o=r.length===2&&i===0,s=r.length===2&&i===1;return t.direction===`rtl`&&(s||o)&&(o=!o,s=!s),{height:`24px`,width:`24px`,borderTopLeftRadius:`24px`,borderTopRightRadius:`24px`,borderBottomLeftRadius:`24px`,borderBottomRightRadius:`24px`,display:`flex`,justifyContent:`center`,alignItems:`center`,backgroundColor:a?t.colors.sliderHandleFillDisabled:t.colors.sliderHandleFill,outline:`none`,boxShadow:e.$isFocusVisible?`0 0 0 3px ${t.colors.accent}`:`0 1px 4px rgba(0, 0, 0, 0.12)`,cursor:a?`not-allowed`:`inherit`}});V.displayName=`Thumb`,V.displayName=`Thumb`,V.displayName=`StyledThumb`;var H=s(`div`,function(e){var t=e.$disabled,n=e.$theme;return{position:`absolute`,top:`-16px`,width:`4px`,height:`20px`,backgroundColor:t?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});H.displayName=`InnerThumb`,H.displayName=`InnerThumb`,H.displayName=`StyledInnerThumb`;var U=s(`div`,function(e){var t=e.$disabled,n=e.$theme;return L(L({position:`absolute`,top:`-${n.sizing.scale1400}`},n.typography.font200),{},{backgroundColor:t?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:`48px`,borderBottomRightRadius:`48px`,borderTopLeftRadius:`48px`,borderTopRightRadius:`48px`,whiteSpace:`nowrap`})});U.displayName=`ThumbValue`,U.displayName=`ThumbValue`,U.displayName=`StyledThumbValue`;function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?W(Object(n),!0).forEach(function(t){se(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G.apply(this,arguments)}function K(e,t){return ue(e)||le(e,t)||q(e,t)||ce()}function ce(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q(e,t){if(e){if(typeof e==`string`)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}}function J(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function le(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function ue(e){if(Array.isArray(e))return e}var de=function(e){if(e.length>2||e.length===0)throw Error(`the value prop represents positions of thumbs, so its length can be only one or two`);return e};function Y(t){var r=t.overrides,a=r===void 0?{}:r,o=t.disabled,s=o===void 0?!1:o,c=t.marks,d=c===void 0?!1:c,f=t.onChange,p=f===void 0?function(){}:f,m=t.onFinalChange,h=m===void 0?function(){}:m,g=t.min,_=g===void 0?0:g,v=t.max,y=v===void 0?100:v,b=t.step,x=b===void 0?1:b,S=t.persistentThumb,C=S===void 0?!1:S,T=t.valueToLabel,E=T===void 0?function(e){return e}:T,D=t.value,O=w.useContext(u),k=K(w.useState(!1),2),A=k[0],j=k[1],M=K(w.useState(!1),2),N=M[0],ee=M[1],P=K(w.useState(!1),2),F=P[0],I=P[1],L=K(w.useState(-1),2),ne=L[0],W=L[1],se=w.useCallback(function(e){l(e)&&I(!0),W(e.target.parentNode.firstChild===e.target?0:1)},[]),ce=w.useCallback(function(e){F!==!1&&I(!1),W(-1)},[]),q=de(D),J={$disabled:s,$step:x,$min:_,$max:y,$marks:d,$value:q,$isFocusVisible:F},le=K(e(a.Root,re),2),ue=le[0],Y=le[1],fe=K(e(a.Track,ie),2),pe=fe[0],me=fe[1],he=K(e(a.InnerTrack,R),2),ge=he[0],_e=he[1],ve=K(e(a.Thumb,V),2),X=ve[0],Z=ve[1],ye=K(e(a.InnerThumb,H),2),be=ye[0],xe=ye[1],Se=K(e(a.ThumbValue,U),2),Ce=Se[0],we=Se[1],Te=K(e(a.Tick,z),2),Ee=Te[0],Q=Te[1],De=K(e(a.TickBar,B),2),Oe=De[0],$=De[1],ke=K(e(a.Mark,ae),2),Ae=ke[0],je=ke[1];return w.createElement(ue,G({"data-baseweb":`slider`},J,Y,{onFocus:i(Y,se),onBlur:n(Y,ce)}),w.createElement(te.Range,G({step:x,min:_,max:y,values:q,disabled:s,onChange:function(e){return p({value:e})},onFinalChange:function(e){return h({value:e})},rtl:O.direction===`rtl`,renderTrack:function(e){var t=e.props,n=e.children,r=e.isDragged;return w.createElement(pe,G({onMouseDown:t.onMouseDown,onTouchStart:t.onTouchStart,$isDragged:r},J,me),w.createElement(ge,G({$isDragged:r,ref:t.ref},J,_e),n))},renderThumb:function(e){var t=e.props,n=e.index,r=e.isDragged,i=C||(!!n&&N||!n&&A||r)&&!s;return w.createElement(X,G({},t,{onMouseEnter:function(){n===0?j(!0):ee(!0)},onMouseLeave:function(){n===0?j(!1):ee(!1)},$thumbIndex:n,$isDragged:r,style:oe({},t.style)},J,Z,{$isFocusVisible:F&&ne===n}),i&&w.createElement(Ce,G({$thumbIndex:n,$isDragged:r},J,we),E(q[n])),i&&w.createElement(be,G({$thumbIndex:n,$isDragged:r},J,xe)))}},d?{renderMark:function(e){var t=e.props,n=e.index;return w.createElement(Ae,G({$markIndex:n},t,J,je))}}:{})),w.createElement(Oe,G({},J,$),w.createElement(Ee,G({},J,Q),E(_)),w.createElement(Ee,G({},J,Q),E(y))))}var fe=g(`div`,{target:`ew7r33m5`})({name:`igqoeg`,styles:`position:relative;:focus-within:has(:focus-visible){--slider-focused:1;}`}),pe=g(`div`,{target:`ew7r33m4`})(({disabled:e,theme:t,isDragged:n})=>({alignItems:`center`,backgroundColor:e?t.colors.gray60:t.colors.primary,borderTopLeftRadius:`100%`,borderTopRightRadius:`100%`,borderBottomLeftRadius:`100%`,borderBottomRightRadius:`100%`,borderTopStyle:`none`,borderBottomStyle:`none`,borderRightStyle:`none`,borderLeftStyle:`none`,display:`flex`,justifyContent:`center`,height:t.sizes.sliderThumb,width:t.sizes.sliderThumb,boxShadow:n?t.shadows.focusRing:t.shadows.none,":focus":{outline:`none`},":focus-visible":{boxShadow:t.shadows.focusRing}}),``),me=g(`div`,{target:`ew7r33m3`})(({disabled:e,theme:t})=>({fontFamily:t.genericFonts.bodyFont,fontSize:t.fontSizes.sm,color:e?t.colors.gray60:t.colors.primary,top:`-1.6em`,position:`absolute`,whiteSpace:`nowrap`,backgroundColor:t.colors.transparent,lineHeight:t.lineHeights.base,fontWeight:t.fontWeights.normal,pointerEvents:`none`}),``),he=g(`div`,{target:`ew7r33m2`})({name:`82a6rk`,styles:`flex:1`}),ge=g(`div`,{target:`ew7r33m1`})(({theme:e})=>({position:`absolute`,height:e.spacing.twoXS,left:`calc(${e.sizes.sliderThumb} / 2)`,right:`calc(${e.sizes.sliderThumb} / 2)`}),``),_e=g(`div`,{target:`ew7r33m0`})(({theme:e,isHovered:t,isDisabled:n})=>({position:`absolute`,left:0,right:0,top:`100%`,display:`flex`,justifyContent:`space-between`,pointerEvents:`none`,marginTop:`-${e.spacing.md}`,fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.base,fontWeight:e.fontWeights.normal,color:n?e.colors.fadedText40:e.colors.fadedText60,opacity:t?1:`var(--slider-focused, 0)`,transition:t?`none`:`opacity 300ms 200ms`}),``);function ve({minLabel:e,maxLabel:n,isHovered:r,isDisabled:i}){return t.jsxs(_e,{"data-testid":`stSliderTickBar`,isHovered:r,isDisabled:i,children:[t.jsx(m,{source:e,allowHTML:!1,inheritFont:!0,isLabel:!0}),t.jsx(m,{source:n,allowHTML:!1,inheritFont:!0,isLabel:!0})]})}function X(e){return e.type===p.Type.SELECT_SLIDER}function Z(e,t,n){return e.map((e,r)=>{let i=t.indexOf(e);return i>=0?i:n[r]??0})}function ye(e,t){return e.map(e=>t[e]??``)}function be({disabled:e,element:n,widgetMgr:r,fragmentId:i}){let[a,s]=S({getStateFromWidgetMgr:xe,getDefaultStateFromProto:Se,getCurrStateFromProto:Ce,updateWidgetMgrState:we,element:n,widgetMgr:r,fragmentId:i,formClearBehavior:`resetValueOnly`,queryParamBinding:n.queryParamKey?{paramKey:n.queryParamKey,valueType:X(n)?`string_array_value`:`double_array_value`,clearable:!1,urlFormat:`repeated`,urlDefault:X(n)?ye(n.default,n.options):void 0,dateType:Te(n)?Ee(n):void 0}:void 0}),[l,u]=(0,w.useState)(a),[p,g]=(0,w.useState)(!1),[_,v]=(0,w.useState)(!1),y=(0,w.useCallback)(()=>g(!0),[]),C=(0,w.useCallback)(()=>g(!1),[]),T=(0,w.useRef)(null),[E]=(0,w.useState)([]),[D]=(0,w.useState)([]),O=c(),k=(0,w.useRef)(n);k.current=n;let A=l.map(e=>Q(e,n)),j=Q(n.min,n),M=Q(n.max,n);(0,w.useEffect)(()=>{u(a)},[a]),f(()=>{if(!X(n))return;let e=r.getStringArrayValue(n);e!==void 0&&u(Z(e,n.options,n.default))},[n.options],(e,t)=>o(e[0],t[0]));let N=(0,w.useCallback)(({value:e})=>{s({value:e,fromUi:!0}),v(!1)},[s]),ee=(0,w.useCallback)(({value:e})=>{u(e),v(!0)},[]),P=(0,w.useCallback)((0,w.forwardRef)(function(e,n){let{$thumbIndex:r,$value:i}=e,a=r||0;E[a]=n,D[a]||=(0,w.createRef)();let o=h(e,[`role`,`style`,`aria-valuemax`,`aria-valuemin`,`aria-valuenow`,`tabIndex`,`onKeyUp`,`onKeyDown`,`onMouseEnter`,`onMouseLeave`,`draggable`]),s=k.current,c=Q((i??[s.min])[a]??s.min,s);return t.jsx(pe,{...o,disabled:e.$disabled===!0,isDragged:e.$isDragged===!0,ref:E[a],"aria-valuetext":c,"aria-label":s.label,children:t.jsx(me,{"data-testid":`stSliderThumbValue`,disabled:e.$disabled===!0,ref:D[a],children:t.jsx(m,{source:c,allowHTML:!1,inheritFont:!0,isLabel:!0})})})}),[]);(0,w.useLayoutEffect)(()=>{E.forEach((e,t)=>{e.current&&e.current.setAttribute(`aria-valuetext`,A[t])});let e=T.current??null,t=E[0].current,n=E[1]?.current,r=D[0].current,i=D[1]?.current;Oe(e,t,n,r,i)});let F=(0,w.useCallback)(({$disabled:e})=>({height:O.spacing.twoXS,...e?{background:O.colors.darkenedBgMix25}:{}}),[O.colors.darkenedBgMix25,O.spacing.twoXS]),te=(0,w.useCallback)((0,w.forwardRef)(function(e,n){let{children:r,...i}=e;return t.jsxs(he,{children:[t.jsx(ge,{ref:n,children:r}),t.jsx(R,{...i,style:F({$disabled:e.$disabled})})]})}),[]);return t.jsxs(fe,{ref:T,className:`stSlider`,"data-testid":`stSlider`,onMouseEnter:y,onMouseLeave:C,children:[t.jsx(b,{label:n.label,disabled:e,labelVisibility:d(n.labelVisibility?.value),children:n.help&&t.jsx(x,{content:n.help,label:n.label})}),t.jsx(Y,{min:n.min,max:n.max,step:n.step,value:De(l,n),onChange:ee,onFinalChange:N,disabled:e,overrides:{Thumb:P,Track:{style:{backgroundColor:`none !important`,paddingLeft:O.spacing.none,paddingRight:O.spacing.none,paddingTop:`calc((${O.sizes.minElementHeight} - ${O.spacing.twoXS}) / 2)`,paddingBottom:`calc((${O.sizes.minElementHeight} - ${O.spacing.twoXS}) / 2)`}},InnerTrack:te,TickBar:{component:ve,props:{minLabel:j,maxLabel:M,isHovered:p||_,isDisabled:e}}}})]})}function xe(e,t){if(X(t)){let n=e.getStringArrayValue(t);return n===void 0?void 0:Z(n,t.options,t.default)}return e.getDoubleArrayValue(t)}function Se(e){return e.default}function Ce(e){if(X(e)){let t=e.rawValue;return t&&t.length>0?Z(t,e.options,e.default):e.default}return e.value}function we(e,t,n,r){if(X(e)){let i=ye(n.value,e.options);t.setStringArrayValue(e,i,{fromUi:n.fromUi},r)}else t.setDoubleArrayValue(e,n.value,{fromUi:n.fromUi},r)}function Te(e){let{dataType:t}=e;return t===p.DataType.DATETIME||t===p.DataType.DATE||t===p.DataType.TIME}function Ee(e){let{dataType:t}=e;return t===p.DataType.DATE?`date`:t===p.DataType.TIME?`time`:`datetime`}function Q(e,t){let{format:n,options:r}=t;return r.length>0?r[e]??``:Te(t)?y(_.utc(e/1e3),n,Ee(t)):v(e,n)}function De(e,t){let{min:n,max:r}=t,i=e[0],a=e.length>1?e[1]:e[0];return i>a&&(i=a),i<n&&(i=n),i>r&&(i=r),a<n&&(a=n),a>r&&(a=r),e.length>1?[i,a]:[i]}function Oe(e,t,n,r,i){!e||!t||!r||($(e,t,r),n&&i&&($(e,n,i),ke(e,t,n,r,i)))}function $(e,t,n){let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=n.getBoundingClientRect(),o=i.left+i.width/2,s=o-a.width/2<r.left,c=o+a.width/2>r.right;n.style.left=s?`0`:``,n.style.right=c?`0`:``}function ke(e,t,n,r,i){let a=e.getBoundingClientRect(),o=t.getBoundingClientRect(),s=n.getBoundingClientRect(),c=r.getBoundingClientRect(),l=i.getBoundingClientRect(),u=a.left+a.width/2,d=o.left+o.width/2,f=s.left+s.width/2,p=d-c.width/2>=a.left,m=f+l.width/2<=a.right,h=o.left-c.width>=a.left,g=s.right+l.width<=a.right,_=p?c.width/2:c.width,v=m?l.width/2:l.width,y=d+_;if(f-v-y>24){$(e,t,r),$(e,n,i);return}if(h&&g){r.style.left=``,r.style.right=`${Math.round(o.width)}px`,i.style.left=`${Math.round(s.width)}px`,i.style.right=``;return}d<u?($(e,t,r),i.style.left=`${Math.round(d+_+24-f)}px`,i.style.right=``):($(e,n,i),r.style.left=``,r.style.right=`${-Math.round(f-v-24-d)}px`)}var Ae=C((0,w.memo)(be));export{Ae as default};