@stlite/desktop 0.81.6 → 0.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/build/assets/{FileDownload.esm-Bpf_IJaz.js → FileDownload.esm-Bzb3HjS9.js} +1 -1
  2. package/build/assets/{FileHelper-BEtUZCB8.js → FileHelper-BNpeYRlH.js} +1 -1
  3. package/build/assets/{FormClearHelper--a7FEpt-.js → FormClearHelper-DxeY-rII.js} +1 -1
  4. package/build/assets/{Hooks-2PqJRMDp.js → Hooks-BOkao1bO.js} +1 -1
  5. package/build/assets/{InputInstructions-GAhfSEnF.js → InputInstructions-DuxSO2sS.js} +1 -1
  6. package/build/assets/{ProgressBar-Col3VLE4.js → ProgressBar-xr2SnNK1.js} +1 -1
  7. package/build/assets/{RenderInPortalIfExists-qnP8SYNG.js → RenderInPortalIfExists-D-C7LcEp.js} +1 -1
  8. package/build/assets/{Toolbar-Ce_uRMJw.js → Toolbar-CJ0mD5An.js} +1 -1
  9. package/build/assets/{base-input-BHEia47e.js → base-input-NsRtpzFx.js} +1 -1
  10. package/build/assets/{checkbox-Cddx6i3F.js → checkbox-Dj0lswiB.js} +1 -1
  11. package/build/assets/{createSuper-RDzkTe3c.js → createSuper-Ipqc67nc.js} +1 -1
  12. package/build/assets/{data-grid-overlay-editor-D6T-ER_q.js → data-grid-overlay-editor-BDv7jlce.js} +1 -1
  13. package/build/assets/{downloader-DaEpMxPx.js → downloader-CaOAUbUF.js} +1 -1
  14. package/build/assets/{es6-CcuZyssh.js → es6-BZHzmZtr.js} +2 -2
  15. package/build/assets/{iframeResizer.contentWindow-DHS7Pu0i.js → iframeResizer.contentWindow-CHGlD-N9.js} +1 -1
  16. package/build/assets/{index-CyYl-5F4.js → index-7fVMC6lw.js} +1 -1
  17. package/build/assets/{index-DW287fpb.js → index-B-LSEdUZ.js} +1 -1
  18. package/build/assets/{index-C-2rT3oM.js → index-B-ykjfbX.js} +1 -1
  19. package/build/assets/{index-DHl89CCF.js → index-B4X2D_eW.js} +1 -1
  20. package/build/assets/{index-D07bwkWY.js → index-BTv0oYZW.js} +1 -1
  21. package/build/assets/{index-BXlqmLSw.js → index-BfXMsSNA.js} +5 -5
  22. package/build/assets/{index-7eIEqW6S.js → index-BtnOdn6v.js} +1 -1
  23. package/build/assets/{index-CreZOv_n.js → index-BwTtx5nh.js} +1 -1
  24. package/build/assets/{index-DpOOTQ4a.js → index-By6Q65Pf.js} +1 -1
  25. package/build/assets/{index-C7q_Bsxr.js → index-C7CxGGAJ.js} +1 -1
  26. package/build/assets/{index-LZMzKd6i.js → index-CA7xtrC9.js} +1 -1
  27. package/build/assets/{index-qnESYKH3.js → index-CHhIqZol.js} +1 -1
  28. package/build/assets/{index-qZBF_Zup.js → index-CRx6-P3W.js} +1 -1
  29. package/build/assets/{index-BWOzAKM3.js → index-CTC0h65f.js} +1 -1
  30. package/build/assets/{index-85lABG_-.js → index-CUa9G_2w.js} +1 -1
  31. package/build/assets/{index-LZAWp2JT.js → index-Ck_7L8T4.js} +1 -1
  32. package/build/assets/{index-BSeIgN9k.js → index-Cns8y39_.js} +1 -1
  33. package/build/assets/{index-vdtOYA7b.js → index-CnyprtY_.js} +1 -1
  34. package/build/assets/{index-DN8Z5yj8.js → index-CoJDuQ5Y.js} +1 -1
  35. package/build/assets/{index-Pc9U3GV3.js → index-Cp10Db30.js} +1 -1
  36. package/build/assets/{index-qBaGcpp3.js → index-Cyc3gr_v.js} +1 -1
  37. package/build/assets/{index-YQk3COsD.js → index-D1dbR74e.js} +1 -1
  38. package/build/assets/{index-C4IBAvYi.js → index-D9Fv1oGe.js} +1 -1
  39. package/build/assets/{index-BQjJjeMH.js → index-D9ZJ5ysG.js} +1 -1
  40. package/build/assets/{index-Oz9-OY6E.js → index-DJZ72tug.js} +1 -1
  41. package/build/assets/{index-C2JTCZRI.js → index-DMVOLuV0.js} +1 -1
  42. package/build/assets/{index-VB1U8aCl.js → index-DX_vgtQT.js} +1 -1
  43. package/build/assets/{index-CZyeXUIr.js → index-DbTxB5ik.js} +1 -1
  44. package/build/assets/{index-DF2Bv2Iu.js → index-DeRs-vXN.js} +1 -1
  45. package/build/assets/{index-ma8H1oet.js → index-DhYvQko1.js} +1 -1
  46. package/build/assets/{index-CngYL5q1.js → index-Dk-OPVLJ.js} +1 -1
  47. package/build/assets/{index-CunpKDCO.js → index-DrIrAYez.js} +1 -1
  48. package/build/assets/{index-CvsR1I3L.js → index-DvUGK7b6.js} +1 -1
  49. package/build/assets/{index-DcrwU5E6.js → index-GJHR2pBi.js} +1 -1
  50. package/build/assets/{index-NYCOzVlX.js → index-OxGwEg3m.js} +12 -12
  51. package/build/assets/{index-BimHN13b.js → index-SCb8nZ6H.js} +1 -1
  52. package/build/assets/{index-DDA7JyBJ.js → index-zPhSbuEH.js} +1 -1
  53. package/build/assets/{inherits-DMADb7u9.js → inherits-BbfuKc-R.js} +1 -1
  54. package/build/assets/{input-DdxVQNZ7.js → input-CkptI290.js} +1 -1
  55. package/build/assets/{memory-_2PWlQG6.js → memory-BDEJOdDh.js} +1 -1
  56. package/build/assets/{mergeWith-THRzgcPq.js → mergeWith-D2cULMN8.js} +1 -1
  57. package/build/assets/{number-overlay-editor-D5Yhw2y2.js → number-overlay-editor-cmVGLaYJ.js} +1 -1
  58. package/build/assets/{sandbox-D8Np0x1K.js → sandbox-VVt-VWM8.js} +1 -1
  59. package/build/assets/{slicedToArray-CiQSSrYz.js → slicedToArray-HZKHLTaA.js} +1 -1
  60. package/build/assets/{textarea-r4-zB_B9.js → textarea-Cy6EVtfz.js} +1 -1
  61. package/build/assets/{timepicker-Dz1EXIQj.js → timepicker-DQlSkM-Q.js} +1 -1
  62. package/build/assets/{uniqueId-C8rYCZew.js → uniqueId-Dka3DuQQ.js} +1 -1
  63. package/build/assets/{useBasicWidgetState-vUy8Wspy.js → useBasicWidgetState-Bm5AJWX7.js} +1 -1
  64. package/build/assets/{useOnInputChange-Cl7V3cFN.js → useOnInputChange-C3lvbUNp.js} +1 -1
  65. package/build/assets/{withFullScreenWrapper-D7Ouz6kJ.js → withFullScreenWrapper-CEJUxUJC.js} +1 -1
  66. package/build/assets/{worker-BlovaCIP.js → worker-eTai8nRu.js} +1 -1
  67. package/build/index.html +1 -1
  68. package/build/pyodide/pyodide-lock.json +1 -1
  69. package/build/pyodide/pyodide.asm.js +1 -1
  70. package/build/pyodide/pyodide.asm.wasm +0 -0
  71. package/build/pyodide/pyodide.mjs +3 -3
  72. package/build/pyodide/python_stdlib.zip +0 -0
  73. package/package.json +6 -6
  74. package/wheels/streamlit-1.44.1-cp312-none-any.whl +0 -0
