@stlite/desktop 0.76.2 → 0.77.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 (73) hide show
  1. package/bin/dump_artifacts.js +30 -30
  2. package/build/assets/{FileDownload.esm-BP72wB_u.js → FileDownload.esm-DJiSKkNf.js} +1 -1
  3. package/build/assets/{FormClearHelper-BIZNCxvb.js → FormClearHelper-Dhc_r76k.js} +1 -1
  4. package/build/assets/{Hooks-C30HoPXz.js → Hooks-DrFfRfR6.js} +1 -1
  5. package/build/assets/{InputInstructions-B9wXy3U4.js → InputInstructions-DBmZV4qq.js} +1 -1
  6. package/build/assets/{ProgressBar-BlPlcnwu.js → ProgressBar-D8toyv14.js} +1 -1
  7. package/build/assets/{RenderInPortalIfExists-DSHuT3NO.js → RenderInPortalIfExists-BgiI3__B.js} +1 -1
  8. package/build/assets/{Toolbar-B1zMj-jg.js → Toolbar-BTpOoeAP.js} +1 -1
  9. package/build/assets/{base-input-CMN1_Ew_.js → base-input-BNFPjj94.js} +1 -1
  10. package/build/assets/{createSuper-D4gvBB5j.js → createSuper-D-IHZlzE.js} +1 -1
  11. package/build/assets/{data-grid-overlay-editor-CgsMGcDx.js → data-grid-overlay-editor-3T3wOgR5.js} +1 -1
  12. package/build/assets/{downloader-Dv4W7rem.js → downloader-BRNWhhPt.js} +1 -1
  13. package/build/assets/{es6-R_bosjbV.js → es6-BGfGTfFo.js} +2 -2
  14. package/build/assets/{getPrototypeOf-CHt6AZp_.js → getPrototypeOf-Bfvf6jYJ.js} +1 -1
  15. package/build/assets/{iframeResizer.contentWindow-9-Xlr32c.js → iframeResizer.contentWindow-CAd9E7Yv.js} +1 -1
  16. package/build/assets/{index-BDNxxQ4v.js → index-14giYAR7.js} +1 -1
  17. package/build/assets/{index-BkBgJKWs.js → index-2GihT9MS.js} +1 -1
  18. package/build/assets/{index-Cjn3IAUe.js → index-BCXIPEnn.js} +1 -1
  19. package/build/assets/{index-CRKAbc7H.js → index-BbkQg7FB.js} +1 -1
  20. package/build/assets/{index-dkm5JtmN.js → index-Bf8NyENV.js} +1 -1
  21. package/build/assets/{index-BLvsCvkf.js → index-BgM3jrky.js} +1 -1
  22. package/build/assets/{index-DqEaj7EU.js → index-BkQMwfmi.js} +1 -1
  23. package/build/assets/{index-Be0wHUx-.js → index-BzdmnoFw.js} +1 -1
  24. package/build/assets/{index-BEeaeEPl.js → index-C1nS5RIf.js} +1 -1
  25. package/build/assets/{index-UQryvozB.js → index-CCQ8WBbz.js} +1 -1
  26. package/build/assets/{index-Bu07mO_x.js → index-CRU3QRmk.js} +1 -1
  27. package/build/assets/{index-BB6FwCEX.js → index-CSeZQPbV.js} +1 -1
  28. package/build/assets/{index-bnfkOWdV.js → index-CWQIbxk6.js} +1 -1
  29. package/build/assets/{index-DBeV5cvz.js → index-CeMslFeR.js} +1 -1
  30. package/build/assets/{index-DmCDp6tz.js → index-CqPAWIlG.js} +1 -1
  31. package/build/assets/{index-D2caMYlF.js → index-CzMG-04F.js} +1 -1
  32. package/build/assets/{index-DgKoCzGM.js → index-D20xuISa.js} +1 -1
  33. package/build/assets/{index-B3bELqRU.js → index-DEAAmCoL.js} +1 -1
  34. package/build/assets/{index-DP9siobZ.js → index-DGyUD6Fc.js} +1 -1
  35. package/build/assets/{index-8qq2hPcx.js → index-DLzppoKu.js} +1 -1
  36. package/build/assets/{index-CoumX680.js → index-DS1KzaKA.js} +1 -1
  37. package/build/assets/{index-CMQsen11.js → index-DSp2Cc2a.js} +1 -1
  38. package/build/assets/{index-D7beHGbk.js → index-DVBTaPM3.js} +5 -5
  39. package/build/assets/{index-C9-3Tvo1.js → index-DWl7GYN1.js} +1 -1
  40. package/build/assets/{index-CxiUGvN5.js → index-DXhp4_Bh.js} +1 -1
  41. package/build/assets/{index-BKKZmTqZ.js → index-Dd4zWSqM.js} +1 -1
  42. package/build/assets/{index-B0CwOTPz.js → index-DlrQfTa3.js} +1 -1
  43. package/build/assets/{index-B1L1envm.js → index-DpQaX_zS.js} +1 -1
  44. package/build/assets/{index-B3quCHCi.js → index-DtCnxC7q.js} +1 -1
  45. package/build/assets/{index-DxHnoro7.js → index-DvDmgZ7F.js} +1 -1
  46. package/build/assets/{index-W-TZSd1E.js → index-DwF2Kd5G.js} +1 -1
  47. package/build/assets/{index-DfPuZgVe.js → index-IG3UXYla.js} +1 -1
  48. package/build/assets/{index-BZMvJ6Yf.js → index-R99zJVpL.js} +1 -1
  49. package/build/assets/{index-BL2qQWaL.js → index-c-P5wgpW.js} +1 -1
  50. package/build/assets/{index-D_ZpMtCx.js → index-hfjIuaWS.js} +1 -1
  51. package/build/assets/{index-DuoBWGu3.js → index-lyJc68Dt.js} +45 -45
  52. package/build/assets/{index-DjNlghsG.js → index-uFJhQ6op.js} +1 -1
  53. package/build/assets/{input-OLwqq6dJ.js → input-B0OfG1Hd.js} +1 -1
  54. package/build/assets/{memory-K1u1sl9P.js → memory-Db7tbqiS.js} +1 -1
  55. package/build/assets/{number-overlay-editor-BPRtr2ZH.js → number-overlay-editor-DNvGPhC6.js} +1 -1
  56. package/build/assets/{sandbox-CuSVz6A0.js → sandbox-0hHf-j9y.js} +1 -1
  57. package/build/assets/{slicedToArray-CFP8r_hv.js → slicedToArray-C3Kk8BEP.js} +1 -1
  58. package/build/assets/{textarea-BgOZDoS8.js → textarea-DjoYY0dF.js} +1 -1
  59. package/build/assets/{timepicker-BD9p-9JQ.js → timepicker-Cn0ZGw9I.js} +1 -1
  60. package/build/assets/{uniqueId-D81S8Chc.js → uniqueId-K4UOiJl2.js} +1 -1
  61. package/build/assets/{useBasicWidgetState-DgnZoFWi.js → useBasicWidgetState-BzSjsdCt.js} +1 -1
  62. package/build/assets/{useOnInputChange-DTjT_cKQ.js → useOnInputChange-VVCu-n8v.js} +1 -1
  63. package/build/assets/{withFullScreenWrapper-BzdPuFtI.js → withFullScreenWrapper-BggmGF09.js} +1 -1
  64. package/build/assets/{worker-DzcNcnW5.js → worker-DddKT6_v.js} +1 -1
  65. package/build/electron/worker.js +11 -12
  66. package/build/index.html +1 -1
  67. package/build/pyodide/pyodide-lock.json +1 -1
  68. package/build/pyodide/pyodide.asm.js +1 -1
  69. package/build/pyodide/pyodide.asm.wasm +0 -0
  70. package/build/pyodide/pyodide.mjs +3 -3
  71. package/build/pyodide/python_stdlib.zip +0 -0
  72. package/package.json +9 -10
  73. package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
