@stlite/desktop 0.90.11 → 0.90.13
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.
- package/CHANGELOG.md +12 -0
- package/build/assets/{ErrorOutline.esm-CGVP5MR5.js → ErrorOutline.esm-CJGMKtXr.js} +1 -1
- package/build/assets/{FileDownload.esm-DRw0GU4W.js → FileDownload.esm-DVbGfwz7.js} +1 -1
- package/build/assets/{FileHelper-DPutc5L1.js → FileHelper-BAjDG49X.js} +1 -1
- package/build/assets/{FormClearHelper-CNtDBzvU.js → FormClearHelper-CaLJK07N.js} +1 -1
- package/build/assets/{Hooks-DEqVt10P.js → Hooks-D54IehuR.js} +1 -1
- package/build/assets/{InputInstructions-CYN5pWtc.js → InputInstructions-BLplNLW9.js} +1 -1
- package/build/assets/{Particles-BFhdwScH.js → Particles-VYhfVp_p.js} +1 -1
- package/build/assets/{ProgressBar-BxIGBDpX.js → ProgressBar-DX8k7XSZ.js} +1 -1
- package/build/assets/{Toolbar-DZSYfgER.js → Toolbar-BbbydoLD.js} +1 -1
- package/build/assets/{base-input-CDtHdiX2.js → base-input-d4WKPeU6.js} +1 -1
- package/build/assets/{checkbox-BWPUCDzk.js → checkbox-DUA9ewQT.js} +1 -1
- package/build/assets/{createSuper-DRBibar_.js → createSuper-CoIMxZYP.js} +1 -1
- package/build/assets/{data-grid-overlay-editor-d9lrfvrX.js → data-grid-overlay-editor-cvHWuOOd.js} +1 -1
- package/build/assets/{downloader-CadyDzLl.js → downloader-CR6bzPv-.js} +1 -1
- package/build/assets/{es6-DXJfyb4B.js → es6-BCBcAdQS.js} +2 -2
- package/build/assets/{iframeResizer.contentWindow-BHAHPBQS.js → iframeResizer.contentWindow-CEqjsNrn.js} +1 -1
- package/build/assets/{index-CehLOm7L.js → index-B3GOsGpL.js} +1 -1
- package/build/assets/{index-FcCBykqI.js → index-B58bWjQH.js} +1 -1
- package/build/assets/{index-wWX1T45-.js → index-B7yzG-4X.js} +5 -5
- package/build/assets/{index-CrjEhyMB.js → index-BD2ZweM9.js} +1 -1
- package/build/assets/{index-i0_Oh-Dl.js → index-BGUuVZft.js} +1 -1
- package/build/assets/{index-CrJrTvHb.js → index-BJK2Ym_S.js} +1 -1
- package/build/assets/{index-sq5xGN6c.js → index-BMSSeqlt.js} +1 -1
- package/build/assets/{index-C-z83jR8.js → index-BRiK5gVx.js} +1 -1
- package/build/assets/{index-cja8oZxE.js → index-BdVfRySM.js} +1 -1
- package/build/assets/{index-CdQSBtKU.js → index-Bhgfj5y5.js} +1 -1
- package/build/assets/{index-BayeI3Y8.js → index-Bwfh73dd.js} +1 -1
- package/build/assets/{index-CzHgae1d.js → index-C91sP-jG.js} +1 -1
- package/build/assets/{index-Y5GMER81.js → index-CD0SY35r.js} +1 -1
- package/build/assets/{index-xRpExM0P.js → index-CHBxMYoz.js} +1 -1
- package/build/assets/{index--6Tmibu-.js → index-CIRTE79j.js} +1 -1
- package/build/assets/{index-C5CelRVp.js → index-CJWk1YT9.js} +1 -1
- package/build/assets/{index-CDOZLgUW.js → index-CTZrIDfL.js} +1 -1
- package/build/assets/{index-S2M1jZve.js → index-CdAXvPf5.js} +1 -1
- package/build/assets/{index-C5Vs7DkV.js → index-CeNNLDtJ.js} +1 -1
- package/build/assets/{index-DKFOxClg.js → index-CwPp5UqK.js} +1 -1
- package/build/assets/{index-B4-tzIvm.js → index-D9P3ZYiC.js} +1 -1
- package/build/assets/{index-C0h1sWt9.js → index-DCv3Ovf7.js} +1 -1
- package/build/assets/{index-BphPDeJU.js → index-DOiS7VE9.js} +1 -1
- package/build/assets/{index-DpCruM_r.js → index-D_4iXBI5.js} +1 -1
- package/build/assets/{index-rCaYGFp-.js → index-DoQHaClc.js} +1 -1
- package/build/assets/{index-aw1dvFXB.js → index-Dynm-1sH.js} +1 -1
- package/build/assets/{index-D_h3I9YJ.js → index-HqlJZ3Ag.js} +1 -1
- package/build/assets/{index-6pmK9B6A.js → index-NigQ67t-.js} +1 -1
- package/build/assets/{index-BdtyI7rR.js → index-PHqcnj3c.js} +1 -1
- package/build/assets/{index-H4N5vz5u.js → index-VVwti7cA.js} +1 -1
- package/build/assets/{index-BAYa9u17.js → index-XsxWL5x-.js} +1 -1
- package/build/assets/{index-Pi0boTQ1.js → index-gb2ePejP.js} +1 -1
- package/build/assets/{index-BbEq8Tl6.js → index-j6pFDYKO.js} +1 -1
- package/build/assets/{index-CFC41peg.js → index-mHvUvPYI.js} +1 -1
- package/build/assets/{index-CR1sLAOp.js → index-vLb3c1eZ.js} +1 -1
- package/build/assets/{index-CZdeBPWU.js → index-wUVGuFfU.js} +1 -1
- package/build/assets/{index-cuFX1NrA.js → index-wnKDraWU.js} +4 -4
- package/build/assets/{inherits-uBK3kmcZ.js → inherits-xHSaJdUZ.js} +1 -1
- package/build/assets/{input-1w6Mjo5w.js → input-PliHooUw.js} +1 -1
- package/build/assets/{memory-C-EiHSeQ.js → memory-BJMhKXeY.js} +1 -1
- package/build/assets/{number-overlay-editor-CPu7tgwQ.js → number-overlay-editor-DRf5xgI3.js} +1 -1
- package/build/assets/{sandbox-Dgl94q2K.js → sandbox-DBdCCxaG.js} +1 -1
- package/build/assets/{slicedToArray-BxUjdsw4.js → slicedToArray-Cuk3tbTR.js} +1 -1
- package/build/assets/{timepicker-YeO3C7Qg.js → timepicker-DjzHzJAt.js} +1 -1
- package/build/assets/{uniqueId-Dp_tGnBE.js → uniqueId-ikSpJ9AP.js} +1 -1
- package/build/assets/{useBasicWidgetState-DD4anr8V.js → useBasicWidgetState-raTjAqZP.js} +1 -1
- package/build/assets/{useTextInputAutoExpand-DwrFHugV.js → useTextInputAutoExpand-Uac3U0I_.js} +1 -1
- package/build/assets/{useUpdateUiValue-B6SPuk_P.js → useUpdateUiValue-BbEmiOZQ.js} +1 -1
- package/build/assets/{withFullScreenWrapper-Db_tqc32.js → withFullScreenWrapper-C7u7nPsK.js} +1 -1
- package/build/index.html +1 -1
- package/package.json +6 -6
- package/wheels/streamlit-1.50.0-cp313-none-any.whl +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ac as q,o as J,r as s,au as Q,u as Y,av as ee,aw as l,j as g,ax as te,W as re,l as ne,g as oe,T as ie,P as ae,ay as ue,c as le,B as P,d as U,D as se}from"./index-
|
|
1
|
+
import{ac as q,o as J,r as s,au as Q,u as Y,av as ee,aw as l,j as g,ax as te,W as re,l as ne,g as oe,T as ie,P as ae,ay as ue,c as le,B as P,d as U,D as se}from"./index-wnKDraWU.js";import{u as ce}from"./useBasicWidgetState-raTjAqZP.js";import"./FormClearHelper-CaLJK07N.js";var fe={secondary:"secondary"},N={default:"default"},pe={default:"default"},j=Object.freeze({radio:"radio",checkbox:"checkbox"}),x=q("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==N.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});x.displayName="StyledRoot";x.displayName="StyledRoot";function M(e){"@babel/helpers - typeof";return M=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},M(e)}function G(){return G=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},G.apply(this,arguments)}function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X(Object(r),!0).forEach(function(n){z(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ye(e,t){return Se(e)||be(e,t)||me(e,t)||he()}function he(){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 me(e,t){if(e){if(typeof e=="string")return K(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 K(e,t)}}function K(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 be(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,d;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,d=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw d}}return n}}function Se(e){if(Array.isArray(e))return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ve(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Oe(e,t,r){return t&&ve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$(e,t)}function $(e,t){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$(e,t)}function _e(e){var t=Le();return function(){var n=k(e),o;if(t){var i=k(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return we(this,o)}}function we(e,t){if(t&&(M(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 F(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Le(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},k(e)}function z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Re(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var H=(function(e){Ee(r,e);var t=_e(r);function r(){var n;ge(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),z(F(n),"childRefs",{}),n}return Oe(r,[{key:"render",value:function(){var o=this,i=this.props,a=i.overrides,d=a===void 0?{}:a,c=i.mode,y=c===void 0?j.checkbox:c,v=i.children,h=i.selected,_=i.disabled,f=i.onClick,m=i.kind,O=i.shape,b=i.size,B=J(d.Root,x),w=ye(B,2),T=w[0],R=w[1],L=this.props["aria-label"]||this.props.ariaLabel,p=y===j.radio,V=s.Children.count(v);return s.createElement(Q.Consumer,null,function(Z){return s.createElement(T,G({"aria-label":L||Z.buttongroup.ariaLabel,"data-baseweb":"button-group",role:p?"radiogroup":"group",$shape:O,$length:v.length},R),s.Children.map(v,function(S,C){if(!s.isValidElement(S))return null;var I=S.props.isSelected?S.props.isSelected:Re(h,C);return p&&(o.childRefs[C]=s.createRef()),s.cloneElement(S,{disabled:_||S.props.disabled,isSelected:I,ref:p?o.childRefs[C]:void 0,tabIndex:!p||I||p&&(!h||h===-1)&&C===0?0:-1,onKeyDown:function(u){if(p){var E=Number(h)?Number(h):0;if(u.key==="ArrowUp"||u.key==="ArrowLeft"){u.preventDefault&&u.preventDefault();var A=E-1<0?V-1:E-1;f&&f(u,A),o.childRefs[A].current&&o.childRefs[A].current.focus()}if(u.key==="ArrowDown"||u.key==="ArrowRight"){u.preventDefault&&u.preventDefault();var D=E+1>V-1?0:E+1;f&&f(u,D),o.childRefs[D].current&&o.childRefs[D].current.focus()}}},kind:m,onClick:function(u){_||(S.props.onClick&&S.props.onClick(u),f&&f(u,C))},shape:O,size:b,overrides:de({BaseButton:{style:function(u){var E=u.$theme;return v.length===1?{}:O!==N.default?{marginLeft:E.sizing.scale100,marginRight:E.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":I,role:p?"radio":"checkbox"}}},S.props.overrides)})}))})}}]),r})(s.Component);z(H,"defaultProps",{disabled:!1,onClick:function(){},shape:N.default,size:pe.default,kind:fe.secondary});function Ce(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function Pe(e,t,r){return e==l.ClickMode.MULTI_SELECT?Ce(t,r??[]):r?.includes(t)?[]:[t]}function je(e){return e.length===0?-1:e[0]}function ke(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function Be(e,t,r){const n=r===l.Style.PILLS?P.PILLS:r===l.Style.BORDERLESS?P.BORDERLESS_ICON:P.SEGMENTED_CONTROL,o=r===l.Style.BORDERLESS?U.XSMALL:U.MEDIUM,i=n===P.PILLS||n===P.SEGMENTED_CONTROL,a=r===l.Style.BORDERLESS?"lg":"base";return{element:g.jsx(se,{icon:t,label:e,iconSize:a,useSmallerFont:i}),kind:n,size:o}}function Te(e,t,r,n){return r.indexOf(n)>-1?!0:t!==l.ClickMode.SINGLE_SELECT||e!==l.SelectionVisualization.ALL_UP_TO_SELECTED?!1:r.length>0&&n<r[0]}function Ie(e,t){return e&&(t=`${t}Active`),t}function Ae(e,t,r){const n={flexWrap:"wrap",maxWidth:"100%",margin:"0 0"},o=r?"100%":"auto",i=r?{}:{content:"''",flex:1e4};switch(e){case l.Style.BORDERLESS:return{...n,columnGap:t.threeXS,rowGap:t.threeXS};case l.Style.PILLS:return{...n,columnGap:t.twoXS,rowGap:t.twoXS,width:o};case l.Style.SEGMENTED_CONTROL:return{...n,columnGap:t.none,rowGap:t.twoXS,"::after":i,width:o};default:return n}}function De(e,t,r,n,o,i,a){const d=Te(r,n,o,t);let c=e.content,y=e.contentIcon;return d&&(c=e.selectedContent?e.selectedContent:c,y=e.selectedContentIcon?e.selectedContentIcon:y),s.forwardRef(function(h,_){const{element:f,kind:m,size:O}=Be(c??"",y??void 0,i),b=Ie(!!(d&&!e.selectedContent&&!e.selectedContentIcon),m);return g.jsx(le,{...h,size:O,kind:b,containerWidth:a,children:f})})}function Me(e,t){return e.getIntArrayValue(t)}function Ge(e){return e.default??null}function $e(e){return e.value??null}function Ne(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o,widthConfig:i}=e,{clickMode:a,options:d,selectionVisualization:c,style:y,label:v,labelVisibility:h,help:_}=r,f=Y(),[m,O]=ce({getStateFromWidgetMgr:Me,getDefaultStateFromProto:Ge,getCurrStateFromProto:$e,updateWidgetMgrState:ke,element:r,widgetMgr:o,fragmentId:n}),b=ee(i),B=(R,L)=>{const p=Pe(a,L,m);O({value:p,fromUi:!0})};let w;a===l.ClickMode.SINGLE_SELECT?w=j.radio:a===l.ClickMode.MULTI_SELECT&&(w=j.checkbox);const T=s.useMemo(()=>d.map((R,L)=>{const p=De(R,L,c,a,m,y,b);return g.jsx(p,{},`${R.content}-${L}`)}),[a,d,c,y,m,b]);return g.jsxs(te,{className:"stButtonGroup","data-testid":"stButtonGroup",containerWidth:b,children:[g.jsx(re,{label:v,disabled:t,labelVisibility:ne(h?.value??ue.LabelVisibilityOptions.COLLAPSED),children:_&&g.jsx(oe,{children:g.jsx(ie,{content:_,placement:ae.TOP})})}),g.jsx(H,{disabled:t,mode:w,onClick:B,selected:a===l.ClickMode.MULTI_SELECT?m:je(m),overrides:{Root:{style:s.useCallback(()=>Ae(y,f.spacing,b),[y,f.spacing,b])}},children:T})]})}const We=s.memo(Ne);export{We as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,E as y,_ as S,s as p,aE as $,j as o,an as f,c as x,d as X,B as w,at as O,bi as _,aV as q,bq as G,k as h,a8 as m,bj as K,bk as Q,W as Y,l as J,Q as Z,T as ee,P as te}from"./index-cuFX1NrA.js";import{F as se}from"./FormClearHelper-CNtDBzvU.js";import{g as v,F,D as ie,b as le,I as oe,C as ne,a as ae,s as re}from"./FileHelper-DPutc5L1.js";import{P as de,S as ce}from"./ProgressBar-BxIGBDpX.js";import{u as pe}from"./Hooks-DEqVt10P.js";import{U}from"./UploadFileInfo-C-jY39rj.js";var z=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});z.displayName="ChevronLeft";var I=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});I.displayName="ChevronRight";var C=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});C.displayName="CloudUpload";var j=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});j.displayName="Error";const M=p("section",{target:"e1b2p2ww17"})(({isDisabled:e,theme:i})=>({display:"flex",gap:i.spacing.lg,alignItems:"center",padding:i.spacing.lg,backgroundColor:i.colors.secondaryBg,borderRadius:i.radii.default,border:i.colors.widgetBorderColor?`${i.sizes.borderWidth} solid ${i.colors.widgetBorderColor}`:void 0,height:i.sizes.largestElementHeight,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${i.colors.primary}`},cursor:e?"not-allowed":"pointer"}),""),ge=p("div",{target:"e1b2p2ww16"})(({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex",gap:e.spacing.lg,minWidth:0,width:"100%"}),""),B=p("span",{target:"e1b2p2ww15"})(({theme:e})=>({color:e.colors.darkenedBgMix100}),""),V=p("span",{target:"e1b2p2ww14"})(({theme:e,disabled:i})=>({color:i?e.colors.fadedText40:e.colors.bodyText}),""),ue=p("span",{target:"e1b2p2ww13"})(({theme:e,disabled:i})=>({fontSize:e.fontSizes.sm,color:i?e.colors.fadedText40:e.colors.fadedText60,display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:"100%"}),""),he=p("div",{target:"e1b2p2ww12"})({name:"1s8jot1",styles:"display:flex;flex-direction:column;min-width:0;max-width:100%"}),fe=p("span",{target:"e1b2p2ww11"})({name:"1bmnxg7",styles:"white-space:nowrap"}),D=p("div",{target:"e1b2p2ww10"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg}),""),me=p("ul",{target:"e1b2p2ww9"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none}),""),E=p("li",{target:"e1b2p2ww8"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none}),""),L=p("div",{target:"e1b2p2ww7"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"}),""),P=p("div",{target:"e1b2p2ww6"})(({theme:e,disabled:i})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:i?e.colors.fadedText40:e.colors.bodyText}),""),T=p("div",{target:"e1b2p2ww5"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS}),""),xe=p("span",{target:"e1b2p2ww4"})(({theme:e})=>({marginRight:e.spacing.twoXS}),""),we=p("div",{target:"e1b2p2ww3"})(({theme:e,disabled:i})=>({display:"flex",padding:e.spacing.twoXS,color:i?e.colors.fadedText40:e.colors.darkenedBgMix100}),""),A=p("small",{target:"e1b2p2ww2"})(({theme:e})=>({color:e.colors.redTextColor,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"}),""),W=p("span",{target:"e1b2p2ww1"})({name:"0",styles:""}),Fe=e=>({[M]:{display:"flex",flexDirection:"column",alignItems:"flex-start",height:"auto",gap:e.spacing.sm},[B]:{display:"none"},[V]:{marginBottom:e.spacing.twoXS},[D]:{paddingRight:e.spacing.lg},[T]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[P]:{width:e.sizes.full},[L]:{flexDirection:"column"},[A]:{height:"auto",whiteSpace:"initial"},[W]:{display:"none"},[E]:{margin:e.spacing.none,padding:e.spacing.none}}),ye=p("div",{target:"e1b2p2ww0"})(({theme:e,width:i})=>{if(i<$("23rem"))return Fe(e)},""),Se=({multiple:e,acceptedExtensions:i,maxSizeBytes:t,acceptDirectory:s=!1,disabled:l})=>{const n=()=>s?"directories":e?"files":"file",a=()=>i.length?` • ${i.map(d=>d.replace(/^\./,"").toUpperCase()).join(", ")}`:null,r=()=>`Limit ${v(t,F.Byte,0)} per file`;return o.jsxs(ge,{"data-testid":"stFileUploaderDropzoneInstructions",children:[o.jsx(B,{children:o.jsx(f,{content:C,size:"threeXL"})}),o.jsxs(he,{children:[o.jsxs(V,{disabled:l,children:["Drag and drop ",n()," here"]}),o.jsxs(ue,{disabled:l,children:[r(),a()]})]})]})},Ue=c.memo(Se),be=({onDrop:e,multiple:i,acceptedExtensions:t,maxSizeBytes:s,disabled:l,label:n,acceptDirectory:a=!1})=>o.jsx(ie,{onDrop:e,multiple:i,accept:le(t),maxSize:s,disabled:l,useFsAccessApi:!1,children:({getRootProps:r,getInputProps:d})=>{const g=d({multiple:i||!!a});return o.jsxs(M,{...r(),"data-testid":"stFileUploaderDropzone",isDisabled:l,"aria-label":n,"aria-disabled":l,children:[o.jsx("input",{"data-testid":"stFileUploaderDropzoneInput",...g,...a&&{webkitdirectory:""}}),o.jsx(Ue,{multiple:i,acceptedExtensions:t,maxSizeBytes:s,acceptDirectory:a,disabled:l}),o.jsx(fe,{children:o.jsx(x,{kind:w.SECONDARY,disabled:l,size:X.SMALL,children:a?"Browse directories":"Browse files"})})]})}}),ve=c.memo(be),N=p("small",{target:"e1bju1570"})(({kind:e,disabled:i,theme:t})=>{const{redTextColor:s,fadedText60:l,fadedText40:n}=t.colors;let a=l;return i&&(a=n),e==="danger"&&(a=s),{color:a,fontSize:t.fontSizes.sm,lineHeight:t.lineHeights.tight}},""),ze=({fileInfo:e,disabled:i})=>e.status.type==="uploading"?o.jsx(de,{value:e.status.progress,size:ce.SMALL}):e.status.type==="error"?o.jsxs(A,{children:[o.jsx(xe,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),o.jsx(W,{children:o.jsx(f,{content:j,size:"lg"})})]}):e.status.type==="uploaded"?o.jsx(N,{disabled:i,children:v(e.size,F.Byte)}):null,Ie=({fileInfo:e,onDelete:i,disabled:t})=>o.jsxs(T,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[o.jsx(we,{disabled:t,children:o.jsx(f,{content:oe,size:"twoXL"})}),o.jsxs(L,{className:"stFileUploaderFileData",children:[o.jsx(P,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,disabled:t,children:e.name}),o.jsx(ze,{fileInfo:e,disabled:t})]}),o.jsx("div",{"data-testid":"stFileUploaderDeleteBtn",children:o.jsx(x,{onClick:()=>i(e.id),kind:w.MINIMAL,disabled:t,"aria-label":`Remove ${e.name}`,children:o.jsx(f,{content:ne,size:"lg"})})})]}),Ce=c.memo(Ie),je=p("div",{target:"e1nlpozb1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS}),""),Me=p("div",{target:"e1nlpozb0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40}),""),Be=({currentPage:e,totalPages:i,onNext:t,onPrevious:s})=>o.jsxs(je,{"data-testid":"stFileUploaderPagination",children:[o.jsx(N,{children:`Showing page ${e} of ${i}`}),o.jsxs(Me,{children:[o.jsx(x,{onClick:s,kind:w.MINIMAL,children:o.jsx(f,{content:z,size:"xl"})}),o.jsx(x,{onClick:t,kind:w.MINIMAL,children:o.jsx(f,{content:I,size:"xl"})})]})]}),Ve=c.memo(Be),b=(e,i)=>Math.ceil(e.length/i),De=e=>O(({pageSize:t,items:s,resetOnAdd:l,...n})=>{const[a,r]=c.useState(0),[d,g]=c.useState(()=>b(s,t)),u=pe(s);c.useEffect(()=>{u&&u.length!==s.length&&g(b(s,t)),u&&u.length<s.length?l&&r(0):a+1>=d&&r(d-1)},[s,a,t,u,l,d]);const R=()=>{r(Math.min(a+1,d-1))},H=()=>{r(Math.max(0,a-1))},k=s.slice(a*t,a*t+t);return o.jsxs(o.Fragment,{children:[o.jsx(e,{items:k,...n}),s.length>t?o.jsx(Ve,{pageSize:t,totalPages:d,currentPage:a+1,onNext:R,onPrevious:H}):null]})},e),Ee=({items:e,onDelete:i,disabled:t})=>o.jsx(me,{children:e.map(s=>o.jsx(E,{children:o.jsx(Ce,{fileInfo:s,onDelete:i,disabled:t})},s.id))}),Le=De(Ee),Pe=e=>o.jsx(D,{children:o.jsx(Le,{...e})}),Te=c.memo(Pe);class Ae extends c.PureComponent{constructor(i){super(i),this.formClearHelper=new se,this.localFileIdCounter=1,this.forceUpdatingStatus=!1,this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:s,widgetMgr:l,fragmentId:n}=this.props,a=l.getFileUploaderStateValue(s);q(t,a)||l.setFileUploaderStateValue(s,t,{fromUi:!0},n)},this.isFileTypeAllowed=t=>{const{element:s}=this.props,{type:l}=s;if(!l||l.length===0)return!0;const n=t.name.toLowerCase();return l.some(a=>n.endsWith(a.toLowerCase()))},this.filterDirectoryFiles=t=>{const s=[],l=[];return t.forEach(n=>{this.isFileTypeAllowed(n)?s.push(n):l.push({file:n,errors:[{code:"file-invalid-type",message:`${n.type} files are not allowed.`}]})}),{accepted:s,rejected:l}},this.dropHandler=(t,s)=>{const{element:l}=this.props,{multipleFiles:n}=l;if(!!l.acceptDirectory&&t.length>0){const{accepted:r,rejected:d}=this.filterDirectoryFiles(t);t=r,s=[...s,...d]}if(!n&&t.length===0&&s.length>1){const r=s.findIndex(d=>d.errors.length===1&&d.errors[0].code==="too-many-files");r>=0&&(t.push(s[r].file),s.splice(r,1))}if(this.props.uploadClient.fetchFileURLs(t).then(r=>{if(!n&&t.length>0){const d=this.state.files.find(g=>g.status.type!=="error");d&&(this.forceUpdatingStatus=!0,this.deleteFile(d.id),this.forceUpdatingStatus=!1)}G(r,t).forEach(([d,g])=>{this.uploadFile(d,g)})}).catch(r=>{this.addFiles(t.map(d=>new U(d.name,d.size,this.nextLocalFileId(),{type:"error",errorMessage:r})))}),s.length>0){const r=s.map(d=>ae(d,this.nextLocalFileId(),this.maxUploadSizeInBytes));this.addFiles(r)}},this.uploadFile=(t,s)=>{const l=new AbortController,n=s.webkitRelativePath||s.name,a=new U(n,s.size,this.nextLocalFileId(),{type:"uploading",abortController:l,progress:1});this.addFile(a),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,s,r=>this.onUploadProgress(r,a.id),l.signal).then(()=>this.onUploadComplete(a.id,t)).catch(r=>{r instanceof DOMException&&r.name==="AbortError"||this.updateFile(a.id,a.setStatus({type:"error",errorMessage:r?r.toString():"Unknown error"}))})},this.onUploadComplete=(t,s)=>{const l=this.getFile(t);h(l)||l.status.type!=="uploading"||this.updateFile(l.id,l.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}))},this.deleteFile=t=>{if(this.props.disabled)return;const s=this.getFile(t);h(s)||(s.status.type==="uploading"&&s.status.abortController.abort(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(s.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{m.flushSync(()=>{this.setState(s=>({files:[...s.files,t]}))})},this.addFiles=t=>{m.flushSync(()=>{this.setState(s=>({files:[...s.files,...t]}))})},this.removeFile=t=>{m.flushSync(()=>{this.setState(s=>({files:s.files.filter(l=>l.id!==t)}))})},this.getFile=t=>this.state.files.find(s=>s.id===t),this.updateFile=(t,s)=>{m.flushSync(()=>{this.setState(l=>({files:l.files.map(n=>n.id===t?s:n)}))})},this.onUploadProgress=(t,s)=>{const l=this.getFile(s);if(h(l)||l.status.type!=="uploading")return;const n=Math.round(t.loaded*100/t.total);l.status.progress!==n&&this.updateFile(s,l.setStatus({type:"uploading",abortController:l.status.abortController,progress:n}))},this.onFormCleared=()=>{m.flushSync(()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(h(t))return;const{widgetMgr:s,element:l,fragmentId:n}=this.props;s.setFileUploaderStateValue(l,t,{fromUi:!0},n)})})},this.state=this.initialValue}get initialValue(){const i={files:[]},{widgetMgr:t,element:s}=this.props,l=t.getFileUploaderStateValue(s);if(h(l))return i;const{uploadedFileInfo:n}=l;return h(n)||n.length===0?i:{files:n.map(a=>{const r=a.name,d=a.size,g=a.fileId,u=a.fileUrls;return new U(r,d,this.nextLocalFileId(),{type:"uploaded",fileId:g,fileUrls:u})})}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){const i=this.props.element.maxUploadSizeMb;return re(i,F.Megabyte,F.Byte)}get status(){const i=t=>t.status.type==="uploading";return this.state.files.some(i)||this.forceUpdatingStatus?"updating":"ready"}componentDidMount(){const i=this.createWidgetValue(),{element:t,widgetMgr:s,fragmentId:l}=this.props;s.getFileUploaderStateValue(t)===void 0&&s.setFileUploaderStateValue(t,i,{fromUi:!1},l)}createWidgetValue(){const i=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:s,size:l,status:n}=t,{fileId:a,fileUrls:r}=n;return new K({fileId:a,fileUrls:r,name:s,size:l})});return new Q({uploadedFileInfo:i})}render(){const{files:i}=this.state,{element:t,disabled:s,widgetMgr:l,width:n}=this.props,a=t.type;this.formClearHelper.manageFormClearListener(l,t.formId,this.onFormCleared);const r=i.slice().reverse();return o.jsxs(ye,{className:"stFileUploader","data-testid":"stFileUploader",width:n,children:[o.jsx(Y,{label:t.label,disabled:s,labelVisibility:J(t.labelVisibility?.value),children:t.help&&o.jsx(Z,{children:o.jsx(ee,{content:t.help,placement:te.TOP_RIGHT})})}),o.jsx(ve,{onDrop:this.dropHandler,multiple:t.multipleFiles,acceptedExtensions:a,maxSizeBytes:this.maxUploadSizeInBytes,label:t.label,disabled:s,acceptDirectory:!!t.acceptDirectory}),r.length>0&&o.jsx(Te,{items:r,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0,disabled:s})]})}nextLocalFileId(){return this.localFileIdCounter++}}const Xe=_(c.memo(Ae));export{Xe as default};
|
|
1
|
+
import{r as c,E as y,_ as S,s as p,aE as $,j as o,an as f,c as x,d as X,B as w,at as O,bi as _,aV as q,bq as G,k as h,a8 as m,bj as K,bk as Q,W as Y,l as J,Q as Z,T as ee,P as te}from"./index-wnKDraWU.js";import{F as se}from"./FormClearHelper-CaLJK07N.js";import{g as v,F,D as ie,b as le,I as oe,C as ne,a as ae,s as re}from"./FileHelper-BAjDG49X.js";import{P as de,S as ce}from"./ProgressBar-DX8k7XSZ.js";import{u as pe}from"./Hooks-D54IehuR.js";import{U}from"./UploadFileInfo-C-jY39rj.js";var z=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});z.displayName="ChevronLeft";var I=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});I.displayName="ChevronRight";var C=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});C.displayName="CloudUpload";var j=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});j.displayName="Error";const M=p("section",{target:"e1b2p2ww17"})(({isDisabled:e,theme:i})=>({display:"flex",gap:i.spacing.lg,alignItems:"center",padding:i.spacing.lg,backgroundColor:i.colors.secondaryBg,borderRadius:i.radii.default,border:i.colors.widgetBorderColor?`${i.sizes.borderWidth} solid ${i.colors.widgetBorderColor}`:void 0,height:i.sizes.largestElementHeight,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${i.colors.primary}`},cursor:e?"not-allowed":"pointer"}),""),ge=p("div",{target:"e1b2p2ww16"})(({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex",gap:e.spacing.lg,minWidth:0,width:"100%"}),""),B=p("span",{target:"e1b2p2ww15"})(({theme:e})=>({color:e.colors.darkenedBgMix100}),""),V=p("span",{target:"e1b2p2ww14"})(({theme:e,disabled:i})=>({color:i?e.colors.fadedText40:e.colors.bodyText}),""),ue=p("span",{target:"e1b2p2ww13"})(({theme:e,disabled:i})=>({fontSize:e.fontSizes.sm,color:i?e.colors.fadedText40:e.colors.fadedText60,display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:"100%"}),""),he=p("div",{target:"e1b2p2ww12"})({name:"1s8jot1",styles:"display:flex;flex-direction:column;min-width:0;max-width:100%"}),fe=p("span",{target:"e1b2p2ww11"})({name:"1bmnxg7",styles:"white-space:nowrap"}),D=p("div",{target:"e1b2p2ww10"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg}),""),me=p("ul",{target:"e1b2p2ww9"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none}),""),E=p("li",{target:"e1b2p2ww8"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none}),""),L=p("div",{target:"e1b2p2ww7"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"}),""),P=p("div",{target:"e1b2p2ww6"})(({theme:e,disabled:i})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:i?e.colors.fadedText40:e.colors.bodyText}),""),T=p("div",{target:"e1b2p2ww5"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS}),""),xe=p("span",{target:"e1b2p2ww4"})(({theme:e})=>({marginRight:e.spacing.twoXS}),""),we=p("div",{target:"e1b2p2ww3"})(({theme:e,disabled:i})=>({display:"flex",padding:e.spacing.twoXS,color:i?e.colors.fadedText40:e.colors.darkenedBgMix100}),""),A=p("small",{target:"e1b2p2ww2"})(({theme:e})=>({color:e.colors.redTextColor,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"}),""),W=p("span",{target:"e1b2p2ww1"})({name:"0",styles:""}),Fe=e=>({[M]:{display:"flex",flexDirection:"column",alignItems:"flex-start",height:"auto",gap:e.spacing.sm},[B]:{display:"none"},[V]:{marginBottom:e.spacing.twoXS},[D]:{paddingRight:e.spacing.lg},[T]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[P]:{width:e.sizes.full},[L]:{flexDirection:"column"},[A]:{height:"auto",whiteSpace:"initial"},[W]:{display:"none"},[E]:{margin:e.spacing.none,padding:e.spacing.none}}),ye=p("div",{target:"e1b2p2ww0"})(({theme:e,width:i})=>{if(i<$("23rem"))return Fe(e)},""),Se=({multiple:e,acceptedExtensions:i,maxSizeBytes:t,acceptDirectory:s=!1,disabled:l})=>{const n=()=>s?"directories":e?"files":"file",a=()=>i.length?` • ${i.map(d=>d.replace(/^\./,"").toUpperCase()).join(", ")}`:null,r=()=>`Limit ${v(t,F.Byte,0)} per file`;return o.jsxs(ge,{"data-testid":"stFileUploaderDropzoneInstructions",children:[o.jsx(B,{children:o.jsx(f,{content:C,size:"threeXL"})}),o.jsxs(he,{children:[o.jsxs(V,{disabled:l,children:["Drag and drop ",n()," here"]}),o.jsxs(ue,{disabled:l,children:[r(),a()]})]})]})},Ue=c.memo(Se),be=({onDrop:e,multiple:i,acceptedExtensions:t,maxSizeBytes:s,disabled:l,label:n,acceptDirectory:a=!1})=>o.jsx(ie,{onDrop:e,multiple:i,accept:le(t),maxSize:s,disabled:l,useFsAccessApi:!1,children:({getRootProps:r,getInputProps:d})=>{const g=d({multiple:i||!!a});return o.jsxs(M,{...r(),"data-testid":"stFileUploaderDropzone",isDisabled:l,"aria-label":n,"aria-disabled":l,children:[o.jsx("input",{"data-testid":"stFileUploaderDropzoneInput",...g,...a&&{webkitdirectory:""}}),o.jsx(Ue,{multiple:i,acceptedExtensions:t,maxSizeBytes:s,acceptDirectory:a,disabled:l}),o.jsx(fe,{children:o.jsx(x,{kind:w.SECONDARY,disabled:l,size:X.SMALL,children:a?"Browse directories":"Browse files"})})]})}}),ve=c.memo(be),N=p("small",{target:"e1bju1570"})(({kind:e,disabled:i,theme:t})=>{const{redTextColor:s,fadedText60:l,fadedText40:n}=t.colors;let a=l;return i&&(a=n),e==="danger"&&(a=s),{color:a,fontSize:t.fontSizes.sm,lineHeight:t.lineHeights.tight}},""),ze=({fileInfo:e,disabled:i})=>e.status.type==="uploading"?o.jsx(de,{value:e.status.progress,size:ce.SMALL}):e.status.type==="error"?o.jsxs(A,{children:[o.jsx(xe,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),o.jsx(W,{children:o.jsx(f,{content:j,size:"lg"})})]}):e.status.type==="uploaded"?o.jsx(N,{disabled:i,children:v(e.size,F.Byte)}):null,Ie=({fileInfo:e,onDelete:i,disabled:t})=>o.jsxs(T,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[o.jsx(we,{disabled:t,children:o.jsx(f,{content:oe,size:"twoXL"})}),o.jsxs(L,{className:"stFileUploaderFileData",children:[o.jsx(P,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,disabled:t,children:e.name}),o.jsx(ze,{fileInfo:e,disabled:t})]}),o.jsx("div",{"data-testid":"stFileUploaderDeleteBtn",children:o.jsx(x,{onClick:()=>i(e.id),kind:w.MINIMAL,disabled:t,"aria-label":`Remove ${e.name}`,children:o.jsx(f,{content:ne,size:"lg"})})})]}),Ce=c.memo(Ie),je=p("div",{target:"e1nlpozb1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS}),""),Me=p("div",{target:"e1nlpozb0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40}),""),Be=({currentPage:e,totalPages:i,onNext:t,onPrevious:s})=>o.jsxs(je,{"data-testid":"stFileUploaderPagination",children:[o.jsx(N,{children:`Showing page ${e} of ${i}`}),o.jsxs(Me,{children:[o.jsx(x,{onClick:s,kind:w.MINIMAL,children:o.jsx(f,{content:z,size:"xl"})}),o.jsx(x,{onClick:t,kind:w.MINIMAL,children:o.jsx(f,{content:I,size:"xl"})})]})]}),Ve=c.memo(Be),b=(e,i)=>Math.ceil(e.length/i),De=e=>O(({pageSize:t,items:s,resetOnAdd:l,...n})=>{const[a,r]=c.useState(0),[d,g]=c.useState(()=>b(s,t)),u=pe(s);c.useEffect(()=>{u&&u.length!==s.length&&g(b(s,t)),u&&u.length<s.length?l&&r(0):a+1>=d&&r(d-1)},[s,a,t,u,l,d]);const R=()=>{r(Math.min(a+1,d-1))},H=()=>{r(Math.max(0,a-1))},k=s.slice(a*t,a*t+t);return o.jsxs(o.Fragment,{children:[o.jsx(e,{items:k,...n}),s.length>t?o.jsx(Ve,{pageSize:t,totalPages:d,currentPage:a+1,onNext:R,onPrevious:H}):null]})},e),Ee=({items:e,onDelete:i,disabled:t})=>o.jsx(me,{children:e.map(s=>o.jsx(E,{children:o.jsx(Ce,{fileInfo:s,onDelete:i,disabled:t})},s.id))}),Le=De(Ee),Pe=e=>o.jsx(D,{children:o.jsx(Le,{...e})}),Te=c.memo(Pe);class Ae extends c.PureComponent{constructor(i){super(i),this.formClearHelper=new se,this.localFileIdCounter=1,this.forceUpdatingStatus=!1,this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:s,widgetMgr:l,fragmentId:n}=this.props,a=l.getFileUploaderStateValue(s);q(t,a)||l.setFileUploaderStateValue(s,t,{fromUi:!0},n)},this.isFileTypeAllowed=t=>{const{element:s}=this.props,{type:l}=s;if(!l||l.length===0)return!0;const n=t.name.toLowerCase();return l.some(a=>n.endsWith(a.toLowerCase()))},this.filterDirectoryFiles=t=>{const s=[],l=[];return t.forEach(n=>{this.isFileTypeAllowed(n)?s.push(n):l.push({file:n,errors:[{code:"file-invalid-type",message:`${n.type} files are not allowed.`}]})}),{accepted:s,rejected:l}},this.dropHandler=(t,s)=>{const{element:l}=this.props,{multipleFiles:n}=l;if(!!l.acceptDirectory&&t.length>0){const{accepted:r,rejected:d}=this.filterDirectoryFiles(t);t=r,s=[...s,...d]}if(!n&&t.length===0&&s.length>1){const r=s.findIndex(d=>d.errors.length===1&&d.errors[0].code==="too-many-files");r>=0&&(t.push(s[r].file),s.splice(r,1))}if(this.props.uploadClient.fetchFileURLs(t).then(r=>{if(!n&&t.length>0){const d=this.state.files.find(g=>g.status.type!=="error");d&&(this.forceUpdatingStatus=!0,this.deleteFile(d.id),this.forceUpdatingStatus=!1)}G(r,t).forEach(([d,g])=>{this.uploadFile(d,g)})}).catch(r=>{this.addFiles(t.map(d=>new U(d.name,d.size,this.nextLocalFileId(),{type:"error",errorMessage:r})))}),s.length>0){const r=s.map(d=>ae(d,this.nextLocalFileId(),this.maxUploadSizeInBytes));this.addFiles(r)}},this.uploadFile=(t,s)=>{const l=new AbortController,n=s.webkitRelativePath||s.name,a=new U(n,s.size,this.nextLocalFileId(),{type:"uploading",abortController:l,progress:1});this.addFile(a),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,s,r=>this.onUploadProgress(r,a.id),l.signal).then(()=>this.onUploadComplete(a.id,t)).catch(r=>{r instanceof DOMException&&r.name==="AbortError"||this.updateFile(a.id,a.setStatus({type:"error",errorMessage:r?r.toString():"Unknown error"}))})},this.onUploadComplete=(t,s)=>{const l=this.getFile(t);h(l)||l.status.type!=="uploading"||this.updateFile(l.id,l.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}))},this.deleteFile=t=>{if(this.props.disabled)return;const s=this.getFile(t);h(s)||(s.status.type==="uploading"&&s.status.abortController.abort(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(s.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{m.flushSync(()=>{this.setState(s=>({files:[...s.files,t]}))})},this.addFiles=t=>{m.flushSync(()=>{this.setState(s=>({files:[...s.files,...t]}))})},this.removeFile=t=>{m.flushSync(()=>{this.setState(s=>({files:s.files.filter(l=>l.id!==t)}))})},this.getFile=t=>this.state.files.find(s=>s.id===t),this.updateFile=(t,s)=>{m.flushSync(()=>{this.setState(l=>({files:l.files.map(n=>n.id===t?s:n)}))})},this.onUploadProgress=(t,s)=>{const l=this.getFile(s);if(h(l)||l.status.type!=="uploading")return;const n=Math.round(t.loaded*100/t.total);l.status.progress!==n&&this.updateFile(s,l.setStatus({type:"uploading",abortController:l.status.abortController,progress:n}))},this.onFormCleared=()=>{m.flushSync(()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(h(t))return;const{widgetMgr:s,element:l,fragmentId:n}=this.props;s.setFileUploaderStateValue(l,t,{fromUi:!0},n)})})},this.state=this.initialValue}get initialValue(){const i={files:[]},{widgetMgr:t,element:s}=this.props,l=t.getFileUploaderStateValue(s);if(h(l))return i;const{uploadedFileInfo:n}=l;return h(n)||n.length===0?i:{files:n.map(a=>{const r=a.name,d=a.size,g=a.fileId,u=a.fileUrls;return new U(r,d,this.nextLocalFileId(),{type:"uploaded",fileId:g,fileUrls:u})})}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){const i=this.props.element.maxUploadSizeMb;return re(i,F.Megabyte,F.Byte)}get status(){const i=t=>t.status.type==="uploading";return this.state.files.some(i)||this.forceUpdatingStatus?"updating":"ready"}componentDidMount(){const i=this.createWidgetValue(),{element:t,widgetMgr:s,fragmentId:l}=this.props;s.getFileUploaderStateValue(t)===void 0&&s.setFileUploaderStateValue(t,i,{fromUi:!1},l)}createWidgetValue(){const i=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:s,size:l,status:n}=t,{fileId:a,fileUrls:r}=n;return new K({fileId:a,fileUrls:r,name:s,size:l})});return new Q({uploadedFileInfo:i})}render(){const{files:i}=this.state,{element:t,disabled:s,widgetMgr:l,width:n}=this.props,a=t.type;this.formClearHelper.manageFormClearListener(l,t.formId,this.onFormCleared);const r=i.slice().reverse();return o.jsxs(ye,{className:"stFileUploader","data-testid":"stFileUploader",width:n,children:[o.jsx(Y,{label:t.label,disabled:s,labelVisibility:J(t.labelVisibility?.value),children:t.help&&o.jsx(Z,{children:o.jsx(ee,{content:t.help,placement:te.TOP_RIGHT})})}),o.jsx(ve,{onDrop:this.dropHandler,multiple:t.multipleFiles,acceptedExtensions:a,maxSizeBytes:this.maxUploadSizeInBytes,label:t.label,disabled:s,acceptDirectory:!!t.acceptDirectory}),r.length>0&&o.jsx(Te,{items:r,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0,disabled:s})]})}nextLocalFileId(){return this.localFileIdCounter++}}const Xe=_(c.memo(Ae));export{Xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as a,r as t,n as i,j as d,G as e,H as c,k as l}from"./index-
|
|
1
|
+
import{s as a,r as t,n as i,j as d,G as e,H as c,k as l}from"./index-wnKDraWU.js";const g=a("iframe",{target:"e1u6k47s0"})(({theme:o,disableScrolling:r})=>({width:"100%",height:"100%",colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:r?"hidden":void 0}),"");function s(o){return l(o)||o===""?void 0:o}function m({element:o}){const r=s(o.src),n=i(r)?void 0:s(o.srcdoc);return d.jsx(g,{className:"stIFrame","data-testid":"stIFrame",allow:c,disableScrolling:!o.scrolling,src:r,srcDoc:n,scrolling:o.scrolling?"auto":"no",sandbox:e,title:"st.iframe",tabIndex:o.tabIndex??void 0})}const I=t.memo(m);export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,B as s,j as e,a as u,b as d,c,d as B,D as m}from"./index-
|
|
1
|
+
import{r as l,B as s,j as e,a as u,b as d,c,d as B,D as m}from"./index-wnKDraWU.js";function p(n){const{disabled:i,element:t,widgetMgr:o,fragmentId:r}=n;let a=s.SECONDARY;return t.type==="primary"?a=s.PRIMARY:t.type==="tertiary"&&(a=s.TERTIARY),e.jsx(u,{className:"stButton","data-testid":"stButton",children:e.jsx(d,{help:t.help,containerWidth:!0,children:e.jsx(c,{kind:a,size:B.SMALL,disabled:i,containerWidth:!0,onClick:()=>o.setTriggerValue(t,{fromUi:!0},r),children:e.jsx(m,{icon:t.icon,label:t.label})})})})}const f=l.memo(p);export{f as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as y,aG as tn,aH as rn,aI as nn,aJ as an,b1 as Cn,bI as In,a3 as En,ac as ee,ae as Fe,af as Be,bJ as Hn,ad as on,o as Y,bK as sn,bL as xn,ai as ln,Y as Or,bs as An,au as Qe,aL as Tn,aM as Rn,R as Ln,bM as un,bN as jn,u as Dr,M as Fn,L as Bn,bu as Xe,k as cn,j as Me,W as Wn,l as Yn,Q as Nn,T as Vn,P as Sr,am as zn,an as qn,f as Un,h as Qn}from"./index-
|
|
1
|
+
import{r as y,aG as tn,aH as rn,aI as nn,aJ as an,b1 as Cn,bI as In,a3 as En,ac as ee,ae as Fe,af as Be,bJ as Hn,ad as on,o as Y,bK as sn,bL as xn,ai as ln,Y as Or,bs as An,au as Qe,aL as Tn,aM as Rn,R as Ln,bM as un,bN as jn,u as Dr,M as Fn,L as Bn,bu as Xe,k as cn,j as Me,W as Wn,l as Yn,Q as Nn,T as Vn,P as Sr,am as zn,an as qn,f as Un,h as Qn}from"./index-wnKDraWU.js";import{u as Xn}from"./useBasicWidgetState-raTjAqZP.js";import{D as Re,a as Le,T as Kn}from"./timepicker-DjzHzJAt.js";import{I as Gn}from"./input-PliHooUw.js";import{d as Jn}from"./base-input-d4WKPeU6.js";import{E as Zn}from"./ErrorOutline.esm-CJGMKtXr.js";import"./FormClearHelper-CaLJK07N.js";import"./inherits-xHSaJdUZ.js";import"./createSuper-CoIMxZYP.js";var ea=["title","size","color","overrides"];function Mt(){return Mt=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Mt.apply(this,arguments)}function ta(e,r){if(e==null)return{};var n=ra(e,r),a,t;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)a=o[t],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function ra(e,r){if(e==null)return{};var n={},a=Object.keys(e),t,o;for(o=0;o<a.length;o++)t=a[o],!(r.indexOf(t)>=0)&&(n[t]=e[t]);return n}function na(e,r){return sa(e)||ia(e,r)||oa(e,r)||aa()}function aa(){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 oa(e,r){if(e){if(typeof e=="string")return wr(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wr(e,r)}}function wr(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=new Array(r);n<r;n++)a[n]=e[n];return a}function ia(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],t=!0,o=!1,i,s;try{for(n=n.call(e);!(t=(i=n.next()).done)&&(a.push(i.value),!(r&&a.length===r));t=!0);}catch(u){o=!0,s=u}finally{try{!t&&n.return!=null&&n.return()}finally{if(o)throw s}}return a}}function sa(e){if(Array.isArray(e))return e}function la(e,r){var n=tn(),a=na(n,2),t=a[1],o=e.title,i=o===void 0?"Left":o,s=e.size,u=e.color,d=e.overrides,f=d===void 0?{}:d,c=ta(e,ea),h=rn({component:t.icons&&t.icons.ChevronLeft?t.icons.ChevronLeft:null},f&&f.Svg?nn(f.Svg):{});return y.createElement(an,Mt({viewBox:"0 0 24 24",ref:r,title:i,size:s,color:u,overrides:{Svg:h}},c),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"}))}const kr=y.forwardRef(la);var ua=["title","size","color","overrides"];function Pt(){return Pt=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Pt.apply(this,arguments)}function ca(e,r){if(e==null)return{};var n=da(e,r),a,t;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)a=o[t],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function da(e,r){if(e==null)return{};var n={},a=Object.keys(e),t,o;for(o=0;o<a.length;o++)t=a[o],!(r.indexOf(t)>=0)&&(n[t]=e[t]);return n}function pa(e,r){return ya(e)||ga(e,r)||ha(e,r)||fa()}function fa(){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 ha(e,r){if(e){if(typeof e=="string")return _r(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _r(e,r)}}function _r(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=new Array(r);n<r;n++)a[n]=e[n];return a}function ga(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],t=!0,o=!1,i,s;try{for(n=n.call(e);!(t=(i=n.next()).done)&&(a.push(i.value),!(r&&a.length===r));t=!0);}catch(u){o=!0,s=u}finally{try{!t&&n.return!=null&&n.return()}finally{if(o)throw s}}return a}}function ya(e){if(Array.isArray(e))return e}function ma(e,r){var n=tn(),a=pa(n,2),t=a[1],o=e.title,i=o===void 0?"Right":o,s=e.size,u=e.color,d=e.overrides,f=d===void 0?{}:d,c=ca(e,ua),h=rn({component:t.icons&&t.icons.ChevronRight?t.icons.ChevronRight:null},f&&f.Svg?nn(f.Svg):{});return y.createElement(an,Pt({viewBox:"0 0 24 24",ref:r,title:i,size:s,color:u,overrides:{Svg:h}},c),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29289 7.29289C8.90237 7.68342 8.90237 8.31658 9.29289 8.70711L12.5858 12L9.29289 15.2929C8.90237 15.6834 8.90237 16.3166 9.29289 16.7071C9.68342 17.0976 10.3166 17.0976 10.7071 16.7071L14.7071 12.7071C14.8946 12.5196 15 12.2652 15 12C15 11.7348 14.8946 11.4804 14.7071 11.2929L10.7071 7.29289C10.3166 6.90237 9.68342 6.90237 9.29289 7.29289Z"}))}const $r=y.forwardRef(ma);var yt={exports:{}},mt,Mr;function va(){if(Mr)return mt;Mr=1;function e(p){return p&&typeof p=="object"&&"default"in p?p.default:p}var r=e(Cn()),n=In();function a(p,O){for(var w=Object.getOwnPropertyNames(O),g=0;g<w.length;g++){var l=w[g],P=Object.getOwnPropertyDescriptor(O,l);P&&P.configurable&&p[l]===void 0&&Object.defineProperty(p,l,P)}return p}function t(){return(t=Object.assign||function(p){for(var O=1;O<arguments.length;O++){var w=arguments[O];for(var g in w)Object.prototype.hasOwnProperty.call(w,g)&&(p[g]=w[g])}return p}).apply(this,arguments)}function o(p,O){p.prototype=Object.create(O.prototype),a(p.prototype.constructor=p,O)}function i(p,O){if(p==null)return{};var w,g,l={},P=Object.keys(p);for(g=0;g<P.length;g++)w=P[g],0<=O.indexOf(w)||(l[w]=p[w]);return l}function s(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}var u=function(p,O,w,g,l,P,q,ae){if(!p){var x;if(O===void 0)x=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var F=[w,g,l,P,q,ae],W=0;(x=new Error(O.replace(/%s/g,function(){return F[W++]}))).name="Invariant Violation"}throw x.framesToPop=1,x}},d=u;function f(p,O,w){if("selectionStart"in p&&"selectionEnd"in p)p.selectionStart=O,p.selectionEnd=w;else{var g=p.createTextRange();g.collapse(!0),g.moveStart("character",O),g.moveEnd("character",w-O),g.select()}}function c(p){var O=0,w=0;if("selectionStart"in p&&"selectionEnd"in p)O=p.selectionStart,w=p.selectionEnd;else{var g=document.selection.createRange();g.parentElement()===p&&(O=-g.moveStart("character",-p.value.length),w=-g.moveEnd("character",-p.value.length))}return{start:O,end:w,length:w-O}}var h={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},m="_";function v(p,O,w){var g="",l="",P=null,q=[];if(O===void 0&&(O=m),w==null&&(w=h),!p||typeof p!="string")return{maskChar:O,formatChars:w,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var ae=!1;return p.split("").forEach(function(x){ae=!ae&&x==="\\"||(ae||!w[x]?(q.push(g.length),g.length===q.length-1&&(l+=x)):P=g.length+1,g+=x,!1)}),{maskChar:O,formatChars:w,prefix:l,mask:g,lastEditablePosition:P,permanents:q}}function b(p,O){return p.permanents.indexOf(O)!==-1}function D(p,O,w){var g=p.mask,l=p.formatChars;if(!w)return!1;if(b(p,O))return g[O]===w;var P=l[g[O]];return new RegExp(P).test(w)}function S(p,O){return O.split("").every(function(w,g){return b(p,g)||!D(p,g,w)})}function k(p,O){var w=p.maskChar,g=p.prefix;if(!w){for(;O.length>g.length&&b(p,O.length-1);)O=O.slice(0,O.length-1);return O.length}for(var l=g.length,P=O.length;P>=g.length;P--){var q=O[P];if(!b(p,P)&&D(p,P,q)){l=P+1;break}}return l}function $(p,O){return k(p,O)===p.mask.length}function _(p,O){var w=p.maskChar,g=p.mask,l=p.prefix;if(!w){for((O=H(p,"",O,0)).length<l.length&&(O=l);O.length<g.length&&b(p,O.length);)O+=g[O.length];return O}if(O)return H(p,_(p,""),O,0);for(var P=0;P<g.length;P++)b(p,P)?O+=g[P]:O+=w;return O}function A(p,O,w,g){var l=w+g,P=p.maskChar,q=p.mask,ae=p.prefix,x=O.split("");if(P)return x.map(function(W,oe){return oe<w||l<=oe?W:b(p,oe)?q[oe]:P}).join("");for(var F=l;F<x.length;F++)b(p,F)&&(x[F]="");return w=Math.max(ae.length,w),x.splice(w,l-w),O=x.join(""),_(p,O)}function H(p,O,w,g){var l=p.mask,P=p.maskChar,q=p.prefix,ae=w.split(""),x=$(p,O);return!P&&g>O.length&&(O+=l.slice(O.length,g)),ae.every(function(F){for(;ue=F,b(p,U=g)&&ue!==l[U];){if(g>=O.length&&(O+=l[g]),W=F,oe=g,P&&b(p,oe)&&W===P)return!0;if(++g>=l.length)return!1}var W,oe,U,ue;return!D(p,g,F)&&F!==P||(g<O.length?O=P||x||g<q.length?O.slice(0,g)+F+O.slice(g+1):(O=O.slice(0,g)+F+O.slice(g),_(p,O)):P||(O+=F),++g<l.length)}),O}function R(p,O,w,g){var l=p.mask,P=p.maskChar,q=w.split(""),ae=g;return q.every(function(x){for(;W=x,b(p,F=g)&&W!==l[F];)if(++g>=l.length)return!1;var F,W;return(D(p,g,x)||x===P)&&g++,g<l.length}),g-ae}function j(p,O){for(var w=O;0<=w;--w)if(!b(p,w))return w;return null}function C(p,O){for(var w=p.mask,g=O;g<w.length;++g)if(!b(p,g))return g;return null}function L(p){return p||p===0?p+"":""}function I(p,O,w,g,l){var P=p.mask,q=p.prefix,ae=p.lastEditablePosition,x=O,F="",W=0,oe=0,U=Math.min(l.start,w.start);return w.end>l.start?oe=(W=R(p,g,F=x.slice(l.start,w.end),U))?l.length:0:x.length<g.length&&(oe=g.length-x.length),x=g,oe&&(oe===1&&!l.length&&(U=l.start===w.start?C(p,w.start):j(p,w.start)),x=A(p,x,U,oe)),x=H(p,x,F,U),(U+=W)>=P.length?U=P.length:U<q.length&&!W?U=q.length:U>=q.length&&U<ae&&W&&(U=C(p,U)),F||(F=null),{value:x=_(p,x),enteredString:F,selection:{start:U,end:U}}}function E(){var p=new RegExp("windows","i"),O=new RegExp("phone","i"),w=navigator.userAgent;return p.test(w)&&O.test(w)}function T(p){return typeof p=="function"}function X(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame}function z(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function J(p){return(z()?X():function(){return setTimeout(p,1e3/60)})(p)}function K(p){(z()||clearTimeout)(p)}var G=(function(p){function O(g){var l=p.call(this,g)||this;l.focused=!1,l.mounted=!1,l.previousSelection=null,l.selectionDeferId=null,l.saveSelectionLoopDeferId=null,l.saveSelectionLoop=function(){l.previousSelection=l.getSelection(),l.saveSelectionLoopDeferId=J(l.saveSelectionLoop)},l.runSaveSelectionLoop=function(){l.saveSelectionLoopDeferId===null&&l.saveSelectionLoop()},l.stopSaveSelectionLoop=function(){l.saveSelectionLoopDeferId!==null&&(K(l.saveSelectionLoopDeferId),l.saveSelectionLoopDeferId=null,l.previousSelection=null)},l.getInputDOMNode=function(){if(!l.mounted)return null;var M=n.findDOMNode(s(s(l))),B=typeof window<"u"&&M instanceof window.Element;if(M&&!B)return null;if(M.nodeName!=="INPUT"&&(M=M.querySelector("input")),!M)throw new Error("react-input-mask: inputComponent doesn't contain input node");return M},l.getInputValue=function(){var M=l.getInputDOMNode();return M?M.value:null},l.setInputValue=function(M){var B=l.getInputDOMNode();B&&(l.value=M,B.value=M)},l.setCursorToEnd=function(){var M=k(l.maskOptions,l.value),B=C(l.maskOptions,M);B!==null&&l.setCursorPosition(B)},l.setSelection=function(M,B,Q){Q===void 0&&(Q={});var N=l.getInputDOMNode(),te=l.isFocused();N&&te&&(Q.deferred||f(N,M,B),l.selectionDeferId!==null&&K(l.selectionDeferId),l.selectionDeferId=J(function(){l.selectionDeferId=null,f(N,M,B)}),l.previousSelection={start:M,end:B,length:Math.abs(B-M)})},l.getSelection=function(){return c(l.getInputDOMNode())},l.getCursorPosition=function(){return l.getSelection().start},l.setCursorPosition=function(M){l.setSelection(M,M)},l.isFocused=function(){return l.focused},l.getBeforeMaskedValueChangeConfig=function(){var M=l.maskOptions,B=M.mask,Q=M.maskChar,N=M.permanents,te=M.formatChars;return{mask:B,maskChar:Q,permanents:N,alwaysShowMask:!!l.props.alwaysShowMask,formatChars:te}},l.isInputAutofilled=function(M,B,Q,N){var te=l.getInputDOMNode();try{if(te.matches(":-webkit-autofill"))return!0}catch{}return!l.focused||N.end<Q.length&&B.end===M.length},l.onChange=function(M){var B=s(s(l)).beforePasteState,Q=s(s(l)).previousSelection,N=l.props.beforeMaskedValueChange,te=l.getInputValue(),ge=l.value,ye=l.getSelection();l.isInputAutofilled(te,ye,ge,Q)&&(ge=_(l.maskOptions,""),Q={start:0,end:0,length:0}),B&&(Q=B.selection,ge=B.value,ye={start:Q.start+te.length,end:Q.start+te.length,length:0},te=ge.slice(0,Q.start)+te+ge.slice(Q.end),l.beforePasteState=null);var $e=I(l.maskOptions,te,ye,ge,Q),Je=$e.enteredString,be=$e.selection,He=$e.value;if(T(N)){var je=N({value:He,selection:be},{value:ge,selection:Q},Je,l.getBeforeMaskedValueChangeConfig());He=je.value,be=je.selection}l.setInputValue(He),T(l.props.onChange)&&l.props.onChange(M),l.isWindowsPhoneBrowser?l.setSelection(be.start,be.end,{deferred:!0}):l.setSelection(be.start,be.end)},l.onFocus=function(M){var B=l.props.beforeMaskedValueChange,Q=l.maskOptions,N=Q.mask,te=Q.prefix;if(l.focused=!0,l.mounted=!0,N){if(l.value)k(l.maskOptions,l.value)<l.maskOptions.mask.length&&l.setCursorToEnd();else{var ge=_(l.maskOptions,te),ye=_(l.maskOptions,ge),$e=k(l.maskOptions,ye),Je=C(l.maskOptions,$e),be={start:Je,end:Je};if(T(B)){var He=B({value:ye,selection:be},{value:l.value,selection:null},null,l.getBeforeMaskedValueChangeConfig());ye=He.value,be=He.selection}var je=ye!==l.getInputValue();je&&l.setInputValue(ye),je&&T(l.props.onChange)&&l.props.onChange(M),l.setSelection(be.start,be.end)}l.runSaveSelectionLoop()}T(l.props.onFocus)&&l.props.onFocus(M)},l.onBlur=function(M){var B=l.props.beforeMaskedValueChange,Q=l.maskOptions.mask;if(l.stopSaveSelectionLoop(),l.focused=!1,Q&&!l.props.alwaysShowMask&&S(l.maskOptions,l.value)){var N="";T(B)&&(N=B({value:N,selection:null},{value:l.value,selection:l.previousSelection},null,l.getBeforeMaskedValueChangeConfig()).value);var te=N!==l.getInputValue();te&&l.setInputValue(N),te&&T(l.props.onChange)&&l.props.onChange(M)}T(l.props.onBlur)&&l.props.onBlur(M)},l.onMouseDown=function(M){if(!l.focused&&document.addEventListener){l.mouseDownX=M.clientX,l.mouseDownY=M.clientY,l.mouseDownTime=new Date().getTime();var B=function Q(N){if(document.removeEventListener("mouseup",Q),l.focused){var te=Math.abs(N.clientX-l.mouseDownX),ge=Math.abs(N.clientY-l.mouseDownY),ye=Math.max(te,ge),$e=new Date().getTime()-l.mouseDownTime;(ye<=10&&$e<=200||ye<=5&&$e<=300)&&l.setCursorToEnd()}};document.addEventListener("mouseup",B)}T(l.props.onMouseDown)&&l.props.onMouseDown(M)},l.onPaste=function(M){T(l.props.onPaste)&&l.props.onPaste(M),M.defaultPrevented||(l.beforePasteState={value:l.getInputValue(),selection:l.getSelection()},l.setInputValue(""))},l.handleRef=function(M){l.props.children==null&&T(l.props.inputRef)&&l.props.inputRef(M)};var P=g.mask,q=g.maskChar,ae=g.formatChars,x=g.alwaysShowMask,F=g.beforeMaskedValueChange,W=g.defaultValue,oe=g.value;l.maskOptions=v(P,q,ae),W==null&&(W=""),oe==null&&(oe=W);var U=L(oe);if(l.maskOptions.mask&&(x||U)&&(U=_(l.maskOptions,U),T(F))){var ue=g.value;g.value==null&&(ue=W),U=F({value:U,selection:null},{value:ue=L(ue),selection:null},null,l.getBeforeMaskedValueChangeConfig()).value}return l.value=U,l}o(O,p);var w=O.prototype;return w.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=E(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value))},w.componentDidUpdate=function(){var g=this.previousSelection,l=this.props,P=l.beforeMaskedValueChange,q=l.alwaysShowMask,ae=l.mask,x=l.maskChar,F=l.formatChars,W=this.maskOptions,oe=q||this.isFocused(),U=this.props.value!=null,ue=U?L(this.props.value):this.value,M=g?g.start:null;if(this.maskOptions=v(ae,x,F),this.maskOptions.mask){!W.mask&&this.isFocused()&&this.runSaveSelectionLoop();var B=this.maskOptions.mask&&this.maskOptions.mask!==W.mask;if(W.mask||U||(ue=this.getInputValue()),(B||this.maskOptions.mask&&(ue||oe))&&(ue=_(this.maskOptions,ue)),B){var Q=k(this.maskOptions,ue);(M===null||Q<M)&&(M=$(this.maskOptions,ue)?Q:C(this.maskOptions,Q))}!this.maskOptions.mask||!S(this.maskOptions,ue)||oe||U&&this.props.value||(ue="");var N={start:M,end:M};if(T(P)){var te=P({value:ue,selection:N},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());ue=te.value,N=te.selection}this.value=ue;var ge=this.getInputValue()!==this.value;ge?(this.setInputValue(this.value),this.forceUpdate()):B&&this.forceUpdate();var ye=!1;N.start!=null&&N.end!=null&&(ye=!g||g.start!==N.start||g.end!==N.end),(ye||ge)&&this.setSelection(N.start,N.end)}else W.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},w.componentWillUnmount=function(){this.mounted=!1,this.selectionDeferId!==null&&K(this.selectionDeferId),this.stopSaveSelectionLoop()},w.render=function(){var g,l=this.props,P=(l.mask,l.alwaysShowMask,l.maskChar,l.formatChars,l.inputRef,l.beforeMaskedValueChange,l.children),q=i(l,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(P){T(P)||d(!1);var ae=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],x=t({},q);ae.forEach(function(W){return delete x[W]}),g=P(x),ae.filter(function(W){return g.props[W]!=null&&g.props[W]!==q[W]}).length&&d(!1)}else g=r.createElement("input",t({ref:this.handleRef},q));var F={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(q.disabled||q.readOnly||(F.onChange=this.onChange,F.onPaste=this.onPaste,F.onMouseDown=this.onMouseDown),q.value!=null&&(F.value=this.value)),g=r.cloneElement(g,F)},O})(r.Component);return mt=G,mt}var Pr;function ba(){return Pr||(Pr=1,yt.exports=va()),yt.exports}var Oa=ba();const Da=En(Oa);var Sa=["startEnhancer","endEnhancer","error","positive","onChange","onFocus","onBlur","value","disabled","readOnly"],wa=["Input"],ka=["mask","maskChar","overrides"];function Cr(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function vt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Cr(Object(n),!0).forEach(function(a){_a(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cr(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function _a(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function rt(e){"@babel/helpers - typeof";return rt=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},rt(e)}function Ke(){return Ke=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ke.apply(this,arguments)}function Ct(e,r){if(e==null)return{};var n=$a(e,r),a,t;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)a=o[t],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function $a(e,r){if(e==null)return{};var n={},a=Object.keys(e),t,o;for(o=0;o<a.length;o++)t=a[o],!(r.indexOf(t)>=0)&&(n[t]=e[t]);return n}var dn=y.forwardRef(function(e,r){e.startEnhancer,e.endEnhancer,e.error,e.positive;var n=e.onChange,a=e.onFocus,t=e.onBlur,o=e.value,i=e.disabled,s=e.readOnly,u=Ct(e,Sa);return y.createElement(Da,Ke({onChange:n,onFocus:a,onBlur:t,value:o,disabled:i,readOnly:s},u),function(d){return y.createElement(Jn,Ke({ref:r,onChange:n,onFocus:a,onBlur:t,value:o,disabled:i,readOnly:s},d))})});dn.displayName="MaskOverride";function pn(e){var r=e.mask,n=e.maskChar,a=e.overrides;a=a===void 0?{}:a;var t=a.Input,o=t===void 0?{}:t,i=Ct(a,wa),s=Ct(e,ka),u=dn,d={},f={};typeof o=="function"?u=o:rt(o)==="object"&&(u=o.component||u,d=o.props||{},f=o.style||{}),rt(d)==="object"&&(d=vt(vt({},d),{},{mask:d.mask||r,maskChar:d.maskChar||n}));var c=vt({Input:{component:u,props:d,style:f}},i);return y.createElement(Gn,Ke({},s,{overrides:c}))}pn.defaultProps={maskChar:" "};var Kt=Object.freeze({horizontal:"horizontal",vertical:"vertical"}),fn=[0,1,2,3,4,5,6],Ma=[0,1,2,3,4,5,6,7,8,9,10,11],le={high:"high",default:"default"},_e={startDate:"startDate",endDate:"endDate"},Pa={locked:"locked"};function Ir(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function Te(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ir(Object(n),!0).forEach(function(a){Ca(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ir(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ca(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var Gt=ee("label",function(e){var r=e.$disabled,n=e.$theme,a=n.colors,t=n.typography;return Te(Te({},t.font250),{},{width:"100%",color:r?a.contentSecondary:a.contentPrimary,display:"block",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0})});Gt.displayName="Label";Gt.displayName="Label";var Jt=ee("span",function(e){var r=e.$theme.sizing;return{display:"flex",width:"100%",marginTop:r.scale300,marginRight:0,marginBottom:r.scale300,marginLeft:0}});Jt.displayName="LabelContainer";Jt.displayName="LabelContainer";var Zt=ee("span",function(e){var r=e.$disabled,n=e.$counterError,a=e.$theme,t=a.colors,o=a.typography;return Te(Te({},o.font100),{},{flex:0,width:"100%",color:n?t.negative400:r?t.contentSecondary:t.contentPrimary})});Zt.displayName="LabelEndEnhancer";Zt.displayName="LabelEndEnhancer";var er=ee("div",function(e){var r=e.$error,n=e.$positive,a=e.$theme,t=a.colors,o=a.sizing,i=a.typography,s=t.contentSecondary;return r?s=t.negative400:n&&(s=t.positive400),Te(Te({},i.font100),{},{color:s,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,marginTop:o.scale300,marginRight:0,marginBottom:o.scale300,marginLeft:0})});er.displayName="Caption";er.displayName="Caption";var tr=ee("div",function(e){var r=e.$theme.sizing;return{width:"100%",marginBottom:r.scale600}});tr.displayName="ControlContainer";tr.displayName="ControlContainer";function Ee(){return Ee=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ee.apply(this,arguments)}function nt(e){"@babel/helpers - typeof";return nt=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},nt(e)}function Ia(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ea(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Ha(e,r,n){return r&&Ea(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function xa(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&&It(e,r)}function It(e,r){return It=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,t){return a.__proto__=t,a},It(e,r)}function Aa(e){var r=La();return function(){var a=at(e),t;if(r){var o=at(this).constructor;t=Reflect.construct(a,arguments,o)}else t=a.apply(this,arguments);return Ta(this,t)}}function Ta(e,r){if(r&&(nt(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ra(e)}function Ra(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function La(){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 at(e){return at=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},at(e)}function ja(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Fa(e,r,n,a){return r&&typeof r!="boolean"?typeof r=="function"?r(a):r:n&&typeof n!="boolean"?typeof n=="function"?n(a):n:e?typeof e=="function"?e(a):e:null}var Et=(function(e){xa(n,e);var r=Aa(n);function n(){return Ia(this,n),r.apply(this,arguments)}return Ha(n,[{key:"render",value:function(){var t=this.props,o=t.overrides,i=o.Label,s=o.LabelEndEnhancer,u=o.LabelContainer,d=o.Caption,f=o.ControlContainer,c=t.label,h=t.caption,m=t.disabled,v=t.error,b=t.positive,D=t.htmlFor,S=t.children,k=t.counter,$=y.Children.only(S).props,_={$disabled:!!m,$error:!!v,$positive:!!b},A=Fe(i)||Gt,H=Fe(s)||Zt,R=Fe(u)||Jt,j=Fe(d)||er,C=Fe(f)||tr,L=Fa(h,v,b,_),I=this.props.labelEndEnhancer;if(k){var E=null,T=null,X=null;nt(k)==="object"&&(T=k.length,E=k.maxLength,X=k.error),E=E||$.maxLength,T==null&&typeof $.value=="string"&&(T=$.value.length),T==null&&(T=0),_.$length=T,E==null?I||(I="".concat(T)):(_.$maxLength=T,I||(I="".concat(T,"/").concat(E)),T>E&&X==null&&(X=!0)),X&&(_.$error=!0,_.$counterError=!0)}return y.createElement(y.Fragment,null,c&&y.createElement(R,Ee({},_,Be(u)),y.createElement(A,Ee({"data-baseweb":"form-control-label",htmlFor:D||$.id},_,Be(i)),typeof c=="function"?c(_):c),!!I&&y.createElement(H,Ee({},_,Be(s)),typeof I=="function"?I(_):I)),y.createElement(Hn,null,function(z){return y.createElement(C,Ee({"data-baseweb":"form-control-container"},_,Be(f)),y.Children.map(S,function(J,K){if(J){var G=J.key||String(K);return y.cloneElement(J,{key:G,"aria-errormessage":v?z:null,"aria-describedby":h||b?z:null,disabled:$.disabled||m,error:typeof $.error<"u"?$.error:_.$error,positive:typeof $.positive<"u"?$.positive:_.$positive})}}),(!!h||!!v||b)&&y.createElement(j,Ee({"data-baseweb":"form-control-caption",id:z},_,Be(d)),L))}))}}]),n})(y.Component);ja(Et,"defaultProps",{overrides:{},label:null,caption:null,disabled:!1,counter:!1});function Er(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function Hr(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Er(Object(n),!0).forEach(function(a){Ba(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ba(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var Wa=function(r){return Ma.map(function(n){return{id:n.toString(),label:r(n)}})},Ya=function(r,n){return r.map(function(a){return n.includes(Number(a.id))?a:Hr(Hr({},a),{},{disabled:!0})})},Na=function(r){var n=r.filterMonthsList,a=r.formatMonthLabel,t=Wa(a);return n&&(t=Ya(t,n)),t};function Va(e){var r=e.$range,n=r===void 0?!1:r,a=e.$disabled,t=a===void 0?!1:a,o=e.$isHighlighted,i=o===void 0?!1:o,s=e.$isHovered,u=s===void 0?!1:s,d=e.$selected,f=d===void 0?!1:d,c=e.$hasRangeSelected,h=c===void 0?!1:c,m=e.$startDate,v=m===void 0?!1:m,b=e.$endDate,D=b===void 0?!1:b,S=e.$pseudoSelected,k=S===void 0?!1:S,$=e.$hasRangeHighlighted,_=$===void 0?!1:$,A=e.$pseudoHighlighted,H=A===void 0?!1:A,R=e.$hasRangeOnRight,j=R===void 0?!1:R,C=e.$startOfMonth,L=C===void 0?!1:C,I=e.$endOfMonth,E=I===void 0?!1:I,T=e.$outsideMonth,X=T===void 0?!1:T;return"".concat(+n).concat(+t).concat(+(i||u)).concat(+f).concat(+h).concat(+v).concat(+D).concat(+k).concat(+_).concat(+H).concat(+(_&&!H&&j)).concat(+(_&&!H&&!j)).concat(+L).concat(+E).concat(+X)}function za(e,r){return Xa(e)||Qa(e,r)||Ua(e,r)||qa()}function qa(){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 Ua(e,r){if(e){if(typeof e=="string")return xr(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xr(e,r)}}function xr(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=new Array(r);n<r;n++)a[n]=e[n];return a}function Qa(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],t=!0,o=!1,i,s;try{for(n=n.call(e);!(t=(i=n.next()).done)&&(a.push(i.value),!(r&&a.length===r));t=!0);}catch(u){o=!0,s=u}finally{try{!t&&n.return!=null&&n.return()}finally{if(o)throw s}}return a}}function Xa(e){if(Array.isArray(e))return e}function Ar(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function ie(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ar(Object(n),!0).forEach(function(a){qe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ar(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function qe(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var rr=ee("div",function(e){var r=e.$separateRangeInputs;return ie({width:"100%"},r?{display:"flex",justifyContent:"center"}:{})});rr.displayName="StyledInputWrapper";rr.displayName="StyledInputWrapper";var nr=ee("div",function(e){var r=e.$theme;return ie(ie({},r.typography.LabelMedium),{},{marginBottom:r.sizing.scale300})});nr.displayName="StyledInputLabel";nr.displayName="StyledInputLabel";var ar=ee("div",function(e){var r=e.$theme;return{width:"100%",marginRight:r.sizing.scale300}});ar.displayName="StyledStartDate";ar.displayName="StyledStartDate";var or=ee("div",function(e){return e.$theme,{width:"100%"}});or.displayName="StyledEndDate";or.displayName="StyledEndDate";var ir=ee("div",function(e){var r=e.$theme,n=r.typography,a=r.colors,t=r.borders;return ie(ie({},n.font200),{},{color:a.calendarForeground,backgroundColor:a.calendarBackground,textAlign:"center",borderTopLeftRadius:t.surfaceBorderRadius,borderTopRightRadius:t.surfaceBorderRadius,borderBottomRightRadius:t.surfaceBorderRadius,borderBottomLeftRadius:t.surfaceBorderRadius,display:"inline-block"})});ir.displayName="StyledRoot";ir.displayName="StyledRoot";var sr=ee("div",function(e){var r=e.$orientation;return{display:"flex",flexDirection:r===Kt.vertical?"column":"row"}});sr.displayName="StyledMonthContainer";sr.displayName="StyledMonthContainer";var lr=ee("div",function(e){var r=e.$theme.sizing,n=e.$density;return{paddingTop:r.scale300,paddingBottom:n===le.high?r.scale400:r.scale300,paddingLeft:r.scale500,paddingRight:r.scale500}});lr.displayName="StyledCalendarContainer";lr.displayName="StyledCalendarContainer";var ot=ee("div",function(e){var r=e.$theme,n=r.direction==="rtl"?"right":"left";return{marginBottom:r.sizing.scale600,paddingLeft:r.sizing.scale600,paddingRight:r.sizing.scale600,textAlign:n}});ot.displayName="StyledSelectorContainer";ot.displayName="StyledSelectorContainer";var ur=ee("div",function(e){var r=e.$theme,n=r.typography,a=r.borders,t=r.colors,o=r.sizing,i=e.$density;return ie(ie({},i===le.high?n.LabelMedium:n.LabelLarge),{},{color:t.calendarHeaderForeground,display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:o.scale600,paddingBottom:o.scale300,paddingLeft:o.scale600,paddingRight:o.scale600,backgroundColor:t.calendarHeaderBackground,borderTopLeftRadius:a.surfaceBorderRadius,borderTopRightRadius:a.surfaceBorderRadius,borderBottomRightRadius:0,borderBottomLeftRadius:0,minHeight:i===le.high?"calc(".concat(o.scale800," + ").concat(o.scale0,")"):o.scale950})});ur.displayName="StyledCalendarHeader";ur.displayName="StyledCalendarHeader";var cr=ee("div",function(e){return{color:e.$theme.colors.calendarHeaderForeground,backgroundColor:e.$theme.colors.calendarHeaderBackground,whiteSpace:"nowrap"}});cr.displayName="StyledMonthHeader";cr.displayName="StyledMonthHeader";var dr=ee("button",function(e){var r=e.$theme,n=r.typography,a=r.colors,t=e.$isFocusVisible,o=e.$density;return ie(ie({},o===le.high?n.LabelMedium:n.LabelLarge),{},{alignItems:"center",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,color:a.calendarHeaderForeground,cursor:"pointer",display:"flex",outline:"none",":focus":{boxShadow:t?"0 0 0 3px ".concat(a.accent):"none"}})});dr.displayName="StyledMonthYearSelectButton";dr.displayName="StyledMonthYearSelectButton";var pr=ee("span",function(e){var r=e.$theme.direction==="rtl"?"marginRight":"marginLeft";return qe({alignItems:"center",display:"flex"},r,e.$theme.sizing.scale500)});pr.displayName="StyledMonthYearSelectIconContainer";pr.displayName="StyledMonthYearSelectIconContainer";function hn(e){var r=e.$theme,n=e.$disabled,a=e.$isFocusVisible;return{boxSizing:"border-box",display:"flex",color:n?r.colors.calendarHeaderForegroundDisabled:r.colors.calendarHeaderForeground,cursor:n?"default":"pointer",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0",marginBottom:0,marginTop:0,outline:"none",":focus":n?{}:{boxShadow:a?"0 0 0 3px ".concat(r.colors.accent):"none"}}}var fr=ee("button",hn);fr.displayName="StyledPrevButton";fr.displayName="StyledPrevButton";var hr=ee("button",hn);hr.displayName="StyledNextButton";hr.displayName="StyledNextButton";var gr=ee("div",function(e){return{display:"inline-block"}});gr.displayName="StyledMonth";gr.displayName="StyledMonth";var yr=ee("div",function(e){var r=e.$theme.sizing;return{whiteSpace:"nowrap",display:"flex",marginBottom:r.scale0}});yr.displayName="StyledWeek";yr.displayName="StyledWeek";function Z(e,r){var n,a=e.substr(0,12)+"1"+e.substr(13),t=e.substr(0,13)+"1"+e.substr(14);return n={},qe(n,e,r),qe(n,a,r),qe(n,t,r),n}function bt(e,r){var n=r.colors,a={":before":{content:null},":after":{content:null}},t=a,o={color:n.calendarForegroundDisabled,":before":{content:null},":after":{content:null}},i={color:n.calendarForegroundDisabled,":before":{borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",backgroundColor:"transparent"},":after":{borderTopLeftRadius:"0%",borderTopRightRadius:"0%",borderBottomLeftRadius:"0%",borderBottomRightRadius:"0%",borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent"}},s={":before":{content:null}},u=1;e&&e[u]==="1"&&(t=o);var d=Object.assign({},Z("001000000000000",{color:n.calendarDayForegroundPseudoSelected}),Z("000100000000000",{color:n.calendarDayForegroundSelected}),Z("001100000000000",{color:n.calendarDayForegroundSelectedHighlighted}),{"010000000000000":{color:n.calendarForegroundDisabled,":after":{content:null}}},{"011000000000000":{color:n.calendarForegroundDisabled,":after":{content:null}}},Z("000000000000001",i),Z("101000000000000",s),Z("101010000000000",s),Z("100100000000000",{color:n.calendarDayForegroundSelected}),Z("101100000000000",{color:n.calendarDayForegroundSelectedHighlighted,":before":{content:null}}),Z("100111100000000",{color:n.calendarDayForegroundSelected,":before":{content:null}}),Z("101111100000000",{color:n.calendarDayForegroundSelectedHighlighted,":before":{content:null}}),Z("100111000000000",{color:n.calendarDayForegroundSelected}),Z("100110100000000",{color:n.calendarDayForegroundSelected,":before":{left:null,right:"50%"}}),Z("100100001010000",{color:n.calendarDayForegroundSelected}),Z("100100001001000",{color:n.calendarDayForegroundSelected,":before":{left:null,right:"50%"}}),Z("101000001010000",{":before":{left:null,right:"50%"}}),{"101000001001000":{}},{"101000001001100":{}},{"101000001001010":{}},Z("100010010000000",{color:n.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}),{"101000001100000":{color:n.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}},Z("100000001100000",{color:n.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}),Z("101111000000000",{color:n.calendarDayForegroundSelectedHighlighted}),Z("101110100000000",{color:n.calendarDayForegroundSelectedHighlighted,":before":{left:null,right:"50%"}}),Z("101010010000000",{color:n.calendarDayForegroundPseudoSelectedHighlighted,":before":{left:"0",width:"100%"}}),Z("100000000000001",i),Z("100000001010001",i),Z("100000001001001",i),Z("100010000000001",i));return d[e]||t}var mr=ee("div",function(e){var r=e.$disabled,n=e.$isFocusVisible,a=e.$isHighlighted,t=e.$peekNextMonth,o=e.$pseudoSelected,i=e.$range,s=e.$selected,u=e.$outsideMonth,d=e.$outsideMonthWithinRange,f=e.$hasDateLabel,c=e.$density,h=e.$hasLockedBehavior,m=e.$selectedInput,v=e.$value,b=e.$theme,D=b.colors,S=b.typography,k=b.sizing,$=Va(e),_;f?c===le.high?_="60px":_="70px":c===le.high?_="40px":_="48px";var A=Array.isArray(v)?v:[v,null],H=za(A,2),R=H[0],j=H[1],C=m===_e.startDate?j!==null&&typeof j<"u":R!==null&&typeof R<"u",L=i&&!(h&&!C);return ie(ie(ie({},c===le.high?S.ParagraphSmall:S.ParagraphMedium),{},{boxSizing:"border-box",position:"relative",cursor:r||!t&&u?"default":"pointer",color:D.calendarForeground,display:"inline-block",width:c===le.high?"42px":"50px",height:_,lineHeight:c===le.high?k.scale700:k.scale900,textAlign:"center",paddingTop:k.scale300,paddingBottom:k.scale300,paddingLeft:k.scale300,paddingRight:k.scale300,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,outline:"none",backgroundColor:"transparent",transform:"scale(1)"},bt($,e.$theme)),{},{":after":ie(ie({zIndex:-1,content:'""',boxSizing:"border-box",display:"inline-block",boxShadow:n&&(!u||t)?"0 0 0 3px ".concat(D.accent):"none",backgroundColor:s?D.calendarDayBackgroundSelectedHighlighted:o&&a?D.calendarDayBackgroundPseudoSelectedHighlighted:D.calendarBackground,height:f?"100%":c===le.high?"42px":"50px",width:"100%",position:"absolute",top:f?0:"-1px",left:0,paddingTop:k.scale200,paddingBottom:k.scale200,borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderTopColor:D.borderSelected,borderBottomColor:D.borderSelected,borderRightColor:D.borderSelected,borderLeftColor:D.borderSelected,borderTopLeftRadius:f?k.scale800:"100%",borderTopRightRadius:f?k.scale800:"100%",borderBottomLeftRadius:f?k.scale800:"100%",borderBottomRightRadius:f?k.scale800:"100%"},bt($,e.$theme)[":after"]||{}),d?{content:null}:{})},L?{":before":ie(ie({zIndex:-1,content:'""',boxSizing:"border-box",display:"inline-block",backgroundColor:D.mono300,position:"absolute",height:"100%",width:"50%",top:0,left:"50%",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftWidth:"0",borderRightWidth:"0",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopColor:"transparent",borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},bt($,e.$theme)[":before"]||{}),d?{backgroundColor:D.mono300,left:"0",width:"100%",content:'""'}:{})}:{})});mr.displayName="StyledDay";mr.displayName="StyledDay";var vr=ee("div",function(e){var r=e.$theme,n=r.typography,a=r.colors,t=e.$selected;return ie(ie({},n.ParagraphXSmall),{},{color:t?a.contentInverseTertiary:a.contentTertiary})});vr.displayName="StyledDayLabel";vr.displayName="StyledDayLabel";var br=ee("div",function(e){var r=e.$theme,n=r.typography,a=r.colors,t=r.sizing,o=e.$density;return ie(ie({},n.LabelMedium),{},{color:a.contentTertiary,boxSizing:"border-box",position:"relative",cursor:"default",display:"inline-block",width:o===le.high?"42px":"50px",height:o===le.high?"40px":"48px",textAlign:"center",lineHeight:t.scale900,paddingTop:t.scale300,paddingBottom:t.scale300,paddingLeft:t.scale200,paddingRight:t.scale200,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,backgroundColor:"transparent"})});br.displayName="StyledWeekdayHeader";br.displayName="StyledWeekdayHeader";function Ht(e){"@babel/helpers - typeof";return Ht=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},Ht(e)}function me(){return me=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},me.apply(this,arguments)}function Oe(e,r){return Za(e)||Ja(e,r)||Ga(e,r)||Ka()}function Ka(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as $t,r as ht,j as Ne}from"./index-cuFX1NrA.js";const{entries:St,setPrototypeOf:mt,isFrozen:qt,getPrototypeOf:Kt,getOwnPropertyDescriptor:Zt}=Object;let{freeze:S,seal:L,create:ke}=Object,{apply:ve,construct:Ue}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});L||(L=function(n){return n});ve||(ve=function(n,s){for(var r=arguments.length,c=new Array(r>2?r-2:0),b=2;b<r;b++)c[b-2]=arguments[b];return n.apply(s,c)});Ue||(Ue=function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),c=1;c<s;c++)r[c-1]=arguments[c];return new n(...r)});const ce=R(Array.prototype.forEach),Jt=R(Array.prototype.lastIndexOf),pt=R(Array.prototype.pop),q=R(Array.prototype.push),Qt=R(Array.prototype.splice),ue=R(String.prototype.toLowerCase),Ie=R(String.prototype.toString),Me=R(String.prototype.match),K=R(String.prototype.replace),en=R(String.prototype.indexOf),tn=R(String.prototype.trim),y=R(Object.prototype.hasOwnProperty),h=R(RegExp.prototype.test),Z=nn(TypeError);function R(a){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,r=new Array(s>1?s-1:0),c=1;c<s;c++)r[c-1]=arguments[c];return ve(a,n,r)}}function nn(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return Ue(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ue;mt&&mt(a,null);let r=n.length;for(;r--;){let c=n[r];if(typeof c=="string"){const b=s(c);b!==c&&(qt(n)||(n[r]=b),c=b)}a[c]=!0}return a}function on(a){for(let n=0;n<a.length;n++)y(a,n)||(a[n]=null);return a}function C(a){const n=ke(null);for(const[s,r]of St(a))y(a,s)&&(Array.isArray(r)?n[s]=on(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=C(r):n[s]=r);return n}function J(a,n){for(;a!==null;){const r=Zt(a,n);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}a=Kt(a)}function s(){return null}return s}const dt=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ce=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),we=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),an=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),xe=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),rn=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tt=S(["#text"]),Et=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Pe=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),_t=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),fe=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sn=L(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=L(/<%[\w\W]*|[\w\W]*%>/gm),cn=L(/\$\{[\w\W]*/gm),fn=L(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=L(/^aria-[\-\w]+$/),Rt=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=L(/^(?:\w+script|data):/i),pn=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bt=L(/^html$/i),dn=L(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:pn,CUSTOM_ELEMENT:dn,DATA_ATTR:fn,DOCTYPE_NAME:bt,ERB_EXPR:ln,IS_ALLOWED_URI:Rt,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:sn,TMPLIT_EXPR:cn});const Q={element:1,text:3,progressingInstruction:7,comment:8,document:9},Tn=function(){return typeof window>"u"?null:window},En=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const c="data-tt-policy-suffix";s&&s.hasAttribute(c)&&(r=s.getAttribute(c));const b="dompurify"+(r?"#"+r:"");try{return n.createPolicy(b,{createHTML(P){return P},createScriptURL(P){return P}})}catch{return console.warn("TrustedTypes policy "+b+" could not be created."),null}},At=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ot(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tn();const n=i=>Ot(i);if(n.version="3.3.0",n.removed=[],!a||!a.document||a.document.nodeType!==Q.document||!a.Element)return n.isSupported=!1,n;let{document:s}=a;const r=s,c=r.currentScript,{DocumentFragment:b,HTMLTemplateElement:P,Node:me,Element:ze,NodeFilter:B,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:yt,DOMParser:Dt,trustedTypes:ee}=a,Y=ze.prototype,Nt=J(Y,"cloneNode"),It=J(Y,"remove"),Mt=J(Y,"nextSibling"),Ct=J(Y,"childNodes"),te=J(Y,"parentNode");if(typeof P=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let g,j="";const{implementation:pe,createNodeIterator:wt,createDocumentFragment:xt,getElementsByTagName:Pt}=s,{importNode:kt}=r;let A=At();n.isSupported=typeof St=="function"&&typeof te=="function"&&pe&&pe.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:de,ERB_EXPR:Te,TMPLIT_EXPR:Ee,DATA_ATTR:vt,ARIA_ATTR:Ut,IS_SCRIPT_OR_DATA:Ft,ATTR_WHITESPACE:Ge,CUSTOM_ELEMENT:Ht}=gt;let{IS_ALLOWED_URI:We}=gt,p=null;const Be=l({},[...dt,...Ce,...we,...xe,...Tt]);let T=null;const Ye=l({},[...Et,...Pe,..._t,...fe]);let u=Object.seal(ke(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,_e=null;const k=Object.seal(ke(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let je=!0,ge=!0,Xe=!1,Ve=!0,v=!1,ne=!0,w=!1,Ae=!1,he=!1,U=!1,oe=!1,ie=!1,$e=!0,qe=!1;const zt="user-content-";let Se=!0,V=!1,F={},H=null;const Ke=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Je=l({},["audio","video","img","source","image","track"]);let Re=null;const Qe=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ae="http://www.w3.org/1998/Math/MathML",re="http://www.w3.org/2000/svg",N="http://www.w3.org/1999/xhtml";let z=N,be=!1,Oe=null;const Gt=l({},[ae,re,N],Ie);let se=l({},["mi","mo","mn","ms","mtext"]),le=l({},["annotation-xml"]);const Wt=l({},["title","style","font","a","script"]);let $=null;const Bt=["application/xhtml+xml","text/html"],Yt="text/html";let d=null,G=null;const jt=s.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},Le=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(G&&G===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),$=Bt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Yt:e.PARSER_MEDIA_TYPE,d=$==="application/xhtml+xml"?Ie:ue,p=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,d):Be,T=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,d):Ye,Oe=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ie):Gt,Re=y(e,"ADD_URI_SAFE_ATTR")?l(C(Qe),e.ADD_URI_SAFE_ATTR,d):Qe,Ze=y(e,"ADD_DATA_URI_TAGS")?l(C(Je),e.ADD_DATA_URI_TAGS,d):Je,H=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,d):Ke,X=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,d):C({}),_e=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,d):C({}),F=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,je=e.ALLOW_ARIA_ATTR!==!1,ge=e.ALLOW_DATA_ATTR!==!1,Xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ve=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,v=e.SAFE_FOR_TEMPLATES||!1,ne=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,U=e.RETURN_DOM||!1,oe=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,$e=e.SANITIZE_DOM!==!1,qe=e.SANITIZE_NAMED_PROPS||!1,Se=e.KEEP_CONTENT!==!1,V=e.IN_PLACE||!1,We=e.ALLOWED_URI_REGEXP||Rt,z=e.NAMESPACE||N,se=e.MATHML_TEXT_INTEGRATION_POINTS||se,le=e.HTML_INTEGRATION_POINTS||le,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),v&&(ge=!1),oe&&(U=!0),F&&(p=l({},Tt),T=[],F.html===!0&&(l(p,dt),l(T,Et)),F.svg===!0&&(l(p,Ce),l(T,Pe),l(T,fe)),F.svgFilters===!0&&(l(p,we),l(T,Pe),l(T,fe)),F.mathMl===!0&&(l(p,xe),l(T,_t),l(T,fe))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?k.tagCheck=e.ADD_TAGS:(p===Be&&(p=C(p)),l(p,e.ADD_TAGS,d))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?k.attributeCheck=e.ADD_ATTR:(T===Ye&&(T=C(T)),l(T,e.ADD_ATTR,d))),e.ADD_URI_SAFE_ATTR&&l(Re,e.ADD_URI_SAFE_ATTR,d),e.FORBID_CONTENTS&&(H===Ke&&(H=C(H)),l(H,e.FORBID_CONTENTS,d)),Se&&(p["#text"]=!0),w&&l(p,["html","head","body"]),p.table&&(l(p,["tbody"]),delete X.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,j=g.createHTML("")}else g===void 0&&(g=En(ee,c)),g!==null&&typeof j=="string"&&(j=g.createHTML(""));S&&S(e),G=e}},tt=l({},[...Ce,...we,...an]),nt=l({},[...xe,...rn]),Xt=function(e){let t=te(e);(!t||!t.tagName)&&(t={namespaceURI:z,tagName:"template"});const o=ue(e.tagName),f=ue(t.tagName);return Oe[e.namespaceURI]?e.namespaceURI===re?t.namespaceURI===N?o==="svg":t.namespaceURI===ae?o==="svg"&&(f==="annotation-xml"||se[f]):!!tt[o]:e.namespaceURI===ae?t.namespaceURI===N?o==="math":t.namespaceURI===re?o==="math"&&le[f]:!!nt[o]:e.namespaceURI===N?t.namespaceURI===re&&!le[f]||t.namespaceURI===ae&&!se[f]?!1:!nt[o]&&(Wt[o]||!tt[o]):!!($==="application/xhtml+xml"&&Oe[e.namespaceURI]):!1},D=function(e){q(n.removed,{element:e});try{te(e).removeChild(e)}catch{It(e)}},x=function(e,t){try{q(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{q(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(U||oe)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},ot=function(e){let t=null,o=null;if(he)e="<remove></remove>"+e;else{const m=Me(e,/^[\r\n\t ]+/);o=m&&m[0]}$==="application/xhtml+xml"&&z===N&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const f=g?g.createHTML(e):e;if(z===N)try{t=new Dt().parseFromString(f,$)}catch{}if(!t||!t.documentElement){t=pe.createDocument(z,"template",null);try{t.documentElement.innerHTML=be?j:f}catch{}}const _=t.body||t.documentElement;return e&&o&&_.insertBefore(s.createTextNode(o),_.childNodes[0]||null),z===N?Pt.call(t,w?"html":"body")[0]:w?t.documentElement:_},it=function(e){return wt.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},ye=function(e){return e instanceof yt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Lt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},at=function(e){return typeof me=="function"&&e instanceof me};function I(i,e,t){ce(i,o=>{o.call(n,e,t,G)})}const rt=function(e){let t=null;if(I(A.beforeSanitizeElements,e,null),ye(e))return D(e),!0;const o=d(e.nodeName);if(I(A.uponSanitizeElement,e,{tagName:o,allowedTags:p}),ne&&e.hasChildNodes()&&!at(e.firstElementChild)&&h(/<[/\w!]/g,e.innerHTML)&&h(/<[/\w!]/g,e.textContent)||e.nodeType===Q.progressingInstruction||ne&&e.nodeType===Q.comment&&h(/<[/\w]/g,e.data))return D(e),!0;if(!(k.tagCheck instanceof Function&&k.tagCheck(o))&&(!p[o]||X[o])){if(!X[o]&<(o)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o)))return!1;if(Se&&!H[o]){const f=te(e)||e.parentNode,_=Ct(e)||e.childNodes;if(_&&f){const m=_.length;for(let O=m-1;O>=0;--O){const M=Nt(_[O],!0);M.__removalCount=(e.__removalCount||0)+1,f.insertBefore(M,Mt(e))}}}return D(e),!0}return e instanceof ze&&!Xt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(v&&e.nodeType===Q.text&&(t=e.textContent,ce([de,Te,Ee],f=>{t=K(t,f," ")}),e.textContent!==t&&(q(n.removed,{element:e.cloneNode()}),e.textContent=t)),I(A.afterSanitizeElements,e,null),!1)},st=function(e,t,o){if($e&&(t==="id"||t==="name")&&(o in s||o in jt))return!1;if(!(ge&&!_e[t]&&h(vt,t))){if(!(je&&h(Ut,t))){if(!(k.attributeCheck instanceof Function&&k.attributeCheck(t,e))){if(!T[t]||_e[t]){if(!(lt(e)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&h(u.attributeNameCheck,t)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(t,e))||t==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o))))return!1}else if(!Re[t]){if(!h(We,K(o,Ge,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&en(o,"data:")===0&&Ze[e])){if(!(Xe&&!h(Ft,K(o,Ge,"")))){if(o)return!1}}}}}}}return!0},lt=function(e){return e!=="annotation-xml"&&Me(e,Ht)},ct=function(e){I(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||ye(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:T,forceKeepAttr:void 0};let f=t.length;for(;f--;){const _=t[f],{name:m,namespaceURI:O,value:M}=_,W=d(m),De=M;let E=m==="value"?De:tn(De);if(o.attrName=W,o.attrValue=E,o.keepAttr=!0,o.forceKeepAttr=void 0,I(A.uponSanitizeAttribute,e,o),E=o.attrValue,qe&&(W==="id"||W==="name")&&(x(m,e),E=zt+E),ne&&h(/((--!?|])>)|<\/(style|title|textarea)/i,E)){x(m,e);continue}if(W==="attributename"&&Me(E,"href")){x(m,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){x(m,e);continue}if(!Ve&&h(/\/>/i,E)){x(m,e);continue}v&&ce([de,Te,Ee],ut=>{E=K(E,ut," ")});const ft=d(e.nodeName);if(!st(ft,W,E)){x(m,e);continue}if(g&&typeof ee=="object"&&typeof ee.getAttributeType=="function"&&!O)switch(ee.getAttributeType(ft,W)){case"TrustedHTML":{E=g.createHTML(E);break}case"TrustedScriptURL":{E=g.createScriptURL(E);break}}if(E!==De)try{O?e.setAttributeNS(O,m,E):e.setAttribute(m,E),ye(e)?D(e):pt(n.removed)}catch{x(m,e)}}I(A.afterSanitizeAttributes,e,null)},Vt=function i(e){let t=null;const o=it(e);for(I(A.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)I(A.uponSanitizeShadowNode,t,null),rt(t),ct(t),t.content instanceof b&&i(t.content);I(A.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,f=null,_=null;if(be=!i,be&&(i="<!-->"),typeof i!="string"&&!at(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw Z("dirty is not a string, aborting")}else throw Z("toString is not a function");if(!n.isSupported)return i;if(Ae||Le(e),n.removed=[],typeof i=="string"&&(V=!1),V){if(i.nodeName){const M=d(i.nodeName);if(!p[M]||X[M])throw Z("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof me)t=ot("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===Q.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!U&&!v&&!w&&i.indexOf("<")===-1)return g&&ie?g.createHTML(i):i;if(t=ot(i),!t)return U?null:ie?j:""}t&&he&&D(t.firstChild);const m=it(V?i:t);for(;f=m.nextNode();)rt(f),ct(f),f.content instanceof b&&Vt(f.content);if(V)return i;if(U){if(oe)for(_=xt.call(t.ownerDocument);t.firstChild;)_.appendChild(t.firstChild);else _=t;return(T.shadowroot||T.shadowrootmode)&&(_=kt.call(r,_,!0)),_}let O=w?t.outerHTML:t.innerHTML;return w&&p["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(bt,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
|
1
|
+
import{s as $t,r as ht,j as Ne}from"./index-wnKDraWU.js";const{entries:St,setPrototypeOf:mt,isFrozen:qt,getPrototypeOf:Kt,getOwnPropertyDescriptor:Zt}=Object;let{freeze:S,seal:L,create:ke}=Object,{apply:ve,construct:Ue}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});L||(L=function(n){return n});ve||(ve=function(n,s){for(var r=arguments.length,c=new Array(r>2?r-2:0),b=2;b<r;b++)c[b-2]=arguments[b];return n.apply(s,c)});Ue||(Ue=function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),c=1;c<s;c++)r[c-1]=arguments[c];return new n(...r)});const ce=R(Array.prototype.forEach),Jt=R(Array.prototype.lastIndexOf),pt=R(Array.prototype.pop),q=R(Array.prototype.push),Qt=R(Array.prototype.splice),ue=R(String.prototype.toLowerCase),Ie=R(String.prototype.toString),Me=R(String.prototype.match),K=R(String.prototype.replace),en=R(String.prototype.indexOf),tn=R(String.prototype.trim),y=R(Object.prototype.hasOwnProperty),h=R(RegExp.prototype.test),Z=nn(TypeError);function R(a){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,r=new Array(s>1?s-1:0),c=1;c<s;c++)r[c-1]=arguments[c];return ve(a,n,r)}}function nn(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return Ue(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ue;mt&&mt(a,null);let r=n.length;for(;r--;){let c=n[r];if(typeof c=="string"){const b=s(c);b!==c&&(qt(n)||(n[r]=b),c=b)}a[c]=!0}return a}function on(a){for(let n=0;n<a.length;n++)y(a,n)||(a[n]=null);return a}function C(a){const n=ke(null);for(const[s,r]of St(a))y(a,s)&&(Array.isArray(r)?n[s]=on(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=C(r):n[s]=r);return n}function J(a,n){for(;a!==null;){const r=Zt(a,n);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}a=Kt(a)}function s(){return null}return s}const dt=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ce=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),we=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),an=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),xe=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),rn=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tt=S(["#text"]),Et=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Pe=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),_t=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),fe=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sn=L(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=L(/<%[\w\W]*|[\w\W]*%>/gm),cn=L(/\$\{[\w\W]*/gm),fn=L(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=L(/^aria-[\-\w]+$/),Rt=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=L(/^(?:\w+script|data):/i),pn=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bt=L(/^html$/i),dn=L(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:pn,CUSTOM_ELEMENT:dn,DATA_ATTR:fn,DOCTYPE_NAME:bt,ERB_EXPR:ln,IS_ALLOWED_URI:Rt,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:sn,TMPLIT_EXPR:cn});const Q={element:1,text:3,progressingInstruction:7,comment:8,document:9},Tn=function(){return typeof window>"u"?null:window},En=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const c="data-tt-policy-suffix";s&&s.hasAttribute(c)&&(r=s.getAttribute(c));const b="dompurify"+(r?"#"+r:"");try{return n.createPolicy(b,{createHTML(P){return P},createScriptURL(P){return P}})}catch{return console.warn("TrustedTypes policy "+b+" could not be created."),null}},At=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ot(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tn();const n=i=>Ot(i);if(n.version="3.3.0",n.removed=[],!a||!a.document||a.document.nodeType!==Q.document||!a.Element)return n.isSupported=!1,n;let{document:s}=a;const r=s,c=r.currentScript,{DocumentFragment:b,HTMLTemplateElement:P,Node:me,Element:ze,NodeFilter:B,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:yt,DOMParser:Dt,trustedTypes:ee}=a,Y=ze.prototype,Nt=J(Y,"cloneNode"),It=J(Y,"remove"),Mt=J(Y,"nextSibling"),Ct=J(Y,"childNodes"),te=J(Y,"parentNode");if(typeof P=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let g,j="";const{implementation:pe,createNodeIterator:wt,createDocumentFragment:xt,getElementsByTagName:Pt}=s,{importNode:kt}=r;let A=At();n.isSupported=typeof St=="function"&&typeof te=="function"&&pe&&pe.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:de,ERB_EXPR:Te,TMPLIT_EXPR:Ee,DATA_ATTR:vt,ARIA_ATTR:Ut,IS_SCRIPT_OR_DATA:Ft,ATTR_WHITESPACE:Ge,CUSTOM_ELEMENT:Ht}=gt;let{IS_ALLOWED_URI:We}=gt,p=null;const Be=l({},[...dt,...Ce,...we,...xe,...Tt]);let T=null;const Ye=l({},[...Et,...Pe,..._t,...fe]);let u=Object.seal(ke(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,_e=null;const k=Object.seal(ke(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let je=!0,ge=!0,Xe=!1,Ve=!0,v=!1,ne=!0,w=!1,Ae=!1,he=!1,U=!1,oe=!1,ie=!1,$e=!0,qe=!1;const zt="user-content-";let Se=!0,V=!1,F={},H=null;const Ke=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Je=l({},["audio","video","img","source","image","track"]);let Re=null;const Qe=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ae="http://www.w3.org/1998/Math/MathML",re="http://www.w3.org/2000/svg",N="http://www.w3.org/1999/xhtml";let z=N,be=!1,Oe=null;const Gt=l({},[ae,re,N],Ie);let se=l({},["mi","mo","mn","ms","mtext"]),le=l({},["annotation-xml"]);const Wt=l({},["title","style","font","a","script"]);let $=null;const Bt=["application/xhtml+xml","text/html"],Yt="text/html";let d=null,G=null;const jt=s.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},Le=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(G&&G===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),$=Bt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Yt:e.PARSER_MEDIA_TYPE,d=$==="application/xhtml+xml"?Ie:ue,p=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,d):Be,T=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,d):Ye,Oe=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ie):Gt,Re=y(e,"ADD_URI_SAFE_ATTR")?l(C(Qe),e.ADD_URI_SAFE_ATTR,d):Qe,Ze=y(e,"ADD_DATA_URI_TAGS")?l(C(Je),e.ADD_DATA_URI_TAGS,d):Je,H=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,d):Ke,X=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,d):C({}),_e=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,d):C({}),F=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,je=e.ALLOW_ARIA_ATTR!==!1,ge=e.ALLOW_DATA_ATTR!==!1,Xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ve=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,v=e.SAFE_FOR_TEMPLATES||!1,ne=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,U=e.RETURN_DOM||!1,oe=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,$e=e.SANITIZE_DOM!==!1,qe=e.SANITIZE_NAMED_PROPS||!1,Se=e.KEEP_CONTENT!==!1,V=e.IN_PLACE||!1,We=e.ALLOWED_URI_REGEXP||Rt,z=e.NAMESPACE||N,se=e.MATHML_TEXT_INTEGRATION_POINTS||se,le=e.HTML_INTEGRATION_POINTS||le,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),v&&(ge=!1),oe&&(U=!0),F&&(p=l({},Tt),T=[],F.html===!0&&(l(p,dt),l(T,Et)),F.svg===!0&&(l(p,Ce),l(T,Pe),l(T,fe)),F.svgFilters===!0&&(l(p,we),l(T,Pe),l(T,fe)),F.mathMl===!0&&(l(p,xe),l(T,_t),l(T,fe))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?k.tagCheck=e.ADD_TAGS:(p===Be&&(p=C(p)),l(p,e.ADD_TAGS,d))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?k.attributeCheck=e.ADD_ATTR:(T===Ye&&(T=C(T)),l(T,e.ADD_ATTR,d))),e.ADD_URI_SAFE_ATTR&&l(Re,e.ADD_URI_SAFE_ATTR,d),e.FORBID_CONTENTS&&(H===Ke&&(H=C(H)),l(H,e.FORBID_CONTENTS,d)),Se&&(p["#text"]=!0),w&&l(p,["html","head","body"]),p.table&&(l(p,["tbody"]),delete X.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,j=g.createHTML("")}else g===void 0&&(g=En(ee,c)),g!==null&&typeof j=="string"&&(j=g.createHTML(""));S&&S(e),G=e}},tt=l({},[...Ce,...we,...an]),nt=l({},[...xe,...rn]),Xt=function(e){let t=te(e);(!t||!t.tagName)&&(t={namespaceURI:z,tagName:"template"});const o=ue(e.tagName),f=ue(t.tagName);return Oe[e.namespaceURI]?e.namespaceURI===re?t.namespaceURI===N?o==="svg":t.namespaceURI===ae?o==="svg"&&(f==="annotation-xml"||se[f]):!!tt[o]:e.namespaceURI===ae?t.namespaceURI===N?o==="math":t.namespaceURI===re?o==="math"&&le[f]:!!nt[o]:e.namespaceURI===N?t.namespaceURI===re&&!le[f]||t.namespaceURI===ae&&!se[f]?!1:!nt[o]&&(Wt[o]||!tt[o]):!!($==="application/xhtml+xml"&&Oe[e.namespaceURI]):!1},D=function(e){q(n.removed,{element:e});try{te(e).removeChild(e)}catch{It(e)}},x=function(e,t){try{q(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{q(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(U||oe)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},ot=function(e){let t=null,o=null;if(he)e="<remove></remove>"+e;else{const m=Me(e,/^[\r\n\t ]+/);o=m&&m[0]}$==="application/xhtml+xml"&&z===N&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const f=g?g.createHTML(e):e;if(z===N)try{t=new Dt().parseFromString(f,$)}catch{}if(!t||!t.documentElement){t=pe.createDocument(z,"template",null);try{t.documentElement.innerHTML=be?j:f}catch{}}const _=t.body||t.documentElement;return e&&o&&_.insertBefore(s.createTextNode(o),_.childNodes[0]||null),z===N?Pt.call(t,w?"html":"body")[0]:w?t.documentElement:_},it=function(e){return wt.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},ye=function(e){return e instanceof yt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Lt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},at=function(e){return typeof me=="function"&&e instanceof me};function I(i,e,t){ce(i,o=>{o.call(n,e,t,G)})}const rt=function(e){let t=null;if(I(A.beforeSanitizeElements,e,null),ye(e))return D(e),!0;const o=d(e.nodeName);if(I(A.uponSanitizeElement,e,{tagName:o,allowedTags:p}),ne&&e.hasChildNodes()&&!at(e.firstElementChild)&&h(/<[/\w!]/g,e.innerHTML)&&h(/<[/\w!]/g,e.textContent)||e.nodeType===Q.progressingInstruction||ne&&e.nodeType===Q.comment&&h(/<[/\w]/g,e.data))return D(e),!0;if(!(k.tagCheck instanceof Function&&k.tagCheck(o))&&(!p[o]||X[o])){if(!X[o]&<(o)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o)))return!1;if(Se&&!H[o]){const f=te(e)||e.parentNode,_=Ct(e)||e.childNodes;if(_&&f){const m=_.length;for(let O=m-1;O>=0;--O){const M=Nt(_[O],!0);M.__removalCount=(e.__removalCount||0)+1,f.insertBefore(M,Mt(e))}}}return D(e),!0}return e instanceof ze&&!Xt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(v&&e.nodeType===Q.text&&(t=e.textContent,ce([de,Te,Ee],f=>{t=K(t,f," ")}),e.textContent!==t&&(q(n.removed,{element:e.cloneNode()}),e.textContent=t)),I(A.afterSanitizeElements,e,null),!1)},st=function(e,t,o){if($e&&(t==="id"||t==="name")&&(o in s||o in jt))return!1;if(!(ge&&!_e[t]&&h(vt,t))){if(!(je&&h(Ut,t))){if(!(k.attributeCheck instanceof Function&&k.attributeCheck(t,e))){if(!T[t]||_e[t]){if(!(lt(e)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&h(u.attributeNameCheck,t)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(t,e))||t==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o))))return!1}else if(!Re[t]){if(!h(We,K(o,Ge,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&en(o,"data:")===0&&Ze[e])){if(!(Xe&&!h(Ft,K(o,Ge,"")))){if(o)return!1}}}}}}}return!0},lt=function(e){return e!=="annotation-xml"&&Me(e,Ht)},ct=function(e){I(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||ye(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:T,forceKeepAttr:void 0};let f=t.length;for(;f--;){const _=t[f],{name:m,namespaceURI:O,value:M}=_,W=d(m),De=M;let E=m==="value"?De:tn(De);if(o.attrName=W,o.attrValue=E,o.keepAttr=!0,o.forceKeepAttr=void 0,I(A.uponSanitizeAttribute,e,o),E=o.attrValue,qe&&(W==="id"||W==="name")&&(x(m,e),E=zt+E),ne&&h(/((--!?|])>)|<\/(style|title|textarea)/i,E)){x(m,e);continue}if(W==="attributename"&&Me(E,"href")){x(m,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){x(m,e);continue}if(!Ve&&h(/\/>/i,E)){x(m,e);continue}v&&ce([de,Te,Ee],ut=>{E=K(E,ut," ")});const ft=d(e.nodeName);if(!st(ft,W,E)){x(m,e);continue}if(g&&typeof ee=="object"&&typeof ee.getAttributeType=="function"&&!O)switch(ee.getAttributeType(ft,W)){case"TrustedHTML":{E=g.createHTML(E);break}case"TrustedScriptURL":{E=g.createScriptURL(E);break}}if(E!==De)try{O?e.setAttributeNS(O,m,E):e.setAttribute(m,E),ye(e)?D(e):pt(n.removed)}catch{x(m,e)}}I(A.afterSanitizeAttributes,e,null)},Vt=function i(e){let t=null;const o=it(e);for(I(A.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)I(A.uponSanitizeShadowNode,t,null),rt(t),ct(t),t.content instanceof b&&i(t.content);I(A.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,f=null,_=null;if(be=!i,be&&(i="<!-->"),typeof i!="string"&&!at(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw Z("dirty is not a string, aborting")}else throw Z("toString is not a function");if(!n.isSupported)return i;if(Ae||Le(e),n.removed=[],typeof i=="string"&&(V=!1),V){if(i.nodeName){const M=d(i.nodeName);if(!p[M]||X[M])throw Z("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof me)t=ot("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===Q.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!U&&!v&&!w&&i.indexOf("<")===-1)return g&&ie?g.createHTML(i):i;if(t=ot(i),!t)return U?null:ie?j:""}t&&he&&D(t.firstChild);const m=it(V?i:t);for(;f=m.nextNode();)rt(f),ct(f),f.content instanceof b&&Vt(f.content);if(V)return i;if(U){if(oe)for(_=xt.call(t.ownerDocument);t.firstChild;)_.appendChild(t.firstChild);else _=t;return(T.shadowroot||T.shadowrootmode)&&(_=kt.call(r,_,!0)),_}let O=w?t.outerHTML:t.innerHTML;return w&&p["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(bt,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
|
2
2
|
`+O),v&&ce([de,Te,Ee],M=>{O=K(O,M," ")}),g&&ie?g.createHTML(O):O},n.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Le(i),Ae=!0},n.clearConfig=function(){G=null,Ae=!1},n.isValidAttribute=function(i,e,t){G||Le({});const o=d(i),f=d(e);return st(o,f,t)},n.addHook=function(i,e){typeof e=="function"&&q(A[i],e)},n.removeHook=function(i,e){if(e!==void 0){const t=Jt(A[i],e);return t===-1?void 0:Qt(A[i],t,1)[0]}return pt(A[i])},n.removeHooks=function(i){A[i]=[]},n.removeAllHooks=function(){A=At()},n}var He=Ot();const _n=$t("div",{target:"e18540fl0"})({name:"1d3w5wq",styles:"width:100%"}),Fe="data-temp-href-target";He.addHook("beforeSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute("target")&&a.getAttribute("target")==="_blank"&&a.setAttribute(Fe,"_blank")});He.addHook("afterSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute(Fe)&&(a.setAttribute("target","_blank"),a.setAttribute("rel","noopener noreferrer"),a.removeAttribute(Fe))});const gn=a=>{const n={USE_PROFILES:{html:!0},FORCE_BODY:!0};return He.sanitize(a,n)};function An({element:a}){const{body:n}=a,s=ht.useMemo(()=>gn(n),[n]);return Ne.jsx(Ne.Fragment,{children:s&&Ne.jsx(_n,{className:"stHtml","data-testid":"stHtml",dangerouslySetInnerHTML:{__html:s}})})}const Sn=ht.memo(An);export{Sn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,k as s,j as S,U as x,l as V}from"./index-
|
|
1
|
+
import{r as l,k as s,j as S,U as x,l as V}from"./index-wnKDraWU.js";import{u as U}from"./useBasicWidgetState-raTjAqZP.js";import"./FormClearHelper-CaLJK07N.js";const h=(t,e)=>t.getStringValue(e),j=t=>t.options.length===0||s(t.default)?null:t.options[t.default],v=t=>t.rawValue??null,w=(t,e,o,a)=>{e.setStringValue(t,o.value,{fromUi:o.fromUi},a)},y=({disabled:t,element:e,widgetMgr:o,fragmentId:a})=>{const{options:i,help:u,label:n,labelVisibility:c,placeholder:p,acceptNewOptions:f}=e,[g,r]=U({getStateFromWidgetMgr:h,getDefaultStateFromProto:j,getCurrStateFromProto:v,updateWidgetMgrState:w,element:e,widgetMgr:o,fragmentId:a}),b=l.useCallback(m=>{r({value:m,fromUi:!0})},[r]),d=s(e.default)&&!t;return S.jsx(x,{label:n,labelVisibility:V(c?.value),options:i,disabled:t,onChange:b,value:g,help:u,placeholder:p,clearable:d,acceptNewOptions:f??!1})},N=l.memo(y);export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,L as A,B as x,ab as R,j as d,b as y,c as C,d as _,D as T}from"./index-
|
|
1
|
+
import{r as u,L as A,B as x,ab as R,j as d,b as y,c as C,d as _,D as T}from"./index-wnKDraWU.js";import{c as D}from"./createDownloadLinkElement-ZaXNnPK4.js";const B=/%([0-9A-Fa-f]{2})/g,L=/[^\x20-\x7e\xa0-\xff]/g,k=/\\([\u0000-\u007f])/g,E=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,v=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,I=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/,P=o=>String(o).replace(L,"?");class S{constructor(e,t){this.type=e,this.parameters=t}}const U=(o,e)=>String.fromCharCode(Number.parseInt(e,16));function z(o){const e=v.exec(o);if(!e)throw new TypeError("invalid extended field value");const t=e[1].toLowerCase(),a=e[2];let n;switch(t){case"iso-8859-1":n=P(a.replace(B,U));break;case"utf-8":try{n=decodeURIComponent(a)}catch{throw new TypeError("invalid encoded utf-8")}break;default:throw new TypeError("unsupported charset in extended field")}return n}function $(o){let e=I.exec(o);if(!e)throw new TypeError("invalid type format");let t=e[0].length;const a=e[1].toLowerCase();let n;const l=[],i={};let r;for(t=E.lastIndex=e[0].slice(-1)===";"?t-1:t;e=E.exec(o);){if(e.index!==t)throw new TypeError("invalid parameter format");if(t+=e[0].length,n=e[1].toLowerCase(),r=e[2],l.indexOf(n)!==-1)throw new TypeError("invalid duplicate parameter");if(l.push(n),n.indexOf("*")+1===n.length){n=n.slice(0,-1),r=z(r),i[n]=r;continue}typeof i[n]!="string"&&(r[0]==='"'&&(r=r.slice(1,r.length-1).replace(k,"$1")),i[n]=r)}if(t!==-1&&t!==o.length)throw new TypeError("invalid parameter format");return new S(a,i)}function j(o){const e=$(o);if(e.type!=="attachment")return;const t=e.parameters.filename;if(typeof t=="string")return t}function N(o,e){o.sendHttpRequest({method:"GET",path:`${e}?title=${encodeURIComponent(document.title)}`,headers:{},body:""}).then(({statusCode:t,headers:a,body:n})=>{if(t!==200)return;const l=a.get("Content-Disposition"),i=(l&&j(l))??"",r=a.get("Content-Type"),f=new Blob([n],r?{type:r}:void 0),c=URL.createObjectURL(f),s=document.createElement("a");s.setAttribute("href",c),s.setAttribute("target","_blank"),s.setAttribute("download",i),s.click(),URL.revokeObjectURL(c),s.remove()})}function O(o){const{disabled:e,element:t,widgetMgr:a,endpoints:n,fragmentId:l}=o,{help:i,label:r,icon:f,ignoreRerun:c,type:s,url:w}=t,{libConfig:{enforceDownloadInNewTab:h=!1}}=u.useContext(A);let p=x.SECONDARY;s==="primary"?p=x.PRIMARY:s==="tertiary"&&(p=x.TERTIARY);const m=u.useMemo(()=>n.buildDownloadUrl(w),[n,w]);u.useEffect(()=>{n.checkSourceUrlResponse(m,"Download Button")},[m,n]);const g=R(),b=()=>{if(c||a.setTriggerValue(t,{fromUi:!0},l),t.url.startsWith("/media")){N(g,t.url);return}D({filename:"",url:m,enforceDownloadInNewTab:h}).click()};return d.jsx("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:d.jsx(y,{help:i,containerWidth:!0,children:d.jsx(C,{kind:p,size:_.SMALL,disabled:e,onClick:b,containerWidth:!0,children:d.jsx(T,{icon:f,label:r})})})})}const G=u.memo(O);export{G as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as h,E as Y,_ as Z,L as Zt,k as ut,n as $,b3 as Rt,bq as Kt,bk as Jt,bj as Qt,s as M,j as v,ah as te,c as ee,B as ie,an as re,x as ne,bw as se,u as oe,bx as Q,aE as ae,aV as le,W as ce,l as de,T as he,P as ue}from"./index-cuFX1NrA.js";import{T as pe,a as xt}from"./Toolbar-DZSYfgER.js";import{u as fe,F as me}from"./FormClearHelper-CNtDBzvU.js";import{c as ge}from"./createDownloadLinkElement-ZaXNnPK4.js";import{u as ve}from"./Hooks-DEqVt10P.js";import{F as be,D as ye}from"./FileDownload.esm-DRw0GU4W.js";var At=h.forwardRef(function(r,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(Y,Z({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),h.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});At.displayName="Mic";var Mt=h.forwardRef(function(r,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(Y,Z({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});Mt.displayName="Pause";var It=h.forwardRef(function(r,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(Y,Z({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});It.displayName="PlayArrow";var Ot=h.forwardRef(function(r,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(Y,Z({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),h.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),h.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});Ot.displayName="Refresh";var Lt=h.forwardRef(function(r,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(Y,Z({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});Lt.displayName="StopCircle";function A(r,t,e,i){return new(e||(e=Promise))((function(n,s){function a(l){try{d(i.next(l))}catch(o){s(o)}}function c(l){try{d(i.throw(l))}catch(o){s(o)}}function d(l){var o;l.done?n(l.value):(o=l.value,o instanceof e?o:new e((function(u){u(o)}))).then(a,c)}d((i=i.apply(r,t||[])).next())}))}let K=class{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),i?.once){const n=(...s)=>{this.un(t,n),e(...s)};return this.listeners[t].add(n),()=>this.un(t,n)}return this.listeners[t].add(e),()=>this.un(t,e)}un(t,e){var i;(i=this.listeners[t])===null||i===void 0||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach((i=>i(...e)))}};const tt={decode:function(r,t){return A(this,void 0,void 0,(function*(){const e=new AudioContext({sampleRate:t});try{return yield e.decodeAudioData(r)}finally{e.close()}}))},createBuffer:function(r,t){if(!r||r.length===0)throw new Error("channelData must be a non-empty array");if(t<=0)throw new Error("duration must be greater than 0");if(typeof r[0]=="number"&&(r=[r]),!r[0]||r[0].length===0)throw new Error("channelData must contain non-empty channel arrays");(function(i){const n=i[0];if(n.some((s=>s>1||s<-1))){const s=n.length;let a=0;for(let c=0;c<s;c++){const d=Math.abs(n[c]);d>a&&(a=d)}for(const c of i)for(let d=0;d<s;d++)c[d]/=a}})(r);const e=r.map((i=>i instanceof Float32Array?i:Float32Array.from(i)));return{duration:t,length:e[0].length,sampleRate:e[0].length/t,numberOfChannels:e.length,getChannelData:i=>{const n=e[i];if(!n)throw new Error(`Channel ${i} not found`);return n},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function Ut(r,t){const e=t.xmlns?document.createElementNS(t.xmlns,r):document.createElement(r);for(const[i,n]of Object.entries(t))if(i==="children"&&n)for(const[s,a]of Object.entries(n))a instanceof Node?e.appendChild(a):typeof a=="string"?e.appendChild(document.createTextNode(a)):e.appendChild(Ut(s,a));else i==="style"?Object.assign(e.style,n):i==="textContent"?e.textContent=n:e.setAttribute(i,n.toString());return e}function Et(r,t,e){const i=Ut(r,t||{});return e?.appendChild(i),i}var we=Object.freeze({__proto__:null,createElement:Et,default:Et});const Ce={fetchBlob:function(r,t,e){return A(this,void 0,void 0,(function*(){const i=yield fetch(r,e);if(i.status>=400)throw new Error(`Failed to fetch ${r}: ${i.status} (${i.statusText})`);return(function(n,s){A(this,void 0,void 0,(function*(){if(!n.body||!n.headers)return;const a=n.body.getReader(),c=Number(n.headers.get("Content-Length"))||0;let d=0;const l=o=>{d+=o?.length||0;const u=Math.round(d/c*100);s(u)};try{for(;;){const o=yield a.read();if(o.done)break;l(o.value)}}catch(o){console.warn("Progress tracking error:",o)}}))})(i.clone(),t),i.blob()}))}};class Se extends K{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",(()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)}),{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const n=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;if(i&&this.media.removeAttribute("src"),n||t)try{this.media.src=n}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(t){this.media=t}play(){return A(this,void 0,void 0,(function*(){try{return yield this.media.play()}catch(t){if(t instanceof DOMException&&t.name==="AbortError")return;throw t}}))}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}function ot(r){return r<0?0:r>1?1:r}function Re({maxTop:r,maxBottom:t,halfHeight:e,vScale:i}){const n=Math.round(r*e*i);return{topHeight:n,totalHeight:n+Math.round(t*e*i)||1}}function xe({barAlign:r,halfHeight:t,topHeight:e,totalHeight:i,canvasHeight:n}){return r==="top"?0:r==="bottom"?n-i:t-e}function Pt(r,t,e){const i=t-r.left,n=e-r.top;return[i/r.width,n/r.height]}function Bt(r){return!!(r.barWidth||r.barGap||r.barAlign)}function Wt(r,t){if(!Bt(t))return r;const e=t.barWidth||.5,i=e+(t.barGap||e/2);return i===0?r:Math.floor(r/i)*i}function Dt({scrollLeft:r,totalWidth:t,numCanvases:e}){if(t===0)return[0];const i=r/t,n=Math.floor(i*e);return[n-1,n,n+1]}function Tt({scrollLeft:r,clientWidth:t,scrollWidth:e}){return e===0?{startX:0,endX:0}:{startX:r/e,endX:(r+t)/e}}class Ee extends K{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.dragUnsubscribe=null,this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[n,s]=this.initHtml();i.appendChild(n),this.container=n,this.scrollContainer=s.querySelector(".scroll"),this.wrapper=s.querySelector(".wrapper"),this.canvasWrapper=s.querySelector(".canvases"),this.progressWrapper=s.querySelector(".progress"),this.cursor=s.querySelector(".cursor"),e&&s.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){if(this.wrapper.addEventListener("click",(t=>{const e=this.wrapper.getBoundingClientRect(),[i,n]=Pt(e,t.clientX,t.clientY);this.emit("click",i,n)})),this.wrapper.addEventListener("dblclick",(t=>{const e=this.wrapper.getBoundingClientRect(),[i,n]=Pt(e,t.clientX,t.clientY);this.emit("dblclick",i,n)})),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",(()=>{const{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.scrollContainer,{startX:n,endX:s}=Tt({scrollLeft:t,scrollWidth:e,clientWidth:i});this.emit("scroll",n,s,t,t+i)})),typeof ResizeObserver=="function"){const t=this.createDelay(100);this.resizeObserver=new ResizeObserver((()=>{t().then((()=>this.onContainerResize())).catch((()=>{}))})),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender(),this.emit("resize"))}initDrag(){this.dragUnsubscribe||(this.dragUnsubscribe=(function(t,e,i,n,s=3,a=0,c=100){if(!t)return()=>{};const d=new Map,l=matchMedia("(pointer: coarse)").matches;let o=()=>{};const u=m=>{if(m.button!==a||(d.set(m.pointerId,m),d.size>1))return;let p=m.clientX,f=m.clientY,b=!1;const g=Date.now(),T=w=>{if(w.defaultPrevented||d.size>1||l&&Date.now()-g<c)return;const C=w.clientX,E=w.clientY,I=C-p,U=E-f;if(b||Math.abs(I)>s||Math.abs(U)>s){w.preventDefault(),w.stopPropagation();const F=t.getBoundingClientRect(),{left:O,top:N}=F;b||(i?.(p-O,f-N),b=!0),e(I,U,C-O,E-N),p=C,f=E}},W=w=>{if(d.delete(w.pointerId),b){const C=w.clientX,E=w.clientY,I=t.getBoundingClientRect(),{left:U,top:F}=I;n?.(C-U,E-F)}o()},D=w=>{d.delete(w.pointerId),w.relatedTarget&&w.relatedTarget!==document.documentElement||W(w)},R=w=>{b&&(w.stopPropagation(),w.preventDefault())},x=w=>{w.defaultPrevented||d.size>1||b&&w.preventDefault()};document.addEventListener("pointermove",T),document.addEventListener("pointerup",W),document.addEventListener("pointerout",D),document.addEventListener("pointercancel",D),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("click",R,{capture:!0}),o=()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",W),document.removeEventListener("pointerout",D),document.removeEventListener("pointercancel",D),document.removeEventListener("touchmove",x),setTimeout((()=>{document.removeEventListener("click",R,{capture:!0})}),10)}};return t.addEventListener("pointerdown",u),()=>{o(),t.removeEventListener("pointerdown",u),d.clear()}})(this.wrapper,((t,e,i)=>{const n=this.wrapper.getBoundingClientRect().width;this.emit("drag",ot(i/n))}),(t=>{this.isDragging=!0;const e=this.wrapper.getBoundingClientRect().width;this.emit("dragstart",ot(t/e))}),(t=>{this.isDragging=!1;const e=this.wrapper.getBoundingClientRect().width;this.emit("dragend",ot(t/e))})),this.subscriptions.push(this.dragUnsubscribe))}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
|
|
1
|
+
import{r as h,E as Y,_ as Z,L as Zt,k as ut,n as $,b3 as Rt,bq as Kt,bk as Jt,bj as Qt,s as M,j as v,ah as te,c as ee,B as ie,an as re,x as ne,bw as se,u as oe,bx as Q,aE as ae,aV as le,W as ce,l as de,T as he,P as ue}from"./index-wnKDraWU.js";import{T as pe,a as xt}from"./Toolbar-BbbydoLD.js";import{u as fe,F as me}from"./FormClearHelper-CaLJK07N.js";import{c as ge}from"./createDownloadLinkElement-ZaXNnPK4.js";import{u as ve}from"./Hooks-D54IehuR.js";import{F as be,D as ye}from"./FileDownload.esm-DVbGfwz7.js";var At=h.forwardRef(function(r,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(Y,Z({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),h.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});At.displayName="Mic";var Mt=h.forwardRef(function(r,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(Y,Z({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});Mt.displayName="Pause";var It=h.forwardRef(function(r,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(Y,Z({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});It.displayName="PlayArrow";var Ot=h.forwardRef(function(r,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(Y,Z({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),h.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),h.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});Ot.displayName="Refresh";var Lt=h.forwardRef(function(r,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(Y,Z({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});Lt.displayName="StopCircle";function A(r,t,e,i){return new(e||(e=Promise))((function(n,s){function a(l){try{d(i.next(l))}catch(o){s(o)}}function c(l){try{d(i.throw(l))}catch(o){s(o)}}function d(l){var o;l.done?n(l.value):(o=l.value,o instanceof e?o:new e((function(u){u(o)}))).then(a,c)}d((i=i.apply(r,t||[])).next())}))}let K=class{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),i?.once){const n=(...s)=>{this.un(t,n),e(...s)};return this.listeners[t].add(n),()=>this.un(t,n)}return this.listeners[t].add(e),()=>this.un(t,e)}un(t,e){var i;(i=this.listeners[t])===null||i===void 0||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach((i=>i(...e)))}};const tt={decode:function(r,t){return A(this,void 0,void 0,(function*(){const e=new AudioContext({sampleRate:t});try{return yield e.decodeAudioData(r)}finally{e.close()}}))},createBuffer:function(r,t){if(!r||r.length===0)throw new Error("channelData must be a non-empty array");if(t<=0)throw new Error("duration must be greater than 0");if(typeof r[0]=="number"&&(r=[r]),!r[0]||r[0].length===0)throw new Error("channelData must contain non-empty channel arrays");(function(i){const n=i[0];if(n.some((s=>s>1||s<-1))){const s=n.length;let a=0;for(let c=0;c<s;c++){const d=Math.abs(n[c]);d>a&&(a=d)}for(const c of i)for(let d=0;d<s;d++)c[d]/=a}})(r);const e=r.map((i=>i instanceof Float32Array?i:Float32Array.from(i)));return{duration:t,length:e[0].length,sampleRate:e[0].length/t,numberOfChannels:e.length,getChannelData:i=>{const n=e[i];if(!n)throw new Error(`Channel ${i} not found`);return n},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function Ut(r,t){const e=t.xmlns?document.createElementNS(t.xmlns,r):document.createElement(r);for(const[i,n]of Object.entries(t))if(i==="children"&&n)for(const[s,a]of Object.entries(n))a instanceof Node?e.appendChild(a):typeof a=="string"?e.appendChild(document.createTextNode(a)):e.appendChild(Ut(s,a));else i==="style"?Object.assign(e.style,n):i==="textContent"?e.textContent=n:e.setAttribute(i,n.toString());return e}function Et(r,t,e){const i=Ut(r,t||{});return e?.appendChild(i),i}var we=Object.freeze({__proto__:null,createElement:Et,default:Et});const Ce={fetchBlob:function(r,t,e){return A(this,void 0,void 0,(function*(){const i=yield fetch(r,e);if(i.status>=400)throw new Error(`Failed to fetch ${r}: ${i.status} (${i.statusText})`);return(function(n,s){A(this,void 0,void 0,(function*(){if(!n.body||!n.headers)return;const a=n.body.getReader(),c=Number(n.headers.get("Content-Length"))||0;let d=0;const l=o=>{d+=o?.length||0;const u=Math.round(d/c*100);s(u)};try{for(;;){const o=yield a.read();if(o.done)break;l(o.value)}}catch(o){console.warn("Progress tracking error:",o)}}))})(i.clone(),t),i.blob()}))}};class Se extends K{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",(()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)}),{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const n=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;if(i&&this.media.removeAttribute("src"),n||t)try{this.media.src=n}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(t){this.media=t}play(){return A(this,void 0,void 0,(function*(){try{return yield this.media.play()}catch(t){if(t instanceof DOMException&&t.name==="AbortError")return;throw t}}))}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}function ot(r){return r<0?0:r>1?1:r}function Re({maxTop:r,maxBottom:t,halfHeight:e,vScale:i}){const n=Math.round(r*e*i);return{topHeight:n,totalHeight:n+Math.round(t*e*i)||1}}function xe({barAlign:r,halfHeight:t,topHeight:e,totalHeight:i,canvasHeight:n}){return r==="top"?0:r==="bottom"?n-i:t-e}function Pt(r,t,e){const i=t-r.left,n=e-r.top;return[i/r.width,n/r.height]}function Bt(r){return!!(r.barWidth||r.barGap||r.barAlign)}function Wt(r,t){if(!Bt(t))return r;const e=t.barWidth||.5,i=e+(t.barGap||e/2);return i===0?r:Math.floor(r/i)*i}function Dt({scrollLeft:r,totalWidth:t,numCanvases:e}){if(t===0)return[0];const i=r/t,n=Math.floor(i*e);return[n-1,n,n+1]}function Tt({scrollLeft:r,clientWidth:t,scrollWidth:e}){return e===0?{startX:0,endX:0}:{startX:r/e,endX:(r+t)/e}}class Ee extends K{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.dragUnsubscribe=null,this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[n,s]=this.initHtml();i.appendChild(n),this.container=n,this.scrollContainer=s.querySelector(".scroll"),this.wrapper=s.querySelector(".wrapper"),this.canvasWrapper=s.querySelector(".canvases"),this.progressWrapper=s.querySelector(".progress"),this.cursor=s.querySelector(".cursor"),e&&s.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){if(this.wrapper.addEventListener("click",(t=>{const e=this.wrapper.getBoundingClientRect(),[i,n]=Pt(e,t.clientX,t.clientY);this.emit("click",i,n)})),this.wrapper.addEventListener("dblclick",(t=>{const e=this.wrapper.getBoundingClientRect(),[i,n]=Pt(e,t.clientX,t.clientY);this.emit("dblclick",i,n)})),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",(()=>{const{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.scrollContainer,{startX:n,endX:s}=Tt({scrollLeft:t,scrollWidth:e,clientWidth:i});this.emit("scroll",n,s,t,t+i)})),typeof ResizeObserver=="function"){const t=this.createDelay(100);this.resizeObserver=new ResizeObserver((()=>{t().then((()=>this.onContainerResize())).catch((()=>{}))})),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender(),this.emit("resize"))}initDrag(){this.dragUnsubscribe||(this.dragUnsubscribe=(function(t,e,i,n,s=3,a=0,c=100){if(!t)return()=>{};const d=new Map,l=matchMedia("(pointer: coarse)").matches;let o=()=>{};const u=m=>{if(m.button!==a||(d.set(m.pointerId,m),d.size>1))return;let p=m.clientX,f=m.clientY,b=!1;const g=Date.now(),T=w=>{if(w.defaultPrevented||d.size>1||l&&Date.now()-g<c)return;const C=w.clientX,E=w.clientY,I=C-p,U=E-f;if(b||Math.abs(I)>s||Math.abs(U)>s){w.preventDefault(),w.stopPropagation();const F=t.getBoundingClientRect(),{left:O,top:N}=F;b||(i?.(p-O,f-N),b=!0),e(I,U,C-O,E-N),p=C,f=E}},W=w=>{if(d.delete(w.pointerId),b){const C=w.clientX,E=w.clientY,I=t.getBoundingClientRect(),{left:U,top:F}=I;n?.(C-U,E-F)}o()},D=w=>{d.delete(w.pointerId),w.relatedTarget&&w.relatedTarget!==document.documentElement||W(w)},R=w=>{b&&(w.stopPropagation(),w.preventDefault())},x=w=>{w.defaultPrevented||d.size>1||b&&w.preventDefault()};document.addEventListener("pointermove",T),document.addEventListener("pointerup",W),document.addEventListener("pointerout",D),document.addEventListener("pointercancel",D),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("click",R,{capture:!0}),o=()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",W),document.removeEventListener("pointerout",D),document.removeEventListener("pointercancel",D),document.removeEventListener("touchmove",x),setTimeout((()=>{document.removeEventListener("click",R,{capture:!0})}),10)}};return t.addEventListener("pointerdown",u),()=>{o(),t.removeEventListener("pointerdown",u),d.clear()}})(this.wrapper,((t,e,i)=>{const n=this.wrapper.getBoundingClientRect().width;this.emit("drag",ot(i/n))}),(t=>{this.isDragging=!0;const e=this.wrapper.getBoundingClientRect().width;this.emit("dragstart",ot(t/e))}),(t=>{this.isDragging=!1;const e=this.wrapper.getBoundingClientRect().width;this.emit("dragend",ot(t/e))})),this.subscriptions.push(this.dragUnsubscribe))}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
|
|
2
2
|
<style${i?` nonce="${i}"`:""}>
|
|
3
3
|
:host {
|
|
4
4
|
user-select: none;
|