@@ -1 +1 @@
1
- import{r,E as _,_ as P,d6 as y,L as f,N as G,l as ne,c as S,A as de,bO as ue,cY as ce,j as l,bY as pe,bZ as me,cb as be,b_ as fe,bH as ge,bW as K}from"./index-NYCOzVlX.js";import{u as he}from"./uniqueId-C8rYCZew.js";import{u as ve}from"./FormClearHelper--a7FEpt-.js";import{I as ye}from"./InputInstructions-GAhfSEnF.js";import{s as we}from"./sprintf-D7DtBTRn.js";import{I as Ie}from"./input-DdxVQNZ7.js";import"./base-input-BHEia47e.js";var X=r.forwardRef(function(e,t){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(_,P({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),r.createElement("path",{d:"M0 3v2h8V3H0z"}))});X.displayName="Minus";var Y=r.forwardRef(function(e,t){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(_,P({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),r.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Y.displayName="Plus";const Te=ne.getLogger("NumberInput");function xe(e){return f(e)||e===""?void 0:e}const z=({value:e,format:t,step:o,dataType:b})=>{if(f(e))return null;let c=xe(t);if(f(c)&&G(o)){const i=o.toString();b===y.DataType.FLOAT&&o!==0&&i.includes(".")&&(c=`%0.${i.split(".")[1].length}f`)}if(f(c))return e.toString();try{return we.sprintf(c,e)}catch(i){return Te.warn(`Error in sprintf(${c}, ${e}): ${i}`),String(e)}},ke=(e,t,o)=>f(e)?!1:e-t>=o,Ce=(e,t,o)=>f(e)?!1:e+t<=o,Re=e=>(e.element.dataType===y.DataType.INT?e.widgetMgr.getIntValue(e.element):e.widgetMgr.getDoubleValue(e.element))??e.element.default??null,Z=({step:e,dataType:t})=>e||(t===y.DataType.INT?1:.01),Se=S("div",{target:"e116k4er3"})(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:e.sizes.minElementHeight,borderWidth:e.sizes.borderWidth,borderStyle:"solid",borderColor:e.colors.widgetBorderColor??e.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:e.radii.default,overflow:"hidden","&.focused":{borderColor:e.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:e.spacing.none}}}),""),Ve=S("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),q=S("button",{target:"e116k4er1"})(({theme:e})=>({margin:e.spacing.none,border:"none",height:e.sizes.full,display:"flex",alignItems:"center",width:e.sizes.numberInputControlsWidth,justifyContent:"center",color:e.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:e.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:e.colors.white,backgroundColor:e.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:e.radii.default,borderBottomRightRadius:e.radii.default},"&:disabled":{cursor:"not-allowed",color:e.colors.fadedText40}}),""),De=S("div",{target:"e116k4er0"})(({theme:e,clearable:t})=>({position:"absolute",marginRight:e.spacing.twoXS,left:0,right:`calc(${e.sizes.numberInputControlsWidth} * 2 + ${t?"1em":"0em"})`}),""),Ee=({disabled:e,element:t,widgetMgr:o,fragmentId:b})=>{var c;const i=de(),{dataType:V,id:D,formId:p,default:W,format:A,min:g,max:h}=t,[B,J]=ue(),[s,Q]=r.useState(()=>Z(t)),F=Re({element:t,widgetMgr:o}),[v,w]=r.useState(!1),[d,I]=r.useState(F),[L,T]=r.useState(()=>z({value:F,...t,step:s})),[M,H]=r.useState(!1),x=r.useRef(null),U=r.useRef(he("number_input_")),k=ke(d,s,g),C=Ce(d,s,h),$=ce({formId:p}),ee=$?o.allowFormEnterToSubmit(p):v,te=M&&B>i.breakpoints.hideWidgetDetails;r.useEffect(()=>{Q(Z({step:t.step,dataType:t.dataType}))},[t.dataType,t.step]);const u=r.useCallback(({value:a,source:n})=>{var m;if(G(a)&&(g>a||a>h))(m=x.current)==null||m.reportValidity();else{const R=a??W??null;switch(V){case y.DataType.INT:o.setIntValue({id:D,formId:p},R,n,b);break;case y.DataType.FLOAT:o.setDoubleValue({id:D,formId:p},R,n,b);break;default:throw new Error("Invalid data type")}w(!1),I(R),T(z({value:R,dataType:V,format:A,step:s}))}},[g,h,x,o,b,s,V,D,p,W,A]),re=r.useCallback(()=>{v&&u({value:d,source:{fromUi:!0}}),H(!1)},[v,d,u]),ae=r.useCallback(()=>{H(!0)},[]),O=r.useCallback(()=>{const{value:a}=t;t.setValue=!1,I(a??null),T(z({value:a??null,...t,step:s})),u({value:a??null,source:{fromUi:!1}})},[t,s,u]);r.useEffect(()=>{t.setValue?O():u({value:d,source:{fromUi:!1}});const a=x.current;if(a){const n=m=>{m.preventDefault()};return a.addEventListener("wheel",n),()=>{a.removeEventListener("wheel",n)}}},[]),t.setValue&&O();const E=f(t.default)&&!e,oe=r.useCallback(()=>{const a=t.default??null;I(a),u({value:a,source:{fromUi:!0}})},[t]);ve({element:t,widgetMgr:o,onFormCleared:oe});const ie=a=>{const{value:n}=a.target;if(n==="")w(!0),I(null),T(null);else{let m;t.dataType===y.DataType.INT?m=parseInt(n,10):m=parseFloat(n),w(!0),I(m),T(n)}},N=r.useCallback(()=>{C&&(w(!0),u({value:(d??g)+s,source:{fromUi:!0}}))},[d,g,s,C]),j=r.useCallback(()=>{k&&(w(!0),u({value:(d??h)-s,source:{fromUi:!0}}))},[d,h,s,k]),le=r.useCallback(a=>{const{key:n}=a;switch(n){case"ArrowUp":a.preventDefault(),N();break;case"ArrowDown":a.preventDefault(),j();break}},[N,j]),se=r.useCallback(a=>{a.key==="Enter"&&(v&&u({value:d,source:{fromUi:!0}}),o.allowFormEnterToSubmit(p)&&o.submitForm(p,b))},[v,d,u,o,p,b]);return l.jsxs("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:J,children:[l.jsx(pe,{label:t.label,disabled:e,labelVisibility:me((c=t.labelVisibility)==null?void 0:c.value),htmlFor:U.current,children:t.help&&l.jsx(be,{children:l.jsx(fe,{content:t.help,placement:ge.TOP_RIGHT})})}),l.jsxs(Se,{className:M?"focused":"","data-testid":"stNumberInputContainer",children:[l.jsx(Ie,{type:"number",inputRef:x,value:L??"",placeholder:t.placeholder,onBlur:re,onFocus:ae,onChange:ie,onKeyPress:se,onKeyDown:le,clearable:E,clearOnEscape:E,disabled:e,"aria-label":t.label,id:U.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:i.colors.darkGray,padding:i.spacing.threeXS,height:i.sizes.clearIconSize,width:i.sizes.clearIconSize,":hover":{fill:i.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:g,max:h,type:"number",inputMode:""},style:{lineHeight:i.lineHeights.inputWidget,paddingRight:i.spacing.sm,paddingLeft:i.spacing.md,paddingBottom:i.spacing.sm,paddingTop:i.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0}}}}),B>i.breakpoints.hideNumberInputControls&&l.jsxs(Ve,{children:[l.jsx(q,{"data-testid":"stNumberInputStepDown",onClick:j,disabled:!k||e,tabIndex:-1,children:l.jsx(K,{content:X,size:"xs",color:k?"inherit":i.colors.disabled})}),l.jsx(q,{"data-testid":"stNumberInputStepUp",onClick:N,disabled:!C||e,tabIndex:-1,children:l.jsx(K,{content:Y,size:"xs",color:C?"inherit":i.colors.disabled})})]})]}),te&&l.jsx(De,{clearable:E,children:l.jsx(ye,{dirty:v,value:L??"",inForm:$,allowEnterToSubmit:ee})})]})},Ne=r.memo(Ee);export{Ne as default};
1
+ import{r,E as _,_ as P,d6 as y,L as f,N as G,l as ne,c as S,A as de,bO as ue,cY as ce,j as l,bY as pe,bZ as me,cb as be,b_ as fe,bH as ge,bW as K}from"./index-OxGwEg3m.js";import{u as he}from"./uniqueId-Dka3DuQQ.js";import{u as ve}from"./FormClearHelper-DxeY-rII.js";import{I as ye}from"./InputInstructions-DuxSO2sS.js";import{s as we}from"./sprintf-D7DtBTRn.js";import{I as Ie}from"./input-CkptI290.js";import"./base-input-NsRtpzFx.js";var X=r.forwardRef(function(e,t){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(_,P({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),r.createElement("path",{d:"M0 3v2h8V3H0z"}))});X.displayName="Minus";var Y=r.forwardRef(function(e,t){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(_,P({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),r.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Y.displayName="Plus";const Te=ne.getLogger("NumberInput");function xe(e){return f(e)||e===""?void 0:e}const z=({value:e,format:t,step:o,dataType:b})=>{if(f(e))return null;let c=xe(t);if(f(c)&&G(o)){const i=o.toString();b===y.DataType.FLOAT&&o!==0&&i.includes(".")&&(c=`%0.${i.split(".")[1].length}f`)}if(f(c))return e.toString();try{return we.sprintf(c,e)}catch(i){return Te.warn(`Error in sprintf(${c}, ${e}): ${i}`),String(e)}},ke=(e,t,o)=>f(e)?!1:e-t>=o,Ce=(e,t,o)=>f(e)?!1:e+t<=o,Re=e=>(e.element.dataType===y.DataType.INT?e.widgetMgr.getIntValue(e.element):e.widgetMgr.getDoubleValue(e.element))??e.element.default??null,Z=({step:e,dataType:t})=>e||(t===y.DataType.INT?1:.01),Se=S("div",{target:"e116k4er3"})(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:e.sizes.minElementHeight,borderWidth:e.sizes.borderWidth,borderStyle:"solid",borderColor:e.colors.widgetBorderColor??e.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:e.radii.default,overflow:"hidden","&.focused":{borderColor:e.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:e.spacing.none}}}),""),Ve=S("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),q=S("button",{target:"e116k4er1"})(({theme:e})=>({margin:e.spacing.none,border:"none",height:e.sizes.full,display:"flex",alignItems:"center",width:e.sizes.numberInputControlsWidth,justifyContent:"center",color:e.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:e.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:e.colors.white,backgroundColor:e.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:e.radii.default,borderBottomRightRadius:e.radii.default},"&:disabled":{cursor:"not-allowed",color:e.colors.fadedText40}}),""),De=S("div",{target:"e116k4er0"})(({theme:e,clearable:t})=>({position:"absolute",marginRight:e.spacing.twoXS,left:0,right:`calc(${e.sizes.numberInputControlsWidth} * 2 + ${t?"1em":"0em"})`}),""),Ee=({disabled:e,element:t,widgetMgr:o,fragmentId:b})=>{var c;const i=de(),{dataType:V,id:D,formId:p,default:W,format:A,min:g,max:h}=t,[B,J]=ue(),[s,Q]=r.useState(()=>Z(t)),F=Re({element:t,widgetMgr:o}),[v,w]=r.useState(!1),[d,I]=r.useState(F),[L,T]=r.useState(()=>z({value:F,...t,step:s})),[M,H]=r.useState(!1),x=r.useRef(null),U=r.useRef(he("number_input_")),k=ke(d,s,g),C=Ce(d,s,h),$=ce({formId:p}),ee=$?o.allowFormEnterToSubmit(p):v,te=M&&B>i.breakpoints.hideWidgetDetails;r.useEffect(()=>{Q(Z({step:t.step,dataType:t.dataType}))},[t.dataType,t.step]);const u=r.useCallback(({value:a,source:n})=>{var m;if(G(a)&&(g>a||a>h))(m=x.current)==null||m.reportValidity();else{const R=a??W??null;switch(V){case y.DataType.INT:o.setIntValue({id:D,formId:p},R,n,b);break;case y.DataType.FLOAT:o.setDoubleValue({id:D,formId:p},R,n,b);break;default:throw new Error("Invalid data type")}w(!1),I(R),T(z({value:R,dataType:V,format:A,step:s}))}},[g,h,x,o,b,s,V,D,p,W,A]),re=r.useCallback(()=>{v&&u({value:d,source:{fromUi:!0}}),H(!1)},[v,d,u]),ae=r.useCallback(()=>{H(!0)},[]),O=r.useCallback(()=>{const{value:a}=t;t.setValue=!1,I(a??null),T(z({value:a??null,...t,step:s})),u({value:a??null,source:{fromUi:!1}})},[t,s,u]);r.useEffect(()=>{t.setValue?O():u({value:d,source:{fromUi:!1}});const a=x.current;if(a){const n=m=>{m.preventDefault()};return a.addEventListener("wheel",n),()=>{a.removeEventListener("wheel",n)}}},[]),t.setValue&&O();const E=f(t.default)&&!e,oe=r.useCallback(()=>{const a=t.default??null;I(a),u({value:a,source:{fromUi:!0}})},[t]);ve({element:t,widgetMgr:o,onFormCleared:oe});const ie=a=>{const{value:n}=a.target;if(n==="")w(!0),I(null),T(null);else{let m;t.dataType===y.DataType.INT?m=parseInt(n,10):m=parseFloat(n),w(!0),I(m),T(n)}},N=r.useCallback(()=>{C&&(w(!0),u({value:(d??g)+s,source:{fromUi:!0}}))},[d,g,s,C]),j=r.useCallback(()=>{k&&(w(!0),u({value:(d??h)-s,source:{fromUi:!0}}))},[d,h,s,k]),le=r.useCallback(a=>{const{key:n}=a;switch(n){case"ArrowUp":a.preventDefault(),N();break;case"ArrowDown":a.preventDefault(),j();break}},[N,j]),se=r.useCallback(a=>{a.key==="Enter"&&(v&&u({value:d,source:{fromUi:!0}}),o.allowFormEnterToSubmit(p)&&o.submitForm(p,b))},[v,d,u,o,p,b]);return l.jsxs("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:J,children:[l.jsx(pe,{label:t.label,disabled:e,labelVisibility:me((c=t.labelVisibility)==null?void 0:c.value),htmlFor:U.current,children:t.help&&l.jsx(be,{children:l.jsx(fe,{content:t.help,placement:ge.TOP_RIGHT})})}),l.jsxs(Se,{className:M?"focused":"","data-testid":"stNumberInputContainer",children:[l.jsx(Ie,{type:"number",inputRef:x,value:L??"",placeholder:t.placeholder,onBlur:re,onFocus:ae,onChange:ie,onKeyPress:se,onKeyDown:le,clearable:E,clearOnEscape:E,disabled:e,"aria-label":t.label,id:U.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:i.colors.darkGray,padding:i.spacing.threeXS,height:i.sizes.clearIconSize,width:i.sizes.clearIconSize,":hover":{fill:i.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:g,max:h,type:"number",inputMode:""},style:{lineHeight:i.lineHeights.inputWidget,paddingRight:i.spacing.sm,paddingLeft:i.spacing.md,paddingBottom:i.spacing.sm,paddingTop:i.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0}}}}),B>i.breakpoints.hideNumberInputControls&&l.jsxs(Ve,{children:[l.jsx(q,{"data-testid":"stNumberInputStepDown",onClick:j,disabled:!k||e,tabIndex:-1,children:l.jsx(K,{content:X,size:"xs",color:k?"inherit":i.colors.disabled})}),l.jsx(q,{"data-testid":"stNumberInputStepUp",onClick:N,disabled:!C||e,tabIndex:-1,children:l.jsx(K,{content:Y,size:"xs",color:C?"inherit":i.colors.disabled})})]})]}),te&&l.jsx(De,{clearable:E,children:l.jsx(ye,{dirty:v,value:L??"",inForm:$,allowEnterToSubmit:ee})})]})},Ne=r.memo(Ee);export{Ne as default};
@@ -1 +1 @@
1
- import{r as l,E as L,_ as M,c as u,D as ge,A as S,j as i,b$ as he,bH as G,bV as Q,bC as q,bW as E,bu as me,cc as fe,bQ as xe,b_ as be,cd as w,bO as ve,ce as ye,L as U,bS as we,bR as je}from"./index-NYCOzVlX.js";import{g as Ce,C as Ie,I as ze,F as k,E as Fe,a as Ee,s as Re,u as He,b as Te}from"./FileHelper-BEtUZCB8.js";import{I as Le}from"./InputInstructions-GAhfSEnF.js";import{i as Me}from"./inputUtils-CQWz5UKz.js";import{a as J}from"./index-t--hEgTQ.js";import{U as Z}from"./UploadFileInfo-C-jY39rj.js";import{T as Se}from"./textarea-r4-zB_B9.js";import"./base-input-BHEia47e.js";var ee=l.forwardRef(function(e,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(L,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),l.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});ee.displayName="AttachFile";var te=l.forwardRef(function(e,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(L,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});te.displayName="ErrorOutline";var ie=l.forwardRef(function(e,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(L,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("rect",{width:24,height:24,fill:"none"}),l.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});ie.displayName="Send";const Ue=u("div",{target:"e1d2x3se4"})({name:"1nibcdy",styles:"border:none;position:relative;display:flex"}),ke=u("div",{target:"e1d2x3se3"})(({theme:e,extended:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.widgetBorderColor??e.colors.transparent,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:e.spacing.lg,maxHeight:t?"none":e.sizes.minElementHeight,gap:e.spacing.sm,overflow:"hidden",":focus-within":{borderColor:e.colors.primary}}),""),$e=u("button",{target:"e1d2x3se2"})(({theme:e,disabled:t,extended:s})=>{const c=ge(e),[m,p]=c?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:s?"0":e.radii.chatInput,borderTopLeftRadius:s?e.radii.default:"0",borderBottomRightRadius:e.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:t?m:p,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:c?e.colors.gray10:e.colors.gray90},"&:hover":{color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray,cursor:"not-allowed"}}},""),Be=u("div",{target:"e1d2x3se1"})(({theme:e})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${e.sizes.borderWidth}`,pointerEvents:"none"}),""),Ne=u("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),Pe=u("div",{target:"e3id6jz12"})(({theme:e,height:t})=>({backgroundColor:e.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${e.sizes.emptyDropdownHeight}, ${t})`,width:"100%",zIndex:e.zIndices.priority}),""),De=u("div",{target:"e3id6jz11"})(({theme:e,height:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.primary,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,color:e.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:t,width:"100%",fontWeight:e.fontWeights.bold}),""),Ve=u("div",{target:"e3id6jz10"})(({theme:e,disabled:t})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${e.sizes.borderWidth}`,cursor:t?"not-allowed":"auto"}),""),We=u("div",{target:"e3id6jz9"})(({disabled:e})=>({pointerEvents:e?"none":"auto"}),""),Ae=u("div",{target:"e3id6jz8"})(({theme:e})=>({marginTop:"0.625em",marginLeft:e.spacing.sm,height:e.spacing.xl,width:e.sizes.borderWidth,backgroundColor:e.colors.fadedText20}),""),Oe=u("div",{target:"e3id6jz7"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,overflowX:"auto"}),""),Ke=u("div",{target:"e3id6jz6"})({name:"zjik7",styles:"display:flex"}),Xe=u("div",{target:"e3id6jz5"})({name:"ou8xsw",styles:"flex:0 0 auto"}),Ye=u("div",{target:"e3id6jz4"})(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing.sm,gap:e.spacing.twoXS}),""),_e=u("div",{target:"e3id6jz3"})(({theme:e})=>({color:e.colors.fadedText60}),""),Ge=u("div",{target:"e3id6jz2"})(({theme:e,fileStatus:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t.type==="uploaded"?e.colors.bodyText:e.colors.fadedText60}),""),Qe=u("div",{target:"e3id6jz1"})(({theme:e})=>({marginRight:e.spacing.md,color:e.colors.fadedText60}),""),qe=u("small",{target:"e3id6jz0"})(({theme:e})=>({display:"flex",alignItems:"center",maxHeight:e.sizes.smallElementHeight,color:e.colors.fadedText60,"& :hover":{color:e.colors.bodyText}}),"");function Je({children:e,content:t}){const s=S();return i.jsx(he,{content:t,placement:G.TOP,overrides:{Body:{style:{top:`-${s.sizes.minElementHeight}`}}},children:e})}const Ze=({fileInfo:e})=>{const t=S(),{type:s}=e.status;switch(s){case"uploading":return i.jsx(fe,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return i.jsx(Je,{content:e.status.errorMessage,children:i.jsx(E,{color:t.colors.red,content:te,size:"lg"})});case"uploaded":return i.jsx(E,{content:ze,size:"lg"});default:return me(s),null}},et=({fileInfo:e,onDelete:t})=>i.jsxs(Ye,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[i.jsx(_e,{children:i.jsx(Ze,{fileInfo:e})}),i.jsx(Ge,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:e.name,fileStatus:e.status,children:e.name}),i.jsx(Qe,{children:Ce(e.size,k.Byte)}),i.jsx(qe,{"data-testid":"stChatInputDeleteBtn",children:i.jsx(Q,{onClick:()=>t(e.id),kind:q.MINIMAL,children:i.jsx(E,{content:Ie,size:"lg"})})})]}),tt=({items:e,onDelete:t})=>i.jsx(Oe,{"data-testid":"stChatUploadedFiles",children:i.jsx(Ke,{children:e.map(s=>i.jsx(Xe,{children:i.jsx(et,{fileInfo:s,onDelete:t})},s.id))})}),it=({getNextLocalFileId:e,addFiles:t,updateFile:s,uploadClient:c,element:m,onUploadProgress:p,onUploadComplete:f})=>(j,h)=>{const x=J.CancelToken.source(),g=new Z(h.name,h.size,e(),{type:"uploading",cancelToken:x,progress:1});t([g]),c.uploadFile({formId:"",...m},j.uploadUrl,h,d=>p(d,g.id),x.token).then(()=>f(g.id,j)).catch(d=>{J.isCancel(d)||s(g.id,g.setStatus({type:"error",errorMessage:d?d.toString():"Unknown error"}))})},ot=({acceptMultipleFiles:e,maxFileSize:t,uploadClient:s,uploadFile:c,addFiles:m,getNextLocalFileId:p,deleteExistingFiles:f,onUploadComplete:j})=>(h,x)=>{if(!e&&h.length===0&&x.length>1){const g=x.findIndex(d=>{var b;return((b=d.errors)==null?void 0:b[0].code)===Fe.TooManyFiles});g>=0&&(h.push(x[g].file),x.splice(g,1))}if(!e&&h.length>0&&f(),s.fetchFileURLs(h).then(g=>{xe(g,h).forEach(([d,b])=>{c(d,b)})}).catch(g=>{m(h.map(d=>new Z(d.name,d.size,p(),{type:"error",errorMessage:g})))}),x.length>0){const g=x.map(d=>Ee(d,p(),t));m(g)}j()},rt=({getRootProps:e,getInputProps:t,acceptFile:s,disabled:c,theme:m})=>i.jsxs(Ve,{disabled:c,children:[i.jsxs(We,{"data-testid":"stChatInputFileUploadButton",disabled:c,...e(),children:[i.jsx("input",{...t()}),i.jsx(be,{content:`Upload or drag and drop ${s===w.Multiple?"files":"a file"}`,placement:G.TOP,onMouseEnterDelay:500,children:i.jsx(Q,{kind:q.MINIMAL,disabled:c,children:i.jsx(E,{content:ee,size:"lg",color:c?m.colors.fadedText40:m.colors.fadedText60})})})]}),i.jsx(Ae,{})]}),st=({getRootProps:e,getInputProps:t,acceptFile:s,inputHeight:c})=>i.jsxs(i.Fragment,{children:[i.jsx(Pe,{height:c,...e(),children:i.jsx("input",{...t()})}),i.jsx(De,{height:c,children:`Drag and drop ${s===w.Multiple?"files":"a file"} here`})]}),nt=6.5,$=1,B=(e,t,s)=>s.map(c=>c.id===e?t:c),N=(e,t)=>t.find(s=>s.id===e);function at({disabled:e,element:t,widgetMgr:s,fragmentId:c,uploadClient:m}){const p=S(),f=l.useRef(null),j=l.useRef(0),h=l.useRef({minHeight:0,maxHeight:0}),[x,g]=ve(),[d,b]=l.useState(t.default),[z,P]=l.useState(0),[R,oe]=l.useState(!1),[C,I]=l.useState([]),[F,H]=l.useState(!1),T=l.useMemo(()=>C.some(o=>o.status.type==="uploading")?!1:d!==""||C.length>0,[C,d]),v=ye(t.acceptFile),D=Re(t.maxUploadSizeMb,k.Megabyte,k.Byte),V=l.useCallback(o=>I(r=>[...r,...o]),[]),W=l.useCallback(o=>{I(r=>{const a=N(o,r);return U(a)?r:(a.status.type==="uploading"&&a.status.cancelToken.cancel(),a.status.type==="uploaded"&&a.status.fileUrls.deleteUrl&&m.deleteFile(a.status.fileUrls.deleteUrl),r.filter(n=>n.id!==o))})},[m]),re=()=>{const o=C.filter(r=>r.status.type==="uploaded").map(r=>{const{name:a,size:n,status:y}=r,{fileId:pe,fileUrls:ue}=y;return new we({fileId:pe,fileUrls:ue,name:a,size:n})});return new je({uploadedFileInfo:o})},A=()=>j.current++,se=ot({acceptMultipleFiles:v===w.Multiple,maxFileSize:D,uploadClient:m,uploadFile:it({getNextLocalFileId:A,addFiles:V,updateFile:(o,r)=>{I(a=>B(o,r,a))},uploadClient:m,element:t,onUploadProgress:(o,r)=>{I(a=>{const n=N(r,a);if(U(n)||n.status.type!=="uploading")return a;const y=Math.round(o.loaded*100/o.total);return n.status.progress===y?a:B(r,n.setStatus({type:"uploading",cancelToken:n.status.cancelToken,progress:y}),a)})},onUploadComplete:(o,r)=>{I(a=>{const n=N(o,a);return U(n)||n.status.type!=="uploading"?a:B(n.id,n.setStatus({type:"uploaded",fileId:r.fileId,fileUrls:r}),a)})}}),addFiles:V,getNextLocalFileId:A,deleteExistingFiles:()=>C.forEach(o=>W(o.id)),onUploadComplete:()=>{f.current&&f.current.focus()}}),{getRootProps:O,getInputProps:K}=He({onDrop:se,multiple:v===w.Multiple,accept:Te(t.fileType),maxSize:D}),ne=()=>{let o=0;const{current:r}=f;if(r){const a=r.placeholder;r.placeholder="",r.style.height="auto",o=r.scrollHeight,r.placeholder=a,r.style.height=""}return o},X=()=>{if(f.current&&f.current.focus(),!T||e)return;const o={data:d,fileUploaderState:re()};s.setChatInputValue(t,o,{fromUi:!0},c),I([]),b(""),P(0)},ae=o=>{const{metaKey:r,ctrlKey:a,shiftKey:n}=o;Me(o)&&!n&&!a&&!r&&(o.preventDefault(),X())},le=o=>{const{value:r}=o.target,{maxChars:a}=t;a!==0&&r.length>a||(b(r),P(ne()))};l.useEffect(()=>{if(t.setValue){t.setValue=!1;const o=t.value||"";b(o)}},[t]),l.useLayoutEffect(()=>{if(f.current){const{offsetHeight:o}=f.current;h.current.minHeight=o,h.current.maxHeight=o*nt}},[f]),l.useEffect(()=>{const o=n=>{var y;n.preventDefault(),n.stopPropagation(),!F&&(y=n.dataTransfer)!=null&&y.types.includes("Files")&&H(!0)},r=n=>{n.preventDefault(),n.stopPropagation(),F&&(n.clientX<=0&&n.clientY<=0||n.clientX>=window.innerWidth&&n.clientY>=window.innerHeight)&&H(!1)},a=n=>{n.preventDefault(),n.stopPropagation(),F&&H(!1)};return window.addEventListener("dragover",o),window.addEventListener("drop",a),window.addEventListener("dragleave",r),()=>{window.removeEventListener("dragover",o),window.removeEventListener("drop",a),window.removeEventListener("dragleave",r)}},[F]),l.useLayoutEffect(()=>{const{minHeight:o}=h.current;oe(z>0&&f.current?Math.abs(z-o)>$:!1)},[z]);const{placeholder:Y,maxChars:de}=t,{maxHeight:_}=h.current,ce=v!==w.None&&F;return i.jsxs(i.Fragment,{children:[v===w.None?null:i.jsx(tt,{items:[...C],onDelete:W}),i.jsx(Ue,{className:"stChatInput","data-testid":"stChatInput",ref:g,children:ce?i.jsx(st,{getRootProps:O,getInputProps:K,acceptFile:v,inputHeight:R?`${z+$}px`:p.sizes.minElementHeight}):i.jsxs(ke,{extended:R,children:[v===w.None?null:i.jsx(rt,{getRootProps:O,getInputProps:K,acceptFile:v,disabled:e,theme:p}),i.jsx(Se,{inputRef:f,value:d,placeholder:Y,onChange:le,onKeyDown:ae,"aria-label":Y,disabled:e,rows:1,overrides:{Root:{style:{minHeight:p.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0",borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:p.lineHeights.inputWidget,"::placeholder":{opacity:"0.7"},height:R?`${z+$}px`:"auto",maxHeight:_?`${_}px`:"none",paddingLeft:p.spacing.none,paddingBottom:p.spacing.sm,paddingTop:p.spacing.sm,paddingRight:`calc(${p.iconSizes.xl} + 2 * ${p.spacing.sm} + ${p.spacing.sm})`}}}}),x>p.breakpoints.hideWidgetDetails&&i.jsx(Ne,{children:i.jsx(Le,{dirty:T,value:d,maxLength:de,type:"chat",inForm:!1})}),i.jsx(Be,{children:i.jsx($e,{onClick:X,disabled:!T||e,extended:R,"data-testid":"stChatInputSubmitButton",children:i.jsx(E,{content:ie,size:"xl",color:"inherit"})})})]})})]})}const lt=l.memo(at);export{lt as default};
1
+ import{r as l,E as L,_ as M,c as u,D as ge,A as S,j as i,b$ as he,bH as G,bV as Q,bC as q,bW as E,bu as me,cc as fe,bQ as xe,b_ as be,cd as w,bO as ve,ce as ye,L as U,bS as we,bR as je}from"./index-OxGwEg3m.js";import{g as Ce,C as Ie,I as ze,F as k,E as Fe,a as Ee,s as Re,u as He,b as Te}from"./FileHelper-BNpeYRlH.js";import{I as Le}from"./InputInstructions-DuxSO2sS.js";import{i as Me}from"./inputUtils-CQWz5UKz.js";import{a as J}from"./index-t--hEgTQ.js";import{U as Z}from"./UploadFileInfo-C-jY39rj.js";import{T as Se}from"./textarea-Cy6EVtfz.js";import"./base-input-NsRtpzFx.js";var ee=l.forwardRef(function(e,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(L,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),l.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});ee.displayName="AttachFile";var te=l.forwardRef(function(e,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(L,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});te.displayName="ErrorOutline";var ie=l.forwardRef(function(e,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(L,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("rect",{width:24,height:24,fill:"none"}),l.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});ie.displayName="Send";const Ue=u("div",{target:"e1d2x3se4"})({name:"1nibcdy",styles:"border:none;position:relative;display:flex"}),ke=u("div",{target:"e1d2x3se3"})(({theme:e,extended:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.widgetBorderColor??e.colors.transparent,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:e.spacing.lg,maxHeight:t?"none":e.sizes.minElementHeight,gap:e.spacing.sm,overflow:"hidden",":focus-within":{borderColor:e.colors.primary}}),""),$e=u("button",{target:"e1d2x3se2"})(({theme:e,disabled:t,extended:s})=>{const c=ge(e),[m,p]=c?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:s?"0":e.radii.chatInput,borderTopLeftRadius:s?e.radii.default:"0",borderBottomRightRadius:e.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:t?m:p,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:c?e.colors.gray10:e.colors.gray90},"&:hover":{color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray,cursor:"not-allowed"}}},""),Be=u("div",{target:"e1d2x3se1"})(({theme:e})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${e.sizes.borderWidth}`,pointerEvents:"none"}),""),Ne=u("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),Pe=u("div",{target:"e3id6jz12"})(({theme:e,height:t})=>({backgroundColor:e.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${e.sizes.emptyDropdownHeight}, ${t})`,width:"100%",zIndex:e.zIndices.priority}),""),De=u("div",{target:"e3id6jz11"})(({theme:e,height:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.primary,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,color:e.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:t,width:"100%",fontWeight:e.fontWeights.bold}),""),Ve=u("div",{target:"e3id6jz10"})(({theme:e,disabled:t})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${e.sizes.borderWidth}`,cursor:t?"not-allowed":"auto"}),""),We=u("div",{target:"e3id6jz9"})(({disabled:e})=>({pointerEvents:e?"none":"auto"}),""),Ae=u("div",{target:"e3id6jz8"})(({theme:e})=>({marginTop:"0.625em",marginLeft:e.spacing.sm,height:e.spacing.xl,width:e.sizes.borderWidth,backgroundColor:e.colors.fadedText20}),""),Oe=u("div",{target:"e3id6jz7"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,overflowX:"auto"}),""),Ke=u("div",{target:"e3id6jz6"})({name:"zjik7",styles:"display:flex"}),Xe=u("div",{target:"e3id6jz5"})({name:"ou8xsw",styles:"flex:0 0 auto"}),Ye=u("div",{target:"e3id6jz4"})(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing.sm,gap:e.spacing.twoXS}),""),_e=u("div",{target:"e3id6jz3"})(({theme:e})=>({color:e.colors.fadedText60}),""),Ge=u("div",{target:"e3id6jz2"})(({theme:e,fileStatus:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t.type==="uploaded"?e.colors.bodyText:e.colors.fadedText60}),""),Qe=u("div",{target:"e3id6jz1"})(({theme:e})=>({marginRight:e.spacing.md,color:e.colors.fadedText60}),""),qe=u("small",{target:"e3id6jz0"})(({theme:e})=>({display:"flex",alignItems:"center",maxHeight:e.sizes.smallElementHeight,color:e.colors.fadedText60,"& :hover":{color:e.colors.bodyText}}),"");function Je({children:e,content:t}){const s=S();return i.jsx(he,{content:t,placement:G.TOP,overrides:{Body:{style:{top:`-${s.sizes.minElementHeight}`}}},children:e})}const Ze=({fileInfo:e})=>{const t=S(),{type:s}=e.status;switch(s){case"uploading":return i.jsx(fe,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return i.jsx(Je,{content:e.status.errorMessage,children:i.jsx(E,{color:t.colors.red,content:te,size:"lg"})});case"uploaded":return i.jsx(E,{content:ze,size:"lg"});default:return me(s),null}},et=({fileInfo:e,onDelete:t})=>i.jsxs(Ye,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[i.jsx(_e,{children:i.jsx(Ze,{fileInfo:e})}),i.jsx(Ge,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:e.name,fileStatus:e.status,children:e.name}),i.jsx(Qe,{children:Ce(e.size,k.Byte)}),i.jsx(qe,{"data-testid":"stChatInputDeleteBtn",children:i.jsx(Q,{onClick:()=>t(e.id),kind:q.MINIMAL,children:i.jsx(E,{content:Ie,size:"lg"})})})]}),tt=({items:e,onDelete:t})=>i.jsx(Oe,{"data-testid":"stChatUploadedFiles",children:i.jsx(Ke,{children:e.map(s=>i.jsx(Xe,{children:i.jsx(et,{fileInfo:s,onDelete:t})},s.id))})}),it=({getNextLocalFileId:e,addFiles:t,updateFile:s,uploadClient:c,element:m,onUploadProgress:p,onUploadComplete:f})=>(j,h)=>{const x=J.CancelToken.source(),g=new Z(h.name,h.size,e(),{type:"uploading",cancelToken:x,progress:1});t([g]),c.uploadFile({formId:"",...m},j.uploadUrl,h,d=>p(d,g.id),x.token).then(()=>f(g.id,j)).catch(d=>{J.isCancel(d)||s(g.id,g.setStatus({type:"error",errorMessage:d?d.toString():"Unknown error"}))})},ot=({acceptMultipleFiles:e,maxFileSize:t,uploadClient:s,uploadFile:c,addFiles:m,getNextLocalFileId:p,deleteExistingFiles:f,onUploadComplete:j})=>(h,x)=>{if(!e&&h.length===0&&x.length>1){const g=x.findIndex(d=>{var b;return((b=d.errors)==null?void 0:b[0].code)===Fe.TooManyFiles});g>=0&&(h.push(x[g].file),x.splice(g,1))}if(!e&&h.length>0&&f(),s.fetchFileURLs(h).then(g=>{xe(g,h).forEach(([d,b])=>{c(d,b)})}).catch(g=>{m(h.map(d=>new Z(d.name,d.size,p(),{type:"error",errorMessage:g})))}),x.length>0){const g=x.map(d=>Ee(d,p(),t));m(g)}j()},rt=({getRootProps:e,getInputProps:t,acceptFile:s,disabled:c,theme:m})=>i.jsxs(Ve,{disabled:c,children:[i.jsxs(We,{"data-testid":"stChatInputFileUploadButton",disabled:c,...e(),children:[i.jsx("input",{...t()}),i.jsx(be,{content:`Upload or drag and drop ${s===w.Multiple?"files":"a file"}`,placement:G.TOP,onMouseEnterDelay:500,children:i.jsx(Q,{kind:q.MINIMAL,disabled:c,children:i.jsx(E,{content:ee,size:"lg",color:c?m.colors.fadedText40:m.colors.fadedText60})})})]}),i.jsx(Ae,{})]}),st=({getRootProps:e,getInputProps:t,acceptFile:s,inputHeight:c})=>i.jsxs(i.Fragment,{children:[i.jsx(Pe,{height:c,...e(),children:i.jsx("input",{...t()})}),i.jsx(De,{height:c,children:`Drag and drop ${s===w.Multiple?"files":"a file"} here`})]}),nt=6.5,$=1,B=(e,t,s)=>s.map(c=>c.id===e?t:c),N=(e,t)=>t.find(s=>s.id===e);function at({disabled:e,element:t,widgetMgr:s,fragmentId:c,uploadClient:m}){const p=S(),f=l.useRef(null),j=l.useRef(0),h=l.useRef({minHeight:0,maxHeight:0}),[x,g]=ve(),[d,b]=l.useState(t.default),[z,P]=l.useState(0),[R,oe]=l.useState(!1),[C,I]=l.useState([]),[F,H]=l.useState(!1),T=l.useMemo(()=>C.some(o=>o.status.type==="uploading")?!1:d!==""||C.length>0,[C,d]),v=ye(t.acceptFile),D=Re(t.maxUploadSizeMb,k.Megabyte,k.Byte),V=l.useCallback(o=>I(r=>[...r,...o]),[]),W=l.useCallback(o=>{I(r=>{const a=N(o,r);return U(a)?r:(a.status.type==="uploading"&&a.status.cancelToken.cancel(),a.status.type==="uploaded"&&a.status.fileUrls.deleteUrl&&m.deleteFile(a.status.fileUrls.deleteUrl),r.filter(n=>n.id!==o))})},[m]),re=()=>{const o=C.filter(r=>r.status.type==="uploaded").map(r=>{const{name:a,size:n,status:y}=r,{fileId:pe,fileUrls:ue}=y;return new we({fileId:pe,fileUrls:ue,name:a,size:n})});return new je({uploadedFileInfo:o})},A=()=>j.current++,se=ot({acceptMultipleFiles:v===w.Multiple,maxFileSize:D,uploadClient:m,uploadFile:it({getNextLocalFileId:A,addFiles:V,updateFile:(o,r)=>{I(a=>B(o,r,a))},uploadClient:m,element:t,onUploadProgress:(o,r)=>{I(a=>{const n=N(r,a);if(U(n)||n.status.type!=="uploading")return a;const y=Math.round(o.loaded*100/o.total);return n.status.progress===y?a:B(r,n.setStatus({type:"uploading",cancelToken:n.status.cancelToken,progress:y}),a)})},onUploadComplete:(o,r)=>{I(a=>{const n=N(o,a);return U(n)||n.status.type!=="uploading"?a:B(n.id,n.setStatus({type:"uploaded",fileId:r.fileId,fileUrls:r}),a)})}}),addFiles:V,getNextLocalFileId:A,deleteExistingFiles:()=>C.forEach(o=>W(o.id)),onUploadComplete:()=>{f.current&&f.current.focus()}}),{getRootProps:O,getInputProps:K}=He({onDrop:se,multiple:v===w.Multiple,accept:Te(t.fileType),maxSize:D}),ne=()=>{let o=0;const{current:r}=f;if(r){const a=r.placeholder;r.placeholder="",r.style.height="auto",o=r.scrollHeight,r.placeholder=a,r.style.height=""}return o},X=()=>{if(f.current&&f.current.focus(),!T||e)return;const o={data:d,fileUploaderState:re()};s.setChatInputValue(t,o,{fromUi:!0},c),I([]),b(""),P(0)},ae=o=>{const{metaKey:r,ctrlKey:a,shiftKey:n}=o;Me(o)&&!n&&!a&&!r&&(o.preventDefault(),X())},le=o=>{const{value:r}=o.target,{maxChars:a}=t;a!==0&&r.length>a||(b(r),P(ne()))};l.useEffect(()=>{if(t.setValue){t.setValue=!1;const o=t.value||"";b(o)}},[t]),l.useLayoutEffect(()=>{if(f.current){const{offsetHeight:o}=f.current;h.current.minHeight=o,h.current.maxHeight=o*nt}},[f]),l.useEffect(()=>{const o=n=>{var y;n.preventDefault(),n.stopPropagation(),!F&&(y=n.dataTransfer)!=null&&y.types.includes("Files")&&H(!0)},r=n=>{n.preventDefault(),n.stopPropagation(),F&&(n.clientX<=0&&n.clientY<=0||n.clientX>=window.innerWidth&&n.clientY>=window.innerHeight)&&H(!1)},a=n=>{n.preventDefault(),n.stopPropagation(),F&&H(!1)};return window.addEventListener("dragover",o),window.addEventListener("drop",a),window.addEventListener("dragleave",r),()=>{window.removeEventListener("dragover",o),window.removeEventListener("drop",a),window.removeEventListener("dragleave",r)}},[F]),l.useLayoutEffect(()=>{const{minHeight:o}=h.current;oe(z>0&&f.current?Math.abs(z-o)>$:!1)},[z]);const{placeholder:Y,maxChars:de}=t,{maxHeight:_}=h.current,ce=v!==w.None&&F;return i.jsxs(i.Fragment,{children:[v===w.None?null:i.jsx(tt,{items:[...C],onDelete:W}),i.jsx(Ue,{className:"stChatInput","data-testid":"stChatInput",ref:g,children:ce?i.jsx(st,{getRootProps:O,getInputProps:K,acceptFile:v,inputHeight:R?`${z+$}px`:p.sizes.minElementHeight}):i.jsxs(ke,{extended:R,children:[v===w.None?null:i.jsx(rt,{getRootProps:O,getInputProps:K,acceptFile:v,disabled:e,theme:p}),i.jsx(Se,{inputRef:f,value:d,placeholder:Y,onChange:le,onKeyDown:ae,"aria-label":Y,disabled:e,rows:1,overrides:{Root:{style:{minHeight:p.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0",borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:p.lineHeights.inputWidget,"::placeholder":{opacity:"0.7"},height:R?`${z+$}px`:"auto",maxHeight:_?`${_}px`:"none",paddingLeft:p.spacing.none,paddingBottom:p.spacing.sm,paddingTop:p.spacing.sm,paddingRight:`calc(${p.iconSizes.xl} + 2 * ${p.spacing.sm} + ${p.spacing.sm})`}}}}),x>p.breakpoints.hideWidgetDetails&&i.jsx(Ne,{children:i.jsx(Le,{dirty:T,value:d,maxLength:de,type:"chat",inForm:!1})}),i.jsx(Be,{children:i.jsx($e,{onClick:X,disabled:!T||e,extended:R,"data-testid":"stChatInputSubmitButton",children:i.jsx(E,{content:ie,size:"xl",color:"inherit"})})})]})})]})}const lt=l.memo(at);export{lt as default};
@@ -1 +1 @@
1
- import{c as r,i as h,bT as m,r as p,R as l,j as o,cD as f,b5 as u}from"./index-NYCOzVlX.js";const $=r(m,{shouldForwardProp:h,target:"e1se5lgy3"})(({theme:e})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:e.colors.secondary,flexGrow:0,flexShrink:0}),""),x=r("div",{target:"e1se5lgy2"})(({theme:e,cache:t})=>({...t?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null}),""),S=r("div",{target:"e1se5lgy1"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm}),""),b=r("div",{target:"e1se5lgy0"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"}),""),y=e=>{const t=Math.floor(e/3600),s=Math.floor(e%3600/60),n=e%60;if(t===0&&s===0)return`(${n.toFixed(1)} seconds)`;if(t===0){const d=`${s} minute${s===1?"":"s"}`,g=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${d}${g})`}const i=`${t} hour${t===1?"":"s"}`,a=s===0?"":`, ${s} minute${s===1?"":"s"}`,c=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${i}${a}${c})`};function z({element:e}){const{cache:t,showTime:s}=e,[n,i]=l.useState(0);return l.useEffect(()=>{if(!s)return;const a=setInterval(()=>{i(c=>c+.1)},100);return()=>clearInterval(a)},[s]),o.jsx(x,{className:f({stSpinner:!0,stCacheSpinner:t}),"data-testid":"stSpinner",cache:t,children:o.jsxs(b,{children:[o.jsx($,{}),o.jsx(u,{source:e.text,allowHTML:!1}),s&&o.jsx(S,{children:y(n)})]})})}const j=p.memo(z);export{j as default};
1
+ import{c as r,i as h,bT as m,r as p,R as l,j as o,cD as f,b5 as u}from"./index-OxGwEg3m.js";const $=r(m,{shouldForwardProp:h,target:"e1se5lgy3"})(({theme:e})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:e.colors.secondary,flexGrow:0,flexShrink:0}),""),x=r("div",{target:"e1se5lgy2"})(({theme:e,cache:t})=>({...t?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null}),""),S=r("div",{target:"e1se5lgy1"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm}),""),b=r("div",{target:"e1se5lgy0"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"}),""),y=e=>{const t=Math.floor(e/3600),s=Math.floor(e%3600/60),n=e%60;if(t===0&&s===0)return`(${n.toFixed(1)} seconds)`;if(t===0){const d=`${s} minute${s===1?"":"s"}`,g=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${d}${g})`}const i=`${t} hour${t===1?"":"s"}`,a=s===0?"":`, ${s} minute${s===1?"":"s"}`,c=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${i}${a}${c})`};function z({element:e}){const{cache:t,showTime:s}=e,[n,i]=l.useState(0);return l.useEffect(()=>{if(!s)return;const a=setInterval(()=>{i(c=>c+.1)},100);return()=>clearInterval(a)},[s]),o.jsx(x,{className:f({stSpinner:!0,stCacheSpinner:t}),"data-testid":"stSpinner",cache:t,children:o.jsxs(b,{children:[o.jsx($,{}),o.jsx(u,{source:e.text,allowHTML:!1}),s&&o.jsx(S,{children:y(n)})]})})}const j=p.memo(z);export{j as default};
@@ -1 +1 @@
1
- import{c as l,bA as y,I as p,bB as t,bC as a,j as s,r as C,bD as f,bE as v,bF as x}from"./index-NYCOzVlX.js";function k(o,e){switch(o){case t.XSMALL:return{padding:`${e.spacing.twoXS} ${e.spacing.sm}`,fontSize:e.fontSizes.sm};case t.SMALL:return{padding:`${e.spacing.twoXS} ${e.spacing.md}`};case t.LARGE:return{padding:`${e.spacing.md} ${e.spacing.md}`};default:return{padding:`${e.spacing.xs} ${e.spacing.md}`}}}const b=l("a",{target:"e16zdaao3"})(({containerWidth:o,size:e,theme:r})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:r.fontWeights.normal,padding:`${r.spacing.xs} ${r.spacing.md}`,borderRadius:r.radii.default,minHeight:r.sizes.minElementHeight,margin:0,lineHeight:r.lineHeights.base,color:r.colors.primary,textDecoration:"none",width:o?"100%":"auto",userSelect:"none","&:visited":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${p(r.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...k(e,r)}),""),$=l(b,{target:"e16zdaao2"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover":{backgroundColor:y(o.colors.primary,.05),color:o.colors.white},"&:active":{backgroundColor:"transparent",color:o.colors.primary},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),""),w=l(b,{target:"e16zdaao1"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover":{borderColor:o.colors.primary,color:o.colors.primary},"&:active":{color:o.colors.white,borderColor:o.colors.primary,backgroundColor:o.colors.primary},"&:focus:not(:active)":{borderColor:o.colors.primary,color:o.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),""),z=l(b,{target:"e16zdaao0"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover":{color:o.colors.primary},"&:active":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:o.colors.primary,boxShadow:`0 0 0 0.2rem ${p(o.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),"");function S({kind:o,size:e,disabled:r,containerWidth:i,children:n,autoFocus:c,href:u,rel:h,target:g,onClick:m}){let d=$;return o===a.SECONDARY?d=w:o===a.TERTIARY&&(d=z),s.jsx(d,{kind:o,size:e||t.MEDIUM,containerWidth:i||!1,disabled:r||!1,autoFocus:c||!1,href:u,target:g,rel:h,onClick:m,tabIndex:r?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:n})}function T(o){const{disabled:e,element:r}=o;let i=a.SECONDARY;r.type==="primary"?i=a.PRIMARY:r.type==="tertiary"&&(i=a.TERTIARY);const n=c=>{o.disabled&&c.preventDefault()};return s.jsx(f,{className:"stLinkButton","data-testid":"stLinkButton",children:s.jsx(v,{help:r.help,containerWidth:r.useContainerWidth,children:s.jsx(S,{kind:i,size:t.SMALL,disabled:e,onClick:n,containerWidth:r.useContainerWidth,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":e,children:s.jsx(x,{icon:r.icon,label:r.label})})})})}const A=C.memo(T);export{A as default};
1
+ import{c as l,bA as y,I as p,bB as t,bC as a,j as s,r as C,bD as f,bE as v,bF as x}from"./index-OxGwEg3m.js";function k(o,e){switch(o){case t.XSMALL:return{padding:`${e.spacing.twoXS} ${e.spacing.sm}`,fontSize:e.fontSizes.sm};case t.SMALL:return{padding:`${e.spacing.twoXS} ${e.spacing.md}`};case t.LARGE:return{padding:`${e.spacing.md} ${e.spacing.md}`};default:return{padding:`${e.spacing.xs} ${e.spacing.md}`}}}const b=l("a",{target:"e16zdaao3"})(({containerWidth:o,size:e,theme:r})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:r.fontWeights.normal,padding:`${r.spacing.xs} ${r.spacing.md}`,borderRadius:r.radii.default,minHeight:r.sizes.minElementHeight,margin:0,lineHeight:r.lineHeights.base,color:r.colors.primary,textDecoration:"none",width:o?"100%":"auto",userSelect:"none","&:visited":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${p(r.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...k(e,r)}),""),$=l(b,{target:"e16zdaao2"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover":{backgroundColor:y(o.colors.primary,.05),color:o.colors.white},"&:active":{backgroundColor:"transparent",color:o.colors.primary},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),""),w=l(b,{target:"e16zdaao1"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover":{borderColor:o.colors.primary,color:o.colors.primary},"&:active":{color:o.colors.white,borderColor:o.colors.primary,backgroundColor:o.colors.primary},"&:focus:not(:active)":{borderColor:o.colors.primary,color:o.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),""),z=l(b,{target:"e16zdaao0"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover":{color:o.colors.primary},"&:active":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:o.colors.primary,boxShadow:`0 0 0 0.2rem ${p(o.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),"");function S({kind:o,size:e,disabled:r,containerWidth:i,children:n,autoFocus:c,href:u,rel:h,target:g,onClick:m}){let d=$;return o===a.SECONDARY?d=w:o===a.TERTIARY&&(d=z),s.jsx(d,{kind:o,size:e||t.MEDIUM,containerWidth:i||!1,disabled:r||!1,autoFocus:c||!1,href:u,target:g,rel:h,onClick:m,tabIndex:r?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:n})}function T(o){const{disabled:e,element:r}=o;let i=a.SECONDARY;r.type==="primary"?i=a.PRIMARY:r.type==="tertiary"&&(i=a.TERTIARY);const n=c=>{o.disabled&&c.preventDefault()};return s.jsx(f,{className:"stLinkButton","data-testid":"stLinkButton",children:s.jsx(v,{help:r.help,containerWidth:r.useContainerWidth,children:s.jsx(S,{kind:i,size:t.SMALL,disabled:e,onClick:n,containerWidth:r.useContainerWidth,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":e,children:s.jsx(x,{icon:r.icon,label:r.label})})})})}const A=C.memo(T);export{A as default};
@@ -1 +1 @@
1
- import{c as z,r as i,bO as H,A as P,cY as x,j as s,bY as D,bZ as E,cb as M,b_ as U,bH as _,cZ as B}from"./index-NYCOzVlX.js";import{u as L}from"./uniqueId-C8rYCZew.js";import{u as O,a as A,b as Y}from"./useOnInputChange-Cl7V3cFN.js";import{a as Z}from"./useBasicWidgetState-vUy8Wspy.js";import{I as G}from"./InputInstructions-GAhfSEnF.js";import{I as K}from"./input-DdxVQNZ7.js";import"./inputUtils-CQWz5UKz.js";import"./FormClearHelper--a7FEpt-.js";import"./base-input-BHEia47e.js";const N=z("div",{target:"e11y4ecf0"})({name:"bjn8wh",styles:"position:relative"});function q({disabled:t,element:e,widgetMgr:r,fragmentId:d}){var g;const[l,u]=i.useState(()=>S(r,e)??null),[W,y]=H(),[o,m]=i.useState(!1),I=i.useCallback(()=>{u(e.default??null),m(!0)},[e.default]),[v,p]=Z({getStateFromWidgetMgr:S,getDefaultStateFromProto:J,getCurrStateFromProto:Q,updateWidgetMgrState:X,element:e,widgetMgr:r,fragmentId:d,onFormCleared:I});O(v,l,u,o);const[C,b]=i.useState(!1),a=P(),[h]=i.useState(()=>L("text_input_")),{placeholder:T,formId:n,maxChars:f}=e,c=i.useCallback(()=>{m(!1),p({value:l,fromUi:!0})},[l,p]),j=x({formId:n})?r.allowFormEnterToSubmit(n):o,F=C&&W>a.breakpoints.hideWidgetDetails,w=i.useCallback(()=>{o&&c(),b(!1)},[o,c]),R=i.useCallback(()=>{b(!0)},[]),V=A({formId:n,maxChars:f,setDirty:m,setUiValue:u,setValueWithSource:p}),k=Y(n,c,o,r,d);return s.jsxs(N,{className:"stTextInput","data-testid":"stTextInput",ref:y,children:[s.jsx(D,{label:e.label,disabled:t,labelVisibility:E((g=e.labelVisibility)==null?void 0:g.value),htmlFor:h,children:e.help&&s.jsx(M,{children:s.jsx(U,{content:e.help,placement:_.TOP_RIGHT})})}),s.jsx(K,{value:l??"",placeholder:T,onBlur:w,onFocus:R,onChange:V,onKeyPress:k,"aria-label":e.label,disabled:t,id:h,type:$(e),autoComplete:e.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:a.lineHeights.inputWidget,paddingRight:a.spacing.sm,paddingLeft:a.spacing.md,paddingBottom:a.spacing.sm,paddingTop:a.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:a.sizes.minElementHeight,borderLeftWidth:a.sizes.borderWidth,borderRightWidth:a.sizes.borderWidth,borderTopWidth:a.sizes.borderWidth,borderBottomWidth:a.sizes.borderWidth}}}}),F&&s.jsx(G,{dirty:o,value:l??"",maxLength:f,inForm:x({formId:n}),allowEnterToSubmit:j})]})}function S(t,e){return t.getStringValue(e)??null}function J(t){return t.default??null}function Q(t){return t.value??null}function X(t,e,r,d){e.setStringValue(t,r.value,{fromUi:r.fromUi},d)}function $(t){return t.type===B.Type.PASSWORD?"password":"text"}const ee=i.memo(q);export{ee as default};
1
+ import{c as z,r as i,bO as H,A as P,cY as x,j as s,bY as D,bZ as E,cb as M,b_ as U,bH as _,cZ as B}from"./index-OxGwEg3m.js";import{u as L}from"./uniqueId-Dka3DuQQ.js";import{u as O,a as A,b as Y}from"./useOnInputChange-C3lvbUNp.js";import{a as Z}from"./useBasicWidgetState-Bm5AJWX7.js";import{I as G}from"./InputInstructions-DuxSO2sS.js";import{I as K}from"./input-CkptI290.js";import"./inputUtils-CQWz5UKz.js";import"./FormClearHelper-DxeY-rII.js";import"./base-input-NsRtpzFx.js";const N=z("div",{target:"e11y4ecf0"})({name:"bjn8wh",styles:"position:relative"});function q({disabled:t,element:e,widgetMgr:r,fragmentId:d}){var g;const[l,u]=i.useState(()=>S(r,e)??null),[W,y]=H(),[o,m]=i.useState(!1),I=i.useCallback(()=>{u(e.default??null),m(!0)},[e.default]),[v,p]=Z({getStateFromWidgetMgr:S,getDefaultStateFromProto:J,getCurrStateFromProto:Q,updateWidgetMgrState:X,element:e,widgetMgr:r,fragmentId:d,onFormCleared:I});O(v,l,u,o);const[C,b]=i.useState(!1),a=P(),[h]=i.useState(()=>L("text_input_")),{placeholder:T,formId:n,maxChars:f}=e,c=i.useCallback(()=>{m(!1),p({value:l,fromUi:!0})},[l,p]),j=x({formId:n})?r.allowFormEnterToSubmit(n):o,F=C&&W>a.breakpoints.hideWidgetDetails,w=i.useCallback(()=>{o&&c(),b(!1)},[o,c]),R=i.useCallback(()=>{b(!0)},[]),V=A({formId:n,maxChars:f,setDirty:m,setUiValue:u,setValueWithSource:p}),k=Y(n,c,o,r,d);return s.jsxs(N,{className:"stTextInput","data-testid":"stTextInput",ref:y,children:[s.jsx(D,{label:e.label,disabled:t,labelVisibility:E((g=e.labelVisibility)==null?void 0:g.value),htmlFor:h,children:e.help&&s.jsx(M,{children:s.jsx(U,{content:e.help,placement:_.TOP_RIGHT})})}),s.jsx(K,{value:l??"",placeholder:T,onBlur:w,onFocus:R,onChange:V,onKeyPress:k,"aria-label":e.label,disabled:t,id:h,type:$(e),autoComplete:e.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:a.lineHeights.inputWidget,paddingRight:a.spacing.sm,paddingLeft:a.spacing.md,paddingBottom:a.spacing.sm,paddingTop:a.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:a.sizes.minElementHeight,borderLeftWidth:a.sizes.borderWidth,borderRightWidth:a.sizes.borderWidth,borderTopWidth:a.sizes.borderWidth,borderBottomWidth:a.sizes.borderWidth}}}}),F&&s.jsx(G,{dirty:o,value:l??"",maxLength:f,inForm:x({formId:n}),allowEnterToSubmit:j})]})}function S(t,e){return t.getStringValue(e)??null}function J(t){return t.default??null}function Q(t){return t.value??null}function X(t,e,r,d){e.setStringValue(t,r.value,{fromUi:r.fromUi},d)}function $(t){return t.type===B.Type.PASSWORD?"password":"text"}const ee=i.memo(q);export{ee as default};
@@ -1,4 +1,4 @@
1
- import{r as g,cm as ur,cn as cr,co as pr,cp as dr,e as rn,cq as nn,g as on,c0 as K,cj as xe,ck as Ie,cr as an,ci as fr,c1 as V,B as hr,cs as sn,ct as yr,cu as gr,cv as ln,c2 as Re,cw as un,cx as cn,cy as pn,C as mr,H as dn,A as vr,b6 as fn,Q as ot,L as hn,j as Le,bY as yn,bZ as gn,cb as mn,b_ as vn,bH as bn}from"./index-NYCOzVlX.js";import{a as Dn}from"./useBasicWidgetState-vUy8Wspy.js";import{D as Me,a as Pe,T as Sn}from"./timepicker-Dz1EXIQj.js";import{I as On}from"./input-DdxVQNZ7.js";import{I as wn}from"./base-input-BHEia47e.js";import"./FormClearHelper--a7FEpt-.js";import"./inherits-DMADb7u9.js";import"./createSuper-RDzkTe3c.js";var kn=["title","size","color","overrides"];function at(){return at=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},at.apply(this,arguments)}function Cn(e,r){if(e==null)return{};var n=Mn(e,r),o,t;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)o=a[t],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function Mn(e,r){if(e==null)return{};var n={},o=Object.keys(e),t,a;for(a=0;a<o.length;a++)t=o[a],!(r.indexOf(t)>=0)&&(n[t]=e[t]);return n}function Pn(e,r){return Hn(e)||An(e,r)||En(e,r)||jn()}function jn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as g,cm as ur,cn as cr,co as pr,cp as dr,e as rn,cq as nn,g as on,c0 as K,cj as xe,ck as Ie,cr as an,ci as fr,c1 as V,B as hr,cs as sn,ct as yr,cu as gr,cv as ln,c2 as Re,cw as un,cx as cn,cy as pn,C as mr,H as dn,A as vr,b6 as fn,Q as ot,L as hn,j as Le,bY as yn,bZ as gn,cb as mn,b_ as vn,bH as bn}from"./index-OxGwEg3m.js";import{a as Dn}from"./useBasicWidgetState-Bm5AJWX7.js";import{D as Me,a as Pe,T as Sn}from"./timepicker-DQlSkM-Q.js";import{I as On}from"./input-CkptI290.js";import{I as wn}from"./base-input-NsRtpzFx.js";import"./FormClearHelper-DxeY-rII.js";import"./inherits-BbfuKc-R.js";import"./createSuper-Ipqc67nc.js";var kn=["title","size","color","overrides"];function at(){return at=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},at.apply(this,arguments)}function Cn(e,r){if(e==null)return{};var n=Mn(e,r),o,t;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)o=a[t],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function Mn(e,r){if(e==null)return{};var n={},o=Object.keys(e),t,a;for(a=0;a<o.length;a++)t=o[a],!(r.indexOf(t)>=0)&&(n[t]=e[t]);return n}function Pn(e,r){return Hn(e)||An(e,r)||En(e,r)||jn()}function jn(){throw new 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 En(e,r){if(e){if(typeof e=="string")return br(e,r);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 br(e,r)}}function br(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,o=new Array(r);n<r;n++)o[n]=e[n];return o}function An(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o=[],t=!0,a=!1,i,l;try{for(n=n.call(e);!(t=(i=n.next()).done)&&(o.push(i.value),!(r&&o.length===r));t=!0);}catch(p){a=!0,l=p}finally{try{!t&&n.return!=null&&n.return()}finally{if(a)throw l}}return o}}function Hn(e){if(Array.isArray(e))return e}function xn(e,r){var n=ur(),o=Pn(n,2),t=o[1],a=e.title,i=a===void 0?"Left":a,l=e.size,p=e.color,u=e.overrides,b=u===void 0?{}:u,c=Cn(e,kn),D=cr({component:t.icons&&t.icons.ChevronLeft?t.icons.ChevronLeft:null},b&&b.Svg?pr(b.Svg):{});return g.createElement(dr,at({viewBox:"0 0 24 24",ref:r,title:i,size:l,color:p,overrides:{Svg:D}},c),g.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"}))}const Dr=g.forwardRef(xn);var In=["title","size","color","overrides"];function it(){return it=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},it.apply(this,arguments)}function Rn(e,r){if(e==null)return{};var n=Ln(e,r),o,t;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)o=a[t],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function Ln(e,r){if(e==null)return{};var n={},o=Object.keys(e),t,a;for(a=0;a<o.length;a++)t=o[a],!(r.indexOf(t)>=0)&&(n[t]=e[t]);return n}function Bn(e,r){return Wn(e)||Fn(e,r)||$n(e,r)||Tn()}function Tn(){throw new 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 $n(e,r){if(e){if(typeof e=="string")return Sr(e,r);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 Sr(e,r)}}function Sr(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,o=new Array(r);n<r;n++)o[n]=e[n];return o}function Fn(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o=[],t=!0,a=!1,i,l;try{for(n=n.call(e);!(t=(i=n.next()).done)&&(o.push(i.value),!(r&&o.length===r));t=!0);}catch(p){a=!0,l=p}finally{try{!t&&n.return!=null&&n.return()}finally{if(a)throw l}}return o}}function Wn(e){if(Array.isArray(e))return e}function Nn(e,r){var n=ur(),o=Bn(n,2),t=o[1],a=e.title,i=a===void 0?"Right":a,l=e.size,p=e.color,u=e.overrides,b=u===void 0?{}:u,c=Rn(e,In),D=cr({component:t.icons&&t.icons.ChevronRight?t.icons.ChevronRight:null},b&&b.Svg?pr(b.Svg):{});return g.createElement(dr,it({viewBox:"0 0 24 24",ref:r,title:i,size:l,color:p,overrides:{Svg:D}},c),g.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29289 7.29289C8.90237 7.68342 8.90237 8.31658 9.29289 8.70711L12.5858 12L9.29289 15.2929C8.90237 15.6834 8.90237 16.3166 9.29289 16.7071C9.68342 17.0976 10.3166 17.0976 10.7071 16.7071L14.7071 12.7071C14.8946 12.5196 15 12.2652 15 12C15 11.7348 14.8946 11.4804 14.7071 11.2929L10.7071 7.29289C10.3166 6.90237 9.68342 6.90237 9.29289 7.29289Z"}))}const Or=g.forwardRef(Nn);var wr={exports:{}},st,kr;function Yn(){if(kr)return st;kr=1;function e(d){return d&&typeof d=="object"&&"default"in d?d.default:d}var r=e(rn()),n=nn();function o(d,m){for(var O=Object.getOwnPropertyNames(m),h=0;h<O.length;h++){var s=O[h],j=Object.getOwnPropertyDescriptor(m,s);j&&j.configurable&&d[s]===void 0&&Object.defineProperty(d,s,j)}return d}function t(){return(t=Object.assign||function(d){for(var m=1;m<arguments.length;m++){var O=arguments[m];for(var h in O)Object.prototype.hasOwnProperty.call(O,h)&&(d[h]=O[h])}return d}).apply(this,arguments)}function a(d,m){d.prototype=Object.create(m.prototype),o(d.prototype.constructor=d,m)}function i(d,m){if(d==null)return{};var O,h,s={},j=Object.keys(d);for(h=0;h<j.length;h++)O=j[h],0<=m.indexOf(O)||(s[O]=d[O]);return s}function l(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}var p=function(d,m,O,h,s,j,_,G){if(!d){var L;if(m===void 0)L=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var $=[O,h,s,j,_,G],Y=0;(L=new Error(m.replace(/%s/g,function(){return $[Y++]}))).name="Invariant Violation"}throw L.framesToPop=1,L}},u=p;function b(d,m,O){if("selectionStart"in d&&"selectionEnd"in d)d.selectionStart=m,d.selectionEnd=O;else{var h=d.createTextRange();h.collapse(!0),h.moveStart("character",m),h.moveEnd("character",O-m),h.select()}}function c(d){var m=0,O=0;if("selectionStart"in d&&"selectionEnd"in d)m=d.selectionStart,O=d.selectionEnd;else{var h=document.selection.createRange();h.parentElement()===d&&(m=-h.moveStart("character",-d.value.length),O=-h.moveEnd("character",-d.value.length))}return{start:m,end:O,length:O-m}}var D={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},y="_";function f(d,m,O){var h="",s="",j=null,_=[];if(m===void 0&&(m=y),O==null&&(O=D),!d||typeof d!="string")return{maskChar:m,formatChars:O,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var G=!1;return d.split("").forEach(function(L){G=!G&&L==="\\"||(G||!O[L]?(_.push(h.length),h.length===_.length-1&&(s+=L)):j=h.length+1,h+=L,!1)}),{maskChar:m,formatChars:O,prefix:s,mask:h,lastEditablePosition:j,permanents:_}}function v(d,m){return d.permanents.indexOf(m)!==-1}function S(d,m,O){var h=d.mask,s=d.formatChars;if(!O)return!1;if(v(d,m))return h[m]===O;var j=s[h[m]];return new RegExp(j).test(O)}function k(d,m){return m.split("").every(function(O,h){return v(d,h)||!S(d,h,O)})}function w(d,m){var O=d.maskChar,h=d.prefix;if(!O){for(;m.length>h.length&&v(d,m.length-1);)m=m.slice(0,m.length-1);return m.length}for(var s=h.length,j=m.length;j>=h.length;j--){var _=m[j];if(!v(d,j)&&S(d,j,_)){s=j+1;break}}return s}function C(d,m){return w(d,m)===d.mask.length}function M(d,m){var O=d.maskChar,h=d.mask,s=d.prefix;if(!O){for((m=B(d,"",m,0)).length<s.length&&(m=s);m.length<h.length&&v(d,m.length);)m+=h[m.length];return m}if(m)return B(d,M(d,""),m,0);for(var j=0;j<h.length;j++)v(d,j)?m+=h[j]:m+=O;return m}function N(d,m,O,h){var s=O+h,j=d.maskChar,_=d.mask,G=d.prefix,L=m.split("");if(j)return L.map(function(Y,ee){return ee<O||s<=ee?Y:v(d,ee)?_[ee]:j}).join("");for(var $=s;$<L.length;$++)v(d,$)&&(L[$]="");return O=Math.max(G.length,O),L.splice(O,s-O),m=L.join(""),M(d,m)}function B(d,m,O,h){var s=d.mask,j=d.maskChar,_=d.prefix,G=O.split(""),L=C(d,m);return!j&&h>m.length&&(m+=s.slice(m.length,h)),G.every(function($){for(;ae=$,v(d,U=h)&&ae!==s[U];){if(h>=m.length&&(m+=s[h]),Y=$,ee=h,j&&v(d,ee)&&Y===j)return!0;if(++h>=s.length)return!1}var Y,ee,U,ae;return!S(d,h,$)&&$!==j||(h<m.length?m=j||L||h<_.length?m.slice(0,h)+$+m.slice(h+1):(m=m.slice(0,h)+$+m.slice(h),M(d,m)):j||(m+=$),++h<s.length)}),m}function T(d,m,O,h){var s=d.mask,j=d.maskChar,_=O.split(""),G=h;return _.every(function(L){for(;Y=L,v(d,$=h)&&Y!==s[$];)if(++h>=s.length)return!1;var $,Y;return(S(d,h,L)||L===j)&&h++,h<s.length}),h-G}function x(d,m){for(var O=m;0<=O;--O)if(!v(d,O))return O;return null}function A(d,m){for(var O=d.mask,h=m;h<O.length;++h)if(!v(d,h))return h;return null}function H(d){return d||d===0?d+"":""}function I(d,m,O,h,s){var j=d.mask,_=d.prefix,G=d.lastEditablePosition,L=m,$="",Y=0,ee=0,U=Math.min(s.start,O.start);return O.end>s.start?ee=(Y=T(d,h,$=L.slice(s.start,O.end),U))?s.length:0:L.length<h.length&&(ee=h.length-L.length),L=h,ee&&(ee===1&&!s.length&&(U=s.start===O.start?A(d,O.start):x(d,O.start)),L=N(d,L,U,ee)),L=B(d,L,$,U),(U+=Y)>=j.length?U=j.length:U<_.length&&!Y?U=_.length:U>=_.length&&U<G&&Y&&(U=A(d,U)),$||($=null),{value:L=M(d,L),enteredString:$,selection:{start:U,end:U}}}function E(){var d=new RegExp("windows","i"),m=new RegExp("phone","i"),O=navigator.userAgent;return d.test(O)&&m.test(O)}function R(d){return typeof d=="function"}function he(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame}function oe(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function we(d){return(oe()?he():function(){return setTimeout(d,1e3/60)})(d)}function W(d){(oe()||clearTimeout)(d)}var Ae=function(d){function m(h){var s=d.call(this,h)||this;s.focused=!1,s.mounted=!1,s.previousSelection=null,s.selectionDeferId=null,s.saveSelectionLoopDeferId=null,s.saveSelectionLoop=function(){s.previousSelection=s.getSelection(),s.saveSelectionLoopDeferId=we(s.saveSelectionLoop)},s.runSaveSelectionLoop=function(){s.saveSelectionLoopDeferId===null&&s.saveSelectionLoop()},s.stopSaveSelectionLoop=function(){s.saveSelectionLoopDeferId!==null&&(W(s.saveSelectionLoopDeferId),s.saveSelectionLoopDeferId=null,s.previousSelection=null)},s.getInputDOMNode=function(){if(!s.mounted)return null;var P=n.findDOMNode(l(l(s))),F=typeof window<"u"&&P instanceof window.Element;if(P&&!F)return null;if(P.nodeName!=="INPUT"&&(P=P.querySelector("input")),!P)throw new Error("react-input-mask: inputComponent doesn't contain input node");return P},s.getInputValue=function(){var P=s.getInputDOMNode();return P?P.value:null},s.setInputValue=function(P){var F=s.getInputDOMNode();F&&(s.value=P,F.value=P)},s.setCursorToEnd=function(){var P=w(s.maskOptions,s.value),F=A(s.maskOptions,P);F!==null&&s.setCursorPosition(F)},s.setSelection=function(P,F,q){q===void 0&&(q={});var z=s.getInputDOMNode(),Q=s.isFocused();z&&Q&&(q.deferred||b(z,P,F),s.selectionDeferId!==null&&W(s.selectionDeferId),s.selectionDeferId=we(function(){s.selectionDeferId=null,b(z,P,F)}),s.previousSelection={start:P,end:F,length:Math.abs(F-P)})},s.getSelection=function(){return c(s.getInputDOMNode())},s.getCursorPosition=function(){return s.getSelection().start},s.setCursorPosition=function(P){s.setSelection(P,P)},s.isFocused=function(){return s.focused},s.getBeforeMaskedValueChangeConfig=function(){var P=s.maskOptions,F=P.mask,q=P.maskChar,z=P.permanents,Q=P.formatChars;return{mask:F,maskChar:q,permanents:z,alwaysShowMask:!!s.props.alwaysShowMask,formatChars:Q}},s.isInputAutofilled=function(P,F,q,z){var Q=s.getInputDOMNode();try{if(Q.matches(":-webkit-autofill"))return!0}catch{}return!s.focused||z.end<q.length&&F.end===P.length},s.onChange=function(P){var F=l(l(s)).beforePasteState,q=l(l(s)).previousSelection,z=s.props.beforeMaskedValueChange,Q=s.getInputValue(),fe=s.value,pe=s.getSelection();s.isInputAutofilled(Q,pe,fe,q)&&(fe=M(s.maskOptions,""),q={start:0,end:0,length:0}),F&&(q=F.selection,fe=F.value,pe={start:q.start+Q.length,end:q.start+Q.length,length:0},Q=fe.slice(0,q.start)+Q+fe.slice(q.end),s.beforePasteState=null);var Oe=I(s.maskOptions,Q,pe,fe,q),ze=Oe.enteredString,ge=Oe.selection,Ce=Oe.value;if(R(z)){var He=z({value:Ce,selection:ge},{value:fe,selection:q},ze,s.getBeforeMaskedValueChangeConfig());Ce=He.value,ge=He.selection}s.setInputValue(Ce),R(s.props.onChange)&&s.props.onChange(P),s.isWindowsPhoneBrowser?s.setSelection(ge.start,ge.end,{deferred:!0}):s.setSelection(ge.start,ge.end)},s.onFocus=function(P){var F=s.props.beforeMaskedValueChange,q=s.maskOptions,z=q.mask,Q=q.prefix;if(s.focused=!0,s.mounted=!0,z){if(s.value)w(s.maskOptions,s.value)<s.maskOptions.mask.length&&s.setCursorToEnd();else{var fe=M(s.maskOptions,Q),pe=M(s.maskOptions,fe),Oe=w(s.maskOptions,pe),ze=A(s.maskOptions,Oe),ge={start:ze,end:ze};if(R(F)){var Ce=F({value:pe,selection:ge},{value:s.value,selection:null},null,s.getBeforeMaskedValueChangeConfig());pe=Ce.value,ge=Ce.selection}var He=pe!==s.getInputValue();He&&s.setInputValue(pe),He&&R(s.props.onChange)&&s.props.onChange(P),s.setSelection(ge.start,ge.end)}s.runSaveSelectionLoop()}R(s.props.onFocus)&&s.props.onFocus(P)},s.onBlur=function(P){var F=s.props.beforeMaskedValueChange,q=s.maskOptions.mask;if(s.stopSaveSelectionLoop(),s.focused=!1,q&&!s.props.alwaysShowMask&&k(s.maskOptions,s.value)){var z="";R(F)&&(z=F({value:z,selection:null},{value:s.value,selection:s.previousSelection},null,s.getBeforeMaskedValueChangeConfig()).value);var Q=z!==s.getInputValue();Q&&s.setInputValue(z),Q&&R(s.props.onChange)&&s.props.onChange(P)}R(s.props.onBlur)&&s.props.onBlur(P)},s.onMouseDown=function(P){if(!s.focused&&document.addEventListener){s.mouseDownX=P.clientX,s.mouseDownY=P.clientY,s.mouseDownTime=new Date().getTime();var F=function q(z){if(document.removeEventListener("mouseup",q),s.focused){var Q=Math.abs(z.clientX-s.mouseDownX),fe=Math.abs(z.clientY-s.mouseDownY),pe=Math.max(Q,fe),Oe=new Date().getTime()-s.mouseDownTime;(pe<=10&&Oe<=200||pe<=5&&Oe<=300)&&s.setCursorToEnd()}};document.addEventListener("mouseup",F)}R(s.props.onMouseDown)&&s.props.onMouseDown(P)},s.onPaste=function(P){R(s.props.onPaste)&&s.props.onPaste(P),P.defaultPrevented||(s.beforePasteState={value:s.getInputValue(),selection:s.getSelection()},s.setInputValue(""))},s.handleRef=function(P){s.props.children==null&&R(s.props.inputRef)&&s.props.inputRef(P)};var j=h.mask,_=h.maskChar,G=h.formatChars,L=h.alwaysShowMask,$=h.beforeMaskedValueChange,Y=h.defaultValue,ee=h.value;s.maskOptions=f(j,_,G),Y==null&&(Y=""),ee==null&&(ee=Y);var U=H(ee);if(s.maskOptions.mask&&(L||U)&&(U=M(s.maskOptions,U),R($))){var ae=h.value;h.value==null&&(ae=Y),U=$({value:U,selection:null},{value:ae=H(ae),selection:null},null,s.getBeforeMaskedValueChangeConfig()).value}return s.value=U,s}a(m,d);var O=m.prototype;return O.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=E(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value))},O.componentDidUpdate=function(){var h=this.previousSelection,s=this.props,j=s.beforeMaskedValueChange,_=s.alwaysShowMask,G=s.mask,L=s.maskChar,$=s.formatChars,Y=this.maskOptions,ee=_||this.isFocused(),U=this.props.value!=null,ae=U?H(this.props.value):this.value,P=h?h.start:null;if(this.maskOptions=f(G,L,$),this.maskOptions.mask){!Y.mask&&this.isFocused()&&this.runSaveSelectionLoop();var F=this.maskOptions.mask&&this.maskOptions.mask!==Y.mask;if(Y.mask||U||(ae=this.getInputValue()),(F||this.maskOptions.mask&&(ae||ee))&&(ae=M(this.maskOptions,ae)),F){var q=w(this.maskOptions,ae);(P===null||q<P)&&(P=C(this.maskOptions,ae)?q:A(this.maskOptions,q))}!this.maskOptions.mask||!k(this.maskOptions,ae)||ee||U&&this.props.value||(ae="");var z={start:P,end:P};if(R(j)){var Q=j({value:ae,selection:z},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());ae=Q.value,z=Q.selection}this.value=ae;var fe=this.getInputValue()!==this.value;fe?(this.setInputValue(this.value),this.forceUpdate()):F&&this.forceUpdate();var pe=!1;z.start!=null&&z.end!=null&&(pe=!h||h.start!==z.start||h.end!==z.end),(pe||fe)&&this.setSelection(z.start,z.end)}else Y.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},O.componentWillUnmount=function(){this.mounted=!1,this.selectionDeferId!==null&&W(this.selectionDeferId),this.stopSaveSelectionLoop()},O.render=function(){var h,s=this.props,j=(s.mask,s.alwaysShowMask,s.maskChar,s.formatChars,s.inputRef,s.beforeMaskedValueChange,s.children),_=i(s,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(j){R(j)||u(!1);var G=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],L=t({},_);G.forEach(function(Y){return delete L[Y]}),h=j(L),G.filter(function(Y){return h.props[Y]!=null&&h.props[Y]!==_[Y]}).length&&u(!1)}else h=r.createElement("input",t({ref:this.handleRef},_));var $={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(_.disabled||_.readOnly||($.onChange=this.onChange,$.onPaste=this.onPaste,$.onMouseDown=this.onMouseDown),_.value!=null&&($.value=this.value)),h=r.cloneElement(h,$)},m}(r.Component);return st=Ae,st}var Cr;function Vn(){return Cr||(Cr=1,wr.exports=Yn()),wr.exports}var zn=Vn();const _n=on(zn);var Un=["startEnhancer","endEnhancer","error","positive","onChange","onFocus","onBlur","value","disabled","readOnly"],qn=["Input"],Kn=["mask","maskChar","overrides"];function Mr(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function lt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Mr(Object(n),!0).forEach(function(o){Xn(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mr(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Xn(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function _e(e){"@babel/helpers - typeof";return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_e(e)}function Be(){return Be=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Be.apply(this,arguments)}function ut(e,r){if(e==null)return{};var n=Qn(e,r),o,t;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)o=a[t],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function Qn(e,r){if(e==null)return{};var n={},o=Object.keys(e),t,a;for(a=0;a<o.length;a++)t=o[a],!(r.indexOf(t)>=0)&&(n[t]=e[t]);return n}var Pr=g.forwardRef(function(e,r){e.startEnhancer,e.endEnhancer,e.error,e.positive;var n=e.onChange,o=e.onFocus,t=e.onBlur,a=e.value,i=e.disabled,l=e.readOnly,p=ut(e,Un);return g.createElement(_n,Be({onChange:n,onFocus:o,onBlur:t,value:a,disabled:i,readOnly:l},p),function(u){return g.createElement(wn,Be({ref:r,onChange:n,onFocus:o,onBlur:t,value:a,disabled:i,readOnly:l},u))})});Pr.displayName="MaskOverride";function jr(e){var r=e.mask,n=e.maskChar,o=e.overrides;o=o===void 0?{}:o;var t=o.Input,a=t===void 0?{}:t,i=ut(o,qn),l=ut(e,Kn),p=Pr,u={},b={};typeof a=="function"?p=a:_e(a)==="object"&&(p=a.component||p,u=a.props||{},b=a.style||{}),_e(u)==="object"&&(u=lt(lt({},u),{},{mask:u.mask||r,maskChar:u.maskChar||n}));var c=lt({Input:{component:p,props:u,style:b}},i);return g.createElement(On,Be({},l,{overrides:c}))}jr.defaultProps={maskChar:" "};var ct=Object.freeze({horizontal:"horizontal",vertical:"vertical"}),Er=[0,1,2,3,4,5,6],Jn=[0,1,2,3,4,5,6,7,8,9,10,11],re={high:"high",default:"default"},Se={startDate:"startDate",endDate:"endDate"},Zn={locked:"locked"};function Ar(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function je(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ar(Object(n),!0).forEach(function(o){Gn(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ar(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Gn(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var pt=K("label",function(e){var r=e.$disabled,n=e.$theme,o=n.colors,t=n.typography;return je(je({},t.font250),{},{width:"100%",color:r?o.contentSecondary:o.contentPrimary,display:"block",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0})});pt.displayName="Label",pt.displayName="Label";var dt=K("span",function(e){var r=e.$theme.sizing;return{display:"flex",width:"100%",marginTop:r.scale300,marginRight:0,marginBottom:r.scale300,marginLeft:0}});dt.displayName="LabelContainer",dt.displayName="LabelContainer";var ft=K("span",function(e){var r=e.$disabled,n=e.$counterError,o=e.$theme,t=o.colors,a=o.typography;return je(je({},a.font100),{},{flex:0,width:"100%",color:n?t.negative400:r?t.contentSecondary:t.contentPrimary})});ft.displayName="LabelEndEnhancer",ft.displayName="LabelEndEnhancer";var ht=K("div",function(e){var r=e.$error,n=e.$positive,o=e.$theme,t=o.colors,a=o.sizing,i=o.typography,l=t.contentSecondary;return r?l=t.negative400:n&&(l=t.positive400),je(je({},i.font100),{},{color:l,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,marginTop:a.scale300,marginRight:0,marginBottom:a.scale300,marginLeft:0})});ht.displayName="Caption",ht.displayName="Caption";var yt=K("div",function(e){var r=e.$theme.sizing;return{width:"100%",marginBottom:r.scale600}});yt.displayName="ControlContainer",yt.displayName="ControlContainer";function ke(){return ke=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ke.apply(this,arguments)}function Ue(e){"@babel/helpers - typeof";return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ue(e)}function eo(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function to(e,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ro(e,r,n){return r&&to(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function no(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&gt(e,r)}function gt(e,r){return gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},gt(e,r)}function oo(e){var r=so();return function(){var n=qe(e),o;if(r){var t=qe(this).constructor;o=Reflect.construct(n,arguments,t)}else o=n.apply(this,arguments);return ao(this,o)}}function ao(e,r){if(r&&(Ue(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return io(e)}function io(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function so(){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 qe(e){return qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qe(e)}function lo(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function uo(e,r,n,o){return r&&typeof r!="boolean"?typeof r=="function"?r(o):r:n&&typeof n!="boolean"?typeof n=="function"?n(o):n:e?typeof e=="function"?e(o):e:null}var mt=function(e){no(n,e);var r=oo(n);function n(){return eo(this,n),r.apply(this,arguments)}return ro(n,[{key:"render",value:function(){var o=this.props,t=o.overrides,a=t.Label,i=t.LabelEndEnhancer,l=t.LabelContainer,p=t.Caption,u=t.ControlContainer,b=o.label,c=o.caption,D=o.disabled,y=o.error,f=o.positive,v=o.htmlFor,S=o.children,k=o.counter,w=g.Children.only(S).props,C={$disabled:!!D,$error:!!y,$positive:!!f},M=xe(a)||pt,N=xe(i)||ft,B=xe(l)||dt,T=xe(p)||ht,x=xe(u)||yt,A=uo(c,y,f,C),H=this.props.labelEndEnhancer;if(k){var I=null,E=null,R=null;Ue(k)==="object"&&(E=k.length,I=k.maxLength,R=k.error),I=I||w.maxLength,E==null&&typeof w.value=="string"&&(E=w.value.length),E==null&&(E=0),C.$length=E,I==null?H||(H="".concat(E)):(C.$maxLength=E,H||(H="".concat(E,"/").concat(I)),E>I&&R==null&&(R=!0)),R&&(C.$error=!0,C.$counterError=!0)}return g.createElement(g.Fragment,null,b&&g.createElement(B,ke({},C,Ie(l)),g.createElement(M,ke({"data-baseweb":"form-control-label",htmlFor:v||w.id},C,Ie(a)),typeof b=="function"?b(C):b),!!H&&g.createElement(N,ke({},C,Ie(i)),typeof H=="function"?H(C):H)),g.createElement(an,null,function(he){return g.createElement(x,ke({"data-baseweb":"form-control-container"},C,Ie(u)),g.Children.map(S,function(oe,we){if(oe){var W=oe.key||String(we);return g.cloneElement(oe,{key:W,"aria-errormessage":y?he:null,"aria-describedby":c||f?he:null,disabled:w.disabled||D,error:typeof w.error<"u"?w.error:C.$error,positive:typeof w.positive<"u"?w.positive:C.$positive})}}),(!!c||!!y||f)&&g.createElement(T,ke({"data-baseweb":"form-control-caption",id:he},C,Ie(p)),A))}))}}]),n}(g.Component);lo(mt,"defaultProps",{overrides:{},label:null,caption:null,disabled:!1,counter:!1});function Hr(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function xr(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Hr(Object(n),!0).forEach(function(o){co(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hr(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function co(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var po=function(e){return Jn.map(function(r){return{id:r.toString(),label:e(r)}})},fo=function(e,r){return e.map(function(n){return r.includes(Number(n.id))?n:xr(xr({},n),{},{disabled:!0})})},ho=function(e){var r=e.filterMonthsList,n=e.formatMonthLabel,o=po(n);return r&&(o=fo(o,r)),o};function yo(e){var r=e.$range,n=r===void 0?!1:r,o=e.$disabled,t=o===void 0?!1:o,a=e.$isHighlighted,i=a===void 0?!1:a,l=e.$isHovered,p=l===void 0?!1:l,u=e.$selected,b=u===void 0?!1:u,c=e.$hasRangeSelected,D=c===void 0?!1:c,y=e.$startDate,f=y===void 0?!1:y,v=e.$endDate,S=v===void 0?!1:v,k=e.$pseudoSelected,w=k===void 0?!1:k,C=e.$hasRangeHighlighted,M=C===void 0?!1:C,N=e.$pseudoHighlighted,B=N===void 0?!1:N,T=e.$hasRangeOnRight,x=T===void 0?!1:T,A=e.$startOfMonth,H=A===void 0?!1:A,I=e.$endOfMonth,E=I===void 0?!1:I,R=e.$outsideMonth,he=R===void 0?!1:R;return"".concat(+n).concat(+t).concat(+(i||p)).concat(+b).concat(+D).concat(+f).concat(+S).concat(+w).concat(+M).concat(+B).concat(+(M&&!B&&x)).concat(+(M&&!B&&!x)).concat(+H).concat(+E).concat(+he)}function go(e,r){return Do(e)||bo(e,r)||vo(e,r)||mo()}function mo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vo(e,r){if(e){if(typeof e=="string")return Ir(e,r);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 Ir(e,r)}}function Ir(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,o=new Array(r);n<r;n++)o[n]=e[n];return o}function bo(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o=[],t=!0,a=!1,i,l;try{for(n=n.call(e);!(t=(i=n.next()).done)&&(o.push(i.value),!(r&&o.length===r));t=!0);}catch(p){a=!0,l=p}finally{try{!t&&n.return!=null&&n.return()}finally{if(a)throw l}}return o}}function Do(e){if(Array.isArray(e))return e}function Rr(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function te(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Rr(Object(n),!0).forEach(function(o){Te(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rr(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Te(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var vt=K("div",function(e){var r=e.$separateRangeInputs;return te({width:"100%"},r?{display:"flex",justifyContent:"center"}:{})});vt.displayName="StyledInputWrapper",vt.displayName="StyledInputWrapper";var bt=K("div",function(e){var r=e.$theme;return te(te({},r.typography.LabelMedium),{},{marginBottom:r.sizing.scale300})});bt.displayName="StyledInputLabel",bt.displayName="StyledInputLabel";var Dt=K("div",function(e){var r=e.$theme;return{width:"100%",marginRight:r.sizing.scale300}});Dt.displayName="StyledStartDate",Dt.displayName="StyledStartDate";var St=K("div",function(e){return e.$theme,{width:"100%"}});St.displayName="StyledEndDate",St.displayName="StyledEndDate";var Ot=K("div",function(e){var r=e.$theme,n=r.typography,o=r.colors,t=r.borders;return te(te({},n.font200),{},{color:o.calendarForeground,backgroundColor:o.calendarBackground,textAlign:"center",borderTopLeftRadius:t.surfaceBorderRadius,borderTopRightRadius:t.surfaceBorderRadius,borderBottomRightRadius:t.surfaceBorderRadius,borderBottomLeftRadius:t.surfaceBorderRadius,display:"inline-block"})});Ot.displayName="StyledRoot",Ot.displayName="StyledRoot";var wt=K("div",function(e){var r=e.$orientation;return{display:"flex",flexDirection:r===ct.vertical?"column":"row"}});wt.displayName="StyledMonthContainer",wt.displayName="StyledMonthContainer";var kt=K("div",function(e){var r=e.$theme.sizing,n=e.$density;return{paddingTop:r.scale300,paddingBottom:n===re.high?r.scale400:r.scale300,paddingLeft:r.scale500,paddingRight:r.scale500}});kt.displayName="StyledCalendarContainer",kt.displayName="StyledCalendarContainer";var Ke=K("div",function(e){var r=e.$theme,n=r.direction==="rtl"?"right":"left";return{marginBottom:r.sizing.scale600,paddingLeft:r.sizing.scale600,paddingRight:r.sizing.scale600,textAlign:n}});Ke.displayName="StyledSelectorContainer",Ke.displayName="StyledSelectorContainer";var Ct=K("div",function(e){var r=e.$theme,n=r.typography,o=r.borders,t=r.colors,a=r.sizing,i=e.$density;return te(te({},i===re.high?n.LabelMedium:n.LabelLarge),{},{color:t.calendarHeaderForeground,display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:a.scale600,paddingBottom:a.scale300,paddingLeft:a.scale600,paddingRight:a.scale600,backgroundColor:t.calendarHeaderBackground,borderTopLeftRadius:o.surfaceBorderRadius,borderTopRightRadius:o.surfaceBorderRadius,borderBottomRightRadius:0,borderBottomLeftRadius:0,minHeight:i===re.high?"calc(".concat(a.scale800," + ").concat(a.scale0,")"):a.scale950})});Ct.displayName="StyledCalendarHeader",Ct.displayName="StyledCalendarHeader";var Mt=K("div",function(e){return{color:e.$theme.colors.calendarHeaderForeground,backgroundColor:e.$theme.colors.calendarHeaderBackground,whiteSpace:"nowrap"}});Mt.displayName="StyledMonthHeader",Mt.displayName="StyledMonthHeader";var Pt=K("button",function(e){var r=e.$theme,n=r.typography,o=r.colors,t=e.$isFocusVisible,a=e.$density;return te(te({},a===re.high?n.LabelMedium:n.LabelLarge),{},{alignItems:"center",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,color:o.calendarHeaderForeground,cursor:"pointer",display:"flex",outline:"none",":focus":{boxShadow:t?"0 0 0 3px ".concat(o.accent):"none"}})});Pt.displayName="StyledMonthYearSelectButton",Pt.displayName="StyledMonthYearSelectButton";var jt=K("span",function(e){var r=e.$theme.direction==="rtl"?"marginRight":"marginLeft";return Te({alignItems:"center",display:"flex"},r,e.$theme.sizing.scale500)});jt.displayName="StyledMonthYearSelectIconContainer",jt.displayName="StyledMonthYearSelectIconContainer";function Lr(e){var r=e.$theme,n=e.$disabled,o=e.$isFocusVisible;return{boxSizing:"border-box",display:"flex",color:n?r.colors.calendarHeaderForegroundDisabled:r.colors.calendarHeaderForeground,cursor:n?"default":"pointer",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0",marginBottom:0,marginTop:0,outline:"none",":focus":n?{}:{boxShadow:o?"0 0 0 3px ".concat(r.colors.accent):"none"}}}var Et=K("button",Lr);Et.displayName="StyledPrevButton",Et.displayName="StyledPrevButton";var At=K("button",Lr);At.displayName="StyledNextButton",At.displayName="StyledNextButton";var Ht=K("div",function(e){return{display:"inline-block"}});Ht.displayName="StyledMonth",Ht.displayName="StyledMonth";var xt=K("div",function(e){var r=e.$theme.sizing;return{whiteSpace:"nowrap",display:"flex",marginBottom:r.scale0}});xt.displayName="StyledWeek",xt.displayName="StyledWeek";function X(e,r){var n,o=e.substr(0,12)+"1"+e.substr(13),t=e.substr(0,13)+"1"+e.substr(14);return n={},Te(n,e,r),Te(n,o,r),Te(n,t,r),n}function It(e,r){var n=r.colors,o={":before":{content:null},":after":{content:null}},t=o,a={color:n.calendarForegroundDisabled,":before":{content:null},":after":{content:null}},i={color:n.calendarForegroundDisabled,":before":{borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",backgroundColor:"transparent"},":after":{borderTopLeftRadius:"0%",borderTopRightRadius:"0%",borderBottomLeftRadius:"0%",borderBottomRightRadius:"0%",borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent"}},l={":before":{content:null}},p=1;e&&e[p]==="1"&&(t=a);var u=Object.assign({},X("001000000000000",{color:n.calendarDayForegroundPseudoSelected}),X("000100000000000",{color:n.calendarDayForegroundSelected}),X("001100000000000",{color:n.calendarDayForegroundSelectedHighlighted}),{"010000000000000":{color:n.calendarForegroundDisabled,":after":{content:null}}},{"011000000000000":{color:n.calendarForegroundDisabled,":after":{content:null}}},X("000000000000001",i),X("101000000000000",l),X("101010000000000",l),X("100100000000000",{color:n.calendarDayForegroundSelected}),X("101100000000000",{color:n.calendarDayForegroundSelectedHighlighted,":before":{content:null}}),X("100111100000000",{color:n.calendarDayForegroundSelected,":before":{content:null}}),X("101111100000000",{color:n.calendarDayForegroundSelectedHighlighted,":before":{content:null}}),X("100111000000000",{color:n.calendarDayForegroundSelected}),X("100110100000000",{color:n.calendarDayForegroundSelected,":before":{left:null,right:"50%"}}),X("100100001010000",{color:n.calendarDayForegroundSelected}),X("100100001001000",{color:n.calendarDayForegroundSelected,":before":{left:null,right:"50%"}}),X("101000001010000",{":before":{left:null,right:"50%"}}),{"101000001001000":{}},{"101000001001100":{}},{"101000001001010":{}},X("100010010000000",{color:n.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}),{"101000001100000":{color:n.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}},X("100000001100000",{color:n.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}),X("101111000000000",{color:n.calendarDayForegroundSelectedHighlighted}),X("101110100000000",{color:n.calendarDayForegroundSelectedHighlighted,":before":{left:null,right:"50%"}}),X("101010010000000",{color:n.calendarDayForegroundPseudoSelectedHighlighted,":before":{left:"0",width:"100%"}}),X("100000000000001",i),X("100000001010001",i),X("100000001001001",i),X("100010000000001",i));return u[e]||t}var Rt=K("div",function(e){var r=e.$disabled,n=e.$isFocusVisible,o=e.$isHighlighted,t=e.$peekNextMonth,a=e.$pseudoSelected,i=e.$range,l=e.$selected,p=e.$outsideMonth,u=e.$outsideMonthWithinRange,b=e.$hasDateLabel,c=e.$density,D=e.$hasLockedBehavior,y=e.$selectedInput,f=e.$value,v=e.$theme,S=v.colors,k=v.typography,w=v.sizing,C=yo(e),M;b?c===re.high?M="60px":M="70px":c===re.high?M="40px":M="48px";var N=Array.isArray(f)?f:[f,null],B=go(N,2),T=B[0],x=B[1],A=y===Se.startDate?x!==null&&typeof x<"u":T!==null&&typeof T<"u",H=i&&!(D&&!A);return te(te(te({},c===re.high?k.ParagraphSmall:k.ParagraphMedium),{},{boxSizing:"border-box",position:"relative",cursor:r||!t&&p?"default":"pointer",color:S.calendarForeground,display:"inline-block",width:c===re.high?"42px":"50px",height:M,lineHeight:c===re.high?w.scale700:w.scale900,textAlign:"center",paddingTop:w.scale300,paddingBottom:w.scale300,paddingLeft:w.scale300,paddingRight:w.scale300,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,outline:"none",backgroundColor:"transparent",transform:"scale(1)"},It(C,e.$theme)),{},{":after":te(te({zIndex:-1,content:'""',boxSizing:"border-box",display:"inline-block",boxShadow:n&&(!p||t)?"0 0 0 3px ".concat(S.accent):"none",backgroundColor:l?S.calendarDayBackgroundSelectedHighlighted:a&&o?S.calendarDayBackgroundPseudoSelectedHighlighted:S.calendarBackground,height:b?"100%":c===re.high?"42px":"50px",width:"100%",position:"absolute",top:b?0:"-1px",left:0,paddingTop:w.scale200,paddingBottom:w.scale200,borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderTopColor:S.borderSelected,borderBottomColor:S.borderSelected,borderRightColor:S.borderSelected,borderLeftColor:S.borderSelected,borderTopLeftRadius:b?w.scale800:"100%",borderTopRightRadius:b?w.scale800:"100%",borderBottomLeftRadius:b?w.scale800:"100%",borderBottomRightRadius:b?w.scale800:"100%"},It(C,e.$theme)[":after"]||{}),u?{content:null}:{})},H?{":before":te(te({zIndex:-1,content:'""',boxSizing:"border-box",display:"inline-block",backgroundColor:S.mono300,position:"absolute",height:"100%",width:"50%",top:0,left:"50%",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftWidth:"0",borderRightWidth:"0",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopColor:"transparent",borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},It(C,e.$theme)[":before"]||{}),u?{backgroundColor:S.mono300,left:"0",width:"100%",content:'""'}:{})}:{})});Rt.displayName="StyledDay",Rt.displayName="StyledDay";var Lt=K("div",function(e){var r=e.$theme,n=r.typography,o=r.colors,t=e.$selected;return te(te({},n.ParagraphXSmall),{},{color:t?o.contentInverseTertiary:o.contentTertiary})});Lt.displayName="StyledDayLabel",Lt.displayName="StyledDayLabel";var Bt=K("div",function(e){var r=e.$theme,n=r.typography,o=r.colors,t=r.sizing,a=e.$density;return te(te({},n.LabelMedium),{},{color:o.contentTertiary,boxSizing:"border-box",position:"relative",cursor:"default",display:"inline-block",width:a===re.high?"42px":"50px",height:a===re.high?"40px":"48px",textAlign:"center",lineHeight:t.scale900,paddingTop:t.scale300,paddingBottom:t.scale300,paddingLeft:t.scale200,paddingRight:t.scale200,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,backgroundColor:"transparent"})});Bt.displayName="StyledWeekdayHeader",Bt.displayName="StyledWeekdayHeader";function Tt(e){"@babel/helpers - typeof";return Tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Tt(e)}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},de.apply(this,arguments)}function me(e,r){return ko(e)||wo(e,r)||Oo(e,r)||So()}function So(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -1 +1 @@
1
- import{r as i,L as f,j as c,cE as v,bZ as h}from"./index-NYCOzVlX.js";import{a as S}from"./useBasicWidgetState-vUy8Wspy.js";import"./FormClearHelper--a7FEpt-.js";const V=(e,l)=>e.getIntValue(l),I=e=>e.default??null,M=e=>e.value??null,U=(e,l,t,a)=>{l.setIntValue(e,t.value,{fromUi:t.fromUi},a)},j=({disabled:e,element:l,widgetMgr:t,fragmentId:a})=>{const{options:s,help:u,label:d,labelVisibility:r,placeholder:m}=l,[n,o]=S({getStateFromWidgetMgr:V,getDefaultStateFromProto:I,getCurrStateFromProto:M,updateWidgetMgrState:U,element:l,widgetMgr:t,fragmentId:a}),g=i.useCallback(p=>{o({value:p,fromUi:!0})},[o]),b=f(l.default)&&!e;return c.jsx(v,{label:d,labelVisibility:h(r==null?void 0:r.value),options:s,disabled:e,onChange:g,value:n,help:u,placeholder:m,clearable:b})},x=i.memo(j);export{x as default};
1
+ import{r as i,L as f,j as c,cE as v,bZ as h}from"./index-OxGwEg3m.js";import{a as S}from"./useBasicWidgetState-Bm5AJWX7.js";import"./FormClearHelper-DxeY-rII.js";const V=(e,l)=>e.getIntValue(l),I=e=>e.default??null,M=e=>e.value??null,U=(e,l,t,a)=>{l.setIntValue(e,t.value,{fromUi:t.fromUi},a)},j=({disabled:e,element:l,widgetMgr:t,fragmentId:a})=>{const{options:s,help:u,label:d,labelVisibility:r,placeholder:m}=l,[n,o]=S({getStateFromWidgetMgr:V,getDefaultStateFromProto:I,getCurrStateFromProto:M,updateWidgetMgrState:U,element:l,widgetMgr:t,fragmentId:a}),g=i.useCallback(p=>{o({value:p,fromUi:!0})},[o]),b=f(l.default)&&!e;return c.jsx(v,{label:d,labelVisibility:h(r==null?void 0:r.value),options:s,disabled:e,onChange:g,value:n,help:u,placeholder:m,clearable:b})},x=i.memo(j);export{x as default};
@@ -1 +1 @@
1
- import{c as t,r as a,j as s,b5 as r}from"./index-NYCOzVlX.js";import{P as o}from"./ProgressBar-Col3VLE4.js";const i=t("div",{target:"e18r7x300"})(({theme:e})=>({paddingBottom:e.spacing.sm,lineHeight:"normal"}),"");function l({element:e}){return s.jsxs("div",{className:"stProgress","data-testid":"stProgress",children:[s.jsx(i,{children:s.jsx(r,{source:e.text,allowHTML:!1,isLabel:!0})}),s.jsx(o,{value:e.value})]})}const m=a.memo(l);export{m as default};
1
+ import{c as t,r as a,j as s,b5 as r}from"./index-OxGwEg3m.js";import{P as o}from"./ProgressBar-xr2SnNK1.js";const i=t("div",{target:"e18r7x300"})(({theme:e})=>({paddingBottom:e.spacing.sm,lineHeight:"normal"}),"");function l({element:e}){return s.jsxs("div",{className:"stProgress","data-testid":"stProgress",children:[s.jsx(i,{children:s.jsx(r,{source:e.text,allowHTML:!1,isLabel:!0})}),s.jsx(o,{value:e.value})]})}const m=a.memo(l);export{m as default};
@@ -1 +1 @@
1
- import{c as M,r as a,u as U,bz as w,bP as j,j as f,l as x}from"./index-NYCOzVlX.js";const O=M("iframe",{target:"evvcert0"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"}),""),$=x.getLogger("Video"),A={width:"100%"};function k({element:r,endpoints:s,elementMgr:m}){const i=a.useRef(null),{type:h,url:v,startTime:o,subtitles:y,endTime:c,loop:l,autoplay:T,muted:S}=r,p=U(v),u=w(y),b=a.useMemo(()=>{if(!r.id)return!0;const e=m.getElementState(r.id,"preventAutoplay");return e||m.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,m]),g=a.useMemo(()=>JSON.stringify(u?u.map(e=>s.buildMediaURL(`${e.url}`)):[]),[u,s]);a.useEffect(()=>{const e=JSON.parse(g);e.length!==0&&e.forEach(t=>{s.checkSourceUrlResponse(t,"Video Subtitle")})},[g,s]),a.useEffect(()=>{i.current&&(i.current.currentTime=o)},[o]),a.useEffect(()=>{const e=i.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),a.useEffect(()=>{const e=i.current;if(!e)return;let t=!1;const d=()=>{c>0&&e.currentTime>=c&&(l?(e.currentTime=o||0,e.play()):t||(t=!0,e.pause()))};return c>0&&e.addEventListener("timeupdate",d),()=>{e&&c>0&&e.removeEventListener("timeupdate",d)}},[c,l,o]),a.useEffect(()=>{const e=i.current;if(!e)return;const t=()=>{l&&(e.currentTime=o||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[l,o]);const L=e=>{const{startTime:t,endTime:d,loop:N,autoplay:P,muted:R}=r,n=new URL(e);if(t&&!isNaN(t)&&n.searchParams.append("start",t.toString()),d&&!isNaN(d)&&n.searchParams.append("end",d.toString()),N){n.searchParams.append("loop","1");const E=n.pathname.split("/").pop();E&&n.searchParams.append("playlist",E)}return P&&n.searchParams.append("autoplay","1"),R&&n.searchParams.append("mute","1"),n.toString()};if(h===j.Type.YOUTUBE_IFRAME)return f.jsx(O,{className:"stVideo","data-testid":"stVideo",title:p,src:L(p),allow:"autoplay; encrypted-media",allowFullScreen:!0});const V=e=>{const t=e.currentTarget.src;$.error(`Client Error: Video source error - ${t}`),s.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return f.jsx("video",{className:"stVideo","data-testid":"stVideo",ref:i,controls:!0,muted:S,autoPlay:T&&!b,src:s.buildMediaURL(p),style:A,crossOrigin:void 0,onError:V,children:u&&u.map((e,t)=>f.jsx("track",{kind:"captions",src:s.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const J=a.memo(k);export{J as default};
1
+ import{c as M,r as a,u as U,bz as w,bP as j,j as f,l as x}from"./index-OxGwEg3m.js";const O=M("iframe",{target:"evvcert0"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"}),""),$=x.getLogger("Video"),A={width:"100%"};function k({element:r,endpoints:s,elementMgr:m}){const i=a.useRef(null),{type:h,url:v,startTime:o,subtitles:y,endTime:c,loop:l,autoplay:T,muted:S}=r,p=U(v),u=w(y),b=a.useMemo(()=>{if(!r.id)return!0;const e=m.getElementState(r.id,"preventAutoplay");return e||m.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,m]),g=a.useMemo(()=>JSON.stringify(u?u.map(e=>s.buildMediaURL(`${e.url}`)):[]),[u,s]);a.useEffect(()=>{const e=JSON.parse(g);e.length!==0&&e.forEach(t=>{s.checkSourceUrlResponse(t,"Video Subtitle")})},[g,s]),a.useEffect(()=>{i.current&&(i.current.currentTime=o)},[o]),a.useEffect(()=>{const e=i.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),a.useEffect(()=>{const e=i.current;if(!e)return;let t=!1;const d=()=>{c>0&&e.currentTime>=c&&(l?(e.currentTime=o||0,e.play()):t||(t=!0,e.pause()))};return c>0&&e.addEventListener("timeupdate",d),()=>{e&&c>0&&e.removeEventListener("timeupdate",d)}},[c,l,o]),a.useEffect(()=>{const e=i.current;if(!e)return;const t=()=>{l&&(e.currentTime=o||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[l,o]);const L=e=>{const{startTime:t,endTime:d,loop:N,autoplay:P,muted:R}=r,n=new URL(e);if(t&&!isNaN(t)&&n.searchParams.append("start",t.toString()),d&&!isNaN(d)&&n.searchParams.append("end",d.toString()),N){n.searchParams.append("loop","1");const E=n.pathname.split("/").pop();E&&n.searchParams.append("playlist",E)}return P&&n.searchParams.append("autoplay","1"),R&&n.searchParams.append("mute","1"),n.toString()};if(h===j.Type.YOUTUBE_IFRAME)return f.jsx(O,{className:"stVideo","data-testid":"stVideo",title:p,src:L(p),allow:"autoplay; encrypted-media",allowFullScreen:!0});const V=e=>{const t=e.currentTarget.src;$.error(`Client Error: Video source error - ${t}`),s.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return f.jsx("video",{className:"stVideo","data-testid":"stVideo",ref:i,controls:!0,muted:S,autoPlay:T&&!b,src:s.buildMediaURL(p),style:A,crossOrigin:void 0,onError:V,children:u&&u.map((e,t)=>f.jsx("track",{kind:"captions",src:s.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const J=a.memo(k);export{J as default};
@@ -1,2 +1,2 @@
1
- import{e as Ae,c0 as G,r as C,cv as pt,ci as gt,c1 as Q,cw as mt,cx as vt,c as le,I as bt,ca as yt,A as wt,be as xt,j as Z,R as _e,cU as kt,bY as Tt,bZ as Ot,cb as Mt,b_ as Rt,bH as St,Q as Dt,cV as Me}from"./index-NYCOzVlX.js";import{s as ze}from"./sprintf-D7DtBTRn.js";import{a as Et}from"./useBasicWidgetState-vUy8Wspy.js";import"./FormClearHelper--a7FEpt-.js";var de={},H={},he={},Fe={},Ve;function Re(){return Ve||(Ve=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Direction=void 0,function(n){n.Right="to right",n.Left="to left",n.Down="to bottom",n.Up="to top"}(e.Direction||(e.Direction={}))}(Fe)),Fe}var Ne;function Ue(){return Ne||(Ne=1,function(e){var n=he&&he.__spreadArray||function(o,i,u){if(u||arguments.length===2)for(var f=0,S=i.length,v;f<S;f++)(v||!(f in i))&&(v||(v=Array.prototype.slice.call(i,0,f)),v[f]=i[f]);return o.concat(v||Array.prototype.slice.call(i))};Object.defineProperty(e,"__esModule",{value:!0}),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 a=Ae(),s=Re(),g=function(o){var i=o.toString().split(".")[1];return i?i.length:0};e.getStepDecimals=g;function k(o){return o.touches&&o.touches.length||o.changedTouches&&o.changedTouches.length}e.isTouchEvent=k;function l(o,i,u){var f=(i-o)/u,S=8,v=Number(f.toFixed(S));return parseInt(v.toString(),10)===v}e.isStepDivisible=l;function h(o,i,u,f,S,v,w){var b=1e11;if(o=Math.round(o*b)/b,!v){var P=w[i-1],j=w[i+1];if(P&&P>o)return P;if(j&&j<o)return j}if(o>f)return f;if(o<u)return u;var L=Math.floor(o*b-u*b)%Math.floor(S*b),N=Math.floor(o*b-Math.abs(L)),X=L===0?o:N/b,A=Math.abs(L/b)<S/2?X:X+S,U=(0,e.getStepDecimals)(S);return parseFloat(A.toFixed(U))}e.normalizeValue=h;function _(o,i,u){return(o-i)/(u-i)}e.relativeValue=_;function V(o){return o===s.Direction.Up||o===s.Direction.Down}e.isVertical=V;function z(o,i,u){if(i>=u)throw new RangeError("min (".concat(i,") is equal/bigger than max (").concat(u,")"));if(o<i)throw new RangeError("value (".concat(o,") is smaller than min (").concat(i,")"));if(o>u)throw new RangeError("value (".concat(o,") is bigger than max (").concat(u,")"))}e.checkBoundaries=z;function O(o,i,u){return o<i?i:o>u?u:o}e.checkValuesAgainstBoundaries=O;function x(o){if(!(o.length<2)&&!o.slice(1).every(function(i,u){return o[u]<=i}))throw new RangeError("values={[".concat(o,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=x;function d(o){var i=window.getComputedStyle(o);return{top:parseInt(i["margin-top"],10),bottom:parseInt(i["margin-bottom"],10),left:parseInt(i["margin-left"],10),right:parseInt(i["margin-right"],10)}}e.getMargin=d;function t(o){var i=window.getComputedStyle(o);return{top:parseInt(i["padding-top"],10)+parseInt(i["border-top-width"],10),bottom:parseInt(i["padding-bottom"],10)+parseInt(i["border-bottom-width"],10),left:parseInt(i["padding-left"],10)+parseInt(i["border-left-width"],10),right:parseInt(i["padding-right"],10)+parseInt(i["border-right-width"],10)}}e.getPaddingAndBorder=t;function r(o,i,u){var f=u?-1:1;o.forEach(function(S,v){return p(S,f*i[v].x,i[v].y)})}e.translateThumbs=r;function c(o,i,u,f){for(var S=0,v=B(o[0],i,u,f),w=1;w<o.length;w++){var b=B(o[w],i,u,f);b<v&&(v=b,S=w)}return S}e.getClosestThumbIndex=c;function p(o,i,u){o.style.transform="translate(".concat(i,"px, ").concat(u,"px)")}e.translate=p;var y=function(o){var i=[],u=null,f=function(){for(var S=[],v=0;v<arguments.length;v++)S[v]=arguments[v];i=S,!u&&(u=requestAnimationFrame(function(){u=null,o.apply(void 0,i)}))};return f};e.schd=y;function T(o,i,u){var f=o.slice(0);return f[i]=u,f}e.replaceAt=T;function E(o){var i=o.values,u=o.colors,f=o.min,S=o.max,v=o.direction,w=v===void 0?s.Direction.Right:v,b=o.rtl,P=b===void 0?!1:b;P&&w===s.Direction.Right?w=s.Direction.Left:P&&s.Direction.Left&&(w=s.Direction.Right);var j=i.slice(0).sort(function(N,X){return N-X}).map(function(N){return(N-f)/(S-f)*100}),L=j.reduce(function(N,X,A){return"".concat(N,", ").concat(u[A]," ").concat(X,"%, ").concat(u[A+1]," ").concat(X,"%")},"");return"linear-gradient(".concat(w,", ").concat(u[0]," 0%").concat(L,", ").concat(u[u.length-1]," 100%)")}e.getTrackBackground=E;function D(){}e.voidFn=D;function R(o){throw new Error("Didn't expect to get here")}e.assertUnreachable=R;var M=function(o,i,u,f,S){S===void 0&&(S=function(w){return w});var v=Math.ceil(n([o],Array.from(o.children),!0).reduce(function(w,b){var P=Math.ceil(b.getBoundingClientRect().width);if(b.innerText&&b.innerText.includes(u)&&b.childElementCount===0){var j=b.cloneNode(!0);j.innerHTML=S(i.toFixed(f)),j.style.visibility="hidden",document.body.appendChild(j),P=Math.ceil(j.getBoundingClientRect().width),document.body.removeChild(j)}return P>w?P:w},o.getBoundingClientRect().width));return v},I=function(o,i,u,f,S,v,w){w===void 0&&(w=function(j){return j});var b=[],P=function(j){var L=M(u[j],f[j],S,v,w),N=i[j].x;i.forEach(function(X,A){var U=X.x,F=M(u[A],f[A],S,v,w);j!==A&&(N>=U&&N<=U+F||N+L>=U&&N+L<=U+F)&&(b.includes(A)||(b.push(j),b.push(A),b=n(n([],b,!0),[j,A],!1),P(A)))})};return P(o),Array.from(new Set(b.sort()))},m=function(o,i,u,f,S,v){f===void 0&&(f=.1),S===void 0&&(S=" - "),v===void 0&&(v=function(A){return A});var w=(0,e.getStepDecimals)(f),b=(0,a.useState)({}),P=b[0],j=b[1],L=(0,a.useState)(v(i[u].toFixed(w))),N=L[0],X=L[1];return(0,a.useEffect)(function(){if(o){var A=o.getThumbs();if(A.length<1)return;var U={},F=o.getOffsets(),te=I(u,F,A,i,S,w,v),oe=v(i[u].toFixed(w));if(te.length){var ne=te.reduce(function(J,ue,se,ce){return J.length?n(n([],J,!0),[F[ce[se]].x],!1):[F[ce[se]].x]},[]);if(Math.min.apply(Math,ne)===F[u].x){var re=[];te.forEach(function(J){re.push(i[J].toFixed(w))}),oe=Array.from(new Set(re.sort(function(J,ue){return parseFloat(J)-parseFloat(ue)}))).map(v).join(S);var Te=Math.min.apply(Math,ne),ie=Math.max.apply(Math,ne),Oe=A[te[ne.indexOf(ie)]].getBoundingClientRect().width;U.left="".concat(Math.abs(Te-(ie+Oe))/2,"px"),U.transform="translate(-50%, 0)"}else U.visibility="hidden"}X(oe),j(U)}},[o,i]),[N,P]};e.useThumbOverlap=m;function B(o,i,u,f){var S=o.getBoundingClientRect(),v=S.left,w=S.top,b=S.width,P=S.height;return V(f)?Math.abs(u-(w+P/2)):Math.abs(i-(v+b/2))}}(he)),he}var He;function Ct(){if(He)return H;He=1;var e=H&&H.__extends||function(){var O=function(x,d){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(t[c]=r[c])},O(x,d)};return function(x,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");O(x,d);function t(){this.constructor=x}x.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}}(),n=H&&H.__createBinding||(Object.create?function(O,x,d,t){t===void 0&&(t=d);var r=Object.getOwnPropertyDescriptor(x,d);(!r||("get"in r?!x.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return x[d]}}),Object.defineProperty(O,t,r)}:function(O,x,d,t){t===void 0&&(t=d),O[t]=x[d]}),a=H&&H.__setModuleDefault||(Object.create?function(O,x){Object.defineProperty(O,"default",{enumerable:!0,value:x})}:function(O,x){O.default=x}),s=H&&H.__importStar||function(O){if(O&&O.__esModule)return O;var x={};if(O!=null)for(var d in O)d!=="default"&&Object.prototype.hasOwnProperty.call(O,d)&&n(x,O,d);return a(x,O),x},g=H&&H.__spreadArray||function(O,x,d){if(d||arguments.length===2)for(var t=0,r=x.length,c;t<r;t++)(c||!(t in x))&&(c||(c=Array.prototype.slice.call(x,0,t)),c[t]=x[t]);return O.concat(c||Array.prototype.slice.call(x))};Object.defineProperty(H,"__esModule",{value:!0});var k=s(Ae()),l=Ue(),h=Re(),_=["ArrowRight","ArrowUp","k","PageUp"],V=["ArrowLeft","ArrowDown","j","PageDown"],z=function(O){e(x,O);function x(d){var t=O.call(this,d)||this;if(t.trackRef=k.createRef(),t.thumbRefs=[],t.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(t.props.values.length).fill(0).map(function(r,c){return c}),isChanged:!1,markOffsets:[]},t.getOffsets=function(){var r=t.props,c=r.direction,p=r.values,y=r.min,T=r.max,E=t.trackRef.current,D=E.getBoundingClientRect(),R=(0,l.getPaddingAndBorder)(E);return t.getThumbs().map(function(M,I){var m={x:0,y:0},B=M.getBoundingClientRect(),o=(0,l.getMargin)(M);switch(c){case h.Direction.Right:return m.x=(o.left+R.left)*-1,m.y=((B.height-D.height)/2+R.top)*-1,m.x+=D.width*(0,l.relativeValue)(p[I],y,T)-B.width/2,m;case h.Direction.Left:return m.x=(o.right+R.right)*-1,m.y=((B.height-D.height)/2+R.top)*-1,m.x+=D.width-D.width*(0,l.relativeValue)(p[I],y,T)-B.width/2,m;case h.Direction.Up:return m.x=((B.width-D.width)/2+o.left+R.left)*-1,m.y=-R.left,m.y+=D.height-D.height*(0,l.relativeValue)(p[I],y,T)-B.height/2,m;case h.Direction.Down:return m.x=((B.width-D.width)/2+o.left+R.left)*-1,m.y=-R.left,m.y+=D.height*(0,l.relativeValue)(p[I],y,T)-B.height/2,m;default:return(0,l.assertUnreachable)(c)}})},t.getThumbs=function(){return t.trackRef&&t.trackRef.current?Array.from(t.trackRef.current.children).filter(function(r){return r.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},t.getTargetIndex=function(r){return t.getThumbs().findIndex(function(c){return c===r.target||c.contains(r.target)})},t.addTouchEvents=function(r){document.addEventListener("touchmove",t.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",t.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",t.schdOnEnd,{passive:!1})},t.addMouseEvents=function(r){document.addEventListener("mousemove",t.schdOnMouseMove),document.addEventListener("mouseup",t.schdOnEnd)},t.onMouseDownTrack=function(r){var c;if(r.button===0)if(r.persist(),r.preventDefault(),t.addMouseEvents(r.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(y){var T;return(T=y.current)===null||T===void 0?void 0:T.contains(r.target)}))return;t.setState({draggedTrackPos:[r.clientX,r.clientY]},function(){return t.onMove(r.clientX,r.clientY)})}else{var p=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(y){return y.current}),r.clientX,r.clientY,t.props.direction);(c=t.thumbRefs[p].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:p},function(){return t.onMove(r.clientX,r.clientY)})}},t.onResize=function(){(0,l.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(r){var c;if(r.persist(),t.addTouchEvents(r.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(y){var T;return(T=y.current)===null||T===void 0?void 0:T.contains(r.target)}))return;t.setState({draggedTrackPos:[r.touches[0].clientX,r.touches[0].clientY]},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}else{var p=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(y){return y.current}),r.touches[0].clientX,r.touches[0].clientY,t.props.direction);(c=t.thumbRefs[p].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:p},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}},t.onMouseOrTouchStart=function(r){if(!t.props.disabled){var c=(0,l.isTouchEvent)(r);if(!(!c&&r.button!==0)){var p=t.getTargetIndex(r);p!==-1&&(c?t.addTouchEvents(r):t.addMouseEvents(r),t.setState({draggedThumbIndex:p,thumbZIndexes:t.state.thumbZIndexes.map(function(y,T){return T===p?Math.max.apply(Math,t.state.thumbZIndexes):y<=t.state.thumbZIndexes[p]?y:y-1})}))}}},t.onMouseMove=function(r){r.preventDefault(),t.onMove(r.clientX,r.clientY)},t.onTouchMove=function(r){r.preventDefault(),t.onMove(r.touches[0].clientX,r.touches[0].clientY)},t.onKeyDown=function(r){var c=t.props,p=c.values,y=c.onChange,T=c.step,E=c.rtl,D=c.direction,R=t.state.isChanged,M=t.getTargetIndex(r.nativeEvent),I=E||D===h.Direction.Left||D===h.Direction.Down?-1:1;M!==-1&&(_.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((0,l.replaceAt)(p,M,t.normalizeValue(p[M]+I*(r.key==="PageUp"?T*10:T),M)))):V.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((0,l.replaceAt)(p,M,t.normalizeValue(p[M]-I*(r.key==="PageDown"?T*10:T),M)))):r.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){R&&t.fireOnFinalChange()}):R&&t.fireOnFinalChange())},t.onKeyUp=function(r){var c=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){c&&t.fireOnFinalChange()})},t.onMove=function(r,c){var p=t.state,y=p.draggedThumbIndex,T=p.draggedTrackPos,E=t.props,D=E.direction,R=E.min,M=E.max,I=E.onChange,m=E.values,B=E.step,o=E.rtl;if(y===-1&&T[0]===-1&&T[1]===-1)return null;var i=t.trackRef.current;if(!i)return null;var u=i.getBoundingClientRect(),f=(0,l.isVertical)(D)?u.height:u.width;if(T[0]!==-1&&T[1]!==-1){var S=r-T[0],v=c-T[1],w=0;switch(D){case h.Direction.Right:case h.Direction.Left:w=S/f*(M-R);break;case h.Direction.Down:case h.Direction.Up:w=v/f*(M-R);break;default:(0,l.assertUnreachable)(D)}if(o&&(w*=-1),Math.abs(w)>=B/2){for(var b=0;b<t.thumbRefs.length;b++){if(m[b]===M&&Math.sign(w)===1||m[b]===R&&Math.sign(w)===-1)return;var P=m[b]+w;P>M?w=M-m[b]:P<R&&(w=R-m[b])}for(var j=m.slice(0),b=0;b<t.thumbRefs.length;b++)j=(0,l.replaceAt)(j,b,t.normalizeValue(m[b]+w,b));t.setState({draggedTrackPos:[r,c]}),I(j)}}else{var L=0;switch(D){case h.Direction.Right:L=(r-u.left)/f*(M-R)+R;break;case h.Direction.Left:L=(f-(r-u.left))/f*(M-R)+R;break;case h.Direction.Down:L=(c-u.top)/f*(M-R)+R;break;case h.Direction.Up:L=(f-(c-u.top))/f*(M-R)+R;break;default:(0,l.assertUnreachable)(D)}o&&(L=M+R-L),Math.abs(m[y]-L)>=B/2&&I((0,l.replaceAt)(m,y,t.normalizeValue(L,y)))}},t.normalizeValue=function(r,c){var p=t.props,y=p.min,T=p.max,E=p.step,D=p.allowOverlap,R=p.values;return(0,l.normalizeValue)(r,c,y,T,E,D,R)},t.onEnd=function(r){if(r.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var r=t.props,c=r.onFinalChange,p=r.values;c&&c(p)},t.updateMarkRefs=function(r){if(!r.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(r.max-r.min)/t.props.step,t.markRefs=[];for(var c=0;c<t.numOfMarks+1;c++)t.markRefs[c]=k.createRef()},t.calculateMarkOffsets=function(){if(!(!t.props.renderMark||!t.trackRef||!t.numOfMarks||!t.markRefs||t.trackRef.current===null)){for(var r=window.getComputedStyle(t.trackRef.current),c=parseInt(r.width,10),p=parseInt(r.height,10),y=parseInt(r.paddingLeft,10),T=parseInt(r.paddingTop,10),E=[],D=0;D<t.numOfMarks+1;D++){var R=9999,M=9999;if(t.markRefs[D].current){var I=t.markRefs[D].current.getBoundingClientRect();R=I.height,M=I.width}t.props.direction===h.Direction.Left||t.props.direction===h.Direction.Right?E.push([Math.round(c/t.numOfMarks*D+y-M/2),-Math.round((R-p)/2)]):E.push([Math.round(p/t.numOfMarks*D+T-R/2),-Math.round((M-c)/2)])}t.setState({markOffsets:E})}},d.step===0)throw new Error('"step" property should be a positive number');return t.schdOnMouseMove=(0,l.schd)(t.onMouseMove),t.schdOnTouchMove=(0,l.schd)(t.onTouchMove),t.schdOnEnd=(0,l.schd)(t.onEnd),t.thumbRefs=d.values.map(function(){return k.createRef()}),t.updateMarkRefs(d),t}return x.prototype.componentDidMount=function(){var d=this,t=this.props,r=t.values,c=t.min,p=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",d.onResize)},unobserve:function(){return window.removeEventListener("resize",d.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,l.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(y){return(0,l.checkBoundaries)(y,d.props.min,d.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),r.forEach(function(y){(0,l.isStepDivisible)(c,y,p)||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.")})},x.prototype.componentDidUpdate=function(d,t){var r=this.props,c=r.max,p=r.min,y=r.step,T=r.values,E=r.rtl;(d.max!==c||d.min!==p||d.step!==y)&&this.updateMarkRefs(this.props),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),E),(d.max!==c||d.min!==p||d.step!==y||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),T.forEach(function(D){(0,l.isStepDivisible)(p,D,y)||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.")}))},x.prototype.componentWillUnmount=function(){var d={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,d),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)},x.prototype.render=function(){var d=this,t=this.props,r=t.renderTrack,c=t.renderThumb,p=t.renderMark,y=p===void 0?function(){return null}:p,T=t.values,E=t.min,D=t.max,R=t.allowOverlap,M=t.disabled,I=this.state,m=I.draggedThumbIndex,B=I.thumbZIndexes,o=I.markOffsets;return r({props:{style:{transform:"scale(1)",cursor:m>-1?"grabbing":this.props.draggableTrack?(0,l.isVertical)(this.props.direction)?"ns-resize":"ew-resize":T.length===1&&!M?"pointer":"inherit"},onMouseDown:M?l.voidFn:this.onMouseDownTrack,onTouchStart:M?l.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:M,children:g(g([],o.map(function(i,u,f){return y({props:{style:d.props.direction===h.Direction.Left||d.props.direction===h.Direction.Right?{position:"absolute",left:"".concat(i[0],"px"),marginTop:"".concat(i[1],"px")}:{position:"absolute",top:"".concat(i[0],"px"),marginLeft:"".concat(i[1],"px")},key:"mark".concat(u),ref:d.markRefs[u]},index:u})}),!0),T.map(function(i,u){var f=d.state.draggedThumbIndex===u;return c({index:u,value:i,isDragged:f,props:{style:{position:"absolute",zIndex:B[u],cursor:M?"inherit":f?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:u,tabIndex:M?void 0:0,"aria-valuemax":R?D:T[u+1]||D,"aria-valuemin":R?E:T[u-1]||E,"aria-valuenow":i,draggable:!1,ref:d.thumbRefs[u],role:"slider",onKeyDown:M?l.voidFn:d.onKeyDown,onKeyUp:M?l.voidFn:d.onKeyUp}})}),!0)})},x.defaultProps={step:1,direction:h.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},x}(k.Component);return H.default=z,H}var Xe;function jt(){return Xe||(Xe=1,function(e){var n=de&&de.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var a=n(Ct());e.Range=a.default;var s=Ue();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return s.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return s.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return s.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return s.checkValuesAgainstBoundaries}});var g=Re();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return g.Direction}})}(de)),de}var Ye=jt();function qe(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(g){return Object.getOwnPropertyDescriptor(e,g).enumerable})),a.push.apply(a,s)}return a}function fe(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?qe(Object(a),!0).forEach(function(s){It(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):qe(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function It(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}var pe=G("div",{position:"relative",width:"100%"});pe.displayName="Root",pe.displayName="Root",pe.displayName="StyledRoot";var ge=G("div",function(e){var n=e.$theme,a=e.$value,s=a===void 0?[]:a,g=e.$disabled,k=e.$isDragged,l=n.sizing,h="inherit";return g?h="not-allowed":k?h="grabbing":s.length===1&&(h="pointer"),{paddingTop:l.scale600,paddingBottom:l.scale600,paddingRight:l.scale600,paddingLeft:l.scale600,display:"flex",cursor:h,backgroundColor:n.colors.sliderTrackFill}});ge.displayName="Track",ge.displayName="Track",ge.displayName="StyledTrack";var me=G("div",function(e){var n=e.$theme,a=e.$value,s=a===void 0?[]:a,g=e.$min,k=e.$max,l=e.$disabled,h=n.colors,_=n.borders,V=n.direction,z=n.borders.useRoundedCorners?_.radius100:0;return{borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,background:Ye.getTrackBackground({values:s,colors:s.length===1?[l?h.borderOpaque:h.primary,l?h.backgroundSecondary:h.borderOpaque]:[l?h.backgroundSecondary:h.borderOpaque,l?h.borderOpaque:h.primary,l?h.backgroundSecondary:h.borderOpaque],min:g||0,max:k||0,rtl:V==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:l?"not-allowed":"inherit"}});me.displayName="InnerTrack",me.displayName="InnerTrack",me.displayName="StyledInnerTrack";var ve=G("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});ve.displayName="Mark",ve.displayName="Mark",ve.displayName="StyledMark";var be=G("div",function(e){return fe(fe({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});be.displayName="Tick",be.displayName="Tick",be.displayName="StyledTick";var ye=G("div",function(e){var n=e.$theme,a=n.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:a.scale600,paddingLeft:a.scale600,paddingBottom:a.scale400}});ye.displayName="TickBar",ye.displayName="TickBar",ye.displayName="StyledTickBar";var we=G("div",function(e){var n=e.$theme,a=e.$value,s=a===void 0?[]:a,g=e.$thumbIndex,k=e.$disabled,l=s.length===2&&g===0,h=s.length===2&&g===1;return n.direction==="rtl"&&(h||l)&&(l=!l,h=!h),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:k?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleFill,outline:"none",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(n.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:k?"not-allowed":"inherit"}});we.displayName="Thumb",we.displayName="Thumb",we.displayName="StyledThumb";var xe=G("div",function(e){var n=e.$disabled,a=e.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:n?a.colors.sliderHandleFillDisabled:a.colors.sliderHandleInnerFill}});xe.displayName="InnerThumb",xe.displayName="InnerThumb",xe.displayName="StyledInnerThumb";var ke=G("div",function(e){var n=e.$disabled,a=e.$theme;return fe(fe({position:"absolute",top:"-".concat(a.sizing.scale1400)},a.typography.font200),{},{backgroundColor:n?a.colors.sliderHandleFillDisabled:a.colors.sliderHandleInnerFill,color:a.colors.contentInversePrimary,paddingLeft:a.sizing.scale600,paddingRight:a.sizing.scale600,paddingTop:a.sizing.scale500,paddingBottom:a.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});ke.displayName="ThumbValue",ke.displayName="ThumbValue",ke.displayName="StyledThumbValue";function We(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(g){return Object.getOwnPropertyDescriptor(e,g).enumerable})),a.push.apply(a,s)}return a}function Bt(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?We(Object(a),!0).forEach(function(s){Pt(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):We(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Pt(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function q(){return q=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},q.apply(this,arguments)}function W(e,n){return _t(e)||At(e,n)||$t(e,n)||Lt()}function Lt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{e as Ae,c0 as G,r as C,cv as pt,ci as gt,c1 as Q,cw as mt,cx as vt,c as le,I as bt,ca as yt,A as wt,be as xt,j as Z,R as _e,cU as kt,bY as Tt,bZ as Ot,cb as Mt,b_ as Rt,bH as St,Q as Dt,cV as Me}from"./index-OxGwEg3m.js";import{s as ze}from"./sprintf-D7DtBTRn.js";import{a as Et}from"./useBasicWidgetState-Bm5AJWX7.js";import"./FormClearHelper-DxeY-rII.js";var de={},H={},he={},Fe={},Ve;function Re(){return Ve||(Ve=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Direction=void 0,function(n){n.Right="to right",n.Left="to left",n.Down="to bottom",n.Up="to top"}(e.Direction||(e.Direction={}))}(Fe)),Fe}var Ne;function Ue(){return Ne||(Ne=1,function(e){var n=he&&he.__spreadArray||function(o,i,u){if(u||arguments.length===2)for(var f=0,S=i.length,v;f<S;f++)(v||!(f in i))&&(v||(v=Array.prototype.slice.call(i,0,f)),v[f]=i[f]);return o.concat(v||Array.prototype.slice.call(i))};Object.defineProperty(e,"__esModule",{value:!0}),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 a=Ae(),s=Re(),g=function(o){var i=o.toString().split(".")[1];return i?i.length:0};e.getStepDecimals=g;function k(o){return o.touches&&o.touches.length||o.changedTouches&&o.changedTouches.length}e.isTouchEvent=k;function l(o,i,u){var f=(i-o)/u,S=8,v=Number(f.toFixed(S));return parseInt(v.toString(),10)===v}e.isStepDivisible=l;function h(o,i,u,f,S,v,w){var b=1e11;if(o=Math.round(o*b)/b,!v){var P=w[i-1],j=w[i+1];if(P&&P>o)return P;if(j&&j<o)return j}if(o>f)return f;if(o<u)return u;var L=Math.floor(o*b-u*b)%Math.floor(S*b),N=Math.floor(o*b-Math.abs(L)),X=L===0?o:N/b,A=Math.abs(L/b)<S/2?X:X+S,U=(0,e.getStepDecimals)(S);return parseFloat(A.toFixed(U))}e.normalizeValue=h;function _(o,i,u){return(o-i)/(u-i)}e.relativeValue=_;function V(o){return o===s.Direction.Up||o===s.Direction.Down}e.isVertical=V;function z(o,i,u){if(i>=u)throw new RangeError("min (".concat(i,") is equal/bigger than max (").concat(u,")"));if(o<i)throw new RangeError("value (".concat(o,") is smaller than min (").concat(i,")"));if(o>u)throw new RangeError("value (".concat(o,") is bigger than max (").concat(u,")"))}e.checkBoundaries=z;function O(o,i,u){return o<i?i:o>u?u:o}e.checkValuesAgainstBoundaries=O;function x(o){if(!(o.length<2)&&!o.slice(1).every(function(i,u){return o[u]<=i}))throw new RangeError("values={[".concat(o,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=x;function d(o){var i=window.getComputedStyle(o);return{top:parseInt(i["margin-top"],10),bottom:parseInt(i["margin-bottom"],10),left:parseInt(i["margin-left"],10),right:parseInt(i["margin-right"],10)}}e.getMargin=d;function t(o){var i=window.getComputedStyle(o);return{top:parseInt(i["padding-top"],10)+parseInt(i["border-top-width"],10),bottom:parseInt(i["padding-bottom"],10)+parseInt(i["border-bottom-width"],10),left:parseInt(i["padding-left"],10)+parseInt(i["border-left-width"],10),right:parseInt(i["padding-right"],10)+parseInt(i["border-right-width"],10)}}e.getPaddingAndBorder=t;function r(o,i,u){var f=u?-1:1;o.forEach(function(S,v){return p(S,f*i[v].x,i[v].y)})}e.translateThumbs=r;function c(o,i,u,f){for(var S=0,v=B(o[0],i,u,f),w=1;w<o.length;w++){var b=B(o[w],i,u,f);b<v&&(v=b,S=w)}return S}e.getClosestThumbIndex=c;function p(o,i,u){o.style.transform="translate(".concat(i,"px, ").concat(u,"px)")}e.translate=p;var y=function(o){var i=[],u=null,f=function(){for(var S=[],v=0;v<arguments.length;v++)S[v]=arguments[v];i=S,!u&&(u=requestAnimationFrame(function(){u=null,o.apply(void 0,i)}))};return f};e.schd=y;function T(o,i,u){var f=o.slice(0);return f[i]=u,f}e.replaceAt=T;function E(o){var i=o.values,u=o.colors,f=o.min,S=o.max,v=o.direction,w=v===void 0?s.Direction.Right:v,b=o.rtl,P=b===void 0?!1:b;P&&w===s.Direction.Right?w=s.Direction.Left:P&&s.Direction.Left&&(w=s.Direction.Right);var j=i.slice(0).sort(function(N,X){return N-X}).map(function(N){return(N-f)/(S-f)*100}),L=j.reduce(function(N,X,A){return"".concat(N,", ").concat(u[A]," ").concat(X,"%, ").concat(u[A+1]," ").concat(X,"%")},"");return"linear-gradient(".concat(w,", ").concat(u[0]," 0%").concat(L,", ").concat(u[u.length-1]," 100%)")}e.getTrackBackground=E;function D(){}e.voidFn=D;function R(o){throw new Error("Didn't expect to get here")}e.assertUnreachable=R;var M=function(o,i,u,f,S){S===void 0&&(S=function(w){return w});var v=Math.ceil(n([o],Array.from(o.children),!0).reduce(function(w,b){var P=Math.ceil(b.getBoundingClientRect().width);if(b.innerText&&b.innerText.includes(u)&&b.childElementCount===0){var j=b.cloneNode(!0);j.innerHTML=S(i.toFixed(f)),j.style.visibility="hidden",document.body.appendChild(j),P=Math.ceil(j.getBoundingClientRect().width),document.body.removeChild(j)}return P>w?P:w},o.getBoundingClientRect().width));return v},I=function(o,i,u,f,S,v,w){w===void 0&&(w=function(j){return j});var b=[],P=function(j){var L=M(u[j],f[j],S,v,w),N=i[j].x;i.forEach(function(X,A){var U=X.x,F=M(u[A],f[A],S,v,w);j!==A&&(N>=U&&N<=U+F||N+L>=U&&N+L<=U+F)&&(b.includes(A)||(b.push(j),b.push(A),b=n(n([],b,!0),[j,A],!1),P(A)))})};return P(o),Array.from(new Set(b.sort()))},m=function(o,i,u,f,S,v){f===void 0&&(f=.1),S===void 0&&(S=" - "),v===void 0&&(v=function(A){return A});var w=(0,e.getStepDecimals)(f),b=(0,a.useState)({}),P=b[0],j=b[1],L=(0,a.useState)(v(i[u].toFixed(w))),N=L[0],X=L[1];return(0,a.useEffect)(function(){if(o){var A=o.getThumbs();if(A.length<1)return;var U={},F=o.getOffsets(),te=I(u,F,A,i,S,w,v),oe=v(i[u].toFixed(w));if(te.length){var ne=te.reduce(function(J,ue,se,ce){return J.length?n(n([],J,!0),[F[ce[se]].x],!1):[F[ce[se]].x]},[]);if(Math.min.apply(Math,ne)===F[u].x){var re=[];te.forEach(function(J){re.push(i[J].toFixed(w))}),oe=Array.from(new Set(re.sort(function(J,ue){return parseFloat(J)-parseFloat(ue)}))).map(v).join(S);var Te=Math.min.apply(Math,ne),ie=Math.max.apply(Math,ne),Oe=A[te[ne.indexOf(ie)]].getBoundingClientRect().width;U.left="".concat(Math.abs(Te-(ie+Oe))/2,"px"),U.transform="translate(-50%, 0)"}else U.visibility="hidden"}X(oe),j(U)}},[o,i]),[N,P]};e.useThumbOverlap=m;function B(o,i,u,f){var S=o.getBoundingClientRect(),v=S.left,w=S.top,b=S.width,P=S.height;return V(f)?Math.abs(u-(w+P/2)):Math.abs(i-(v+b/2))}}(he)),he}var He;function Ct(){if(He)return H;He=1;var e=H&&H.__extends||function(){var O=function(x,d){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(t[c]=r[c])},O(x,d)};return function(x,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");O(x,d);function t(){this.constructor=x}x.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}}(),n=H&&H.__createBinding||(Object.create?function(O,x,d,t){t===void 0&&(t=d);var r=Object.getOwnPropertyDescriptor(x,d);(!r||("get"in r?!x.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return x[d]}}),Object.defineProperty(O,t,r)}:function(O,x,d,t){t===void 0&&(t=d),O[t]=x[d]}),a=H&&H.__setModuleDefault||(Object.create?function(O,x){Object.defineProperty(O,"default",{enumerable:!0,value:x})}:function(O,x){O.default=x}),s=H&&H.__importStar||function(O){if(O&&O.__esModule)return O;var x={};if(O!=null)for(var d in O)d!=="default"&&Object.prototype.hasOwnProperty.call(O,d)&&n(x,O,d);return a(x,O),x},g=H&&H.__spreadArray||function(O,x,d){if(d||arguments.length===2)for(var t=0,r=x.length,c;t<r;t++)(c||!(t in x))&&(c||(c=Array.prototype.slice.call(x,0,t)),c[t]=x[t]);return O.concat(c||Array.prototype.slice.call(x))};Object.defineProperty(H,"__esModule",{value:!0});var k=s(Ae()),l=Ue(),h=Re(),_=["ArrowRight","ArrowUp","k","PageUp"],V=["ArrowLeft","ArrowDown","j","PageDown"],z=function(O){e(x,O);function x(d){var t=O.call(this,d)||this;if(t.trackRef=k.createRef(),t.thumbRefs=[],t.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(t.props.values.length).fill(0).map(function(r,c){return c}),isChanged:!1,markOffsets:[]},t.getOffsets=function(){var r=t.props,c=r.direction,p=r.values,y=r.min,T=r.max,E=t.trackRef.current,D=E.getBoundingClientRect(),R=(0,l.getPaddingAndBorder)(E);return t.getThumbs().map(function(M,I){var m={x:0,y:0},B=M.getBoundingClientRect(),o=(0,l.getMargin)(M);switch(c){case h.Direction.Right:return m.x=(o.left+R.left)*-1,m.y=((B.height-D.height)/2+R.top)*-1,m.x+=D.width*(0,l.relativeValue)(p[I],y,T)-B.width/2,m;case h.Direction.Left:return m.x=(o.right+R.right)*-1,m.y=((B.height-D.height)/2+R.top)*-1,m.x+=D.width-D.width*(0,l.relativeValue)(p[I],y,T)-B.width/2,m;case h.Direction.Up:return m.x=((B.width-D.width)/2+o.left+R.left)*-1,m.y=-R.left,m.y+=D.height-D.height*(0,l.relativeValue)(p[I],y,T)-B.height/2,m;case h.Direction.Down:return m.x=((B.width-D.width)/2+o.left+R.left)*-1,m.y=-R.left,m.y+=D.height*(0,l.relativeValue)(p[I],y,T)-B.height/2,m;default:return(0,l.assertUnreachable)(c)}})},t.getThumbs=function(){return t.trackRef&&t.trackRef.current?Array.from(t.trackRef.current.children).filter(function(r){return r.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},t.getTargetIndex=function(r){return t.getThumbs().findIndex(function(c){return c===r.target||c.contains(r.target)})},t.addTouchEvents=function(r){document.addEventListener("touchmove",t.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",t.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",t.schdOnEnd,{passive:!1})},t.addMouseEvents=function(r){document.addEventListener("mousemove",t.schdOnMouseMove),document.addEventListener("mouseup",t.schdOnEnd)},t.onMouseDownTrack=function(r){var c;if(r.button===0)if(r.persist(),r.preventDefault(),t.addMouseEvents(r.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(y){var T;return(T=y.current)===null||T===void 0?void 0:T.contains(r.target)}))return;t.setState({draggedTrackPos:[r.clientX,r.clientY]},function(){return t.onMove(r.clientX,r.clientY)})}else{var p=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(y){return y.current}),r.clientX,r.clientY,t.props.direction);(c=t.thumbRefs[p].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:p},function(){return t.onMove(r.clientX,r.clientY)})}},t.onResize=function(){(0,l.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(r){var c;if(r.persist(),t.addTouchEvents(r.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(y){var T;return(T=y.current)===null||T===void 0?void 0:T.contains(r.target)}))return;t.setState({draggedTrackPos:[r.touches[0].clientX,r.touches[0].clientY]},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}else{var p=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(y){return y.current}),r.touches[0].clientX,r.touches[0].clientY,t.props.direction);(c=t.thumbRefs[p].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:p},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}},t.onMouseOrTouchStart=function(r){if(!t.props.disabled){var c=(0,l.isTouchEvent)(r);if(!(!c&&r.button!==0)){var p=t.getTargetIndex(r);p!==-1&&(c?t.addTouchEvents(r):t.addMouseEvents(r),t.setState({draggedThumbIndex:p,thumbZIndexes:t.state.thumbZIndexes.map(function(y,T){return T===p?Math.max.apply(Math,t.state.thumbZIndexes):y<=t.state.thumbZIndexes[p]?y:y-1})}))}}},t.onMouseMove=function(r){r.preventDefault(),t.onMove(r.clientX,r.clientY)},t.onTouchMove=function(r){r.preventDefault(),t.onMove(r.touches[0].clientX,r.touches[0].clientY)},t.onKeyDown=function(r){var c=t.props,p=c.values,y=c.onChange,T=c.step,E=c.rtl,D=c.direction,R=t.state.isChanged,M=t.getTargetIndex(r.nativeEvent),I=E||D===h.Direction.Left||D===h.Direction.Down?-1:1;M!==-1&&(_.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((0,l.replaceAt)(p,M,t.normalizeValue(p[M]+I*(r.key==="PageUp"?T*10:T),M)))):V.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((0,l.replaceAt)(p,M,t.normalizeValue(p[M]-I*(r.key==="PageDown"?T*10:T),M)))):r.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){R&&t.fireOnFinalChange()}):R&&t.fireOnFinalChange())},t.onKeyUp=function(r){var c=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){c&&t.fireOnFinalChange()})},t.onMove=function(r,c){var p=t.state,y=p.draggedThumbIndex,T=p.draggedTrackPos,E=t.props,D=E.direction,R=E.min,M=E.max,I=E.onChange,m=E.values,B=E.step,o=E.rtl;if(y===-1&&T[0]===-1&&T[1]===-1)return null;var i=t.trackRef.current;if(!i)return null;var u=i.getBoundingClientRect(),f=(0,l.isVertical)(D)?u.height:u.width;if(T[0]!==-1&&T[1]!==-1){var S=r-T[0],v=c-T[1],w=0;switch(D){case h.Direction.Right:case h.Direction.Left:w=S/f*(M-R);break;case h.Direction.Down:case h.Direction.Up:w=v/f*(M-R);break;default:(0,l.assertUnreachable)(D)}if(o&&(w*=-1),Math.abs(w)>=B/2){for(var b=0;b<t.thumbRefs.length;b++){if(m[b]===M&&Math.sign(w)===1||m[b]===R&&Math.sign(w)===-1)return;var P=m[b]+w;P>M?w=M-m[b]:P<R&&(w=R-m[b])}for(var j=m.slice(0),b=0;b<t.thumbRefs.length;b++)j=(0,l.replaceAt)(j,b,t.normalizeValue(m[b]+w,b));t.setState({draggedTrackPos:[r,c]}),I(j)}}else{var L=0;switch(D){case h.Direction.Right:L=(r-u.left)/f*(M-R)+R;break;case h.Direction.Left:L=(f-(r-u.left))/f*(M-R)+R;break;case h.Direction.Down:L=(c-u.top)/f*(M-R)+R;break;case h.Direction.Up:L=(f-(c-u.top))/f*(M-R)+R;break;default:(0,l.assertUnreachable)(D)}o&&(L=M+R-L),Math.abs(m[y]-L)>=B/2&&I((0,l.replaceAt)(m,y,t.normalizeValue(L,y)))}},t.normalizeValue=function(r,c){var p=t.props,y=p.min,T=p.max,E=p.step,D=p.allowOverlap,R=p.values;return(0,l.normalizeValue)(r,c,y,T,E,D,R)},t.onEnd=function(r){if(r.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var r=t.props,c=r.onFinalChange,p=r.values;c&&c(p)},t.updateMarkRefs=function(r){if(!r.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(r.max-r.min)/t.props.step,t.markRefs=[];for(var c=0;c<t.numOfMarks+1;c++)t.markRefs[c]=k.createRef()},t.calculateMarkOffsets=function(){if(!(!t.props.renderMark||!t.trackRef||!t.numOfMarks||!t.markRefs||t.trackRef.current===null)){for(var r=window.getComputedStyle(t.trackRef.current),c=parseInt(r.width,10),p=parseInt(r.height,10),y=parseInt(r.paddingLeft,10),T=parseInt(r.paddingTop,10),E=[],D=0;D<t.numOfMarks+1;D++){var R=9999,M=9999;if(t.markRefs[D].current){var I=t.markRefs[D].current.getBoundingClientRect();R=I.height,M=I.width}t.props.direction===h.Direction.Left||t.props.direction===h.Direction.Right?E.push([Math.round(c/t.numOfMarks*D+y-M/2),-Math.round((R-p)/2)]):E.push([Math.round(p/t.numOfMarks*D+T-R/2),-Math.round((M-c)/2)])}t.setState({markOffsets:E})}},d.step===0)throw new Error('"step" property should be a positive number');return t.schdOnMouseMove=(0,l.schd)(t.onMouseMove),t.schdOnTouchMove=(0,l.schd)(t.onTouchMove),t.schdOnEnd=(0,l.schd)(t.onEnd),t.thumbRefs=d.values.map(function(){return k.createRef()}),t.updateMarkRefs(d),t}return x.prototype.componentDidMount=function(){var d=this,t=this.props,r=t.values,c=t.min,p=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",d.onResize)},unobserve:function(){return window.removeEventListener("resize",d.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,l.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(y){return(0,l.checkBoundaries)(y,d.props.min,d.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),r.forEach(function(y){(0,l.isStepDivisible)(c,y,p)||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.")})},x.prototype.componentDidUpdate=function(d,t){var r=this.props,c=r.max,p=r.min,y=r.step,T=r.values,E=r.rtl;(d.max!==c||d.min!==p||d.step!==y)&&this.updateMarkRefs(this.props),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),E),(d.max!==c||d.min!==p||d.step!==y||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),T.forEach(function(D){(0,l.isStepDivisible)(p,D,y)||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.")}))},x.prototype.componentWillUnmount=function(){var d={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,d),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)},x.prototype.render=function(){var d=this,t=this.props,r=t.renderTrack,c=t.renderThumb,p=t.renderMark,y=p===void 0?function(){return null}:p,T=t.values,E=t.min,D=t.max,R=t.allowOverlap,M=t.disabled,I=this.state,m=I.draggedThumbIndex,B=I.thumbZIndexes,o=I.markOffsets;return r({props:{style:{transform:"scale(1)",cursor:m>-1?"grabbing":this.props.draggableTrack?(0,l.isVertical)(this.props.direction)?"ns-resize":"ew-resize":T.length===1&&!M?"pointer":"inherit"},onMouseDown:M?l.voidFn:this.onMouseDownTrack,onTouchStart:M?l.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:M,children:g(g([],o.map(function(i,u,f){return y({props:{style:d.props.direction===h.Direction.Left||d.props.direction===h.Direction.Right?{position:"absolute",left:"".concat(i[0],"px"),marginTop:"".concat(i[1],"px")}:{position:"absolute",top:"".concat(i[0],"px"),marginLeft:"".concat(i[1],"px")},key:"mark".concat(u),ref:d.markRefs[u]},index:u})}),!0),T.map(function(i,u){var f=d.state.draggedThumbIndex===u;return c({index:u,value:i,isDragged:f,props:{style:{position:"absolute",zIndex:B[u],cursor:M?"inherit":f?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:u,tabIndex:M?void 0:0,"aria-valuemax":R?D:T[u+1]||D,"aria-valuemin":R?E:T[u-1]||E,"aria-valuenow":i,draggable:!1,ref:d.thumbRefs[u],role:"slider",onKeyDown:M?l.voidFn:d.onKeyDown,onKeyUp:M?l.voidFn:d.onKeyUp}})}),!0)})},x.defaultProps={step:1,direction:h.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},x}(k.Component);return H.default=z,H}var Xe;function jt(){return Xe||(Xe=1,function(e){var n=de&&de.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var a=n(Ct());e.Range=a.default;var s=Ue();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return s.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return s.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return s.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return s.checkValuesAgainstBoundaries}});var g=Re();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return g.Direction}})}(de)),de}var Ye=jt();function qe(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(g){return Object.getOwnPropertyDescriptor(e,g).enumerable})),a.push.apply(a,s)}return a}function fe(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?qe(Object(a),!0).forEach(function(s){It(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):qe(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function It(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}var pe=G("div",{position:"relative",width:"100%"});pe.displayName="Root",pe.displayName="Root",pe.displayName="StyledRoot";var ge=G("div",function(e){var n=e.$theme,a=e.$value,s=a===void 0?[]:a,g=e.$disabled,k=e.$isDragged,l=n.sizing,h="inherit";return g?h="not-allowed":k?h="grabbing":s.length===1&&(h="pointer"),{paddingTop:l.scale600,paddingBottom:l.scale600,paddingRight:l.scale600,paddingLeft:l.scale600,display:"flex",cursor:h,backgroundColor:n.colors.sliderTrackFill}});ge.displayName="Track",ge.displayName="Track",ge.displayName="StyledTrack";var me=G("div",function(e){var n=e.$theme,a=e.$value,s=a===void 0?[]:a,g=e.$min,k=e.$max,l=e.$disabled,h=n.colors,_=n.borders,V=n.direction,z=n.borders.useRoundedCorners?_.radius100:0;return{borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,background:Ye.getTrackBackground({values:s,colors:s.length===1?[l?h.borderOpaque:h.primary,l?h.backgroundSecondary:h.borderOpaque]:[l?h.backgroundSecondary:h.borderOpaque,l?h.borderOpaque:h.primary,l?h.backgroundSecondary:h.borderOpaque],min:g||0,max:k||0,rtl:V==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:l?"not-allowed":"inherit"}});me.displayName="InnerTrack",me.displayName="InnerTrack",me.displayName="StyledInnerTrack";var ve=G("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});ve.displayName="Mark",ve.displayName="Mark",ve.displayName="StyledMark";var be=G("div",function(e){return fe(fe({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});be.displayName="Tick",be.displayName="Tick",be.displayName="StyledTick";var ye=G("div",function(e){var n=e.$theme,a=n.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:a.scale600,paddingLeft:a.scale600,paddingBottom:a.scale400}});ye.displayName="TickBar",ye.displayName="TickBar",ye.displayName="StyledTickBar";var we=G("div",function(e){var n=e.$theme,a=e.$value,s=a===void 0?[]:a,g=e.$thumbIndex,k=e.$disabled,l=s.length===2&&g===0,h=s.length===2&&g===1;return n.direction==="rtl"&&(h||l)&&(l=!l,h=!h),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:k?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleFill,outline:"none",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(n.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:k?"not-allowed":"inherit"}});we.displayName="Thumb",we.displayName="Thumb",we.displayName="StyledThumb";var xe=G("div",function(e){var n=e.$disabled,a=e.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:n?a.colors.sliderHandleFillDisabled:a.colors.sliderHandleInnerFill}});xe.displayName="InnerThumb",xe.displayName="InnerThumb",xe.displayName="StyledInnerThumb";var ke=G("div",function(e){var n=e.$disabled,a=e.$theme;return fe(fe({position:"absolute",top:"-".concat(a.sizing.scale1400)},a.typography.font200),{},{backgroundColor:n?a.colors.sliderHandleFillDisabled:a.colors.sliderHandleInnerFill,color:a.colors.contentInversePrimary,paddingLeft:a.sizing.scale600,paddingRight:a.sizing.scale600,paddingTop:a.sizing.scale500,paddingBottom:a.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});ke.displayName="ThumbValue",ke.displayName="ThumbValue",ke.displayName="StyledThumbValue";function We(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(g){return Object.getOwnPropertyDescriptor(e,g).enumerable})),a.push.apply(a,s)}return a}function Bt(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?We(Object(a),!0).forEach(function(s){Pt(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):We(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Pt(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function q(){return q=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},q.apply(this,arguments)}function W(e,n){return _t(e)||At(e,n)||$t(e,n)||Lt()}function Lt(){throw new 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 $t(e,n){if(e){if(typeof e=="string")return Ke(e,n);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ke(e,n)}}function Ke(e,n){(n==null||n>e.length)&&(n=e.length);for(var a=0,s=new Array(n);a<n;a++)s[a]=e[a];return s}function At(e,n){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s=[],g=!0,k=!1,l,h;try{for(a=a.call(e);!(g=(l=a.next()).done)&&(s.push(l.value),!(n&&s.length===n));g=!0);}catch(_){k=!0,h=_}finally{try{!g&&a.return!=null&&a.return()}finally{if(k)throw h}}return s}}function _t(e){if(Array.isArray(e))return e}var zt=function(e){if(e.length>2||e.length===0)throw new Error("the value prop represents positions of thumbs, so its length can be only one or two");return e};function Ft(e){var n=e.overrides,a=n===void 0?{}:n,s=e.disabled,g=s===void 0?!1:s,k=e.marks,l=k===void 0?!1:k,h=e.onChange,_=h===void 0?function(){}:h,V=e.onFinalChange,z=V===void 0?function(){}:V,O=e.min,x=O===void 0?0:O,d=e.max,t=d===void 0?100:d,r=e.step,c=r===void 0?1:r,p=e.persistentThumb,y=p===void 0?!1:p,T=e.valueToLabel,E=T===void 0?function($){return $}:T,D=e.value,R=C.useContext(pt),M=C.useState(!1),I=W(M,2),m=I[0],B=I[1],o=C.useState(!1),i=W(o,2),u=i[0],f=i[1],S=C.useState(!1),v=W(S,2),w=v[0],b=v[1],P=C.useState(-1),j=W(P,2),L=j[0],N=j[1],X=C.useCallback(function($){gt($)&&b(!0);var K=$.target.parentNode.firstChild===$.target?0:1;N(K)},[]),A=C.useCallback(function($){w!==!1&&b(!1),N(-1)},[]),U=zt(D),F={$disabled:g,$step:c,$min:x,$max:t,$marks:l,$value:U,$isFocusVisible:w},te=Q(a.Root,pe),oe=W(te,2),ne=oe[0],re=oe[1],Te=Q(a.Track,ge),ie=W(Te,2),Oe=ie[0],J=ie[1],ue=Q(a.InnerTrack,me),se=W(ue,2),ce=se[0],Ge=se[1],Qe=Q(a.Thumb,we),De=W(Qe,2),Je=De[0],et=De[1],tt=Q(a.InnerThumb,xe),Ee=W(tt,2),nt=Ee[0],rt=Ee[1],at=Q(a.ThumbValue,ke),Ce=W(at,2),ot=Ce[0],it=Ce[1],st=Q(a.Tick,be),je=W(st,2),Ie=je[0],Be=je[1],ut=Q(a.TickBar,ye),Pe=W(ut,2),ct=Pe[0],lt=Pe[1],dt=Q(a.Mark,ve),Le=W(dt,2),ht=Le[0],ft=Le[1];return C.createElement(ne,q({"data-baseweb":"slider"},F,re,{onFocus:vt(re,X),onBlur:mt(re,A)}),C.createElement(Ye.Range,q({step:c,min:x,max:t,values:U,disabled:g,onChange:function($){return _({value:$})},onFinalChange:function($){return z({value:$})},rtl:R.direction==="rtl",renderTrack:function($){var K=$.props,Y=$.children,ee=$.isDragged;return C.createElement(Oe,q({onMouseDown:K.onMouseDown,onTouchStart:K.onTouchStart,$isDragged:ee},F,J),C.createElement(ce,q({$isDragged:ee,ref:K.ref},F,Ge),Y))},renderThumb:function($){var K=$.props,Y=$.index,ee=$.isDragged,$e=y||(!!Y&&u||!Y&&m||ee)&&!g;return C.createElement(Je,q({},K,{onMouseEnter:function(){Y===0?B(!0):f(!0)},onMouseLeave:function(){Y===0?B(!1):f(!1)},$thumbIndex:Y,$isDragged:ee,style:Bt({},K.style)},F,et,{$isFocusVisible:w&&L===Y}),$e&&C.createElement(ot,q({$thumbIndex:Y,$isDragged:ee},F,it),E(U[Y])),$e&&C.createElement(nt,q({$thumbIndex:Y,$isDragged:ee},F,rt)))}},l?{renderMark:function($){var K=$.props,Y=$.index;return C.createElement(ht,q({$markIndex:Y},K,F,ft))}}:{})),C.createElement(ct,q({},F,lt),C.createElement(Ie,q({},F,Be),E(x)),C.createElement(Ie,q({},F,Be),E(t))))}const Vt=le("div",{target:"ew7r33m3"})(({disabled:e,theme:n})=>({alignItems:"center",backgroundColor:e?n.colors.gray:n.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",boxShadow:"none",display:"flex",justifyContent:"center",height:n.sizes.sliderThumb,width:n.sizes.sliderThumb,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 0.2rem ${bt(n.colors.primary,.5)}`}}),""),Nt=le("div",{target:"ew7r33m2"})(({disabled:e,theme:n})=>({fontFamily:n.genericFonts.codeFont,fontSize:n.fontSizes.sm,color:e?n.colors.gray:n.colors.primary,top:"-1.6em",position:"absolute",whiteSpace:"nowrap",backgroundColor:n.colors.transparent,lineHeight:n.lineHeights.base,fontWeight:n.fontWeights.normal,pointerEvents:"none"}),""),Ut=le("div",{target:"ew7r33m1"})(({theme:e})=>({fontSize:e.fontSizes.sm,paddingBottom:e.spacing.none,paddingLeft:e.spacing.none,paddingRight:e.spacing.none,paddingTop:"0.65em",justifyContent:"space-between",alignItems:"center",display:"flex"}),""),Ze=le("div",{target:"ew7r33m0"})(({disabled:e,theme:n})=>({lineHeight:n.lineHeights.base,fontWeight:n.fontWeights.normal,fontFamily:n.genericFonts.codeFont,color:e?n.colors.fadedText40:"inherit"}),""),Ht=200;function Xt({disabled:e,element:n,widgetMgr:a,fragmentId:s}){var g;const[k,l]=Et({getStateFromWidgetMgr:Yt,getDefaultStateFromProto:qt,getCurrStateFromProto:Wt,updateWidgetMgrState:Kt,element:n,widgetMgr:a,fragmentId:s}),[h,_]=C.useState(k),V=C.useRef(null),[z]=C.useState([]),[O]=C.useState([]),{colors:x,fonts:d,fontSizes:t,spacing:r}=wt(),c=h.map(m=>Se(m,n)),p=Se(n.min,n),y=Se(n.max,n),T=n.label;C.useEffect(()=>{_(k)},[k]);const E=C.useCallback(xt(Ht,m=>{l({value:m,fromUi:!0})}),[]),D=C.useCallback(({value:m})=>{_(m),E(m)},[E]),R=C.useCallback(()=>Z.jsxs(Ut,{"data-testid":"stSliderTickBar",children:[Z.jsx(Ze,{disabled:e,"data-testid":"stSliderTickBarMin",children:p}),Z.jsx(Ze,{disabled:e,"data-testid":"stSliderTickBarMax",children:y})]}),[p,y,e]),M=C.useCallback(_e.forwardRef(function(m,B){const{$thumbIndex:o}=m,i=o||0;z[i]=B,O[i]||(O[i]=_e.createRef());const u=kt(m,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),f=c[i];return Z.jsx(Vt,{...u,disabled:m.$disabled===!0,ref:z[i],"aria-valuetext":f,"aria-label":T,children:Z.jsx(Nt,{"data-testid":"stSliderThumbValue",disabled:m.$disabled===!0,ref:O[i],children:f})})}),[]);C.useEffect(()=>{var m,B;O.map((v,w)=>{v.current&&(v.current.innerText=c[w])}),z.map((v,w)=>{v.current&&v.current.setAttribute("aria-valuetext",c[w])});const o=V.current??null,i=z[0].current,u=(m=z[1])==null?void 0:m.current,f=O[0].current,S=(B=O[1])==null?void 0:B.current;Qt(o,i,u,f,S)});const I=C.useCallback(({$disabled:m})=>({height:r.twoXS,...m?{background:x.darkenedBgMix25}:{}}),[x,r]);return Z.jsxs("div",{ref:V,className:"stSlider","data-testid":"stSlider",children:[Z.jsx(Tt,{label:n.label,disabled:e,labelVisibility:Ot((g=n.labelVisibility)==null?void 0:g.value),children:n.help&&Z.jsx(Mt,{children:Z.jsx(Rt,{content:n.help,placement:St.TOP_RIGHT})})}),Z.jsx(Ft,{min:n.min,max:n.max,step:n.step,value:Gt(h,n),onChange:D,disabled:e,overrides:{Thumb:M,Tick:{style:{fontFamily:d.monospace}},Track:{style:{backgroundColor:"none !important",paddingBottom:r.none,paddingLeft:r.none,paddingRight:r.none,paddingTop:`calc(${t.sm} * 1.35)`}},InnerTrack:{style:I},TickBar:R}})]})}function Yt(e,n){return e.getDoubleArrayValue(n)}function qt(e){return e.default}function Wt(e){return e.value}function Kt(e,n,a,s){n.setDoubleArrayValue(e,a.value,{fromUi:a.fromUi},s)}function Zt(e){const{dataType:n}=e;return n===Me.DataType.DATETIME||n===Me.DataType.DATE||n===Me.DataType.TIME}function Se(e,n){const{format:a,options:s}=n;return Zt(n)?Dt.utc(e/1e3).format(a):s.length>0?ze.sprintf(a,s[e]):ze.sprintf(a,e)}function Gt(e,n){const{min:a,max:s}=n;let g=e[0],k=e.length>1?e[1]:e[0];return g>k&&(g=k),g<a&&(g=a),g>s&&(g=s),k<a&&(k=a),k>s&&(k=s),e.length>1?[g,k]:[g]}function Qt(e,n,a,s,g){!e||!n||!s||(ae(e,n,s),a&&g&&(ae(e,a,g),Jt(e,n,a,s,g)))}function ae(e,n,a){const s=e.getBoundingClientRect(),g=n.getBoundingClientRect(),k=a.getBoundingClientRect(),l=g.left+g.width/2,h=l-k.width/2<s.left,_=l+k.width/2>s.right;a.style.left=h?"0":"",a.style.right=_?"0":""}function Jt(e,n,a,s,g){const k=e.getBoundingClientRect(),l=n.getBoundingClientRect(),h=a.getBoundingClientRect(),_=s.getBoundingClientRect(),V=g.getBoundingClientRect(),z=k.left+k.width/2,O=l.left+l.width/2,x=h.left+h.width/2,d=O-_.width/2>=k.left,t=x+V.width/2<=k.right,r=l.left-_.width>=k.left,c=h.right+V.width<=k.right,p=d?_.width/2:_.width,y=t?V.width/2:V.width,T=O+p;if(x-y-T>24){ae(e,n,s),ae(e,a,g);return}if(r&&c){s.style.left="",s.style.right=`${Math.round(l.width)}px`,g.style.left=`${Math.round(h.width)}px`,g.style.right="";return}O<z?(ae(e,n,s),g.style.left=`${Math.round(O+p+24-x)}px`,g.style.right=""):(ae(e,a,g),s.style.left="",s.style.right=`${-Math.round(x-y-24-O)}px`)}const en=yt(C.memo(Xt));export{en as default};
@@ -1,3 +1,3 @@
1
- import{cv as ce,c_ as se,c$ as de,d0 as pe,d1 as fe,d2 as ge,cI as ye,c0 as be,cm as me,d3 as ve,cJ as he,d4 as Oe,e as U,d5 as Se,c as je,r as J,L as Y,A as Pe,j as L,bY as Ce,bZ as Ie,cb as Ee,b_ as we,bH as Te,cu as De}from"./index-NYCOzVlX.js";import{a as xe}from"./useBasicWidgetState-vUy8Wspy.js";import{T as Re}from"./timepicker-Dz1EXIQj.js";import"./FormClearHelper--a7FEpt-.js";import"./inherits-DMADb7u9.js";import"./createSuper-RDzkTe3c.js";var _e=ce.Consumer;const $e=Object.freeze(Object.defineProperty({__proto__:null,ThemeConsumer:_e,ThemeProvider:se,createThemedStyled:de,createThemedUseStyletron:pe,createThemedWithStyle:fe,expandBorderStyles:ge,hexToRgb:ye,styled:be,useStyletron:me,withStyle:ve,withWrapper:he},Symbol.toStringTag,{value:"Module"}));var P={};const G=Oe($e);var D={},K;function ke(){if(K)return D;K=1,Object.defineProperty(D,"__esModule",{value:!0}),D.STATE_CHANGE_TYPE=D.SIZE=D.ENHANCER_POSITION=D.CUSTOM_INPUT_TYPE=D.ADJOINED=void 0;var g={change:"change"};D.STATE_CHANGE_TYPE=g;var d={textarea:"textarea"};D.CUSTOM_INPUT_TYPE=d;var h={none:"none",left:"left",right:"right",both:"both"};D.ADJOINED=h;var b={mini:"mini",default:"default",compact:"compact",large:"large"};D.SIZE=b;var v={start:"start",end:"end"};return D.ENHANCER_POSITION=v,D}var F={},_={},H={},X;function Be(){if(X)return H;X=1,Object.defineProperty(H,"__esModule",{value:!0}),H.default=d;function g(b){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},g(b)}function d(b){b=b||{};for(var v=arguments.length<=1?0:arguments.length-1,m,y,S=0;S<v;S++){m=(S+1<1||arguments.length<=S+1?void 0:arguments[S+1])||{};for(var f in m)g(m[f])!==void 0&&(y=m[f],h(y)?b[f]=d(b[f]||Array.isArray(y)&&[]||{},y):b[f]=y)}return b}function h(b){return Array.isArray(b)||{}.toString.call(b)=="[object Object]"}return H}var Q;function ee(){if(Q)return _;Q=1,Object.defineProperty(_,"__esModule",{value:!0}),_.getOverride=T,_.getOverrideProps=E,_.getOverrides=z,_.mergeConfigurationOverrides=B,_.mergeOverride=R,_.mergeOverrides=k,_.toObjectOverride=x,_.useOverrides=N;var g=m(U()),d=Se(),h=b(Be());function b(i){return i&&i.__esModule?i:{default:i}}function v(i){if(typeof WeakMap!="function")return null;var r=new WeakMap,u=new WeakMap;return(v=function(c){return c?u:r})(i)}function m(i,r){if(i&&i.__esModule)return i;if(i===null||C(i)!=="object"&&typeof i!="function")return{default:i};var u=v(r);if(u&&u.has(i))return u.get(i);var c={},t=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in i)if(a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)){var l=t?Object.getOwnPropertyDescriptor(i,a):null;l&&(l.get||l.set)?Object.defineProperty(c,a,l):c[a]=i[a]}return c.default=i,u&&u.set(i,c),c}function y(){return y=Object.assign?Object.assign.bind():function(i){for(var r=1;r<arguments.length;r++){var u=arguments[r];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(i[c]=u[c])}return i},y.apply(this,arguments)}function S(i,r){var u=Object.keys(i);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(i);r&&(c=c.filter(function(t){return Object.getOwnPropertyDescriptor(i,t).enumerable})),u.push.apply(u,c)}return u}function f(i){for(var r=1;r<arguments.length;r++){var u=arguments[r]!=null?arguments[r]:{};r%2?S(Object(u),!0).forEach(function(c){I(i,c,u[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(u)):S(Object(u)).forEach(function(c){Object.defineProperty(i,c,Object.getOwnPropertyDescriptor(u,c))})}return i}function I(i,r,u){return r in i?Object.defineProperty(i,r,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[r]=u,i}function C(i){"@babel/helpers - typeof";return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},C(i)}function T(i){return(0,d.isValidElementType)(i)?i:i&&C(i)==="object"?i.component:i}function E(i){return i&&C(i)==="object"?C(i.props)==="object"?f(f({},i.props),{},{$style:i.style}):{$style:i.style}:{}}function x(i){return(0,d.isValidElementType)(i)?{component:i}:i||{}}function z(i,r){var u=T(i)||r;if(i&&C(i)==="object"&&typeof i.props=="function"){var c=g.forwardRef(function(a,l){var e=i.props(a),o=E(f(f({},i),{},{props:e}));return g.createElement(u,y({ref:l},o))});return c.displayName=u.displayName,[c,{}]}var t=E(i);return[u,t]}function k(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=Object.assign({},i,r),c=Object.keys(u);return c.reduce(function(t,a){return t[a]=R(x(i[a]),x(r[a])),t},{})}function R(i,r){var u=f(f({},i),r);return i.props&&r.props&&(u.props=B(i.props,r.props)),i.style&&r.style&&(u.style=B(i.style,r.style)),u}function B(i,r){return C(i)==="object"&&C(r)==="object"?(0,h.default)({},i,r):function(){return(0,h.default)({},typeof i=="function"?i.apply(void 0,arguments):i,typeof r=="function"?r.apply(void 0,arguments):r)}}function N(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return g.useMemo(function(){return Object.keys(i).reduce(function(u,c){return u[c]=z(r[c],i[c]),u},{})},[r])}return _}var Z={},W={},te;function Me(){if(te)return W;te=1,Object.defineProperty(W,"__esModule",{value:!0}),W.Svg=void 0,W.getSvgStyles=d;var g=G;function d(b){var v=b.$theme,m=b.$size,y=b.$color,S=v.sizing.scale600;m&&(v.sizing[m]?S=v.sizing[m]:typeof m=="number"?S="".concat(m,"px"):S=m);var f="currentColor";return y&&(v.colors[y]?f=v.colors[y]:f=y),{display:"inline-block",fill:f,color:f,height:S,width:S}}var h=(0,g.styled)("svg",d);return W.Svg=h,h.displayName="Svg",h.displayName="Svg",W}var V={},re;function ze(){if(re)return V;re=1,Object.defineProperty(V,"__esModule",{value:!0}),V.default=g;function g(d){var h={};for(var b in d)b[0]!=="$"&&(h[b]=d[b]);return h}return V}var oe;function Ne(){if(oe)return Z;oe=1;function g(t){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},g(t)}Object.defineProperty(Z,"__esModule",{value:!0}),Z.default=void 0;var d=f(U()),h=ee(),b=Me(),v=y(ze()),m=["children","title","size","color","overrides"];function y(t){return t&&t.__esModule?t:{default:t}}function S(t){if(typeof WeakMap!="function")return null;var a=new WeakMap,l=new WeakMap;return(S=function(e){return e?l:a})(t)}function f(t,a){if(t&&t.__esModule)return t;if(t===null||g(t)!=="object"&&typeof t!="function")return{default:t};var l=S(a);if(l&&l.has(t))return l.get(t);var e={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)){var p=o?Object.getOwnPropertyDescriptor(t,n):null;p&&(p.get||p.set)?Object.defineProperty(e,n,p):e[n]=t[n]}return e.default=t,l&&l.set(t,e),e}function I(){return I=Object.assign?Object.assign.bind():function(t){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var e in l)Object.prototype.hasOwnProperty.call(l,e)&&(t[e]=l[e])}return t},I.apply(this,arguments)}function C(t,a){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);a&&(e=e.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),l.push.apply(l,e)}return l}function T(t){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?C(Object(l),!0).forEach(function(e){E(t,e,l[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(l)):C(Object(l)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(l,e))})}return t}function E(t,a,l){return a in t?Object.defineProperty(t,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[a]=l,t}function x(t,a){return N(t)||B(t,a)||k(t,a)||z()}function z(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{cv as ce,c_ as se,c$ as de,d0 as pe,d1 as fe,d2 as ge,cI as ye,c0 as be,cm as me,d3 as ve,cJ as he,d4 as Oe,e as U,d5 as Se,c as je,r as J,L as Y,A as Pe,j as L,bY as Ce,bZ as Ie,cb as Ee,b_ as we,bH as Te,cu as De}from"./index-OxGwEg3m.js";import{a as xe}from"./useBasicWidgetState-Bm5AJWX7.js";import{T as Re}from"./timepicker-DQlSkM-Q.js";import"./FormClearHelper-DxeY-rII.js";import"./inherits-BbfuKc-R.js";import"./createSuper-Ipqc67nc.js";var _e=ce.Consumer;const $e=Object.freeze(Object.defineProperty({__proto__:null,ThemeConsumer:_e,ThemeProvider:se,createThemedStyled:de,createThemedUseStyletron:pe,createThemedWithStyle:fe,expandBorderStyles:ge,hexToRgb:ye,styled:be,useStyletron:me,withStyle:ve,withWrapper:he},Symbol.toStringTag,{value:"Module"}));var P={};const G=Oe($e);var D={},K;function ke(){if(K)return D;K=1,Object.defineProperty(D,"__esModule",{value:!0}),D.STATE_CHANGE_TYPE=D.SIZE=D.ENHANCER_POSITION=D.CUSTOM_INPUT_TYPE=D.ADJOINED=void 0;var g={change:"change"};D.STATE_CHANGE_TYPE=g;var d={textarea:"textarea"};D.CUSTOM_INPUT_TYPE=d;var h={none:"none",left:"left",right:"right",both:"both"};D.ADJOINED=h;var b={mini:"mini",default:"default",compact:"compact",large:"large"};D.SIZE=b;var v={start:"start",end:"end"};return D.ENHANCER_POSITION=v,D}var F={},_={},H={},X;function Be(){if(X)return H;X=1,Object.defineProperty(H,"__esModule",{value:!0}),H.default=d;function g(b){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},g(b)}function d(b){b=b||{};for(var v=arguments.length<=1?0:arguments.length-1,m,y,S=0;S<v;S++){m=(S+1<1||arguments.length<=S+1?void 0:arguments[S+1])||{};for(var f in m)g(m[f])!==void 0&&(y=m[f],h(y)?b[f]=d(b[f]||Array.isArray(y)&&[]||{},y):b[f]=y)}return b}function h(b){return Array.isArray(b)||{}.toString.call(b)=="[object Object]"}return H}var Q;function ee(){if(Q)return _;Q=1,Object.defineProperty(_,"__esModule",{value:!0}),_.getOverride=T,_.getOverrideProps=E,_.getOverrides=z,_.mergeConfigurationOverrides=B,_.mergeOverride=R,_.mergeOverrides=k,_.toObjectOverride=x,_.useOverrides=N;var g=m(U()),d=Se(),h=b(Be());function b(i){return i&&i.__esModule?i:{default:i}}function v(i){if(typeof WeakMap!="function")return null;var r=new WeakMap,u=new WeakMap;return(v=function(c){return c?u:r})(i)}function m(i,r){if(i&&i.__esModule)return i;if(i===null||C(i)!=="object"&&typeof i!="function")return{default:i};var u=v(r);if(u&&u.has(i))return u.get(i);var c={},t=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in i)if(a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)){var l=t?Object.getOwnPropertyDescriptor(i,a):null;l&&(l.get||l.set)?Object.defineProperty(c,a,l):c[a]=i[a]}return c.default=i,u&&u.set(i,c),c}function y(){return y=Object.assign?Object.assign.bind():function(i){for(var r=1;r<arguments.length;r++){var u=arguments[r];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(i[c]=u[c])}return i},y.apply(this,arguments)}function S(i,r){var u=Object.keys(i);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(i);r&&(c=c.filter(function(t){return Object.getOwnPropertyDescriptor(i,t).enumerable})),u.push.apply(u,c)}return u}function f(i){for(var r=1;r<arguments.length;r++){var u=arguments[r]!=null?arguments[r]:{};r%2?S(Object(u),!0).forEach(function(c){I(i,c,u[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(u)):S(Object(u)).forEach(function(c){Object.defineProperty(i,c,Object.getOwnPropertyDescriptor(u,c))})}return i}function I(i,r,u){return r in i?Object.defineProperty(i,r,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[r]=u,i}function C(i){"@babel/helpers - typeof";return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},C(i)}function T(i){return(0,d.isValidElementType)(i)?i:i&&C(i)==="object"?i.component:i}function E(i){return i&&C(i)==="object"?C(i.props)==="object"?f(f({},i.props),{},{$style:i.style}):{$style:i.style}:{}}function x(i){return(0,d.isValidElementType)(i)?{component:i}:i||{}}function z(i,r){var u=T(i)||r;if(i&&C(i)==="object"&&typeof i.props=="function"){var c=g.forwardRef(function(a,l){var e=i.props(a),o=E(f(f({},i),{},{props:e}));return g.createElement(u,y({ref:l},o))});return c.displayName=u.displayName,[c,{}]}var t=E(i);return[u,t]}function k(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=Object.assign({},i,r),c=Object.keys(u);return c.reduce(function(t,a){return t[a]=R(x(i[a]),x(r[a])),t},{})}function R(i,r){var u=f(f({},i),r);return i.props&&r.props&&(u.props=B(i.props,r.props)),i.style&&r.style&&(u.style=B(i.style,r.style)),u}function B(i,r){return C(i)==="object"&&C(r)==="object"?(0,h.default)({},i,r):function(){return(0,h.default)({},typeof i=="function"?i.apply(void 0,arguments):i,typeof r=="function"?r.apply(void 0,arguments):r)}}function N(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return g.useMemo(function(){return Object.keys(i).reduce(function(u,c){return u[c]=z(r[c],i[c]),u},{})},[r])}return _}var Z={},W={},te;function Me(){if(te)return W;te=1,Object.defineProperty(W,"__esModule",{value:!0}),W.Svg=void 0,W.getSvgStyles=d;var g=G;function d(b){var v=b.$theme,m=b.$size,y=b.$color,S=v.sizing.scale600;m&&(v.sizing[m]?S=v.sizing[m]:typeof m=="number"?S="".concat(m,"px"):S=m);var f="currentColor";return y&&(v.colors[y]?f=v.colors[y]:f=y),{display:"inline-block",fill:f,color:f,height:S,width:S}}var h=(0,g.styled)("svg",d);return W.Svg=h,h.displayName="Svg",h.displayName="Svg",W}var V={},re;function ze(){if(re)return V;re=1,Object.defineProperty(V,"__esModule",{value:!0}),V.default=g;function g(d){var h={};for(var b in d)b[0]!=="$"&&(h[b]=d[b]);return h}return V}var oe;function Ne(){if(oe)return Z;oe=1;function g(t){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},g(t)}Object.defineProperty(Z,"__esModule",{value:!0}),Z.default=void 0;var d=f(U()),h=ee(),b=Me(),v=y(ze()),m=["children","title","size","color","overrides"];function y(t){return t&&t.__esModule?t:{default:t}}function S(t){if(typeof WeakMap!="function")return null;var a=new WeakMap,l=new WeakMap;return(S=function(e){return e?l:a})(t)}function f(t,a){if(t&&t.__esModule)return t;if(t===null||g(t)!=="object"&&typeof t!="function")return{default:t};var l=S(a);if(l&&l.has(t))return l.get(t);var e={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)){var p=o?Object.getOwnPropertyDescriptor(t,n):null;p&&(p.get||p.set)?Object.defineProperty(e,n,p):e[n]=t[n]}return e.default=t,l&&l.set(t,e),e}function I(){return I=Object.assign?Object.assign.bind():function(t){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var e in l)Object.prototype.hasOwnProperty.call(l,e)&&(t[e]=l[e])}return t},I.apply(this,arguments)}function C(t,a){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);a&&(e=e.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),l.push.apply(l,e)}return l}function T(t){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?C(Object(l),!0).forEach(function(e){E(t,e,l[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(l)):C(Object(l)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(l,e))})}return t}function E(t,a,l){return a in t?Object.defineProperty(t,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[a]=l,t}function x(t,a){return N(t)||B(t,a)||k(t,a)||z()}function z(){throw new 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 k(t,a){if(t){if(typeof t=="string")return R(t,a);var l=Object.prototype.toString.call(t).slice(8,-1);if(l==="Object"&&t.constructor&&(l=t.constructor.name),l==="Map"||l==="Set")return Array.from(t);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return R(t,a)}}function R(t,a){(a==null||a>t.length)&&(a=t.length);for(var l=0,e=new Array(a);l<a;l++)e[l]=t[l];return e}function B(t,a){var l=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(l!=null){var e=[],o=!0,n=!1,p,s;try{for(l=l.call(t);!(o=(p=l.next()).done)&&(e.push(p.value),!(a&&e.length===a));o=!0);}catch(O){n=!0,s=O}finally{try{!o&&l.return!=null&&l.return()}finally{if(n)throw s}}return e}}function N(t){if(Array.isArray(t))return t}function i(t,a){if(t==null)return{};var l=r(t,a),e,o;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(o=0;o<n.length;o++)e=n[o],!(a.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(l[e]=t[e])}return l}function r(t,a){if(t==null)return{};var l={},e=Object.keys(t),o,n;for(n=0;n<e.length;n++)o=e[n],!(a.indexOf(o)>=0)&&(l[o]=t[o]);return l}var u=function(t,a){var l=t.children,e=t.title,o=t.size,n=t.color,p=t.overrides,s=p===void 0?{}:p,O=i(t,m),j=(0,h.getOverrides)(s.Svg,b.Svg),$=x(j,2),w=$[0],M=$[1],A=w.__STYLETRON__?T(T({title:e,$color:n,$size:o},O),M):T(T({title:e,color:n,size:o},(0,v.default)(O)),(0,v.default)(M));return d.createElement(w,I({"data-baseweb":"icon",ref:a},A),e?d.createElement("title",null,e):null,l)},c=d.forwardRef(u);return Z.default=c,Z}var ne;function Le(){if(ne)return F;ne=1;function g(r){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},g(r)}Object.defineProperty(F,"__esModule",{value:!0}),F.default=void 0;var d=f(U()),h=G,b=ee(),v=y(Ne()),m=["title","size","color","overrides"];function y(r){return r&&r.__esModule?r:{default:r}}function S(r){if(typeof WeakMap!="function")return null;var u=new WeakMap,c=new WeakMap;return(S=function(t){return t?c:u})(r)}function f(r,u){if(r&&r.__esModule)return r;if(r===null||g(r)!=="object"&&typeof r!="function")return{default:r};var c=S(u);if(c&&c.has(r))return c.get(r);var t={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in r)if(l!=="default"&&Object.prototype.hasOwnProperty.call(r,l)){var e=a?Object.getOwnPropertyDescriptor(r,l):null;e&&(e.get||e.set)?Object.defineProperty(t,l,e):t[l]=r[l]}return t.default=r,c&&c.set(r,t),t}function I(){return I=Object.assign?Object.assign.bind():function(r){for(var u=1;u<arguments.length;u++){var c=arguments[u];for(var t in c)Object.prototype.hasOwnProperty.call(c,t)&&(r[t]=c[t])}return r},I.apply(this,arguments)}function C(r,u){if(r==null)return{};var c=T(r,u),t,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);for(a=0;a<l.length;a++)t=l[a],!(u.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(c[t]=r[t])}return c}function T(r,u){if(r==null)return{};var c={},t=Object.keys(r),a,l;for(l=0;l<t.length;l++)a=t[l],!(u.indexOf(a)>=0)&&(c[a]=r[a]);return c}function E(r,u){return B(r)||R(r,u)||z(r,u)||x()}function x(){throw new 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 z(r,u){if(r){if(typeof r=="string")return k(r,u);var c=Object.prototype.toString.call(r).slice(8,-1);if(c==="Object"&&r.constructor&&(c=r.constructor.name),c==="Map"||c==="Set")return Array.from(r);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return k(r,u)}}function k(r,u){(u==null||u>r.length)&&(u=r.length);for(var c=0,t=new Array(u);c<u;c++)t[c]=r[c];return t}function R(r,u){var c=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(c!=null){var t=[],a=!0,l=!1,e,o;try{for(c=c.call(r);!(a=(e=c.next()).done)&&(t.push(e.value),!(u&&t.length===u));a=!0);}catch(n){l=!0,o=n}finally{try{!a&&c.return!=null&&c.return()}finally{if(l)throw o}}return t}}function B(r){if(Array.isArray(r))return r}function N(r,u){var c=(0,h.useStyletron)(),t=E(c,2),a=t[1],l=r.title,e=l===void 0?"Delete Alt":l,o=r.size,n=r.color,p=r.overrides,s=p===void 0?{}:p,O=C(r,m),j=(0,b.mergeOverride)({component:a.icons&&a.icons.DeleteAlt?a.icons.DeleteAlt:null},s&&s.Svg?(0,b.toObjectOverride)(s.Svg):{});return d.createElement(v.default,I({viewBox:"0 0 24 24",ref:u,title:e,size:o,color:n,overrides:{Svg:j}},O),d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}var i=d.forwardRef(N);return F.default=i,F}var ie;function Ae(){if(ie)return P;ie=1,Object.defineProperty(P,"__esModule",{value:!0}),P.getRootStyles=P.getInputStyles=P.getInputContainerStyles=P.StyledMaskToggleButton=P.StyledClearIconContainer=P.StyledClearIcon=P.Root=P.InputEnhancer=P.InputContainer=P.Input=void 0;var g=G,d=ke(),h=b(Le());function b(e){return e&&e.__esModule?e:{default:e}}function v(e,o){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);o&&(p=p.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,p)}return n}function m(e){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?v(Object(n),!0).forEach(function(p){y(e,p,n[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(p){Object.defineProperty(e,p,Object.getOwnPropertyDescriptor(n,p))})}return e}function y(e,o,n){return o in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n,e}var S=(0,g.styled)("button",function(e){var o,n=e.$theme,p=e.$size,s=e.$isFocusVisible,O=(o={},y(o,d.SIZE.mini,n.sizing.scale400),y(o,d.SIZE.compact,n.sizing.scale400),y(o,d.SIZE.default,n.sizing.scale300),y(o,d.SIZE.large,n.sizing.scale200),o)[p];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:O,paddingRight:O,outline:s?"solid 3px ".concat(n.colors.accent):"none",color:n.colors.contentPrimary}});P.StyledMaskToggleButton=S,S.displayName="StyledMaskToggleButton",S.displayName="StyledMaskToggleButton";var f=(0,g.styled)("div",function(e){var o,n=e.$alignTop,p=n===void 0?!1:n,s=e.$size,O=e.$theme,j=(o={},y(o,d.SIZE.mini,O.sizing.scale200),y(o,d.SIZE.compact,O.sizing.scale200),y(o,d.SIZE.default,O.sizing.scale100),y(o,d.SIZE.large,O.sizing.scale0),o)[s];return{display:"flex",alignItems:p?"flex-start":"center",paddingLeft:j,paddingRight:j,paddingTop:p?O.sizing.scale500:"0px",color:O.colors.contentPrimary}});P.StyledClearIconContainer=f,f.displayName="StyledClearIconContainer",f.displayName="StyledClearIconContainer";var I=(0,g.styled)(h.default,function(e){var o=e.$theme,n=e.$isFocusVisible;return{cursor:"pointer",outline:n?"solid 3px ".concat(o.colors.accent):"none"}});P.StyledClearIcon=I,I.displayName="StyledClearIcon",I.displayName="StyledClearIcon";function C(e,o){var n;return(n={},y(n,d.SIZE.mini,{paddingTop:o.scale100,paddingBottom:o.scale100,paddingLeft:o.scale550,paddingRight:o.scale550}),y(n,d.SIZE.compact,{paddingTop:o.scale200,paddingBottom:o.scale200,paddingLeft:o.scale550,paddingRight:o.scale550}),y(n,d.SIZE.default,{paddingTop:o.scale400,paddingBottom:o.scale400,paddingLeft:o.scale550,paddingRight:o.scale550}),y(n,d.SIZE.large,{paddingTop:o.scale550,paddingBottom:o.scale550,paddingLeft:o.scale550,paddingRight:o.scale550}),n)[e]}function T(e,o,n,p,s){var O=e===d.ADJOINED.both||e===d.ADJOINED.left&&p!=="rtl"||e===d.ADJOINED.right&&p==="rtl"||s&&p==="rtl",j=e===d.ADJOINED.both||e===d.ADJOINED.right&&p!=="rtl"||e===d.ADJOINED.left&&p==="rtl"||s&&p!=="rtl";return{paddingLeft:O?n.scale550:"0px",paddingRight:j?n.scale550:"0px"}}function E(e,o){var n;return(n={},y(n,d.SIZE.mini,o.font100),y(n,d.SIZE.compact,o.font200),y(n,d.SIZE.default,o.font300),y(n,d.SIZE.large,o.font400),n)[e]}function x(e,o,n){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,s=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:s.inputFillDisabled,borderRightColor:s.inputFillDisabled,borderTopColor:s.inputFillDisabled,borderBottomColor:s.inputFillDisabled,backgroundColor:s.inputFillDisabled}:o?{borderLeftColor:s.borderSelected,borderRightColor:s.borderSelected,borderTopColor:s.borderSelected,borderBottomColor:s.borderSelected,backgroundColor:s.inputFillActive}:n?{borderLeftColor:s.inputBorderError,borderRightColor:s.inputBorderError,borderTopColor:s.inputBorderError,borderBottomColor:s.inputBorderError,backgroundColor:s.inputFillError}:p?{borderLeftColor:s.inputBorderPositive,borderRightColor:s.inputBorderPositive,borderTopColor:s.inputBorderPositive,borderBottomColor:s.inputBorderPositive,backgroundColor:s.inputFillPositive}:{borderLeftColor:s.inputBorder,borderRightColor:s.inputBorder,borderTopColor:s.inputBorder,borderBottomColor:s.inputBorder,backgroundColor:s.inputFill}}function z(e,o){var n=o.inputBorderRadius;return e===d.SIZE.mini&&(n=o.inputBorderRadiusMini),{borderTopLeftRadius:n,borderBottomLeftRadius:n,borderTopRightRadius:n,borderBottomRightRadius:n}}var k=function(e){var o=e.$isFocused,n=e.$adjoined,p=e.$error,s=e.$disabled,O=e.$positive,j=e.$size,$=e.$theme,w=e.$theme,M=w.borders,A=w.colors,ae=w.sizing,le=w.typography,q=w.animation,ue=e.$hasIconTrailing;return m(m(m(m({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:q.timing200,transitionTimingFunction:q.easeOutCurve},z(j,M)),E(j,le)),x(s,o,p,O,A)),T(n,j,ae,$.direction,ue))};P.getRootStyles=k;var R=(0,g.styled)("div",k);P.Root=R,R.displayName="Root",R.displayName="Root";function B(e,o){var n;return(n={},y(n,d.SIZE.mini,{paddingRight:o.scale400,paddingLeft:o.scale400}),y(n,d.SIZE.compact,{paddingRight:o.scale400,paddingLeft:o.scale400}),y(n,d.SIZE.default,{paddingRight:o.scale300,paddingLeft:o.scale300}),y(n,d.SIZE.large,{paddingRight:o.scale200,paddingLeft:o.scale200}),n)[e]}function N(e,o,n,p,s){return e?{color:s.inputEnhancerTextDisabled,backgroundColor:s.inputFillDisabled}:o?{color:s.contentPrimary,backgroundColor:s.inputFillActive}:n?{color:s.contentPrimary,backgroundColor:s.inputFillError}:p?{color:s.contentPrimary,backgroundColor:s.inputFillPositive}:{color:s.contentPrimary,backgroundColor:s.inputFill}}var i=(0,g.styled)("div",function(e){var o=e.$size,n=e.$disabled,p=e.$isFocused,s=e.$error,O=e.$positive,j=e.$theme,$=j.colors,w=j.sizing,M=j.typography,A=j.animation;return m(m(m({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:A.timing200,transitionTimingFunction:A.easeOutCurve},E(o,M)),B(o,w)),N(n,p,s,O,$))});P.InputEnhancer=i,i.displayName="InputEnhancer",i.displayName="InputEnhancer";function r(e,o,n,p,s){return e?{color:s.inputTextDisabled,backgroundColor:s.inputFillDisabled}:o?{color:s.contentPrimary,backgroundColor:s.inputFillActive}:n?{color:s.contentPrimary,backgroundColor:s.inputFillError}:p?{color:s.contentPrimary,backgroundColor:s.inputFillPositive}:{color:s.contentPrimary,backgroundColor:s.inputFill}}var u=function(e){var o=e.$isFocused,n=e.$error,p=e.$disabled,s=e.$positive,O=e.$size,j=e.$theme,$=j.colors,w=j.typography,M=j.animation;return m(m({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:M.timing200,transitionTimingFunction:M.easeOutCurve},E(O,w)),r(p,o,n,s,$))};P.getInputContainerStyles=u;var c=(0,g.styled)("div",u);P.InputContainer=c,c.displayName="InputContainer",c.displayName="InputContainer";function t(e,o,n,p){return e?{color:p.inputTextDisabled,"-webkit-text-fill-color":p.inputTextDisabled,caretColor:p.contentPrimary,"::placeholder":{color:p.inputPlaceholderDisabled}}:{color:p.contentPrimary,caretColor:p.contentPrimary,"::placeholder":{color:p.inputPlaceholder}}}var a=function(e){var o=e.$disabled,n=e.$isFocused,p=e.$error,s=e.$size,O=e.$theme,j=O.colors,$=O.sizing,w=O.typography;return m(m(m({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:o?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},E(s,w)),C(s,$)),t(o,n,p,j))};P.getInputStyles=a;var l=(0,g.styled)("input",a);return P.Input=l,l.displayName="Input",l.displayName="Input",P}var We=Ae();const Fe=je("div",{target:"e1ipygm10"})({name:"1ucqwki",styles:"position:absolute;top:50%;right:2.05em"});function Ze({disabled:g,element:d,widgetMgr:h,fragmentId:b}){var v;const[m,y]=xe({getStateFromWidgetMgr:He,getDefaultStateFromProto:Ve,getCurrStateFromProto:Ue,updateWidgetMgrState:Je,element:d,widgetMgr:h,fragmentId:b}),S=Y(d.default)&&!g,f=Pe(),I={Select:{props:{disabled:g,overrides:{ControlContainer:{style:{height:f.sizes.minElementHeight,borderLeftWidth:f.sizes.borderWidth,borderRightWidth:f.sizes.borderWidth,borderTopWidth:f.sizes.borderWidth,borderBottomWidth:f.sizes.borderWidth}},IconsContainer:{style:()=>({paddingRight:f.spacing.sm})},ValueContainer:{style:()=>({lineHeight:f.lineHeights.inputWidget,paddingRight:f.spacing.sm,paddingLeft:f.spacing.md,paddingBottom:f.spacing.sm,paddingTop:f.spacing.sm})},SingleValue:{props:{"data-testid":"stTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:f.spacing.none,paddingBottom:f.spacing.none,boxShadow:"none",maxHeight:f.sizes.maxDropdownHeight})},DropdownListItem:{style:()=>({paddingRight:f.spacing.lg,paddingLeft:f.spacing.lg,paddingTop:f.spacing.sm,paddingBottom:f.spacing.sm})},Popover:{props:{overrides:{Body:{style:()=>({marginTop:f.spacing.px})}}}},SelectArrow:{component:De,props:{overrides:{Svg:{style:()=>({width:f.iconSizes.xl,height:f.iconSizes.xl})}}}}}}}},C=J.useCallback(E=>{const x=E===null?null:Ye(E);y({value:x,fromUi:!0})},[y]),T=J.useCallback(()=>{C(null)},[C]);return L.jsxs("div",{className:"stTimeInput","data-testid":"stTimeInput",children:[L.jsx(Ce,{label:d.label,disabled:g,labelVisibility:Ie((v=d.labelVisibility)==null?void 0:v.value),children:d.help&&L.jsx(Ee,{children:L.jsx(we,{content:d.help,placement:Te.TOP_RIGHT})})}),L.jsx(Re,{format:"24",step:d.step?Number(d.step):900,value:Y(m)?void 0:Ge(m),onChange:C,overrides:I,nullable:S,creatable:!0,"aria-label":d.label}),S&&!Y(m)&&L.jsx(Fe,{onClick:T,"data-testid":"stTimeInputClearButton",children:L.jsx(We.StyledClearIcon,{overrides:{Svg:{style:{color:f.colors.darkGray,padding:f.spacing.threeXS,height:f.sizes.clearIconSize,width:f.sizes.clearIconSize,":hover":{fill:f.colors.bodyText}}}},$isFocusVisible:!1})})]})}function He(g,d){return g.getStringValue(d)??null}function Ve(g){return g.default??null}function Ue(g){return g.value??null}function Je(g,d,h,b){d.setStringValue(g,h.value,{fromUi:h.fromUi},b)}function Ye(g){const d=g.getHours().toString().padStart(2,"0"),h=g.getMinutes().toString().padStart(2,"0");return`${d}:${h}`}function Ge(g){if(g===null)return null;const[d,h]=g.split(":").map(Number),b=new Date;return b.setHours(d),b.setMinutes(h),b}const qe=J.memo(Ze);export{qe as default};
@@ -1 +1 @@
1
- import{c as l,r as n,u as T,j as m,l as y}from"./index-NYCOzVlX.js";const A=l("div",{target:"exyuj7n1"})(()=>({lineHeight:0}),""),L=l("audio",{target:"exyuj7n0"})(({theme:r})=>({width:"100%",height:r.sizes.minElementHeight,margin:0,padding:0}),""),h=y.getLogger("Audio");function x({element:r,endpoints:a,elementMgr:d}){const o=n.useRef(null),{startTime:i,endTime:u,loop:s,autoplay:f}=r,E=n.useMemo(()=>{if(!r.id)return!0;const e=d.getElementState(r.id,"preventAutoplay");return e||d.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,d]);n.useEffect(()=>{o.current&&(o.current.currentTime=i)},[i]),n.useEffect(()=>{const e=o.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),n.useEffect(()=>{const e=o.current;if(!e)return;let t=!1;const c=()=>{u>0&&e.currentTime>=u&&(s?(e.currentTime=i||0,e.play()):t||(t=!0,e.pause()))};return u>0&&e.addEventListener("timeupdate",c),()=>{e&&u>0&&e.removeEventListener("timeupdate",c)}},[u,s,i]),n.useEffect(()=>{const e=o.current;if(!e)return;const t=()=>{s&&(e.currentTime=i||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[s,i]);const g=T(r.url),p=a.buildMediaURL(g),v=e=>{const t=e.currentTarget.src;h.error(`Client Error: Audio source error - ${t}`),a.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",t)};return m.jsx(A,{children:m.jsx(L,{className:"stAudio","data-testid":"stAudio",ref:o,controls:!0,autoPlay:f&&!E,src:p,onError:v})})}const j=n.memo(x);export{j as default};
1
+ import{c as l,r as n,u as T,j as m,l as y}from"./index-OxGwEg3m.js";const A=l("div",{target:"exyuj7n1"})(()=>({lineHeight:0}),""),L=l("audio",{target:"exyuj7n0"})(({theme:r})=>({width:"100%",height:r.sizes.minElementHeight,margin:0,padding:0}),""),h=y.getLogger("Audio");function x({element:r,endpoints:a,elementMgr:d}){const o=n.useRef(null),{startTime:i,endTime:u,loop:s,autoplay:f}=r,E=n.useMemo(()=>{if(!r.id)return!0;const e=d.getElementState(r.id,"preventAutoplay");return e||d.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,d]);n.useEffect(()=>{o.current&&(o.current.currentTime=i)},[i]),n.useEffect(()=>{const e=o.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),n.useEffect(()=>{const e=o.current;if(!e)return;let t=!1;const c=()=>{u>0&&e.currentTime>=u&&(s?(e.currentTime=i||0,e.play()):t||(t=!0,e.pause()))};return u>0&&e.addEventListener("timeupdate",c),()=>{e&&u>0&&e.removeEventListener("timeupdate",c)}},[u,s,i]),n.useEffect(()=>{const e=o.current;if(!e)return;const t=()=>{s&&(e.currentTime=i||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[s,i]);const g=T(r.url),p=a.buildMediaURL(g),v=e=>{const t=e.currentTarget.src;h.error(`Client Error: Audio source error - ${t}`),a.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",t)};return m.jsx(A,{children:m.jsx(L,{className:"stAudio","data-testid":"stAudio",ref:o,controls:!0,autoPlay:f&&!E,src:p,onError:v})})}const j=n.memo(x);export{j as default};