@@ -1 +1 @@
1
- import{r as e,E as n,_ as a}from"./index-DuoBWGu3.js";var i=e.forwardRef(function(r,t){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))});i.displayName="Delete";var o=e.forwardRef(function(r,t){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),e.createElement("rect",{width:24,height:24,fill:"none"}),e.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}))});o.displayName="FileDownload";export{i as D,o as F};
1
+ import{r as e,E as n,_ as a}from"./index-lyJc68Dt.js";var i=e.forwardRef(function(r,t){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))});i.displayName="Delete";var o=e.forwardRef(function(r,t){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),e.createElement("rect",{width:24,height:24,fill:"none"}),e.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}))});o.displayName="FileDownload";export{i as D,o as F};
@@ -1 +1 @@
1
- import{F as o,bC as i,r as a}from"./index-DuoBWGu3.js";class d{manageFormClearListener(t,e,s){o(this.formClearListener)&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),i(e)&&(this.formClearListener=t.addFormClearedListener(e,s),this.lastWidgetMgr=t,this.lastFormId=e))}disconnect(){var t;(t=this.formClearListener)==null||t.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function n({element:r,widgetMgr:t,onFormCleared:e}){a.useEffect(()=>{if(!i(r.formId))return;const s=t.addFormClearedListener(r.formId,e);return()=>{s.disconnect()}},[r,t,e])}export{d as F,n as u};
1
+ import{F as o,bC as i,r as a}from"./index-lyJc68Dt.js";class d{manageFormClearListener(t,e,s){o(this.formClearListener)&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),i(e)&&(this.formClearListener=t.addFormClearedListener(e,s),this.lastWidgetMgr=t,this.lastFormId=e))}disconnect(){var t;(t=this.formClearListener)==null||t.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function n({element:r,widgetMgr:t,onFormCleared:e}){a.useEffect(()=>{if(!i(r.formId))return;const s=t.addFormClearedListener(r.formId,e);return()=>{s.disconnect()}},[r,t,e])}export{d as F,n as u};
@@ -1 +1 @@
1
- import{r as t}from"./index-DuoBWGu3.js";const o=e=>{const r=t.useRef();return t.useEffect(()=>{r.current=e},[e]),r.current};export{o as u};
1
+ import{r as t}from"./index-lyJc68Dt.js";const o=e=>{const r=t.useRef();return t.useEffect(()=>{r.current=e},[e]),r.current};export{o as u};
@@ -1,4 +1,4 @@
1
- import{k as g,c as d,j as c,bH as h,bI as p}from"./index-DuoBWGu3.js";const b=g`
1
+ import{k as g,c as d,j as c,bH as h,bI as p}from"./index-lyJc68Dt.js";const b=g`
2
2
  50% {
3
3
  color: rgba(0, 0, 0, 0);
4
4
  }
@@ -1,2 +1,2 @@
1
- import{b2 as p,bF as ke,bG as A,R as C,r as d,b3 as P,M as Le,a6 as je,bA as xe,j as Ce,bq as Te}from"./index-DuoBWGu3.js";var h={small:"small",medium:"medium",large:"large"},$;function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(this,arguments)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){w(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oe(e){var t;return(t={},w(t,h.small,"2px"),w(t,h.medium,"4px"),w(t,h.large,"8px"),t)[e]}var M=p("div",function(e){return{width:"100%"}});M.displayName="StyledRoot",M.displayName="StyledRoot";var V=p("div",function(e){var t=e.$theme,r=t.sizing;return{display:"flex",marginLeft:r.scale500,marginRight:r.scale500,marginTop:r.scale500,marginBottom:r.scale500}});V.displayName="StyledBarContainer",V.displayName="StyledBarContainer";var _=p("div",function(e){var t=e.$theme,r=e.$size,n=e.$steps,o=t.colors,a=t.sizing,s=t.borders,i=s.useRoundedCorners?a.scale0:0;return R({borderTopLeftRadius:i,borderTopRightRadius:i,borderBottomRightRadius:i,borderBottomLeftRadius:i,backgroundColor:ke(o.progressbarTrackFill,"0.16"),height:oe(r),flex:1,overflow:"hidden"},n<2?{}:{marginLeft:a.scale300,":first-child":{marginLeft:"0"}})});_.displayName="StyledBar",_.displayName="StyledBar";var I=p("div",function(e){var t=e.$theme,r=e.$value,n=e.$successValue,o=e.$steps,a=e.$index,s=e.$maxValue,i=e.$minValue,u=i===void 0?0:i,l=s||n,O=t.colors,y=t.sizing,k=t.borders,X="".concat(100-(r-u)*100/(l-u),"%"),c={default:"default",awaits:"awaits",inProgress:"inProgress",completed:"completed"},b=c.default;if(o>1){var N=(l-u)/o,z=(r-u)/(l-u)*100,L=Math.floor(z/N);a<L?b=c.completed:a===L?b=c.inProgress:b=c.awaits}var g=k.useRoundedCorners?y.scale0:0,E={transform:"translateX(-".concat(X,")")},j=b===c.inProgress?{animationDuration:"2.1s",animationIterationCount:"infinite",animationTimingFunction:t.animation.linearCurve,animationName:{"0%":{transform:"translateX(-102%)",opacity:1},"50%":{transform:"translateX(0%)",opacity:1},"100%":{transform:"translateX(0%)",opacity:0}}}:b===c.completed?{transform:"translateX(0%)"}:{transform:"translateX(-102%)"};return R({borderTopLeftRadius:g,borderTopRightRadius:g,borderBottomRightRadius:g,borderBottomLeftRadius:g,backgroundColor:O.accent,height:"100%",width:"100%",transform:"translateX(-102%)",transition:"transform 0.5s"},o>1?j:E)});I.displayName="StyledBarProgress",I.displayName="StyledBarProgress";var D=p("div",function(e){var t=e.$theme,r=e.$isLeft,n=r===void 0?!1:r,o=e.$size,a=o===void 0?h.medium:o,s=t.colors,i=t.sizing,u=t.borders,l=u.useRoundedCorners?i.scale0:0,O=oe(a),y={display:"inline-block",flex:1,marginLeft:"auto",marginRight:"auto",transitionProperty:"background-position",animationDuration:"1.5s",animationIterationCount:"infinite",animationTimingFunction:t.animation.linearCurve,backgroundSize:"300% auto",backgroundRepeat:"no-repeat",backgroundPositionX:n?"-50%":"150%",backgroundImage:"linear-gradient(".concat(n?"90":"270","deg, transparent 0%, ").concat(s.accent," 25%, ").concat(s.accent," 75%, transparent 100%)"),animationName:n?{"0%":{backgroundPositionX:"-50%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"150%"}}:{"0%":{backgroundPositionX:"150%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"-50%"}}};return R(R({},n?{borderTopLeftRadius:l,borderBottomLeftRadius:l}:{borderTopRightRadius:l,borderBottomRightRadius:l}),{},{height:O},y)});D.displayName="StyledInfiniteBar",D.displayName="StyledInfiniteBar";var H=p("div",function(e){return R(R({textAlign:"center"},e.$theme.typography.font150),{},{color:e.$theme.colors.contentTertiary})});H.displayName="StyledLabel",H.displayName="StyledLabel";var f=($={},w($,h.large,{d:"M47.5 4H71.5529C82.2933 4 91 12.9543 91 24C91 35.0457 82.2933 44 71.5529 44H23.4471C12.7067 44 4 35.0457 4 24C4 12.9543 12.7067 4 23.4471 4H47.5195",width:95,height:48,strokeWidth:8,typography:"LabelLarge"}),w($,h.medium,{d:"M39 2H60.5833C69.0977 2 76 9.16344 76 18C76 26.8366 69.0977 34 60.5833 34H17.4167C8.90228 34 2 26.8366 2 18C2 9.16344 8.90228 2 17.4167 2H39.0195",width:78,height:36,strokeWidth:4,typography:"LabelMedium"}),w($,h.small,{d:"M32 1H51.6271C57.9082 1 63 6.37258 63 13C63 19.6274 57.9082 25 51.6271 25H12.3729C6.09181 25 1 19.6274 1 13C1 6.37258 6.09181 1 12.3729 1H32.0195",width:64,height:26,strokeWidth:2,typography:"LabelSmall"}),$),ae=p("div",function(e){var t=e.$size,r=e.$inline;return{width:f[t].width+"px",height:f[t].height+"px",position:"relative",display:r?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}});ae.displayName="StyledProgressBarRoundedRoot",ae.displayName="StyledProgressBarRoundedRoot";var F=p("svg",function(e){var t=e.$size;return{width:f[t].width+"px",height:f[t].height+"px",position:"absolute",fill:"none"}});F.displayName="_StyledProgressBarRoundedSvg",F.displayName="_StyledProgressBarRoundedSvg",A(F,function(e){return function(t){return C.createElement(e,B({viewBox:"0 0 ".concat(f[t.$size].width," ").concat(f[t.$size].height),xmlns:"http://www.w3.org/2000/svg"},t))}});var W=p("path",function(e){var t=e.$theme,r=e.$size;return{stroke:t.colors.backgroundTertiary,strokeWidth:f[r].strokeWidth+"px"}});W.displayName="_StyledProgressBarRoundedTrackBackground",W.displayName="_StyledProgressBarRoundedTrackBackground",A(W,function(e){return function(t){return C.createElement(e,B({d:f[t.$size].d},t))}});var G=p("path",function(e){var t=e.$theme,r=e.$size,n=e.$visible,o=e.$pathLength,a=e.$pathProgress;return{visibility:n?"visible":"hidden",stroke:t.colors.borderAccent,strokeWidth:f[r].strokeWidth+"px",strokeDasharray:o,strokeDashoffset:o*(1-a)+""}});G.displayName="_StyledProgressBarRoundedTrackForeground",G.displayName="_StyledProgressBarRoundedTrackForeground",A(G,function(e){return function(t){return C.createElement(e,B({d:f[t.$size].d},t))}});var ie=p("div",function(e){var t=e.$theme,r=e.$size;return R({color:t.colors.contentPrimary},t.typography[f[r].typography])});ie.displayName="StyledProgressBarRoundedText",ie.displayName="StyledProgressBarRoundedText";function U(e){"@babel/helpers - typeof";return U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(e)}var Xe=["overrides","getProgressLabel","value","size","steps","successValue","minValue","maxValue","showLabel","infinite","errorMessage","forwardedRef"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}function S(e,t){return Ae(e)||Ee(e,t)||ze(e,t)||Ne()}function Ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{b2 as p,bF as ke,bG as A,R as C,r as d,b3 as P,M as Le,a6 as je,bA as xe,j as Ce,bq as Te}from"./index-lyJc68Dt.js";var h={small:"small",medium:"medium",large:"large"},$;function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(this,arguments)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){w(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oe(e){var t;return(t={},w(t,h.small,"2px"),w(t,h.medium,"4px"),w(t,h.large,"8px"),t)[e]}var M=p("div",function(e){return{width:"100%"}});M.displayName="StyledRoot",M.displayName="StyledRoot";var V=p("div",function(e){var t=e.$theme,r=t.sizing;return{display:"flex",marginLeft:r.scale500,marginRight:r.scale500,marginTop:r.scale500,marginBottom:r.scale500}});V.displayName="StyledBarContainer",V.displayName="StyledBarContainer";var _=p("div",function(e){var t=e.$theme,r=e.$size,n=e.$steps,o=t.colors,a=t.sizing,s=t.borders,i=s.useRoundedCorners?a.scale0:0;return R({borderTopLeftRadius:i,borderTopRightRadius:i,borderBottomRightRadius:i,borderBottomLeftRadius:i,backgroundColor:ke(o.progressbarTrackFill,"0.16"),height:oe(r),flex:1,overflow:"hidden"},n<2?{}:{marginLeft:a.scale300,":first-child":{marginLeft:"0"}})});_.displayName="StyledBar",_.displayName="StyledBar";var I=p("div",function(e){var t=e.$theme,r=e.$value,n=e.$successValue,o=e.$steps,a=e.$index,s=e.$maxValue,i=e.$minValue,u=i===void 0?0:i,l=s||n,O=t.colors,y=t.sizing,k=t.borders,X="".concat(100-(r-u)*100/(l-u),"%"),c={default:"default",awaits:"awaits",inProgress:"inProgress",completed:"completed"},b=c.default;if(o>1){var N=(l-u)/o,z=(r-u)/(l-u)*100,L=Math.floor(z/N);a<L?b=c.completed:a===L?b=c.inProgress:b=c.awaits}var g=k.useRoundedCorners?y.scale0:0,E={transform:"translateX(-".concat(X,")")},j=b===c.inProgress?{animationDuration:"2.1s",animationIterationCount:"infinite",animationTimingFunction:t.animation.linearCurve,animationName:{"0%":{transform:"translateX(-102%)",opacity:1},"50%":{transform:"translateX(0%)",opacity:1},"100%":{transform:"translateX(0%)",opacity:0}}}:b===c.completed?{transform:"translateX(0%)"}:{transform:"translateX(-102%)"};return R({borderTopLeftRadius:g,borderTopRightRadius:g,borderBottomRightRadius:g,borderBottomLeftRadius:g,backgroundColor:O.accent,height:"100%",width:"100%",transform:"translateX(-102%)",transition:"transform 0.5s"},o>1?j:E)});I.displayName="StyledBarProgress",I.displayName="StyledBarProgress";var D=p("div",function(e){var t=e.$theme,r=e.$isLeft,n=r===void 0?!1:r,o=e.$size,a=o===void 0?h.medium:o,s=t.colors,i=t.sizing,u=t.borders,l=u.useRoundedCorners?i.scale0:0,O=oe(a),y={display:"inline-block",flex:1,marginLeft:"auto",marginRight:"auto",transitionProperty:"background-position",animationDuration:"1.5s",animationIterationCount:"infinite",animationTimingFunction:t.animation.linearCurve,backgroundSize:"300% auto",backgroundRepeat:"no-repeat",backgroundPositionX:n?"-50%":"150%",backgroundImage:"linear-gradient(".concat(n?"90":"270","deg, transparent 0%, ").concat(s.accent," 25%, ").concat(s.accent," 75%, transparent 100%)"),animationName:n?{"0%":{backgroundPositionX:"-50%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"150%"}}:{"0%":{backgroundPositionX:"150%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"-50%"}}};return R(R({},n?{borderTopLeftRadius:l,borderBottomLeftRadius:l}:{borderTopRightRadius:l,borderBottomRightRadius:l}),{},{height:O},y)});D.displayName="StyledInfiniteBar",D.displayName="StyledInfiniteBar";var H=p("div",function(e){return R(R({textAlign:"center"},e.$theme.typography.font150),{},{color:e.$theme.colors.contentTertiary})});H.displayName="StyledLabel",H.displayName="StyledLabel";var f=($={},w($,h.large,{d:"M47.5 4H71.5529C82.2933 4 91 12.9543 91 24C91 35.0457 82.2933 44 71.5529 44H23.4471C12.7067 44 4 35.0457 4 24C4 12.9543 12.7067 4 23.4471 4H47.5195",width:95,height:48,strokeWidth:8,typography:"LabelLarge"}),w($,h.medium,{d:"M39 2H60.5833C69.0977 2 76 9.16344 76 18C76 26.8366 69.0977 34 60.5833 34H17.4167C8.90228 34 2 26.8366 2 18C2 9.16344 8.90228 2 17.4167 2H39.0195",width:78,height:36,strokeWidth:4,typography:"LabelMedium"}),w($,h.small,{d:"M32 1H51.6271C57.9082 1 63 6.37258 63 13C63 19.6274 57.9082 25 51.6271 25H12.3729C6.09181 25 1 19.6274 1 13C1 6.37258 6.09181 1 12.3729 1H32.0195",width:64,height:26,strokeWidth:2,typography:"LabelSmall"}),$),ae=p("div",function(e){var t=e.$size,r=e.$inline;return{width:f[t].width+"px",height:f[t].height+"px",position:"relative",display:r?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}});ae.displayName="StyledProgressBarRoundedRoot",ae.displayName="StyledProgressBarRoundedRoot";var F=p("svg",function(e){var t=e.$size;return{width:f[t].width+"px",height:f[t].height+"px",position:"absolute",fill:"none"}});F.displayName="_StyledProgressBarRoundedSvg",F.displayName="_StyledProgressBarRoundedSvg",A(F,function(e){return function(t){return C.createElement(e,B({viewBox:"0 0 ".concat(f[t.$size].width," ").concat(f[t.$size].height),xmlns:"http://www.w3.org/2000/svg"},t))}});var W=p("path",function(e){var t=e.$theme,r=e.$size;return{stroke:t.colors.backgroundTertiary,strokeWidth:f[r].strokeWidth+"px"}});W.displayName="_StyledProgressBarRoundedTrackBackground",W.displayName="_StyledProgressBarRoundedTrackBackground",A(W,function(e){return function(t){return C.createElement(e,B({d:f[t.$size].d},t))}});var G=p("path",function(e){var t=e.$theme,r=e.$size,n=e.$visible,o=e.$pathLength,a=e.$pathProgress;return{visibility:n?"visible":"hidden",stroke:t.colors.borderAccent,strokeWidth:f[r].strokeWidth+"px",strokeDasharray:o,strokeDashoffset:o*(1-a)+""}});G.displayName="_StyledProgressBarRoundedTrackForeground",G.displayName="_StyledProgressBarRoundedTrackForeground",A(G,function(e){return function(t){return C.createElement(e,B({d:f[t.$size].d},t))}});var ie=p("div",function(e){var t=e.$theme,r=e.$size;return R({color:t.colors.contentPrimary},t.typography[f[r].typography])});ie.displayName="StyledProgressBarRoundedText",ie.displayName="StyledProgressBarRoundedText";function U(e){"@babel/helpers - typeof";return U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(e)}var Xe=["overrides","getProgressLabel","value","size","steps","successValue","minValue","maxValue","showLabel","infinite","errorMessage","forwardedRef"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}function S(e,t){return Ae(e)||Ee(e,t)||ze(e,t)||Ne()}function Ne(){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 ze(e,t){if(e){if(typeof e=="string")return se(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return se(e,t)}}function se(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ee(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,s,i;try{for(r=r.call(e);!(o=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));o=!0);}catch(u){a=!0,i=u}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw i}}return n}}function Ae(e){if(Array.isArray(e))return e}function Me(e,t){if(e==null)return{};var r=Ve(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ve(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function _e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function De(e,t,r){return Ie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function He(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},q(e,t)}function Fe(e){var t=Ue();return function(){var r=T(e),n;if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return We(this,n)}}function We(e,t){if(t&&(U(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ge(e)}function Ge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ue(){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 T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},T(e)}function qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ue=function(e){He(r,e);var t=Fe(r);function r(){return _e(this,r),t.apply(this,arguments)}return De(r,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var n=this.props,o=n.overrides,a=o===void 0?{}:o,s=n.getProgressLabel,i=n.value,u=n.size,l=n.steps,O=n.successValue,y=n.minValue,k=n.maxValue,X=n.showLabel,c=n.infinite,b=n.errorMessage,N=n.forwardedRef,z=Me(n,Xe),L=this.props["aria-label"]||this.props.ariaLabel,g=k!==100?k:O,E=P(a.Root,M),j=S(E,2),de=j[0],pe=j[1],fe=P(a.BarContainer,V),J=S(fe,2),ge=J[0],me=J[1],ye=P(a.Bar,_),Z=S(ye,2),be=Z[0],he=Z[1],ve=P(a.BarProgress,I),K=S(ve,2),Re=K[0],we=K[1],Pe=P(a.Label,H),Q=S(Pe,2),Se=Q[0],Oe=Q[1],$e=P(a.InfiniteBar,D),Y=S($e,2),ee=Y[0],te=Y[1],v={$infinite:c,$size:u,$steps:l,$successValue:g,$minValue:y,$maxValue:g,$value:i};function Be(){for(var re=[],x=0;x<l;x++)re.push(d.createElement(be,m({key:x},v,he),d.createElement(Re,m({$index:x},v,we))));return re}return d.createElement(de,m({ref:N,"data-baseweb":"progress-bar",role:"progressbar","aria-label":L||s(i,g,y),"aria-valuenow":c?null:i,"aria-valuemin":c?null:y,"aria-valuemax":c?null:g,"aria-invalid":b?!0:null,"aria-errormessage":b},z,v,pe),d.createElement(ge,m({},v,me),c?d.createElement(d.Fragment,null,d.createElement(ee,m({$isLeft:!0,$size:v.$size},te)),d.createElement(ee,m({$size:v.$size},te))):Be()),X&&d.createElement(Se,m({},v,Oe),s(i,g,y)))}}]),r}(d.Component);qe(ue,"defaultProps",{getProgressLabel:function(e,t,r){return"".concat(Math.round((e-r)/(t-r)*100),"% Loaded")},infinite:!1,overrides:{},showLabel:!1,size:h.medium,steps:1,successValue:100,minValue:0,maxValue:100,value:0});var le=d.forwardRef(function(e,t){return d.createElement(ue,m({forwardedRef:t},e))});le.displayName="ProgressBar";var ce=(e=>(e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl",e))(ce||{});function Je({value:e,width:t,size:r="sm",overrides:n}){const o=Le(),a={xs:o.spacing.twoXS,sm:o.spacing.sm,md:o.spacing.lg,lg:o.spacing.xl,xl:o.spacing.twoXL},{activeTheme:s}=C.useContext(je),i=!xe(s),u={BarContainer:{style:{marginTop:o.spacing.none,marginBottom:o.spacing.none,marginRight:o.spacing.none,marginLeft:o.spacing.none}},Bar:{style:({$theme:l})=>({width:t?t.toString():void 0,marginTop:o.spacing.none,marginBottom:o.spacing.none,marginRight:o.spacing.none,marginLeft:o.spacing.none,height:a[r],backgroundColor:l.colors.progressbarTrackFill,borderTopLeftRadius:o.spacing.twoXS,borderTopRightRadius:o.spacing.twoXS,borderBottomLeftRadius:o.spacing.twoXS,borderBottomRightRadius:o.spacing.twoXS})},BarProgress:{style:()=>({backgroundColor:i?o.colors.primary:o.colors.blue70,borderTopLeftRadius:o.spacing.twoXS,borderTopRightRadius:o.spacing.twoXS,borderBottomLeftRadius:o.spacing.twoXS,borderBottomRightRadius:o.spacing.twoXS})}};return Ce.jsx(le,{value:e,overrides:Te(u,n)})}export{Je as P,ce as S};
@@ -1 +1 @@
1
- import{c as o,r,j as t,a as l,P as d,b as p}from"./index-DuoBWGu3.js";const P=o("div",{target:"ecnfqzf0"})({name:"my9yfq",styles:"@media print{display:none;}"}),f=({className:a,scriptRunId:e,numParticles:s,numParticleTypes:n,ParticleComponent:c})=>t.jsx(P,{className:a,"data-testid":a,children:l(s).map(m=>{const i=Math.floor(Math.random()*n);return t.jsx(c,{particleType:i},e+m)})}),u=r.memo(f),x=({children:a})=>{var s;const e=(s=r.useContext(d))==null?void 0:s();return e?p.createPortal(a,e):t.jsx(t.Fragment,{children:a})};export{u as P,x as R};
1
+ import{c as o,r,j as t,a as l,P as d,b as p}from"./index-lyJc68Dt.js";const P=o("div",{target:"ecnfqzf0"})({name:"my9yfq",styles:"@media print{display:none;}"}),f=({className:a,scriptRunId:e,numParticles:s,numParticleTypes:n,ParticleComponent:c})=>t.jsx(P,{className:a,"data-testid":a,children:l(s).map(m=>{const i=Math.floor(Math.random()*n);return t.jsx(c,{particleType:i},e+m)})}),u=r.memo(f),x=({children:a})=>{var s;const e=(s=r.useContext(d))==null?void 0:s();return e?p.createPortal(a,e):t.jsx(t.Fragment,{children:a})};export{u as P,x as R};
@@ -1 +1 @@
1
- import{r as a,E as m,_ as p,c,a5 as f,M as u,j as i,b1 as g,a2 as w,aK as b,aX as z,aG as E,aY as y}from"./index-DuoBWGu3.js";var v=a.forwardRef(function(e,n){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:n}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))});v.displayName="Fullscreen";var x=a.forwardRef(function(e,n){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:n}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))});x.displayName="FullscreenExit";const d="-2.4rem",j=c("div",{target:"e2wxzia2"})(({theme:e,locked:n,target:t})=>({padding:`${e.spacing.sm} 0 ${e.spacing.sm} ${e.spacing.sm}`,position:"absolute",top:n?d:"-1rem",right:e.spacing.none,transition:"none",...!n&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:d},...t&&{[`${t}:hover &, ${t}:active &, ${t}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:d}}}}),""),C=c("div",{target:"e2wxzia1"})(({theme:e})=>({color:f(e)?e.colors.fadedText60:e.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:e.radii.default,backgroundColor:e.colors.lightenedBg05,width:"fit-content",zIndex:e.zIndices.sidebar+1}),""),V=c("div",{target:"e2wxzia0"})(({width:e,height:n,useContainerWidth:t,topCentered:o})=>({position:"relative",height:t&&n?n:"fit-content",width:t?e:"fit-content",maxWidth:"100%",...o?{display:"flex",justifyContent:"center"}:{}}),"");function h({label:e,show_label:n,icon:t,onClick:o}){const r=u(),s=n?e:"";return i.jsx("div",{"data-testid":"stElementToolbarButton",children:i.jsx(g,{content:i.jsx(w,{source:e,allowHTML:!1,style:{fontSize:r.fontSizes.sm}}),placement:b.TOP,onMouseEnterDelay:1e3,inline:!0,children:i.jsxs(z,{onClick:l=>{o&&o(),l.stopPropagation()},kind:E.ELEMENT_TOOLBAR,"aria-label":e,children:[t&&i.jsx(y,{content:t,size:"md",testid:"stElementToolbarButtonIcon"}),s&&i.jsx("span",{children:s})]})})})}const T=({onExpand:e,onCollapse:n,isFullScreen:t,locked:o,children:r,target:s,disableFullscreenMode:l})=>i.jsx(j,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:o||t,target:s,children:i.jsxs(C,{children:[r,e&&!l&&!t&&i.jsx(h,{label:"Fullscreen",icon:v,onClick:()=>e()}),n&&!l&&t&&i.jsx(h,{label:"Close fullscreen",icon:x,onClick:()=>n()})]})});export{V as S,T,h as a};
1
+ import{r as a,E as m,_ as p,c,a5 as f,M as u,j as i,b1 as g,a2 as w,aK as b,aX as z,aG as E,aY as y}from"./index-lyJc68Dt.js";var v=a.forwardRef(function(e,n){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:n}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))});v.displayName="Fullscreen";var x=a.forwardRef(function(e,n){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:n}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))});x.displayName="FullscreenExit";const d="-2.4rem",j=c("div",{target:"e2wxzia2"})(({theme:e,locked:n,target:t})=>({padding:`${e.spacing.sm} 0 ${e.spacing.sm} ${e.spacing.sm}`,position:"absolute",top:n?d:"-1rem",right:e.spacing.none,transition:"none",...!n&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:d},...t&&{[`${t}:hover &, ${t}:active &, ${t}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:d}}}}),""),C=c("div",{target:"e2wxzia1"})(({theme:e})=>({color:f(e)?e.colors.fadedText60:e.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:e.radii.default,backgroundColor:e.colors.lightenedBg05,width:"fit-content",zIndex:e.zIndices.sidebar+1}),""),V=c("div",{target:"e2wxzia0"})(({width:e,height:n,useContainerWidth:t,topCentered:o})=>({position:"relative",height:t&&n?n:"fit-content",width:t?e:"fit-content",maxWidth:"100%",...o?{display:"flex",justifyContent:"center"}:{}}),"");function h({label:e,show_label:n,icon:t,onClick:o}){const r=u(),s=n?e:"";return i.jsx("div",{"data-testid":"stElementToolbarButton",children:i.jsx(g,{content:i.jsx(w,{source:e,allowHTML:!1,style:{fontSize:r.fontSizes.sm}}),placement:b.TOP,onMouseEnterDelay:1e3,inline:!0,children:i.jsxs(z,{onClick:l=>{o&&o(),l.stopPropagation()},kind:E.ELEMENT_TOOLBAR,"aria-label":e,children:[t&&i.jsx(y,{content:t,size:"md",testid:"stElementToolbarButtonIcon"}),s&&i.jsx("span",{children:s})]})})})}const T=({onExpand:e,onCollapse:n,isFullScreen:t,locked:o,children:r,target:s,disableFullscreenMode:l})=>i.jsx(j,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:o||t,target:s,children:i.jsxs(C,{children:[r,e&&!l&&!t&&i.jsx(h,{label:"Fullscreen",icon:v,onClick:()=>e()}),n&&!l&&t&&i.jsx(h,{label:"Close fullscreen",icon:x,onClick:()=>n()})]})});export{V as S,T,h as a};
@@ -1,4 +1,4 @@
1
- import{r as b,bk as Q,bl as X,bm as Y,bn as Z,b2 as P,bJ as u,bL as be,bM as T,bd as ee,bK as D,b3 as w,bt as re,bu as te}from"./index-DuoBWGu3.js";var ye=["title","size","color","overrides"];function A(){return A=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},A.apply(this,arguments)}function ge(e,r){if(e==null)return{};var t=he(e,r),o,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(t[o]=e[o])}return t}function he(e,r){if(e==null)return{};var t={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(r.indexOf(n)>=0)&&(t[n]=e[n]);return t}function me(e,r){return we(e)||Oe(e,r)||Ce(e,r)||ve()}function ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as b,bk as Q,bl as X,bm as Y,bn as Z,b2 as P,bJ as u,bL as be,bM as T,bd as ee,bK as D,b3 as w,bt as re,bu as te}from"./index-lyJc68Dt.js";var ye=["title","size","color","overrides"];function A(){return A=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},A.apply(this,arguments)}function ge(e,r){if(e==null)return{};var t=he(e,r),o,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(t[o]=e[o])}return t}function he(e,r){if(e==null)return{};var t={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(r.indexOf(n)>=0)&&(t[n]=e[n]);return t}function me(e,r){return we(e)||Oe(e,r)||Ce(e,r)||ve()}function ve(){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 Ce(e,r){if(e){if(typeof e=="string")return oe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return oe(e,r)}}function oe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}function Oe(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var o=[],n=!0,i=!1,a,l;try{for(t=t.call(e);!(n=(a=t.next()).done)&&(o.push(a.value),!(r&&o.length===r));n=!0);}catch(s){i=!0,l=s}finally{try{!n&&t.return!=null&&t.return()}finally{if(i)throw l}}return o}}function we(e){if(Array.isArray(e))return e}function Fe(e,r){var t=Q(),o=me(t,2),n=o[1],i=e.title,a=i===void 0?"Hide":i,l=e.size,s=e.color,c=e.overrides,p=c===void 0?{}:c,y=ge(e,ye),h=X({component:n.icons&&n.icons.Hide?n.icons.Hide:null},p&&p.Svg?Y(p.Svg):{});return b.createElement(Z,A({viewBox:"0 0 20 20",ref:r,title:a,size:l,color:s,overrides:{Svg:h}},y),b.createElement("path",{d:"M12.81 4.36l-1.77 1.78a4 4 0 00-4.9 4.9l-2.76 2.75C2.06 12.79.96 11.49.2 10a11 11 0 0112.6-5.64zm3.8 1.85c1.33 1 2.43 2.3 3.2 3.79a11 11 0 01-12.62 5.64l1.77-1.78a4 4 0 004.9-4.9l2.76-2.75zm-.25-3.99l1.42 1.42L3.64 17.78l-1.42-1.42L16.36 2.22z"}))}const Se=b.forwardRef(Fe);var ke=["title","size","color","overrides"];function V(){return V=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},V.apply(this,arguments)}function xe(e,r){if(e==null)return{};var t=Pe(e,r),o,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(t[o]=e[o])}return t}function Pe(e,r){if(e==null)return{};var t={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(r.indexOf(n)>=0)&&(t[n]=e[n]);return t}function Te(e,r){return Be(e)||$e(e,r)||Re(e,r)||je()}function je(){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 Re(e,r){if(e){if(typeof e=="string")return ne(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ne(e,r)}}function ne(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}function $e(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var o=[],n=!0,i=!1,a,l;try{for(t=t.call(e);!(n=(a=t.next()).done)&&(o.push(a.value),!(r&&o.length===r));n=!0);}catch(s){i=!0,l=s}finally{try{!n&&t.return!=null&&t.return()}finally{if(i)throw l}}return o}}function Be(e){if(Array.isArray(e))return e}function Ee(e,r){var t=Q(),o=Te(t,2),n=o[1],i=e.title,a=i===void 0?"Show":i,l=e.size,s=e.color,c=e.overrides,p=c===void 0?{}:c,y=xe(e,ke),h=X({component:n.icons&&n.icons.Show?n.icons.Show:null},p&&p.Svg?Y(p.Svg):{});return b.createElement(Z,V({viewBox:"0 0 20 20",ref:r,title:a,size:l,color:s,overrides:{Svg:h}},y),b.createElement("path",{d:"M.2 10a11 11 0 0119.6 0A11 11 0 01.2 10zm9.8 4a4 4 0 100-8 4 4 0 000 8zm0-2a2 2 0 110-4 2 2 0 010 4z"}))}const Ie=b.forwardRef(Ee);function K(e,r){var t=e.disabled,o=e.error,n=e.positive,i=e.adjoined,a=e.size,l=e.required,s=e.resize,c=e.readOnly,p=r.isFocused;return{$isFocused:p,$disabled:t,$error:o,$positive:n,$adjoined:i,$size:a,$required:l,$resize:s,$isReadOnly:c}}function ie(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function g(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ie(Object(t),!0).forEach(function(o){d(e,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(t,o))})}return e}function d(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var N=P("button",function(e){var r,t=e.$theme,o=e.$size,n=e.$isFocusVisible,i=(r={},d(r,u.mini,t.sizing.scale400),d(r,u.compact,t.sizing.scale400),d(r,u.default,t.sizing.scale300),d(r,u.large,t.sizing.scale200),r)[o];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:i,paddingRight:i,outline:n?"solid 3px ".concat(t.colors.accent):"none",color:t.colors.contentPrimary}});N.displayName="StyledMaskToggleButton",N.displayName="StyledMaskToggleButton";var W=P("div",function(e){var r,t=e.$alignTop,o=t===void 0?!1:t,n=e.$size,i=e.$theme,a=(r={},d(r,u.mini,i.sizing.scale200),d(r,u.compact,i.sizing.scale200),d(r,u.default,i.sizing.scale100),d(r,u.large,i.sizing.scale0),r)[n];return{display:"flex",alignItems:o?"flex-start":"center",paddingLeft:a,paddingRight:a,paddingTop:o?i.sizing.scale500:"0px",color:i.colors.contentPrimary}});W.displayName="StyledClearIconContainer",W.displayName="StyledClearIconContainer";var _=P(be,function(e){var r=e.$theme,t=e.$isFocusVisible;return{cursor:"pointer",outline:t?"solid 3px ".concat(r.colors.accent):"none"}});_.displayName="StyledClearIcon",_.displayName="StyledClearIcon";function ze(e,r){var t;return(t={},d(t,u.mini,{paddingTop:r.scale100,paddingBottom:r.scale100,paddingLeft:r.scale550,paddingRight:r.scale550}),d(t,u.compact,{paddingTop:r.scale200,paddingBottom:r.scale200,paddingLeft:r.scale550,paddingRight:r.scale550}),d(t,u.default,{paddingTop:r.scale400,paddingBottom:r.scale400,paddingLeft:r.scale550,paddingRight:r.scale550}),d(t,u.large,{paddingTop:r.scale550,paddingBottom:r.scale550,paddingLeft:r.scale550,paddingRight:r.scale550}),t)[e]}function Me(e,r,t,o,n){var i=e===T.both||e===T.left&&o!=="rtl"||e===T.right&&o==="rtl"||n&&o==="rtl",a=e===T.both||e===T.right&&o!=="rtl"||e===T.left&&o==="rtl"||n&&o!=="rtl";return{paddingLeft:i?t.scale550:"0px",paddingRight:a?t.scale550:"0px"}}function I(e,r){var t;return(t={},d(t,u.mini,r.font100),d(t,u.compact,r.font200),d(t,u.default,r.font300),d(t,u.large,r.font400),t)[e]}function Le(e,r,t){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,n=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:n.inputFillDisabled,borderRightColor:n.inputFillDisabled,borderTopColor:n.inputFillDisabled,borderBottomColor:n.inputFillDisabled,backgroundColor:n.inputFillDisabled}:r?{borderLeftColor:n.borderSelected,borderRightColor:n.borderSelected,borderTopColor:n.borderSelected,borderBottomColor:n.borderSelected,backgroundColor:n.inputFillActive}:t?{borderLeftColor:n.inputBorderError,borderRightColor:n.inputBorderError,borderTopColor:n.inputBorderError,borderBottomColor:n.inputBorderError,backgroundColor:n.inputFillError}:o?{borderLeftColor:n.inputBorderPositive,borderRightColor:n.inputBorderPositive,borderTopColor:n.inputBorderPositive,borderBottomColor:n.inputBorderPositive,backgroundColor:n.inputFillPositive}:{borderLeftColor:n.inputBorder,borderRightColor:n.inputBorder,borderTopColor:n.inputBorder,borderBottomColor:n.inputBorder,backgroundColor:n.inputFill}}function De(e,r){var t=r.inputBorderRadius;return e===u.mini&&(t=r.inputBorderRadiusMini),{borderTopLeftRadius:t,borderBottomLeftRadius:t,borderTopRightRadius:t,borderBottomRightRadius:t}}var ae=function(e){var r=e.$isFocused,t=e.$adjoined,o=e.$error,n=e.$disabled,i=e.$positive,a=e.$size,l=e.$theme,s=e.$theme,c=s.borders,p=s.colors,y=s.sizing,h=s.typography,C=s.animation,S=e.$hasIconTrailing;return g(g(g(g({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:C.timing200,transitionTimingFunction:C.easeOutCurve},De(a,c)),I(a,h)),Le(n,r,o,i,p)),Me(t,a,y,l.direction,S))},q=P("div",ae);q.displayName="Root",q.displayName="Root";function Ae(e,r){var t;return(t={},d(t,u.mini,{paddingRight:r.scale400,paddingLeft:r.scale400}),d(t,u.compact,{paddingRight:r.scale400,paddingLeft:r.scale400}),d(t,u.default,{paddingRight:r.scale300,paddingLeft:r.scale300}),d(t,u.large,{paddingRight:r.scale200,paddingLeft:r.scale200}),t)[e]}function Ve(e,r,t,o,n){return e?{color:n.inputEnhancerTextDisabled,backgroundColor:n.inputFillDisabled}:r?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:t?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}var H=P("div",function(e){var r=e.$size,t=e.$disabled,o=e.$isFocused,n=e.$error,i=e.$positive,a=e.$theme,l=a.colors,s=a.sizing,c=a.typography,p=a.animation;return g(g(g({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:p.timing200,transitionTimingFunction:p.easeOutCurve},I(r,c)),Ae(r,s)),Ve(t,o,n,i,l))});H.displayName="InputEnhancer",H.displayName="InputEnhancer";function Ke(e,r,t,o,n){return e?{color:n.inputTextDisabled,backgroundColor:n.inputFillDisabled}:r?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:t?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}var le=function(e){var r=e.$isFocused,t=e.$error,o=e.$disabled,n=e.$positive,i=e.$size,a=e.$theme,l=a.colors,s=a.typography,c=a.animation;return g(g({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:c.timing200,transitionTimingFunction:c.easeOutCurve},I(i,s)),Ke(o,r,t,n,l))},U=P("div",le);U.displayName="InputContainer",U.displayName="InputContainer";function Ne(e,r,t,o){return e?{color:o.inputTextDisabled,"-webkit-text-fill-color":o.inputTextDisabled,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholderDisabled}}:{color:o.contentPrimary,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholder}}}var se=function(e){var r=e.$disabled,t=e.$isFocused,o=e.$error,n=e.$size,i=e.$theme,a=i.colors,l=i.sizing,s=i.typography;return g(g(g({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:r?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},I(n,s)),ze(n,l)),Ne(r,t,o,a))},z=P("input",se);z.displayName="Input",z.displayName="Input";function We(e){var r;return typeof window.Event=="function"?r=new window.Event(e,{bubbles:!0,cancelable:!0}):(r=document.createEvent("Event"),r.initEvent(e,!0,!0)),r}function J(e){"@babel/helpers - typeof";return J=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},J(e)}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},m.apply(this,arguments)}function F(e,r){return Ue(e)||He(e,r)||qe(e,r)||_e()}function _e(){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 qe(e,r){if(e){if(typeof e=="string")return ue(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ue(e,r)}}function ue(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}function He(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var o=[],n=!0,i=!1,a,l;try{for(t=t.call(e);!(n=(a=t.next()).done)&&(o.push(a.value),!(r&&o.length===r));n=!0);}catch(s){i=!0,l=s}finally{try{!n&&t.return!=null&&t.return()}finally{if(i)throw l}}return o}}function Ue(e){if(Array.isArray(e))return e}function Je(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ge(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Qe(e,r,t){return Ge(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xe(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&&G(e,r)}function G(e,r){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},G(e,r)}function Ye(e){var r=er();return function(){var t=M(e),o;if(r){var n=M(this).constructor;o=Reflect.construct(t,arguments,n)}else o=t.apply(this,arguments);return Ze(this,o)}}function Ze(e,r){if(r&&(J(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function er(){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 M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},M(e)}function f(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var ce=function(){return null},pe=function(e){Xe(t,e);var r=Ye(t);function t(){var o;Je(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return o=r.call.apply(r,[this].concat(i)),f(v(o),"inputRef",o.props.inputRef||b.createRef()),f(v(o),"state",{isFocused:o.props.autoFocus||!1,isMasked:o.props.type==="password",initialType:o.props.type,isFocusVisibleForClear:!1,isFocusVisibleForMaskToggle:!1}),f(v(o),"onInputKeyDown",function(l){o.props.clearOnEscape&&l.key==="Escape"&&o.inputRef.current&&!o.props.readOnly&&(o.clearValue(),l.stopPropagation())}),f(v(o),"onClearIconClick",function(){o.inputRef.current&&o.clearValue(),o.inputRef.current&&o.inputRef.current.focus()}),f(v(o),"onFocus",function(l){o.setState({isFocused:!0}),o.props.onFocus(l)}),f(v(o),"onBlur",function(l){o.setState({isFocused:!1}),o.props.onBlur(l)}),f(v(o),"handleFocusForMaskToggle",function(l){ee(l)&&o.setState({isFocusVisibleForMaskToggle:!0})}),f(v(o),"handleBlurForMaskToggle",function(l){o.state.isFocusVisibleForMaskToggle!==!1&&o.setState({isFocusVisibleForMaskToggle:!1})}),f(v(o),"handleFocusForClear",function(l){ee(l)&&o.setState({isFocusVisibleForClear:!0})}),f(v(o),"handleBlurForClear",function(l){o.state.isFocusVisibleForClear!==!1&&o.setState({isFocusVisibleForClear:!1})}),o}return Qe(t,[{key:"componentDidMount",value:function(){var o=this.props,n=o.autoFocus,i=o.clearable;this.inputRef.current&&(n&&this.inputRef.current.focus(),i&&this.inputRef.current.addEventListener("keydown",this.onInputKeyDown))}},{key:"componentWillUnmount",value:function(){var o=this.props.clearable;o&&this.inputRef.current&&this.inputRef.current.removeEventListener("keydown",this.onInputKeyDown)}},{key:"clearValue",value:function(){var o=this.inputRef.current;if(o){var n=Object.getOwnPropertyDescriptor(this.props.type===D.textarea?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,"value");if(n){var i=n.set;if(i){i.call(o,"");var a=We("input");o.dispatchEvent(a)}}}}},{key:"getInputType",value:function(){return this.props.type==="password"?this.state.isMasked?"password":"text":this.props.type}},{key:"renderMaskToggle",value:function(){var o,n=this;if(this.props.type!=="password")return null;var i=w(this.props.overrides.MaskToggleButton,N),a=F(i,2),l=a[0],s=a[1],c=w(this.props.overrides.MaskToggleShowIcon,Ie),p=F(c,2),y=p[0],h=p[1],C=w(this.props.overrides.MaskToggleHideIcon,Se),S=F(C,2),j=S[0],$=S[1],O=this.state.isMasked?"Show password text":"Hide password text",R=(o={},f(o,u.mini,"12px"),f(o,u.compact,"16px"),f(o,u.default,"20px"),f(o,u.large,"24px"),o)[this.props.size];return b.createElement(l,m({$size:this.props.size,$isFocusVisible:this.state.isFocusVisibleForMaskToggle,"aria-label":O,onClick:function(){return n.setState(function(k){return{isMasked:!k.isMasked}})},title:O,type:"button"},s,{onFocus:re(s,this.handleFocusForMaskToggle),onBlur:te(s,this.handleBlurForMaskToggle)}),this.state.isMasked?b.createElement(y,m({size:R,title:O},h)):b.createElement(j,m({size:R,title:O},$)))}},{key:"renderClear",value:function(){var o,n=this,i=this.props,a=i.clearable,l=i.value,s=i.disabled,c=i.readOnly,p=i.overrides,y=p===void 0?{}:p;if(s||c||!a||l==null||typeof l=="string"&&l.length===0)return null;var h=w(y.ClearIconContainer,W),C=F(h,2),S=C[0],j=C[1],$=w(y.ClearIcon,_),O=F($,2),R=O[0],k=O[1],B="Clear value",E=K(this.props,this.state),L=(o={},f(o,u.mini,"14px"),f(o,u.compact,"14px"),f(o,u.default,"16px"),f(o,u.large,"22px"),o)[this.props.size];return b.createElement(S,m({$alignTop:this.props.type===D.textarea},E,j),b.createElement(R,m({size:L,tabIndex:0,title:B,"aria-label":B,onClick:this.onClearIconClick,onKeyDown:function(x){x.key&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),n.onClearIconClick())},role:"button",$isFocusVisible:this.state.isFocusVisibleForClear},E,k,{onFocus:re(k,this.handleFocusForClear),onBlur:te(k,this.handleBlurForClear)})))}},{key:"render",value:function(){var o=this.props.overrides,n=o.InputContainer,i=o.Input,a=o.Before,l=o.After,s=this.state.initialType==="password"&&this.props.autoComplete===t.defaultProps.autoComplete?"new-password":this.props.autoComplete,c=K(this.props,this.state),p=w(n,U),y=F(p,2),h=y[0],C=y[1],S=w(i,z),j=F(S,2),$=j[0],O=j[1],R=w(a,ce),k=F(R,2),B=k[0],E=k[1],L=w(l,ce),x=F(L,2),de=x[0],fe=x[1];return b.createElement(h,m({"data-baseweb":this.props["data-baseweb"]||"base-input"},c,C),b.createElement(B,m({},c,E)),b.createElement($,m({ref:this.inputRef,"aria-activedescendant":this.props["aria-activedescendant"],"aria-autocomplete":this.props["aria-autocomplete"],"aria-controls":this.props["aria-controls"],"aria-errormessage":this.props["aria-errormessage"],"aria-haspopup":this.props["aria-haspopup"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"],"aria-invalid":this.props.error,"aria-required":this.props.required,autoComplete:s,disabled:this.props.disabled,readOnly:this.props.readOnly,id:this.props.id,inputMode:this.props.inputMode,maxLength:this.props.maxLength,name:this.props.name,onBlur:this.onBlur,onChange:this.props.onChange,onFocus:this.onFocus,onKeyDown:this.props.onKeyDown,onKeyPress:this.props.onKeyPress,onKeyUp:this.props.onKeyUp,pattern:this.props.pattern,placeholder:this.props.placeholder,type:this.getInputType(),required:this.props.required,role:this.props.role,value:this.props.value,min:this.props.min,max:this.props.max,step:this.props.step,rows:this.props.type===D.textarea?this.props.rows:null},c,O)),this.renderClear(),this.renderMaskToggle(),b.createElement(de,m({},c,fe)))}}]),t}(b.Component);f(pe,"defaultProps",{"aria-activedescendant":null,"aria-autocomplete":null,"aria-controls":null,"aria-errormessage":null,"aria-haspopup":null,"aria-label":null,"aria-labelledby":null,"aria-describedby":null,adjoined:T.none,autoComplete:"on",autoFocus:!1,disabled:!1,error:!1,positive:!1,name:"",inputMode:"text",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},onClear:function(){},clearable:!1,clearOnEscape:!0,overrides:{},pattern:null,placeholder:"",required:!1,role:null,size:u.default,type:"text",readOnly:!1});export{pe as B,z as I,q as R,le as a,se as b,H as c,K as d,ae as g};
@@ -1 +1 @@
1
- import{c as e,d as u}from"./getPrototypeOf-CHt6AZp_.js";function f(){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 s(n){var c=f();return function(){var r=e(n),t;if(c){var o=e(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)}}export{s as _};
1
+ import{c as e,d as u}from"./getPrototypeOf-Bfvf6jYJ.js";function f(){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 s(n){var c=f();return function(){var r=e(n),t;if(c){var o=e(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)}}export{s as _};
@@ -1 +1 @@
1
- import{r,b as z}from"./index-DuoBWGu3.js";import{s as J,i as P,a as Q,b as U,T as Z,C as _,m as ee}from"./index-D7beHGbk.js";import"./FormClearHelper-BIZNCxvb.js";import"./withFullScreenWrapper-BzdPuFtI.js";import"./Toolbar-B1zMj-jg.js";import"./sprintf-C-r3gIuM.js";import"./createDownloadLinkElement-DZMwyjvU.js";import"./slicedToArray-CFP8r_hv.js";import"./getPrototypeOf-CHt6AZp_.js";import"./createSuper-D4gvBB5j.js";import"./FileDownload.esm-BP72wB_u.js";const te=()=>t=>t.targetX,re=()=>t=>t.targetY,ie=()=>t=>t.targetWidth,ae=()=>t=>t.targetHeight,ne=()=>t=>t.targetY+10,oe=()=>t=>Math.max(0,(t.targetHeight-28)/2),se=J("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[re(),"px"],"d19meir1-1":[te(),"px"],"d19meir1-2":[ie(),"px"],"d19meir1-3":[ae(),"px"],"d19meir1-4":[ne(),"px"],"d19meir1-5":[oe(),"px"]}});function de(){const[t,n]=r.useState();return[t??void 0,n]}function le(){const[t,n]=de(),[a,f]=r.useState(0),[v,C]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const o=new IntersectionObserver(s=>{s.length!==0&&C(s[0].isIntersecting)},{threshold:1});return o.observe(t),()=>o.disconnect()},[t]),r.useEffect(()=>{if(v||t===void 0)return;let o;const s=()=>{const{right:w}=t.getBoundingClientRect();f(p=>Math.min(p+window.innerWidth-w-10,0)),o=requestAnimationFrame(s)};return o=requestAnimationFrame(s),()=>{o!==void 0&&cancelAnimationFrame(o)}},[t,v]);const k=r.useMemo(()=>({transform:`translateX(${a}px)`}),[a]);return{ref:n,style:k}}const ce=t=>{const{target:n,content:a,onFinishEditing:f,forceEditMode:v,initialValue:C,imageEditorOverride:k,markdownDivCreateNode:o,highlight:s,className:w,theme:p,id:W,cell:x,bloom:u,validateCell:d,getCellRenderer:M,provideEditor:h,isOutsideClick:X}=t,[l,Y]=r.useState(v?a:void 0),O=r.useRef(l??a);O.current=l??a;const[y,N]=r.useState(()=>d===void 0?!0:!(P(a)&&(d==null?void 0:d(x,a,O.current))===!1)),m=r.useCallback((e,i)=>{f(y?e:void 0,i)},[y,f]),q=r.useCallback(e=>{if(d!==void 0&&e!==void 0&&P(e)){const i=d(x,e,O.current);i===!1?N(!1):(typeof i=="object"&&(e=i),N(!0))}Y(e)},[x,d]),b=r.useRef(!1),g=r.useRef(void 0),B=r.useCallback(()=>{m(l,[0,0]),b.current=!0},[l,m]),G=r.useCallback((e,i)=>{m(e,i??g.current??[0,0]),b.current=!0},[m]),j=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),g.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),g.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),g.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!b.current&&g.current!==void 0&&(m(i?l:void 0,g.current),b.current=!0)},0)},[m,l]),D=l??a,[c,I]=r.useMemo(()=>{var i,V;if(Q(a))return[];const e=h==null?void 0:h(a);return e!==void 0?[e,!1]:[(V=(i=M(a))==null?void 0:i.provideEditor)==null?void 0:V.call(i,a),!1]},[a,M,h]),{ref:L,style:$}=le();let R=!0,A,H=!0,E;if(c!==void 0){R=c.disablePadding!==!0,H=c.disableStyling!==!0;const e=U(c);e&&(E=c.styleOverride);const i=e?c.editor:c;A=r.createElement(i,{isHighlighted:s,onChange:q,value:D,initialValue:C,onFinishedEditing:G,validatedSelection:P(D)?D.selectionRange:void 0,forceEditMode:v,target:n,imageEditorOverride:k,markdownDivCreateNode:o,isValid:y,theme:p})}E={...E,...$};const F=document.getElementById("portal");if(F===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let S=H?"gdg-style":"gdg-unstyle";y||(S+=" gdg-invalid"),R&&(S+=" gdg-pad");const K=(u==null?void 0:u[0])??1,T=(u==null?void 0:u[1])??1;return z.createPortal(r.createElement(Z.Provider,{value:p},r.createElement(_,{style:ee(p),className:w,onClickOutside:B,isOutsideClick:X},r.createElement(se,{ref:L,id:W,className:S,style:E,as:I===!0?"label":void 0,targetX:n.x-K,targetY:n.y-T,targetWidth:n.width+K*2,targetHeight:n.height+T*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:j},A)))),F)};export{ce as default};
1
+ import{r,b as z}from"./index-lyJc68Dt.js";import{s as J,i as P,a as Q,b as U,T as Z,C as _,m as ee}from"./index-DVBTaPM3.js";import"./FormClearHelper-Dhc_r76k.js";import"./withFullScreenWrapper-BggmGF09.js";import"./Toolbar-BTpOoeAP.js";import"./sprintf-C-r3gIuM.js";import"./createDownloadLinkElement-DZMwyjvU.js";import"./slicedToArray-C3Kk8BEP.js";import"./getPrototypeOf-Bfvf6jYJ.js";import"./createSuper-D-IHZlzE.js";import"./FileDownload.esm-DJiSKkNf.js";const te=()=>t=>t.targetX,re=()=>t=>t.targetY,ie=()=>t=>t.targetWidth,ae=()=>t=>t.targetHeight,ne=()=>t=>t.targetY+10,oe=()=>t=>Math.max(0,(t.targetHeight-28)/2),se=J("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[re(),"px"],"d19meir1-1":[te(),"px"],"d19meir1-2":[ie(),"px"],"d19meir1-3":[ae(),"px"],"d19meir1-4":[ne(),"px"],"d19meir1-5":[oe(),"px"]}});function de(){const[t,n]=r.useState();return[t??void 0,n]}function le(){const[t,n]=de(),[a,f]=r.useState(0),[v,C]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const o=new IntersectionObserver(s=>{s.length!==0&&C(s[0].isIntersecting)},{threshold:1});return o.observe(t),()=>o.disconnect()},[t]),r.useEffect(()=>{if(v||t===void 0)return;let o;const s=()=>{const{right:w}=t.getBoundingClientRect();f(p=>Math.min(p+window.innerWidth-w-10,0)),o=requestAnimationFrame(s)};return o=requestAnimationFrame(s),()=>{o!==void 0&&cancelAnimationFrame(o)}},[t,v]);const k=r.useMemo(()=>({transform:`translateX(${a}px)`}),[a]);return{ref:n,style:k}}const ce=t=>{const{target:n,content:a,onFinishEditing:f,forceEditMode:v,initialValue:C,imageEditorOverride:k,markdownDivCreateNode:o,highlight:s,className:w,theme:p,id:W,cell:x,bloom:u,validateCell:d,getCellRenderer:M,provideEditor:h,isOutsideClick:X}=t,[l,Y]=r.useState(v?a:void 0),O=r.useRef(l??a);O.current=l??a;const[y,N]=r.useState(()=>d===void 0?!0:!(P(a)&&(d==null?void 0:d(x,a,O.current))===!1)),m=r.useCallback((e,i)=>{f(y?e:void 0,i)},[y,f]),q=r.useCallback(e=>{if(d!==void 0&&e!==void 0&&P(e)){const i=d(x,e,O.current);i===!1?N(!1):(typeof i=="object"&&(e=i),N(!0))}Y(e)},[x,d]),b=r.useRef(!1),g=r.useRef(void 0),B=r.useCallback(()=>{m(l,[0,0]),b.current=!0},[l,m]),G=r.useCallback((e,i)=>{m(e,i??g.current??[0,0]),b.current=!0},[m]),j=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),g.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),g.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),g.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!b.current&&g.current!==void 0&&(m(i?l:void 0,g.current),b.current=!0)},0)},[m,l]),D=l??a,[c,I]=r.useMemo(()=>{var i,V;if(Q(a))return[];const e=h==null?void 0:h(a);return e!==void 0?[e,!1]:[(V=(i=M(a))==null?void 0:i.provideEditor)==null?void 0:V.call(i,a),!1]},[a,M,h]),{ref:L,style:$}=le();let R=!0,A,H=!0,E;if(c!==void 0){R=c.disablePadding!==!0,H=c.disableStyling!==!0;const e=U(c);e&&(E=c.styleOverride);const i=e?c.editor:c;A=r.createElement(i,{isHighlighted:s,onChange:q,value:D,initialValue:C,onFinishedEditing:G,validatedSelection:P(D)?D.selectionRange:void 0,forceEditMode:v,target:n,imageEditorOverride:k,markdownDivCreateNode:o,isValid:y,theme:p})}E={...E,...$};const F=document.getElementById("portal");if(F===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let S=H?"gdg-style":"gdg-unstyle";y||(S+=" gdg-invalid"),R&&(S+=" gdg-pad");const K=(u==null?void 0:u[0])??1,T=(u==null?void 0:u[1])??1;return z.createPortal(r.createElement(Z.Provider,{value:p},r.createElement(_,{style:ee(p),className:w,onClickOutside:B,isOutsideClick:X},r.createElement(se,{ref:L,id:W,className:S,style:E,as:I===!0?"label":void 0,targetX:n.x-K,targetY:n.y-T,targetWidth:n.width+K*2,targetHeight:n.height+T*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:j},A)))),F)};export{ce as default};
@@ -1 +1 @@
1
- import{c as f,e as P}from"./es6-R_bosjbV.js";import"./index-DuoBWGu3.js";const{WritableStream:_,TransformStream:m,DOMException:v,Blob:u}=f,{GONE:M}=P,E=/constructor/i.test(window.HTMLElement);class T{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new v(...M)}async isSameEntry(e){return this===e}async createWritable(e={}){var l;const t=await((l=navigator.serviceWorker)==null?void 0:l.getRegistration()),a=document.createElement("a"),o=new m,g=o.writable;if(a.download=this.name,E||!t){let s=[];o.readable.pipeTo(new _({write(r){s.push(new u([r]))},close(){const r=new u(s,{type:"application/octet-stream; charset=utf-8"});s=[],a.href=URL.createObjectURL(r),a.click(),setTimeout(()=>URL.revokeObjectURL(a.href),1e4)}}))}else{const{writable:s,readablePort:r}=new S(_),n=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),w={"content-disposition":"attachment; filename*=UTF-8''"+n,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},R=setTimeout(()=>t.active.postMessage(0),1e4);o.readable.pipeThrough(new m({transform(c,d){if(c instanceof Uint8Array)return d.enqueue(c);const b=new Response(c).body.getReader(),p=W=>b.read().then(y=>y.done?0:p(d.enqueue(y.value)));return p()}})).pipeTo(s).finally(()=>{clearInterval(R)}),t.active.postMessage({url:t.scope+n,headers:w,readablePort:r},[r]);const i=document.createElement("iframe");i.hidden=!0,i.src=t.scope+n,document.body.appendChild(i)}return g.getWriter()}}const U=0,j=0,k=1,L=1,O=2;class C{constructor(e){e.onmessage=t=>this._onMessage(t.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:U,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:O}),this._port.close()}abort(e){this._port.postMessage({type:L,reason:e}),this._port.close()}_onMessage(e){e.type===j&&this._resolveReady(),e.type===k&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class S{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new C(t.port2))}}export{T as FileHandle};
1
+ import{c as f,e as P}from"./es6-BGfGTfFo.js";import"./index-lyJc68Dt.js";const{WritableStream:_,TransformStream:m,DOMException:v,Blob:u}=f,{GONE:M}=P,E=/constructor/i.test(window.HTMLElement);class T{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new v(...M)}async isSameEntry(e){return this===e}async createWritable(e={}){var l;const t=await((l=navigator.serviceWorker)==null?void 0:l.getRegistration()),a=document.createElement("a"),o=new m,g=o.writable;if(a.download=this.name,E||!t){let s=[];o.readable.pipeTo(new _({write(r){s.push(new u([r]))},close(){const r=new u(s,{type:"application/octet-stream; charset=utf-8"});s=[],a.href=URL.createObjectURL(r),a.click(),setTimeout(()=>URL.revokeObjectURL(a.href),1e4)}}))}else{const{writable:s,readablePort:r}=new S(_),n=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),w={"content-disposition":"attachment; filename*=UTF-8''"+n,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},R=setTimeout(()=>t.active.postMessage(0),1e4);o.readable.pipeThrough(new m({transform(c,d){if(c instanceof Uint8Array)return d.enqueue(c);const b=new Response(c).body.getReader(),p=W=>b.read().then(y=>y.done?0:p(d.enqueue(y.value)));return p()}})).pipeTo(s).finally(()=>{clearInterval(R)}),t.active.postMessage({url:t.scope+n,headers:w,readablePort:r},[r]);const i=document.createElement("iframe");i.hidden=!0,i.src=t.scope+n,document.body.appendChild(i)}return g.getWriter()}}const U=0,j=0,k=1,L=1,O=2;class C{constructor(e){e.onmessage=t=>this._onMessage(t.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:U,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:O}),this._port.close()}abort(e){this._port.postMessage({type:L,reason:e}),this._port.close()}_onMessage(e){e.type===j&&this._resolveReady(),e.type===k&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class S{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new C(t.port2))}}export{T as FileHandle};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/downloader-Dv4W7rem.js","assets/index-DuoBWGu3.js","assets/index.O26j_t8G.css","assets/sandbox-CuSVz6A0.js","assets/memory-K1u1sl9P.js"])))=>i.map(i=>d[i]);
2
- var le=Object.defineProperty;var $=c=>{throw TypeError(c)};var ce=(c,y,p)=>y in c?le(c,y,{enumerable:!0,configurable:!0,writable:!0,value:p}):c[y]=p;var S=(c,y,p)=>ce(c,typeof y!="symbol"?y+"":y,p),ye=(c,y,p)=>y.has(c)||$("Cannot "+p);var Y=(c,y,p)=>y.has(c)?$("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(c):y.set(c,p),X=(c,y,p,E)=>(ye(c,y,"write to private field"),E?E.call(c,p):y.set(c,p),p);import{x as d,__tla as de}from"./index-DuoBWGu3.js";let Q,j,v,me=Promise.all([(()=>{try{return de}catch{}})()]).then(async()=>{var A,z,U,B,C,G;const c=globalThis.showDirectoryPicker;async function y(r={}){if(c&&!r._preferPolyfill)return c(r);const a=document.createElement("input");a.type="file",a.webkitdirectory=!0,a.multiple=!0,a.style.position="fixed",a.style.top="-100000px",a.style.left="-100000px",document.body.appendChild(a);const e=d(()=>Promise.resolve().then(()=>q),void 0);return await new Promise(t=>{a.addEventListener("change",t),a.click()}),e.then(t=>t.getDirHandlesFromInput(a))}const p={accepts:[]},E=globalThis.showOpenFilePicker;async function J(r={}){const a={...p,...r};if(E&&!r._preferPolyfill)return E(a);const e=document.createElement("input");e.type="file",e.multiple=a.multiple,e.accept=(a.accepts||[]).map(n=>[...(n.extensions||[]).map(s=>"."+s),...n.mimeTypes||[]]).flat().join(","),Object.assign(e.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(e);const t=d(()=>Promise.resolve().then(()=>q),void 0);return await new Promise(n=>{e.addEventListener("change",n,{once:!0}),e.click()}),e.remove(),t.then(n=>n.getFileHandlesFromInput(e))}const N=globalThis.showSaveFilePicker;async function K(r={}){if(N&&!r._preferPolyfill)return N(r);r._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),r.suggestedName=r._name);const{FileSystemFileHandle:a}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0),{FileHandle:e}=await d(async()=>{const{FileHandle:t}=await import("./downloader-Dv4W7rem.js");return{FileHandle:t}},__vite__mapDeps([0,1,2]));return new a(new e(r.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const r=this.webkitGetAsEntry(),[{FileHandle:a,FolderHandle:e},{FileSystemDirectoryHandle:t},{FileSystemFileHandle:n}]=await Promise.all([d(()=>import("./sandbox-CuSVz6A0.js"),__vite__mapDeps([3,1,2])),d(()=>Promise.resolve().then(()=>I),void 0),d(()=>Promise.resolve().then(()=>b),void 0)]);return r.isFile?new n(new a(r,!1)):new t(new e(r,!1))});async function Z(r,a={}){var s,o;if(!r)return((o=(s=globalThis.navigator)==null?void 0:s.storage)==null?void 0:o.getDirectory())||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:e}=await d(async()=>{const{FileSystemDirectoryHandle:m}=await Promise.resolve().then(()=>I);return{FileSystemDirectoryHandle:m}},void 0),t=await r,n=await(t.default?t.default(a):t(a));return new e(n)}let V;j={ReadableStream:globalThis.ReadableStream,WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:V}=j;const R=class R extends V{constructor(e){super(e);Y(this,A);X(this,A,e),Object.setPrototypeOf(this,R.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),t=e.close();return e.releaseLock(),t}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const t=this.getWriter(),n=t.write(e);return t.releaseLock(),n}};A=new WeakMap;let w=R;Object.defineProperty(w.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(w.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=w);const h=Symbol("adapter");z=h;class O{constructor(a){S(this,z);S(this,"name");S(this,"kind");this.kind=a.kind,this.name=a.name,this[h]=a}async queryPermission(a={}){const{mode:e="read"}=a,t=this[h];if(t.queryPermission)return t.queryPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async requestPermission({mode:a="read"}={}){const e=this[h];if(e.requestPermission)return e.requestPermission({mode:a});if(a==="read")return"granted";if(a==="readwrite")return e.writable?"granted":"denied";throw new TypeError(`Mode ${a} must be 'read' or 'readwrite'`)}async remove(a={}){await this[h].remove(a)}async isSameEntry(a){return this===a?!0:!a||typeof a!="object"||this.kind!==a.kind||!a[h]?!1:this[h].isSameEntry(a[h])}}Object.defineProperty(O.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0}),globalThis.FileSystemHandle&&((U=globalThis.FileSystemHandle.prototype).queryPermission??(U.queryPermission=function(r){return"granted"}));let W;v={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:r=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${r}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},W={writable:globalThis.WritableStream};async function ee(r){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[a,e,t]=await Promise.all([d(()=>import("./memory-K1u1sl9P.js"),__vite__mapDeps([4,1,2])),d(()=>import("./sandbox-CuSVz6A0.js"),__vite__mapDeps([3,1,2])),d(()=>Promise.resolve().then(()=>I),void 0)]),n=new a.FolderHandle("",!1);return n._entries=r.map(s=>s.isFile?new e.FileHandle(s,!1):new e.FolderHandle(s,!1)),new t.FileSystemDirectoryHandle(n)}async function te(r){const{FolderHandle:a,FileHandle:e}=await d(async()=>{const{FolderHandle:m,FileHandle:l}=await import("./memory-K1u1sl9P.js");return{FolderHandle:m,FileHandle:l}},__vite__mapDeps([4,1,2])),{FileSystemDirectoryHandle:t}=await d(async()=>{const{FileSystemDirectoryHandle:m}=await Promise.resolve().then(()=>I);return{FileSystemDirectoryHandle:m}},void 0),n=Array.from(r.files),s=n[0].webkitRelativePath.split("/",1)[0],o=new a(s,!1);return n.forEach(m=>{const l=m.webkitRelativePath.split("/");l.shift();const u=l.pop(),g=l.reduce((_,F)=>(_._entries[F]||(_._entries[F]=new a(F,!1)),_._entries[F]),o);g._entries[u]=new e(m.name,m,!1)}),new t(o)}async function ae(r){const{FileHandle:a}=await d(async()=>{const{FileHandle:t}=await import("./memory-K1u1sl9P.js");return{FileHandle:t}},__vite__mapDeps([4,1,2])),{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0);return Array.from(r.files).map(t=>new e(new a(t.name,t,!1)))}const q=Object.freeze(Object.defineProperty({__proto__:null,config:W,errors:v,fromDataTransfer:ee,getDirHandlesFromInput:te,getFileHandlesFromInput:ae},Symbol.toStringTag,{value:"Module"})),{GONE:ie,MOD_ERR:ne}=v,f=Symbol("adapter");let H=class L extends O{constructor(e){super(e);S(this,B);this[f]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const n=await this[f].getDirectoryHandle(e,t);return new L(n)}async*entries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0);for await(const[t,n]of this[f].entries())yield[n.name,n.kind==="file"?new e(n):new L(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0);console.warn("deprecated, use .entries() instead");for await(let t of this[f].entries())yield t.kind==="file"?new e(t):new L(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:n}=await d(async()=>{const{FileSystemFileHandle:o}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:o}},void 0);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const s=await this[f].getFileHandle(e,t);return new n(s)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[f].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:n,path:s}=t.pop();for await(const o of n.values()){if(await o.isSameEntry(e))return[...s,o.name];o.kind==="directory"&&t.push({handle:o,path:[...s,o.name]})}}return null}async*keys(){for await(const[e]of this[f].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[(B=f,Symbol.asyncIterator)](){return this.entries()}};if(Object.defineProperty(H.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(H.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}}),globalThis.FileSystemDirectoryHandle){const r=globalThis.FileSystemDirectoryHandle.prototype;r.resolve=async function(n){if(await n.isSameEntry(this))return[];const s=[{handle:this,path:[]}];for(;s.length;){let{handle:o,path:m}=s.pop();for await(const l of o.values()){if(await l.isSameEntry(n))return[...m,l.name];l.kind==="directory"&&s.push({handle:l,path:[...m,l.name]})}}return null};async function a(n){if(await(await navigator.storage.getDirectory()).resolve(n)===null)throw new DOMException(...ie)}const e=r.entries;r.entries=async function*(){await a(this),yield*e.call(this)},r[Symbol.asyncIterator]=async function*(){yield*this.entries()};const t=r.removeEntry;r.removeEntry=async function(n,s={}){return t.call(this,n,s).catch(async o=>{throw o instanceof DOMException&&o.name==="UnknownError"&&!s.recursive&&!(await e.call(this).next()).done?new DOMException(...ne):o})}}const I=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:H,default:H},Symbol.toStringTag,{value:"Module"})),{INVALID:re,SYNTAX:x,GONE:se}=v,k=Symbol("adapter");class T extends(G=O,C=k,G){constructor(e){super(e);S(this,C);this[k]=e}async createWritable(e={}){return new w(await this[k].createWritable(e))}async getFile(){return this[k].getFile()}}if(Object.defineProperty(T.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(T.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const r=new WeakMap;let a;const e=()=>{let n,s;onmessage=async o=>{const m=o.ports[0],l=o.data;switch(l.type){case"open":const u=l.name;let g=await navigator.storage.getDirectory();for(const _ of l.path)g=await g.getDirectoryHandle(_);n=await g.getFileHandle(u),s=await n.createSyncAccessHandle();break;case"write":s.write(l.data,{at:l.position}),s.flush();break;case"truncate":s.truncate(l.size);break;case"abort":case"close":s.close();break}m.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(n){if(!a){const i=`(${e.toString()})()`,D=new Blob([i],{type:"text/javascript"});a=URL.createObjectURL(D)}const s=new Worker(a,{type:"module"});let o=0;const m=new TextEncoder;let l=await this.getFile().then(i=>i.size);const u=i=>new Promise((D,oe)=>{const P=new MessageChannel;P.port1.onmessage=M=>{M.data instanceof Error?oe(M.data):D(M.data),P.port1.close(),P.port2.close(),P.port1.onmessage=null},s.postMessage(i,[P.port2])}),g=await navigator.storage.getDirectory(),_=await r.get(this),F=await g.resolve(_);if(F===null)throw new DOMException(...se);return await u({type:"open",path:F,name:this.name}),(n==null?void 0:n.keepExistingData)===!1&&(await u({type:"truncate",size:0}),l=0),new w({start:i=>{},async write(i){if((i==null?void 0:i.constructor)===Object?i={...i}:i={type:"write",data:i,position:o},i.type==="write"){if(!("data"in i))throw await u({type:"close"}),new DOMException(...x("write requires a data argument"));if(i.position??(i.position=o),typeof i.data=="string")i.data=m.encode(i.data);else if(i.data instanceof ArrayBuffer)i.data=new Uint8Array(i.data);else if(!(i.data instanceof Uint8Array)&&ArrayBuffer.isView(i.data))i.data=new Uint8Array(i.data.buffer,i.data.byteOffset,i.data.byteLength);else if(!(i.data instanceof Uint8Array)){const D=await new Response(i.data).arrayBuffer();i.data=new Uint8Array(D)}Number.isInteger(i.position)&&i.position>=0&&(o=i.position),o+=i.data.byteLength,l+=i.data.byteLength}else if(i.type==="seek")if(Number.isInteger(i.position)&&i.position>=0){if(l<i.position)throw new DOMException(...re);console.log("seeking",i),o=i.position;return}else throw await u({type:"close"}),new DOMException(...x("seek requires a position argument"));else if(i.type==="truncate")if(Number.isInteger(i.size)&&i.size>=0)l=i.size,o>l&&(o=l);else throw await u({type:"close"}),new DOMException(...x("truncate requires a size argument"));await u(i)},async close(){await u({type:"close"}),s.terminate()},async abort(i){await u({type:"abort",reason:i}),s.terminate()}})};const t=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...n){const s=await t.call(this,...n);return r.set(s,this),s}}let b;b=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:T,default:T},Symbol.toStringTag,{value:"Module"})),Q=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:H,FileSystemFileHandle:T,FileSystemHandle:O,FileSystemWritableFileStream:w,getOriginPrivateDirectory:Z,showDirectoryPicker:y,showOpenFilePicker:J,showSaveFilePicker:K},Symbol.toStringTag,{value:"Module"}))});export{me as __tla,Q as a,j as c,v as e};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/downloader-BRNWhhPt.js","assets/index-lyJc68Dt.js","assets/index.O26j_t8G.css","assets/sandbox-0hHf-j9y.js","assets/memory-Db7tbqiS.js"])))=>i.map(i=>d[i]);
2
+ var le=Object.defineProperty;var $=c=>{throw TypeError(c)};var ce=(c,y,p)=>y in c?le(c,y,{enumerable:!0,configurable:!0,writable:!0,value:p}):c[y]=p;var S=(c,y,p)=>ce(c,typeof y!="symbol"?y+"":y,p),ye=(c,y,p)=>y.has(c)||$("Cannot "+p);var Y=(c,y,p)=>y.has(c)?$("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(c):y.set(c,p),X=(c,y,p,E)=>(ye(c,y,"write to private field"),E?E.call(c,p):y.set(c,p),p);import{x as d,__tla as de}from"./index-lyJc68Dt.js";let Q,j,v,me=Promise.all([(()=>{try{return de}catch{}})()]).then(async()=>{var A,z,U,B,C,G;const c=globalThis.showDirectoryPicker;async function y(r={}){if(c&&!r._preferPolyfill)return c(r);const a=document.createElement("input");a.type="file",a.webkitdirectory=!0,a.multiple=!0,a.style.position="fixed",a.style.top="-100000px",a.style.left="-100000px",document.body.appendChild(a);const e=d(()=>Promise.resolve().then(()=>q),void 0);return await new Promise(t=>{a.addEventListener("change",t),a.click()}),e.then(t=>t.getDirHandlesFromInput(a))}const p={accepts:[]},E=globalThis.showOpenFilePicker;async function J(r={}){const a={...p,...r};if(E&&!r._preferPolyfill)return E(a);const e=document.createElement("input");e.type="file",e.multiple=a.multiple,e.accept=(a.accepts||[]).map(n=>[...(n.extensions||[]).map(s=>"."+s),...n.mimeTypes||[]]).flat().join(","),Object.assign(e.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(e);const t=d(()=>Promise.resolve().then(()=>q),void 0);return await new Promise(n=>{e.addEventListener("change",n,{once:!0}),e.click()}),e.remove(),t.then(n=>n.getFileHandlesFromInput(e))}const N=globalThis.showSaveFilePicker;async function K(r={}){if(N&&!r._preferPolyfill)return N(r);r._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),r.suggestedName=r._name);const{FileSystemFileHandle:a}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0),{FileHandle:e}=await d(async()=>{const{FileHandle:t}=await import("./downloader-BRNWhhPt.js");return{FileHandle:t}},__vite__mapDeps([0,1,2]));return new a(new e(r.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const r=this.webkitGetAsEntry(),[{FileHandle:a,FolderHandle:e},{FileSystemDirectoryHandle:t},{FileSystemFileHandle:n}]=await Promise.all([d(()=>import("./sandbox-0hHf-j9y.js"),__vite__mapDeps([3,1,2])),d(()=>Promise.resolve().then(()=>I),void 0),d(()=>Promise.resolve().then(()=>b),void 0)]);return r.isFile?new n(new a(r,!1)):new t(new e(r,!1))});async function Z(r,a={}){var s,o;if(!r)return((o=(s=globalThis.navigator)==null?void 0:s.storage)==null?void 0:o.getDirectory())||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:e}=await d(async()=>{const{FileSystemDirectoryHandle:m}=await Promise.resolve().then(()=>I);return{FileSystemDirectoryHandle:m}},void 0),t=await r,n=await(t.default?t.default(a):t(a));return new e(n)}let V;j={ReadableStream:globalThis.ReadableStream,WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:V}=j;const R=class R extends V{constructor(e){super(e);Y(this,A);X(this,A,e),Object.setPrototypeOf(this,R.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),t=e.close();return e.releaseLock(),t}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const t=this.getWriter(),n=t.write(e);return t.releaseLock(),n}};A=new WeakMap;let w=R;Object.defineProperty(w.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(w.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=w);const h=Symbol("adapter");z=h;class O{constructor(a){S(this,z);S(this,"name");S(this,"kind");this.kind=a.kind,this.name=a.name,this[h]=a}async queryPermission(a={}){const{mode:e="read"}=a,t=this[h];if(t.queryPermission)return t.queryPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async requestPermission({mode:a="read"}={}){const e=this[h];if(e.requestPermission)return e.requestPermission({mode:a});if(a==="read")return"granted";if(a==="readwrite")return e.writable?"granted":"denied";throw new TypeError(`Mode ${a} must be 'read' or 'readwrite'`)}async remove(a={}){await this[h].remove(a)}async isSameEntry(a){return this===a?!0:!a||typeof a!="object"||this.kind!==a.kind||!a[h]?!1:this[h].isSameEntry(a[h])}}Object.defineProperty(O.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0}),globalThis.FileSystemHandle&&((U=globalThis.FileSystemHandle.prototype).queryPermission??(U.queryPermission=function(r){return"granted"}));let W;v={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:r=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${r}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},W={writable:globalThis.WritableStream};async function ee(r){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[a,e,t]=await Promise.all([d(()=>import("./memory-Db7tbqiS.js"),__vite__mapDeps([4,1,2])),d(()=>import("./sandbox-0hHf-j9y.js"),__vite__mapDeps([3,1,2])),d(()=>Promise.resolve().then(()=>I),void 0)]),n=new a.FolderHandle("",!1);return n._entries=r.map(s=>s.isFile?new e.FileHandle(s,!1):new e.FolderHandle(s,!1)),new t.FileSystemDirectoryHandle(n)}async function te(r){const{FolderHandle:a,FileHandle:e}=await d(async()=>{const{FolderHandle:m,FileHandle:l}=await import("./memory-Db7tbqiS.js");return{FolderHandle:m,FileHandle:l}},__vite__mapDeps([4,1,2])),{FileSystemDirectoryHandle:t}=await d(async()=>{const{FileSystemDirectoryHandle:m}=await Promise.resolve().then(()=>I);return{FileSystemDirectoryHandle:m}},void 0),n=Array.from(r.files),s=n[0].webkitRelativePath.split("/",1)[0],o=new a(s,!1);return n.forEach(m=>{const l=m.webkitRelativePath.split("/");l.shift();const u=l.pop(),g=l.reduce((_,F)=>(_._entries[F]||(_._entries[F]=new a(F,!1)),_._entries[F]),o);g._entries[u]=new e(m.name,m,!1)}),new t(o)}async function ae(r){const{FileHandle:a}=await d(async()=>{const{FileHandle:t}=await import("./memory-Db7tbqiS.js");return{FileHandle:t}},__vite__mapDeps([4,1,2])),{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0);return Array.from(r.files).map(t=>new e(new a(t.name,t,!1)))}const q=Object.freeze(Object.defineProperty({__proto__:null,config:W,errors:v,fromDataTransfer:ee,getDirHandlesFromInput:te,getFileHandlesFromInput:ae},Symbol.toStringTag,{value:"Module"})),{GONE:ie,MOD_ERR:ne}=v,f=Symbol("adapter");let H=class L extends O{constructor(e){super(e);S(this,B);this[f]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const n=await this[f].getDirectoryHandle(e,t);return new L(n)}async*entries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0);for await(const[t,n]of this[f].entries())yield[n.name,n.kind==="file"?new e(n):new L(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0);console.warn("deprecated, use .entries() instead");for await(let t of this[f].entries())yield t.kind==="file"?new e(t):new L(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:n}=await d(async()=>{const{FileSystemFileHandle:o}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:o}},void 0);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const s=await this[f].getFileHandle(e,t);return new n(s)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[f].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:n,path:s}=t.pop();for await(const o of n.values()){if(await o.isSameEntry(e))return[...s,o.name];o.kind==="directory"&&t.push({handle:o,path:[...s,o.name]})}}return null}async*keys(){for await(const[e]of this[f].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[(B=f,Symbol.asyncIterator)](){return this.entries()}};if(Object.defineProperty(H.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(H.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}}),globalThis.FileSystemDirectoryHandle){const r=globalThis.FileSystemDirectoryHandle.prototype;r.resolve=async function(n){if(await n.isSameEntry(this))return[];const s=[{handle:this,path:[]}];for(;s.length;){let{handle:o,path:m}=s.pop();for await(const l of o.values()){if(await l.isSameEntry(n))return[...m,l.name];l.kind==="directory"&&s.push({handle:l,path:[...m,l.name]})}}return null};async function a(n){if(await(await navigator.storage.getDirectory()).resolve(n)===null)throw new DOMException(...ie)}const e=r.entries;r.entries=async function*(){await a(this),yield*e.call(this)},r[Symbol.asyncIterator]=async function*(){yield*this.entries()};const t=r.removeEntry;r.removeEntry=async function(n,s={}){return t.call(this,n,s).catch(async o=>{throw o instanceof DOMException&&o.name==="UnknownError"&&!s.recursive&&!(await e.call(this).next()).done?new DOMException(...ne):o})}}const I=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:H,default:H},Symbol.toStringTag,{value:"Module"})),{INVALID:re,SYNTAX:x,GONE:se}=v,k=Symbol("adapter");class T extends(G=O,C=k,G){constructor(e){super(e);S(this,C);this[k]=e}async createWritable(e={}){return new w(await this[k].createWritable(e))}async getFile(){return this[k].getFile()}}if(Object.defineProperty(T.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(T.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const r=new WeakMap;let a;const e=()=>{let n,s;onmessage=async o=>{const m=o.ports[0],l=o.data;switch(l.type){case"open":const u=l.name;let g=await navigator.storage.getDirectory();for(const _ of l.path)g=await g.getDirectoryHandle(_);n=await g.getFileHandle(u),s=await n.createSyncAccessHandle();break;case"write":s.write(l.data,{at:l.position}),s.flush();break;case"truncate":s.truncate(l.size);break;case"abort":case"close":s.close();break}m.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(n){if(!a){const i=`(${e.toString()})()`,D=new Blob([i],{type:"text/javascript"});a=URL.createObjectURL(D)}const s=new Worker(a,{type:"module"});let o=0;const m=new TextEncoder;let l=await this.getFile().then(i=>i.size);const u=i=>new Promise((D,oe)=>{const P=new MessageChannel;P.port1.onmessage=M=>{M.data instanceof Error?oe(M.data):D(M.data),P.port1.close(),P.port2.close(),P.port1.onmessage=null},s.postMessage(i,[P.port2])}),g=await navigator.storage.getDirectory(),_=await r.get(this),F=await g.resolve(_);if(F===null)throw new DOMException(...se);return await u({type:"open",path:F,name:this.name}),(n==null?void 0:n.keepExistingData)===!1&&(await u({type:"truncate",size:0}),l=0),new w({start:i=>{},async write(i){if((i==null?void 0:i.constructor)===Object?i={...i}:i={type:"write",data:i,position:o},i.type==="write"){if(!("data"in i))throw await u({type:"close"}),new DOMException(...x("write requires a data argument"));if(i.position??(i.position=o),typeof i.data=="string")i.data=m.encode(i.data);else if(i.data instanceof ArrayBuffer)i.data=new Uint8Array(i.data);else if(!(i.data instanceof Uint8Array)&&ArrayBuffer.isView(i.data))i.data=new Uint8Array(i.data.buffer,i.data.byteOffset,i.data.byteLength);else if(!(i.data instanceof Uint8Array)){const D=await new Response(i.data).arrayBuffer();i.data=new Uint8Array(D)}Number.isInteger(i.position)&&i.position>=0&&(o=i.position),o+=i.data.byteLength,l+=i.data.byteLength}else if(i.type==="seek")if(Number.isInteger(i.position)&&i.position>=0){if(l<i.position)throw new DOMException(...re);console.log("seeking",i),o=i.position;return}else throw await u({type:"close"}),new DOMException(...x("seek requires a position argument"));else if(i.type==="truncate")if(Number.isInteger(i.size)&&i.size>=0)l=i.size,o>l&&(o=l);else throw await u({type:"close"}),new DOMException(...x("truncate requires a size argument"));await u(i)},async close(){await u({type:"close"}),s.terminate()},async abort(i){await u({type:"abort",reason:i}),s.terminate()}})};const t=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...n){const s=await t.call(this,...n);return r.set(s,this),s}}let b;b=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:T,default:T},Symbol.toStringTag,{value:"Module"})),Q=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:H,FileSystemFileHandle:T,FileSystemHandle:O,FileSystemWritableFileStream:w,getOriginPrivateDirectory:Z,showDirectoryPicker:y,showOpenFilePicker:J,showSaveFilePicker:K},Symbol.toStringTag,{value:"Module"}))});export{me as __tla,Q as a,j as c,v as e};
@@ -1 +1 @@
1
- import{bD as a,bE as c,W as u,ap as f}from"./index-DuoBWGu3.js";function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,a(o.key),o)}}function b(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function y(e,t){if(t&&(u(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}export{l as _,p as a,b,n as c,y as d};
1
+ import{bD as a,bE as c,W as u,ap as f}from"./index-lyJc68Dt.js";function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,a(o.key),o)}}function b(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function y(e,t){if(t&&(u(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}export{l as _,p as a,b,n as c,y as d};
@@ -1 +1 @@
1
- import{g as ot}from"./index-DuoBWGu3.js";function it(x,u){for(var p=0;p<u.length;p++){const S=u[p];if(typeof S!="string"&&!Array.isArray(S)){for(const O in S)if(O!=="default"&&!(O in x)){const M=Object.getOwnPropertyDescriptor(S,O);M&&Object.defineProperty(x,O,M.get?M:{enumerable:!0,get:()=>S[O]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var ke={exports:{}};(function(x){(function(u){if(typeof window>"u")return;var p=!0,S=10,O="",M=0,D="",J=null,ie="",j=!1,Pe={resize:1,click:1},U=128,re=!0,R=1,_="bodyOffset",h=_,ae=!0,ce="",k={},I=32,ue=null,V=!1,X=!1,q="[iFrameSizer]",se=q.length,H="",de={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",le=window.parent,L="*",K=0,W=!1,fe=null,P=16,F=1,me="scroll",v=me,Fe=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},ge=!1;function he(){}try{var pe=Object.create({},{passive:{get:function(){ge=!0}}});window.addEventListener("test",he,pe),window.removeEventListener("test",he,pe)}catch{}function z(e,t,n,o){e.addEventListener(t,n,ge?o||{}:!1)}function De(e,t,n){e.removeEventListener(t,n,!1)}function ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function je(e){var t,n,o,a=null,d=0,m=function(){d=Date.now(),a=null,o=e.apply(t,n),a||(t=n=null)};return function(){var f=Date.now();d||(d=f);var c=P-(f-d);return t=this,n=arguments,c<=0||c>P?(a&&(clearTimeout(a),a=null),d=f,o=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,c)),o}}function ye(e){return q+"["+H+"] "+e}function i(e){V&&typeof window.console=="object"&&console.log(ye(e))}function T(e){typeof window.console=="object"&&console.warn(ye(e))}function qe(){He(),i("Initialising iFrame ("+window.location.href+")"),Be(),Ue(),te("background",O),te("padding",ie),Ye(),Te(),Ee(),_e(),Ge(),Qe(),Oe(),k=Ke(),A("init","Init message from host page"),G()}function He(){function e(n){return n==="true"}var t=ce.slice(se).split(":");H=t[0],M=u===t[1]?M:Number(t[1]),j=u===t[2]?j:e(t[2]),V=u===t[3]?V:e(t[3]),I=u===t[4]?I:Number(t[4]),p=u===t[6]?p:e(t[6]),D=t[7],h=u===t[8]?h:t[8],O=t[9],ie=t[10],K=u===t[11]?K:Number(t[11]),k.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function We(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function Be(){function e(){var n=window.iFrameResizer;i("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(We,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,L="targetOrigin"in n?n.targetOrigin:L,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,o){return typeof n=="function"&&(i("Setup custom "+o+"CalcMethod"),$[o]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),i("TargetOrigin for parent set to: "+L)}function Je(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,i("Body "+e+' set to "'+t+'"'))}function Ue(){u===D&&(D=M+"px"),te("margin",Je("margin",D))}function _e(){document.documentElement.style.height="",document.body.style.height="",i('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function o(){A(e.eventName,e.eventType)}ee[n]=o,z(window,n,o,{passive:!0})},remove:function(n){var o=ee[n];delete ee[n],De(window,n,o)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),i(ve(e.method)+" event listener: "+e.eventType)}function we(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function be(e,t,n,o){return t!==e&&(e in n||(T(e+" is not a valid option for "+o+"CalculationMethod."),e=t),i(o+' calculation method set to "'+e+'"')),e}function Te(){h=be(h,_,E,"height")}function Ee(){v=be(v,me,N,"width")}function Oe(){p===!0?(we("add"),$e()):i("Auto Resize disabled")}function Ve(){J!==null&&J.disconnect()}function Xe(){we("remove"),Ve(),clearInterval(ue)}function Ye(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Ke(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(c){var s=c.getBoundingClientRect(),l=e();return{x:parseInt(s.left,10)+parseInt(l.x,10),y:parseInt(s.top,10)+parseInt(l.y,10)}}function n(c){function s(b){var C=t(b);i("Moving to in page link (#"+l+") at x: "+C.x+" y: "+C.y),y(C.y,C.x,"scrollToOffset")}var l=c.split("#")[1]||c,r=decodeURIComponent(l),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(i("In page link (#"+l+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+l)):s(w)}function o(){var c=window.location.hash,s=window.location.href;c!==""&&c!=="#"&&n(s)}function a(){function c(s){function l(r){r.preventDefault(),n(this.getAttribute("href"))}s.getAttribute("href")!=="#"&&z(s,"click",l)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),c)}function d(){z(window,"hashchange",o)}function m(){setTimeout(o,U)}function f(){Array.prototype.forEach&&document.querySelectorAll?(i("Setting up location.hash handlers"),a(),d(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return k.enable?f():i("In page linking not enabled"),{findTarget:n}}function Qe(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,o){i("Add event listener: "+o),z(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ge(){i("Enable public methods"),Fe.parentIFrame={autoResize:function(e){return e===!0&&p===!1?(p=!0,Oe()):e===!1&&p===!0&&(p=!1,Xe()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return H},getPageInfo:function(e){typeof e=="function"?(Z=e,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(e){k.findTarget(e)},reset:function(){Ce("parentIFrame.reset")},scrollTo:function(e,t){y(t,e,"scrollTo")},scrollToOffset:function(e,t){y(t,e,"scrollToOffset")},sendMessage:function(e,t){y(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){h=e,Te()},setWidthCalculationMethod:function(e){v=e,Ee()},setTargetOrigin:function(e){i("Set targetOrigin: "+e),L=e},size:function(e,t){var n=""+(e||"")+(t?","+t:"");A("size","parentIFrame.size("+n+")",e,t)}}}function Se(){I!==0&&(i("setInterval: "+I+"ms"),ue=setInterval(function(){A("interval","setInterval: "+I)},Math.abs(I)))}function Ze(){function e(r){function w(b){b.complete===!1&&(i("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",d,!1),c.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){c.splice(c.indexOf(r),1)}function n(r){i("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",d,!1),t(r)}function o(r,w,b){n(r.target),A(w,b+": "+r.target.src)}function a(r){o(r,"imageLoad","Image loaded")}function d(r){o(r,"imageLoadFailed","Image load failed")}function m(r){A("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function f(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return l=new s(m),i("Create body MutationObserver"),l.observe(r,w),l}var c=[],s=window.MutationObserver||window.WebKitMutationObserver,l=f();return{disconnect:function(){"disconnect"in l&&(i("Disconnect body MutationObserver"),l.disconnect(),c.forEach(n))}}}function $e(){var e=0>I;window.MutationObserver||window.WebKitMutationObserver?e?Se():J=Ze():(i("MutationObserver not supported in this browser!"),Se())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,S)}function et(e){e>P/2&&(P=2*e,i("Event throttle increased to "+P+"ms"))}function oe(e,t){for(var n=t.length,o=0,a=0,d=ve(e),m=Date.now(),f=0;f<n;f++)o=t[f].getBoundingClientRect()[e]+ne("margin"+d,t[f]),o>a&&(a=o);return m=Date.now()-m,i("Parsed "+n+" HTML elements"),i("Element position calculated in "+m+"ms"),et(m),a}function B(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Me(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var o=document.querySelectorAll("["+t+"]");return o.length===0&&n(),oe(e,o)}function Ie(){return document.querySelectorAll("body *")}var E={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return E.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,B(E))},min:function(){return Math.min.apply(null,B(E))},grow:function(){return E.max()},lowestElement:function(){return Math.max(E.bodyOffset()||E.documentElementOffset(),oe("bottom",Ie()))},taggedElement:function(){return Me("bottom","data-iframe-height")}},N={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(N.bodyScroll(),N.documentElementScroll())},max:function(){return Math.max.apply(null,B(N))},min:function(){return Math.min.apply(null,B(N))},rightMostElement:function(){return oe("right",Ie())},taggedElement:function(){return Me("right","data-iframe-width")}};function Ne(e,t,n,o){function a(){R=l,F=r,y(R,F,e)}function d(){function w(b,C){var nt=Math.abs(b-C)<=K;return!nt}return l=u===n?E[h]():n,r=u===o?N[v]():o,w(R,l)||j&&w(F,r)}function m(){return!(e in{init:1,interval:1,size:1})}function f(){return h in de||j&&v in de}function c(){i("No change in size detected")}function s(){m()&&f()?Ce(t):e in{interval:1}||c()}var l,r;d()||e==="init"?(Ae(),a()):s()}var tt=je(Ne);function A(e,t,n,o){function a(){e in{reset:1,resetPage:1,init:1}||i("Trigger event: "+t)}function d(){return W&&e in Pe}d()?i("Trigger event cancelled: "+e):(a(),e==="init"?Ne(e,t,n,o):tt(e,t,n,o))}function Ae(){W||(W=!0,i("Trigger event lock on")),clearTimeout(fe),fe=setTimeout(function(){W=!1,i("Trigger event lock off"),i("--")},U)}function ze(e){R=E[h](),F=N[v](),y(R,F,e)}function Ce(e){var t=h;h=_,i("Reset trigger event: "+e),Ae(),ze("reset"),h=t}function y(e,t,n,o,a){function d(){u===a?a=L:i("Message targetOrigin: "+a)}function m(){var f=e+":"+t,c=H+":"+f+":"+n+(u===o?"":":"+o);i("Sending message to host page ("+c+")"),le.postMessage(q+c,a)}d(),m()}function xe(e){var t={init:function(){ce=e.data,le=e.source,qe(),re=!1,setTimeout(function(){ae=!1},U)},reset:function(){ae?i("Page reset ignored by init"):(i("Page size reset by host page"),ze("resetPage"))},resize:function(){A("resizeParent","Parent window requested size check")},moveToAnchor:function(){k.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var s=a();i("PageInfoFromParent called from parent: "+s),Z(JSON.parse(s)),i(" --")},message:function(){var s=a();i("onMessage called from parent: "+s),Q(JSON.parse(s)),i(" --")}};function n(){return q===(""+e.data).slice(0,se)}function o(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function d(){return!x.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function f(){var s=o();s in t?t[s]():!d()&&!m()&&T("Unexpected message ("+e.data+")")}function c(){re===!1?f():m()?t.init():i('Ignored message of type "'+o()+'". Received before initialization.')}n()&&c()}function Re(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){xe({data:e,sameDomian:!0})},z(window,"message",xe),z(window,"readystatechange",Re),Re())})()})(ke);var Le=ke.exports;const rt=ot(Le),at=it({__proto__:null,default:rt},[Le]);export{at as i};
1
+ import{g as ot}from"./index-lyJc68Dt.js";function it(x,u){for(var p=0;p<u.length;p++){const S=u[p];if(typeof S!="string"&&!Array.isArray(S)){for(const O in S)if(O!=="default"&&!(O in x)){const M=Object.getOwnPropertyDescriptor(S,O);M&&Object.defineProperty(x,O,M.get?M:{enumerable:!0,get:()=>S[O]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var ke={exports:{}};(function(x){(function(u){if(typeof window>"u")return;var p=!0,S=10,O="",M=0,D="",J=null,ie="",j=!1,Pe={resize:1,click:1},U=128,re=!0,R=1,_="bodyOffset",h=_,ae=!0,ce="",k={},I=32,ue=null,V=!1,X=!1,q="[iFrameSizer]",se=q.length,H="",de={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",le=window.parent,L="*",K=0,W=!1,fe=null,P=16,F=1,me="scroll",v=me,Fe=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},ge=!1;function he(){}try{var pe=Object.create({},{passive:{get:function(){ge=!0}}});window.addEventListener("test",he,pe),window.removeEventListener("test",he,pe)}catch{}function z(e,t,n,o){e.addEventListener(t,n,ge?o||{}:!1)}function De(e,t,n){e.removeEventListener(t,n,!1)}function ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function je(e){var t,n,o,a=null,d=0,m=function(){d=Date.now(),a=null,o=e.apply(t,n),a||(t=n=null)};return function(){var f=Date.now();d||(d=f);var c=P-(f-d);return t=this,n=arguments,c<=0||c>P?(a&&(clearTimeout(a),a=null),d=f,o=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,c)),o}}function ye(e){return q+"["+H+"] "+e}function i(e){V&&typeof window.console=="object"&&console.log(ye(e))}function T(e){typeof window.console=="object"&&console.warn(ye(e))}function qe(){He(),i("Initialising iFrame ("+window.location.href+")"),Be(),Ue(),te("background",O),te("padding",ie),Ye(),Te(),Ee(),_e(),Ge(),Qe(),Oe(),k=Ke(),A("init","Init message from host page"),G()}function He(){function e(n){return n==="true"}var t=ce.slice(se).split(":");H=t[0],M=u===t[1]?M:Number(t[1]),j=u===t[2]?j:e(t[2]),V=u===t[3]?V:e(t[3]),I=u===t[4]?I:Number(t[4]),p=u===t[6]?p:e(t[6]),D=t[7],h=u===t[8]?h:t[8],O=t[9],ie=t[10],K=u===t[11]?K:Number(t[11]),k.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function We(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function Be(){function e(){var n=window.iFrameResizer;i("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(We,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,L="targetOrigin"in n?n.targetOrigin:L,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,o){return typeof n=="function"&&(i("Setup custom "+o+"CalcMethod"),$[o]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),i("TargetOrigin for parent set to: "+L)}function Je(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,i("Body "+e+' set to "'+t+'"'))}function Ue(){u===D&&(D=M+"px"),te("margin",Je("margin",D))}function _e(){document.documentElement.style.height="",document.body.style.height="",i('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function o(){A(e.eventName,e.eventType)}ee[n]=o,z(window,n,o,{passive:!0})},remove:function(n){var o=ee[n];delete ee[n],De(window,n,o)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),i(ve(e.method)+" event listener: "+e.eventType)}function we(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function be(e,t,n,o){return t!==e&&(e in n||(T(e+" is not a valid option for "+o+"CalculationMethod."),e=t),i(o+' calculation method set to "'+e+'"')),e}function Te(){h=be(h,_,E,"height")}function Ee(){v=be(v,me,N,"width")}function Oe(){p===!0?(we("add"),$e()):i("Auto Resize disabled")}function Ve(){J!==null&&J.disconnect()}function Xe(){we("remove"),Ve(),clearInterval(ue)}function Ye(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Ke(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(c){var s=c.getBoundingClientRect(),l=e();return{x:parseInt(s.left,10)+parseInt(l.x,10),y:parseInt(s.top,10)+parseInt(l.y,10)}}function n(c){function s(b){var C=t(b);i("Moving to in page link (#"+l+") at x: "+C.x+" y: "+C.y),y(C.y,C.x,"scrollToOffset")}var l=c.split("#")[1]||c,r=decodeURIComponent(l),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(i("In page link (#"+l+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+l)):s(w)}function o(){var c=window.location.hash,s=window.location.href;c!==""&&c!=="#"&&n(s)}function a(){function c(s){function l(r){r.preventDefault(),n(this.getAttribute("href"))}s.getAttribute("href")!=="#"&&z(s,"click",l)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),c)}function d(){z(window,"hashchange",o)}function m(){setTimeout(o,U)}function f(){Array.prototype.forEach&&document.querySelectorAll?(i("Setting up location.hash handlers"),a(),d(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return k.enable?f():i("In page linking not enabled"),{findTarget:n}}function Qe(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,o){i("Add event listener: "+o),z(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ge(){i("Enable public methods"),Fe.parentIFrame={autoResize:function(e){return e===!0&&p===!1?(p=!0,Oe()):e===!1&&p===!0&&(p=!1,Xe()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return H},getPageInfo:function(e){typeof e=="function"?(Z=e,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(e){k.findTarget(e)},reset:function(){Ce("parentIFrame.reset")},scrollTo:function(e,t){y(t,e,"scrollTo")},scrollToOffset:function(e,t){y(t,e,"scrollToOffset")},sendMessage:function(e,t){y(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){h=e,Te()},setWidthCalculationMethod:function(e){v=e,Ee()},setTargetOrigin:function(e){i("Set targetOrigin: "+e),L=e},size:function(e,t){var n=""+(e||"")+(t?","+t:"");A("size","parentIFrame.size("+n+")",e,t)}}}function Se(){I!==0&&(i("setInterval: "+I+"ms"),ue=setInterval(function(){A("interval","setInterval: "+I)},Math.abs(I)))}function Ze(){function e(r){function w(b){b.complete===!1&&(i("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",d,!1),c.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){c.splice(c.indexOf(r),1)}function n(r){i("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",d,!1),t(r)}function o(r,w,b){n(r.target),A(w,b+": "+r.target.src)}function a(r){o(r,"imageLoad","Image loaded")}function d(r){o(r,"imageLoadFailed","Image load failed")}function m(r){A("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function f(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return l=new s(m),i("Create body MutationObserver"),l.observe(r,w),l}var c=[],s=window.MutationObserver||window.WebKitMutationObserver,l=f();return{disconnect:function(){"disconnect"in l&&(i("Disconnect body MutationObserver"),l.disconnect(),c.forEach(n))}}}function $e(){var e=0>I;window.MutationObserver||window.WebKitMutationObserver?e?Se():J=Ze():(i("MutationObserver not supported in this browser!"),Se())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,S)}function et(e){e>P/2&&(P=2*e,i("Event throttle increased to "+P+"ms"))}function oe(e,t){for(var n=t.length,o=0,a=0,d=ve(e),m=Date.now(),f=0;f<n;f++)o=t[f].getBoundingClientRect()[e]+ne("margin"+d,t[f]),o>a&&(a=o);return m=Date.now()-m,i("Parsed "+n+" HTML elements"),i("Element position calculated in "+m+"ms"),et(m),a}function B(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Me(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var o=document.querySelectorAll("["+t+"]");return o.length===0&&n(),oe(e,o)}function Ie(){return document.querySelectorAll("body *")}var E={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return E.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,B(E))},min:function(){return Math.min.apply(null,B(E))},grow:function(){return E.max()},lowestElement:function(){return Math.max(E.bodyOffset()||E.documentElementOffset(),oe("bottom",Ie()))},taggedElement:function(){return Me("bottom","data-iframe-height")}},N={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(N.bodyScroll(),N.documentElementScroll())},max:function(){return Math.max.apply(null,B(N))},min:function(){return Math.min.apply(null,B(N))},rightMostElement:function(){return oe("right",Ie())},taggedElement:function(){return Me("right","data-iframe-width")}};function Ne(e,t,n,o){function a(){R=l,F=r,y(R,F,e)}function d(){function w(b,C){var nt=Math.abs(b-C)<=K;return!nt}return l=u===n?E[h]():n,r=u===o?N[v]():o,w(R,l)||j&&w(F,r)}function m(){return!(e in{init:1,interval:1,size:1})}function f(){return h in de||j&&v in de}function c(){i("No change in size detected")}function s(){m()&&f()?Ce(t):e in{interval:1}||c()}var l,r;d()||e==="init"?(Ae(),a()):s()}var tt=je(Ne);function A(e,t,n,o){function a(){e in{reset:1,resetPage:1,init:1}||i("Trigger event: "+t)}function d(){return W&&e in Pe}d()?i("Trigger event cancelled: "+e):(a(),e==="init"?Ne(e,t,n,o):tt(e,t,n,o))}function Ae(){W||(W=!0,i("Trigger event lock on")),clearTimeout(fe),fe=setTimeout(function(){W=!1,i("Trigger event lock off"),i("--")},U)}function ze(e){R=E[h](),F=N[v](),y(R,F,e)}function Ce(e){var t=h;h=_,i("Reset trigger event: "+e),Ae(),ze("reset"),h=t}function y(e,t,n,o,a){function d(){u===a?a=L:i("Message targetOrigin: "+a)}function m(){var f=e+":"+t,c=H+":"+f+":"+n+(u===o?"":":"+o);i("Sending message to host page ("+c+")"),le.postMessage(q+c,a)}d(),m()}function xe(e){var t={init:function(){ce=e.data,le=e.source,qe(),re=!1,setTimeout(function(){ae=!1},U)},reset:function(){ae?i("Page reset ignored by init"):(i("Page size reset by host page"),ze("resetPage"))},resize:function(){A("resizeParent","Parent window requested size check")},moveToAnchor:function(){k.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var s=a();i("PageInfoFromParent called from parent: "+s),Z(JSON.parse(s)),i(" --")},message:function(){var s=a();i("onMessage called from parent: "+s),Q(JSON.parse(s)),i(" --")}};function n(){return q===(""+e.data).slice(0,se)}function o(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function d(){return!x.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function f(){var s=o();s in t?t[s]():!d()&&!m()&&T("Unexpected message ("+e.data+")")}function c(){re===!1?f():m()?t.init():i('Ignored message of type "'+o()+'". Received before initialization.')}n()&&c()}function Re(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){xe({data:e,sameDomian:!0})},z(window,"message",xe),z(window,"readystatechange",Re),Re())})()})(ke);var Le=ke.exports;const rt=ot(Le),at=it({__proto__:null,default:rt},[Le]);export{at as i};
@@ -1,3 +1,3 @@
1
- import{b2 as R,bd as be,r as c,b3 as O,M as me,j as g,a_ as ge,b7 as ye,b0 as ve,aK as we,a2 as ne,a$ as Re}from"./index-DuoBWGu3.js";import{a as Oe}from"./useBasicWidgetState-DgnZoFWi.js";import"./FormClearHelper-BIZNCxvb.js";var ie={vertical:"vertical",horizontal:"horizontal"};function ae(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),o.push.apply(o,r)}return o}function C(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?ae(Object(o),!0).forEach(function(r){k(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ae(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function k(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var L=0,I=1,T=2;function B(e){return e.$isActive?T:e.$isHovered?I:L}function ke(e){var t=e.$theme.colors,o=e.$disabled,r=e.$checked,n=e.$isFocusVisible,s=e.$error;if(o)return t.tickFillDisabled;if(r)if(s)switch(B(e)){case L:return t.tickFillErrorSelected;case I:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(B(e)){case L:return t.tickFillSelected;case I:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return n?t.borderSelected:s?t.tickBorderError:t.tickBorder;return null}function je(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(B(e)){case L:return t.tickFillError;case I:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(B(e)){case L:return t.tickFill;case I:return t.tickFillHover;case T:return t.tickFillActive}}function $e(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n=r.direction==="rtl"?"Left":"Right";break;default:case"right":n=r.direction==="rtl"?"Right":"Left";break}var s=r.sizing,i=s.scale300;return k({},"padding".concat(n),i)}function Se(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var U=R("div",function(e){var t=e.$disabled,o=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:o==="horizontal"?"row":"column",alignItems:o==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});U.displayName="RadioGroupRoot",U.displayName="RadioGroupRoot";var q=R("label",function(e){var t,o=e.$disabled,r=e.$hasDescription,n=e.$labelPlacement,s=e.$theme,i=e.$align,a=s.sizing,u=i==="horizontal",f=s.direction==="rtl"?"Left":"Right";return t={flexDirection:n==="top"||n==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:o?"not-allowed":"pointer",marginTop:a.scale200},k(t,"margin".concat(f),u?a.scale200:null),k(t,"marginBottom",r&&!u?null:a.scale200),t});q.displayName="Root",q.displayName="Root";var G=R("div",function(e){var t=e.$theme,o=t.animation,r=t.sizing;return{backgroundColor:je(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:o.timing200,transitionTimingFunction:o.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});G.displayName="RadioMarkInner",G.displayName="RadioMarkInner";var W=R("div",function(e){var t=e.$theme,o=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:o.timing200,transitionTimingFunction:o.easeOutCurve}});W.displayName="RadioMarkOuter",W.displayName="RadioMarkOuter";var X=R("div",function(e){var t=e.$theme.typography;return C(C({verticalAlign:"middle"},$e(e)),{},{color:Se(e)},t.LabelMedium)});X.displayName="Label",X.displayName="Label";var K=R("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});K.displayName="Input",K.displayName="Input";var J=R("div",function(e){var t,o=e.$theme,r=e.$align,n=r==="horizontal",s=o.direction==="rtl"?"Right":"Left",i=o.direction==="rtl"?"Left":"Right";return C(C({},o.typography.ParagraphSmall),{},(t={color:o.colors.contentSecondary,cursor:"auto"},k(t,"margin".concat(s),r==="horizontal"?null:o.sizing.scale900),k(t,"margin".concat(i),n?o.sizing.scale200:null),k(t,"maxWidth","240px"),t))});J.displayName="Description",J.displayName="Description";function Q(e){"@babel/helpers - typeof";return Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(e)}function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},Y.apply(this,arguments)}function Me(e,t){return Ee(e)||xe(e,t)||Pe(e,t)||Fe()}function Fe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{b2 as R,bd as be,r as c,b3 as O,M as me,j as g,a_ as ge,b7 as ye,b0 as ve,aK as we,a2 as ne,a$ as Re}from"./index-lyJc68Dt.js";import{a as Oe}from"./useBasicWidgetState-BzSjsdCt.js";import"./FormClearHelper-Dhc_r76k.js";var ie={vertical:"vertical",horizontal:"horizontal"};function ae(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),o.push.apply(o,r)}return o}function C(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?ae(Object(o),!0).forEach(function(r){k(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ae(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function k(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var L=0,I=1,T=2;function B(e){return e.$isActive?T:e.$isHovered?I:L}function ke(e){var t=e.$theme.colors,o=e.$disabled,r=e.$checked,n=e.$isFocusVisible,s=e.$error;if(o)return t.tickFillDisabled;if(r)if(s)switch(B(e)){case L:return t.tickFillErrorSelected;case I:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(B(e)){case L:return t.tickFillSelected;case I:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return n?t.borderSelected:s?t.tickBorderError:t.tickBorder;return null}function je(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(B(e)){case L:return t.tickFillError;case I:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(B(e)){case L:return t.tickFill;case I:return t.tickFillHover;case T:return t.tickFillActive}}function $e(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n=r.direction==="rtl"?"Left":"Right";break;default:case"right":n=r.direction==="rtl"?"Right":"Left";break}var s=r.sizing,i=s.scale300;return k({},"padding".concat(n),i)}function Se(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var U=R("div",function(e){var t=e.$disabled,o=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:o==="horizontal"?"row":"column",alignItems:o==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});U.displayName="RadioGroupRoot",U.displayName="RadioGroupRoot";var q=R("label",function(e){var t,o=e.$disabled,r=e.$hasDescription,n=e.$labelPlacement,s=e.$theme,i=e.$align,a=s.sizing,u=i==="horizontal",f=s.direction==="rtl"?"Left":"Right";return t={flexDirection:n==="top"||n==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:o?"not-allowed":"pointer",marginTop:a.scale200},k(t,"margin".concat(f),u?a.scale200:null),k(t,"marginBottom",r&&!u?null:a.scale200),t});q.displayName="Root",q.displayName="Root";var G=R("div",function(e){var t=e.$theme,o=t.animation,r=t.sizing;return{backgroundColor:je(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:o.timing200,transitionTimingFunction:o.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});G.displayName="RadioMarkInner",G.displayName="RadioMarkInner";var W=R("div",function(e){var t=e.$theme,o=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:o.timing200,transitionTimingFunction:o.easeOutCurve}});W.displayName="RadioMarkOuter",W.displayName="RadioMarkOuter";var X=R("div",function(e){var t=e.$theme.typography;return C(C({verticalAlign:"middle"},$e(e)),{},{color:Se(e)},t.LabelMedium)});X.displayName="Label",X.displayName="Label";var K=R("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});K.displayName="Input",K.displayName="Input";var J=R("div",function(e){var t,o=e.$theme,r=e.$align,n=r==="horizontal",s=o.direction==="rtl"?"Right":"Left",i=o.direction==="rtl"?"Left":"Right";return C(C({},o.typography.ParagraphSmall),{},(t={color:o.colors.contentSecondary,cursor:"auto"},k(t,"margin".concat(s),r==="horizontal"?null:o.sizing.scale900),k(t,"margin".concat(i),n?o.sizing.scale200:null),k(t,"maxWidth","240px"),t))});J.displayName="Description",J.displayName="Description";function Q(e){"@babel/helpers - typeof";return Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(e)}function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},Y.apply(this,arguments)}function Me(e,t){return Ee(e)||xe(e,t)||Pe(e,t)||Fe()}function Fe(){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 Pe(e,t){if(e){if(typeof e=="string")return se(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return se(e,t)}}function se(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function xe(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var r=[],n=!0,s=!1,i,a;try{for(o=o.call(e);!(n=(i=o.next()).done)&&(r.push(i.value),!(t&&r.length===t));n=!0);}catch(u){s=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(s)throw a}}return r}}function Ee(e){if(Array.isArray(e))return e}function Le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Te(e,t,o){return Ie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},Z(e,t)}function Be(e){var t=De();return function(){var o=D(e),r;if(t){var n=D(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return Ae(this,r)}}function Ae(e,t){if(t&&(Q(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function De(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(e)}function z(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var le=function(e){Ce(o,e);var t=Be(o);function o(){var r;Le(this,o);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return r=t.call.apply(t,[this].concat(s)),z(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),z(A(r),"handleFocus",function(a,u){be(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:u}),r.props.onFocus&&r.props.onFocus(a)}),z(A(r),"handleBlur",function(a,u){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return Te(o,[{key:"render",value:function(){var r=this,n=this.props.overrides,s=n===void 0?{}:n,i=O(s.RadioGroupRoot,U),a=Me(i,2),u=a[0],f=a[1];return c.createElement(u,Y({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},f),c.Children.map(this.props.children,function(p,d){if(!c.isValidElement(p))return null;var h=r.props.value===p.props.value;return c.cloneElement(p,{align:r.props.align,autoFocus:r.props.autoFocus,checked:h,disabled:r.props.disabled||p.props.disabled,error:r.props.error,isFocused:r.state.focusedRadioIndex===d,isFocusVisible:r.state.isFocusVisible,tabIndex:d===0&&!r.props.value||h?"0":"-1",labelPlacement:r.props.labelPlacement,name:r.props.name,onBlur:function(l){return r.handleBlur(l,d)},onFocus:function(l){return r.handleFocus(l,d)},onChange:r.props.onChange,onMouseEnter:r.props.onMouseEnter,onMouseLeave:r.props.onMouseLeave})}))}}]),o}(c.Component);z(le,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function ee(e){"@babel/helpers - typeof";return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ee(e)}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},w.apply(this,arguments)}function F(e,t){return _e(e)||He(e,t)||Ve(e,t)||ze()}function ze(){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 Ve(e,t){if(e){if(typeof e=="string")return ce(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function He(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var r=[],n=!0,s=!1,i,a;try{for(o=o.call(e);!(n=(i=o.next()).done)&&(r.push(i.value),!(t&&r.length===t));n=!0);}catch(u){s=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(s)throw a}}return r}}function _e(e){if(Array.isArray(e))return e}function Ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ue(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qe(e,t,o){return Ue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&te(e,t)}function te(e,t){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},te(e,t)}function We(e){var t=Ke();return function(){var o=V(e),r;if(t){var n=V(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return Xe(this,r)}}function Xe(e,t){if(t&&(ee(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P(e)}function P(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ke(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},V(e)}function x(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Je(e){return e==="top"||e==="left"}function Qe(e){return e==="bottom"||e==="right"}var Ye=function(e){return e.stopPropagation()},ue=function(e){Ge(o,e);var t=We(o);function o(){var r;Ne(this,o);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return r=t.call.apply(t,[this].concat(s)),x(P(r),"state",{isActive:!1,isHovered:!1}),x(P(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),x(P(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),x(P(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),x(P(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return qe(o,[{key:"componentDidMount",value:function(){var r;this.props.autoFocus&&(r=this.props.inputRef)!==null&&r!==void 0&&r.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var r=this.props.overrides,n=r===void 0?{}:r,s=O(n.Root,q),i=F(s,2),a=i[0],u=i[1],f=O(n.Label,X),p=F(f,2),d=p[0],h=p[1],l=O(n.Input,K),b=F(l,2),j=b[0],H=b[1],$=O(n.Description,J),E=F($,2),_=E[0],S=E[1],N=O(n.RadioMarkInner,G),m=F(N,2),y=m[0],v=m[1],pe=O(n.RadioMarkOuter,W),re=F(pe,2),de=re[0],fe=re[1],M={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},oe=c.createElement(d,w({},M,h),this.props.containsInteractiveElement?c.createElement("div",{onClick:function(he){return he.preventDefault()}},this.props.children):this.props.children);return c.createElement(c.Fragment,null,c.createElement(a,w({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},M,u),Je(this.props.labelPlacement)&&oe,c.createElement(de,w({},M,fe),c.createElement(y,w({},M,v))),c.createElement(j,w({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:Ye,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},M,H)),Qe(this.props.labelPlacement)&&oe),!!this.props.description&&c.createElement(_,w({},M,S),this.props.description))}}]),o}(c.Component);x(ue,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:c.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function Ze({disabled:e,horizontal:t,width:o,value:r,onChange:n,options:s,captions:i,label:a,labelVisibility:u,help:f}){const[p,d]=c.useState(r??null);c.useEffect(()=>{r!==p&&d(r??null)},[r]);const h=c.useCallback(m=>{const y=parseInt(m.target.value,10);d(y),n(y)},[n]),l=me(),{colors:b,radii:j}=l,H={width:o},$=i.length>0,E=s.length>0,_=E?s:["No options to select."],S=e||!E,N=m=>m==""&&t&&$?"&nbsp;":m;return g.jsxs("div",{className:"stRadio","data-testid":"stRadio",style:H,children:[g.jsx(ge,{label:a,disabled:S,labelVisibility:u,children:f&&g.jsx(ye,{children:g.jsx(ve,{content:f,placement:we.TOP_RIGHT})})}),g.jsx(le,{onChange:h,value:p!==null?p.toString():void 0,disabled:S,align:t?ie.horizontal:ie.vertical,"aria-label":a,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:$?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:_.map((m,y)=>g.jsxs(ue,{value:y.toString(),overrides:{Root:{style:({$isFocusVisible:v})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:$?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:v?b.darkenedBgMix25:"",borderTopLeftRadius:j.md,borderTopRightRadius:j.md,borderBottomLeftRadius:j.md,borderBottomRightRadius:j.md})},RadioMarkOuter:{style:({$checked:v})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:v&&!S?b.primary:b.fadedText40})},RadioMarkInner:{style:({$checked:v})=>({height:v?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`,width:v?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`})},Label:{style:{color:S?b.fadedText40:b.bodyText,position:"relative",top:l.spacing.px}}},children:[g.jsx(ne,{source:m,allowHTML:!1,isLabel:!0,largerLabel:!0}),$&&g.jsx(ne,{source:N(i[y]),allowHTML:!1,isCaption:!0,isLabel:!0})]},y))})]})}const et=c.memo(Ze);function tt({disabled:e,element:t,widgetMgr:o,width:r,fragmentId:n}){const[s,i]=Oe({getStateFromWidgetMgr:rt,getDefaultStateFromProto:ot,getCurrStateFromProto:nt,updateWidgetMgrState:it,element:t,widgetMgr:o,fragmentId:n}),a=c.useCallback(b=>{i({value:b,fromUi:!0})},[i]),{horizontal:u,options:f,captions:p,label:d,labelVisibility:h,help:l}=t;return g.jsx(et,{label:d,onChange:a,options:f,captions:p,width:r,disabled:e,horizontal:u,labelVisibility:Re(h==null?void 0:h.value),value:s??null,help:l})}function rt(e,t){return e.getIntValue(t)}function ot(e){return e.default??null}function nt(e){return e.value??null}function it(e,t,o,r){t.setIntValue(e,o.value??null,{fromUi:o.fromUi},r)}const at=c.memo(tt);export{at as default};
@@ -1 +1 @@
1
- import{c as s,R as g,a6 as f,aJ as b,M as k,j as t,aH as m,aK as C,al as j,a2 as v}from"./index-DuoBWGu3.js";const y=s("div",{target:"e11k5jya2"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"}),w=s("a",{target:"e11k5jya1"})(({disabled:a,isCurrentPage:r,fluidWidth:n,theme:e})=>({textDecoration:"none",width:typeof n=="number"?`${n}px`:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,borderRadius:e.radii.default,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,marginTop:e.spacing.threeXS,marginBottom:e.spacing.threeXS,lineHeight:e.lineHeights.menuItem,backgroundColor:r?e.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:r?e.colors.darkenedBgMix25:e.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:e.colors.darkenedBgMix15},"@media print":{paddingLeft:e.spacing.none},...a?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed","&:hover":{color:e.colors.fadedText40,backgroundColor:e.colors.transparent}}:{}}),""),L=s("span",{target:"e11k5jya0"})(({disabled:a,theme:r})=>({color:r.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...a?{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}:{}}),"");function T(a,r){return a===null&&r?!0:a===null&&!r?!1:a===!0}function P(a){const{onPageChange:r,currentPageScriptHash:n}=g.useContext(f),e=g.useContext(b),{colors:p}=k(),{disabled:l,element:o,width:i}=a,u={width:i},h=T(o.useContainerWidth,e),d=n===o.pageScriptHash,x=c=>{o.external?l&&c.preventDefault():(c.preventDefault(),l||r(o.pageScriptHash))};return t.jsx("div",{className:"stPageLink","data-testid":"stPageLink",style:u,children:t.jsx(m,{help:o.help,placement:C.TOP_RIGHT,children:t.jsx(y,{children:t.jsxs(w,{"data-testid":"stPageLink-NavLink",disabled:l,isCurrentPage:d,fluidWidth:h?i:!1,href:o.page,target:o.external?"_blank":"",rel:"noreferrer",onClick:x,children:[o.icon&&t.jsx(j,{size:"lg",color:p.bodyText,iconValue:o.icon}),t.jsx(L,{disabled:l,children:t.jsx(v,{source:o.label,allowHTML:!1,isLabel:!0,boldLabel:d,largerLabel:!0,disableLinks:!0})})]})})})})}export{P as default};
1
+ import{c as s,R as g,a6 as f,aJ as b,M as k,j as t,aH as m,aK as C,al as j,a2 as v}from"./index-lyJc68Dt.js";const y=s("div",{target:"e11k5jya2"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"}),w=s("a",{target:"e11k5jya1"})(({disabled:a,isCurrentPage:r,fluidWidth:n,theme:e})=>({textDecoration:"none",width:typeof n=="number"?`${n}px`:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,borderRadius:e.radii.default,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,marginTop:e.spacing.threeXS,marginBottom:e.spacing.threeXS,lineHeight:e.lineHeights.menuItem,backgroundColor:r?e.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:r?e.colors.darkenedBgMix25:e.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:e.colors.darkenedBgMix15},"@media print":{paddingLeft:e.spacing.none},...a?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed","&:hover":{color:e.colors.fadedText40,backgroundColor:e.colors.transparent}}:{}}),""),L=s("span",{target:"e11k5jya0"})(({disabled:a,theme:r})=>({color:r.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...a?{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}:{}}),"");function T(a,r){return a===null&&r?!0:a===null&&!r?!1:a===!0}function P(a){const{onPageChange:r,currentPageScriptHash:n}=g.useContext(f),e=g.useContext(b),{colors:p}=k(),{disabled:l,element:o,width:i}=a,u={width:i},h=T(o.useContainerWidth,e),d=n===o.pageScriptHash,x=c=>{o.external?l&&c.preventDefault():(c.preventDefault(),l||r(o.pageScriptHash))};return t.jsx("div",{className:"stPageLink","data-testid":"stPageLink",style:u,children:t.jsx(m,{help:o.help,placement:C.TOP_RIGHT,children:t.jsx(y,{children:t.jsxs(w,{"data-testid":"stPageLink-NavLink",disabled:l,isCurrentPage:d,fluidWidth:h?i:!1,href:o.page,target:o.external?"_blank":"",rel:"noreferrer",onClick:x,children:[o.icon&&t.jsx(j,{size:"lg",color:p.bodyText,iconValue:o.icon}),t.jsx(L,{disabled:l,children:t.jsx(v,{source:o.label,allowHTML:!1,isLabel:!0,boldLabel:d,largerLabel:!0,disableLinks:!0})})]})})})})}export{P as default};
@@ -1,4 +1,4 @@
1
- var rN;import{g as vw,a9 as Zl,B as yg,J as bw,aa as oN,ab as aN,ac as ms,ad as Af,S as na,ae as sN,af as lN,ag as xw,ah as uN,C as cN,Q as fN,c as dN,M as hN,j as tu,r as pN,F as _w,a7 as mN,$ as vg,ai as gN,aj as ww}from"./index-DuoBWGu3.js";import{a as eu,n as yN,b as vN,c as Cf,t as ia,f as bN,d as bg,p as xN,e as _N,g as wN,h as kw,i as kN,j as no,k as nu,l as EN,m as $N,o as SN,q as DN,r as Ff,s as Ew,u as gs,v as xg,w as Mf,x as $w,y as io,z as ys,A as AN,B as ro,C as CN,D as FN,E as MN,F as TN}from"./threshold-C19zgWBv.js";import{d as _g,e as wg,R as Tf,C as kg,r as Sw,b as Dw,a as Aw,h as Of,c as Eg,n as Me,f as ON,g as NN,i as zN,j as RN,k as LN,l as PN,m as BN,o as Nf}from"./string-Bl9OLDCw.js";import{i as jN,a as IN,n as UN,T as qN,t as WN}from"./timer-C68DGyYc.js";import{F as HN}from"./FormClearHelper-BIZNCxvb.js";import{S as Cw,T as VN}from"./Toolbar-B1zMj-jg.js";import{w as GN,u as YN,E as XN}from"./withFullScreenWrapper-BzdPuFtI.js";/*!
1
+ var rN;import{g as vw,a9 as Zl,B as yg,J as bw,aa as oN,ab as aN,ac as ms,ad as Af,S as na,ae as sN,af as lN,ag as xw,ah as uN,C as cN,Q as fN,c as dN,M as hN,j as tu,r as pN,F as _w,a7 as mN,$ as vg,ai as gN,aj as ww}from"./index-lyJc68Dt.js";import{a as eu,n as yN,b as vN,c as Cf,t as ia,f as bN,d as bg,p as xN,e as _N,g as wN,h as kw,i as kN,j as no,k as nu,l as EN,m as $N,o as SN,q as DN,r as Ff,s as Ew,u as gs,v as xg,w as Mf,x as $w,y as io,z as ys,A as AN,B as ro,C as CN,D as FN,E as MN,F as TN}from"./threshold-C19zgWBv.js";import{d as _g,e as wg,R as Tf,C as kg,r as Sw,b as Dw,a as Aw,h as Of,c as Eg,n as Me,f as ON,g as NN,i as zN,j as RN,k as LN,l as PN,m as BN,o as Nf}from"./string-Bl9OLDCw.js";import{i as jN,a as IN,n as UN,T as qN,t as WN}from"./timer-C68DGyYc.js";import{F as HN}from"./FormClearHelper-Dhc_r76k.js";import{S as Cw,T as VN}from"./Toolbar-BTpOoeAP.js";import{w as GN,u as YN,E as XN}from"./withFullScreenWrapper-BggmGF09.js";/*!
2
2
  * https://github.com/Starcounter-Jack/JSON-Patch
3
3
  * (c) 2017-2022 Joachim Wester
4
4
  * MIT licensed
@@ -1 +1 @@
1
- import{r,E as P,_ as $,c as R,ak as se,bZ as ne,F as K,c7 as y,B as m,j as l,a_ as de,a$ as ue,bc as ce,b0 as pe,aK as me,aY as G}from"./index-DuoBWGu3.js";import{s as be}from"./sprintf-C-r3gIuM.js";import{u as ge}from"./uniqueId-D81S8Chc.js";import{u as fe}from"./FormClearHelper-BIZNCxvb.js";import{I as he}from"./InputInstructions-B9wXy3U4.js";import{I as ye}from"./input-OLwqq6dJ.js";import"./base-input-CMN1_Ew_.js";var X=r.forwardRef(function(e,t){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(P,$({iconAttrs:a,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 a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(P,$({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),r.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Y.displayName="Plus";const we=R("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.widgetBackgroundColor||e.colors.bgColor,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:e.radii.default,overflow:"hidden","&.focused":{borderColor:e.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:e.spacing.none}}}),""),ve=R("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),Z=R("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.widgetBackgroundColor||e.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:e.colors.white,backgroundColor:e.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:e.radii.default,borderBottomRightRadius:e.radii.default},"&:disabled":{cursor:"not-allowed",color:e.colors.fadedText40}}),""),xe=R("div",{target:"e116k4er0"})(({theme:e,clearable:t})=>({position:"absolute",marginRight:e.spacing.twoXS,left:0,right:`calc(${e.sizes.numberInputControlsWidth} * 2 + ${t?"1em":"0em"})`}),"");function Ie(e){return m(e)||e===""?void 0:e}const Te=e=>(e.element.dataType===y.DataType.INT?e.widgetMgr.getIntValue(e.element):e.widgetMgr.getDoubleValue(e.element))??e.element.default??null,q=({step:e,dataType:t})=>e||(t===y.DataType.INT?1:.01),N=({value:e,format:t,step:a,dataType:w})=>{if(m(e))return null;let i=Ie(t);if(m(i)&&K(a)){const c=a.toString();w===y.DataType.FLOAT&&a!==0&&c.includes(".")&&(i=`%0.${c.split(".")[1].length}f`)}if(m(i))return e.toString();try{return be.sprintf(i,e)}catch{return String(e)}},ke=(e,t,a)=>m(e)?!1:e-t>=a,Ce=(e,t,a)=>m(e)?!1:e+t<=a,Re=({disabled:e,element:t,widgetMgr:a,width:w,theme:i,fragmentId:c})=>{var O;const{dataType:S,id:V,formId:p,default:B,format:F}=t,b=t.hasMin?t.min:-1/0,g=t.hasMax?t.max:1/0,[s,J]=r.useState(q(t)),M=Te({element:t,widgetMgr:a}),[f,v]=r.useState(!1),[n,x]=r.useState(M),[W,I]=r.useState(N({value:M,...t,step:s})),[A,U]=r.useState(!1),j=r.useRef(null),H=r.useRef(ge("number_input_")),T=ke(n,s,b),k=Ce(n,s,g),_=ne({formId:p}),Q=_?a.allowFormEnterToSubmit(p):f,ee=A&&w>i.breakpoints.hideWidgetDetails;r.useEffect(()=>{J(q({step:t.step,dataType:t.dataType}))},[t.dataType,t.step]);const d=r.useCallback(({value:o,source:u})=>{var h;if(K(o)&&(b>o||o>g))(h=j.current)==null||h.reportValidity();else{const C=o??B??null;switch(S){case y.DataType.INT:a.setIntValue({id:V,formId:p},C,u,c);break;case y.DataType.FLOAT:a.setDoubleValue({id:V,formId:p},C,u,c);break;default:throw new Error("Invalid data type")}v(!1),x(C),I(N({value:C,dataType:S,format:F,step:s}))}},[b,g,j,a,c,s,S,V,p,B,F]),te=r.useCallback(()=>{f&&d({value:n,source:{fromUi:!0}}),U(!1)},[f,n,d]),re=r.useCallback(()=>{U(!0)},[]),L=r.useCallback(()=>{const{value:o}=t;t.setValue=!1,x(o??null),I(N({value:o??null,...t,step:s})),d({value:o??null,source:{fromUi:!1}})},[t,s,d]);r.useEffect(()=>{t.setValue?L():d({value:n,source:{fromUi:!1}})},[]),t.setValue&&L();const z=m(t.default)&&!e,ae=r.useCallback(()=>{const o=t.default??null;x(o),d({value:o,source:{fromUi:!0}})},[t]);fe({element:t,widgetMgr:a,onFormCleared:ae});const oe=o=>{const{value:u}=o.target;if(u==="")v(!0),x(null),I(null);else{let h;t.dataType===y.DataType.INT?h=parseInt(u,10):h=parseFloat(u),v(!0),x(h),I(u)}},D=r.useCallback(()=>{k&&(v(!0),d({value:(n??b)+s,source:{fromUi:!0}}))},[n,b,s,k]),E=r.useCallback(()=>{T&&(v(!0),d({value:(n??g)-s,source:{fromUi:!0}}))},[n,g,s,T]),ie=r.useCallback(o=>{const{key:u}=o;switch(u){case"ArrowUp":o.preventDefault(),D();break;case"ArrowDown":o.preventDefault(),E();break}},[D,E]),le=r.useCallback(o=>{o.key==="Enter"&&(f&&d({value:n,source:{fromUi:!0}}),a.allowFormEnterToSubmit(p)&&a.submitForm(p,c))},[f,n,d,a,p,c]);return l.jsxs("div",{className:"stNumberInput","data-testid":"stNumberInput",style:{width:w},children:[l.jsx(de,{label:t.label,disabled:e,labelVisibility:ue((O=t.labelVisibility)==null?void 0:O.value),htmlFor:H.current,children:t.help&&l.jsx(ce,{children:l.jsx(pe,{content:t.help,placement:me.TOP_RIGHT})})}),l.jsxs(we,{className:A?"focused":"","data-testid":"stNumberInputContainer",children:[l.jsx(ye,{type:"number",inputRef:j,value:W??"",placeholder:t.placeholder,onBlur:te,onFocus:re,onChange:oe,onKeyPress:le,onKeyDown:ie,clearable:z,clearOnEscape:z,disabled:e,"aria-label":t.label,id:H.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:b,max:g,type:"number",inputMode:""},style:{lineHeight:i.lineHeights.inputWidget,paddingRight:i.spacing.sm,paddingLeft:i.spacing.sm,paddingBottom:i.spacing.sm,paddingTop:i.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0}}}}),w>i.breakpoints.hideNumberInputControls&&l.jsxs(ve,{children:[l.jsx(Z,{"data-testid":"stNumberInputStepDown",onClick:E,disabled:!T||e,tabIndex:-1,children:l.jsx(G,{content:X,size:"xs",color:T?"inherit":"disabled"})}),l.jsx(Z,{"data-testid":"stNumberInputStepUp",onClick:D,disabled:!k||e,tabIndex:-1,children:l.jsx(G,{content:Y,size:"xs",color:k?"inherit":"disabled"})})]})]}),ee&&l.jsx(xe,{clearable:z,children:l.jsx(he,{dirty:f,value:W??"",inForm:_,allowEnterToSubmit:Q})})]})},Se=se(Re);export{Se as default};
1
+ import{r,E as P,_ as $,c as R,ak as se,bZ as ne,F as K,c7 as y,B as m,j as l,a_ as de,a$ as ue,bc as ce,b0 as pe,aK as me,aY as G}from"./index-lyJc68Dt.js";import{s as be}from"./sprintf-C-r3gIuM.js";import{u as ge}from"./uniqueId-K4UOiJl2.js";import{u as fe}from"./FormClearHelper-Dhc_r76k.js";import{I as he}from"./InputInstructions-DBmZV4qq.js";import{I as ye}from"./input-B0OfG1Hd.js";import"./base-input-BNFPjj94.js";var X=r.forwardRef(function(e,t){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(P,$({iconAttrs:a,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 a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(P,$({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),r.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Y.displayName="Plus";const we=R("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.widgetBackgroundColor||e.colors.bgColor,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:e.radii.default,overflow:"hidden","&.focused":{borderColor:e.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:e.spacing.none}}}),""),ve=R("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),Z=R("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.widgetBackgroundColor||e.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:e.colors.white,backgroundColor:e.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:e.radii.default,borderBottomRightRadius:e.radii.default},"&:disabled":{cursor:"not-allowed",color:e.colors.fadedText40}}),""),xe=R("div",{target:"e116k4er0"})(({theme:e,clearable:t})=>({position:"absolute",marginRight:e.spacing.twoXS,left:0,right:`calc(${e.sizes.numberInputControlsWidth} * 2 + ${t?"1em":"0em"})`}),"");function Ie(e){return m(e)||e===""?void 0:e}const Te=e=>(e.element.dataType===y.DataType.INT?e.widgetMgr.getIntValue(e.element):e.widgetMgr.getDoubleValue(e.element))??e.element.default??null,q=({step:e,dataType:t})=>e||(t===y.DataType.INT?1:.01),N=({value:e,format:t,step:a,dataType:w})=>{if(m(e))return null;let i=Ie(t);if(m(i)&&K(a)){const c=a.toString();w===y.DataType.FLOAT&&a!==0&&c.includes(".")&&(i=`%0.${c.split(".")[1].length}f`)}if(m(i))return e.toString();try{return be.sprintf(i,e)}catch{return String(e)}},ke=(e,t,a)=>m(e)?!1:e-t>=a,Ce=(e,t,a)=>m(e)?!1:e+t<=a,Re=({disabled:e,element:t,widgetMgr:a,width:w,theme:i,fragmentId:c})=>{var O;const{dataType:S,id:V,formId:p,default:B,format:F}=t,b=t.hasMin?t.min:-1/0,g=t.hasMax?t.max:1/0,[s,J]=r.useState(q(t)),M=Te({element:t,widgetMgr:a}),[f,v]=r.useState(!1),[n,x]=r.useState(M),[W,I]=r.useState(N({value:M,...t,step:s})),[A,U]=r.useState(!1),j=r.useRef(null),H=r.useRef(ge("number_input_")),T=ke(n,s,b),k=Ce(n,s,g),_=ne({formId:p}),Q=_?a.allowFormEnterToSubmit(p):f,ee=A&&w>i.breakpoints.hideWidgetDetails;r.useEffect(()=>{J(q({step:t.step,dataType:t.dataType}))},[t.dataType,t.step]);const d=r.useCallback(({value:o,source:u})=>{var h;if(K(o)&&(b>o||o>g))(h=j.current)==null||h.reportValidity();else{const C=o??B??null;switch(S){case y.DataType.INT:a.setIntValue({id:V,formId:p},C,u,c);break;case y.DataType.FLOAT:a.setDoubleValue({id:V,formId:p},C,u,c);break;default:throw new Error("Invalid data type")}v(!1),x(C),I(N({value:C,dataType:S,format:F,step:s}))}},[b,g,j,a,c,s,S,V,p,B,F]),te=r.useCallback(()=>{f&&d({value:n,source:{fromUi:!0}}),U(!1)},[f,n,d]),re=r.useCallback(()=>{U(!0)},[]),L=r.useCallback(()=>{const{value:o}=t;t.setValue=!1,x(o??null),I(N({value:o??null,...t,step:s})),d({value:o??null,source:{fromUi:!1}})},[t,s,d]);r.useEffect(()=>{t.setValue?L():d({value:n,source:{fromUi:!1}})},[]),t.setValue&&L();const z=m(t.default)&&!e,ae=r.useCallback(()=>{const o=t.default??null;x(o),d({value:o,source:{fromUi:!0}})},[t]);fe({element:t,widgetMgr:a,onFormCleared:ae});const oe=o=>{const{value:u}=o.target;if(u==="")v(!0),x(null),I(null);else{let h;t.dataType===y.DataType.INT?h=parseInt(u,10):h=parseFloat(u),v(!0),x(h),I(u)}},D=r.useCallback(()=>{k&&(v(!0),d({value:(n??b)+s,source:{fromUi:!0}}))},[n,b,s,k]),E=r.useCallback(()=>{T&&(v(!0),d({value:(n??g)-s,source:{fromUi:!0}}))},[n,g,s,T]),ie=r.useCallback(o=>{const{key:u}=o;switch(u){case"ArrowUp":o.preventDefault(),D();break;case"ArrowDown":o.preventDefault(),E();break}},[D,E]),le=r.useCallback(o=>{o.key==="Enter"&&(f&&d({value:n,source:{fromUi:!0}}),a.allowFormEnterToSubmit(p)&&a.submitForm(p,c))},[f,n,d,a,p,c]);return l.jsxs("div",{className:"stNumberInput","data-testid":"stNumberInput",style:{width:w},children:[l.jsx(de,{label:t.label,disabled:e,labelVisibility:ue((O=t.labelVisibility)==null?void 0:O.value),htmlFor:H.current,children:t.help&&l.jsx(ce,{children:l.jsx(pe,{content:t.help,placement:me.TOP_RIGHT})})}),l.jsxs(we,{className:A?"focused":"","data-testid":"stNumberInputContainer",children:[l.jsx(ye,{type:"number",inputRef:j,value:W??"",placeholder:t.placeholder,onBlur:te,onFocus:re,onChange:oe,onKeyPress:le,onKeyDown:ie,clearable:z,clearOnEscape:z,disabled:e,"aria-label":t.label,id:H.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:b,max:g,type:"number",inputMode:""},style:{lineHeight:i.lineHeights.inputWidget,paddingRight:i.spacing.sm,paddingLeft:i.spacing.sm,paddingBottom:i.spacing.sm,paddingTop:i.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0}}}}),w>i.breakpoints.hideNumberInputControls&&l.jsxs(ve,{children:[l.jsx(Z,{"data-testid":"stNumberInputStepDown",onClick:E,disabled:!T||e,tabIndex:-1,children:l.jsx(G,{content:X,size:"xs",color:T?"inherit":"disabled"})}),l.jsx(Z,{"data-testid":"stNumberInputStepUp",onClick:D,disabled:!k||e,tabIndex:-1,children:l.jsx(G,{content:Y,size:"xs",color:k?"inherit":"disabled"})})]})]}),ee&&l.jsx(xe,{clearable:z,children:l.jsx(he,{dirty:f,value:W??"",inForm:_,allowEnterToSubmit:Q})})]})},Se=se(Re);export{Se as default};
@@ -1 +1 @@
1
- import{c as d,aE as f,Q as g,aF as a,aG as l,j as s,aH as y,aI as v}from"./index-DuoBWGu3.js";function C(r,e){switch(r){case a.XSMALL:return{padding:`${e.spacing.twoXS} ${e.spacing.sm}`,fontSize:e.fontSizes.sm};case a.SMALL:return{padding:`${e.spacing.twoXS} ${e.spacing.md}`};case a.LARGE:return{padding:`${e.spacing.md} ${e.spacing.md}`};default:return{padding:`${e.spacing.xs} ${e.spacing.md}`}}}const h=d("a",{target:"e16zdaao3"})(({fluidWidth:r,size:e,theme:o})=>{const i=typeof r=="number"?`${r}px`:"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:o.fontWeights.normal,padding:`${o.spacing.xs} ${o.spacing.md}`,borderRadius:o.radii.default,minHeight:o.sizes.minElementHeight,margin:0,lineHeight:o.lineHeights.base,color:o.colors.primary,textDecoration:"none",width:r?i:"auto",userSelect:"none","&:visited":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${g(o.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...C(e,o)}},""),x=d(h,{target:"e16zdaao2"})(({theme:r})=>({backgroundColor:r.colors.primary,color:r.colors.white,border:`${r.sizes.borderWidth} solid ${r.colors.primary}`,"&:hover":{backgroundColor:f(r.colors.primary,.05),color:r.colors.white},"&:active":{backgroundColor:"transparent",color:r.colors.primary},"&:visited:not(:active)":{color:r.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}),""),k=d(h,{target:"e16zdaao1"})(({theme:r})=>({backgroundColor:r.colors.lightenedBg05,color:r.colors.bodyText,border:`${r.sizes.borderWidth} solid ${r.colors.borderColor}`,"&:visited":{color:r.colors.bodyText},"&:hover":{borderColor:r.colors.primary,color:r.colors.primary},"&:active":{color:r.colors.white,borderColor:r.colors.primary,backgroundColor:r.colors.primary},"&:focus:not(:active)":{borderColor:r.colors.primary,color:r.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}),""),$=d(h,{target:"e16zdaao0"})(({theme:r})=>({padding:r.spacing.none,backgroundColor:r.colors.transparent,color:r.colors.bodyText,border:"none","&:visited":{color:r.colors.bodyText},"&:hover":{color:r.colors.primary},"&:active":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:r.colors.primary,boxShadow:`0 0 0 0.2rem ${g(r.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}),"");function w({kind:r,size:e,disabled:o,fluidWidth:i,children:n,autoFocus:t,href:c,rel:b,target:u,onClick:m}){let p=x;return r===l.SECONDARY?p=k:r===l.TERTIARY&&(p=$),s.jsx(p,{kind:r,size:e||a.MEDIUM,fluidWidth:i||!1,disabled:o||!1,autoFocus:t||!1,href:c,target:u,rel:b,onClick:m,tabIndex:o?-1:0,"data-testid":`stBaseLinkButton-${r}`,children:n})}function z(r){const{disabled:e,element:o,width:i}=r,n={width:i};let t=l.SECONDARY;o.type==="primary"?t=l.PRIMARY:o.type==="tertiary"&&(t=l.TERTIARY);const c=o.help?i:!0,b=u=>{r.disabled&&u.preventDefault()};return s.jsx("div",{className:"stLinkButton","data-testid":"stLinkButton",style:n,children:s.jsx(y,{help:o.help,children:s.jsx(w,{kind:t,size:a.SMALL,disabled:e,onClick:b,fluidWidth:o.useContainerWidth?c:!1,href:o.url,target:"_blank",rel:"noreferrer","aria-disabled":e,children:s.jsx(v,{icon:o.icon,label:o.label})})})})}export{z as default};
1
+ import{c as d,aE as f,Q as g,aF as a,aG as l,j as s,aH as y,aI as v}from"./index-lyJc68Dt.js";function C(r,e){switch(r){case a.XSMALL:return{padding:`${e.spacing.twoXS} ${e.spacing.sm}`,fontSize:e.fontSizes.sm};case a.SMALL:return{padding:`${e.spacing.twoXS} ${e.spacing.md}`};case a.LARGE:return{padding:`${e.spacing.md} ${e.spacing.md}`};default:return{padding:`${e.spacing.xs} ${e.spacing.md}`}}}const h=d("a",{target:"e16zdaao3"})(({fluidWidth:r,size:e,theme:o})=>{const i=typeof r=="number"?`${r}px`:"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:o.fontWeights.normal,padding:`${o.spacing.xs} ${o.spacing.md}`,borderRadius:o.radii.default,minHeight:o.sizes.minElementHeight,margin:0,lineHeight:o.lineHeights.base,color:o.colors.primary,textDecoration:"none",width:r?i:"auto",userSelect:"none","&:visited":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${g(o.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...C(e,o)}},""),x=d(h,{target:"e16zdaao2"})(({theme:r})=>({backgroundColor:r.colors.primary,color:r.colors.white,border:`${r.sizes.borderWidth} solid ${r.colors.primary}`,"&:hover":{backgroundColor:f(r.colors.primary,.05),color:r.colors.white},"&:active":{backgroundColor:"transparent",color:r.colors.primary},"&:visited:not(:active)":{color:r.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}),""),k=d(h,{target:"e16zdaao1"})(({theme:r})=>({backgroundColor:r.colors.lightenedBg05,color:r.colors.bodyText,border:`${r.sizes.borderWidth} solid ${r.colors.borderColor}`,"&:visited":{color:r.colors.bodyText},"&:hover":{borderColor:r.colors.primary,color:r.colors.primary},"&:active":{color:r.colors.white,borderColor:r.colors.primary,backgroundColor:r.colors.primary},"&:focus:not(:active)":{borderColor:r.colors.primary,color:r.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}),""),$=d(h,{target:"e16zdaao0"})(({theme:r})=>({padding:r.spacing.none,backgroundColor:r.colors.transparent,color:r.colors.bodyText,border:"none","&:visited":{color:r.colors.bodyText},"&:hover":{color:r.colors.primary},"&:active":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:r.colors.primary,boxShadow:`0 0 0 0.2rem ${g(r.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}),"");function w({kind:r,size:e,disabled:o,fluidWidth:i,children:n,autoFocus:t,href:c,rel:b,target:u,onClick:m}){let p=x;return r===l.SECONDARY?p=k:r===l.TERTIARY&&(p=$),s.jsx(p,{kind:r,size:e||a.MEDIUM,fluidWidth:i||!1,disabled:o||!1,autoFocus:t||!1,href:c,target:u,rel:b,onClick:m,tabIndex:o?-1:0,"data-testid":`stBaseLinkButton-${r}`,children:n})}function z(r){const{disabled:e,element:o,width:i}=r,n={width:i};let t=l.SECONDARY;o.type==="primary"?t=l.PRIMARY:o.type==="tertiary"&&(t=l.TERTIARY);const c=o.help?i:!0,b=u=>{r.disabled&&u.preventDefault()};return s.jsx("div",{className:"stLinkButton","data-testid":"stLinkButton",style:n,children:s.jsx(y,{help:o.help,children:s.jsx(w,{kind:t,size:a.SMALL,disabled:e,onClick:b,fluidWidth:o.useContainerWidth?c:!1,href:o.url,target:"_blank",rel:"noreferrer","aria-disabled":e,children:s.jsx(v,{icon:o.icon,label:o.label})})})})}export{z as default};