1 line
333 KiB
JavaScript
1 line
333 KiB
JavaScript
(()=>{var e,t={8236:e=>{e.exports=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var s=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,s));var i=n[s];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+i:(t?"-":"")+e.toFixed(1)+" "+i}},6245:(e,t,n)=>{const s=n(1609),i=n(5987),r=n(9375).dashboard,o=n(3852),a=n(8275),l=s.createElement;class u extends s.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(a(this,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:Dashboard",...this.props,target:this.container};delete t.uppy,e.use(i,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=o(this.props),l("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}u.propTypes=r,u.defaultProps={inline:!0},e.exports=u},9368:(e,t,n)=>{const s=n(1609),i=n(5556),r=n(5987),o=n(9375).dashboard,a=n(3852),l=n(8275),u=s.createElement;class c extends s.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(l(this,e)){const e={...this.props,onRequestCloseModal:this.props.onRequestClose};delete e.uppy,this.plugin.setOptions(e)}e.open&&!this.props.open?this.plugin.closeModal():!e.open&&this.props.open&&this.plugin.openModal()}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:DashboardModal",...this.props,onRequestCloseModal:this.props.onRequestClose};t.target||(t.target=this.container),delete t.uppy,e.use(r,t),this.plugin=e.getPlugin(t.id),this.props.open&&this.plugin.openModal()}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=a(this.props),u("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}c.propTypes={target:"undefined"!=typeof window?i.instanceOf(window.HTMLElement):i.any,open:i.bool,onRequestClose:i.func,closeModalOnClickOutside:i.bool,disablePageScrollWhenModalOpen:i.bool,...o},e.exports=c},1362:(e,t,n)=>{const s=n(1609),i=n(6495),r=n(9375),o=n(3852),a=n(8275),l=s.createElement;class u extends s.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(a(this,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:DragDrop",...this.props,target:this.container};delete t.uppy,e.use(i,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=o(this.props),l("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}u.propTypes={uppy:r.uppy,locale:r.locale},u.defaultProps={},e.exports=u},6703:(e,t,n)=>{const s=n(5556),i=n(1609),r=n(1586),o=n(9375),a=i.createElement;class l extends i.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){e.uppy!==this.props.uppy&&(this.uninstallPlugin(e),this.installPlugin())}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:FileInput",...this.props,target:this.container};delete t.uppy,e.use(r,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return a("div",{className:"uppy-Container",ref:e=>{this.container=e}})}}l.propTypes={uppy:o.uppy,locale:o.locale,pretty:s.bool,inputName:s.string},l.defaultProps={},e.exports=l},1413:(e,t,n)=>{const s=n(1609),i=n(5556),r=n(98),o=n(9375).uppy,a=n(3852),l=n(8275),u=s.createElement;class c extends s.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(l(this,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:ProgressBar",...this.props,target:this.container};delete t.uppy,e.use(r,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=a(this.props),u("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}c.propTypes={uppy:o,fixed:i.bool,hideAfterFinish:i.bool},c.defaultProps={},e.exports=c},2578:(e,t,n)=>{const s=n(1609),i=n(5556),r=n(5711),o=n(9375).uppy,a=n(3852),l=n(8275),u=s.createElement;class c extends s.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(l(this,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:StatusBar",...this.props,target:this.container};delete t.uppy,e.use(r,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=a(this.props),u("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}c.propTypes={uppy:o,hideAfterFinish:i.bool,showProgressDetails:i.bool},c.defaultProps={},e.exports=c},3852:e=>{const t=["defaultChecked","defaultValue","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML","accessKey","className","contentEditable","contextMenu","dir","draggable","hidden","id","lang","placeholder","slot","spellCheck","style","tabIndex","title","translate","radioGroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autoCapitalize","autoCorrect","autoSave","color","itemProp","itemScope","itemType","itemID","itemRef","results","security","unselectable","inputMode","is","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],n=/^(aria-|data-)/;e.exports=e=>Object.fromEntries(Object.entries(e).filter((e=>{let[s]=e;return n.test(s)||t.includes(s)})))},8275:e=>{"use strict";e.exports=function(e,t){return Object.keys(e.props).some((n=>!((e,t)=>Object.prototype.hasOwnProperty.call(e,t))(e.validProps,n)&&e.props[n]!==t[n]))}},9375:(e,t,n)=>{const s=n(5556),i=n(3522).Uppy,r=s.instanceOf(i).isRequired,o=s.arrayOf(s.string),a=s.shape({strings:s.object,pluralize:s.func}),l=s.shape({id:s.string.isRequired,name:s.string.isRequired,placeholder:s.string}),u=s.oneOfType([s.arrayOf(l),s.func]),c=s.oneOfType([s.string,s.number]),d={uppy:r,inline:s.bool,plugins:o,width:c,height:c,showProgressDetails:s.bool,hideUploadButton:s.bool,hideProgressAfterFinish:s.bool,note:s.string,metaFields:u,proudlyDisplayPoweredByUppy:s.bool,disableStatusBar:s.bool,disableInformer:s.bool,disableThumbnailGenerator:s.bool,thumbnailWidth:s.number,locale:a};e.exports={uppy:r,locale:a,dashboard:d}},5152:(e,t,n)=>{const{useEffect:s,useRef:i}=n(1609),r=n(3522).Uppy;e.exports=function(e){if("function"!=typeof e)throw new TypeError("useUppy: expected a function that returns a new Uppy instance");const t=i(void 0);if(void 0===t.current&&(t.current=e(),!(t.current instanceof r)))throw new TypeError("useUppy: factory function must return an Uppy instance, got "+typeof t.current);return s((()=>()=>{t.current.close({reason:"unmount"}),t.current=void 0}),[t]),t.current}},7e3:(e,t,n)=>{"use strict";n.d(t,{E:()=>r});var s=n(1609),i=n(6427);function r(e){return e?(0,s.createElement)(i.Icon,{icon:(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 403.08 308.33"},(0,s.createElement)("path",{style:{fill:"#fff"},d:"M305.76,547.23a100.33,100.33,0,0,1-4.94-200.53c3.77-52,49.22-94.8,102.29-94.8a99.32,99.32,0,0,1,69.38,28.17c17.82,17.24,29.42,41.63,31.85,66.93a100.33,100.33,0,0,1,3.43,199.44l-.36,0-45.52.58-64.06-64.36c-7.46,11-16.74,23.67-27.24,34.32C350.56,537.35,329.35,547.23,305.76,547.23Zm-7.11-164.16a64.21,64.21,0,0,0,7.11,128.06c27.14,0,47.61-26.31,66.09-54.52ZM502.24,510.74a64.25,64.25,0,0,0-7.06-128.06c-14.71,0-28,6.56-41.84,20.66-9.58,9.75-18.28,22-25.75,33.21ZM401.52,410.63c8.78-12.82,19.92-27.55,33-39.23,10.88-9.7,22-16.42,33.8-20.43v-1.1A72.08,72.08,0,0,0,447.39,306a63.43,63.43,0,0,0-44.28-18c-17,0-34,7.15-46.6,19.62a65.81,65.81,0,0,0-19.43,39Z",transform:"translate(-198.93 -245.4)"}),(0,s.createElement)("path",{style:{fill:"#4bc2ec"},d:"M403.11,258.4A92.84,92.84,0,0,1,468,284.74c16.73,16.19,27.63,39.12,29.9,62.91v.11l.42,5.37A93.83,93.83,0,0,1,507,540l-42.4.55-67.73-68C387.31,487,377.26,501,366,512.47c-18.76,19-38.45,28.26-60.21,28.26a93.83,93.83,0,1,1,0-187.65h1.31c.35-51.39,44.19-94.68,96-94.68m-.59,162.39c10.62-16.05,22.4-32.1,36.34-44.54,11.48-10.23,23.35-17,35.92-20.46l0-1.62,0-4.61c-1.83-18.3-10.18-35.86-22.94-48.21a69.89,69.89,0,0,0-48.8-19.85c-18.69,0-37.34,7.84-51.17,21.5-12.83,12.68-20.44,28.94-21.61,46l72.19,71.75m97.28,96.69a70.74,70.74,0,0,0-4.62-141.3c-16.57,0-31.34,7.18-46.48,22.61-10.74,10.94-20.48,24.85-29.45,38.63l80.55,80.06m-194,.15c31.09,0,52.85-28.48,74.41-61.88l-79.05-79.42a70.72,70.72,0,0,0,4.64,141.3M403.11,245.4A106.24,106.24,0,0,0,361.18,254,111.75,111.75,0,0,0,303,311.36a105.14,105.14,0,0,0-8.14,29.26,106.82,106.82,0,0,0,10.87,213.11c25.42,0,48.14-10.51,69.46-32.14a231,231,0,0,0,23.52-28.75l56.6,56.87,3.89,3.9,5.5-.07,42.4-.55h.73l.72-.09A107,107,0,0,0,602,446.9a105.82,105.82,0,0,0-31.86-75.63,107.08,107.08,0,0,0-60-30.12C506.6,316.23,494.69,292.5,477,275.4a105.78,105.78,0,0,0-73.9-30ZM344,344.28a59.68,59.68,0,0,1,17.1-32c11.42-11.28,26.73-17.75,42-17.75a57,57,0,0,1,39.76,16.19,65.27,65.27,0,0,1,18.48,35.94c-10.82,4.39-21.09,11-31.14,19.92-11.44,10.2-21.36,22.54-29.59,34L344,344.28Zm92,91.44c6.59-9.68,14-19.69,22-27.83,12.7-12.94,24.18-18.71,37.2-18.71a57.73,57.73,0,0,1,9.37,114.69L436,435.72ZM305.76,504.63A57.73,57.73,0,0,1,296.33,390l67.18,67.49c-8.05,12-16.66,23.65-25.87,32.3-10.81,10.16-20.94,14.89-31.88,14.89Z",transform:"translate(-198.93 -245.4)"}),(0,s.createElement)("polygon",{style:{fill:"#26a9e0"},points:"285.03 289.5 208.78 213.25 202.51 222.85 269.16 289.5 285.03 289.5"}),(0,s.createElement)("path",{style:{fill:"#26a9e0"},d:"M495.18,534.79h-2.31l-87.4-86.86-1.84,2.92c-26.07,41.27-53,83.94-97.87,83.94a87.89,87.89,0,1,1,0-175.77h2.32l81.17,81.16-6.39,9.48-79.39-79.39a76.66,76.66,0,0,0,2.29,153.3c38.66,0,62.81-38.24,88.38-78.71l3.18-5L313,356v-2.34c0-48.43,41.26-89.35,90.1-89.35A87.41,87.41,0,0,1,463.84,289c16.24,15.71,26.06,37.71,28.12,59.21l.36,4.62a27.48,27.48,0,0,0-11.56,1.37l0-4.92C479,330.4,470.38,311,456,297.08a76.25,76.25,0,0,0-52.93-21.52c-20.24,0-40.41,8.46-55.34,23.21-14.61,14.43-22.9,33-23.5,52.62l79.23,78.76c24-37,50.31-71.13,91.68-71.13a87.89,87.89,0,1,1,0,175.77Zm-83.54-96.55,85.82,85.29a76.76,76.76,0,0,0,74.39-76.63,77.5,77.5,0,0,0-76.67-76.66c-18.27,0-34.39,7.75-50.72,24.39C432.65,406.66,421.92,422.25,411.64,438.24Z",transform:"translate(-198.93 -245.4)"}))}):(0,s.createElement)(i.Icon,{icon:(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 403.08 308.33"},(0,s.createElement)("path",{style:{fill:"#9fa3a8"},d:"M305.76,547.23a100.33,100.33,0,0,1-4.94-200.53c3.77-52,49.22-94.8,102.29-94.8a99.32,99.32,0,0,1,69.38,28.17c17.82,17.24,29.42,41.63,31.85,66.93a100.33,100.33,0,0,1,3.43,199.44l-.36,0-45.52.58-64.06-64.36c-7.46,11-16.74,23.67-27.24,34.32C350.56,537.35,329.35,547.23,305.76,547.23Zm-7.11-164.16a64.21,64.21,0,0,0,7.11,128.06c27.14,0,47.61-26.31,66.09-54.52ZM502.24,510.74a64.25,64.25,0,0,0-7.06-128.06c-14.71,0-28,6.56-41.84,20.66-9.58,9.75-18.28,22-25.75,33.21ZM401.52,410.63c8.78-12.82,19.92-27.55,33-39.23,10.88-9.7,22-16.42,33.8-20.43v-1.1A72.08,72.08,0,0,0,447.39,306a63.43,63.43,0,0,0-44.28-18c-17,0-34,7.15-46.6,19.62a65.81,65.81,0,0,0-19.43,39Z",transform:"translate(-198.93 -245.4)"}),(0,s.createElement)("path",{style:{fill:"#313131FF"},d:"M403.11,258.4A92.84,92.84,0,0,1,468,284.74c16.73,16.19,27.63,39.12,29.9,62.91v.11l.42,5.37A93.83,93.83,0,0,1,507,540l-42.4.55-67.73-68C387.31,487,377.26,501,366,512.47c-18.76,19-38.45,28.26-60.21,28.26a93.83,93.83,0,1,1,0-187.65h1.31c.35-51.39,44.19-94.68,96-94.68m-.59,162.39c10.62-16.05,22.4-32.1,36.34-44.54,11.48-10.23,23.35-17,35.92-20.46l0-1.62,0-4.61c-1.83-18.3-10.18-35.86-22.94-48.21a69.89,69.89,0,0,0-48.8-19.85c-18.69,0-37.34,7.84-51.17,21.5-12.83,12.68-20.44,28.94-21.61,46l72.19,71.75m97.28,96.69a70.74,70.74,0,0,0-4.62-141.3c-16.57,0-31.34,7.18-46.48,22.61-10.74,10.94-20.48,24.85-29.45,38.63l80.55,80.06m-194,.15c31.09,0,52.85-28.48,74.41-61.88l-79.05-79.42a70.72,70.72,0,0,0,4.64,141.3M403.11,245.4A106.24,106.24,0,0,0,361.18,254,111.75,111.75,0,0,0,303,311.36a105.14,105.14,0,0,0-8.14,29.26,106.82,106.82,0,0,0,10.87,213.11c25.42,0,48.14-10.51,69.46-32.14a231,231,0,0,0,23.52-28.75l56.6,56.87,3.89,3.9,5.5-.07,42.4-.55h.73l.72-.09A107,107,0,0,0,602,446.9a105.82,105.82,0,0,0-31.86-75.63,107.08,107.08,0,0,0-60-30.12C506.6,316.23,494.69,292.5,477,275.4a105.78,105.78,0,0,0-73.9-30ZM344,344.28a59.68,59.68,0,0,1,17.1-32c11.42-11.28,26.73-17.75,42-17.75a57,57,0,0,1,39.76,16.19,65.27,65.27,0,0,1,18.48,35.94c-10.82,4.39-21.09,11-31.14,19.92-11.44,10.2-21.36,22.54-29.59,34L344,344.28Zm92,91.44c6.59-9.68,14-19.69,22-27.83,12.7-12.94,24.18-18.71,37.2-18.71a57.73,57.73,0,0,1,9.37,114.69L436,435.72ZM305.76,504.63A57.73,57.73,0,0,1,296.33,390l67.18,67.49c-8.05,12-16.66,23.65-25.87,32.3-10.81,10.16-20.94,14.89-31.88,14.89Z",transform:"translate(-198.93 -245.4)"}),(0,s.createElement)("polygon",{style:{fill:"#313131FF"},points:"285.03 289.5 208.78 213.25 202.51 222.85 269.16 289.5 285.03 289.5"}),(0,s.createElement)("path",{style:{fill:"#313131FF"},d:"M495.18,534.79h-2.31l-87.4-86.86-1.84,2.92c-26.07,41.27-53,83.94-97.87,83.94a87.89,87.89,0,1,1,0-175.77h2.32l81.17,81.16-6.39,9.48-79.39-79.39a76.66,76.66,0,0,0,2.29,153.3c38.66,0,62.81-38.24,88.38-78.71l3.18-5L313,356v-2.34c0-48.43,41.26-89.35,90.1-89.35A87.41,87.41,0,0,1,463.84,289c16.24,15.71,26.06,37.71,28.12,59.21l.36,4.62a27.48,27.48,0,0,0-11.56,1.37l0-4.92C479,330.4,470.38,311,456,297.08a76.25,76.25,0,0,0-52.93-21.52c-20.24,0-40.41,8.46-55.34,23.21-14.61,14.43-22.9,33-23.5,52.62l79.23,78.76c24-37,50.31-71.13,91.68-71.13a87.89,87.89,0,1,1,0,175.77Zm-83.54-96.55,85.82,85.29a76.76,76.76,0,0,0,74.39-76.63,77.5,77.5,0,0,0-76.67-76.66c-18.27,0-34.39,7.75-50.72,24.39C432.65,406.66,421.92,422.25,411.64,438.24Z",transform:"translate(-198.93 -245.4)"}))})}n(6087),e=n.hmd(e)},9781:(e,t,n)=>{"use strict";const s=window.wp.blocks;var i=n(1609),r=n.n(i);const o=window.wp.data;var a=n(6427);const l=window.wp.blockEditor,u=window.wp.primitives,c=(0,i.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(u.Path,{d:"M16 10h4c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-4c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1zm-8 4H4c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h4c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm10-2.6L14.5 15l1.1 1.1 1.7-1.7c-.1 1.1-.3 2.3-.9 2.9-.3.3-.7.5-1.3.5h-4.5v1.5H15c.9 0 1.7-.3 2.3-.9 1-1 1.3-2.7 1.4-4l1.8 1.8 1.1-1.1-3.6-3.7zM6.8 9.7c.1-1.1.3-2.3.9-2.9.4-.4.8-.6 1.3-.6h4.5V4.8H9c-.9 0-1.7.3-2.3.9-1 1-1.3 2.7-1.4 4L3.5 8l-1 1L6 12.6 9.5 9l-1-1-1.7 1.7z"}));var d=n(7e3);const p=window.wp.i18n;var h=n(6087),f=n(3522),m=n.n(f),g=n(8395),y=n.n(g),v=(n(6245),n(9368),n(1362)),b=(n(1413),n(2578)),w=(n(6703),n(5152));class E extends f.UIPlugin{constructor(e,t){super(e,{...t}),this.id=this.opts.id||"CreateVid",this.type="modifier"}createVideo(e){return new Promise(((t,n)=>{const s=new FormData;s.append("title",e),s.append("nonce",IUP_VIDEO.nonce),fetch(`${ajaxurl}?action=infinite-uploads-video-create`,{method:"POST",headers:{Accept:"application/json"},body:s}).then((e=>e.json())).then((e=>{console.log(e),e.success?t(e.data):n(e.data)})).catch((e=>(console.log("Error:",e),n(e))))}))}prepareUpload=e=>{const t=e.map((e=>{const t=this.uppy.getFile(e),n=t.name.replace(/\.[^/.]+$/,"");return this.createVideo(n).then((t=>{console.log(`Video ${t.VideoId} created`),this.opts.uploadAuth.current={...this.opts.uploadAuth.current,[e]:t}})).catch((e=>{this.uppy.log(`Video could not be created ${t.id}:`,"warning"),this.uppy.log(e,"warning")}))}));return Promise.all(t).then((()=>{e.forEach((e=>{const t=this.uppy.getFile(e);this.uppy.emit("preprocess-complete",t)}))}))};install(){this.uppy.addPreProcessor(this.prepareUpload)}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}}const _=E,x=({setAttributes:e,attributes:t})=>{const{autoplay:n,loop:s,muted:r,preload:o}=t,l=(0,p.__)("Autoplay may cause usability issues for some users."),u=h.Platform.select({web:(0,h.useCallback)((e=>e?l:null),[]),native:l}),c=(0,h.useMemo)((()=>{const t=t=>n=>{e({[t]:n})};return{autoplay:t("autoplay"),loop:t("loop"),muted:t("muted"),preload:t("preload")}}),[]);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(a.ToggleControl,{label:(0,p.__)("Autoplay"),onChange:c.autoplay,checked:n,help:u}),(0,i.createElement)(a.ToggleControl,{label:(0,p.__)("Loop"),onChange:c.loop,checked:s}),(0,i.createElement)(a.ToggleControl,{label:(0,p.__)("Muted"),onChange:c.muted,checked:r}),(0,i.createElement)(a.ToggleControl,{label:(0,p.__)("Preload"),onChange:c.preload,checked:o}))};var P=n(6942),C=n.n(P),S=n(4848);const O=i.createContext({prefixes:{},breakpoints:["xxl","xl","lg","md","sm","xs"],minBreakpoint:"xs"}),{Consumer:k,Provider:F}=O;function N(e,t){const{prefixes:n}=(0,i.useContext)(O);return e||n[t]||t}function U(){const{breakpoints:e}=(0,i.useContext)(O);return e}function T(){const{minBreakpoint:e}=(0,i.useContext)(O);return e}const A=i.forwardRef((({className:e,bsPrefix:t,as:n="div",...s},i)=>(t=N(t,"card-body"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));A.displayName="CardBody";const R=A,D=i.forwardRef((({className:e,bsPrefix:t,as:n="div",...s},i)=>(t=N(t,"card-footer"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));D.displayName="CardFooter";const I=D,j=i.createContext(null);j.displayName="CardHeaderContext";const B=j,M=i.forwardRef((({bsPrefix:e,className:t,as:n="div",...s},r)=>{const o=N(e,"card-header"),a=(0,i.useMemo)((()=>({cardHeaderBsPrefix:o})),[o]);return(0,S.jsx)(B.Provider,{value:a,children:(0,S.jsx)(n,{ref:r,...s,className:C()(t,o)})})}));M.displayName="CardHeader";const L=M,$=i.forwardRef((({bsPrefix:e,className:t,variant:n,as:s="img",...i},r)=>{const o=N(e,"card-img");return(0,S.jsx)(s,{ref:r,className:C()(n?`${o}-${n}`:o,t),...i})}));$.displayName="CardImg";const z=$,H=i.forwardRef((({className:e,bsPrefix:t,as:n="div",...s},i)=>(t=N(t,"card-img-overlay"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));H.displayName="CardImgOverlay";const q=H,V=i.forwardRef((({className:e,bsPrefix:t,as:n="a",...s},i)=>(t=N(t,"card-link"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));V.displayName="CardLink";const W=V,K=e=>i.forwardRef(((t,n)=>(0,S.jsx)("div",{...t,ref:n,className:C()(t.className,e)}))),G=K("h6"),X=i.forwardRef((({className:e,bsPrefix:t,as:n=G,...s},i)=>(t=N(t,"card-subtitle"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));X.displayName="CardSubtitle";const Z=X,Y=i.forwardRef((({className:e,bsPrefix:t,as:n="p",...s},i)=>(t=N(t,"card-text"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));Y.displayName="CardText";const Q=Y,J=K("h5"),ee=i.forwardRef((({className:e,bsPrefix:t,as:n=J,...s},i)=>(t=N(t,"card-title"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));ee.displayName="CardTitle";const te=ee,ne=i.forwardRef((({bsPrefix:e,className:t,bg:n,text:s,border:i,body:r=!1,children:o,as:a="div",...l},u)=>{const c=N(e,"card");return(0,S.jsx)(a,{ref:u,...l,className:C()(t,c,n&&`bg-${n}`,s&&`text-${s}`,i&&`border-${i}`),children:r?(0,S.jsx)(R,{children:o}):o})}));ne.displayName="Card";const se=Object.assign(ne,{Img:z,Title:te,Subtitle:Z,Body:R,Link:W,Text:Q,Header:L,Footer:I,ImgOverlay:q}),ie=i.forwardRef((({bsPrefix:e,className:t,as:n="div",...s},i)=>{const r=N(e,"row"),o=U(),a=T(),l=`${r}-cols`,u=[];return o.forEach((e=>{const t=s[e];let n;delete s[e],null!=t&&"object"==typeof t?({cols:n}=t):n=t;const i=e!==a?`-${e}`:"";null!=n&&u.push(`${l}${i}-${n}`)})),(0,S.jsx)(n,{ref:i,...s,className:C()(t,r,...u)})}));ie.displayName="Row";const re=ie,oe=i.forwardRef(((e,t)=>{const[{className:n,...s},{as:i="div",bsPrefix:r,spans:o}]=function({as:e,bsPrefix:t,className:n,...s}){t=N(t,"col");const i=U(),r=T(),o=[],a=[];return i.forEach((e=>{const n=s[e];let i,l,u;delete s[e],"object"==typeof n&&null!=n?({span:i,offset:l,order:u}=n):i=n;const c=e!==r?`-${e}`:"";i&&o.push(!0===i?`${t}${c}`:`${t}${c}-${i}`),null!=u&&a.push(`order${c}-${u}`),null!=l&&a.push(`offset${c}-${l}`)})),[{...s,className:C()(n,...o,...a)},{as:e,bsPrefix:t,spans:o}]}(e);return(0,S.jsx)(i,{...s,ref:t,className:C()(n,!o.length&&r)})}));oe.displayName="Col";const ae=oe;function le({video:e}){return(0,i.createElement)("span",{className:"d-inline-flex text-nowrap",title:(0,p.__)("Storage Size","infinite-uploads")},(0,i.createElement)("span",{className:"dashicons dashicons-media-video me-1"}),function(e){if(0===e)return"0 B";var t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toFixed(1)+" "+" KMGTP".charAt(t)+"B"}(e.storageSize))}function ue({video:e}){return(0,i.createElement)("span",{className:"d-inline-flex text-nowrap",title:(0,p.__)("Video Length","infinite-uploads")},(0,i.createElement)("span",{className:"dashicons dashicons-clock me-1"}),(t=e.length,((n=Math.floor(t/3600))>0?n+":":"")+((s=Math.floor(t%3600/60))>0?(n>0&&s<10?"0":"")+s+":":"0:")+((r=Math.floor(t%3600%60))<10?"0":"")+r));var t,n,s,r}function ce({video:e}){return(0,i.createElement)("span",{className:"d-inline-flex text-nowrap",title:(0,p.__)("View Count","infinite-uploads")},(0,i.createElement)("span",{className:"dashicons dashicons-welcome-view-site me-1"}),e.views)}function de({video:e}){return(0,i.createElement)("small",{className:"d-inline-flex text-nowrap",title:(0,p.__)("Upload Date","infinite-uploads")},(0,i.createElement)("span",{className:"dashicons dashicons-calendar me-1"}),(t=e.dateUploaded,new Date(t).toLocaleString()));var t}const pe=i.forwardRef((({bsPrefix:e,fluid:t=!1,as:n="div",className:s,...i},r)=>{const o=N(e,"container"),a="string"==typeof t?`-${t}`:"-fluid";return(0,S.jsx)(n,{ref:r,...i,className:C()(s,t?`${o}${a}`:o)})}));pe.displayName="Container";const he=pe,fe=!("undefined"==typeof window||!window.document||!window.document.createElement);var me=!1,ge=!1;try{var ye={get passive(){return me=!0},get once(){return ge=me=!0}};fe&&(window.addEventListener("test",ye,ye),window.removeEventListener("test",ye,!0))}catch(e){}const ve=function(e,t,n,s){if(s&&"boolean"!=typeof s&&!ge){var i=s.once,r=s.capture,o=n;!ge&&i&&(o=n.__once||function e(s){this.removeEventListener(t,e,r),n.call(this,s)},n.__once=o),e.addEventListener(t,o,me?s:r)}e.addEventListener(t,n,s)};function be(e){return e&&e.ownerDocument||document}const we=function(e,t,n,s){var i=s&&"boolean"!=typeof s?s.capture:s;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)};var Ee;function _e(e){if((!Ee&&0!==Ee||e)&&fe){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),Ee=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ee}function xe(e){const t=function(e){const t=(0,i.useRef)(e);return(0,i.useEffect)((()=>{t.current=e}),[e]),t}(e);return(0,i.useCallback)((function(...e){return t.current&&t.current(...e)}),[t])}const Pe=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,Ce=function(e,t){return(0,i.useMemo)((()=>function(e,t){const n=Pe(e),s=Pe(t);return e=>{n&&n(e),s&&s(e)}}(e,t)),[e,t])};var Se=/([A-Z])/g,Oe=/^ms-/;function ke(e){return function(e){return e.replace(Se,"-$1").toLowerCase()}(e).replace(Oe,"-ms-")}var Fe=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;const Ne=function(e,t){var n="",s="";if("string"==typeof t)return e.style.getPropertyValue(ke(t))||function(e,t){return function(e){var t=be(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}(e).getPropertyValue(ke(t));Object.keys(t).forEach((function(i){var r=t[i];r||0===r?function(e){return!(!e||!Fe.test(e))}(i)?s+=i+"("+r+") ":n+=ke(i)+": "+r+";":e.style.removeProperty(ke(i))})),s&&(n+="transform: "+s+";"),e.style.cssText+=";"+n},Ue=function(e,t,n,s){return ve(e,t,n,s),function(){we(e,t,n,s)}};function Te(e,t,n,s){var i,r;null==n&&(r=-1===(i=Ne(e,"transitionDuration")||"").indexOf("ms")?1e3:1,n=parseFloat(i)*r||0);var o=function(e,t,n){void 0===n&&(n=5);var s=!1,i=setTimeout((function(){s||function(e,t,n,s){if(void 0===n&&(n=!1),void 0===s&&(s=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent("transitionend",n,s),e.dispatchEvent(i)}}(e,0,!0)}),t+n),r=Ue(e,"transitionend",(function(){s=!0}),{once:!0});return function(){clearTimeout(i),r()}}(e,n,s),a=Ue(e,"transitionend",t);return function(){o(),a()}}function Ae(e){void 0===e&&(e=be());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(t){return e.body}}function Re(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}const De=window.ReactDOM;var Ie=n.n(De);function je(e){const t=function(e){const t=(0,i.useRef)(e);return(0,i.useEffect)((()=>{t.current=e}),[e]),t}(e);return(0,i.useCallback)((function(...e){return t.current&&t.current(...e)}),[t])}function Be(e){return`data-rr-ui-${e}`}const Me=Be("modal-open"),Le=class{constructor({ownerDocument:e,handleContainerOverflow:t=!0,isRTL:n=!1}={}){this.handleContainerOverflow=t,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return function(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const t={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",s=this.getElement();e.style={overflow:s.style.overflow,[n]:s.style[n]},e.scrollBarWidth&&(t[n]=`${parseInt(Ne(s,n)||"0",10)+e.scrollBarWidth}px`),s.setAttribute(Me,""),Ne(s,t)}reset(){[...this.modals].forEach((e=>this.remove(e)))}removeContainerStyle(e){const t=this.getElement();t.removeAttribute(Me),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return-1!==t||(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state))),t}remove(e){const t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}},$e=(0,i.createContext)(fe?window:void 0);function ze(){return(0,i.useContext)($e)}$e.Provider;const He=(e,t)=>fe?null==e?(t||be()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null,qe=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,Ve=function(e,t){return(0,i.useMemo)((()=>function(e,t){const n=qe(e),s=qe(t);return e=>{n&&n(e),s&&s(e)}}(e,t)),[e,t])},We=void 0!==n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,Ke="undefined"!=typeof document||We?i.useLayoutEffect:i.useEffect,Ge=function({children:e,in:t,onExited:n,mountOnEnter:s,unmountOnExit:r}){const o=(0,i.useRef)(null),a=(0,i.useRef)(t),l=je(n);(0,i.useEffect)((()=>{t?a.current=!0:l(o.current)}),[t,l]);const u=Ve(o,e.ref),c=(0,i.cloneElement)(e,{ref:u});return t?c:r||!a.current&&s?null:c};function Xe(e){if(!e||"function"==typeof e)return null;const{major:t}=function(){const e=i.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}();return t>=19?e.props.ref:e.ref}const Ze=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"],Ye=["component"],Qe=i.forwardRef(((e,t)=>{let{component:n}=e;const s=function(e){let{onEnter:t,onEntering:n,onEntered:s,onExit:r,onExiting:o,onExited:a,addEndListener:l,children:u}=e,c=function(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}(e,Ze);const d=(0,i.useRef)(null),p=Ve(d,Xe(u)),h=e=>t=>{e&&d.current&&e(d.current,t)},f=(0,i.useCallback)(h(t),[t]),m=(0,i.useCallback)(h(n),[n]),g=(0,i.useCallback)(h(s),[s]),y=(0,i.useCallback)(h(r),[r]),v=(0,i.useCallback)(h(o),[o]),b=(0,i.useCallback)(h(a),[a]),w=(0,i.useCallback)(h(l),[l]);return Object.assign({},c,{nodeRef:d},t&&{onEnter:f},n&&{onEntering:m},s&&{onEntered:g},r&&{onExit:y},o&&{onExiting:v},a&&{onExited:b},l&&{addEndListener:w},{children:"function"==typeof u?(e,t)=>u(e,Object.assign({},t,{ref:p})):(0,i.cloneElement)(u,{ref:p})})}(function(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}(e,Ye));return(0,S.jsx)(n,Object.assign({ref:t},s))}));function Je({children:e,in:t,onExited:n,onEntered:s,transition:r}){const[o,a]=(0,i.useState)(!t);t&&o&&a(!1);const l=function({in:e,onTransition:t}){const n=(0,i.useRef)(null),s=(0,i.useRef)(!0),r=je(t);return Ke((()=>{if(!n.current)return;let t=!1;return r({in:e,element:n.current,initial:s.current,isStale:()=>t}),()=>{t=!0}}),[e,r]),Ke((()=>(s.current=!1,()=>{s.current=!0})),[]),n}({in:!!t,onTransition:e=>{Promise.resolve(r(e)).then((()=>{e.isStale()||(e.in?null==s||s(e.element,e.initial):(a(!0),null==n||n(e.element)))}),(t=>{throw e.in||a(!0),t}))}}),u=Ve(l,e.ref);return o&&!t?null:(0,i.cloneElement)(e,{ref:u})}function et(e,t,n){return e?(0,S.jsx)(Qe,Object.assign({},n,{component:e})):t?(0,S.jsx)(Je,Object.assign({},n,{transition:t})):(0,S.jsx)(Ge,Object.assign({},n))}const tt=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];let nt;const st=(0,i.forwardRef)(((e,t)=>{let{show:n=!1,role:s="dialog",className:r,style:o,children:a,backdrop:l=!0,keyboard:u=!0,onBackdropClick:c,onEscapeKeyDown:d,transition:p,runTransition:h,backdropTransition:f,runBackdropTransition:m,autoFocus:g=!0,enforceFocus:y=!0,restoreFocus:v=!0,restoreFocusOptions:b,renderDialog:w,renderBackdrop:E=e=>(0,S.jsx)("div",Object.assign({},e)),manager:_,container:x,onShow:P,onHide:C=()=>{},onExit:O,onExited:k,onExiting:F,onEnter:N,onEntering:U,onEntered:T}=e,A=function(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}(e,tt);const R=ze(),D=function(e,t){const n=ze(),[s,r]=(0,i.useState)((()=>He(e,null==n?void 0:n.document)));if(!s){const t=He(e);t&&r(t)}return(0,i.useEffect)((()=>{}),[t,s]),(0,i.useEffect)((()=>{const t=He(e);t!==s&&r(t)}),[e,s]),s}(x),I=function(e){const t=ze(),n=e||function(e){return nt||(nt=new Le({ownerDocument:null==e?void 0:e.document})),nt}(t),s=(0,i.useRef)({dialog:null,backdrop:null});return Object.assign(s.current,{add:()=>n.add(s.current),remove:()=>n.remove(s.current),isTopModal:()=>n.isTopModal(s.current),setDialogRef:(0,i.useCallback)((e=>{s.current.dialog=e}),[]),setBackdropRef:(0,i.useCallback)((e=>{s.current.backdrop=e}),[])})}(_),j=function(){const e=(0,i.useRef)(!0),t=(0,i.useRef)((()=>e.current));return(0,i.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),t.current}(),B=function(e){const t=(0,i.useRef)(null);return(0,i.useEffect)((()=>{t.current=e})),t.current}(n),[M,L]=(0,i.useState)(!n),$=(0,i.useRef)(null);(0,i.useImperativeHandle)(t,(()=>I),[I]),fe&&!B&&n&&($.current=Ae(null==R?void 0:R.document)),n&&M&&L(!1);const z=je((()=>{if(I.add(),G.current=Ue(document,"keydown",W),K.current=Ue(document,"focus",(()=>setTimeout(q)),!0),P&&P(),g){var e,t;const n=Ae(null!=(e=null==(t=I.dialog)?void 0:t.ownerDocument)?e:null==R?void 0:R.document);I.dialog&&n&&!Re(I.dialog,n)&&($.current=n,I.dialog.focus())}})),H=je((()=>{var e;I.remove(),null==G.current||G.current(),null==K.current||K.current(),v&&(null==(e=$.current)||null==e.focus||e.focus(b),$.current=null)}));(0,i.useEffect)((()=>{n&&D&&z()}),[n,D,z]),(0,i.useEffect)((()=>{M&&H()}),[M,H]),function(e){const t=function(e){const t=(0,i.useRef)(e);return t.current=e,t}(e);(0,i.useEffect)((()=>()=>t.current()),[])}((()=>{H()}));const q=je((()=>{if(!y||!j()||!I.isTopModal())return;const e=Ae(null==R?void 0:R.document);I.dialog&&e&&!Re(I.dialog,e)&&I.dialog.focus()})),V=je((e=>{e.target===e.currentTarget&&(null==c||c(e),!0===l&&C())})),W=je((e=>{u&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&I.isTopModal()&&(null==d||d(e),e.defaultPrevented||C())})),K=(0,i.useRef)(),G=(0,i.useRef)();if(!D)return null;const X=Object.assign({role:s,ref:I.setDialogRef,"aria-modal":"dialog"===s||void 0},A,{style:o,className:r,tabIndex:-1});let Z=w?w(X):(0,S.jsx)("div",Object.assign({},X,{children:i.cloneElement(a,{role:"document"})}));Z=et(p,h,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:O,onExiting:F,onExited:(...e)=>{L(!0),null==k||k(...e)},onEnter:N,onEntering:U,onEntered:T,children:Z});let Y=null;return l&&(Y=E({ref:I.setBackdropRef,onClick:V}),Y=et(f,m,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Y})),(0,S.jsx)(S.Fragment,{children:Ie().createPortal((0,S.jsxs)(S.Fragment,{children:[Y,Z]}),D)})}));st.displayName="Modal";const it=Object.assign(st,{Manager:Le});var rt=Function.prototype.bind.call(Function.prototype.call,[].slice);function ot(e,t){return rt(e.querySelectorAll(t))}function at(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const lt=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ut=".sticky-top",ct=".navbar-toggler";class dt extends Le{adjustAndStore(e,t,n){const s=t.style[e];t.dataset[e]=s,Ne(t,{[e]:`${parseFloat(Ne(t,e))+n}px`})}restore(e,t){const n=t.dataset[e];void 0!==n&&(delete t.dataset[e],Ne(t,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const t=this.getElement();var n,s;if(s="modal-open",(n=t).classList?n.classList.add(s):function(e,t){return e.classList?e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,s)||("string"==typeof n.className?n.className=n.className+" "+s:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+s)),!e.scrollBarWidth)return;const i=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";ot(t,lt).forEach((t=>this.adjustAndStore(i,t,e.scrollBarWidth))),ot(t,ut).forEach((t=>this.adjustAndStore(r,t,-e.scrollBarWidth))),ot(t,ct).forEach((t=>this.adjustAndStore(r,t,e.scrollBarWidth)))}removeContainerStyle(e){super.removeContainerStyle(e);const t=this.getElement();var n,s;s="modal-open",(n=t).classList?n.classList.remove(s):"string"==typeof n.className?n.className=at(n.className,s):n.setAttribute("class",at(n.className&&n.className.baseVal||"",s));const i=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";ot(t,lt).forEach((e=>this.restore(i,e))),ot(t,ut).forEach((e=>this.restore(r,e))),ot(t,ct).forEach((e=>this.restore(r,e)))}}let pt;function ht(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.includes(s))continue;n[s]=e[s]}return n}function ft(e,t){return ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ft(e,t)}const mt=r().createContext(null);var gt="unmounted",yt="exited",vt="entering",bt="entered",wt="exiting",Et=function(e){var t,n;function s(t,n){var s;s=e.call(this,t,n)||this;var i,r=n&&!n.isMounting?t.enter:t.appear;return s.appearStatus=null,t.in?r?(i=yt,s.appearStatus=vt):i=bt:i=t.unmountOnExit||t.mountOnEnter?gt:yt,s.state={status:i},s.nextCallback=null,s}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,ft(t,n),s.getDerivedStateFromProps=function(e,t){return e.in&&t.status===gt?{status:yt}:null};var i=s.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==vt&&n!==bt&&(t=vt):n!==vt&&n!==bt||(t=wt)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,s=this.props.timeout;return e=t=n=s,null!=s&&"number"!=typeof s&&(e=s.exit,t=s.enter,n=void 0!==s.appear?s.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===vt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Ie().findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===yt&&this.setState({status:gt})},i.performEnter=function(e){var t=this,n=this.props.enter,s=this.context?this.context.isMounting:e,i=this.props.nodeRef?[s]:[Ie().findDOMNode(this),s],r=i[0],o=i[1],a=this.getTimeouts(),l=s?a.appear:a.enter;e||n?(this.props.onEnter(r,o),this.safeSetState({status:vt},(function(){t.props.onEntering(r,o),t.onTransitionEnd(l,(function(){t.safeSetState({status:bt},(function(){t.props.onEntered(r,o)}))}))}))):this.safeSetState({status:bt},(function(){t.props.onEntered(r)}))},i.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),s=this.props.nodeRef?void 0:Ie().findDOMNode(this);t?(this.props.onExit(s),this.safeSetState({status:wt},(function(){e.props.onExiting(s),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:yt},(function(){e.props.onExited(s)}))}))}))):this.safeSetState({status:yt},(function(){e.props.onExited(s)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(s){n&&(n=!1,t.nextCallback=null,e(s))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Ie().findDOMNode(this),s=null==e&&!this.props.addEndListener;if(n&&!s){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=i[0],o=i[1];this.props.addEndListener(r,o)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if(e===gt)return null;var t=this.props,n=t.children,s=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,ht(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return r().createElement(mt.Provider,{value:null},"function"==typeof n?n(e,s):r().cloneElement(r().Children.only(n),s))},s}(r().Component);function _t(){}Et.contextType=mt,Et.propTypes={},Et.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:_t,onEntering:_t,onEntered:_t,onExit:_t,onExiting:_t,onExited:_t},Et.UNMOUNTED=gt,Et.EXITED=yt,Et.ENTERING=vt,Et.ENTERED=bt,Et.EXITING=wt;const xt=Et;function Pt(e,t){const n=Ne(e,t)||"",s=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*s}function Ct(e,t){const n=Pt(e,"transitionDuration"),s=Pt(e,"transitionDelay"),i=Te(e,(n=>{n.target===e&&(i(),t(n))}),n+s)}const St=r().forwardRef((({onEnter:e,onEntering:t,onEntered:n,onExit:s,onExiting:o,onExited:a,addEndListener:l,children:u,childRef:c,...d},p)=>{const h=(0,i.useRef)(null),f=Ce(h,c),m=e=>{var t;f((t=e)&&"setState"in t?Ie().findDOMNode(t):null!=t?t:null)},g=e=>t=>{e&&h.current&&e(h.current,t)},y=(0,i.useCallback)(g(e),[e]),v=(0,i.useCallback)(g(t),[t]),b=(0,i.useCallback)(g(n),[n]),w=(0,i.useCallback)(g(s),[s]),E=(0,i.useCallback)(g(o),[o]),_=(0,i.useCallback)(g(a),[a]),x=(0,i.useCallback)(g(l),[l]);return(0,S.jsx)(xt,{ref:p,...d,onEnter:y,onEntered:b,onEntering:v,onExit:w,onExited:_,onExiting:E,addEndListener:x,nodeRef:h,children:"function"==typeof u?(e,t)=>u(e,{...t,ref:m}):r().cloneElement(u,{ref:m})})})),Ot={[vt]:"show",[bt]:"show"},kt=i.forwardRef((({className:e,children:t,transitionClasses:n={},onEnter:s,...r},o)=>{const a={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...r},l=(0,i.useCallback)(((e,t)=>{!function(e){e.offsetHeight}(e),null==s||s(e,t)}),[s]);return(0,S.jsx)(St,{ref:o,addEndListener:Ct,...a,onEnter:l,childRef:Xe(t),children:(s,r)=>i.cloneElement(t,{...r,className:C()("fade",e,t.props.className,Ot[s],n[s])})})}));kt.displayName="Fade";const Ft=kt,Nt=i.forwardRef((({className:e,bsPrefix:t,as:n="div",...s},i)=>(t=N(t,"modal-body"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));Nt.displayName="ModalBody";const Ut=Nt,Tt=i.createContext({onHide(){}}),At=i.forwardRef((({bsPrefix:e,className:t,contentClassName:n,centered:s,size:i,fullscreen:r,children:o,scrollable:a,...l},u)=>{const c=`${e=N(e,"modal")}-dialog`,d="string"==typeof r?`${e}-fullscreen-${r}`:`${e}-fullscreen`;return(0,S.jsx)("div",{...l,ref:u,className:C()(c,t,i&&`${e}-${i}`,s&&`${c}-centered`,a&&`${c}-scrollable`,r&&d),children:(0,S.jsx)("div",{className:C()(`${e}-content`,n),children:o})})}));At.displayName="ModalDialog";const Rt=At,Dt=i.forwardRef((({className:e,bsPrefix:t,as:n="div",...s},i)=>(t=N(t,"modal-footer"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));Dt.displayName="ModalFooter";const It=Dt;var jt=n(5556),Bt=n.n(jt);const Mt={"aria-label":Bt().string,onClick:Bt().func,variant:Bt().oneOf(["white"])},Lt=i.forwardRef((({className:e,variant:t,"aria-label":n="Close",...s},i)=>(0,S.jsx)("button",{ref:i,type:"button",className:C()("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...s})));Lt.displayName="CloseButton",Lt.propTypes=Mt;const $t=Lt,zt=i.forwardRef((({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:s,children:r,...o},a)=>{const l=(0,i.useContext)(Tt),u=xe((()=>{null==l||l.onHide(),null==s||s()}));return(0,S.jsxs)("div",{ref:a,...o,children:[r,n&&(0,S.jsx)($t,{"aria-label":e,variant:t,onClick:u})]})})),Ht=zt,qt=i.forwardRef((({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:s=!1,...i},r)=>(e=N(e,"modal-header"),(0,S.jsx)(Ht,{ref:r,...i,className:C()(t,e),closeLabel:n,closeButton:s}))));qt.displayName="ModalHeader";const Vt=qt,Wt=K("h4"),Kt=i.forwardRef((({className:e,bsPrefix:t,as:n=Wt,...s},i)=>(t=N(t,"modal-title"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));Kt.displayName="ModalTitle";const Gt=Kt;function Xt(e){return(0,S.jsx)(Ft,{...e,timeout:null})}function Zt(e){return(0,S.jsx)(Ft,{...e,timeout:null})}const Yt=i.forwardRef((({bsPrefix:e,className:t,style:n,dialogClassName:s,contentClassName:r,children:o,dialogAs:a=Rt,"data-bs-theme":l,"aria-labelledby":u,"aria-describedby":c,"aria-label":d,show:p=!1,animation:h=!0,backdrop:f=!0,keyboard:m=!0,onEscapeKeyDown:g,onShow:y,onHide:v,container:b,autoFocus:w=!0,enforceFocus:E=!0,restoreFocus:_=!0,restoreFocusOptions:x,onEntered:P,onExit:k,onExiting:F,onEnter:U,onEntering:T,onExited:A,backdropClassName:R,manager:D,...I},j)=>{const[B,M]=(0,i.useState)({}),[L,$]=(0,i.useState)(!1),z=(0,i.useRef)(!1),H=(0,i.useRef)(!1),q=(0,i.useRef)(null),[V,W]=(0,i.useState)(null),K=Ce(j,W),G=xe(v),X=function(){const{dir:e}=(0,i.useContext)(O);return"rtl"===e}();e=N(e,"modal");const Z=(0,i.useMemo)((()=>({onHide:G})),[G]);function Y(){return D||function(e){return pt||(pt=new dt(e)),pt}({isRTL:X})}function Q(e){if(!fe)return;const t=Y().getScrollbarWidth()>0,n=e.scrollHeight>be(e).documentElement.clientHeight;M({paddingRight:t&&!n?_e():void 0,paddingLeft:!t&&n?_e():void 0})}const J=xe((()=>{V&&Q(V.dialog)}));!function(e){const t=function(e){const t=(0,i.useRef)(e);return t.current=e,t}(e);(0,i.useEffect)((()=>()=>t.current()),[])}((()=>{we(window,"resize",J),null==q.current||q.current()}));const ee=()=>{z.current=!0},te=e=>{z.current&&V&&e.target===V.dialog&&(H.current=!0),z.current=!1},ne=()=>{$(!0),q.current=Te(V.dialog,(()=>{$(!1)}))},se=e=>{"static"!==f?H.current||e.target!==e.currentTarget?H.current=!1:null==v||v():(e=>{e.target===e.currentTarget&&ne()})(e)},ie=(0,i.useCallback)((t=>(0,S.jsx)("div",{...t,className:C()(`${e}-backdrop`,R,!h&&"show")})),[h,R,e]),re={...n,...B};return re.display="block",(0,S.jsx)(Tt.Provider,{value:Z,children:(0,S.jsx)(it,{show:p,ref:K,backdrop:f,container:b,keyboard:!0,autoFocus:w,enforceFocus:E,restoreFocus:_,restoreFocusOptions:x,onEscapeKeyDown:e=>{m?null==g||g(e):(e.preventDefault(),"static"===f&&ne())},onShow:y,onHide:v,onEnter:(e,t)=>{e&&Q(e),null==U||U(e,t)},onEntering:(e,t)=>{null==T||T(e,t),ve(window,"resize",J)},onEntered:P,onExit:e=>{null==q.current||q.current(),null==k||k(e)},onExiting:F,onExited:e=>{e&&(e.style.display=""),null==A||A(e),we(window,"resize",J)},manager:Y(),transition:h?Xt:void 0,backdropTransition:h?Zt:void 0,renderBackdrop:ie,renderDialog:n=>(0,S.jsx)("div",{role:"dialog",...n,style:re,className:C()(t,e,L&&`${e}-static`,!h&&"show"),onClick:f?se:void 0,onMouseUp:te,"data-bs-theme":l,"aria-label":d,"aria-labelledby":u,"aria-describedby":c,children:(0,S.jsx)(a,{...I,onMouseDown:ee,className:s,contentClassName:r,children:o})})})})}));Yt.displayName="Modal";const Qt=Object.assign(Yt,{Body:Ut,Header:Vt,Title:Gt,Footer:It,Dialog:Rt,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),Jt={type:Bt().string,tooltip:Bt().bool,as:Bt().elementType},en=i.forwardRef((({as:e="div",className:t,type:n="valid",tooltip:s=!1,...i},r)=>(0,S.jsx)(e,{...i,ref:r,className:C()(t,`${n}-${s?"tooltip":"feedback"}`)})));en.displayName="Feedback",en.propTypes=Jt;const tn=en,nn=i.createContext({}),sn=i.forwardRef((({id:e,bsPrefix:t,className:n,type:s="checkbox",isValid:r=!1,isInvalid:o=!1,as:a="input",...l},u)=>{const{controlId:c}=(0,i.useContext)(nn);return t=N(t,"form-check-input"),(0,S.jsx)(a,{...l,ref:u,type:s,id:e||c,className:C()(n,t,r&&"is-valid",o&&"is-invalid")})}));sn.displayName="FormCheckInput";const rn=sn,on=i.forwardRef((({bsPrefix:e,className:t,htmlFor:n,...s},r)=>{const{controlId:o}=(0,i.useContext)(nn);return e=N(e,"form-check-label"),(0,S.jsx)("label",{...s,ref:r,htmlFor:n||o,className:C()(t,e)})}));on.displayName="FormCheckLabel";const an=on;function ln(e,t){let n=0;return i.Children.map(e,(e=>i.isValidElement(e)?t(e,n++):e))}const un=i.forwardRef((({id:e,bsPrefix:t,bsSwitchPrefix:n,inline:s=!1,reverse:r=!1,disabled:o=!1,isValid:a=!1,isInvalid:l=!1,feedbackTooltip:u=!1,feedback:c,feedbackType:d,className:p,style:h,title:f="",type:m="checkbox",label:g,children:y,as:v="input",...b},w)=>{t=N(t,"form-check"),n=N(n,"form-switch");const{controlId:E}=(0,i.useContext)(nn),_=(0,i.useMemo)((()=>({controlId:e||E})),[E,e]),x=!y&&null!=g&&!1!==g||function(e,t){return i.Children.toArray(e).some((e=>i.isValidElement(e)&&e.type===t))}(y,an),P=(0,S.jsx)(rn,{...b,type:"switch"===m?"checkbox":m,ref:w,isValid:a,isInvalid:l,disabled:o,as:v});return(0,S.jsx)(nn.Provider,{value:_,children:(0,S.jsx)("div",{style:h,className:C()(p,x&&t,s&&`${t}-inline`,r&&`${t}-reverse`,"switch"===m&&n),children:y||(0,S.jsxs)(S.Fragment,{children:[P,x&&(0,S.jsx)(an,{title:f,children:g}),c&&(0,S.jsx)(tn,{type:d,tooltip:u,children:c})]})})})}));un.displayName="FormCheck";const cn=Object.assign(un,{Input:rn,Label:an});n(9771);const dn=i.forwardRef((({bsPrefix:e,type:t,size:n,htmlSize:s,id:r,className:o,isValid:a=!1,isInvalid:l=!1,plaintext:u,readOnly:c,as:d="input",...p},h)=>{const{controlId:f}=(0,i.useContext)(nn);return e=N(e,"form-control"),(0,S.jsx)(d,{...p,type:t,size:s,ref:h,readOnly:c,id:r||f,className:C()(o,u?`${e}-plaintext`:e,n&&`${e}-${n}`,"color"===t&&`${e}-color`,a&&"is-valid",l&&"is-invalid")})}));dn.displayName="FormControl";const pn=Object.assign(dn,{Feedback:tn}),hn=i.forwardRef((({className:e,bsPrefix:t,as:n="div",...s},i)=>(t=N(t,"form-floating"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));hn.displayName="FormFloating";const fn=hn,mn=i.forwardRef((({controlId:e,as:t="div",...n},s)=>{const r=(0,i.useMemo)((()=>({controlId:e})),[e]);return(0,S.jsx)(nn.Provider,{value:r,children:(0,S.jsx)(t,{...n,ref:s})})}));mn.displayName="FormGroup";const gn=mn,yn=i.forwardRef((({as:e="label",bsPrefix:t,column:n=!1,visuallyHidden:s=!1,className:r,htmlFor:o,...a},l)=>{const{controlId:u}=(0,i.useContext)(nn);t=N(t,"form-label");let c="col-form-label";"string"==typeof n&&(c=`${c} ${c}-${n}`);const d=C()(r,t,s&&"visually-hidden",n&&c);return o=o||u,n?(0,S.jsx)(ae,{ref:l,as:"label",className:d,htmlFor:o,...a}):(0,S.jsx)(e,{ref:l,className:d,htmlFor:o,...a})}));yn.displayName="FormLabel";const vn=yn,bn=i.forwardRef((({bsPrefix:e,className:t,id:n,...s},r)=>{const{controlId:o}=(0,i.useContext)(nn);return e=N(e,"form-range"),(0,S.jsx)("input",{...s,type:"range",ref:r,className:C()(t,e),id:n||o})}));bn.displayName="FormRange";const wn=bn,En=i.forwardRef((({bsPrefix:e,size:t,htmlSize:n,className:s,isValid:r=!1,isInvalid:o=!1,id:a,...l},u)=>{const{controlId:c}=(0,i.useContext)(nn);return e=N(e,"form-select"),(0,S.jsx)("select",{...l,size:n,ref:u,className:C()(s,e,t&&`${e}-${t}`,r&&"is-valid",o&&"is-invalid"),id:a||c})}));En.displayName="FormSelect";const xn=En,Pn=i.forwardRef((({bsPrefix:e,className:t,as:n="small",muted:s,...i},r)=>(e=N(e,"form-text"),(0,S.jsx)(n,{...i,ref:r,className:C()(t,e,s&&"text-muted")}))));Pn.displayName="FormText";const Cn=Pn,Sn=i.forwardRef(((e,t)=>(0,S.jsx)(cn,{...e,ref:t,type:"switch"})));Sn.displayName="Switch";const On=Object.assign(Sn,{Input:cn.Input,Label:cn.Label}),kn=i.forwardRef((({bsPrefix:e,className:t,children:n,controlId:s,label:i,...r},o)=>(e=N(e,"form-floating"),(0,S.jsxs)(gn,{ref:o,className:C()(t,e),controlId:s,...r,children:[n,(0,S.jsx)("label",{htmlFor:s,children:i})]}))));kn.displayName="FloatingLabel";const Fn=kn,Nn={_ref:Bt().any,validated:Bt().bool,as:Bt().elementType},Un=i.forwardRef((({className:e,validated:t,as:n="form",...s},i)=>(0,S.jsx)(n,{...s,ref:i,className:C()(e,t&&"was-validated")})));Un.displayName="Form",Un.propTypes=Nn;const Tn=Object.assign(Un,{Group:gn,Control:pn,Floating:fn,Check:cn,Switch:On,Label:vn,Text:Cn,Range:wn,Select:xn,FloatingLabel:Fn}),An=i.createContext(null);An.displayName="InputGroupContext";const Rn=An,Dn=i.forwardRef((({className:e,bsPrefix:t,as:n="span",...s},i)=>(t=N(t,"input-group-text"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));Dn.displayName="InputGroupText";const In=Dn,jn=i.forwardRef((({bsPrefix:e,size:t,hasValidation:n,className:s,as:r="div",...o},a)=>{e=N(e,"input-group");const l=(0,i.useMemo)((()=>({})),[]);return(0,S.jsx)(Rn.Provider,{value:l,children:(0,S.jsx)(r,{ref:a,...o,className:C()(s,e,t&&`${e}-${t}`,n&&"has-validation")})})}));jn.displayName="InputGroup";const Bn=Object.assign(jn,{Text:In,Radio:e=>(0,S.jsx)(In,{children:(0,S.jsx)(rn,{type:"radio",...e})}),Checkbox:e=>(0,S.jsx)(In,{children:(0,S.jsx)(rn,{type:"checkbox",...e})})}),Mn=["as","disabled"];function Ln({tagName:e,disabled:t,href:n,target:s,rel:i,role:r,onClick:o,tabIndex:a=0,type:l}){e||(e=null!=n||null!=s||null!=i?"a":"button");const u={tagName:e};if("button"===e)return[{type:l||"button",disabled:t},u];const c=s=>{(t||"a"===e&&function(e){return!e||"#"===e.trim()}(n))&&s.preventDefault(),t?s.stopPropagation():null==o||o(s)};return"a"===e&&(n||(n="#"),t&&(n=void 0)),[{role:null!=r?r:"button",disabled:void 0,tabIndex:t?void 0:a,href:n,target:"a"===e?s:void 0,"aria-disabled":t||void 0,rel:"a"===e?i:void 0,onClick:c,onKeyDown:e=>{" "===e.key&&(e.preventDefault(),c(e))}},u]}const $n=i.forwardRef(((e,t)=>{let{as:n,disabled:s}=e,i=function(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}(e,Mn);const[r,{tagName:o}]=Ln(Object.assign({tagName:n,disabled:s},i));return(0,S.jsx)(o,Object.assign({},i,r,{ref:t}))}));$n.displayName="Button";const zn=$n,Hn=i.forwardRef((({as:e,bsPrefix:t,variant:n="primary",size:s,active:i=!1,disabled:r=!1,className:o,...a},l)=>{const u=N(t,"btn"),[c,{tagName:d}]=Ln({tagName:e,disabled:r,...a}),p=d;return(0,S.jsx)(p,{...c,...a,ref:l,disabled:r,className:C()(o,u,i&&"active",n&&`${u}-${n}`,s&&`${u}-${s}`,a.href&&r&&"disabled")})}));Hn.displayName="Button";const qn=Hn;const Vn={prefix:String(Math.round(1e10*Math.random())),current:0},Wn=i.createContext(Vn),Kn=i.createContext(!1);let Gn=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),Xn=new WeakMap;const Zn="function"==typeof i.useId?function(e){let t=i.useId(),[n]=(0,i.useState)("function"==typeof i.useSyncExternalStore?i.useSyncExternalStore(Jn,Yn,Qn):(0,i.useContext)(Kn));return e||`${n?"react-aria":`react-aria${Vn.prefix}`}-${t}`}:function(e){let t=(0,i.useContext)(Wn);t!==Vn||Gn||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=function(e=!1){let t=(0,i.useContext)(Wn),n=(0,i.useRef)(null);if(null===n.current&&!e){var s,r;let e=null===(r=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===r||null===(s=r.ReactCurrentOwner)||void 0===s?void 0:s.current;if(e){let n=Xn.get(e);null==n?Xn.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,Xn.delete(e))}n.current=++t.current}return n.current}(!!e),s=`react-aria${t.prefix}`;return e||`${s}-${n}`};function Yn(){return!1}function Qn(){return!0}function Jn(e){return()=>{}}const es=i.createContext(null),ts=(e,t=null)=>null!=e?String(e):t||null,ns=i.createContext(null),ss=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],is=["activeKey","getControlledId","getControllerId"],rs=["as"];function os(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function as(e){let{active:t,eventKey:n,mountOnEnter:s,transition:r,unmountOnExit:o,role:a="tabpanel",onEnter:l,onEntering:u,onEntered:c,onExit:d,onExiting:p,onExited:h}=e,f=os(e,ss);const m=(0,i.useContext)(es);if(!m)return[Object.assign({},f,{role:a}),{eventKey:n,isActive:t,mountOnEnter:s,transition:r,unmountOnExit:o,onEnter:l,onEntering:u,onEntered:c,onExit:d,onExiting:p,onExited:h}];const{activeKey:g,getControlledId:y,getControllerId:v}=m,b=os(m,is),w=ts(n);return[Object.assign({},f,{role:a,id:y(n),"aria-labelledby":v(n)}),{eventKey:n,isActive:null==t&&null!=w?ts(g)===w:t,transition:r||b.transition,mountOnEnter:null!=s?s:b.mountOnEnter,unmountOnExit:null!=o?o:b.unmountOnExit,onEnter:l,onEntering:u,onEntered:c,onExit:d,onExiting:p,onExited:h}]}const ls=i.forwardRef(((e,t)=>{let{as:n="div"}=e,s=os(e,rs);const[i,{isActive:r,onEnter:o,onEntering:a,onEntered:l,onExit:u,onExiting:c,onExited:d,mountOnEnter:p,unmountOnExit:h,transition:f=Ge}]=as(s);return(0,S.jsx)(es.Provider,{value:null,children:(0,S.jsx)(ns.Provider,{value:null,children:(0,S.jsx)(f,{in:r,onEnter:o,onEntering:a,onEntered:l,onExit:u,onExiting:c,onExited:d,mountOnEnter:p,unmountOnExit:h,children:(0,S.jsx)(n,Object.assign({},i,{ref:t,hidden:!r,"aria-hidden":!r}))})})})}));ls.displayName="TabPanel";const us=e=>{const{id:t,generateChildId:n,onSelect:s,activeKey:r,defaultActiveKey:o,transition:a,mountOnEnter:l,unmountOnExit:u,children:c}=e,[d,p]=function(e,t,n){const s=(0,i.useRef)(void 0!==e),[r,o]=(0,i.useState)(t),a=void 0!==e,l=s.current;return s.current=a,!a&&l&&r!==t&&o(t),[a?e:r,(0,i.useCallback)(((...e)=>{const[t,...s]=e;let i=null==n?void 0:n(t,...s);return o(t),i}),[n])]}(r,o,s),h=Zn(t),f=(0,i.useMemo)((()=>n||((e,t)=>h?`${h}-${t}-${e}`:null)),[h,n]),m=(0,i.useMemo)((()=>({onSelect:p,activeKey:d,transition:a,mountOnEnter:l||!1,unmountOnExit:u||!1,getControlledId:e=>f(e,"tabpane"),getControllerId:e=>f(e,"tab")})),[p,d,a,l,u,f]);return(0,S.jsx)(es.Provider,{value:m,children:(0,S.jsx)(ns.Provider,{value:p||null,children:c})})};us.Panel=ls;const cs=us;function ds(e){return"boolean"==typeof e?e?Ft:Ge:e}const ps=({transition:e,...t})=>(0,S.jsx)(cs,{...t,transition:ds(e)});ps.displayName="TabContainer";const hs=ps,fs=i.forwardRef((({className:e,bsPrefix:t,as:n="div",...s},i)=>(t=N(t,"tab-content"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));fs.displayName="TabContent";const ms=fs,gs=i.forwardRef((({bsPrefix:e,transition:t,...n},s)=>{const[{className:i,as:r="div",...o},{isActive:a,onEnter:l,onEntering:u,onEntered:c,onExit:d,onExiting:p,onExited:h,mountOnEnter:f,unmountOnExit:m,transition:g=Ft}]=as({...n,transition:ds(t)}),y=N(e,"tab-pane");return(0,S.jsx)(es.Provider,{value:null,children:(0,S.jsx)(ns.Provider,{value:null,children:(0,S.jsx)(g,{in:a,onEnter:l,onEntering:u,onEntered:c,onExit:d,onExiting:p,onExited:h,mountOnEnter:f,unmountOnExit:m,children:(0,S.jsx)(r,{...o,ref:s,className:C()(i,y,a&&"active")})})})})}));gs.displayName="TabPane";const ys=gs,vs={eventKey:Bt().oneOfType([Bt().string,Bt().number]),title:Bt().node.isRequired,disabled:Bt().bool,tabClassName:Bt().string,tabAttrs:Bt().object},bs=()=>{throw new Error("ReactBootstrap: The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")};bs.propTypes=vs;const ws=Object.assign(bs,{Container:hs,Content:ms,Pane:ys});function Es(){return Es=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Es.apply(null,arguments)}function _s(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function xs(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}function Ps(e,t){return Object.keys(t).reduce((function(n,s){var r,o=n,a=o[_s(s)],l=o[s],u=ht(o,[_s(s),s].map(xs)),c=t[s],d=function(e,t,n){var s=(0,i.useRef)(void 0!==e),r=(0,i.useState)(t),o=r[0],a=r[1],l=void 0!==e,u=s.current;return s.current=l,!l&&u&&o!==t&&a(t),[l?e:o,(0,i.useCallback)((function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];n&&n.apply(void 0,[e].concat(s)),a(e)}),[n])]}(l,a,e[c]),p=d[0],h=d[1];return Es({},u,((r={})[s]=p,r[c]=h,r))}),e)}n(311);const Cs=i.createContext(null);Cs.displayName="NavContext";const Ss=Cs,Os=["as","active","eventKey"];function ks({key:e,onClick:t,active:n,id:s,role:r,disabled:o}){const a=(0,i.useContext)(ns),l=(0,i.useContext)(Ss),u=(0,i.useContext)(es);let c=n;const d={role:r};if(l){r||"tablist"!==l.role||(d.role="tab");const t=l.getControllerId(null!=e?e:null),i=l.getControlledId(null!=e?e:null);d[Be("event-key")]=e,d.id=t||s,c=null==n&&null!=e?l.activeKey===e:n,!c&&(null!=u&&u.unmountOnExit||null!=u&&u.mountOnEnter)||(d["aria-controls"]=i)}return"tab"===d.role&&(d["aria-selected"]=c,c||(d.tabIndex=-1),o&&(d.tabIndex=-1,d["aria-disabled"]=!0)),d.onClick=je((n=>{o||(null==t||t(n),null!=e&&a&&!n.isPropagationStopped()&&a(e,n))})),[d,{isActive:c}]}const Fs=i.forwardRef(((e,t)=>{let{as:n=zn,active:s,eventKey:i}=e,r=function(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}(e,Os);const[o,a]=ks(Object.assign({key:ts(i,r.href),active:s},r));return o[Be("active")]=a.isActive,(0,S.jsx)(n,Object.assign({},r,o,{ref:t}))}));Fs.displayName="NavItem";const Ns=Fs,Us=["as","onSelect","activeKey","role","onKeyDown"],Ts=()=>{},As=Be("event-key"),Rs=i.forwardRef(((e,t)=>{let{as:n="div",onSelect:s,activeKey:r,role:o,onKeyDown:a}=e,l=function(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}(e,Us);const u=function(){const[,e]=(0,i.useReducer)((e=>e+1),0);return e}(),c=(0,i.useRef)(!1),d=(0,i.useContext)(ns),p=(0,i.useContext)(es);let h,f;p&&(o=o||"tablist",r=p.activeKey,h=p.getControlledId,f=p.getControllerId);const m=(0,i.useRef)(null),g=e=>{const t=m.current;if(!t)return null;const n=ot(t,`[${As}]:not([aria-disabled=true])`),s=t.querySelector("[aria-selected=true]");if(!s||s!==document.activeElement)return null;const i=n.indexOf(s);if(-1===i)return null;let r=i+e;return r>=n.length&&(r=0),r<0&&(r=n.length-1),n[r]},y=(e,t)=>{null!=e&&(null==s||s(e,t),null==d||d(e,t))};(0,i.useEffect)((()=>{if(m.current&&c.current){const e=m.current.querySelector(`[${As}][aria-selected=true]`);null==e||e.focus()}c.current=!1}));const v=Ve(t,m);return(0,S.jsx)(ns.Provider,{value:y,children:(0,S.jsx)(Ss.Provider,{value:{role:o,activeKey:ts(r),getControlledId:h||Ts,getControllerId:f||Ts},children:(0,S.jsx)(n,Object.assign({},l,{onKeyDown:e=>{if(null==a||a(e),!p)return;let t;switch(e.key){case"ArrowLeft":case"ArrowUp":t=g(-1);break;case"ArrowRight":case"ArrowDown":t=g(1);break;default:return}t&&(e.preventDefault(),y(t.dataset["rrUiEventKey"]||null,e),c.current=!0,u())},ref:v,role:o}))})})}));Rs.displayName="Nav";const Ds=Object.assign(Rs,{Item:Ns}),Is=i.createContext(null);Is.displayName="NavbarContext";const js=Is,Bs=i.forwardRef((({className:e,bsPrefix:t,as:n="div",...s},i)=>(t=N(t,"nav-item"),(0,S.jsx)(n,{ref:i,className:C()(e,t),...s}))));Bs.displayName="NavItem";const Ms=Bs;new WeakMap;const Ls=["onKeyDown"],$s=i.forwardRef(((e,t)=>{let{onKeyDown:n}=e,s=function(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}(e,Ls);const[i]=Ln(Object.assign({tagName:"a"},s)),r=je((e=>{i.onKeyDown(e),null==n||n(e)}));return(o=s.href)&&"#"!==o.trim()&&"button"!==s.role?(0,S.jsx)("a",Object.assign({ref:t},s,{onKeyDown:n})):(0,S.jsx)("a",Object.assign({ref:t},s,i,{onKeyDown:r}));var o}));$s.displayName="Anchor";const zs=$s,Hs=i.forwardRef((({bsPrefix:e,className:t,as:n=zs,active:s,eventKey:i,disabled:r=!1,...o},a)=>{e=N(e,"nav-link");const[l,u]=ks({key:ts(i,o.href),active:s,disabled:r,...o});return(0,S.jsx)(n,{...o,...l,ref:a,disabled:r,className:C()(t,e,r&&"disabled",u.isActive&&"active")})}));Hs.displayName="NavLink";const qs=Hs,Vs=i.forwardRef(((e,t)=>{const{as:n="div",bsPrefix:s,variant:r,fill:o=!1,justify:a=!1,navbar:l,navbarScroll:u,className:c,activeKey:d,...p}=Ps(e,{activeKey:"onSelect"}),h=N(s,"nav");let f,m,g=!1;const y=(0,i.useContext)(js),v=(0,i.useContext)(B);return y?(f=y.bsPrefix,g=null==l||l):v&&({cardHeaderBsPrefix:m}=v),(0,S.jsx)(Ds,{as:n,ref:t,activeKey:d,className:C()(c,{[h]:!g,[`${f}-nav`]:g,[`${f}-nav-scroll`]:g&&u,[`${m}-${r}`]:!!m,[`${h}-${r}`]:!!r,[`${h}-fill`]:o,[`${h}-justified`]:a}),...p})}));Vs.displayName="Nav";const Ws=Object.assign(Vs,{Item:Ms,Link:qs});function Ks(e){let t;return function(e){i.Children.forEach(e,(e=>{i.isValidElement(e)&&(e=>{null==t&&(t=e.props.eventKey)})(e,0)}))}(e),t}function Gs(e){const{title:t,eventKey:n,disabled:s,tabClassName:i,tabAttrs:r,id:o}=e.props;return null==t?null:(0,S.jsx)(Ms,{as:"li",role:"presentation",children:(0,S.jsx)(qs,{as:"button",type:"button",eventKey:n,disabled:s,id:o,className:i,...r,children:t})})}const Xs=e=>{const{id:t,onSelect:n,transition:s,mountOnEnter:i=!1,unmountOnExit:r=!1,variant:o="tabs",children:a,activeKey:l=Ks(a),...u}=Ps(e,{activeKey:"onSelect"});return(0,S.jsxs)(cs,{id:t,activeKey:l,onSelect:n,transition:ds(s),mountOnEnter:i,unmountOnExit:r,children:[(0,S.jsx)(Ws,{id:t,...u,role:"tablist",as:"ul",variant:o,children:ln(a,Gs)}),(0,S.jsx)(ms,{children:ln(a,(e=>{const t={...e.props};return delete t.title,delete t.disabled,delete t.tabClassName,delete t.tabAttrs,(0,S.jsx)(ys,{...t})}))})]})};Xs.displayName="Tabs";const Zs=Xs;function Ys({video:e,setVideos:t}){const[n,s]=(0,h.useState)(!1),r=()=>s(!1);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(qn,{variant:"outline-danger",size:"sm",onClick:()=>s(!0),className:"rounded-4"},(0,p.__)("Delete Video","infinite-uploads")),(0,i.createElement)(Qt,{show:n,onHide:r},(0,i.createElement)(Qt.Header,{closeButton:!0},(0,i.createElement)(Qt.Title,null,(0,p.__)("Delete Video:","infinite-uploads")," ",e.title)),(0,i.createElement)(Qt.Body,null,(0,p.__)("Are you sure you would like to delete this video?","infinite-uploads")),(0,i.createElement)(Qt.Footer,null,(0,i.createElement)(qn,{variant:"secondary",onClick:r},(0,p.__)("Cancel","infinite-uploads")),(0,i.createElement)(qn,{variant:"danger",onClick:function(){const n=new FormData;n.append("video_id",e.guid),n.append("nonce",IUP_VIDEO.nonce),fetch(`${ajaxurl}?action=infinite-uploads-video-delete`,{method:"POST",headers:{Accept:"application/json"},body:n}).then((e=>e.json())).then((n=>{console.log(n),n.success?(t((t=>t.filter((t=>t.guid!==e.guid)))),r()):console.error(n.data)})).catch((e=>{console.log("Error:",e)}))}},(0,p.__)("Delete","infinite-uploads")))))}const Qs=i.forwardRef((({bsPrefix:e,variant:t,animation:n="border",size:s,as:i="div",className:r,...o},a)=>{const l=`${e=N(e,"spinner")}-${n}`;return(0,S.jsx)(i,{ref:a,...o,className:C()(r,l,s&&`${l}-${s}`,t&&`text-${t}`)})}));Qs.displayName="Spinner";const Js=Qs;function ei({video:e,setVideos:t,selectVideo:n,children:s}){const[r,o]=(0,h.useState)(!1),[a,l]=(0,h.useState)(e.title),[u,c]=(0,h.useState)(!1),[d,f]=(0,h.useState)(!1),[m,g]=(0,h.useState)(!1),[y,v]=(0,h.useState)(!0),[b,w]=(0,h.useState)(""),[E,_]=(0,h.useState)(!1),[x,P]=(0,h.useState)(!1),[C,S]=(0,h.useState)(null);(0,h.useEffect)((()=>{let e=[];u&&e.push('autoplay="true"'),d&&e.push('loop="true"'),m&&e.push('muted="true"'),y&&e.push('preload="true"'),w(e.join(" "))}),[u,d,m,y]),(0,h.useEffect)((()=>{const t=(0,i.createElement)("iframe",{src:`https://iframe.mediadelivery.net/embed/${e.videoLibraryId}/${e.guid}?autoplay=false&v=${Math.random()}`,loading:"lazy",allow:"accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;",allowFullScreen:!0});S(t)}),[e]);const O=t=>IUP_VIDEO.cdnUrl+"/"+e.guid+"/"+t;function k(n){P(!0);const s=new FormData;s.append("thumbnail",n),s.append("video_id",e.guid),s.append("nonce",IUP_VIDEO.nonce),fetch(`${ajaxurl}?action=infinite-uploads-video-update`,{method:"POST",headers:{Accept:"application/json"},body:s}).then((e=>e.json())).then((s=>{s.success?t((t=>t.map((t=>t.guid===e.guid?{...t,thumbnailFileName:n}:t)))):console.error(s.data),P(!1)})).catch((e=>{console.log("Error:",e),P(!1)}))}let F=[];for(let e=1;e<=5;e++)F.push((0,i.createElement)(ae,{key:e,className:"mb-2"},(0,i.createElement)(se,{className:"bg-dark text-white h-100 p-0",role:"button",disabled:x||E,onClick:()=>k("thumbnail_"+e+".jpg")},(0,i.createElement)("div",{className:"ratio ratio-16x9 overflow-hidden bg-black rounded"},(0,i.createElement)("div",{className:"iup-video-thumb rounded border-0",style:{backgroundImage:`url("${O("thumbnail_"+e+".jpg")}")`}})),(0,i.createElement)("div",{className:"card-img-overlay rounded border-0"},(0,i.createElement)("div",{className:"card-title align-middle text-center text-white"},(0,p.__)("Set","infinite-uploads"))))));return F.push((0,i.createElement)(ae,{key:"fileupload",className:"mb-2"},(0,i.createElement)(se,{className:"h-100 p-0 border-4 border-secondary",style:{borderStyle:"dashed"},disabled:x||E,role:"button",onClick:()=>document.getElementById("upload-thumbnail").click()},(0,i.createElement)("div",{className:"ratio ratio-16x9 overflow-hidden bg-light border-0 rounded"},(0,i.createElement)("div",null,E?(0,i.createElement)("div",{className:"h-100 w-100 d-flex align-items-center justify-content-center"},(0,i.createElement)(Js,{animation:"border",role:"status",className:"text-muted"})):(0,i.createElement)("span",{className:"dashicons dashicons-upload h-100 w-100 d-flex align-items-center justify-content-center text-muted h3"}))),(0,i.createElement)(Tn.Control,{type:"file",id:"upload-thumbnail",className:"d-none",accept:"image/png, image/jpeg",disabled:x||E,onChange:()=>function(n){_(!0);const s=new FormData;s.append("thumbnailFile",n),s.append("video_id",e.guid),s.append("nonce",IUP_VIDEO.nonce),fetch(`${ajaxurl}?action=infinite-uploads-video-update`,{method:"POST",headers:{Accept:"application/json"},body:s}).then((e=>e.json())).then((n=>{n.success?(function(){const n={method:"GET",headers:{Accept:"application/json",AccessKey:IUP_VIDEO.apiKey}};fetch(`https://video.bunnycdn.com/library/${IUP_VIDEO.libraryId}/videos/${e.guid}`,n).then((e=>e.json())).then((n=>{t((t=>t.map((t=>t.guid===e.guid?{...t,...n}:t))))})).catch((e=>{console.error(e)}))}(),_(!1)):(console.error(n.data),_(!1))})).catch((e=>{console.log("Error:",e),_(!1)}))}(document.getElementById("upload-thumbnail").files[0])})))),(0,i.createElement)(i.Fragment,null,(0,i.createElement)("a",{className:"m-3 w-100 p-0 text-decoration-none",role:"button","aria-label":(0,p.__)("Open video modal","infinite-uploads"),onClick:()=>{n?n(e):o(!0)}},s),(0,i.createElement)(Qt,{show:r,onHide:()=>{o(!1)},size:"xl","aria-labelledby":"contained-modal-title-vcenter",centered:!0},(0,i.createElement)(Qt.Header,{closeButton:!0},(0,i.createElement)(Qt.Title,{id:"contained-modal-title-vcenter"},(0,p.__)("Edit Video:","infinite-uploads")," ",e.title)),(0,i.createElement)(Qt.Body,null,(0,i.createElement)(he,{fluid:!0,className:"pb-3"},(0,i.createElement)(re,{className:"justify-content-center mb-4 mt-3",xs:1,lg:2},(0,i.createElement)(ae,null,(0,i.createElement)(re,{className:"mb-2"},(0,i.createElement)(ae,null,(0,i.createElement)("div",{className:"ratio ratio-16x9"},C))),(0,i.createElement)(re,{className:"justify-content-between text-muted text-center"},(0,i.createElement)(ae,null,(0,i.createElement)(de,{video:e})),(0,i.createElement)(ae,null,(0,i.createElement)(ue,{video:e})),(0,i.createElement)(ae,null,(0,i.createElement)(ce,{video:e})),(0,i.createElement)(ae,null,(0,i.createElement)(le,{video:e})))),(0,i.createElement)(ae,null,(0,i.createElement)(re,{className:"mb-4"},(0,i.createElement)(ae,null,(0,i.createElement)("label",{htmlFor:"video-title"},(0,p.__)("Video Title","infinite-uploads")),(0,i.createElement)(Bn,null,(0,i.createElement)(Tn.Control,{id:"video-title",placeholder:(0,p.__)("Title","infinite-uploads"),"aria-label":(0,p.__)("Title","infinite-uploads"),value:a,onChange:e=>l(e.target.value),disabled:x||E}),(0,i.createElement)(qn,{variant:"primary",className:"text-white",disabled:x||E,onClick:function(){P(!0);const n=new FormData;n.append("title",a),n.append("video_id",e.guid),n.append("nonce",IUP_VIDEO.nonce),fetch(`${ajaxurl}?action=infinite-uploads-video-update`,{method:"POST",headers:{Accept:"application/json"},body:n}).then((e=>e.json())).then((n=>{n.success?t((t=>t.map((t=>t.guid===e.guid?{...t,title:a}:t)))):console.error(n.data),P(!1)})).catch((e=>{console.log("Error:",e),P(!1)}))}},(0,p.__)("Update","infinite-uploads"))))),(0,i.createElement)(re,{className:"mb-4"},(0,i.createElement)(ae,{className:"col-4"},(0,i.createElement)("h6",null,(0,p.__)("Current Thumbnail","infinite-uploads")),(0,i.createElement)(se,{className:"bg-dark text-white w-100 p-0 mb-2"},(0,i.createElement)("div",{className:"ratio ratio-16x9 overflow-hidden bg-black rounded border-0"},(0,i.createElement)("div",{className:"iup-video-thumb rounded border-0",style:{backgroundImage:`url("${O(e.thumbnailFileName)}")`}})))),(0,i.createElement)(ae,{className:"col-8"},(0,i.createElement)("p",null,(0,p.__)("Choose a new thumbnail to be displayed in the video player:","infinite-uploads")),(0,i.createElement)(re,{className:"justify-content-start d-flex row-cols-2 row-cols-md-3"},F))),(0,i.createElement)(re,{className:"justify-content-end mb-3"},(0,i.createElement)(ae,{className:"justify-content-end d-flex"},(0,i.createElement)(Ys,{video:e,setVideos:t}))))),(0,i.createElement)(Zs,{defaultActiveKey:"shortcode",className:"mb-4"},(0,i.createElement)(ws,{eventKey:"shortcode",title:(0,i.createElement)("div",{className:"d-inline-flex align-start"},(0,i.createElement)("span",{className:"dashicons dashicons-shortcode me-1"}),(0,p.__)("Embed Code","infinite-uploads"))},(0,i.createElement)(re,{className:"justify-content-center mt-2"},(0,i.createElement)(ae,null,(0,i.createElement)(re,null,(0,i.createElement)(ae,null,(0,i.createElement)("p",null,(0,p.__)("Copy and paste this code into your post, page, or widget to embed the video. If using Gutenberg editor use our block.","infinite-uploads")))),(0,i.createElement)(re,{className:"mb-1"},(0,i.createElement)(ae,null,(0,i.createElement)(Tn,null,(0,i.createElement)(Tn.Check,{inline:!0,label:(0,p.__)("Autoplay","infinite-uploads"),type:"checkbox",checked:u,onChange:e=>c(e.target.checked)}),(0,i.createElement)(Tn.Check,{inline:!0,label:(0,p.__)("Loop","infinite-uploads"),type:"checkbox",checked:d,onChange:e=>f(e.target.checked)}),(0,i.createElement)(Tn.Check,{inline:!0,label:(0,p.__)("Muted","infinite-uploads"),type:"checkbox",checked:m,onChange:e=>g(e.target.checked)}),(0,i.createElement)(Tn.Check,{inline:!0,label:(0,p.__)("Preload","infinite-uploads"),type:"checkbox",checked:y,onChange:e=>v(e.target.checked),style:{display:"none"}})))),(0,i.createElement)(re,null,(0,i.createElement)(ae,null,(0,i.createElement)(Tn.Control,{type:"text","aria-label":"Embed Code",readOnly:!0,value:`[infinite-uploads-vid id="${e.guid}" ${b}]`,onClick:e=>{e.target.select(),document.execCommand("copy")}})))))),(0,i.createElement)(ws,{eventKey:"stats",disabled:!0,title:(0,i.createElement)(i.Fragment,null,(0,i.createElement)("span",{className:"dashicons dashicons-chart-area me-1"}),(0,p.__)("Stats","infinite-uploads"))},(0,i.createElement)(re,{className:"justify-content-center"},(0,i.createElement)(ae,null,(0,i.createElement)(re,null,(0,i.createElement)(ae,null,(0,i.createElement)("h5",null,(0,p.__)("Statistics","infinite-uploads")),(0,i.createElement)("p",null,(0,p.__)("View the statistics for this video.","infinite-uploads")))),(0,i.createElement)(re,null,(0,i.createElement)(ae,null,"Chart here"))))),(0,i.createElement)(ws,{eventKey:"captions",disabled:!0,title:(0,i.createElement)(i.Fragment,null,(0,i.createElement)("span",{className:"dashicons dashicons-format-status me-1"}),(0,p.__)("Captions","infinite-uploads"))}),(0,i.createElement)(ws,{eventKey:"chapters",disabled:!0,title:(0,i.createElement)(i.Fragment,null,(0,i.createElement)("span",{className:"dashicons dashicons-text me-1"}),(0,p.__)("Chapters","infinite-uploads"))}))))))}function ti(e,t,n){const s=(e-t)/(n-t)*100;return Math.round(1e3*s)/1e3}function ni({min:e,now:t,max:n,label:s,visuallyHidden:i,striped:r,animated:o,className:a,style:l,variant:u,bsPrefix:c,...d},p){return(0,S.jsx)("div",{ref:p,...d,role:"progressbar",className:C()(a,`${c}-bar`,{[`bg-${u}`]:u,[`${c}-bar-animated`]:o,[`${c}-bar-striped`]:o||r}),style:{width:`${ti(t,e,n)}%`,...l},"aria-valuenow":t,"aria-valuemin":e,"aria-valuemax":n,children:i?(0,S.jsx)("span",{className:"visually-hidden",children:s}):s})}const si=i.forwardRef((({isChild:e=!1,...t},n)=>{const s={min:0,max:100,animated:!1,visuallyHidden:!1,striped:!1,...t};if(s.bsPrefix=N(s.bsPrefix,"progress"),e)return ni(s,n);const{min:r,now:o,max:a,label:l,visuallyHidden:u,striped:c,animated:d,bsPrefix:p,variant:h,className:f,children:m,...g}=s;return(0,S.jsx)("div",{ref:n,...g,className:C()(f,p),children:m?ln(m,(e=>(0,i.cloneElement)(e,{isChild:!0}))):ni({min:r,now:o,max:a,label:l,visuallyHidden:u,striped:c,animated:d,bsPrefix:p,variant:h},n)})}));si.displayName="ProgressBar";const ii=si,ri=function({video:e,videos:t,setVideos:n,selectVideo:s}){const r=t=>IUP_VIDEO.cdnUrl+"/"+e.guid+"/"+t,[o,a]=(0,h.useState)(r(e.thumbnailFileName)),l={0:(0,p.__)("Awaiting Upload","infinite-uploads"),1:(0,p.__)("Uploaded","infinite-uploads"),2:(0,p.__)("Processing","infinite-uploads"),3:(0,p.__)("Transcoding","infinite-uploads"),4:(0,p.__)("Finished","infinite-uploads"),5:(0,p.__)("Error","infinite-uploads"),6:(0,p.__)("Upload Failed","infinite-uploads")}[e.status];return[0,1,5,6].includes(e.status)?(0,i.createElement)("span",{className:"m-3 w-100 p-0"},(0,i.createElement)(se,{className:"m-0 shadow-sm"},(0,i.createElement)("div",{className:"ratio ratio-16x9 overflow-hidden bg-black text-white rounded-top"},(0,i.createElement)("div",null,(0,i.createElement)("div",{className:"d-flex justify-content-center align-items-center h-100 text-secondary font-weight-bold"},l))),(0,i.createElement)(se.Body,{className:"p-2"},(0,i.createElement)(se.Title,{className:"h6 card-title text-truncate"},e.title),(0,i.createElement)(re,{className:"justify-content-end text-muted align-items-center"},(0,i.createElement)(ae,{className:"justify-content-end d-flex"},!s&&(0,i.createElement)(Ys,{video:e,setVideos:n})))))):[2].includes(e.status)?(0,i.createElement)("span",{className:"m-3 w-100 p-0"},(0,i.createElement)(se,{className:"m-0 shadow-sm"},(0,i.createElement)("div",{className:"ratio ratio-16x9 overflow-hidden bg-black text-white rounded-top"},(0,i.createElement)("div",null,(0,i.createElement)("div",{className:"d-flex justify-content-center align-items-center h-100 text-secondary font-weight-bold"},l))),(0,i.createElement)(se.Body,{className:"p-2"},(0,i.createElement)(se.Title,{className:"h6 card-title text-truncate"},e.title),(0,i.createElement)("small",{className:"row justify-content-between text-muted align-items-center"},(0,i.createElement)(ae,{className:"col-auto"},(0,p.__)("Processing","infinite-uploads"),":"),(0,i.createElement)(ae,null,(0,i.createElement)(ii,{animated:!0,now:e.encodeProgress,label:`${e.encodeProgress}%`,className:"w-100"})))))):(0,i.createElement)(ei,{video:e,setVideos:n,selectVideo:s},(0,i.createElement)(se,{className:"m-0 shadow-sm"},(0,i.createElement)("div",{className:"ratio ratio-16x9 overflow-hidden bg-black rounded-top"},(0,i.createElement)("div",{className:"iup-video-thumb",style:{backgroundImage:`url("${o}")`},onMouseOver:()=>a(r("preview.webp")),onMouseOut:()=>a(r(e.thumbnailFileName))})),(0,i.createElement)(se.Body,{className:"p-2"},(0,i.createElement)(se.Title,{className:"h6 card-title text-truncate"},e.title),3===e.status?(0,i.createElement)("small",{className:"row justify-content-between text-muted align-items-center"},(0,i.createElement)(ae,{className:"col-auto"},(0,p.__)("Transcoding","infinite-uploads"),":"),(0,i.createElement)(ae,null,(0,i.createElement)(ii,{animated:!0,now:e.encodeProgress,label:`${e.encodeProgress}%`,className:"w-100"}))):(0,i.createElement)("small",{className:"row justify-content-between text-muted align-items-center"},(0,i.createElement)(ae,null,(0,i.createElement)(ue,{video:e})),(0,i.createElement)(ae,null),(0,i.createElement)(ae,null,(0,i.createElement)(le,{video:e}))))))};function oi({getVideos:e}){const[t,n]=(0,h.useState)(!1),s=(0,h.useRef)(null),r=(0,h.useRef)({}),o=w((()=>new(m())({debug:!0,restrictions:{maxNumberOfFiles:null,allowedFileTypes:["video/*"]},autoProceed:!0,allowMultipleUploadBatches:!0,onBeforeUpload:e=>{}}).use(y(),{endpoint:"https://video.bunnycdn.com/tusupload",retryDelays:[0,1e3,3e3,5e3,1e4],onBeforeRequest:(e,t)=>{if(!s.current[t.id])throw new Error("Error fetching auth.");e.setHeader("AuthorizationSignature",s.current[t.id].AuthorizationSignature),e.setHeader("AuthorizationExpire",s.current[t.id].AuthorizationExpire),e.setHeader("VideoId",s.current[t.id].VideoId),e.setHeader("LibraryId",IUP_VIDEO.libraryId)}}).use(_,{uploadAuth:s})));return o.on("error",(e=>{console.error(e.stack)})),o.on("upload-error",((e,t,n)=>{console.log("error with file:",e.id),console.log("error message:",t)})),o.on("upload-success",((t,n)=>{r.current[t.id]||(e(),r.current={...r.current,[t.id]:!0})})),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(qn,{variant:"primary",className:"text-nowrap text-white ms-4",onClick:()=>{n(!0)}},(0,i.createElement)("span",{className:"dashicons dashicons-video-alt3"}),(0,p.__)("Upload Videos","infinite-uploads")),(0,i.createElement)(Qt,{show:t,onHide:()=>{n(!1)},size:"lg","aria-labelledby":"contained-modal-title-vcenter",centered:!0},(0,i.createElement)(Qt.Header,{closeButton:!0},(0,i.createElement)(Qt.Title,{id:"contained-modal-title-vcenter"},(0,p.__)("Upload Videos","infinite-uploads"))),(0,i.createElement)(Qt.Body,null,(0,i.createElement)(he,{fluid:!0,className:"p-3"},(0,i.createElement)("div",{className:"uppy-wrapper"},(0,i.createElement)(v,{width:"100%",height:"100%",uppy:o,locale:{strings:{dropHereOr:(0,p.__)("Drop videos here or %{browse}.","infinite-uploads"),browse:(0,p.__)("browse files","infinite-uploads")}}}),(0,i.createElement)(b,{uppy:o,hideUploadButton:!0,hideAfterFinish:!0,showProgressDetails:!0}))))))}const ai=function({orderBy:e,setOrderBy:t,search:n,setSearch:s,selectVideo:r,getVideos:o}){const a=function(e){if(0===e)return"0 B";var t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toFixed(1)+" "+" KMGTP".charAt(t)+"B"};return(0,i.createElement)(re,{className:"align-items-center"},(0,i.createElement)(ae,{sm:8,md:3,className:"mb-3 mb-lg-0"},(0,i.createElement)(Bn,null,(0,i.createElement)(Bn.Text,null,(0,i.createElement)("span",{className:"dashicons dashicons-search"})),(0,i.createElement)(Tn.Control,{placeholder:(0,p.__)("Search","infinite-uploads"),"aria-label":(0,p.__)("Search","infinite-uploads"),value:n,onChange:e=>s(e.target.value)}))),(0,i.createElement)(ae,{sm:4,md:2,className:"mb-3 mb-lg-0"},(0,i.createElement)(Bn,null,(0,i.createElement)(Bn.Text,null,(0,p.__)("Sort","infinite-uploads")),(0,i.createElement)(Tn.Select,{"aria-label":(0,p.__)("Sort by select","infinite-uploads"),value:e,onChange:e=>t(e.target.value)},">",(0,i.createElement)("option",{value:"title"},(0,p.__)("Title","infinite-uploads")),(0,i.createElement)("option",{value:"date"},(0,p.__)("Date","infinite-uploads"))))),(0,i.createElement)(ae,{className:"mb-3 mb-lg-0"},(0,i.createElement)(re,{className:"justify-content-center flex-nowrap"},(0,i.createElement)(ae,{className:"col-auto"},(0,i.createElement)("p",{className:"mb-0"},(0,p.__)("Video Count","infinite-uploads")),(0,i.createElement)("span",{className:"h4 text-nowrap"},IUP_VIDEO.settings.VideoCount)),(0,i.createElement)(ae,{className:"col-auto"},(0,i.createElement)("p",{className:"mb-0"},(0,p.__)("Library Storage","infinite-uploads")),(0,i.createElement)("span",{className:"h4 text-nowrap"},a(IUP_VIDEO.settings.StorageUsage))),(0,i.createElement)(ae,{className:"col-auto"},(0,i.createElement)("p",{className:"mb-0"},(0,p.__)("Video Bandwidth","infinite-uploads")),(0,i.createElement)("span",{className:"h4 text-nowrap"},a(IUP_VIDEO.settings.TrafficUsage))))),(0,i.createElement)(ae,{className:"d-flex justify-content-end mb-3 mb-lg-0"},(0,i.createElement)(qn,{variant:"outline-secondary",className:"rounded-pill text-nowrap",href:IUP_VIDEO.settingsUrl},(0,i.createElement)("span",{className:"dashicons dashicons-admin-generic"}),(0,p.__)("Settings","infinite-uploads")),!r&&(0,i.createElement)(oi,{getVideos:o})))},li=i.forwardRef((({active:e=!1,disabled:t=!1,className:n,style:s,activeLabel:i="(current)",children:r,linkStyle:o,linkClassName:a,as:l=zs,...u},c)=>{const d=e||t?"span":l;return(0,S.jsx)("li",{ref:c,style:s,className:C()(n,"page-item",{active:e,disabled:t}),children:(0,S.jsxs)(d,{className:C()("page-link",a),style:o,...u,children:[r,e&&i&&(0,S.jsx)("span",{className:"visually-hidden",children:i})]})})}));li.displayName="PageItem";const ui=li;function ci(e,t,n=e){const s=i.forwardRef((({children:e,...s},i)=>(0,S.jsxs)(li,{...s,ref:i,children:[(0,S.jsx)("span",{"aria-hidden":"true",children:e||t}),(0,S.jsx)("span",{className:"visually-hidden",children:n})]})));return s.displayName=e,s}const di=ci("First","«"),pi=ci("Prev","‹","Previous"),hi=ci("Ellipsis","…","More"),fi=ci("Next","›"),mi=ci("Last","»"),gi=i.forwardRef((({bsPrefix:e,className:t,size:n,...s},i)=>{const r=N(e,"pagination");return(0,S.jsx)("ul",{ref:i,...s,className:C()(t,r,n&&`${r}-${n}`)})}));gi.displayName="Pagination";const yi=Object.assign(gi,{First:di,Prev:pi,Ellipsis:hi,Item:ui,Next:fi,Last:mi}),vi=function({page:e,setPage:t,totalItems:n,itemsPerPage:s}){if(n<=s)return null;let r=e;const o=Math.ceil(n/s);let a=[];for(let e=1;e<=o;e++)a.push((0,i.createElement)(yi.Item,{key:e,active:e===r,onClick:()=>t(e)},e));return(0,i.createElement)(yi,{className:"justify-content-center mt-4"},(0,i.createElement)(yi.First,{onClick:()=>t(1),disabled:1===e}),a,(0,i.createElement)(yi.Last,{onClick:()=>t(o),disabled:e===o}))};function bi({selectVideo:e}){const[t,n]=(0,h.useState)([]),[s,r]=(0,h.useState)(!0),[o,a]=(0,h.useState)("date"),[l,u]=(0,h.useState)(""),[c,d]=(0,h.useState)(1),[f,m]=(0,h.useState)(0),[g,y]=(0,h.useState)(40),[v,b]=(0,h.useState)(6e4);function w(){const e={method:"GET",headers:{Accept:"application/json",AccessKey:IUP_VIDEO.apiKey}};fetch(`https://video.bunnycdn.com/library/${IUP_VIDEO.libraryId}/videos?page=${c}&itemsPerPage=${g}&orderBy=${o}&search=${l}`,e).then((e=>e.json())).then((e=>{console.log("Videos:",e),n(e.items),m(e.totalItems),y(e.itemsPerPage),r(!1)})).catch((e=>{console.error(e),r(!1)}))}return(0,h.useEffect)((()=>{s||(r(!0),w())}),[o,c]),(0,h.useEffect)((()=>{(l.length>2||0===l.length)&&(d(1),r(!0),w())}),[l]),(0,h.useEffect)((()=>{const e=t.find((e=>2===e.status||3===e.status));b(e?1e4:6e4)}),[t]),(0,h.useEffect)((()=>{const e=setInterval((()=>{w()}),v);return()=>clearInterval(e)}),[o,c,l,v]),(0,i.createElement)(i.Fragment,null,!e&&(0,i.createElement)("h1",{className:"text-muted mb-3"},(0,i.createElement)("img",{src:IUP_VIDEO.assetBase+"/img/iu-logo-gray.svg",alt:"Infinite Uploads Logo",height:"32",width:"32",className:"me-2"}),(0,p.__)("Cloud Video Library","infinite-uploads")),(0,i.createElement)(he,{fluid:!0},(0,i.createElement)(ai,{orderBy:o,setOrderBy:a,search:l,setSearch:u,selectVideo:e,getVideos:w}),s?(0,i.createElement)(he,{className:"d-flex justify-content-center align-middle my-5"},(0,i.createElement)(Js,{animation:"grow",role:"status",className:"my-5"},(0,i.createElement)("span",{className:"visually-hidden"},"Loading..."))):(0,i.createElement)(he,{fluid:!0},(0,i.createElement)(re,{xs:1,sm:1,md:2,lg:3,xl:4,xxl:5},t.length>0?t.map(((t,s)=>(0,i.createElement)(ae,{key:s+t.guid},(0,i.createElement)(ri,{video:t,setVideos:n,selectVideo:e})))):(0,i.createElement)(he,{className:"my-5 justify-content-center align-items-center"},(0,i.createElement)("p",{className:"text-muted text-center h5"},(0,p.__)("No videos found.","infinite-uploads")))),(0,i.createElement)(vi,{page:c,setPage:d,totalItems:f,itemsPerPage:g}))))}function wi({selectVideo:e,...t}){const[n,s]=(0,h.useState)(!1);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(a.Button,{variant:"primary",onClick:()=>s(!0)},(0,p.__)("Select from Library","infinite-uploads")),n&&(0,i.createElement)(a.Modal,{...t,isDismissible:!0,onRequestClose:()=>s(!1),icon:(0,d.E)(!1),style:{width:"98%"},title:(0,p.__)("Cloud Video Library","infinite-uploads"),className:"iup-block-library-model"},(0,i.createElement)("p",null,(0,p.__)("Select a video from your library to insert into the editor.","infinite-uploads")),(0,i.createElement)(bi,{selectVideo:e})))}const Ei=JSON.parse('{"UU":"infinite-uploads/video"}');(0,s.registerBlockType)(Ei.UU,{example:{attributes:{video_id:""}},edit:function({clientId:e,attributes:t,setAttributes:n}){const s=(0,l.useBlockProps)(),r=(0,o.useSelect)((t=>t("core/block-editor").isBlockSelected(e,!0))),[u,f]=(0,h.useState)(null),[g,E]=(0,h.useState)(!1),[P,C]=(0,h.useState)(!0),S=(0,h.useRef)(null);(0,h.useEffect)((()=>{r||C(!0)}),[r]),(0,h.useEffect)((()=>{t.video_id&&F()}),[]),(0,h.useEffect)((()=>{if(u&&(2===u.status||3===u.status)){const e=setInterval((()=>{F()}),5e3);return()=>clearInterval(e)}}),[u]);const O=w((()=>new(m())({debug:!0,restrictions:{maxNumberOfFiles:1,allowedFileTypes:["video/*"]},autoProceed:!0,allowMultipleUploadBatches:!1,onBeforeUpload:e=>{}}).use(y(),{endpoint:"https://video.bunnycdn.com/tusupload",retryDelays:[0,1e3,3e3,5e3,1e4],onBeforeRequest:(e,s)=>{if(!S.current[s.id])throw new Error("Error fetching auth.");n({video_id:S.current[s.id].VideoId}),t.video_id=S.current[s.id].VideoId,e.setHeader("AuthorizationSignature",S.current[s.id].AuthorizationSignature),e.setHeader("AuthorizationExpire",S.current[s.id].AuthorizationExpire),e.setHeader("VideoId",S.current[s.id].VideoId),e.setHeader("LibraryId",IUP_VIDEO.libraryId)}}).use(_,{uploadAuth:S})));let k=(0,h.useRef)(!1);function F(){if(!t.video_id)return!1;const e={method:"GET",headers:{Accept:"application/json",AccessKey:IUP_VIDEO.apiKey}};fetch(`https://video.bunnycdn.com/library/${IUP_VIDEO.libraryId}/videos/${t.video_id}`,e).then((e=>e.json())).then((e=>{console.log("Video:",e),f(e)})).catch((e=>{console.error(e)}))}O.on("upload",(e=>{E(!0),k.current=!1})),O.on("cancel-all",(()=>{E(!1)})),O.on("error",(e=>{console.error(e.stack),E(!1)})),O.on("upload-error",((e,t,n)=>{console.log("error with file:",e.id),console.log("error message:",t),E(!1)})),O.on("upload-success",((e,t)=>{k.current||(k.current=!0,F()),E(!1)}));if(!g&&t.video_id&&u&&[1,2,3,4].includes(u.status)){if(4===u.status)return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{...s},(0,i.createElement)("figure",{className:"iup-video-embed-wrapper"},(0,i.createElement)("iframe",{src:`https://iframe.mediadelivery.net/embed/${IUP_VIDEO.libraryId}/${t.video_id}?autoplay=${t.autoplay}&preload=${t.preload}&loop=${t.loop}&muted=${t.muted}`,loading:"lazy",className:"iup-video-embed",sandbox:"allow-scripts allow-same-origin allow-presentation",allow:"accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;",allowFullScreen:!0})),P&&(0,i.createElement)("button",{className:"iup-video-overlay",onClick:()=>C(!1)})),(0,i.createElement)(l.BlockControls,{group:"other"},(0,i.createElement)(a.ToolbarButton,{onClick:()=>n({video_id:null}),icon:c,label:(0,p.__)("Replace Video","infinite-uploads")})),(0,i.createElement)(l.InspectorControls,null,(0,i.createElement)(a.PanelBody,{title:(0,p.__)("Settings")},(0,i.createElement)(x,{setAttributes:n,attributes:t}))));{let e="",r={};return 3===u.status?(e=(0,p.sprintf)((0,p.__)("Video %d%% encoded...","infinite-uploads"),u.encodeProgress),r={backgroundImage:`url("${IUP_VIDEO.cdnUrl}/${t.video_id}/${u.thumbnailFileName}")`}):e=u.status<=1?(0,p.__)("Awaiting Upload...","infinite-uploads"):u.status>4?(0,p.__)("Video Error. Upload again.","infinite-uploads"):(0,p.sprintf)((0,p.__)("Video %d%% processed...","infinite-uploads"),u.encodeProgress),(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{...s},(0,i.createElement)("div",{className:"ratio-16-9-outer"},(0,i.createElement)("div",{className:"ratio-16-9-inner",style:r},(0,i.createElement)("div",{className:"ratio-16-9-content"},(0,i.createElement)(a.Spinner,{style:{height:"0.9em",width:"0.9em"}})," ",e)))),(0,i.createElement)(l.InspectorControls,null,(0,i.createElement)(a.PanelBody,{title:(0,p.__)("Settings")},(0,i.createElement)(x,{setAttributes:n,attributes:t}))))}}return(0,i.createElement)("div",{...s},(0,i.createElement)(a.Placeholder,{icon:d.E,instructions:(0,p.__)("Upload a new video direct to the cloud or select a video from your cloud library.","infinite-uploads"),label:(0,p.__)("Infinite Uploads Video","infinite-uploads")},(0,i.createElement)("div",{className:"placeholder-wrapper"},(0,i.createElement)("div",{className:"uppy-wrapper"},g?"":(0,i.createElement)(v,{width:"100%",height:"100%",uppy:O,locale:{strings:{dropHereOr:(0,p.__)("Drop video file here or %{browse}.","infinite-uploads"),browse:(0,p.__)("browse files","infinite-uploads")}}}),(0,i.createElement)(b,{uppy:O,hideUploadButton:!1,hideAfterFinish:!0,showProgressDetails:!0})),!g&&(0,i.createElement)(wi,{selectVideo:e=>{n({video_id:e.guid}),f(e),E(!1)}}))))},save:function({attributes:e}){const t=l.useBlockProps.save();return e.video_id?(0,i.createElement)("figure",{...t},(0,i.createElement)("div",{className:"iup-video-embed-wrapper"},(0,i.createElement)("iframe",{src:`https://iframe.mediadelivery.net/embed/${IUP_VIDEO.libraryId}/${e.video_id}?autoplay=${e.autoplay}&preload=${e.preload}&loop=${e.loop}&muted=${e.muted}`,loading:"lazy",className:"iup-video-embed",sandbox:"allow-scripts allow-same-origin allow-presentation",allow:"accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;",allowFullScreen:!0}))):(0,i.createElement)("div",{...t})},icon:(0,d.E)(!1)})},9797:function(e,t,n){!function(e){"use strict";function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s="undefined"!=typeof self?self:n.g;const i="undefined"!=typeof navigator,r=i&&"undefined"==typeof HTMLImageElement,o=!(void 0===n.g||"undefined"==typeof process||!process.versions||!process.versions.node),a=s.Buffer,l=!!a,u=e=>void 0!==e;function c(e){return void 0===e||(e instanceof Map?0===e.size:0===Object.values(e).filter(u).length)}function d(e){let t=new Error(e);throw delete t.stack,t}function p(e){let t=function(e){let t=0;return e.ifd0.enabled&&(t+=1024),e.exif.enabled&&(t+=2048),e.makerNote&&(t+=2048),e.userComment&&(t+=1024),e.gps.enabled&&(t+=512),e.interop.enabled&&(t+=100),e.ifd1.enabled&&(t+=1024),t+2048}(e);return e.jfif.enabled&&(t+=50),e.xmp.enabled&&(t+=2e4),e.iptc.enabled&&(t+=14e3),e.icc.enabled&&(t+=6e3),t}const h=e=>String.fromCharCode.apply(null,e),f="undefined"!=typeof TextDecoder?new TextDecoder("utf-8"):void 0;class m{static from(e,t){return e instanceof this&&e.le===t?e:new m(e,void 0,void 0,t)}constructor(e,t=0,n,s){if("boolean"==typeof s&&(this.le=s),Array.isArray(e)&&(e=new Uint8Array(e)),0===e)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){void 0===n&&(n=e.byteLength-t);let s=new DataView(e,t,n);this._swapDataView(s)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof m){void 0===n&&(n=e.byteLength-t),(t+=e.byteOffset)+n>e.byteOffset+e.byteLength&&d("Creating view outside of available memory in ArrayBuffer");let s=new DataView(e.buffer,t,n);this._swapDataView(s)}else if("number"==typeof e){let t=new DataView(new ArrayBuffer(e));this._swapDataView(t)}else d("Invalid input argument for BufferView: "+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t,n=m){return e instanceof DataView||e instanceof m?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||d("BufferView.set(): Invalid data argument."),this.toUint8().set(e,t),new n(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new m(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(e=0,t=this.byteLength){return n=this.getUint8Array(e,t),f?f.decode(n):l?Buffer.from(n).toString("utf8"):decodeURIComponent(escape(h(n)));var n}getLatin1String(e=0,t=this.byteLength){let n=this.getUint8Array(e,t);return h(n)}getUnicodeString(e=0,t=this.byteLength){const n=[];for(let s=0;s<t&&e+s<this.byteLength;s+=2)n.push(this.getUint16(e+s));return h(n)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e,t=this.le){return this.dataView.getInt16(e,t)}getInt32(e,t=this.le){return this.dataView.getInt32(e,t)}getUint16(e,t=this.le){return this.dataView.getUint16(e,t)}getUint32(e,t=this.le){return this.dataView.getUint32(e,t)}getFloat32(e,t=this.le){return this.dataView.getFloat32(e,t)}getFloat64(e,t=this.le){return this.dataView.getFloat64(e,t)}getFloat(e,t=this.le){return this.dataView.getFloat32(e,t)}getDouble(e,t=this.le){return this.dataView.getFloat64(e,t)}getUintBytes(e,t,n){switch(t){case 1:return this.getUint8(e,n);case 2:return this.getUint16(e,n);case 4:return this.getUint32(e,n);case 8:return this.getUint64&&this.getUint64(e,n)}}getUint(e,t,n){switch(t){case 8:return this.getUint8(e,n);case 16:return this.getUint16(e,n);case 32:return this.getUint32(e,n);case 64:return this.getUint64&&this.getUint64(e,n)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}}function g(e,t){d(`${e} '${t}' was not loaded, try using full build of exifr.`)}class y extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||g(this.kind,e),t&&(e in t||function(e,t){d(`Unknown ${e} '${t}'.`)}(this.kind,e),t[e].enabled||g(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var v=new y("file parser"),b=new y("segment parser"),w=new y("file reader");let E=s.fetch;const _="Invalid input argument";function x(e,t){return(n=e).startsWith("data:")||n.length>1e4?C(e,t,"base64"):o&&e.includes("://")?P(e,t,"url",S):o?C(e,t,"fs"):i?P(e,t,"url",S):void d(_);var n}async function P(e,t,n,s){return w.has(n)?C(e,t,n):s?async function(e,t){let n=await t(e);return new m(n)}(e,s):void d(`Parser ${n} is not loaded`)}async function C(e,t,n){let s=new(w.get(n))(e,t);return await s.read(),s}const S=e=>E(e).then((e=>e.arrayBuffer())),O=e=>new Promise(((t,n)=>{let s=new FileReader;s.onloadend=()=>t(s.result||new ArrayBuffer),s.onerror=n,s.readAsArrayBuffer(e)}));class k extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function F(e,t,n){let s=new k;for(let[e,t]of n)s.set(e,t);if(Array.isArray(t))for(let n of t)e.set(n,s);else e.set(t,s);return s}function N(e,t,n){let s,i=e.get(t);for(s of n)i.set(s[0],s[1])}const U=new Map,T=new Map,A=new Map,R=37500,D=37510,I=33723,j=34675,B=34665,M=34853,L=40965,$=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],z=["jfif","xmp","icc","iptc","ihdr"],H=["tiff",...z],q=["ifd0","ifd1","exif","gps","interop"],V=[...H,...q],W=["makerNote","userComment"],K=["translateKeys","translateValues","reviveValues","multiSegment"],G=[...K,"sanitize","mergeOutput","silentErrors"];class X{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class Z extends X{get needed(){return this.enabled||this.deps.size>0}constructor(e,n,s,i){if(super(),t(this,"enabled",!1),t(this,"skip",new Set),t(this,"pick",new Set),t(this,"deps",new Set),t(this,"translateKeys",!1),t(this,"translateValues",!1),t(this,"reviveValues",!1),this.key=e,this.enabled=n,this.parse=this.enabled,this.applyInheritables(i),this.canBeFiltered=q.includes(e),this.canBeFiltered&&(this.dict=U.get(e)),void 0!==s)if(Array.isArray(s))this.parse=this.enabled=!0,this.canBeFiltered&&s.length>0&&this.translateTagSet(s,this.pick);else if("object"==typeof s){if(this.enabled=!0,this.parse=!1!==s.parse,this.canBeFiltered){let{pick:e,skip:t}=s;e&&e.length>0&&this.translateTagSet(e,this.pick),t&&t.length>0&&this.translateTagSet(t,this.skip)}this.applyInheritables(s)}else!0===s||!1===s?this.parse=this.enabled=s:d(`Invalid options argument: ${s}`)}applyInheritables(e){let t,n;for(t of K)n=e[t],void 0!==n&&(this[t]=n)}translateTagSet(e,t){if(this.dict){let n,s,{tagKeys:i,tagValues:r}=this.dict;for(n of e)"string"==typeof n?(s=r.indexOf(n),-1===s&&(s=i.indexOf(Number(n))),-1!==s&&t.add(Number(i[s]))):t.add(n)}else for(let n of e)t.add(n)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,ne(this.pick,this.deps)):this.enabled&&this.pick.size>0&&ne(this.pick,this.deps)}}var Y={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},Q=new Map;class J extends X{static useCached(e){let t=Q.get(e);return void 0!==t||(t=new this(e),Q.set(e,t)),t}constructor(e){super(),!0===e?this.setupFromTrue():void 0===e?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):"object"==typeof e?this.setupFromObject(e):d(`Invalid options argument ${e}`),void 0===this.firstChunkSize&&(this.firstChunkSize=i?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of $)this[e]=Y[e];for(e of G)this[e]=Y[e];for(e of W)this[e]=Y[e];for(e of V)this[e]=new Z(e,Y[e],void 0,this)}setupFromTrue(){let e;for(e of $)this[e]=Y[e];for(e of G)this[e]=Y[e];for(e of W)this[e]=!0;for(e of V)this[e]=new Z(e,!0,void 0,this)}setupFromArray(e){let t;for(t of $)this[t]=Y[t];for(t of G)this[t]=Y[t];for(t of W)this[t]=Y[t];for(t of V)this[t]=new Z(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,q)}setupFromObject(e){let t;for(t of(q.ifd0=q.ifd0||q.image,q.ifd1=q.ifd1||q.thumbnail,Object.assign(this,e),$))this[t]=te(e[t],Y[t]);for(t of G)this[t]=te(e[t],Y[t]);for(t of W)this[t]=te(e[t],Y[t]);for(t of H)this[t]=new Z(t,Y[t],e[t],this);for(t of q)this[t]=new Z(t,Y[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,q,V),!0===e.tiff?this.batchEnableWithBool(q,!0):!1===e.tiff?this.batchEnableWithUserValue(q,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,q):"object"==typeof e.tiff&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,q)}batchEnableWithBool(e,t){for(let n of e)this[n].enabled=t}batchEnableWithUserValue(e,t){for(let n of e){let e=t[n];this[n].enabled=!1!==e&&void 0!==e}}setupGlobalFilters(e,t,n,s=n){if(e&&e.length){for(let e of s)this[e].enabled=!1;let t=ee(e,n);for(let[e,n]of t)ne(this[e].pick,n),this[e].enabled=!0}else if(t&&t.length){let e=ee(t,n);for(let[t,n]of e)ne(this[t].skip,n)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:n,iptc:s,icc:i}=this;this.makerNote?t.deps.add(R):t.skip.add(R),this.userComment?t.deps.add(D):t.skip.add(D),n.enabled||e.skip.add(700),s.enabled||e.skip.add(I),i.enabled||e.skip.add(j)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:n,interop:s}=this;s.needed&&(t.deps.add(L),e.deps.add(L)),t.needed&&e.deps.add(B),n.needed&&e.deps.add(M),this.tiff.enabled=q.some((e=>!0===this[e].enabled))||this.makerNote||this.userComment;for(let e of q)this[e].finalizeFilters()}get onlyTiff(){return!z.map((e=>this[e].enabled)).some((e=>!0===e))&&this.tiff.enabled}checkLoadedPlugins(){for(let e of H)this[e].enabled&&!b.has(e)&&g("segment parser",e)}}function ee(e,t){let n,s,i,r,o=[];for(i of t){for(r of(n=U.get(i),s=[],n))(e.includes(r[0])||e.includes(r[1]))&&s.push(r[0]);s.length&&o.push([i,s])}return o}function te(e,t){return void 0!==e?e:void 0!==t?t:void 0}function ne(e,t){for(let n of t)e.add(n)}t(J,"default",Y);class se{constructor(e){t(this,"parsers",{}),t(this,"output",{}),t(this,"errors",[]),t(this,"pushToErrors",(e=>this.errors.push(e))),this.options=J.useCached(e)}async read(e){this.file=await function(e,t){return"string"==typeof e?x(e,t):i&&!r&&e instanceof HTMLImageElement?x(e.src,t):e instanceof Uint8Array||e instanceof ArrayBuffer||e instanceof DataView?new m(e):i&&e instanceof Blob?P(e,t,"blob",O):void d(_)}(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[n,s]of v)if(s.canHandle(e,t))return this.fileParser=new s(this.options,this.file,this.parsers),e[n]=!0;this.file.close&&this.file.close(),d("Unknown file format")}async parse(){let{output:e,errors:t}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),t.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&t.length>0&&(e.errors=t),c(n=e)?void 0:n;var n}async executeParsers(){let{output:e}=this;await this.fileParser.parse();let t=Object.values(this.parsers).map((async t=>{let n=await t.parse();t.assignToOutput(e,n)}));this.options.silentErrors&&(t=t.map((e=>e.catch(this.pushToErrors)))),await Promise.all(t)}async extractThumbnail(){this.setup();let{options:e,file:t}=this,n=b.get("tiff",e);var s;if(t.tiff?s={start:0,type:"tiff"}:t.jpeg&&(s=await this.fileParser.getOrFindSegment("tiff")),void 0===s)return;let i=await this.fileParser.ensureSegmentChunk(s),r=this.parsers.tiff=new n(i,e,t),o=await r.extractThumbnail();return t.close&&t.close(),o}}async function ie(e,t){let n=new se(t);return await n.read(e),n.parse()}var re=Object.freeze({__proto__:null,parse:ie,Exifr:se,fileParsers:v,segmentParsers:b,fileReaders:w,tagKeys:U,tagValues:T,tagRevivers:A,createDictionary:F,extendDictionary:N,fetchUrlAsArrayBuffer:S,readBlobAsArrayBuffer:O,chunkedProps:$,otherSegments:z,segments:H,tiffBlocks:q,segmentsAndBlocks:V,tiffExtractables:W,inheritables:K,allFormatters:G,Options:J});class oe{static findPosition(e,t){let n=e.getUint16(t+2)+2,s="function"==typeof this.headerLength?this.headerLength(e,t,n):this.headerLength,i=t+s,r=n-s;return{offset:t,length:n,headerLength:s,start:i,size:r,end:i+r}}static parse(e,t={}){return new this(e,new J({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof m?e:new m(e)}constructor(e,n={},s){t(this,"errors",[]),t(this,"raw",new Map),t(this,"handleError",(e=>{if(!this.options.silentErrors)throw e;this.errors.push(e.message)})),this.chunk=this.normalizeInput(e),this.file=s,this.type=this.constructor.type,this.globalOptions=this.options=n,this.localOptions=n[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let n=A.get(t),s=T.get(t),i=U.get(t),r=this.options[t],o=r.reviveValues&&!!n,a=r.translateValues&&!!s,l=r.translateKeys&&!!i,u={};for(let[t,r]of e)o&&n.has(t)?r=n.get(t)(r):a&&s.has(t)&&(r=this.translateValue(r,s.get(t))),l&&i.has(t)&&(t=i.get(t)||t),u[t]=r;return u}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,n){if(this.globalOptions.mergeOutput)return Object.assign(e,n);e[t]?Object.assign(e[t],n):e[t]=n}}function ae(e){return 192===e||194===e||196===e||219===e||221===e||218===e||254===e}function le(e){return e>=224&&e<=239}function ue(e,t,n){for(let[s,i]of b)if(i.canHandle(e,t,n))return s}t(oe,"headerLength",4),t(oe,"type",void 0),t(oe,"multiSegment",!1),t(oe,"canHandle",(()=>!1));class ce extends class{constructor(e,n,s){t(this,"errors",[]),t(this,"ensureSegmentChunk",(async e=>{let t=e.start,n=e.size||65536;if(this.file.chunked)if(this.file.available(t,n))e.chunk=this.file.subarray(t,n);else try{e.chunk=await this.file.readChunk(t,n)}catch(t){d(`Couldn't read segment: ${JSON.stringify(e)}. ${t.message}`)}else this.file.byteLength>t+n?e.chunk=this.file.subarray(t,n):void 0===e.size?e.chunk=this.file.subarray(t):d("Segment unreachable: "+JSON.stringify(e));return e.chunk})),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=n,this.parsers=s}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let n=new(b.get(e))(t,this.options,this.file);return this.parsers[e]=n}createParsers(e){for(let t of e){let{type:e,chunk:n}=t,s=this.options[e];if(s&&s.enabled){let t=this.parsers[e];t&&t.append||t||this.createParser(e,n)}}}async readSegments(e){let t=e.map(this.ensureSegmentChunk);await Promise.all(t)}}{constructor(...e){super(...e),t(this,"appSegments",[]),t(this,"jpegSegments",[]),t(this,"unknownSegments",[])}static canHandle(e,t){return 65496===t}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(e){!0===e?(this.findAll=!0,this.wanted=new Set(b.keyList())):(e=void 0===e?b.keyList().filter((e=>this.options[e].enabled)):e.filter((e=>this.options[e].enabled&&b.has(e))),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}async findAppSegments(e=0,t){this.setupSegmentFinderArgs(t);let{file:n,findAll:s,wanted:i,remaining:r}=this;if(!s&&this.file.chunked&&(s=Array.from(i).some((e=>{let t=b.get(e),n=this.options[e];return t.multiSegment&&n.multiSegment})),s&&await this.file.readWhole()),e=this.findAppSegmentsInRange(e,n.byteLength),!this.options.onlyTiff&&n.chunked){let t=!1;for(;r.size>0&&!t&&(n.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:s}=n,i=this.appSegments.some((e=>!this.file.available(e.offset||e.start,e.length||e.size)));if(t=e>s&&!i?!await n.readNextChunk(e):!await n.readNextChunk(s),void 0===(e=this.findAppSegmentsInRange(e,n.byteLength)))return}}}findAppSegmentsInRange(e,t){t-=2;let n,s,i,r,o,a,{file:l,findAll:u,wanted:c,remaining:d,options:p}=this;for(;e<t;e++)if(255===l.getUint8(e))if(n=l.getUint8(e+1),le(n)){if(s=l.getUint16(e+2),i=ue(l,e,s),i&&c.has(i)&&(r=b.get(i),o=r.findPosition(l,e),a=p[i],o.type=i,this.appSegments.push(o),!u&&(r.multiSegment&&a.multiSegment?(this.unfinishedMultiSegment=o.chunkNumber<o.chunkCount,this.unfinishedMultiSegment||d.delete(i)):d.delete(i),0===d.size)))break;p.recordUnknownSegments&&(o=oe.findPosition(l,e),o.marker=n,this.unknownSegments.push(o)),e+=s+1}else if(ae(n)){if(s=l.getUint16(e+2),218===n&&!1!==p.stopAfterSos)return;p.recordJpegSegments&&this.jpegSegments.push({offset:e,length:s,marker:n}),e+=s+1}return e}mergeMultiSegments(){if(!this.appSegments.some((e=>e.multiSegment)))return;let e=function(e){let t,n,s,i=new Map;for(let r=0;r<e.length;r++)t=e[r],n=t.type,i.has(n)?s=i.get(n):i.set(n,s=[]),s.push(t);return Array.from(i)}(this.appSegments);this.mergedAppSegments=e.map((([e,t])=>{let n=b.get(e,this.options);return n.handleMultiSegments?{type:e,chunk:n.handleMultiSegments(t)}:t[0]}))}getSegment(e){return this.appSegments.find((t=>t.type===e))}async getOrFindSegment(e){let t=this.getSegment(e);return void 0===t&&(await this.findAppSegments(0,[e]),t=this.getSegment(e)),t}}t(ce,"type","jpeg"),v.set("jpeg",ce);const de=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class pe extends oe{parseHeader(){var e=this.chunk.getUint16();18761===e?this.le=!0:19789===e&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t,n=new Map){let{pick:s,skip:i}=this.options[t];s=new Set(s);let r=s.size>0,o=0===i.size,a=this.chunk.getUint16(e);e+=2;for(let l=0;l<a;l++){let a=this.chunk.getUint16(e);if(r){if(s.has(a)&&(n.set(a,this.parseTag(e,a,t)),s.delete(a),0===s.size))break}else!o&&i.has(a)||n.set(a,this.parseTag(e,a,t));e+=12}return n}parseTag(e,t,n){let{chunk:s}=this,i=s.getUint16(e+2),r=s.getUint32(e+4),o=de[i];if(o*r<=4?e+=8:e=s.getUint32(e+8),(i<1||i>13)&&d(`Invalid TIFF value type. block: ${n.toUpperCase()}, tag: ${t.toString(16)}, type: ${i}, offset ${e}`),e>s.byteLength&&d(`Invalid TIFF value offset. block: ${n.toUpperCase()}, tag: ${t.toString(16)}, type: ${i}, offset ${e} is outside of chunk size ${s.byteLength}`),1===i)return s.getUint8Array(e,r);if(2===i)return""===(a=function(e){for(;e.endsWith("\0");)e=e.slice(0,-1);return e}(a=s.getString(e,r)).trim())?void 0:a;var a;if(7===i)return s.getUint8Array(e,r);if(1===r)return this.parseTagValue(i,e);{let t=new(function(e){switch(e){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:case 10:default:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 11:return Float32Array;case 12:return Float64Array}}(i))(r),n=o;for(let s=0;s<r;s++)t[s]=this.parseTagValue(i,e),e+=n;return t}}parseTagValue(e,t){let{chunk:n}=this;switch(e){case 1:return n.getUint8(t);case 3:return n.getUint16(t);case 4:case 13:return n.getUint32(t);case 5:return n.getUint32(t)/n.getUint32(t+4);case 6:return n.getInt8(t);case 8:return n.getInt16(t);case 9:return n.getInt32(t);case 10:return n.getInt32(t)/n.getInt32(t+4);case 11:return n.getFloat(t);case 12:return n.getDouble(t);default:d(`Invalid tiff type ${e}`)}}}class he extends pe{static canHandle(e,t){return 225===e.getUint8(t+1)&&1165519206===e.getUint32(t+4)&&0===e.getUint16(t+8)}async parse(){this.parseHeader();let{options:e}=this;return e.ifd0.enabled&&await this.parseIfd0Block(),e.exif.enabled&&await this.safeParse("parseExifBlock"),e.gps.enabled&&await this.safeParse("parseGpsBlock"),e.interop.enabled&&await this.safeParse("parseInteropBlock"),e.ifd1.enabled&&await this.safeParse("parseThumbnailBlock"),this.createOutput()}safeParse(e){let t=this[e]();return void 0!==t.catch&&(t=t.catch(this.handleError)),t}findIfd0Offset(){void 0===this.ifd0Offset&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(void 0===this.ifd1Offset){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}parseBlock(e,t){let n=new Map;return this[t]=n,this.parseTags(e,t,n),n}async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&d("Malformed EXIF data"),!e.chunked&&this.ifd0Offset>e.byteLength&&d(`IFD0 offset points to outside of file.\nthis.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,p(this.options));let t=this.parseBlock(this.ifd0Offset,"ifd0");return 0!==t.size?(this.exifOffset=t.get(B),this.interopOffset=t.get(L),this.gpsOffset=t.get(M),this.xmp=t.get(700),this.iptc=t.get(I),this.icc=t.get(j),this.options.sanitize&&(t.delete(B),t.delete(L),t.delete(M),t.delete(700),t.delete(I),t.delete(j)),t):void 0}async parseExifBlock(){if(this.exif)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.exifOffset)return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,p(this.options));let e=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=e.get(L)),this.makerNote=e.get(R),this.userComment=e.get(D),this.options.sanitize&&(e.delete(L),e.delete(R),e.delete(D)),this.unpack(e,41728),this.unpack(e,41729),e}unpack(e,t){let n=e.get(t);n&&1===n.length&&e.set(t,n[0])}async parseGpsBlock(){if(this.gps)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.gpsOffset)return;let e=this.parseBlock(this.gpsOffset,"gps");return e&&e.has(2)&&e.has(4)&&(e.set("latitude",fe(...e.get(2),e.get(1))),e.set("longitude",fe(...e.get(4),e.get(3)))),e}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),void 0!==this.interopOffset||this.exif||await this.parseExifBlock(),void 0!==this.interopOffset))return this.parseBlock(this.interopOffset,"interop")}async parseThumbnailBlock(e=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||e))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),void 0===this.ifd1)return;let e=this.ifd1.get(513),t=this.ifd1.get(514);return this.chunk.getUint8Array(e,t)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,n,s={};for(t of q)if(e=this[t],!c(e))if(n=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if("ifd1"===t)continue;Object.assign(s,n)}else s[t]=n;return this.makerNote&&(s.makerNote=this.makerNote),this.userComment&&(s.userComment=this.userComment),s}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[n,s]of Object.entries(t))this.assignObjectToOutput(e,n,s)}}function fe(e,t,n,s){var i=e+t/60+n/3600;return"S"!==s&&"W"!==s||(i*=-1),i}t(he,"type","tiff"),t(he,"headerLength",10),b.set("tiff",he);var me=Object.freeze({__proto__:null,default:re,Exifr:se,fileParsers:v,segmentParsers:b,fileReaders:w,tagKeys:U,tagValues:T,tagRevivers:A,createDictionary:F,extendDictionary:N,fetchUrlAsArrayBuffer:S,readBlobAsArrayBuffer:O,chunkedProps:$,otherSegments:z,segments:H,tiffBlocks:q,segmentsAndBlocks:V,tiffExtractables:W,inheritables:K,allFormatters:G,Options:J,parse:ie});const ge={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},ye=Object.assign({},ge,{firstChunkSize:4e4,gps:[1,2,3,4]}),ve=Object.assign({},ge,{tiff:!1,ifd1:!0,mergeOutput:!1}),be=Object.assign({},ge,{firstChunkSize:4e4,ifd0:[274]});async function we(e){let t=new se(be);await t.read(e);let n=await t.parse();if(n&&n.ifd0)return n.ifd0[274]}const Ee=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});if(e.rotateCanvas=!0,e.rotateCss=!0,"object"==typeof navigator){let t=navigator.userAgent;if(t.includes("iPad")||t.includes("iPhone")){let n=t.match(/OS (\d+)_(\d+)/);if(n){let[,t,s]=n,i=Number(t)+.1*Number(s);e.rotateCanvas=i<13.4,e.rotateCss=!1}}else if(t.includes("OS X 10")){let[,n]=t.match(/OS X 10[_.](\d+)/);e.rotateCanvas=e.rotateCss=Number(n)<15}if(t.includes("Chrome/")){let[,n]=t.match(/Chrome\/(\d+)/);e.rotateCanvas=e.rotateCss=Number(n)<81}else if(t.includes("Firefox/")){let[,n]=t.match(/Firefox\/(\d+)/);e.rotateCanvas=e.rotateCss=Number(n)<77}}class _e extends m{constructor(...e){super(...e),t(this,"ranges",new xe),0!==this.byteLength&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,n){if(0===e&&0===this.byteLength&&n){let e=new DataView(n.buffer||n,n.byteOffset,n.byteLength);this._swapDataView(e)}else{let n=e+t;if(n>this.byteLength){let{dataView:e}=this._extend(n);this._swapDataView(e)}}}_extend(e){let t;t=l?a.allocUnsafe(e):new Uint8Array(e);let n=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:n}}subarray(e,t,n=!1){return t=t||this._lengthToEnd(e),n&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,n=!1){n&&this._tryExtend(t,e.byteLength,e);let s=super.set(e,t);return this.ranges.add(t,s.byteLength),s}async ensureChunk(e,t){this.chunked&&(this.ranges.available(e,t)||await this.readChunk(e,t))}available(e,t){return this.ranges.available(e,t)}}class xe{constructor(){t(this,"list",[])}get length(){return this.list.length}add(e,t,n=0){let s=e+t,i=this.list.filter((t=>Pe(e,t.offset,s)||Pe(e,t.end,s)));if(i.length>0){e=Math.min(e,...i.map((e=>e.offset))),s=Math.max(s,...i.map((e=>e.end))),t=s-e;let n=i.shift();n.offset=e,n.length=t,n.end=s,this.list=this.list.filter((e=>!i.includes(e)))}else this.list.push({offset:e,length:t,end:s})}available(e,t){let n=e+t;return this.list.some((t=>t.offset<=e&&n<=t.end))}}function Pe(e,t,n){return e<=t&&t<=n}class Ce extends _e{constructor(e,n){super(0),t(this,"chunksRead",0),this.input=e,this.options=n}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(e=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let t=this.options.chunkSize,n=await this.readChunk(e,t);return!!n&&n.byteLength===t}async readChunk(e,t){if(this.chunksRead++,0!==(t=this.safeWrapAddress(e,t)))return this._readChunk(e,t)}safeWrapAddress(e,t){return void 0!==this.size&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(0!==this.ranges.list.length)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return void 0!==this.size&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}w.set("blob",class extends Ce{async readWhole(){this.chunked=!1;let e=await O(this.input);this._swapArrayBuffer(e)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(e,t){let n=t?e+t:void 0,s=this.input.slice(e,n),i=await O(s);return this.set(i,e,!0)}}),e.Exifr=se,e.Options=J,e.allFormatters=G,e.chunkedProps=$,e.createDictionary=F,e.default=me,e.extendDictionary=N,e.fetchUrlAsArrayBuffer=S,e.fileParsers=v,e.fileReaders=w,e.gps=async function(e){let t=new se(ye);await t.read(e);let n=await t.parse();if(n&&n.gps){let{latitude:e,longitude:t}=n.gps;return{latitude:e,longitude:t}}},e.gpsOnlyOptions=ye,e.inheritables=K,e.orientation=we,e.orientationOnlyOptions=be,e.otherSegments=z,e.parse=ie,e.readBlobAsArrayBuffer=O,e.rotation=async function(t){let n=await we(t);return Object.assign({canvas:e.rotateCanvas,css:e.rotateCss},Ee[n])},e.rotations=Ee,e.segmentParsers=b,e.segments=H,e.segmentsAndBlocks=V,e.tagKeys=U,e.tagRevivers=A,e.tagValues=T,e.thumbnail=async function(e){let t=new se(ve);await t.read(e);let n=await t.extractThumbnail();return n&&l?a.from(n):n},e.thumbnailOnlyOptions=ve,e.thumbnailUrl=async function(e){let t=await this.thumbnail(e);if(void 0!==t){let e=new Blob([t]);return URL.createObjectURL(e)}},e.tiffBlocks=q,e.tiffExtractables=W,Object.defineProperty(e,"__esModule",{value:!0})}(t)},311:e=>{"use strict";e.exports=function(e,t,n,s,i,r,o,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,s,i,r,o,a],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},6993:e=>{e.exports=function(e,t){if(e===t)return!0;for(var n in e)if(!(n in t))return!1;for(var n in t)if(e[n]!==t[n])return!1;return!0}},8127:function(e,t,n){var s,i;i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:this,e.exports=function(n){"use strict";var i,r=(n=n||{}).Base64,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=function(e){for(var t={},n=0,s=e.length;n<s;n++)t[e.charAt(n)]=n;return t}(o),l=String.fromCharCode,u=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?l(192|t>>>6)+l(128|63&t):l(224|t>>>12&15)+l(128|t>>>6&63)+l(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return l(240|t>>>18&7)+l(128|t>>>12&63)+l(128|t>>>6&63)+l(128|63&t)},c=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(c,u)},p=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[o.charAt(n>>>18),o.charAt(n>>>12&63),t>=2?"=":o.charAt(n>>>6&63),t>=1?"=":o.charAt(63&n)].join("")},h=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,p)},f=function(e){return h(d(String(e)))},m=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},g=function(e,t){return t?m(f(e)):f(e)};n.Uint8Array&&(i=function(e,t){for(var n="",s=0,i=e.length;s<i;s+=3){var r=e[s],a=e[s+1],l=e[s+2],u=r<<16|a<<8|l;n+=o.charAt(u>>>18)+o.charAt(u>>>12&63)+(void 0!==a?o.charAt(u>>>6&63):"=")+(void 0!==l?o.charAt(63&u):"=")}return t?m(n):n});var y,v=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,b=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return l(55296+(t>>>10))+l(56320+(1023&t));case 3:return l((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return l((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},w=function(e){return e.replace(v,b)},E=function(e){var t=e.length,n=t%4,s=(t>0?a[e.charAt(0)]<<18:0)|(t>1?a[e.charAt(1)]<<12:0)|(t>2?a[e.charAt(2)]<<6:0)|(t>3?a[e.charAt(3)]:0),i=[l(s>>>16),l(s>>>8&255),l(255&s)];return i.length-=[0,0,2,1][n],i.join("")},_=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/\S{1,4}/g,E)},x=function(e){return _(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},P=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},C=function(e){return function(e){return w(_(e))}(P(e))};n.Uint8Array&&(y=function(e){return Uint8Array.from(x(P(e)),(function(e){return e.charCodeAt(0)}))});if(n.Base64={VERSION:"2.6.4",atob:x,btoa:h,fromBase64:C,toBase64:g,utob:d,encode:g,encodeURI:function(e){return g(e,!0)},btou:w,decode:C,noConflict:function(){var e=n.Base64;return n.Base64=r,e},fromUint8Array:i,toUint8Array:y},"function"==typeof Object.defineProperty){var S=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",S((function(){return C(this)}))),Object.defineProperty(String.prototype,"toBase64",S((function(e){return g(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",S((function(){return g(this,!0)})))}}return n.Meteor&&(Base64=n.Base64),e.exports?e.exports.Base64=n.Base64:void 0===(s=function(){return n.Base64}.apply(t,[]))||(e.exports=s),{Base64:n.Base64}}(i)},181:(e,t,n)=>{var s=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,c=l||u||Function("return this")(),d=Object.prototype.toString,p=Math.max,h=Math.min,f=function(){return c.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var n=r.test(e);return n||o.test(e)?a(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var s,i,r,o,a,l,u=0,c=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=s,r=i;return s=i=void 0,u=t,o=e.apply(r,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-u>=r}function w(){var e=f();if(b(e))return E(e);a=setTimeout(w,function(e){var n=t-(e-l);return d?h(n,r-(e-u)):n}(e))}function E(e){return a=void 0,y&&s?v(e):(s=i=void 0,o)}function _(){var e=f(),n=b(e);if(s=arguments,i=this,l=e,n){if(void 0===a)return function(e){return u=e,a=setTimeout(w,t),c?v(e):o}(l);if(d)return a=setTimeout(w,t),v(l)}return void 0===a&&(a=setTimeout(w,t)),o}return t=g(t)||0,m(n)&&(c=!!n.leading,r=(d="maxWait"in n)?p(g(n.maxWait)||0,t):r,y="trailing"in n?!!n.trailing:y),_.cancel=function(){void 0!==a&&clearTimeout(a),u=0,s=l=i=a=void 0},_.flush=function(){return void 0===a?o:E(f())},_}},5858:(e,t,n)=>{var s="Expected a function",i=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),p=Object.prototype.toString,h=Math.max,f=Math.min,m=function(){return d.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==p.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=o.test(e);return n||a.test(e)?l(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError(s);return g(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),function(e,t,n){var i,r,o,a,l,u,c=0,d=!1,p=!1,v=!0;if("function"!=typeof e)throw new TypeError(s);function b(t){var n=i,s=r;return i=r=void 0,c=t,a=e.apply(s,n)}function w(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-c>=o}function E(){var e=m();if(w(e))return _(e);l=setTimeout(E,function(e){var n=t-(e-u);return p?f(n,o-(e-c)):n}(e))}function _(e){return l=void 0,v&&i?b(e):(i=r=void 0,a)}function x(){var e=m(),n=w(e);if(i=arguments,r=this,u=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(E,t),d?b(e):a}(u);if(p)return l=setTimeout(E,t),b(u)}return void 0===l&&(l=setTimeout(E,t)),a}return t=y(t)||0,g(n)&&(d=!!n.leading,o=(p="maxWait"in n)?h(y(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==l&&clearTimeout(l),c=0,i=u=r=l=void 0},x.flush=function(){return void 0===l?a:_(m())},x}(e,t,{leading:i,maxWait:t,trailing:r})}},1811:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function i(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((i=e[n])===(r=t[n])||s(i)&&s(r)))return!1;var i,r;return!0}const r=function(e,t){var n;void 0===t&&(t=i);var s,r=[],o=!1;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];return o&&n===this&&t(i,r)||(s=e.apply(this,i),o=!0,n=this,r=i),s}}},7057:(e,t,n)=>{var s=n(7163),i=/[\/\+\.]/;e.exports=function(e,t){function n(t){var n=s(t,e,i);return n&&n.length>=2}return t?n(t.split(";")[0]):n}},3835:e=>{e.exports=function(){var e={},t=e._fns={};return e.emit=function(e,n,s,i,r,o,a){var l=function(e){for(var n=t[e]?t[e]:[],s=e.indexOf(":"),i=-1===s?[e]:[e.substring(0,s),e.substring(s+1)],r=Object.keys(t),o=0,a=r.length;o<a;o++){var l=r[o];if("*"===l&&(n=n.concat(t[l])),2===i.length&&i[0]===l){n=n.concat(t[l]);break}}return n}(e);l.length&&function(e,t,n){for(var s=0,i=t.length;s<i&&t[s];s++)t[s].event=e,t[s].apply(t[s],n)}(e,l,[n,s,i,r,o,a])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,(function s(){n.apply(this,arguments),e.off(t,s)}))},e.off=function(e,t){var n=[];if(e&&t)for(var s=this._fns[e],i=0,r=s?s.length:0;i<r;i++)s[i]!==t&&n.push(s[i]);n.length?this._fns[e]=n:delete this._fns[e]},e}},172:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Component:()=>S,Fragment:()=>C,cloneElement:()=>K,createContext:()=>G,createElement:()=>_,createRef:()=>P,h:()=>_,hydrate:()=>W,isValidElement:()=>o,options:()=>i,render:()=>V,toChildArray:()=>R});var s,i,r,o,a,l,u,c,d,p,h,f,m,g={},y=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,b=Array.isArray;function w(e,t){for(var n in t)e[n]=t[n];return e}function E(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _(e,t,n){var i,r,o,a={};for(o in t)"key"==o?i=t[o]:"ref"==o?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?s.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return x(e,a,i,r,null)}function x(e,t,n,s,o){var a={type:e,props:t,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++r:o,__i:-1,__u:0};return null==o&&null!=i.vnode&&i.vnode(a),a}function P(){return{current:null}}function C(e){return e.children}function S(e,t){this.props=e,this.context=t}function O(e,t){if(null==t)return e.__?O(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?O(e):null}function k(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return k(e)}}function F(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!N.__r++||l!==i.debounceRendering)&&((l=i.debounceRendering)||u)(N)}function N(){var e,t,n,s,r,o,l,u;for(a.sort(c);e=a.shift();)e.__d&&(t=a.length,s=void 0,o=(r=(n=e).__v).__e,l=[],u=[],n.__P&&((s=w({},r)).__v=r.__v+1,i.vnode&&i.vnode(s),M(n.__P,s,r,n.__n,n.__P.namespaceURI,32&r.__u?[o]:null,l,null==o?O(r):o,!!(32&r.__u),u),s.__v=r.__v,s.__.__k[s.__i]=s,L(l,s,u),s.__e!=o&&k(s)),a.length>t&&a.sort(c));N.__r=0}function U(e,t,n,s,i,r,o,a,l,u,c){var d,p,h,f,m,v,b=s&&s.__k||y,w=t.length;for(l=T(n,t,b,l,w),d=0;d<w;d++)null!=(h=n.__k[d])&&(p=-1===h.__i?g:b[h.__i]||g,h.__i=d,v=M(e,h,p,i,r,o,a,l,u,c),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&z(p.ref,null,h),c.push(h.ref,h.__c||f,h)),null==m&&null!=f&&(m=f),4&h.__u||p.__k===h.__k?l=A(h,l,e):"function"==typeof h.type&&void 0!==v?l=v:f&&(l=f.nextSibling),h.__u&=-7);return n.__e=m,l}function T(e,t,n,s,i){var r,o,a,l,u,c=n.length,d=c,p=0;for(e.__k=new Array(i),r=0;r<i;r++)null!=(o=t[r])&&"boolean"!=typeof o&&"function"!=typeof o?(l=r+p,(o=e.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?x(null,o,null,null,null):b(o)?x(C,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?x(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,-1!==(u=o.__i=D(o,n,l,d))&&(d--,(a=n[u])&&(a.__u|=2)),null==a||null===a.__v?(-1==u&&p--,"function"!=typeof o.type&&(o.__u|=4)):u!=l&&(u==l-1?p--:u==l+1?p++:(u>l?p--:p++,o.__u|=4))):e.__k[r]=null;if(d)for(r=0;r<c;r++)null!=(a=n[r])&&!(2&a.__u)&&(a.__e==s&&(s=O(a)),H(a,a));return s}function A(e,t,n){var s,i;if("function"==typeof e.type){for(s=e.__k,i=0;s&&i<s.length;i++)s[i]&&(s[i].__=e,t=A(s[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=O(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function R(e,t){return t=t||[],null==e||"boolean"==typeof e||(b(e)?e.some((function(e){R(e,t)})):t.push(e)),t}function D(e,t,n,s){var i,r,o=e.key,a=e.type,l=t[n];if(null===l||l&&o==l.key&&a===l.type&&!(2&l.__u))return n;if(s>(null==l||2&l.__u?0:1))for(i=n-1,r=n+1;i>=0||r<t.length;){if(i>=0){if((l=t[i])&&!(2&l.__u)&&o==l.key&&a===l.type)return i;i--}if(r<t.length){if((l=t[r])&&!(2&l.__u)&&o==l.key&&a===l.type)return r;r++}}return-1}function I(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||v.test(t)?n:n+"px"}function j(e,t,n,s,i){var r;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof s&&(e.style.cssText=s=""),s)for(t in s)n&&t in n||I(e.style,t,"");if(n)for(t in n)s&&n[t]===s[t]||I(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])r=t!=(t=t.replace(d,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?s?n.u=s.u:(n.u=p,e.addEventListener(t,r?f:h,r)):e.removeEventListener(t,r?f:h,r);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function B(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=p++;else if(t.t<n.u)return;return n(i.event?i.event(t):t)}}}function M(e,t,n,s,r,o,a,l,u,c){var d,p,h,f,m,g,y,v,_,x,P,O,k,F,N,T,A,R=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),o=[l=t.__e=n.__e]),(d=i.__b)&&d(t);e:if("function"==typeof R)try{if(v=t.props,_="prototype"in R&&R.prototype.render,x=(d=R.contextType)&&s[d.__c],P=d?x?x.props.value:d.__:s,n.__c?y=(p=t.__c=n.__c).__=p.__E:(_?t.__c=p=new R(v,P):(t.__c=p=new S(v,P),p.constructor=R,p.render=q),x&&x.sub(p),p.props=v,p.state||(p.state={}),p.context=P,p.__n=s,h=p.__d=!0,p.__h=[],p._sb=[]),_&&null==p.__s&&(p.__s=p.state),_&&null!=R.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=w({},p.__s)),w(p.__s,R.getDerivedStateFromProps(v,p.__s))),f=p.props,m=p.state,p.__v=t,h)_&&null==R.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),_&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(_&&null==R.getDerivedStateFromProps&&v!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(v,P),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(v,p.__s,P)||t.__v==n.__v)){for(t.__v!=n.__v&&(p.props=v,p.state=p.__s,p.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),O=0;O<p._sb.length;O++)p.__h.push(p._sb[O]);p._sb=[],p.__h.length&&a.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(v,p.__s,P),_&&null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(f,m,g)}))}if(p.context=P,p.props=v,p.__P=e,p.__e=!1,k=i.__r,F=0,_){for(p.state=p.__s,p.__d=!1,k&&k(t),d=p.render(p.props,p.state,p.context),N=0;N<p._sb.length;N++)p.__h.push(p._sb[N]);p._sb=[]}else do{p.__d=!1,k&&k(t),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++F<25);p.state=p.__s,null!=p.getChildContext&&(s=w(w({},s),p.getChildContext())),_&&!h&&null!=p.getSnapshotBeforeUpdate&&(g=p.getSnapshotBeforeUpdate(f,m)),l=U(e,b(T=null!=d&&d.type===C&&null==d.key?d.props.children:d)?T:[T],t,n,s,r,o,a,l,u,c),p.base=t.__e,t.__u&=-161,p.__h.length&&a.push(p),y&&(p.__E=p.__=null)}catch(e){if(t.__v=null,u||null!=o)if(e.then){for(t.__u|=u?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;o[o.indexOf(l)]=null,t.__e=l}else for(A=o.length;A--;)E(o[A]);else t.__e=n.__e,t.__k=n.__k;i.__e(e,t,n)}else null==o&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):l=t.__e=$(n.__e,t,n,s,r,o,a,u,c);return(d=i.diffed)&&d(t),128&t.__u?void 0:l}function L(e,t,n){for(var s=0;s<n.length;s++)z(n[s],n[++s],n[++s]);i.__c&&i.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){i.__e(e,t.__v)}}))}function $(e,t,n,r,o,a,l,u,c){var d,p,h,f,m,y,v,w=n.props,_=t.props,x=t.type;if("svg"==x?o="http://www.w3.org/2000/svg":"math"==x?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=a)for(d=0;d<a.length;d++)if((m=a[d])&&"setAttribute"in m==!!x&&(x?m.localName==x:3==m.nodeType)){e=m,a[d]=null;break}if(null==e){if(null==x)return document.createTextNode(_);e=document.createElementNS(o,x,_.is&&_),u&&(i.__m&&i.__m(t,a),u=!1),a=null}if(null===x)w===_||u&&e.data===_||(e.data=_);else{if(a=a&&s.call(e.childNodes),w=n.props||g,!u&&null!=a)for(w={},d=0;d<e.attributes.length;d++)w[(m=e.attributes[d]).name]=m.value;for(d in w)if(m=w[d],"children"==d);else if("dangerouslySetInnerHTML"==d)h=m;else if(!(d in _)){if("value"==d&&"defaultValue"in _||"checked"==d&&"defaultChecked"in _)continue;j(e,d,null,m,o)}for(d in _)m=_[d],"children"==d?f=m:"dangerouslySetInnerHTML"==d?p=m:"value"==d?y=m:"checked"==d?v=m:u&&"function"!=typeof m||w[d]===m||j(e,d,m,w[d],o);if(p)u||h&&(p.__html===h.__html||p.__html===e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(h&&(e.innerHTML=""),U(e,b(f)?f:[f],t,n,r,"foreignObject"==x?"http://www.w3.org/1999/xhtml":o,a,l,a?a[0]:n.__k&&O(n,0),u,c),null!=a)for(d=a.length;d--;)E(a[d]);u||(d="value","progress"==x&&null==y?e.removeAttribute("value"):void 0!==y&&(y!==e[d]||"progress"==x&&!y||"option"==x&&y!==w[d])&&j(e,d,y,w[d],o),d="checked",void 0!==v&&v!==e[d]&&j(e,d,v,w[d],o))}return e}function z(e,t,n){try{if("function"==typeof e){var s="function"==typeof e.__u;s&&e.__u(),s&&null==t||(e.__u=e(t))}else e.current=t}catch(e){i.__e(e,n)}}function H(e,t,n){var s,r;if(i.unmount&&i.unmount(e),(s=e.ref)&&(s.current&&s.current!==e.__e||z(s,null,t)),null!=(s=e.__c)){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(e){i.__e(e,t)}s.base=s.__P=null}if(s=e.__k)for(r=0;r<s.length;r++)s[r]&&H(s[r],t,n||"function"!=typeof e.type);n||E(e.__e),e.__c=e.__=e.__e=void 0}function q(e,t,n){return this.constructor(e,n)}function V(e,t,n){var r,o,a,l;t==document&&(t=document.documentElement),i.__&&i.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],l=[],M(t,e=(!r&&n||t).__k=_(C,null,[e]),o||g,g,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?s.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r,l),L(a,e,l)}function W(e,t){V(e,t,W)}function K(e,t,n){var i,r,o,a,l=w({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?i=t[o]:"ref"==o?r=t[o]:l[o]=void 0===t[o]&&void 0!==a?a[o]:t[o];return arguments.length>2&&(l.children=arguments.length>3?s.call(arguments,2):n),x(e.type,l,i||e.key,r||e.ref,null)}function G(e,t){var n={__c:t="__cC"+m++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,s;return this.getChildContext||(n=new Set,(s={})[t]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.forEach((function(e){e.__e=!0,F(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}s=y.slice,i={__e:function(e,t,n,s){for(var i,r,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,s||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},r=0,o=function(e){return null!=e&&null==e.constructor},S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=w({},this.state),"function"==typeof e&&(e=e(w({},n),this.props)),e&&w(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),F(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),F(this))},S.prototype.render=C,a=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},N.__r=0,d=/(PointerCapture)$|Capture$/i,p=0,h=B(!1),f=B(!0),m=0},2694:(e,t,n)=>{"use strict";var s=n(6925);function i(){}function r(){}r.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,r,o){if(o!==s){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:i};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3992:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function s(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function i(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var s,r,o=[];for(r in"string"!=typeof t&&(t="?"),e)if(n.call(e,r)){if((s=e[r])||null!=s&&!isNaN(s)||(s=""),r=i(r),s=i(s),null===r||null===s)continue;o.push(r+"="+s)}return o.length?t+o.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,i={};t=n.exec(e);){var r=s(t[1]),o=s(t[2]);null===r||null===o||r in i||(i[r]=o)}return i}},1020:(e,t,n)=>{"use strict";var s=n(1609),i=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var s,r={},u=null,c=null;for(s in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,s)&&!l.hasOwnProperty(s)&&(r[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===r[s]&&(r[s]=t[s]);return{$$typeof:i,type:e,key:u,ref:c,props:r,_owner:a.current}}t.Fragment=r,t.jsx=u,t.jsxs=u},4848:(e,t,n)=>{"use strict";e.exports=n(1020)},2063:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},6290:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DetailedError:()=>p,HttpStack:()=>B,Upload:()=>se,canStoreURLs:()=>A,defaultOptions:()=>ne,enableDebugLog:()=>f,isSupported:()=>ae});var s=n(8127),i=n(1160),r=n.n(i);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,s)}function s(){return l(e,arguments,d(this).constructor)}return s.prototype=Object.create(e.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),c(s,e)},a(e)}function l(e,t,n){return l=u()?Reflect.construct:function(e,t,n){var s=[null];s.push.apply(s,t);var i=new(Function.bind.apply(e,s));return n&&c(i,n.prototype),i},l.apply(null,arguments)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}const p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)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}}),t&&c(e,t)}(i,e);var t,n,s=(t=i,n=u(),function(){var e,s=d(t);if(n){var i=d(this).constructor;e=Reflect.construct(s,arguments,i)}else e=s.apply(this,arguments);return function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=s.call(this,e)).originalRequest=r,t.originalResponse=o,t.causingError=n,null!=n&&(e+=", caused by ".concat(n.toString())),null!=r){var a=r.getHeader("X-Request-ID")||"n/a",l=r.getMethod(),u=r.getURL(),c=o?o.getStatus():"n/a",d=o?o.getBody()||"":"n/a";e+=", originated from request (method: ".concat(l,", url: ").concat(u,", response code: ").concat(c,", response text: ").concat(d,", request id: ").concat(a,")")}return t.message=e,t}return i}(a(Error));var h=!1;function f(){h=!0}function m(e){h&&console.log(e)}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}var w=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"resume"in n&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=n,this.options.chunkSize=+this.options.chunkSize,this._urlStorage=this.options.urlStorage,this.file=t,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}var t,n,s;return t=e,n=[{key:"findPreviousUploads",value:function(){var e=this;return this.options.fingerprint(this.file,this.options).then((function(t){return e._urlStorage.findUploadsByFingerprint(t)}))}},{key:"resumeFromPreviousUpload",value:function(e){this.url=e.uploadUrl||null,this._parallelUploadUrls=e.parallelUploadUrls||null,this._urlStorageKey=e.urlStorageKey}},{key:"start",value:function(){var e=this,t=this.file;if(t)if(this.options.endpoint||this.options.uploadUrl){var n=this.options.retryDelays;null==n||"[object Array]"===Object.prototype.toString.call(n)?(this.options.parallelUploads>1&&["uploadUrl","uploadSize","uploadLengthDeferred"].forEach((function(t){e.options[t]&&e._emitError(new Error("tus: cannot use the ".concat(t," option when parallelUploads is enabled")))})),this.options.fingerprint(t,this.options).then((function(n){return m(null==n?"No fingerprint was calculated meaning that the upload cannot be stored in the URL storage.":"Calculated fingerprint: ".concat(n)),e._fingerprint=n,e._source?e._source:e.options.fileReader.openFile(t,e.options.chunkSize)})).then((function(t){e._source=t,e.options.parallelUploads>1||null!=e._parallelUploadUrls?e._startParallelUpload():e._startSingleUpload()})).catch((function(t){e._emitError(t)}))):this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"))}else this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));else this._emitError(new Error("tus: no file or stream to upload provided"))}},{key:"_startParallelUpload",value:function(){var t=this,n=this._size=this._source.size,s=0;this._parallelUploads=[];var i=null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads,r=function(e,t,n){for(var s=Math.floor(e/t),i=[],r=0;r<t;r++)i.push({start:s*r,end:s*(r+1)});return i[t-1].end=e,n&&i.forEach((function(e,t){e.uploadUrl=n[t]||null})),i}(this._source.size,i,this._parallelUploadUrls);this._parallelUploadUrls=new Array(r.length);var o,a=r.map((function(i,o){var a=0;return t._source.slice(i.start,i.end).then((function(l){var u=l.value;return new Promise((function(l,c){var d=y(y({},t.options),{},{uploadUrl:i.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,metadata:{},headers:y(y({},t.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:l,onError:c,onProgress:function(e){s=s-a+e,a=e,t._emitProgress(s,n)},_onUploadUrlAvailable:function(){t._parallelUploadUrls[o]=p.url,t._parallelUploadUrls.filter((function(e){return!!e})).length===r.length&&t._saveUploadInUrlStorage()}}),p=new e(u,d);p.start(),t._parallelUploads.push(p)}))}))}));Promise.all(a).then((function(){(o=t._openRequest("POST",t.options.endpoint)).setHeader("Upload-Concat","final;".concat(t._parallelUploadUrls.join(" ")));var e=E(t.options.metadata);return""!==e&&o.setHeader("Upload-Metadata",e),t._sendRequest(o,null)})).then((function(e){if(_(e.getStatus(),200)){var n=e.getHeader("Location");null!=n?(t.url=S(t.options.endpoint,n),m("Created upload at ".concat(t.url)),t._emitSuccess()):t._emitHttpError(o,e,"tus: invalid or missing Location header")}else t._emitHttpError(o,e,"tus: unexpected response while creating upload")})).catch((function(e){t._emitError(e)}))}},{key:"_startSingleUpload",value:function(){if(this.options.uploadLengthDeferred)this._size=null;else if(null!=this.options.uploadSize){if(this._size=+this.options.uploadSize,isNaN(this._size))return void this._emitError(new Error("tus: cannot convert `uploadSize` option into a number"))}else if(this._size=this._source.size,null==this._size)return void this._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));return this._aborted=!1,null!=this.url?(m("Resuming upload from previous URL: ".concat(this.url)),void this._resumeUpload()):null!=this.options.uploadUrl?(m("Resuming upload from provided URL: ".concat(this.options.uploadUrl)),this.url=this.options.uploadUrl,void this._resumeUpload()):(m("Creating a new upload"),void this._createUpload())}},{key:"abort",value:function(t){var n=this;if(arguments.length>1&&"function"==typeof arguments[1])throw new Error("tus: the abort function does not accept a callback since v2 anymore; please use the returned Promise instead");return null!=this._parallelUploads&&this._parallelUploads.forEach((function(e){e.abort(t)})),null!==this._req&&(this._req.abort(),this._source.close()),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),t&&null!=this.url?e.terminate(this.url,this.options).then((function(){return n._removeFromUrlStorage()})):Promise.resolve()}},{key:"_emitHttpError",value:function(e,t,n,s){this._emitError(new p(n,s,e,t))}},{key:"_emitError",value:function(e){var t=this;if(!this._aborted){if(null!=this.options.retryDelays&&(null!=this._offset&&this._offset>this._offsetBeforeRetry&&(this._retryAttempt=0),C(e,this._retryAttempt,this.options))){var n=this.options.retryDelays[this._retryAttempt++];return this._offsetBeforeRetry=this._offset,void(this._retryTimeout=setTimeout((function(){t.start()}),n))}if("function"!=typeof this.options.onError)throw e;this.options.onError(e)}}},{key:"_emitSuccess",value:function(){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),"function"==typeof this.options.onSuccess&&this.options.onSuccess()}},{key:"_emitProgress",value:function(e,t){"function"==typeof this.options.onProgress&&this.options.onProgress(e,t)}},{key:"_emitChunkComplete",value:function(e,t,n){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(e,t,n)}},{key:"_createUpload",value:function(){var e=this;if(this.options.endpoint){var t=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?t.setHeader("Upload-Defer-Length",1):t.setHeader("Upload-Length",this._size);var n,s=E(this.options.metadata);""!==s&&t.setHeader("Upload-Metadata",s),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,n=this._addChunkToRequest(t)):n=this._sendRequest(t,null),n.then((function(n){if(_(n.getStatus(),200)){var s=n.getHeader("Location");if(null!=s){if(e.url=S(e.options.endpoint,s),m("Created upload at ".concat(e.url)),"function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),0===e._size)return e._emitSuccess(),void e._source.close();e._saveUploadInUrlStorage(),e.options.uploadDataDuringCreation?e._handleUploadResponse(t,n):(e._offset=0,e._performUpload())}else e._emitHttpError(t,n,"tus: invalid or missing Location header")}else e._emitHttpError(t,n,"tus: unexpected response while creating upload")})).catch((function(n){e._emitHttpError(t,null,"tus: failed to create upload",n)}))}else this._emitError(new Error("tus: unable to create upload because no endpoint is provided"))}},{key:"_resumeUpload",value:function(){var e=this,t=this._openRequest("HEAD",this.url);this._sendRequest(t,null).then((function(n){var s=n.getStatus();if(!_(s,200))return _(s,400)&&e._removeFromUrlStorage(),423===s?void e._emitHttpError(t,n,"tus: upload is currently locked; retry later"):e.options.endpoint?(e.url=null,void e._createUpload()):void e._emitHttpError(t,n,"tus: unable to resume upload (new upload cannot be created without an endpoint)");var i=parseInt(n.getHeader("Upload-Offset"),10);if(isNaN(i))e._emitHttpError(t,n,"tus: invalid or missing offset value");else{var r=parseInt(n.getHeader("Upload-Length"),10);if(!isNaN(r)||e.options.uploadLengthDeferred){if("function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),i===r)return e._emitProgress(r,r),void e._emitSuccess();e._offset=i,e._performUpload()}else e._emitHttpError(t,n,"tus: invalid or missing length value")}})).catch((function(n){e._emitHttpError(t,null,"tus: failed to resume upload",n)}))}},{key:"_performUpload",value:function(){var e,t=this;this._aborted||(this.options.overridePatchMethod?(e=this._openRequest("POST",this.url)).setHeader("X-HTTP-Method-Override","PATCH"):e=this._openRequest("PATCH",this.url),e.setHeader("Upload-Offset",this._offset),this._addChunkToRequest(e).then((function(n){_(n.getStatus(),200)?t._handleUploadResponse(e,n):t._emitHttpError(e,n,"tus: unexpected response while uploading chunk")})).catch((function(n){t._aborted||t._emitHttpError(e,null,"tus: failed to upload chunk at offset ".concat(t._offset),n)})))}},{key:"_addChunkToRequest",value:function(e){var t=this,n=this._offset,s=this._offset+this.options.chunkSize;return e.setProgressHandler((function(e){t._emitProgress(n+e,t._size)})),e.setHeader("Content-Type","application/offset+octet-stream"),(s===1/0||s>this._size)&&!this.options.uploadLengthDeferred&&(s=this._size),this._source.slice(n,s).then((function(n){var s=n.value,i=n.done;return t.options.uploadLengthDeferred&&i&&(t._size=t._offset+(s&&s.size?s.size:0),e.setHeader("Upload-Length",t._size)),null===s?t._sendRequest(e):(t._emitProgress(t._offset,t._size),t._sendRequest(e,s))}))}},{key:"_handleUploadResponse",value:function(e,t){var n=parseInt(t.getHeader("Upload-Offset"),10);if(isNaN(n))this._emitHttpError(e,t,"tus: invalid or missing offset value");else{if(this._emitProgress(n,this._size),this._emitChunkComplete(n-this._offset,n,this._size),this._offset=n,n==this._size)return this._emitSuccess(),void this._source.close();this._performUpload()}}},{key:"_openRequest",value:function(e,t){var n=x(e,t,this.options);return this._req=n,n}},{key:"_removeFromUrlStorage",value:function(){var e=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch((function(t){e._emitError(t)})),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var e=this;if(this.options.storeFingerprintForResuming&&this._fingerprint){var t={size:this._size,metadata:this.options.metadata,creationTime:(new Date).toString()};this._parallelUploads?t.parallelUploadUrls=this._parallelUploadUrls:t.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,t).then((function(t){return e._urlStorageKey=t})).catch((function(t){e._emitError(t)}))}}},{key:"_sendRequest",value:function(e){return P(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,this.options)}}],s=[{key:"terminate",value:function(t,n){if(arguments.length>1&&"function"==typeof arguments[arguments.length-1])throw new Error("tus: the terminate function does not accept a callback since v2 anymore; please use the returned Promise instead");void 0===n&&(n={});var s=x("DELETE",t,n);return P(s,null,n).then((function(e){if(204!==e.getStatus())throw new p("tus: unexpected response while terminating upload",null,s,e)})).catch((function(i){if(i instanceof p||(i=new p("tus: failed to terminate upload",i,s,null)),!C(i,0,n))throw i;var r=n.retryDelays[0],o=n.retryDelays.slice(1),a=y(y({},n),{},{retryDelays:o});return new Promise((function(e){return setTimeout(e,r)})).then((function(){return e.terminate(t,a)}))}))}}],n&&b(t.prototype,n),s&&b(t,s),e}();function E(e){var t=[];for(var n in e)t.push("".concat(n," ").concat(s.Base64.encode(e[n])));return t.join(",")}function _(e,t){return e>=t&&e<t+100}function x(e,t,n){var s=n.httpStack.createRequest(e,t);s.setHeader("Tus-Resumable","1.0.0");var i=n.headers||{};for(var r in i)s.setHeader(r,i[r]);if(n.addRequestId){var o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}));s.setHeader("X-Request-ID",o)}return s}function P(e,t,n){return("function"==typeof n.onBeforeRequest?Promise.resolve(n.onBeforeRequest(e)):Promise.resolve()).then((function(){return e.send(t).then((function(t){return("function"==typeof n.onAfterResponse?Promise.resolve(n.onAfterResponse(e,t)):Promise.resolve()).then((function(){return t}))}))}))}function C(e,t,n){if(null==n.retryDelays||t>=n.retryDelays.length||null==e.originalRequest)return!1;if(n&&"function"==typeof n.onShouldRetry)return n.onShouldRetry(e,t,n);var s,i=e.originalResponse?e.originalResponse.getStatus():0;return(!_(i,400)||409===i||423===i)&&(s=!0,"undefined"!=typeof window&&"navigator"in window&&!1===window.navigator.onLine&&(s=!1),s)}function S(e,t){return new(r())(t,e).toString()}w.defaultOptions={endpoint:null,uploadUrl:null,metadata:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,_onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:null,chunkSize:1/0,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null};const O=w;function k(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}var F=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,(n=[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(e){return Promise.resolve([])}},{key:"removeUpload",value:function(e){return Promise.resolve()}},{key:"addUpload",value:function(e,t){return Promise.resolve(null)}}])&&k(t.prototype,n),e}();function N(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}var U=!1;try{U="localStorage"in window;var T="tusSupport";localStorage.setItem(T,localStorage.getItem(T))}catch(e){if(e.code!==e.SECURITY_ERR&&e.code!==e.QUOTA_EXCEEDED_ERR)throw e;U=!1}var A=U,R=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"findAllUploads",value:function(){var e=this._findEntries("tus::");return Promise.resolve(e)}},{key:"findUploadsByFingerprint",value:function(e){var t=this._findEntries("tus::".concat(e,"::"));return Promise.resolve(t)}},{key:"removeUpload",value:function(e){return localStorage.removeItem(e),Promise.resolve()}},{key:"addUpload",value:function(e,t){var n=Math.round(1e12*Math.random()),s="tus::".concat(e,"::").concat(n);return localStorage.setItem(s,JSON.stringify(t)),Promise.resolve(s)}},{key:"_findEntries",value:function(e){for(var t=[],n=0;n<localStorage.length;n++){var s=localStorage.key(n);if(0===s.indexOf(e))try{var i=JSON.parse(localStorage.getItem(s));i.urlStorageKey=s,t.push(i)}catch(e){}}return t}}],n&&N(t.prototype,n),e}();function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function j(e,t,n){return t&&I(e.prototype,t),n&&I(e,n),e}var B=function(){function e(){D(this,e)}return j(e,[{key:"createRequest",value:function(e,t){return new M(e,t)}},{key:"getName",value:function(){return"XHRHttpStack"}}]),e}(),M=function(){function e(t,n){D(this,e),this._xhr=new XMLHttpRequest,this._xhr.open(t,n,!0),this._method=t,this._url=n,this._headers={}}return j(e,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(e,t){this._xhr.setRequestHeader(e,t),this._headers[e]=t}},{key:"getHeader",value:function(e){return this._headers[e]}},{key:"setProgressHandler",value:function(e){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(t){t.lengthComputable&&e(t.loaded)})}},{key:"send",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise((function(n,s){e._xhr.onload=function(){n(new L(e._xhr))},e._xhr.onerror=function(e){s(e)},e._xhr.send(t)}))}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}(),L=function(){function e(t){D(this,e),this._xhr=t}return j(e,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(e){return this._xhr.getResponseHeader(e)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}();const $=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()};function z(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}var H=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._file=t,this.size=t.size}var t,n;return t=e,(n=[{key:"slice",value:function(e,t){if("undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova))return n=this._file.slice(e,t),new Promise((function(e,t){var s=new FileReader;s.onload=function(){var t=new Uint8Array(s.result);e({value:t})},s.onerror=function(e){t(e)},s.readAsArrayBuffer(n)}));var n,s=this._file.slice(e,t);return Promise.resolve({value:s})}},{key:"close",value:function(){}}])&&z(t.prototype,n),e}();function q(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function V(e){return void 0===e?0:void 0!==e.size?e.size:e.length}var W=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._chunkSize=n,this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1}var t,n;return t=e,(n=[{key:"slice",value:function(e,t){return e<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(e,t)}},{key:"_readUntilEnoughDataOrDone",value:function(e,t){var n=this,s=t<=this._bufferOffset+V(this._buffer);if(this._done||s){var i=this._getDataFromBuffer(e,t),r=null==i&&this._done;return Promise.resolve({value:i,done:r})}return this._reader.read().then((function(s){var i=s.value;return s.done?n._done=!0:void 0===n._buffer?n._buffer=i:n._buffer=function(e,t){if(e.concat)return e.concat(t);if(e instanceof Blob)return new Blob([e,t],{type:e.type});if(e.set){var n=new e.constructor(e.length+t.length);return n.set(e),n.set(t,e.length),n}throw new Error("Unknown data type")}(n._buffer,i),n._readUntilEnoughDataOrDone(e,t)}))}},{key:"_getDataFromBuffer",value:function(e,t){e>this._bufferOffset&&(this._buffer=this._buffer.slice(e-this._bufferOffset),this._bufferOffset=e);var n=0===V(this._buffer);return this._done&&n?null:this._buffer.slice(0,t-e)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}])&&q(t.prototype,n),e}();function K(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}var G=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,(n=[{key:"openFile",value:function(e,t){return $()&&e&&void 0!==e.uri?(n=e.uri,new Promise((function(e,t){var s=new XMLHttpRequest;s.responseType="blob",s.onload=function(){var t=s.response;e(t)},s.onerror=function(e){t(e)},s.open("GET",n),s.send()}))).then((function(e){return new H(e)})).catch((function(e){throw new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(e))})):"function"==typeof e.slice&&void 0!==e.size?Promise.resolve(new H(e)):"function"==typeof e.read?(t=+t,isFinite(t)?Promise.resolve(new W(e,t)):Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option"))):Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment"));var n}}])&&K(t.prototype,n),e}();function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function Z(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function Y(e,t){return Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Y(e,t)}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ne=ee(ee({},O.defaultOptions),{},{httpStack:new B,fileReader:new G,urlStorage:A?new R:new F,fingerprint:function(e,t){return $()?Promise.resolve(function(e,t){var n=e.exif?function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}(JSON.stringify(e.exif)):"noexif";return["tus-rn",e.name||"noname",e.size||"nosize",n,t.endpoint].join("/")}(e,t)):Promise.resolve(["tus-br",e.name,e.type,e.size,e.lastModified,t.endpoint].join("-"))}}),se=function(e){!function(e,t){if("function"!=typeof t&&null!==t)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}}),t&&Y(e,t)}(o,e);var t,n,s,i,r=(s=o,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Q(s);if(i){var n=Q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==X(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=ee(ee({},ne),t),r.call(this,e,t)}return t=o,n=[{key:"terminate",value:function(e,t,n){return t=ee(ee({},ne),t),O.terminate(e,t,n)}}],null&&Z(t.prototype,null),n&&Z(t,n),o}(O),ie=window,re=ie.XMLHttpRequest,oe=ie.Blob,ae=re&&oe&&"function"==typeof oe.prototype.slice},1160:(e,t,n)=>{"use strict";var s=n(2063),i=n(3992),r=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,c=/^[a-zA-Z]:/;function d(e){return(e||"").toString().replace(r,"")}var p=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function f(e){var t,s=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},i={},r=typeof(e=e||s);if("blob:"===e.protocol)i=new y(unescape(e.pathname),{});else if("string"===r)for(t in i=new y(e,{}),h)delete i[t];else if("object"===r){for(t in e)t in h||(i[t]=e[t]);void 0===i.slashes&&(i.slashes=a.test(e.href))}return i}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function g(e,t){e=(e=d(e)).replace(o,""),t=t||{};var n,s=u.exec(e),i=s[1]?s[1].toLowerCase():"",r=!!s[2],a=!!s[3],l=0;return r?a?(n=s[2]+s[3]+s[4],l=s[2].length+s[3].length):(n=s[2]+s[4],l=s[2].length):a?(n=s[3]+s[4],l=s[3].length):n=s[4],"file:"===i?l>=2&&(n=n.slice(2)):m(i)?n=s[4]:i?r&&(n=n.slice(2)):l>=2&&m(t.protocol)&&(n=s[4]),{protocol:i,slashes:r||m(i),slashesCount:l,rest:n}}function y(e,t,n){if(e=(e=d(e)).replace(o,""),!(this instanceof y))return new y(e,t,n);var r,a,l,u,h,v,b=p.slice(),w=typeof t,E=this,_=0;for("object"!==w&&"string"!==w&&(n=t,t=null),n&&"function"!=typeof n&&(n=i.parse),r=!(a=g(e||"",t=f(t))).protocol&&!a.slashes,E.slashes=a.slashes||r&&t.slashes,E.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||c.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!m(E.protocol)))&&(b[3]=[/(.*)/,"pathname"]);_<b.length;_++)"function"!=typeof(u=b[_])?(l=u[0],v=u[1],l!=l?E[v]=e:"string"==typeof l?~(h="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof u[2]?(E[v]=e.slice(0,h),e=e.slice(h+u[2])):(E[v]=e.slice(h),e=e.slice(0,h))):(h=l.exec(e))&&(E[v]=h[1],e=e.slice(0,h.index)),E[v]=E[v]||r&&u[3]&&t[v]||"",u[4]&&(E[v]=E[v].toLowerCase())):e=u(e,E);n&&(E.query=n(E.query)),r&&t.slashes&&"/"!==E.pathname.charAt(0)&&(""!==E.pathname||""!==t.pathname)&&(E.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),s=n.length,i=n[s-1],r=!1,o=0;s--;)"."===n[s]?n.splice(s,1):".."===n[s]?(n.splice(s,1),o++):o&&(0===s&&(r=!0),n.splice(s,1),o--);return r&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(E.pathname,t.pathname)),"/"!==E.pathname.charAt(0)&&m(E.protocol)&&(E.pathname="/"+E.pathname),s(E.port,E.protocol)||(E.host=E.hostname,E.port=""),E.username=E.password="",E.auth&&(~(h=E.auth.indexOf(":"))?(E.username=E.auth.slice(0,h),E.username=encodeURIComponent(decodeURIComponent(E.username)),E.password=E.auth.slice(h+1),E.password=encodeURIComponent(decodeURIComponent(E.password))):E.username=encodeURIComponent(decodeURIComponent(E.auth)),E.auth=E.password?E.username+":"+E.password:E.username),E.origin="file:"!==E.protocol&&m(E.protocol)&&E.host?E.protocol+"//"+E.host:"null",E.href=E.toString()}y.prototype={set:function(e,t,n){var r=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||i.parse)(t)),r[e]=t;break;case"port":r[e]=t,s(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[e]="");break;case"hostname":r[e]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[e]=t,l.test(t)?(t=t.split(":"),r.port=t.pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(t){var o="pathname"===e?"/":"#";r[e]=t.charAt(0)!==o?o+t:t}else r[e]=t;break;case"username":case"password":r[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(r.username=t.slice(0,a),r.username=encodeURIComponent(decodeURIComponent(r.username)),r.password=t.slice(a+1),r.password=encodeURIComponent(decodeURIComponent(r.password))):r.username=encodeURIComponent(decodeURIComponent(t))}for(var u=0;u<p.length;u++){var c=p[u];c[4]&&(r[c[1]]=r[c[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin="file:"!==r.protocol&&m(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r},toString:function(e){e&&"function"==typeof e||(e=i.stringify);var t,n=this,s=n.host,r=n.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var o=r+(n.protocol&&n.slashes||m(n.protocol)?"//":"");return n.username?(o+=n.username,n.password&&(o+=":"+n.password),o+="@"):n.password?(o+=":"+n.password,o+="@"):"file:"!==n.protocol&&m(n.protocol)&&!s&&"/"!==n.pathname&&(o+="@"),(":"===s[s.length-1]||l.test(n.hostname)&&!n.port)&&(s+=":"),o+=s+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(o+=n.hash),o}},y.extractProtocol=g,y.location=f,y.trimLeft=d,y.qs=i,e.exports=y},9771:e=>{"use strict";e.exports=function(){}},7163:e=>{"use strict";function t(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}t.prototype.match=function(e){var t,n,s=!0,i=this.parts,r=i.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;s&&t<r;t++)"*"!==i[t]&&(s=t<n.length&&i[t]===n[t]);s=s&&n}else s=!1;else if("function"==typeof e.splice)for(s=[],t=e.length;t--;)this.match(e[t])&&(s[s.length]=e[t]);else if("object"==typeof e)for(var o in s={},e)this.match(o)&&(s[o]=e[o]);return s},e.exports=function(e,n,s){var i=new t(e,s||/[\/\.]/);return void 0!==n?i.match(n):i}},1609:e=>{"use strict";e.exports=window.React},6427:e=>{"use strict";e.exports=window.wp.components},6087:e=>{"use strict";e.exports=window.wp.element},859:e=>{"use strict";class t extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}e.exports=t},3698:(e,t,n)=>{"use strict";var s=n(9061);const i=n(833);e.exports=class extends i{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then((e=>{let[t,n]=e;const s={};return n&&(s["uppy-auth-token"]=n),this.companionKeysParams&&(s["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...t,...s}}))}onReceiveResponse(e){e=super.onReceiveResponse(e);const t=this.uppy.getPlugin(this.pluginId),n=t.getPluginState().authenticated?401!==e.status:e.status<400;return t.setPluginState({authenticated:n}),e}setAuthToken(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(e){void 0===e&&(e={});const t=new URLSearchParams(e);return this.preAuthToken&&t.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${t}`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const e=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=e.token}catch(e){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,"warning")}}list(e){return this.get(`${this.id}/list/${e||""}`)}logout(){return this.get(`${this.id}/logout`).then((e=>Promise.all([e,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)]))).then((e=>{let[t]=e;return t}))}static initPlugin(e,t,n){if(e.type="acquirer",e.files=[],n&&(e.opts={...n,...t}),t.serverUrl||t.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(t.companionAllowedHosts){const n=t.companionAllowedHosts;if(!("string"==typeof n||Array.isArray(n)||n instanceof RegExp))throw new TypeError(`${e.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);e.opts.companionAllowedHosts=n}else/^(?!https?:\/\/).*$/i.test(t.companionUrl)?e.opts.companionAllowedHosts=`https://${t.companionUrl.replace(/^\/\//,"")}`:e.opts.companionAllowedHosts=new URL(t.companionUrl).origin;e.storage=e.opts.storage||s}}},833:(e,t,n)=>{"use strict";let s;function i(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var r=0;function o(e){return"__private_"+r+++"_"+e}const a=n(9214),l=n(3461),u=n(859);async function c(e){if(401===e.status)throw new u;const t=e.json();if(e.status<200||e.status>300){let n=`Failed request with status: ${e.status}. ${e.statusText}`;try{const e=await t;n=e.message?`${n} message: ${e.message}`:n,n=e.requestId?`${n} request-Id: ${e.requestId}`:n}finally{throw new Error(n)}}return t}var d=o("companionHeaders"),p=o("getPostResponseFunc"),h=o("getUrl"),f=o("errorHandler");s=Symbol.for("uppy test: getCompanionHeaders");class m{constructor(e,t){Object.defineProperty(this,f,{value:y}),Object.defineProperty(this,h,{value:g}),Object.defineProperty(this,d,{writable:!0,value:void 0}),Object.defineProperty(this,p,{writable:!0,value:e=>t=>e?t:this.onReceiveResponse(t)}),this.uppy=e,this.opts=t,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,i(this,d)[d]=null==t?void 0:t.companionHeaders}setCompanionHeaders(e){i(this,d)[d]=e}[s](){return i(this,d)[d]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}headers(){return Promise.resolve({...m.defaultHeaders,...i(this,d)[d]})}onReceiveResponse(e){const t=this.uppy.getState().companion||{},n=this.opts.companionUrl,{headers:s}=e;return s.has("i-am")&&s.get("i-am")!==t[n]&&this.uppy.setState({companion:{...t,[n]:s.get("i-am")}}),e}preflight(e){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(i(this,h)[h](e),{method:"OPTIONS"}).then((e=>(e.headers.has("access-control-allow-headers")&&(this.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map((e=>e.trim().toLowerCase()))),this.preflightDone=!0,this.allowedHeaders.slice()))).catch((e=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${e}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice())))}preflightAndHeaders(e){return Promise.all([this.preflight(e),this.headers()]).then((e=>{let[t,n]=e;return Object.keys(n).forEach((e=>{t.includes(e.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${e}`),delete n[e])})),n}))}get(e,t){return this.preflightAndHeaders(e).then((t=>a(i(this,h)[h](e),{method:"get",headers:t,credentials:this.opts.companionCookiesRule||"same-origin"}))).then(i(this,p)[p](t)).then(c).catch(i(this,f)[f]("get",e))}post(e,t,n){const s="post";return this.preflightAndHeaders(e).then((n=>a(i(this,h)[h](e),{method:s,headers:n,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(t)}))).then(i(this,p)[p](n)).then(c).catch(i(this,f)[f](s,e))}delete(e,t,n){const s="delete";return this.preflightAndHeaders(e).then((n=>a(`${this.hostname}/${e}`,{method:s,headers:n,credentials:this.opts.companionCookiesRule||"same-origin",body:t?JSON.stringify(t):null}))).then(i(this,p)[p](n)).then(c).catch(i(this,f)[f](s,e))}}function g(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function y(e,t){return n=>{var s;return null!=(s=n)&&s.isAuthError||(n=new l(`Could not ${e} ${i(this,h)[h](t)}`,{cause:n})),Promise.reject(n)}}m.VERSION="2.2.2",m.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${m.VERSION}`},e.exports=m},1878:(e,t,n)=>{"use strict";const s=n(833);e.exports=class extends s{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId}fileUrl(e){return`${this.hostname}/search/${this.id}/get/${e}`}search(e,t){return this.get(`search/${this.id}/list?q=${encodeURIComponent(e)}${t?`&${t}`:""}`)}}},8822:(e,t,n)=>{"use strict";let s,i;function r(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var o=0;function a(e){return"__private_"+o+++"_"+e}const l=n(3835);var u=a("queued"),c=a("emitter"),d=a("isOpen"),p=a("socket"),h=a("handleMessage");s=Symbol.for("uppy test: getSocket"),i=Symbol.for("uppy test: getQueued"),e.exports=class{constructor(e){Object.defineProperty(this,u,{writable:!0,value:[]}),Object.defineProperty(this,c,{writable:!0,value:l()}),Object.defineProperty(this,d,{writable:!0,value:!1}),Object.defineProperty(this,p,{writable:!0,value:void 0}),Object.defineProperty(this,h,{writable:!0,value:e=>{try{const t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(e){console.log(e)}}}),this.opts=e,e&&!1===e.autoOpen||this.open()}get isOpen(){return r(this,d)[d]}[s](){return r(this,p)[p]}[i](){return r(this,u)[u]}open(){r(this,p)[p]=new WebSocket(this.opts.target),r(this,p)[p].onopen=()=>{for(r(this,d)[d]=!0;r(this,u)[u].length>0&&r(this,d)[d];){const e=r(this,u)[u].shift();this.send(e.action,e.payload)}},r(this,p)[p].onclose=()=>{r(this,d)[d]=!1},r(this,p)[p].onmessage=r(this,h)[h]}close(){var e;null==(e=r(this,p)[p])||e.close()}send(e,t){r(this,d)[d]?r(this,p)[p].send(JSON.stringify({action:e,payload:t})):r(this,u)[u].push({action:e,payload:t})}on(e,t){r(this,c)[c].on(e,t)}emit(e,t){r(this,c)[c].emit(e,t)}once(e,t){r(this,c)[c].once(e,t)}}},8327:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=t.SearchProvider=t.RequestClient=t.Provider=void 0;const s=n(833);t.RequestClient=s;const i=n(3698);t.Provider=i;const r=n(1878);t.SearchProvider=r;const o=n(8822);t.Socket=o},9061:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getItem=function(e){return Promise.resolve(localStorage.getItem(e))},t.removeItem=function(e){return new Promise((t=>{localStorage.removeItem(e),t()}))},t.setItem=function(e,t){return new Promise((n=>{localStorage.setItem(e,t),n()}))}},2522:(e,t,n)=>{"use strict";const s=n(6458);e.exports=class{constructor(e,t){void 0===t&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){const e=new s([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}}},7839:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=t.RestrictionError=t.Restricter=void 0;const s=n(8236),i=n(7057);t.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class r extends Error{constructor(){super(...arguments),this.isRestriction=!0}}t.RestrictionError=r,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}}),t.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(e,t){const{maxFileSize:n,minFileSize:o,maxTotalFileSize:a,maxNumberOfFiles:l,allowedFileTypes:u}=this.getOpts().restrictions;if(l&&t.filter((e=>!e.isGhost)).length+1>l)throw new r(`${this.i18n("youCanOnlyUploadX",{smart_count:l})}`);if(u&&!u.some((t=>t.includes("/")?!!e.type&&i(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.slice(1).toLowerCase()))){const e=u.join(", ");throw new r(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}if(a&&null!=e.size&&t.reduce(((e,t)=>e+t.size),e.size)>a)throw new r(this.i18n("exceedsSize",{size:s(a),file:e.name}));if(n&&null!=e.size&&e.size>n)throw new r(this.i18n("exceedsSize",{size:s(n),file:e.name}));if(o&&null!=e.size&&e.size<o)throw new r(this.i18n("inferiorSize",{size:s(o)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new r(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new r(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:n}=this.getOpts().restrictions,s=Object.prototype.hasOwnProperty,i=[];for(const t of n)s.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}}},1193:(e,t,n)=>{"use strict";var s=n(172);function i(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var r=0;function o(e){return"__private_"+r+++"_"+e}const a=n(515),l=n(8200),u=n(2522);var c=o("updateUI");class d extends u{constructor(){super(...arguments),Object.defineProperty(this,c,{writable:!0,value:void 0})}mount(e,t){const n=t.id,r=a(e);if(r){this.isTargetDOMEl=!0;const t=document.createElement("div");return t.classList.add("uppy-Root"),i(this,c)[c]=function(e){let t=null,n=null;return function(){for(var s=arguments.length,i=new Array(s),r=0;r<s;r++)i[r]=arguments[r];return n=i,t||(t=Promise.resolve().then((()=>(t=null,e(...n))))),t}}((e=>{this.uppy.getPlugin(this.id)&&((0,s.render)(this.render(e),t),this.afterUpdate())})),this.uppy.log(`Installing ${n} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(r.innerHTML=""),(0,s.render)(this.render(this.uppy.getState()),t),this.el=t,r.appendChild(t),t.dir=this.opts.direction||l(t)||"ltr",this.onMount(),this.el}let o;if("object"==typeof e&&e instanceof d)o=e;else if("function"==typeof e){const t=e;this.uppy.iteratePlugins((e=>{e instanceof t&&(o=e)}))}if(o)return this.uppy.log(`Installing ${n} to ${o.id}`),this.parent=o,this.el=o.addTarget(t),this.onMount(),this.el;this.uppy.log(`Not installing ${n}`);let u=`Invalid target option given to ${n}.`;throw u+="function"==typeof e?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(u)}update(e){var t,n;null!=this.el&&(null==(t=(n=i(this,c))[c])||t.call(n,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove()),this.onUnmount()}onMount(){}onUnmount(){}}e.exports=d},8034:(e,t,n)=>{"use strict";var s=n(5042),i=n(5223),r=n(7839);let o,a;function l(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var u=0;function c(e){return"__private_"+u+++"_"+e}const d=n(6458),p=n(3835),h=n(5858),f=n(5446),m=n(7856),g=n(8545),y=n(6340),v=n(3158),b=n(2799),w=n(8966);var E=c("plugins"),_=c("restricter"),x=c("storeUnsubscribe"),P=c("emitter"),C=c("preProcessors"),S=c("uploaders"),O=c("postProcessors"),k=c("informAndEmit"),F=c("checkRequiredMetaFieldsOnFile"),N=c("checkRequiredMetaFields"),U=c("assertNewUploadAllowed"),T=c("checkAndCreateFileStateObject"),A=c("startIfAutoProceed"),R=c("addListeners"),D=c("updateOnlineStatus"),I=c("createUpload"),j=c("getUpload"),B=c("removeUpload"),M=c("runUpload");o=Symbol.for("uppy test: getPlugins"),a=Symbol.for("uppy test: createUpload");class L{constructor(e){Object.defineProperty(this,M,{value:Y}),Object.defineProperty(this,B,{value:Z}),Object.defineProperty(this,j,{value:X}),Object.defineProperty(this,I,{value:G}),Object.defineProperty(this,R,{value:K}),Object.defineProperty(this,A,{value:W}),Object.defineProperty(this,T,{value:V}),Object.defineProperty(this,U,{value:q}),Object.defineProperty(this,N,{value:H}),Object.defineProperty(this,F,{value:z}),Object.defineProperty(this,k,{value:$}),Object.defineProperty(this,E,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,_,{writable:!0,value:void 0}),Object.defineProperty(this,x,{writable:!0,value:void 0}),Object.defineProperty(this,P,{writable:!0,value:p()}),Object.defineProperty(this,C,{writable:!0,value:new Set}),Object.defineProperty(this,S,{writable:!0,value:new Set}),Object.defineProperty(this,O,{writable:!0,value:new Set}),Object.defineProperty(this,D,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=w;const t={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:r.defaultOptions,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:f(),logger:i.justErrorsLogger,infoTimeout:5e3};this.opts={...t,...e,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=i.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=h(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:v(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),l(this,_)[_]=new r.Restricter((()=>this.opts),this.i18n),l(this,x)[x]=this.store.subscribe(((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)})),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),l(this,R)[R]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];l(this,P)[P].emit(e,...n)}on(e,t){return l(this,P)[P].on(e,t),this}once(e,t){return l(this,P)[P].once(e,t),this}off(e,t){return l(this,P)[P].off(e,t),this}updateAll(e){this.iteratePlugins((t=>{t.update(e)}))}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new d([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins((e=>{e.setOptions()})),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach((s=>{const i={...t[s]};i.progress={...i.progress,...e},n[s]=i})),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){l(this,C)[C].add(e)}removePreProcessor(e){return l(this,C)[C].delete(e)}addPostProcessor(e){l(this,O)[O].add(e)}removePostProcessor(e){return l(this,O)[O].delete(e)}addUploader(e){l(this,S)[S].add(e)}removeUploader(e){return l(this,S)[S].delete(e)}setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach((t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}})),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const s={...n[e].meta,...t};n[e]={...n[e],meta:s},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),s=Object.values(e),i=s.filter((e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted})),r=s.filter((e=>!e.progress.uploadStarted)),o=s.filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess)),a=s.filter((e=>e.progress.uploadStarted)),l=s.filter((e=>e.isPaused)),u=s.filter((e=>e.progress.uploadComplete)),c=s.filter((e=>e.error)),d=i.filter((e=>!e.isPaused)),p=s.filter((e=>e.progress.preprocess||e.progress.postprocess));return{newFiles:r,startedFiles:o,uploadStartedFiles:a,pausedFiles:l,completeFiles:u,erroredFiles:c,inProgressFiles:i,inProgressNotPausedFiles:d,processingFiles:p,isUploadStarted:a.length>0,isAllComplete:100===t&&u.length===s.length&&0===p.length,isAllErrored:!!n&&c.length===s.length,isAllPaused:0!==i.length&&l.length===i.length,isUploadInProgress:i.length>0,isSomeGhost:s.some((e=>e.isGhost))}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return l(this,_)[_].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){l(this,U)[U](e);const{files:t}=this.getState();let n=l(this,T)[T](t,e);return t[n.id]&&t[n.id].isGhost&&(n={...t[n.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...t,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),l(this,A)[A](),n.id}addFiles(e){l(this,U)[U]();const t={...this.getState().files},n=[],s=[];for(let i=0;i<e.length;i++)try{let s=l(this,T)[T](t,e[i]);t[s.id]&&t[s.id].isGhost&&(s={...t[s.id],data:e[i].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${s.name}, ${s.id}`)),t[s.id]=s,n.push(s)}catch(e){e.isRestriction||s.push(e)}if(this.setState({files:t}),n.forEach((e=>{this.emit("file-added",e)})),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach((e=>{this.log(`Added file: ${n[e].name}\n id: ${n[e].id}\n type: ${n[e].type}`)})),n.length>0&&l(this,A)[A](),s.length>0){let e="Multiple errors occurred while adding files:\n";if(s.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:s.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(s,e);{const t=new Error(e);throw t.errors=s,t}}}removeFiles(e,t){const{files:n,currentUploads:s}=this.getState(),i={...n},r={...s},o=Object.create(null);function a(e){return void 0===o[e]}e.forEach((e=>{n[e]&&(o[e]=n[e],delete i[e])})),Object.keys(r).forEach((e=>{const t=s[e].fileIDs.filter(a);if(0===t.length)return void delete r[e];const{capabilities:n}=this.getState();if(t.length!==s[e].fileIDs.length&&!n.individualCancellation)throw new Error("individualCancellation is disabled");r[e]={...s[e],fileIDs:t}}));const l={currentUploads:r,files:i};0===Object.keys(i).length&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const u=Object.keys(o);u.forEach((e=>{this.emit("file-removed",o[e],t)})),u.length>5?this.log(`Removed ${u.length} files`):this.log(`Removed files: ${u.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!0};e[t]=n})),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=l(this,I)[I](t,{forceAllowNewUpload:!0});return l(this,M)[M](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=l(this,I)[I]([e],{forceAllowNewUpload:!0});return l(this,M)[M](t)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins((e=>{e.provider&&e.provider.logout&&e.provider.logout()}))}calculateProgress(e,t){if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter((e=>null!=e.progress.bytesTotal)),n=e.filter((e=>null==e.progress.bytesTotal));if(0===t.length){const t=100*e.length,s=n.reduce(((e,t)=>e+t.progress.percentage),0),i=Math.round(s/t*100);return void this.setState({totalProgress:i})}let s=t.reduce(((e,t)=>e+t.progress.bytesTotal),0);const i=s/t.length;s+=i*n.length;let r=0;t.forEach((e=>{r+=e.progress.bytesUploaded})),n.forEach((e=>{r+=i*(e.progress.percentage||0)/100}));let o=0===s?0:Math.round(r/s*100);o>100&&(o=100),this.setState({totalProgress:o}),this.emit("progress",o)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e)throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`);const n=new e(this,t),s=n.id;if(!s)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const i=this.getPlugin(s);if(i){const e=`Already found a plugin named '${i.id}'. Tried to use: '${s}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${s} v${e.VERSION}`),n.type in l(this,E)[E]?l(this,E)[E][n.type].push(n):l(this,E)[E][n.type]=[n],n.install(),this}getPlugin(e){for(const t of Object.values(l(this,E)[E])){const n=t.find((t=>t.id===e));if(null!=n)return n}}[o](e){return l(this,E)[E][e]}iteratePlugins(e){Object.values(l(this,E)[E]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=l(this,E)[E][e.type],n=t.findIndex((t=>t.id===e.id));-1!==n&&t.splice(n,1);const s={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(s)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),l(this,x)[x](),this.iteratePlugins((e=>{this.removePlugin(e)})),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",l(this,D)[D]),window.removeEventListener("offline",l(this,D)[D]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const s="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:s?e.message:e,details:s?e.details:null}]}),setTimeout((()=>this.hideInfo()),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?l(this,M)[M](e):(l(this,B)[B](e),Promise.reject(new Error("Nonexistent upload")))}[a](){return l(this,I)[I](...arguments)}addResultData(e,t){if(!l(this,j)[j](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),s={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:s}})}upload(){var e;null!=(e=l(this,E)[E].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const n=this.opts.onBeforeUpload(t);return!1===n?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&"object"==typeof n&&(t=n,this.setState({files:t})),Promise.resolve().then((()=>l(this,_)[_].validateMinNumberOfFiles(t))).catch((e=>{throw l(this,k)[k](e),e})).then((()=>{if(!l(this,N)[N](t))throw new r.RestrictionError(this.i18n("missingRequiredMetaField"))})).catch((e=>{throw e})).then((()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap((e=>e.fileIDs)),s=[];Object.keys(t).forEach((e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||s.push(t.id)}));const i=l(this,I)[I](s);return l(this,M)[M](i)})).catch((e=>{throw this.emit("error",e),this.log(e,"error"),e})))}}function $(e,t){const{message:n,details:s=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:n,details:s},"error",this.opts.infoTimeout),this.log(`${n} ${s}`.trim(),"error")}function z(e){const{missingFields:t,error:n}=l(this,_)[_].getMissingRequiredMetaFields(e);return!(t.length>0&&(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(n.message),this.emit("restriction-failed",e,n),1))}function H(e){let t=!0;for(const n of Object.values(e))l(this,F)[F](n)||(t=!1);return t}function q(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new r.RestrictionError(this.i18n("noMoreFilesAllowed"));throw l(this,k)[k](t,e),t}}function V(e,t){const n=m(t),s=b(n,t),i=g(s).extension,o=Boolean(t.isRemote),a=y({...t,type:n});if(this.checkIfFileAlreadyExists(a)){const e=new r.RestrictionError(this.i18n("noDuplicates",{fileName:s}));throw l(this,k)[k](e,t),e}const u=t.meta||{};u.name=s,u.type=n;const c=Number.isFinite(t.data.size)?t.data.size:null;let d={source:t.source||"",id:a,name:s,extension:i||"",meta:{...this.getState().meta,...u},type:n,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isRemote:o,remote:t.remote||"",preview:t.preview};const p=this.opts.onBeforeFileAdded(d,e);if(!1===p){const e=new r.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof p&&null!==p&&(d=p);try{const t=Object.keys(e).map((t=>e[t]));l(this,_)[_].validate(d,t)}catch(e){throw l(this,k)[k](e,d),e}return d}function W(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((()=>{this.scheduledAutoProceed=null,this.upload().catch((e=>{e.isRestriction||this.log(e.stack||e.message||e)}))}),4))}function K(){const e=(e,t,n)=>{let s=e.message||"Unknown error";e.details&&(s+=` ${e.details}`),this.setState({error:s}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:s,response:n})};this.on("error",e),this.on("upload-error",((t,n,s)=>{if(e(n,t,s),"object"==typeof n&&n.message){const e=new Error(n.message);e.details=n.message,n.details&&(e.details+=` ${n.details}`),e.message=this.i18n("failedToUpload",{file:null==t?void 0:t.name}),l(this,k)[k](e)}else l(this,k)[k](n)})),this.on("upload",(()=>{this.setState({error:null})})),this.on("upload-started",(e=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("upload-progress",this.calculateProgress),this.on("upload-success",((e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:l(this,O)[O].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()})),this.on("preprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("preprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})})),this.on("postprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("postprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(e=>{e&&l(this,F)[F](e)})),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",l(this,D)[D]),window.addEventListener("offline",l(this,D)[D]),setTimeout(l(this,D)[D],3e3))}function G(e,t){void 0===t&&(t={});const{forceAllowNewUpload:n=!1}=t,{allowNewUpload:i,currentUploads:r}=this.getState();if(!i&&!n)throw new Error("Cannot create a new upload: already uploading.");const o=(0,s.nanoid)();return this.emit("upload",{id:o,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...r,[o]:{fileIDs:e,step:0,result:{}}}}),o}function X(e){const{currentUploads:t}=this.getState();return t[e]}function Z(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function Y(e){let{currentUploads:t}=this.getState(),n=t[e];const s=n.step||0,i=[...l(this,C)[C],...l(this,S)[S],...l(this,O)[O]];try{for(let r=s;r<i.length&&n;r++){const s=i[r],o={...n,step:r};this.setState({currentUploads:{...t,[e]:o}}),await s(o.fileIDs,e),t=this.getState().currentUploads,n=t[e]}}catch(t){throw l(this,B)[B](e),t}if(n){n.fileIDs.forEach((e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)}));const s=n.fileIDs.map((e=>this.getFile(e))),i=s.filter((e=>!e.error)),r=s.filter((e=>e.error));await this.addResultData(e,{successful:i,failed:r,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let r;return n&&(r=n.result,this.emit("complete",r),l(this,B)[B](e)),null==r&&this.log(`Not setting result for an upload that has been removed: ${e}`),r}L.VERSION="2.3.4",e.exports=L},2799:e=>{"use strict";e.exports=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}},3522:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return s.debugLogger}});var s=n(5223);e.exports=n(8034);const i=n(1193);t.UIPlugin=i;const r=n(2522);t.BasePlugin=r;const o=n(8034);t.Uppy=o;const a=n(1193),l=n(2522);o.Uppy=o,o.UIPlugin=a,o.BasePlugin=l,o.debugLogger=s.debugLogger},8966:e=>{"use strict";e.exports={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}}},5223:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.justErrorsLogger=t.debugLogger=void 0;const s=n(3792),i={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${s()}]`,...t)}};t.justErrorsLogger=i;const r={debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.debug(`[Uppy] [${s()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.warn(`[Uppy] [${s()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${s()}]`,...t)}};t.debugLogger=r},3158:e=>{"use strict";e.exports=function(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1];let[s,i]=n.split(".");return s=parseInt(s,10),i=parseInt(i,10),s<15||15===s&&i<15063||s>18||18===s&&i>=18218}},8955:(e,t,n)=>{"use strict";var s=n(172),i=n(3522),r=n(5042),o=n(4784);function a(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var l=0;function u(e){return"__private_"+l+++"_"+e}const c=n(5711),d=n(2927),p=n(5947),h=n(1167),f=n(3708),m=n(4920),g=n(1811),y=n(3860),v=n(2764),b=n(9148),w=n(7341),E=g.default||g;function _(){const e={};return e.promise=new Promise(((t,n)=>{e.resolve=t,e.reject=n})),e}function x(){return(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",width:"30",height:"30",viewBox:"0 0 30 30"},(0,s.h)("path",{d:"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z"}))}var P=u("openFileEditorWhenFilesAdded"),C=u("attachRenderFunctionToTarget"),S=u("isTargetSupported"),O=u("getAcquirers"),k=u("getProgressIndicators"),F=u("getEditors");class N extends i.UIPlugin{constructor(e,t){var n;super(e,t),n=this,this.removeTarget=e=>{const t=this.getPluginState().targets.filter((t=>t.id!==e.id));this.setPluginState({targets:t})},this.addTarget=e=>{const t=e.id||e.constructor.name,n=e.title||t,s=e.type;if("acquirer"!==s&&"progressindicator"!==s&&"editor"!==s){const e="Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor";return void this.uppy.log(e,"error")}const i={id:t,name:n,type:s},r=this.getPluginState().targets.slice();return r.push(i),this.setPluginState({targets:r}),this.el},this.hideAllPanels=()=>{const e=this.getPluginState(),t={activePickerPanel:!1,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1};e.activePickerPanel===t.activePickerPanel&&e.showAddFilesPanel===t.showAddFilesPanel&&e.showFileEditor===t.showFileEditor&&e.activeOverlayType===t.activeOverlayType||this.setPluginState(t)},this.showPanel=e=>{const{targets:t}=this.getPluginState(),n=t.filter((t=>"acquirer"===t.type&&t.id===e))[0];this.setPluginState({activePickerPanel:n,activeOverlayType:"PickerPanel"})},this.canEditFile=e=>{const{targets:t}=this.getPluginState();return a(this,F)[F](t).some((t=>this.uppy.getPlugin(t.id).canEditFile(e)))},this.openFileEditor=e=>{const{targets:t}=this.getPluginState(),n=a(this,F)[F](t);this.setPluginState({showFileEditor:!0,fileCardFor:e.id||null,activeOverlayType:"FileEditor"}),n.forEach((t=>{this.uppy.getPlugin(t.id).selectFile(e)}))},this.saveFileEditor=()=>{const{targets:e}=this.getPluginState();a(this,F)[F](e).forEach((e=>{this.uppy.getPlugin(e.id).save()})),this.hideAllPanels()},this.openModal=()=>{const{promise:e,resolve:t}=_();if(this.savedScrollPosition=window.pageYOffset,this.savedActiveElement=document.activeElement,this.opts.disablePageScrollWhenModalOpen&&document.body.classList.add("uppy-Dashboard-isFixed"),this.opts.animateOpenClose&&this.getPluginState().isClosing){const e=()=>{this.setPluginState({isHidden:!1}),this.el.removeEventListener("animationend",e,!1),t()};this.el.addEventListener("animationend",e,!1)}else this.setPluginState({isHidden:!1}),t();return this.opts.browserBackButtonClose&&this.updateBrowserHistory(),document.addEventListener("keydown",this.handleKeyDownInModal),this.uppy.emit("dashboard:modal-open"),e},this.closeModal=function(e){void 0===e&&(e={});const{manualClose:t=!0}=e,{isHidden:s,isClosing:i}=n.getPluginState();if(s||i)return;const{promise:r,resolve:o}=_();if(n.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),n.opts.animateOpenClose){n.setPluginState({isClosing:!0});const e=()=>{n.setPluginState({isHidden:!0,isClosing:!1}),n.superFocus.cancel(),n.savedActiveElement.focus(),n.el.removeEventListener("animationend",e,!1),o()};n.el.addEventListener("animationend",e,!1)}else n.setPluginState({isHidden:!0}),n.superFocus.cancel(),n.savedActiveElement.focus(),o();var a;return document.removeEventListener("keydown",n.handleKeyDownInModal),t&&n.opts.browserBackButtonClose&&null!=(a=history.state)&&a[n.modalName]&&history.back(),n.uppy.emit("dashboard:modal-closed"),r},this.isModalOpen=()=>!this.getPluginState().isHidden||!1,this.requestCloseModal=()=>this.opts.onRequestCloseModal?this.opts.onRequestCloseModal():this.closeModal(),this.setDarkModeCapability=e=>{const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,darkMode:e}})},this.handleSystemDarkModeChange=e=>{const t=e.matches;this.uppy.log("[Dashboard] Dark mode is "+(t?"on":"off")),this.setDarkModeCapability(t)},this.toggleFileCard=(e,t)=>{const n=this.uppy.getFile(t);e?this.uppy.emit("dashboard:file-edit-start",n):this.uppy.emit("dashboard:file-edit-complete",n),this.setPluginState({fileCardFor:e?t:null,activeOverlayType:e?"FileCard":null})},this.toggleAddFilesPanel=e=>{this.setPluginState({showAddFilesPanel:e,activeOverlayType:e?"AddFiles":null})},this.addFiles=e=>{const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||e.webkitRelativePath||null}})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}},this.startListeningToResize=()=>{this.resizeObserver=new ResizeObserver((e=>{const t=e[0],{width:n,height:s}=t.contentRect;this.uppy.log(`[Dashboard] resized: ${n} / ${s}`,"debug"),this.setPluginState({containerWidth:n,containerHeight:s,areInsidesReadyToBeVisible:!0})})),this.resizeObserver.observe(this.el.querySelector(".uppy-Dashboard-inner")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout((()=>{const e=this.getPluginState(),t=!this.opts.inline&&e.isHidden;e.areInsidesReadyToBeVisible||t||(this.uppy.log("[Dashboard] resize event didn't fire on time: defaulted to mobile layout","debug"),this.setPluginState({areInsidesReadyToBeVisible:!0}))}),1e3)},this.stopListeningToResize=()=>{this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)},this.recordIfFocusedOnUppyRecently=e=>{this.el.contains(e.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())},this.disableAllFocusableElements=e=>{const t=f(this.el.querySelectorAll(y));e?t.forEach((e=>{const t=e.getAttribute("tabindex");t&&(e.dataset.inertTabindex=t),e.setAttribute("tabindex","-1")})):t.forEach((e=>{"inertTabindex"in e.dataset?e.setAttribute("tabindex",e.dataset.inertTabindex):e.removeAttribute("tabindex")})),this.dashboardIsDisabled=e},this.updateBrowserHistory=()=>{var e;null!=(e=history.state)&&e[this.modalName]||history.pushState({...history.state,[this.modalName]:!0},""),window.addEventListener("popstate",this.handlePopState,!1)},this.handlePopState=e=>{var t;!this.isModalOpen()||e.state&&e.state[this.modalName]||this.closeModal({manualClose:!1}),!this.isModalOpen()&&null!=(t=e.state)&&t[this.modalName]&&history.back()},this.handleKeyDownInModal=e=>{27===e.keyCode&&this.requestCloseModal(e),9===e.keyCode&&o.forModal(e,this.getPluginState().activeOverlayType,this.el)},this.handleClickOutside=()=>{this.opts.closeModalOnClickOutside&&this.requestCloseModal()},this.handlePaste=e=>{this.uppy.iteratePlugins((t=>{"acquirer"===t.type&&(null==t.handleRootPaste||t.handleRootPaste(e))}));const t=f(e.clipboardData.files);t.length>0&&(this.uppy.log("[Dashboard] Files pasted"),this.addFiles(t))},this.handleInputChange=e=>{e.preventDefault();const t=f(e.target.files);t.length>0&&(this.uppy.log("[Dashboard] Files selected through input"),this.addFiles(t))},this.handleDragOver=e=>{var t,n;e.preventDefault(),e.stopPropagation();const s=(()=>{let t=!0;return this.uppy.iteratePlugins((n=>{null!=n.canHandleRootDrop&&n.canHandleRootDrop(e)&&(t=!0)})),t})(),i=(()=>{const{types:t}=e.dataTransfer;return t.some((e=>"Files"===e))})();if(!s&&!i||this.opts.disabled||this.opts.disableLocalFiles&&(i||!s)||!this.uppy.getState().allowNewUpload)return e.dataTransfer.dropEffect="none",void clearTimeout(this.removeDragOverClassTimeout);e.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0}),null==(t=(n=this.opts).onDragOver)||t.call(n,e)},this.handleDragLeave=e=>{var t,n;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((()=>{this.setPluginState({isDraggingOver:!1})}),50),null==(t=(n=this.opts).onDragLeave)||t.call(n,e)},this.handleDrop=async e=>{var t,n;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins((t=>{"acquirer"===t.type&&(null==t.handleRootDrop||t.handleRootDrop(e))}));let s=!1;const i=await m(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,"error"),s||(this.uppy.info(e.message,"error"),s=!0)}});i.length>0&&(this.uppy.log("[Dashboard] Files dropped"),this.addFiles(i)),null==(t=(n=this.opts).onDrop)||t.call(n,e)},this.handleRequestThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:request",e)},this.handleCancelThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:cancel",e)},this.handleKeyDownInInline=e=>{9===e.keyCode&&o.forInline(e,this.getPluginState().activeOverlayType,this.el)},this.handlePasteOnBody=e=>{this.el.contains(document.activeElement)&&this.handlePaste(e)},this.handleComplete=e=>{let{failed:t}=e;this.opts.closeAfterFinish&&0===t.length&&this.requestCloseModal()},this.handleCancelRestore=()=>{this.uppy.emit("restore-canceled")},Object.defineProperty(this,P,{writable:!0,value:e=>{const t=e[0];this.canEditFile(t)&&this.openFileEditor(t)}}),this.initEvents=()=>{if(this.opts.trigger&&!this.opts.inline){const e=h(this.opts.trigger);e?e.forEach((e=>e.addEventListener("click",this.openModal))):this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself","warning")}this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-remove",this.removeTarget),this.uppy.on("file-added",this.hideAllPanels),this.uppy.on("dashboard:modal-closed",this.hideAllPanels),this.uppy.on("file-editor:complete",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpenFileEditor&&this.uppy.on("files-added",a(this,P)[P])},this.removeEvents=()=>{const e=h(this.opts.trigger);!this.opts.inline&&e&&e.forEach((e=>e.removeEventListener("click",this.openModal))),this.stopListeningToResize(),document.removeEventListener("paste",this.handlePasteOnBody),window.removeEventListener("popstate",this.handlePopState,!1),this.uppy.off("plugin-remove",this.removeTarget),this.uppy.off("file-added",this.hideAllPanels),this.uppy.off("dashboard:modal-closed",this.hideAllPanels),this.uppy.off("file-editor:complete",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpenFileEditor&&this.uppy.off("files-added",a(this,P)[P])},this.superFocusOnEachUpdate=()=>{const e=this.el.contains(document.activeElement),t=document.activeElement===document.body||null===document.activeElement,n=0===this.uppy.getState().info.length,s=!this.opts.inline;n&&(s||e||t&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()},this.afterUpdate=()=>{!this.opts.disabled||this.dashboardIsDisabled?(!this.opts.disabled&&this.dashboardIsDisabled&&this.disableAllFocusableElements(!1),this.superFocusOnEachUpdate()):this.disableAllFocusableElements(!0)},this.saveFileCard=(e,t)=>{this.uppy.setFileMeta(t,e),this.toggleFileCard(!1,t)},Object.defineProperty(this,C,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return{...e,icon:t.icon||this.opts.defaultPickerIcon,render:t.render}}}),Object.defineProperty(this,S,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return"function"!=typeof t.isSupported||t.isSupported()}}),Object.defineProperty(this,O,{writable:!0,value:E((e=>e.filter((e=>"acquirer"===e.type&&a(this,S)[S](e))).map(a(this,C)[C])))}),Object.defineProperty(this,k,{writable:!0,value:E((e=>e.filter((e=>"progressindicator"===e.type)).map(a(this,C)[C])))}),Object.defineProperty(this,F,{writable:!0,value:E((e=>e.filter((e=>"editor"===e.type)).map(a(this,C)[C])))}),this.render=e=>{const t=this.getPluginState(),{files:n,capabilities:s,allowNewUpload:i}=e,{newFiles:r,uploadStartedFiles:o,completeFiles:l,erroredFiles:u,inProgressFiles:c,inProgressNotPausedFiles:d,processingFiles:p,isUploadStarted:h,isAllComplete:f,isAllErrored:m,isAllPaused:g}=this.uppy.getObjectOfFilesPerState(),y=a(this,O)[O](t.targets),v=a(this,k)[k](t.targets),w=a(this,F)[F](t.targets);let E;return E="auto"===this.opts.theme?s.darkMode?"dark":"light":this.opts.theme,["files","folders","both"].indexOf(this.opts.fileManagerSelectionType)<0&&(this.opts.fileManagerSelectionType="files",console.warn(`Unsupported option for "fileManagerSelectionType". Using default of "${this.opts.fileManagerSelectionType}".`)),b({state:e,isHidden:t.isHidden,files:n,newFiles:r,uploadStartedFiles:o,completeFiles:l,erroredFiles:u,inProgressFiles:c,inProgressNotPausedFiles:d,processingFiles:p,isUploadStarted:h,isAllComplete:f,isAllErrored:m,isAllPaused:g,totalFileCount:Object.keys(n).length,totalProgress:e.totalProgress,allowNewUpload:i,acquirers:y,theme:E,disabled:this.opts.disabled,disableLocalFiles:this.opts.disableLocalFiles,direction:this.opts.direction,activePickerPanel:t.activePickerPanel,showFileEditor:t.showFileEditor,saveFileEditor:this.saveFileEditor,disableAllFocusableElements:this.disableAllFocusableElements,animateOpenClose:this.opts.animateOpenClose,isClosing:t.isClosing,progressindicators:v,editors:w,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,i18n:this.i18n,i18nArray:this.i18nArray,uppy:this.uppy,note:this.opts.note,recoveredState:e.recoveredState,metaFields:t.metaFields,resumableUploads:s.resumableUploads||!1,individualCancellation:s.individualCancellation,isMobileDevice:s.isMobileDevice,fileCardFor:t.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:t.showAddFilesPanel,saveFileCard:this.saveFileCard,openFileEditor:this.openFileEditor,canEditFile:this.canEditFile,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,fileManagerSelectionType:this.opts.fileManagerSelectionType,proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,hideCancelButton:this.opts.hideCancelButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,showRemoveButtonAfterComplete:this.opts.showRemoveButtonAfterComplete,containerWidth:t.containerWidth,containerHeight:t.containerHeight,areInsidesReadyToBeVisible:t.areInsidesReadyToBeVisible,isTargetDOMEl:this.isTargetDOMEl,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,requiredMetaFields:this.uppy.opts.restrictions.requiredMetaFields,showSelectedFiles:this.opts.showSelectedFiles,handleCancelRestore:this.handleCancelRestore,handleRequestThumbnail:this.handleRequestThumbnail,handleCancelThumbnail:this.handleCancelThumbnail,isDraggingOver:t.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop})},this.discoverProviderPlugins=()=>{this.uppy.iteratePlugins((e=>{e&&!e.target&&e.opts&&e.opts.target===this.constructor&&this.addTarget(e)}))},this.install=()=>{this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:!1,showFileEditor:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});const{inline:e,closeAfterFinish:t}=this.opts;if(e&&t)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");const{allowMultipleUploads:n,allowMultipleUploadBatches:s}=this.uppy.opts;(n||s)&&t&&this.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");const{target:i}=this.opts;i&&this.mount(i,this),(this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t&&t.mount(this,t)})),this.opts.disableStatusBar||this.uppy.use(c,{id:`${this.id}:StatusBar`,target:this,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,showProgressDetails:this.opts.showProgressDetails,hideAfterFinish:this.opts.hideProgressAfterFinish,locale:this.opts.locale,doneButtonHandler:this.opts.doneButtonHandler}),this.opts.disableInformer||this.uppy.use(d,{id:`${this.id}:Informer`,target:this}),this.opts.disableThumbnailGenerator||this.uppy.use(p,{id:`${this.id}:ThumbnailGenerator`,thumbnailWidth:this.opts.thumbnailWidth,thumbnailHeight:this.opts.thumbnailHeight,thumbnailType:this.opts.thumbnailType,waitForThumbnailsBeforeUpload:this.opts.waitForThumbnailsBeforeUpload,lazy:!this.opts.waitForThumbnailsBeforeUpload}),this.darkModeMediaQuery="undefined"!=typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;const r=!!this.darkModeMediaQuery&&this.darkModeMediaQuery.matches;this.uppy.log("[Dashboard] Dark mode is "+(r?"on":"off")),this.setDarkModeCapability(r),"auto"===this.opts.theme&&this.darkModeMediaQuery.addListener(this.handleSystemDarkModeChange),this.discoverProviderPlugins(),this.initEvents()},this.uninstall=()=>{if(!this.opts.disableInformer){const e=this.uppy.getPlugin(`${this.id}:Informer`);e&&this.uppy.removePlugin(e)}if(!this.opts.disableStatusBar){const e=this.uppy.getPlugin(`${this.id}:StatusBar`);e&&this.uppy.removePlugin(e)}if(!this.opts.disableThumbnailGenerator){const e=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);e&&this.uppy.removePlugin(e)}(this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t&&t.unmount()})),"auto"===this.opts.theme&&this.darkModeMediaQuery.removeListener(this.handleSystemDarkModeChange),this.unmount(),this.removeEvents()},this.id=this.opts.id||"Dashboard",this.title="Dashboard",this.type="orchestrator",this.modalName=`uppy-Dashboard-${(0,r.nanoid)()}`,this.defaultLocale=w;const s={target:"body",metaFields:[],trigger:null,inline:!1,width:750,height:550,thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:x,showLinkToFileUploadResult:!1,showProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,doneButtonHandler:()=>{this.uppy.reset(),this.requestCloseModal()},note:null,closeModalOnClickOutside:!1,closeAfterFinish:!1,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,disablePageScrollWhenModalOpen:!0,animateOpenClose:!0,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,onRequestCloseModal:()=>this.closeModal(),showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,browserBackButtonClose:!1,theme:"light",autoOpenFileEditor:!1,disabled:!1,disableLocalFiles:!1};this.opts={...s,...t},this.i18nInit(),this.superFocus=v(),this.ifFocusedOnUppyRecently=!1,this.makeDashboardInsidesVisibleAnywayTimeout=null,this.removeDragOverClassTimeout=null}}N.VERSION="2.4.3",e.exports=N},8468:(e,t,n)=>{"use strict";var s=n(172);let i;i=Symbol.for("uppy test: disable unused locale key warning");class r extends s.Component{constructor(){super(...arguments),this.triggerFileInputClick=()=>{this.fileInput.click()},this.triggerFolderInputClick=()=>{this.folderInput.click()},this.onFileInputChange=e=>{this.props.handleInputChange(e),e.target.value=null},this.renderHiddenInput=(e,t)=>(0,s.h)("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,webkitdirectory:e,type:"file",name:"files[]",multiple:1!==this.props.maxNumberOfFiles,onChange:this.onFileInputChange,accept:this.props.allowedFileTypes,ref:t}),this.renderMyDeviceAcquirer=()=>(0,s.h)("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MyDevice"},(0,s.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerFileInputClick},(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,s.h)("g",{fill:"none",fillRule:"evenodd"},(0,s.h)("rect",{className:"uppy-ProviderIconBg",width:"32",height:"32",rx:"16",fill:"#2275D7"}),(0,s.h)("path",{d:"M21.973 21.152H9.863l-1.108-5.087h14.464l-1.246 5.087zM9.935 11.37h3.958l.886 1.444a.673.673 0 0 0 .585.316h6.506v1.37H9.935v-3.13zm14.898 3.44a.793.793 0 0 0-.616-.31h-.978v-2.126c0-.379-.275-.613-.653-.613H15.75l-.886-1.445a.673.673 0 0 0-.585-.316H9.232c-.378 0-.667.209-.667.587V14.5h-.782a.793.793 0 0 0-.61.303.795.795 0 0 0-.155.663l1.45 6.633c.078.36.396.618.764.618h13.354c.36 0 .674-.246.76-.595l1.631-6.636a.795.795 0 0 0-.144-.675z",fill:"#FFF"}))),(0,s.h)("div",{className:"uppy-DashboardTab-name"},this.props.i18n("myDevice")))),this.renderBrowseButton=(e,t)=>{const n=this.props.acquirers.length;return(0,s.h)("button",{type:"button",className:"uppy-u-reset uppy-Dashboard-browse",onClick:t,"data-uppy-super-focusable":0===n},e)},this.renderDropPasteBrowseTagline=()=>{const e=this.props.acquirers.length,t=this.renderBrowseButton(this.props.i18n("browseFiles"),this.triggerFileInputClick),n=this.renderBrowseButton(this.props.i18n("browseFolders"),this.triggerFolderInputClick),i=this.props.fileManagerSelectionType,r=i.charAt(0).toUpperCase()+i.slice(1);return(0,s.h)("div",{class:"uppy-Dashboard-AddFiles-title"},this.props.disableLocalFiles?this.props.i18n("importFiles"):e>0?this.props.i18nArray(`dropPasteImport${r}`,{browseFiles:t,browseFolders:n,browse:t}):this.props.i18nArray(`dropPaste${r}`,{browseFiles:t,browseFolders:n,browse:t}))},this.renderAcquirer=e=>(0,s.h)("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":e.id},(0,s.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-cy":e.id,"aria-controls":`uppy-DashboardContent-panel--${e.id}`,"aria-selected":this.props.activePickerPanel.id===e.id,"data-uppy-super-focusable":!0,onClick:()=>this.props.showPanel(e.id)},e.icon(),(0,s.h)("div",{className:"uppy-DashboardTab-name"},e.name))),this.renderAcquirers=(e,t)=>{const n=[...e],i=n.splice(e.length-2,e.length);return(0,s.h)("div",{className:"uppy-Dashboard-AddFiles-list",role:"tablist"},!t&&this.renderMyDeviceAcquirer(),n.map((e=>this.renderAcquirer(e))),(0,s.h)("span",{role:"presentation",style:{"white-space":"nowrap"}},i.map((e=>this.renderAcquirer(e)))))}}[i](){this.props.i18nArray("dropPasteBoth"),this.props.i18nArray("dropPasteFiles"),this.props.i18nArray("dropPasteFolders"),this.props.i18nArray("dropPasteImportBoth"),this.props.i18nArray("dropPasteImportFiles"),this.props.i18nArray("dropPasteImportFolders")}renderPoweredByUppy(){const{i18nArray:e}=this.props,t=e("poweredBy",{uppy:(0,s.h)("span",null,(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11"},(0,s.h)("path",{d:"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z",fillRule:"evenodd"})),(0,s.h)("span",{className:"uppy-Dashboard-poweredByUppy"},"Uppy"))});return(0,s.h)("a",{tabIndex:"-1",href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",className:"uppy-Dashboard-poweredBy"},t)}render(){return(0,s.h)("div",{className:"uppy-Dashboard-AddFiles"},this.renderHiddenInput(!1,(e=>{this.fileInput=e})),this.renderHiddenInput(!0,(e=>{this.folderInput=e})),this.renderDropPasteBrowseTagline(),this.props.acquirers.length>0&&this.renderAcquirers(this.props.acquirers,this.props.disableLocalFiles),(0,s.h)("div",{className:"uppy-Dashboard-AddFiles-info"},this.props.note&&(0,s.h)("div",{className:"uppy-Dashboard-note"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy(this.props)))}}e.exports=r},9228:(e,t,n)=>{"use strict";var s=n(172);const i=n(6942),r=n(8468);e.exports=e=>(0,s.h)("div",{className:i("uppy-Dashboard-AddFilesPanel",e.className),"data-uppy-panelType":"AddFiles","aria-hidden":e.showAddFilesPanel},(0,s.h)("div",{className:"uppy-DashboardContent-bar"},(0,s.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18n("addingMoreFiles")),(0,s.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>e.toggleAddFilesPanel(!1)},e.i18n("back"))),(0,s.h)(r,e))},9148:(e,t,n)=>{"use strict";var s=n(172);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},i.apply(this,arguments)}const r=n(6942),o=n(5573),a=n(1260),l=n(8468),u=n(9228),c=n(4555),d=n(9405),p=n(168),h=n(9985),f=n(7405);e.exports=function(e){const t=0===e.totalFileCount,n=e.containerWidth>576,m=r({"uppy-Dashboard":!0,"uppy-Dashboard--isDisabled":e.disabled,"uppy-Dashboard--animateOpenClose":e.animateOpenClose,"uppy-Dashboard--isClosing":e.isClosing,"uppy-Dashboard--isDraggingOver":e.isDraggingOver,"uppy-Dashboard--modal":!e.inline,"uppy-size--md":e.containerWidth>576,"uppy-size--lg":e.containerWidth>700,"uppy-size--xl":e.containerWidth>900,"uppy-size--height-md":e.containerHeight>400,"uppy-Dashboard--isAddFilesPanelVisible":e.showAddFilesPanel,"uppy-Dashboard--isInnerWrapVisible":e.areInsidesReadyToBeVisible});let g=1;e.containerWidth>900?g=5:e.containerWidth>700?g=4:e.containerWidth>576&&(g=3);const y=e.showSelectedFiles&&!t,v=e.recoveredState?Object.keys(e.recoveredState.files).length:null,b=e.files?Object.keys(e.files).filter((t=>e.files[t].isGhost)).length:null;return(0,s.h)("div",{className:m,"data-uppy-theme":e.theme,"data-uppy-num-acquirers":e.acquirers.length,"data-uppy-drag-drop-supported":!e.disableLocalFiles&&o(),"aria-hidden":e.inline?"false":e.isHidden,"aria-disabled":e.disabled,"aria-label":e.inline?e.i18n("dashboardTitle"):e.i18n("dashboardWindowTitle"),onPaste:e.handlePaste,onDragOver:e.handleDragOver,onDragLeave:e.handleDragLeave,onDrop:e.handleDrop},(0,s.h)("div",{"aria-hidden":"true",className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:e.handleClickOutside}),(0,s.h)("div",{className:"uppy-Dashboard-inner","aria-modal":!e.inline&&"true",role:!e.inline&&"dialog",style:{width:e.inline&&e.width?e.width:"",height:e.inline&&e.height?e.height:""}},e.inline?null:(0,s.h)("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":e.i18n("closeModal"),title:e.i18n("closeModal"),onClick:e.closeModal},(0,s.h)("span",{"aria-hidden":"true"},"×")),(0,s.h)("div",{className:"uppy-Dashboard-innerWrap"},(0,s.h)("div",{className:"uppy-Dashboard-dropFilesHereHint"},e.i18n("dropHint")),y&&(0,s.h)(p,e),v&&(0,s.h)("div",{className:"uppy-Dashboard-serviceMsg"},(0,s.h)("svg",{className:"uppy-Dashboard-serviceMsg-icon","aria-hidden":"true",focusable:"false",width:"21",height:"16",viewBox:"0 0 24 19"},(0,s.h)("g",{transform:"translate(0 -1)",fill:"none",fillRule:"evenodd"},(0,s.h)("path",{d:"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z",fill:"#FFD300"}),(0,s.h)("path",{fill:"#000",d:"M11 6h2l-.3 8h-1.4z"}),(0,s.h)("circle",{fill:"#000",cx:"12",cy:"17",r:"1"}))),(0,s.h)("strong",{className:"uppy-Dashboard-serviceMsg-title"},e.i18n("sessionRestored")),(0,s.h)("div",{className:"uppy-Dashboard-serviceMsg-text"},b>0?e.i18n("recoveredXFiles",{smart_count:b}):e.i18n("recoveredAllFiles"))),y?(0,s.h)(a,i({},e,{itemsPerRow:g})):(0,s.h)(l,i({},e,{isSizeMD:n})),(0,s.h)(f,null,e.showAddFilesPanel?(0,s.h)(u,i({key:"AddFiles"},e,{isSizeMD:n})):null),(0,s.h)(f,null,e.fileCardFor?(0,s.h)(h,i({key:"FileCard"},e)):null),(0,s.h)(f,null,e.activePickerPanel?(0,s.h)(c,i({key:"Picker"},e)):null),(0,s.h)(f,null,e.showFileEditor?(0,s.h)(d,i({key:"Editor"},e)):null),(0,s.h)("div",{className:"uppy-Dashboard-progressindicators"},e.progressindicators.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))))}},9405:(e,t,n)=>{"use strict";var s=n(172);const i=n(6942);e.exports=function(e){const t=e.files[e.fileCardFor];return(0,s.h)("div",{className:i("uppy-DashboardContent-panel",e.className),role:"tabpanel","data-uppy-panelType":"FileEditor",id:"uppy-DashboardContent-panel--editor"},(0,s.h)("div",{className:"uppy-DashboardContent-bar"},(0,s.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18nArray("editing",{file:(0,s.h)("span",{className:"uppy-DashboardContent-titleFile"},t.meta?t.meta.name:t.name)})),(0,s.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:e.hideAllPanels},e.i18n("cancel")),(0,s.h)("button",{className:"uppy-DashboardContent-save",type:"button",onClick:e.saveFileEditor},e.i18n("save"))),(0,s.h)("div",{className:"uppy-DashboardContent-panelBody"},e.editors.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))}},9985:(e,t,n)=>{"use strict";var s=n(172),i=n(5042);const r=n(6942),o=n(8294),a=n(7423),l=n(3346);class u extends s.Component{constructor(e){super(e),this.form=document.createElement("form"),this.updateMeta=(e,t)=>{this.setState((n=>{let{formState:s}=n;return{formState:{...s,[t]:e}}}))},this.handleSave=e=>{e.preventDefault();const t=this.props.fileCardFor;this.props.saveFileCard(this.state.formState,t)},this.handleCancel=()=>{const e=this.props.files[this.props.fileCardFor];this.props.uppy.emit("file-editor:cancel",e),this.props.toggleFileCard(!1)},this.saveOnEnter=e=>{if(13===e.keyCode){e.stopPropagation(),e.preventDefault();const t=this.props.files[this.props.fileCardFor];this.props.saveFileCard(this.state.formState,t.id)}},this.renderMetaFields=()=>{const e=this.getMetaFields()||[],t={text:"uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input"};return e.map((e=>{const n=`uppy-Dashboard-FileCard-input-${e.id}`,i=this.props.requiredMetaFields.includes(e.id);return(0,s.h)("fieldset",{key:e.id,className:"uppy-Dashboard-FileCard-fieldset"},(0,s.h)("label",{className:"uppy-Dashboard-FileCard-label",htmlFor:n},e.name),void 0!==e.render?e.render({value:this.state.formState[e.id],onChange:t=>this.updateMeta(t,e.id),fieldCSSClasses:t,required:i,form:this.form.id},s.h):(0,s.h)("input",{className:t.text,id:n,form:this.form.id,type:e.type||"text",required:i,value:this.state.formState[e.id],placeholder:e.placeholder,onKeyUp:"form"in HTMLInputElement.prototype?void 0:this.saveOnEnter,onKeyDown:"form"in HTMLInputElement.prototype?void 0:this.saveOnEnter,onKeyPress:"form"in HTMLInputElement.prototype?void 0:this.saveOnEnter,onInput:t=>this.updateMeta(t.target.value,e.id),"data-uppy-super-focusable":!0}))}))};const t=this.props.files[this.props.fileCardFor],n=this.getMetaFields()||[],r={};n.forEach((e=>{r[e.id]=t.meta[e.id]||""})),this.state={formState:r},this.form.id=(0,i.nanoid)()}componentWillMount(){this.form.addEventListener("submit",this.handleSave),document.body.appendChild(this.form)}componentWillUnmount(){this.form.removeEventListener("submit",this.handleSave),document.body.removeChild(this.form)}getMetaFields(){return"function"==typeof this.props.metaFields?this.props.metaFields(this.props.files[this.props.fileCardFor]):this.props.metaFields}render(){const e=this.props.files[this.props.fileCardFor],t=this.props.canEditFile(e);return(0,s.h)("div",{className:r("uppy-Dashboard-FileCard",this.props.className),"data-uppy-panelType":"FileCard",onDragOver:a,onDragLeave:a,onDrop:a,onPaste:a},(0,s.h)("div",{className:"uppy-DashboardContent-bar"},(0,s.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},this.props.i18nArray("editing",{file:(0,s.h)("span",{className:"uppy-DashboardContent-titleFile"},e.meta?e.meta.name:e.name)})),(0,s.h)("button",{className:"uppy-DashboardContent-back",type:"button",form:this.form.id,title:this.props.i18n("finishEditingFile"),onClick:this.handleCancel},this.props.i18n("cancel"))),(0,s.h)("div",{className:"uppy-Dashboard-FileCard-inner"},(0,s.h)("div",{className:"uppy-Dashboard-FileCard-preview",style:{backgroundColor:o(e.type).color}},(0,s.h)(l,{file:e}),t&&(0,s.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit",onClick:t=>{this.handleSave(t),this.props.openFileEditor(e)},form:this.form.id},this.props.i18n("editFile"))),(0,s.h)("div",{className:"uppy-Dashboard-FileCard-info"},this.renderMetaFields()),(0,s.h)("div",{className:"uppy-Dashboard-FileCard-actions"},(0,s.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn",type:"form"in HTMLButtonElement.prototype?"submit":"button",onClick:"form"in HTMLButtonElement.prototype?void 0:this.handleSave,form:this.form.id},this.props.i18n("saveChanges")),(0,s.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn",type:"button",onClick:this.handleCancel,form:this.form.id},this.props.i18n("cancel")))))}}e.exports=u},986:(e,t,n)=>{"use strict";var s=n(172);const i=n(1063);function r(e){let{file:t,uploadInProgressOrComplete:n,metaFields:i,canEditFile:r,i18n:o,onClick:a}=e;return!n&&i&&i.length>0||!n&&r(t)?(0,s.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit",type:"button","aria-label":o("editFileWithFilename",{file:t.meta.name}),title:o("editFileWithFilename",{file:t.meta.name}),onClick:()=>a()},(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 14"},(0,s.h)("g",{fillRule:"evenodd"},(0,s.h)("path",{d:"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z",fillRule:"nonzero"}),(0,s.h)("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),(0,s.h)("path",{fillRule:"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})))):null}function o(e){let{i18n:t,onClick:n,file:i}=e;return(0,s.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove",type:"button","aria-label":t("removeFile",{file:i.meta.name}),title:t("removeFile",{file:i.meta.name}),onClick:()=>n()},(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"18",height:"18",viewBox:"0 0 18 18"},(0,s.h)("path",{d:"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z"}),(0,s.h)("path",{fill:"#FFF",d:"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z"})))}function a(e){const{i18n:t}=e;return(0,s.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink",type:"button","aria-label":t("copyLink"),title:t("copyLink"),onClick:t=>((e,t)=>{i(t.file.uploadURL,t.i18n("copyLinkToClipboardFallback")).then((()=>{t.uppy.log("Link copied to clipboard."),t.uppy.info(t.i18n("copyLinkToClipboardSuccess"),"info",3e3)})).catch(t.uppy.log).then((()=>e.target.focus({preventScroll:!0})))})(t,e)},(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 12"},(0,s.h)("path",{d:"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z"})))}e.exports=function(e){const{uppy:t,file:n,uploadInProgressOrComplete:i,canEditFile:l,metaFields:u,showLinkToFileUploadResult:c,showRemoveButton:d,i18n:p,toggleFileCard:h,openFileEditor:f}=e;return(0,s.h)("div",{className:"uppy-Dashboard-Item-actionWrapper"},(0,s.h)(r,{i18n:p,file:n,uploadInProgressOrComplete:i,canEditFile:l,metaFields:u,onClick:()=>{u&&u.length>0?h(!0,n.id):f(n)}}),c&&n.uploadURL?(0,s.h)(a,{file:n,uppy:t,i18n:p}):null,d?(0,s.h)(o,{i18n:p,file:n,uppy:t,onClick:()=>e.uppy.removeFile(n.id,"removed-by-user")}):null)}},6715:(e,t,n)=>{"use strict";var s=n(172);const i=n(8236),r=n(7283),o=n(6886),a=e=>{let{file:t,onClick:n}=e;return t.error?(0,s.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-errorDetails","aria-label":t.error,"data-microtip-position":"bottom","data-microtip-size":"medium",onClick:n,type:"button"},"?"):null};e.exports=function(e){const{file:t}=e;return(0,s.h)("div",{className:"uppy-Dashboard-Item-fileInfo","data-uppy-file-source":t.source},(0,s.h)("div",{className:"uppy-Dashboard-Item-fileName"},(e=>{const{author:t,name:n}=e.file.meta;return(0,s.h)("div",{className:"uppy-Dashboard-Item-name",title:n},r(n,e.containerWidth<=352?35:e.containerWidth<=576?60:t?20:30))})(e),(0,s.h)(a,{file:e.file,onClick:()=>alert(e.file.error)})),(0,s.h)("div",{className:"uppy-Dashboard-Item-status"},(e=>{const{author:t}=e.file.meta,{providerName:n}=e.file.remote;return t?(0,s.h)("div",{className:"uppy-Dashboard-Item-author"},(0,s.h)("a",{href:`${t.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer"},r(t.name,13)),n?(0,s.h)(s.Fragment,null," · ",n," · "):null):null})(e),(e=>e.file.size&&(0,s.h)("div",{className:"uppy-Dashboard-Item-statusSize"},i(e.file.size)))(e),(e=>e.file.isGhost&&(0,s.h)("span",null," • ",(0,s.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect",type:"button",onClick:e.toggleAddFilesPanel},e.i18n("reSelect"))))(e)),(0,s.h)(o,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))}},9002:(e,t,n)=>{"use strict";var s=n(172);const i=n(3346),r=n(6886),o=n(8294);e.exports=function(e){return(0,s.h)("div",{className:"uppy-Dashboard-Item-previewInnerWrap",style:{backgroundColor:o(e.file.type).color}},e.showLinkToFileUploadResult&&e.file.uploadURL&&(0,s.h)("a",{className:"uppy-Dashboard-Item-previewLink",href:e.file.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":e.file.meta.name},(0,s.h)("span",{hidden:!0},e.file.meta.name)),(0,s.h)(i,{file:e.file}),(0,s.h)(r,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))}},6124:(e,t,n)=>{"use strict";var s=n(172);function i(e){return e.isUploaded?e.i18n("uploadComplete"):e.error?e.i18n("retryUpload"):e.resumableUploads?e.file.isPaused?e.i18n("resumeUpload"):e.i18n("pauseUpload"):e.individualCancellation?e.i18n("cancelUpload"):""}function r(e){return(0,s.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,s.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-progressIndicator",type:"button","aria-label":i(e),title:i(e),onClick:()=>function(e){e.isUploaded||(!e.error||e.hideRetryButton?e.resumableUploads&&!e.hidePauseResumeButton?e.uppy.pauseResume(e.file.id):e.individualCancellation&&!e.hideCancelButton&&e.uppy.removeFile(e.file.id):e.uppy.retryUpload(e.file.id))}(e)},e.children))}function o(e){let{children:t}=e;return(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",width:"70",height:"70",viewBox:"0 0 36 36",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--circle"},t)}function a(e){let{progress:t}=e;const n=2*Math.PI*15;return(0,s.h)("g",null,(0,s.h)("circle",{className:"uppy-Dashboard-Item-progressIcon--bg",r:"15",cx:"18",cy:"18","stroke-width":"2",fill:"none"}),(0,s.h)("circle",{className:"uppy-Dashboard-Item-progressIcon--progress",r:"15",cx:"18",cy:"18",transform:"rotate(-90, 18, 18)",fill:"none","stroke-width":"2","stroke-dasharray":n,"stroke-dashoffset":n-n/100*t}))}e.exports=function(e){return e.file.progress.uploadStarted?e.isUploaded?(0,s.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,s.h)("div",{className:"uppy-Dashboard-Item-progressIndicator"},(0,s.h)(o,null,(0,s.h)("circle",{r:"15",cx:"18",cy:"18",fill:"#1bb240"}),(0,s.h)("polygon",{className:"uppy-Dashboard-Item-progressIcon--check",transform:"translate(2, 3)",points:"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634"})))):e.recoveredState?void 0:e.error&&!e.hideRetryButton?(0,s.h)(r,e,(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry",width:"28",height:"31",viewBox:"0 0 16 19"},(0,s.h)("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),(0,s.h)("path",{d:"M7.9 3H10v2H7.9z"}),(0,s.h)("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),(0,s.h)("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"}))):e.resumableUploads&&!e.hidePauseResumeButton?(0,s.h)(r,e,(0,s.h)(o,null,(0,s.h)(a,{progress:e.file.progress.percentage}),e.file.isPaused?(0,s.h)("polygon",{className:"uppy-Dashboard-Item-progressIcon--play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}):(0,s.h)("g",{className:"uppy-Dashboard-Item-progressIcon--pause",transform:"translate(14.5, 13)"},(0,s.h)("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),(0,s.h)("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})))):e.resumableUploads||!e.individualCancellation||e.hideCancelButton?(0,s.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,s.h)("div",{className:"uppy-Dashboard-Item-progressIndicator"},(0,s.h)(o,null,(0,s.h)(a,{progress:e.file.progress.percentage})))):(0,s.h)(r,e,(0,s.h)(o,null,(0,s.h)(a,{progress:e.file.progress.percentage}),(0,s.h)("polygon",{className:"cancel",transform:"translate(2, 2)",points:"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12"}))):null}},6886:(e,t,n)=>{"use strict";var s=n(172);e.exports=function(e){const{file:t,toggleFileCard:n,i18n:i,metaFields:r}=e,{missingRequiredMetaFields:o}=t;if(null==o||!o.length)return null;const a=o.map((e=>((e,t)=>t.filter((t=>t.id===e))[0].name)(e,r))).join(", ");return(0,s.h)("div",{className:"uppy-Dashboard-Item-errorMessage"},i("missingRequiredMetaFields",{smart_count:o.length,fields:a})," ",(0,s.h)("button",{type:"button",class:"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn",onClick:()=>n(!0,t.id)},i("editFile")))}},3152:(e,t,n)=>{"use strict";var s=n(172);const i=n(6942),r=n(6993),o=n(9002),a=n(6124),l=n(6715),u=n(986);class c extends s.Component{componentDidMount(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}shouldComponentUpdate(e){return!r(this.props,e)}componentDidUpdate(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}componentWillUnmount(){const{file:e}=this.props;e.preview||this.props.handleCancelThumbnail(e)}render(){const{file:e}=this.props,t=e.progress.preprocess||e.progress.postprocess,n=e.progress.uploadComplete&&!t&&!e.error,r=e.progress.uploadStarted||t,c=e.progress.uploadStarted&&!e.progress.uploadComplete||t,d=e.error||!1,{isGhost:p}=e;let h=(this.props.individualCancellation||!c)&&!n;n&&this.props.showRemoveButtonAfterComplete&&(h=!0);const f=i({"uppy-Dashboard-Item":!0,"is-inprogress":c&&!this.props.recoveredState,"is-processing":t,"is-complete":n,"is-error":!!d,"is-resumable":this.props.resumableUploads,"is-noIndividualCancellation":!this.props.individualCancellation,"is-ghost":p});return(0,s.h)("div",{className:f,id:`uppy_${e.id}`,role:this.props.role},(0,s.h)("div",{className:"uppy-Dashboard-Item-preview"},(0,s.h)(o,{file:e,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,i18n:this.props.i18n,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),(0,s.h)(a,{uppy:this.props.uppy,file:e,error:d,isUploaded:n,hideRetryButton:this.props.hideRetryButton,hideCancelButton:this.props.hideCancelButton,hidePauseResumeButton:this.props.hidePauseResumeButton,recoveredState:this.props.recoveredState,showRemoveButtonAfterComplete:this.props.showRemoveButtonAfterComplete,resumableUploads:this.props.resumableUploads,individualCancellation:this.props.individualCancellation,i18n:this.props.i18n})),(0,s.h)("div",{className:"uppy-Dashboard-Item-fileInfoAndButtons"},(0,s.h)(l,{file:e,id:this.props.id,acquirers:this.props.acquirers,containerWidth:this.props.containerWidth,i18n:this.props.i18n,toggleAddFilesPanel:this.props.toggleAddFilesPanel,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),(0,s.h)(u,{file:e,metaFields:this.props.metaFields,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,showRemoveButton:h,canEditFile:this.props.canEditFile,uploadInProgressOrComplete:r,toggleFileCard:this.props.toggleFileCard,openFileEditor:this.props.openFileEditor,uppy:this.props.uppy,i18n:this.props.i18n})))}}e.exports=c},1260:(e,t,n)=>{"use strict";var s=n(172);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},i.apply(this,arguments)}const r=n(6942),o=n(3152),a=n(1207);e.exports=e=>{const t=0===e.totalFileCount,n=r("uppy-Dashboard-files",{"uppy-Dashboard-files--noFiles":t}),l=1===e.itemsPerRow?71:200,u={id:e.id,error:e.error,i18n:e.i18n,uppy:e.uppy,acquirers:e.acquirers,resumableUploads:e.resumableUploads,individualCancellation:e.individualCancellation,hideRetryButton:e.hideRetryButton,hidePauseResumeButton:e.hidePauseResumeButton,hideCancelButton:e.hideCancelButton,showLinkToFileUploadResult:e.showLinkToFileUploadResult,showRemoveButtonAfterComplete:e.showRemoveButtonAfterComplete,isWide:e.isWide,metaFields:e.metaFields,recoveredState:e.recoveredState,toggleFileCard:e.toggleFileCard,handleRequestThumbnail:e.handleRequestThumbnail,handleCancelThumbnail:e.handleCancelThumbnail},c=Object.keys(e.files);e.recoveredState&&c.sort(((t,n)=>e.files[n].isGhost-e.files[t].isGhost));const d=function(e,t){const n=[];let s=[];return e.forEach((e=>{s.length<t?s.push(e):(n.push(s),s=[e])})),s.length&&n.push(s),n}(c,e.itemsPerRow);return(0,s.h)(a,{class:n,role:"list",data:d,renderRow:t=>(0,s.h)("div",{role:"presentation",key:t[0]},t.map((t=>(0,s.h)(o,i({key:t,uppy:e.uppy},u,{role:"listitem",openFileEditor:e.openFileEditor,canEditFile:e.canEditFile,toggleAddFilesPanel:e.toggleAddFilesPanel,file:e.files[t]}))))),rowHeight:l})}},3346:(e,t,n)=>{"use strict";var s=n(172);const i=n(8294);e.exports=function(e){const{file:t}=e;if(t.preview)return(0,s.h)("img",{className:"uppy-Dashboard-Item-previewImg",alt:t.name,src:t.preview});const{color:n,icon:r}=i(t.type);return(0,s.h)("div",{className:"uppy-Dashboard-Item-previewIconWrap"},(0,s.h)("span",{className:"uppy-Dashboard-Item-previewIcon",style:{color:n}},r),(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-Dashboard-Item-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76"},(0,s.h)("rect",{fill:"#FFF",width:"58",height:"76",rx:"3",fillRule:"evenodd"})))}},4555:(e,t,n)=>{"use strict";var s=n(172);const i=n(6942),r=n(7423);e.exports=function(e){let{activePickerPanel:t,className:n,hideAllPanels:o,i18n:a,state:l,uppy:u}=e;return(0,s.h)("div",{className:i("uppy-DashboardContent-panel",n),role:"tabpanel","data-uppy-panelType":"PickerPanel",id:`uppy-DashboardContent-panel--${t.id}`,onDragOver:r,onDragLeave:r,onDrop:r,onPaste:r},(0,s.h)("div",{className:"uppy-DashboardContent-bar"},(0,s.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},a("importFrom",{name:t.name})),(0,s.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:o},a("cancel"))),(0,s.h)("div",{className:"uppy-DashboardContent-panelBody"},u.getPlugin(t.id).render(l)))}},168:(e,t,n)=>{"use strict";var s=n(172);const i="preprocessing",r="uploading";function o(e){let{files:t,i18n:n,isAllComplete:s,isAllErrored:o,isAllPaused:a,inProgressNotPausedFiles:l,newFiles:u,processingFiles:c}=e;const d=function(e,t,n,s){if(void 0===s&&(s={}),e)return"error";if(t)return"complete";if(n)return"paused";let o="waiting";const a=Object.keys(s);for(let e=0;e<a.length;e++){const{progress:t}=s[a[e]];if(t.uploadStarted&&!t.uploadComplete)return r;t.preprocess&&o!==r&&(o=i),t.postprocess&&o!==r&&o!==i&&(o="postprocessing")}return o}(o,s,a,t);switch(d){case"uploading":return n("uploadingXFiles",{smart_count:l.length});case"preprocessing":case"postprocessing":return n("processingXFiles",{smart_count:c.length});case"paused":return n("uploadPaused");case"waiting":return n("xFilesSelected",{smart_count:u.length});case"complete":return n("uploadComplete")}}e.exports=function(e){const{i18n:t,isAllComplete:n,hideCancelButton:i,maxNumberOfFiles:r,toggleAddFilesPanel:a,uppy:l}=e;let{allowNewUpload:u}=e;return u&&r&&(u=e.totalFileCount<e.maxNumberOfFiles),(0,s.h)("div",{className:"uppy-DashboardContent-bar"},n||i?(0,s.h)("div",null):(0,s.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>l.cancelAll()},t("cancel")),(0,s.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},(0,s.h)(o,e)),u?(0,s.h)("button",{className:"uppy-DashboardContent-addMore",type:"button","aria-label":t("addMoreFiles"),title:t("addMoreFiles"),onClick:()=>a(!0)},(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"15",height:"15",viewBox:"0 0 15 15"},(0,s.h)("path",{d:"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z"})),(0,s.h)("span",{className:"uppy-DashboardContent-addMoreCaption"},t("addMore"))):(0,s.h)("div",null))}},7405:(e,t,n)=>{"use strict";var s=n(172);const i=n(6942),r="uppy-transition-slideDownUp";class o extends s.Component{constructor(e){super(e),this.state={cachedChildren:null,className:""}}componentWillUpdate(e){const{cachedChildren:t}=this.state,n=(0,s.toChildArray)(e.children)[0];if(t===n)return null;const i={cachedChildren:n};n&&!t&&(i.className=`${r}-enter`,cancelAnimationFrame(this.animationFrame),clearTimeout(this.leaveTimeout),this.leaveTimeout=void 0,this.animationFrame=requestAnimationFrame((()=>{this.setState({className:`${r}-enter ${r}-enter-active`}),this.enterTimeout=setTimeout((()=>{this.setState({className:""})}),250)}))),t&&!n&&void 0===this.leaveTimeout&&(i.cachedChildren=t,i.className=`${r}-leave`,cancelAnimationFrame(this.animationFrame),clearTimeout(this.enterTimeout),this.enterTimeout=void 0,this.animationFrame=requestAnimationFrame((()=>{this.setState({className:`${r}-leave ${r}-leave-active`}),this.leaveTimeout=setTimeout((()=>{this.setState({cachedChildren:null,className:""})}),250)}))),this.setState(i)}render(){const{cachedChildren:e,className:t}=this.state;return e?(0,s.cloneElement)(e,{className:i(t,e.props.className)}):null}}e.exports=o},1207:(e,t,n)=>{"use strict";var s=n(172);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},i.apply(this,arguments)}const r={position:"relative",width:"100%",minHeight:"100%"},o={position:"absolute",top:0,left:0,width:"100%",overflow:"visible"};class a extends s.Component{constructor(e){super(e),this.handleScroll=()=>{this.setState({offset:this.base.scrollTop})},this.handleResize=()=>{this.resize()},this.focusElement=null,this.state={offset:0,height:0}}componentDidMount(){this.resize(),window.addEventListener("resize",this.handleResize)}componentWillUpdate(){this.base.contains(document.activeElement)&&(this.focusElement=document.activeElement)}componentDidUpdate(){this.focusElement&&this.focusElement.parentNode&&document.activeElement!==this.focusElement&&this.focusElement.focus(),this.focusElement=null,this.resize()}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}resize(){const{height:e}=this.state;e!==this.base.offsetHeight&&this.setState({height:this.base.offsetHeight})}render(e){let{data:t,rowHeight:n,renderRow:a,overscanCount:l=10,...u}=e;const{offset:c,height:d}=this.state;let p=Math.floor(c/n),h=Math.floor(d/n);l&&(p=Math.max(0,p-p%l),h+=l);const f=p+h+4,m=t.slice(p,f),g={...r,height:t.length*n},y={...o,top:p*n};return(0,s.h)("div",i({onScroll:this.handleScroll},u),(0,s.h)("div",{role:"presentation",style:g},(0,s.h)("div",{role:"presentation",style:y},m.map(a))))}}e.exports=a},5987:(e,t,n)=>{"use strict";e.exports=n(8955)},7341:e=>{"use strict";e.exports={strings:{closeModal:"Close Modal",addMoreFiles:"Add more files",addingMoreFiles:"Adding more files",importFrom:"Import from %{name}",dashboardWindowTitle:"Uppy Dashboard Window (Press escape to close)",dashboardTitle:"Uppy Dashboard",copyLinkToClipboardSuccess:"Link copied to clipboard.",copyLinkToClipboardFallback:"Copy the URL below",copyLink:"Copy link",back:"Back",removeFile:"Remove file",editFile:"Edit file",editing:"Editing %{file}",finishEditingFile:"Finish editing file",saveChanges:"Save changes",myDevice:"My Device",dropHint:"Drop your files here",uploadComplete:"Upload complete",uploadPaused:"Upload paused",resumeUpload:"Resume upload",pauseUpload:"Pause upload",retryUpload:"Retry upload",cancelUpload:"Cancel upload",xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},poweredBy:"Powered by %{uppy}",addMore:"Add more",editFileWithFilename:"Edit file %{file}",save:"Save",cancel:"Cancel",dropPasteFiles:"Drop files here or %{browseFiles}",dropPasteFolders:"Drop files here or %{browseFolders}",dropPasteBoth:"Drop files here, %{browseFiles} or %{browseFolders}",dropPasteImportFiles:"Drop files here, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, %{browseFolders} or import from:",dropPasteImportBoth:"Drop files here, %{browseFiles}, %{browseFolders} or import from:",importFiles:"Import files from:",browseFiles:"browse files",browseFolders:"browse folders",recoveredXFiles:{0:"We could not fully recover 1 file. Please re-select it and resume the upload.",1:"We could not fully recover %{smart_count} files. Please re-select them and resume the upload."},recoveredAllFiles:"We restored all files. You can now resume the upload.",sessionRestored:"Session restored",reSelect:"Re-select",missingRequiredMetaFields:{0:"Missing required meta field: %{fields}.",1:"Missing required meta fields: %{fields}."}}}},1063:e=>{"use strict";e.exports=function(e,t){return t||(t="Copy the URL below"),new Promise((n=>{const s=document.createElement("textarea");s.setAttribute("style",{position:"fixed",top:0,left:0,width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}),s.value=e,document.body.appendChild(s),s.select();const i=()=>{document.body.removeChild(s),window.prompt(t,e),n()};try{return document.execCommand("copy")?(document.body.removeChild(s),n()):i()}catch(e){return document.body.removeChild(s),i()}}))}},2764:(e,t,n)=>{"use strict";const s=n(181),i=n(3860),r=n(1014);e.exports=function(){let e=!1;return s(((t,n)=>{const s=r(t,n),o=s.contains(document.activeElement);if(o&&e)return;const a=s.querySelector("[data-uppy-super-focusable]");if(!o||a)if(a)a.focus({preventScroll:!0}),e=!0;else{const t=s.querySelector(i);null==t||t.focus({preventScroll:!0}),e=!1}}),260)}},1014:e=>{"use strict";e.exports=function(e,t){if(t){const n=e.querySelector(`[data-uppy-paneltype="${t}"]`);if(n)return n}return e}},8294:(e,t,n)=>{"use strict";var s=n(172);e.exports=function(e){const t={color:"#838999",icon:(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,s.h)("g",{fill:"#A7AFB7",fillRule:"nonzero"},(0,s.h)("path",{d:"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z"}),(0,s.h)("path",{d:"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z"})))};if(!e)return t;const n=e.split("/")[0],i=e.split("/")[1];return"text"===n?{color:"#5a5e69",icon:(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,s.h)("path",{d:"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z",fill:"#5A5E69",fillRule:"nonzero"}))}:"image"===n?{color:"#686de0",icon:(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},(0,s.h)("g",{fill:"#686DE0",fillRule:"evenodd"},(0,s.h)("path",{d:"M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",fillRule:"nonzero"}),(0,s.h)("path",{d:"M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z",fillRule:"nonzero"}),(0,s.h)("circle",{cx:"7.5",cy:"9.5",r:"1.5"})))}:"audio"===n?{color:"#068dbb",icon:(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,s.h)("path",{d:"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z",fill:"#049BCF",fillRule:"nonzero"}))}:"video"===n?{color:"#19af67",icon:(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,s.h)("path",{d:"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z",fill:"#19AF67",fillRule:"nonzero"}))}:"application"===n&&"pdf"===i?{color:"#e25149",icon:(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,s.h)("path",{d:"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z",fill:"#E2514A",fillRule:"nonzero"}))}:"application"===n&&-1!==["zip","x-7z-compressed","x-rar-compressed","x-tar","x-gzip","x-apple-diskimage"].indexOf(i)?{color:"#00C469",icon:(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},(0,s.h)("path",{d:"M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z",fill:"#00C469",fillRule:"nonzero"}))}:t}},7423:e=>{"use strict";e.exports=function(e){const{tagName:t}=e.target;"INPUT"!==t&&"TEXTAREA"!==t?(e.preventDefault(),e.stopPropagation()):e.stopPropagation()}},4784:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forInline=function(e,t,n){null===t||a(e,t,n)},t.forModal=a;const s=n(3708),i=n(3860),r=n(1014);function o(e,t){const n=t[0];n&&(n.focus(),e.preventDefault())}function a(e,t,n){const a=r(n,t),l=s(a.querySelectorAll(i)),u=l.indexOf(document.activeElement);!function(e){return e.contains(document.activeElement)}(a)?o(e,l):e.shiftKey&&0===u?function(e,t){const n=t[t.length-1];n&&(n.focus(),e.preventDefault())}(e,l):e.shiftKey||u!==l.length-1||o(e,l)}},1984:(e,t,n)=>{"use strict";var s=n(3522),i=n(172);const r=n(3708),o=n(5573),a=n(4920),l=n(9145);class u extends s.UIPlugin{constructor(e,t){super(e,t),this.handleDrop=async e=>{var t,n;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1});const s=await a(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,"error")}});s.length>0&&(this.uppy.log("[DragDrop] Files dropped"),this.addFiles(s)),null==(t=(n=this.opts).onDrop)||t.call(n,e)},this.type="acquirer",this.id=this.opts.id||"DragDrop",this.title="Drag & Drop",this.defaultLocale=l,this.opts={target:null,inputName:"files[]",width:"100%",height:"100%",note:null,...t},this.i18nInit(),this.isDragDropSupported=o(),this.removeDragOverClassTimeout=null,this.onInputChange=this.onInputChange.bind(this),this.handleDragOver=this.handleDragOver.bind(this),this.handleDragLeave=this.handleDragLeave.bind(this),this.handleDrop=this.handleDrop.bind(this),this.addFiles=this.addFiles.bind(this),this.render=this.render.bind(this)}addFiles(e){const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||null}})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}}onInputChange(e){const t=r(e.target.files);t.length>0&&(this.uppy.log("[DragDrop] Files selected through input"),this.addFiles(t)),e.target.value=null}handleDragOver(e){var t,n;e.preventDefault(),e.stopPropagation();const{types:s}=e.dataTransfer,i=s.some((e=>"Files"===e)),{allowNewUpload:r}=this.uppy.getState();if(!i||!r)return e.dataTransfer.dropEffect="none",void clearTimeout(this.removeDragOverClassTimeout);e.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0}),null==(t=(n=this.opts).onDragOver)||t.call(n,e)}handleDragLeave(e){var t,n;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((()=>{this.setPluginState({isDraggingOver:!1})}),50),null==(t=(n=this.opts).onDragLeave)||t.call(n,e)}renderHiddenFileInput(){const{restrictions:e}=this.uppy.opts;return(0,i.h)("input",{className:"uppy-DragDrop-input",type:"file",hidden:!0,ref:e=>{this.fileInputRef=e},name:this.opts.inputName,multiple:1!==e.maxNumberOfFiles,accept:e.allowedFileTypes,onChange:this.onInputChange})}static renderArrowSvg(){return(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-DragDrop-arrow",width:"16",height:"16",viewBox:"0 0 16 16"},(0,i.h)("path",{d:"M11 10V0H5v10H2l6 6 6-6h-3zm0 0",fillRule:"evenodd"}))}renderLabel(){return(0,i.h)("div",{className:"uppy-DragDrop-label"},this.i18nArray("dropHereOr",{browse:(0,i.h)("span",{className:"uppy-DragDrop-browse"},this.i18n("browse"))}))}renderNote(){return(0,i.h)("span",{className:"uppy-DragDrop-note"},this.opts.note)}render(){const e=`uppy-u-reset\n uppy-DragDrop-container\n ${this.isDragDropSupported?"uppy-DragDrop--isDragDropSupported":""}\n ${this.getPluginState().isDraggingOver?"uppy-DragDrop--isDraggingOver":""}\n `,t={width:this.opts.width,height:this.opts.height};return(0,i.h)("button",{type:"button",className:e,style:t,onClick:()=>this.fileInputRef.click(),onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},this.renderHiddenFileInput(),(0,i.h)("div",{className:"uppy-DragDrop-inner"},u.renderArrowSvg(),this.renderLabel(),this.renderNote()))}install(){const{target:e}=this.opts;this.setPluginState({isDraggingOver:!1}),e&&this.mount(e,this)}uninstall(){this.unmount()}}u.VERSION="2.1.2",e.exports=u},6495:(e,t,n)=>{"use strict";e.exports=n(1984)},9145:e=>{"use strict";e.exports={strings:{dropHereOr:"Drop here or %{browse}",browse:"browse"}}},5824:(e,t,n)=>{"use strict";var s=n(3522),i=n(172);const r=n(3708),o=n(6246);class a extends s.UIPlugin{constructor(e,t){super(e,t),this.id=this.opts.id||"FileInput",this.title="File Input",this.type="acquirer",this.defaultLocale=o,this.opts={target:null,pretty:!0,inputName:"files[]",...t},this.i18nInit(),this.render=this.render.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleClick=this.handleClick.bind(this)}addFiles(e){const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}}handleInputChange(e){this.uppy.log("[FileInput] Something selected through input...");const t=r(e.target.files);this.addFiles(t),e.target.value=null}handleClick(){this.input.click()}render(){const{restrictions:e}=this.uppy.opts,t=e.allowedFileTypes?e.allowedFileTypes.join(","):null;return(0,i.h)("div",{className:"uppy-FileInput-container"},(0,i.h)("input",{className:"uppy-FileInput-input",style:this.opts.pretty&&{width:"0.1px",height:"0.1px",opacity:0,overflow:"hidden",position:"absolute",zIndex:-1},type:"file",name:this.opts.inputName,onChange:this.handleInputChange,multiple:1!==e.maxNumberOfFiles,accept:t,ref:e=>{this.input=e}}),this.opts.pretty&&(0,i.h)("button",{className:"uppy-FileInput-btn",type:"button",onClick:this.handleClick},this.i18n("chooseFiles")))}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}a.VERSION="2.1.2",e.exports=a},1586:(e,t,n)=>{"use strict";e.exports=n(5824)},6246:e=>{"use strict";e.exports={strings:{chooseFiles:"Choose files"}}},6910:(e,t,n)=>{"use strict";var s=n(172);class i extends s.Component{constructor(){super(...arguments),this.ref=(0,s.createRef)()}componentWillEnter(e){this.ref.current.style.opacity="1",this.ref.current.style.transform="none",setTimeout(e,300)}componentWillLeave(e){this.ref.current.style.opacity="0",this.ref.current.style.transform="translateY(350%)",setTimeout(e,300)}render(){const{children:e}=this.props;return(0,s.h)("div",{className:"uppy-Informer-animated",ref:this.ref},e)}}e.exports=i},5485:(e,t,n)=>{"use strict";var s=n(172),i=n(3522);const r=n(6910),o=n(4041);class a extends i.UIPlugin{constructor(e,t){super(e,t),this.render=e=>(0,s.h)("div",{className:"uppy uppy-Informer"},(0,s.h)(o,null,e.info.map((e=>(0,s.h)(r,{key:e.message},(0,s.h)("p",{role:"alert"},e.message," ",e.details&&(0,s.h)("span",{"aria-label":e.details,"data-microtip-position":"top-left","data-microtip-size":"medium",role:"tooltip",onClick:()=>alert(`${e.message} \n\n ${e.details}`)},"?"))))))),this.type="progressindicator",this.id=this.opts.id||"Informer",this.title="Informer",this.opts={...t}}install(){const{target:e}=this.opts;e&&this.mount(e,this)}}a.VERSION="2.1.1",e.exports=a},4041:(e,t,n)=>{"use strict";var s=n(172);function i(e,t){const n=e._ptgLinkedRefs||(e._ptgLinkedRefs={});return n[t]||(n[t]=n=>{e.refs[t]=n})}function r(e){const t={};for(let r=0;r<e.length;r++)null!=e[r]&&(t[(n=e[r],s=r.toString(36),void 0,null!=(i=null==n?void 0:n.key)?i:s)]=e[r]);var n,s,i;return t}function o(e,t){e=e||{},t=t||{};const n=n=>t.hasOwnProperty(n)?t[n]:e[n],s={};let i=[];for(const n in e)t.hasOwnProperty(n)?i.length&&(s[n]=i,i=[]):i.push(n);const r={};for(const e in t){if(s.hasOwnProperty(e))for(let t=0;t<s[e].length;t++){const i=s[e][t];r[s[e][t]]=n(i)}r[e]=n(e)}for(let e=0;e<i.length;e++)r[i[e]]=n(i[e]);return r}class a extends s.Component{constructor(e,t){super(e,t),this.refs={},this.state={children:r((0,s.toChildArray)((0,s.toChildArray)(this.props.children))||[])},this.performAppear=this.performAppear.bind(this),this.performEnter=this.performEnter.bind(this),this.performLeave=this.performLeave.bind(this)}componentWillMount(){this.currentlyTransitioningKeys={},this.keysToAbortLeave=[],this.keysToEnter=[],this.keysToLeave=[]}componentDidMount(){const e=this.state.children;for(const t in e)e[t]&&this.performAppear(t)}componentWillReceiveProps(e){const t=r((0,s.toChildArray)(e.children)||[]),n=this.state.children;let i;for(i in this.setState((e=>({children:o(e.children,t)}))),t)if(t.hasOwnProperty(i)){const e=n&&n.hasOwnProperty(i);t[i]&&e&&this.currentlyTransitioningKeys[i]?(this.keysToEnter.push(i),this.keysToAbortLeave.push(i)):!t[i]||e||this.currentlyTransitioningKeys[i]||this.keysToEnter.push(i)}for(i in n)if(n.hasOwnProperty(i)){const e=t&&t.hasOwnProperty(i);!n[i]||e||this.currentlyTransitioningKeys[i]||this.keysToLeave.push(i)}}componentDidUpdate(){const{keysToEnter:e}=this;this.keysToEnter=[],e.forEach(this.performEnter);const{keysToLeave:t}=this;this.keysToLeave=[],t.forEach(this.performLeave)}_finishAbort(e){const t=this.keysToAbortLeave.indexOf(e);-1!==t&&this.keysToAbortLeave.splice(t,1)}performAppear(e){this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)}_handleDoneAppearing(e){const t=this.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);const n=r((0,s.toChildArray)(this.props.children)||[]);n&&n.hasOwnProperty(e)||this.performLeave(e)}performEnter(e){this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)}_handleDoneEntering(e){const t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);const n=r((0,s.toChildArray)(this.props.children)||[]);n&&n.hasOwnProperty(e)||this.performLeave(e)}performLeave(e){if(-1!==this.keysToAbortLeave.indexOf(e))return;this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)}_handleDoneLeaving(e){if(-1!==this.keysToAbortLeave.indexOf(e))return;const t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];const n=r((0,s.toChildArray)(this.props.children)||[]);if(n&&n.hasOwnProperty(e))this.performEnter(e);else{const t=(i={},o=this.state.children,Object.assign(i,o));delete t[e],this.setState({children:t})}var i,o}render(e,t){let{childFactory:n,transitionLeave:r,transitionName:o,transitionAppear:a,transitionEnter:l,transitionLeaveTimeout:u,transitionEnterTimeout:c,transitionAppearTimeout:d,component:p,...h}=e,{children:f}=t;const m=[];for(const e in f)if(f.hasOwnProperty(e)){const t=f[e];if(t){const r=i(this,e),o=(0,s.cloneElement)(n(t),{ref:r,key:e});m.push(o)}}return(0,s.h)(p,h,m)}}a.defaultProps={component:"span",childFactory:e=>e},e.exports=a},2927:(e,t,n)=>{"use strict";e.exports=n(5485)},8322:(e,t,n)=>{"use strict";var s=n(172),i=n(3522);class r extends i.UIPlugin{constructor(e,t){super(e,t),this.id=this.opts.id||"ProgressBar",this.title="Progress Bar",this.type="progressindicator",this.opts={target:"body",fixed:!1,hideAfterFinish:!0,...t},this.render=this.render.bind(this)}render(e){const t=e.totalProgress||0,n=(0===t||100===t)&&this.opts.hideAfterFinish;return(0,s.h)("div",{className:"uppy uppy-ProgressBar",style:{position:this.opts.fixed?"fixed":"initial"},"aria-hidden":n},(0,s.h)("div",{className:"uppy-ProgressBar-inner",style:{width:`${t}%`}}),(0,s.h)("div",{className:"uppy-ProgressBar-percentage"},t))}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}r.VERSION="2.1.2",e.exports=r},98:(e,t,n)=>{"use strict";e.exports=n(8322)},7271:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancelBtn=function(e){const{i18n:t,uppy:n}=e;return(0,s.h)("button",{type:"button",className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:t("cancel"),"aria-label":t("cancel"),onClick:()=>n.cancelAll(),"data-cy":"cancel","data-uppy-super-focusable":!0},(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},(0,s.h)("g",{fill:"none",fillRule:"evenodd"},(0,s.h)("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),(0,s.h)("path",{fill:"#FFF",d:"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z"}))))},t.DoneBtn=function(e){const{i18n:t,doneButtonHandler:n}=e;return(0,s.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done",onClick:n,"data-uppy-super-focusable":!0},t("done"))},t.LoadingSpinner=c,t.PauseResumeButton=function(e){const{isAllPaused:t,i18n:n,isAllComplete:i,resumableUploads:r,uppy:o}=e,a=n(t?"resume":"pause");return(0,s.h)("button",{title:a,"aria-label":a,className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onClick:function(){return i?null:r?t?o.resumeAll():o.pauseAll():o.cancelAll()},"data-uppy-super-focusable":!0},(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},(0,s.h)("g",{fill:"none",fillRule:"evenodd"},(0,s.h)("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),(0,s.h)("path",{fill:"#FFF",d:t?"M6 4.25L11.5 8 6 11.75z":"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z"}))))},t.ProgressBarComplete=function(e){const{i18n:t}=e;return(0,s.h)("div",{className:"uppy-StatusBar-content",role:"status",title:t("complete")},(0,s.h)("div",{className:"uppy-StatusBar-status"},(0,s.h)("div",{className:"uppy-StatusBar-statusPrimary"},(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"15",height:"11",viewBox:"0 0 15 11"},(0,s.h)("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})),t("complete"))))},t.ProgressBarError=function(e){const{error:t,i18n:n,complete:i,numUploads:r}=e;return(0,s.h)("div",{className:"uppy-StatusBar-content",title:n("uploadFailed")},(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11"},(0,s.h)("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})),(0,s.h)("div",{className:"uppy-StatusBar-status"},(0,s.h)("div",{className:"uppy-StatusBar-statusPrimary"},n("uploadFailed"),(0,s.h)("button",{className:"uppy-u-reset uppy-StatusBar-details","aria-label":n("showErrorDetails"),"data-microtip-position":"top-right","data-microtip-size":"medium",onClick:function(){const e=`${n("uploadFailed")} \n\n ${t}`;alert(e)},type:"button"},"?")),(0,s.h)(p,{i18n:n,complete:i,numUploads:r})))},t.ProgressBarProcessing=function(e){const{progress:t}=e,{value:n,mode:i,message:r}=t,o=Math.round(100*n);return(0,s.h)("div",{className:"uppy-StatusBar-content"},(0,s.h)(c,null),"determinate"===i?`${o}% · `:"",r)},t.ProgressBarUploading=function(e){const{i18n:t,supportsUploadProgress:n,totalProgress:i,showProgressDetails:r,isUploadStarted:o,isAllComplete:a,isAllPaused:l,newFiles:u,numUploads:d,complete:m,totalUploadedSize:g,totalSize:y,totalETA:v,startUpload:b}=e,w=u&&o;if(!o||a)return null;const E=t(l?"paused":"uploading");return(0,s.h)("div",{className:"uppy-StatusBar-content","aria-label":E,title:E},l?null:(0,s.h)(c,null),(0,s.h)("div",{className:"uppy-StatusBar-status"},(0,s.h)("div",{className:"uppy-StatusBar-statusPrimary"},n?`${E}: ${i}%`:E),l||w||!r?null:n?(0,s.h)(f,{numUploads:d,complete:m,totalUploadedSize:g,totalSize:y,totalETA:v,i18n:t}):(0,s.h)(p,{i18n:t,complete:m,numUploads:d}),w?(0,s.h)(h,{i18n:t,newFiles:u,startUpload:b}):null))},t.ProgressDetails=d,t.RetryBtn=function(e){const{i18n:t,uppy:n}=e;return(0,s.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":t("retryUpload"),onClick:()=>n.retryAll(),"data-uppy-super-focusable":!0},(0,s.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"8",height:"10",viewBox:"0 0 8 10"},(0,s.h)("path",{d:"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z"})),t("retry"))},t.UploadBtn=function(e){const{newFiles:t,isUploadStarted:n,recoveredState:r,i18n:o,uploadState:a,isSomeGhost:u,startUpload:c}=e,d=i("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":a===l.STATE_WAITING},{"uppy-StatusBar-actionBtn--disabled":u}),p=o(t&&n&&!r?"uploadXNewFiles":"uploadXFiles",{smart_count:t});return(0,s.h)("button",{type:"button",className:d,"aria-label":o("uploadXFiles",{smart_count:t}),onClick:c,disabled:u,"data-uppy-super-focusable":!0},p)};var s=n(172);const i=n(6942),r=n(5858),o=n(8236),a=n(2038),l=n(4834),u=()=>" · ";function c(){return(0,s.h)("svg",{className:"uppy-StatusBar-spinner","aria-hidden":"true",focusable:"false",width:"14",height:"14"},(0,s.h)("path",{d:"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0",fillRule:"evenodd"}))}function d(e){const{numUploads:t,complete:n,totalUploadedSize:i,totalSize:r,totalETA:l,i18n:c}=e,d=t>1;return(0,s.h)("div",{className:"uppy-StatusBar-statusSecondary"},d&&c("filesUploadedOfTotal",{complete:n,smart_count:t}),(0,s.h)("span",{className:"uppy-StatusBar-additionalInfo"},d&&u(),c("dataUploadedOfTotal",{complete:o(i),total:o(r)}),u(),c("xTimeLeft",{time:a(l)})))}function p(e){const{i18n:t,complete:n,numUploads:i}=e;return(0,s.h)("div",{className:"uppy-StatusBar-statusSecondary"},t("filesUploadedOfTotal",{complete:n,smart_count:i}))}function h(e){const{i18n:t,newFiles:n,startUpload:r}=e,o=i("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return(0,s.h)("div",{className:"uppy-StatusBar-statusSecondary"},(0,s.h)("div",{className:"uppy-StatusBar-statusSecondaryHint"},t("xMoreFilesAdded",{smart_count:n})),(0,s.h)("button",{type:"button",className:o,"aria-label":t("uploadXFiles",{smart_count:n}),onClick:r},t("upload")))}const f=r(d,500,{leading:!0,trailing:!0})},5492:(e,t,n)=>{"use strict";var s=n(172),i=n(7271);const r=n(6942),o=n(4834),a=n(7699),{STATE_ERROR:l,STATE_WAITING:u,STATE_PREPROCESSING:c,STATE_UPLOADING:d,STATE_POSTPROCESSING:p,STATE_COMPLETE:h}=o;e.exports=function(e){const{newFiles:t,allowNewUpload:n,isUploadInProgress:o,isAllPaused:f,resumableUploads:m,error:g,hideUploadButton:y,hidePauseResumeButton:v,hideCancelButton:b,hideRetryButton:w,recoveredState:E,uploadState:_,totalProgress:x,files:P,supportsUploadProgress:C,hideAfterFinish:S,isSomeGhost:O,doneButtonHandler:k,isUploadStarted:F,i18n:N,startUpload:U,uppy:T,isAllComplete:A,showProgressDetails:R,numUploads:D,complete:I,totalSize:j,totalETA:B,totalUploadedSize:M}=e,L=function(){switch(_){case p:case c:{const e=a(P);return"determinate"===e.mode?100*e.value:x}case l:return null;case d:return C?x:null;default:return x}}(),$=function(){if(E)return!1;switch(_){case u:return y||0===t;case h:return S;default:return!1}}(),z=null!=L?L:100,H=!g&&t&&!o&&!f&&n&&!y,q=!b&&_!==u&&_!==h,V=m&&!v&&_===d,W=g&&!A&&!w,K=k&&_===h,G=r("uppy-StatusBar-progress",{"is-indeterminate":function(){switch(_){case p:case c:{const{mode:e}=a(P);return"indeterminate"===e}case d:return!C;default:return!1}}()}),X=r("uppy-StatusBar",`is-${_}`,{"has-ghosts":O});return(0,s.h)("div",{className:X,"aria-hidden":$},(0,s.h)("div",{className:G,style:{width:`${z}%`},role:"progressbar","aria-label":`${z}%`,"aria-valuetext":`${z}%`,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":L}),(()=>{switch(_){case c:case p:return(0,s.h)(i.ProgressBarProcessing,{progress:a(P)});case h:return(0,s.h)(i.ProgressBarComplete,{i18n:N});case l:return(0,s.h)(i.ProgressBarError,{error:g,i18n:N,numUploads:D,complete:I});case d:return(0,s.h)(i.ProgressBarUploading,{i18n:N,supportsUploadProgress:C,totalProgress:x,showProgressDetails:R,isUploadStarted:F,isAllComplete:A,isAllPaused:f,newFiles:t,numUploads:D,complete:I,totalUploadedSize:M,totalSize:j,totalETA:B,startUpload:U});default:return null}})(),(0,s.h)("div",{className:"uppy-StatusBar-actions"},E||H?(0,s.h)(i.UploadBtn,{newFiles:t,isUploadStarted:F,recoveredState:E,i18n:N,isSomeGhost:O,startUpload:U,uploadState:_}):null,W?(0,s.h)(i.RetryBtn,{i18n:N,uppy:T}):null,V?(0,s.h)(i.PauseResumeButton,{isAllPaused:f,i18n:N,isAllComplete:A,resumableUploads:m,uppy:T}):null,q?(0,s.h)(i.CancelBtn,{i18n:N,uppy:T}):null,K?(0,s.h)(i.DoneBtn,{i18n:N,doneButtonHandler:k}):null))}},4834:e=>{"use strict";e.exports={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"}},7587:(e,t,n)=>{"use strict";var s=n(3522);const i=n(7143),r=n(1839),o=n(8200),a=n(4834),l=n(5492),u=n(409);function c(e,t,n,s){if(e&&!t)return a.STATE_ERROR;if(t)return a.STATE_COMPLETE;if(n)return a.STATE_WAITING;let i=a.STATE_WAITING;const r=Object.keys(s);for(let e=0;e<r.length;e++){const{progress:t}=s[r[e]];if(t.uploadStarted&&!t.uploadComplete)return a.STATE_UPLOADING;t.preprocess&&i!==a.STATE_UPLOADING&&(i=a.STATE_PREPROCESSING),t.postprocess&&i!==a.STATE_UPLOADING&&i!==a.STATE_PREPROCESSING&&(i=a.STATE_POSTPROCESSING)}return i}class d extends s.UIPlugin{constructor(e,t){super(e,t),this.startUpload=()=>{const{recoveredState:e}=this.uppy.getState();if(!e)return this.uppy.upload().catch((()=>{}));this.uppy.emit("restore-confirmed")},this.id=this.opts.id||"StatusBar",this.title="StatusBar",this.type="progressindicator",this.defaultLocale=u,this.opts={target:"body",hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0,doneButtonHandler:null,...t},this.i18nInit(),this.render=this.render.bind(this),this.install=this.install.bind(this)}render(e){const{capabilities:t,files:n,allowNewUpload:s,totalProgress:o,error:a,recoveredState:u}=e,{newFiles:d,startedFiles:p,completeFiles:h,inProgressNotPausedFiles:f,isUploadStarted:m,isAllComplete:g,isAllErrored:y,isAllPaused:v,isUploadInProgress:b,isSomeGhost:w}=this.uppy.getObjectOfFilesPerState(),E=u?Object.values(n):d,_=function(e){const t=function(e){let t=0;return e.forEach((e=>{t+=i(e.progress)})),t}(e);if(0===t)return 0;const n=e.reduce(((e,t)=>e+r(t.progress)),0);return Math.round(n/t*10)/10}(f),x=!!t.resumableUploads,P=!1!==t.uploadProgress;let C=0,S=0;return p.forEach((e=>{C+=e.progress.bytesTotal||0,S+=e.progress.bytesUploaded||0})),l({error:a,uploadState:c(a,g,u,e.files||{}),allowNewUpload:s,totalProgress:o,totalSize:C,totalUploadedSize:S,isAllComplete:!1,isAllPaused:v,isAllErrored:y,isUploadStarted:m,isUploadInProgress:b,isSomeGhost:w,recoveredState:u,complete:h.length,newFiles:E.length,numUploads:p.length,totalETA:_,files:n,i18n:this.i18n,uppy:this.uppy,startUpload:this.startUpload,doneButtonHandler:this.opts.doneButtonHandler,resumableUploads:x,supportsUploadProgress:P,showProgressDetails:this.opts.showProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideAfterFinish:this.opts.hideAfterFinish,isTargetDOMEl:this.isTargetDOMEl})}onMount(){const e=this.el;o(e)||(e.dir="ltr")}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}d.VERSION="2.2.2",e.exports=d},7699:e=>{"use strict";e.exports=function(e){const t=[];let n,s;for(const{progress:i}of Object.values(e)){const{preprocess:e,postprocess:r}=i;null==s&&(e||r)&&({mode:n,message:s}=e||r),"determinate"===(null==e?void 0:e.mode)&&t.push(e.value),"determinate"===(null==r?void 0:r.mode)&&t.push(r.value)}return{mode:n,message:s,value:t.reduce(((e,n)=>e+n/t.length),0)}}},5711:(e,t,n)=>{"use strict";e.exports=n(7587)},409:e=>{"use strict";e.exports={strings:{uploading:"Uploading",complete:"Complete",uploadFailed:"Upload failed",paused:"Paused",retry:"Retry",cancel:"Cancel",pause:"Pause",resume:"Resume",done:"Done",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},dataUploadedOfTotal:"%{complete} of %{total}",xTimeLeft:"%{time} left",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},upload:"Upload",retryUpload:"Retry upload",xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"},showErrorDetails:"Show error details"}}},5446:e=>{"use strict";var t=0;function n(e){return"__private_"+t+++"_"+e}var s=n("publish");class i{constructor(){Object.defineProperty(this,s,{value:r}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t={...this.state},n={...this.state,...e};this.state=n,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,s)[s](t,n,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach((e=>{e(...t)}))}i.VERSION="2.1.1",e.exports=function(){return new i}},5947:(e,t,n)=>{"use strict";var s=n(3522),i=n(9797);const r=n(6902),o=n(3294),a=n(7806),l=n(1733);class u extends s.UIPlugin{constructor(e,t){if(super(e,t),this.onFileAdded=e=>{!e.preview&&e.data&&a(e.type)&&!e.isRemote&&this.addToQueue(e.id)},this.onCancelRequest=e=>{const t=this.queue.indexOf(e.id);-1!==t&&this.queue.splice(t,1)},this.onFileRemoved=e=>{const t=this.queue.indexOf(e.id);-1!==t&&this.queue.splice(t,1),e.preview&&o(e.preview)&&URL.revokeObjectURL(e.preview)},this.onRestored=()=>{this.uppy.getFiles().filter((e=>e.isRestored)).forEach((e=>{e.preview&&!o(e.preview)||this.addToQueue(e.id)}))},this.onAllFilesRemoved=()=>{this.queue=[]},this.waitUntilAllProcessed=e=>{e.forEach((e=>{const t=this.uppy.getFile(e);this.uppy.emit("preprocess-progress",t,{mode:"indeterminate",message:this.i18n("generatingThumbnails")})}));const t=()=>{e.forEach((e=>{const t=this.uppy.getFile(e);this.uppy.emit("preprocess-complete",t)}))};return new Promise((e=>{this.queueProcessing?this.uppy.once("thumbnail:all-generated",(()=>{t(),e()})):(t(),e())}))},this.type="modifier",this.id=this.opts.id||"ThumbnailGenerator",this.title="Thumbnail Generator",this.queue=[],this.queueProcessing=!1,this.defaultThumbnailDimension=200,this.thumbnailType=this.opts.thumbnailType||"image/jpeg",this.defaultLocale=l,this.opts={thumbnailWidth:null,thumbnailHeight:null,waitForThumbnailsBeforeUpload:!1,lazy:!1,...t},this.i18nInit(),this.opts.lazy&&this.opts.waitForThumbnailsBeforeUpload)throw new Error("ThumbnailGenerator: The `lazy` and `waitForThumbnailsBeforeUpload` options are mutually exclusive. Please ensure at most one of them is set to `true`.")}createThumbnail(e,t,n){const s=URL.createObjectURL(e.data),r=new Promise(((e,t)=>{const n=new Image;n.src=s,n.addEventListener("load",(()=>{URL.revokeObjectURL(s),e(n)})),n.addEventListener("error",(e=>{URL.revokeObjectURL(s),t(e.error||new Error("Could not create thumbnail"))}))})),o=(0,i.rotation)(e.data).catch((()=>1));return Promise.all([r,o]).then((e=>{let[s,i]=e;const r=this.getProportionalDimensions(s,t,n,i.deg),o=this.rotateImage(s,i),a=this.resizeImage(o,r.width,r.height);return this.canvasToBlob(a,this.thumbnailType,80)})).then((e=>URL.createObjectURL(e)))}getProportionalDimensions(e,t,n,s){let i=e.width/e.height;return 90!==s&&270!==s||(i=e.height/e.width),null!=t?{width:t,height:Math.round(t/i)}:null!=n?{width:Math.round(n*i),height:n}:{width:this.defaultThumbnailDimension,height:Math.round(this.defaultThumbnailDimension/i)}}resizeImage(e,t,n){let s=this.protect(e),i=Math.ceil(Math.log2(s.width/t));i<1&&(i=1);let r=t*2**(i-1),o=n*2**(i-1);for(;i--;){const e=document.createElement("canvas");e.width=r,e.height=o,e.getContext("2d").drawImage(s,0,0,r,o),s=e,r=Math.round(r/2),o=Math.round(o/2)}return s}setPreviewURL(e,t){this.uppy.setFileState(e,{preview:t})}addToQueue(e){this.queue.push(e),!1===this.queueProcessing&&this.processQueue()}processQueue(){if(this.queueProcessing=!0,this.queue.length>0){const e=this.uppy.getFile(this.queue.shift());return e?this.requestThumbnail(e).catch((()=>{})).then((()=>this.processQueue())):(this.uppy.log("[ThumbnailGenerator] file was removed before a thumbnail could be generated, but not removed from the queue. This is probably a bug","error"),Promise.resolve())}return this.queueProcessing=!1,this.uppy.log("[ThumbnailGenerator] Emptied thumbnail queue"),this.uppy.emit("thumbnail:all-generated"),Promise.resolve()}requestThumbnail(e){return a(e.type)&&!e.isRemote?this.createThumbnail(e,this.opts.thumbnailWidth,this.opts.thumbnailHeight).then((t=>{this.setPreviewURL(e.id,t),this.uppy.log(`[ThumbnailGenerator] Generated thumbnail for ${e.id}`),this.uppy.emit("thumbnail:generated",this.uppy.getFile(e.id),t)})).catch((t=>{this.uppy.log(`[ThumbnailGenerator] Failed thumbnail for ${e.id}:`,"warning"),this.uppy.log(t,"warning"),this.uppy.emit("thumbnail:error",this.uppy.getFile(e.id),t)})):Promise.resolve()}install(){this.uppy.on("file-removed",this.onFileRemoved),this.uppy.on("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("thumbnail:cancel",this.onCancelRequest)):(this.uppy.on("file-added",this.onFileAdded),this.uppy.on("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.addPreProcessor(this.waitUntilAllProcessed)}uninstall(){this.uppy.off("file-removed",this.onFileRemoved),this.uppy.off("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("thumbnail:cancel",this.onCancelRequest)):(this.uppy.off("file-added",this.onFileAdded),this.uppy.off("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.removePreProcessor(this.waitUntilAllProcessed)}}u.VERSION="2.2.2",e.exports=u,u.prototype.canvasToBlob=function(e,t,n){try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){if(18===e.code)return Promise.reject(new Error("cannot read image, probably an svg with external resources"))}return e.toBlob?new Promise((s=>{e.toBlob(s,t,n)})).then((e=>{if(null===e)throw new Error("cannot read image, probably an svg with external resources");return e})):Promise.resolve().then((()=>r(e.toDataURL(t,n),{}))).then((e=>{if(null===e)throw new Error("could not extract blob, probably an old browser");return e}))},u.prototype.protect=function(e){const t=e.width/e.height,n=5e6,s=4096;let i=Math.floor(Math.sqrt(n*t)),r=Math.floor(n/Math.sqrt(n*t));if(i>s&&(i=s,r=Math.round(i/t)),r>s&&(r=s,i=Math.round(t*r)),e.width>i){const t=document.createElement("canvas");return t.width=i,t.height=r,t.getContext("2d").drawImage(e,0,0,i,r),t}return e},u.prototype.rotateImage=function(e,t){let n=e.width,s=e.height;90!==t.deg&&270!==t.deg||(n=e.height,s=e.width);const i=document.createElement("canvas");i.width=n,i.height=s;const r=i.getContext("2d");return r.translate(n/2,s/2),t.canvas&&(r.rotate(t.rad),r.scale(t.scaleX,t.scaleY)),r.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),i}},1733:e=>{"use strict";e.exports={strings:{generatingThumbnails:"Generating thumbnails..."}}},708:(e,t,n)=>{"use strict";var s=n(6290);e.exports=function(e){return(t,n)=>{if("undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova)||"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase())return s.defaultOptions.fingerprint(t,n);const i=["tus",e.id,n.endpoint].join("-");return Promise.resolve(i)}}},8395:(e,t,n)=>{"use strict";var s=n(6290),i=n(8327),r=n(9315);function o(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var a=0;function l(e){return"__private_"+a+++"_"+e}const u=n(2522),c=n(693),d=n(9097),p=n(3379),h=n(8692),f=n(6144),m=n(6132),g=n(4043),y=n(708),v={endpoint:"",uploadUrl:null,metadata:{},uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,overridePatchMethod:!1,headers:{},addRequestId:!1,chunkSize:1/0,retryDelays:[100,1e3,3e3,5e3],parallelUploads:1,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1};var b=l("retryDelayIterator"),w=l("queueRequestSocketToken"),E=l("requestSocketToken");class _ extends u{constructor(e,t){var n,s;super(e,t),Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,w,{writable:!0,value:void 0}),Object.defineProperty(this,E,{writable:!0,value:async e=>{const t=new(e.remote.providerOptions.provider?i.Provider:i.RequestClient)(this.uppy,e.remote.providerOptions),n={...this.opts};return e.tus&&Object.assign(n,e.tus),(await t.post(e.remote.url,{...e.remote.body,endpoint:n.endpoint,uploadUrl:n.uploadUrl,protocol:"tus",size:e.data.size,headers:n.headers,metadata:e.meta})).token}}),this.type="uploader",this.id=this.opts.id||"Tus",this.title="Tus";const a={useFastRemoteRetry:!0,limit:20,retryDelays:v.retryDelays,withCredentials:!1};if(this.opts={...a,...t},"autoRetry"in t)throw new Error("The `autoRetry` option was deprecated and has been removed.");this.requests=null!=(n=this.opts.rateLimitedQueue)?n:new r.RateLimitedQueue(this.opts.limit),o(this,b)[b]=null==(s=this.opts.retryDelays)?void 0:s.values(),this.uploaders=Object.create(null),this.uploaderEvents=Object.create(null),this.uploaderSockets=Object.create(null),this.handleResetProgress=this.handleResetProgress.bind(this),this.handleUpload=this.handleUpload.bind(this),o(this,w)[w]=this.requests.wrapPromiseFunction(o(this,E)[E])}handleResetProgress(){const e={...this.uppy.getState().files};Object.keys(e).forEach((t=>{if(e[t].tus&&e[t].tus.uploadUrl){const n={...e[t].tus};delete n.uploadUrl,e[t]={...e[t],tus:n}}})),this.uppy.setState({files:e})}resetUploaderReferences(e,t){if(void 0===t&&(t={}),this.uploaders[e]){const n=this.uploaders[e];n.abort(),t.abort&&n.abort(!0),this.uploaders[e]=null}this.uploaderEvents[e]&&(this.uploaderEvents[e].remove(),this.uploaderEvents[e]=null),this.uploaderSockets[e]&&(this.uploaderSockets[e].close(),this.uploaderSockets[e]=null)}upload(e){var t=this;return this.resetUploaderReferences(e.id),new Promise(((n,i)=>{let r,a,l;this.uppy.emit("upload-started",e);const u={...this.opts,...e.tus||{}};"function"==typeof u.headers&&(u.headers=u.headers(e));const c={...v,...u};c.fingerprint=y(e),c.onBeforeRequest=t=>{let n;if(t.getUnderlyingObject().withCredentials=!!u.withCredentials,"function"==typeof u.onBeforeRequest&&(n=u.onBeforeRequest(t,e)),g(r,"shouldBeRequeued")){if(!r.shouldBeRequeued)return Promise.reject();let t;const s=new Promise((e=>{t=e}));return r=this.requests.run((()=>(e.isPaused&&r.abort(),t(),()=>{}))),Promise.all([s,n])}return n},c.onError=t=>{var n;this.uppy.log(t);const s=t.originalRequest?t.originalRequest.getUnderlyingObject():null;m(s)&&(t=new f(t,s)),this.resetUploaderReferences(e.id),null==(n=r)||n.abort(),this.uppy.emit("upload-error",e,t),i(t)},c.onProgress=(t,n)=>{this.onReceiveUploadUrl(e,l.url),this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t,bytesTotal:n})},c.onSuccess=()=>{const t={uploadURL:l.url};this.resetUploaderReferences(e.id),r.done(),this.uppy.emit("upload-success",e,t),l.url&&this.uppy.log(`Download ${l.file.name} from ${l.url}`),n(l)};const d=e=>{var t;const n=null==e||null==(t=e.originalResponse)?void 0:t.getStatus();if(429===n){if(!this.requests.isPaused){var s;const e=null==(s=o(this,b)[b])?void 0:s.next();if(null==e||e.done)return!1;this.requests.rateLimit(e.value)}}else{if(n>400&&n<500&&409!==n)return!1;"undefined"!=typeof navigator&&!1===navigator.onLine&&(this.requests.isPaused||(this.requests.pause(),window.addEventListener("online",(()=>{this.requests.resume()}),{once:!0})))}return r.abort(),r={shouldBeRequeued:!0,abort(){this.shouldBeRequeued=!1},done(){throw new Error("Cannot mark a queued request as done: this indicates a bug")},fn(){throw new Error("Cannot run a queued request: this indicates a bug")}},!0};null!=u.onShouldRetry?c.onShouldRetry=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.onShouldRetry(...t,d)}:c.onShouldRetry=d;const p=(e,t,n)=>{g(e,t)&&!g(e,n)&&(e[n]=e[t])},w={};(Array.isArray(u.metaFields)?u.metaFields:Object.keys(e.meta)).forEach((t=>{w[t]=e.meta[t]})),p(w,"type","filetype"),p(w,"name","filename"),c.metadata=w,l=new s.Upload(e.data,c),this.uploaders[e.id]=l,this.uploaderEvents[e.id]=new h(this.uppy),a=()=>(e.isPaused||l.start(),()=>{}),l.findPreviousUploads().then((t=>{const n=t[0];n&&(this.uppy.log(`[Tus] Resuming upload of ${e.id} started at ${n.creationTime}`),l.resumeFromPreviousUpload(n))})),r=this.requests.run(a),this.onFileRemove(e.id,(t=>{r.abort(),this.resetUploaderReferences(e.id,{abort:!!l.url}),n(`upload ${t} was removed`)})),this.onPause(e.id,(e=>{r.abort(),e?l.abort():r=this.requests.run(a)})),this.onPauseAll(e.id,(()=>{r.abort(),l.abort()})),this.onCancelAll(e.id,(function(s){let{reason:i}=void 0===s?{}:s;"user"===i&&(r.abort(),t.resetUploaderReferences(e.id,{abort:!!l.url})),n(`upload ${e.id} was canceled`)})),this.onResumeAll(e.id,(()=>{r.abort(),e.error&&l.abort(),r=this.requests.run(a)}))})).catch((t=>{throw this.uppy.emit("upload-error",e,t),t}))}async uploadRemote(e){this.resetUploaderReferences(e.id),e.progress.uploadStarted&&e.isRestored||this.uppy.emit("upload-started",e);try{if(e.serverToken)return this.connectToServerSocket(e);const t=await o(this,w)[w](e);if(!this.uppy.getState().files[e.id])return;return this.uppy.setFileState(e.id,{serverToken:t}),this.connectToServerSocket(this.uppy.getFile(e.id))}catch(t){throw this.uppy.emit("upload-error",e,t),t}}connectToServerSocket(e){var t=this;return new Promise(((n,s)=>{const r=e.serverToken,o=d(e.remote.companionUrl),a=new i.Socket({target:`${o}/api/${r}`});let l;this.uploaderSockets[e.id]=a,this.uploaderEvents[e.id]=new h(this.uppy),this.onFileRemove(e.id,(()=>{l.abort(),a.send("cancel",{}),this.resetUploaderReferences(e.id),n(`upload ${e.id} was removed`)})),this.onPause(e.id,(e=>{e?(l.abort(),a.send("pause",{})):(l.abort(),l=this.requests.run((()=>(a.send("resume",{}),()=>{}))))})),this.onPauseAll(e.id,(()=>{l.abort(),a.send("pause",{})})),this.onCancelAll(e.id,(function(s){let{reason:i}=void 0===s?{}:s;"user"===i&&(l.abort(),a.send("cancel",{}),t.resetUploaderReferences(e.id)),n(`upload ${e.id} was canceled`)})),this.onResumeAll(e.id,(()=>{l.abort(),e.error&&a.send("pause",{}),l=this.requests.run((()=>(a.send("resume",{}),()=>{})))})),this.onRetry(e.id,(()=>{a.isOpen&&(a.send("pause",{}),a.send("resume",{}))})),this.onRetryAll(e.id,(()=>{a.isOpen&&(a.send("pause",{}),a.send("resume",{}))})),a.on("progress",(t=>c(this,t,e))),a.on("error",(t=>{const{message:n}=t.error,i=Object.assign(new Error(n),{cause:t.error});this.opts.useFastRemoteRetry?a.close():(this.resetUploaderReferences(e.id),this.uppy.setFileState(e.id,{serverToken:null})),this.uppy.emit("upload-error",e,i),l.done(),s(i)})),a.on("success",(t=>{const s={uploadURL:t.url};this.uppy.emit("upload-success",e,s),this.resetUploaderReferences(e.id),l.done(),n()})),l=this.requests.run((()=>(e.isPaused&&a.send("pause",{}),()=>{})))}))}onReceiveUploadUrl(e,t){const n=this.uppy.getFile(e.id);n&&(n.tus&&n.tus.uploadUrl===t||(this.uppy.log("[Tus] Storing upload url"),this.uppy.setFileState(n.id,{tus:{...n.tus,uploadUrl:t}})))}onFileRemove(e,t){this.uploaderEvents[e].on("file-removed",(n=>{e===n.id&&t(n.id)}))}onPause(e,t){this.uploaderEvents[e].on("upload-pause",((n,s)=>{e===n&&t(s)}))}onRetry(e,t){this.uploaderEvents[e].on("upload-retry",(n=>{e===n&&t()}))}onRetryAll(e,t){this.uploaderEvents[e].on("retry-all",(()=>{this.uppy.getFile(e)&&t()}))}onPauseAll(e,t){this.uploaderEvents[e].on("pause-all",(()=>{this.uppy.getFile(e)&&t()}))}onCancelAll(e,t){var n=this;this.uploaderEvents[e].on("cancel-all",(function(){n.uppy.getFile(e)&&t(...arguments)}))}onResumeAll(e,t){this.uploaderEvents[e].on("resume-all",(()=>{this.uppy.getFile(e)&&t()}))}uploadFiles(e){const t=e.map(((t,n)=>{const s=n+1,i=e.length;return"error"in t&&t.error?Promise.reject(new Error(t.error)):t.isRemote?(t.progress.uploadStarted&&t.isRestored||this.uppy.emit("upload-started",t),this.uploadRemote(t,s,i)):(t.progress.uploadStarted&&t.isRestored||this.uppy.emit("upload-started",t),this.upload(t,s,i))}));return p(t)}handleUpload(e){if(0===e.length)return this.uppy.log("[Tus] No files to upload"),Promise.resolve();0===this.opts.limit&&this.uppy.log("[Tus] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/tus/#limit-0","warning"),this.uppy.log("[Tus] Uploading...");const t=e.map((e=>this.uppy.getFile(e)));return this.uploadFiles(t).then((()=>null))}install(){this.uppy.setState({capabilities:{...this.uppy.getState().capabilities,resumableUploads:!0}}),this.uppy.addUploader(this.handleUpload),this.uppy.on("reset-progress",this.handleResetProgress)}uninstall(){this.uppy.setState({capabilities:{...this.uppy.getState().capabilities,resumableUploads:!1}}),this.uppy.removeUploader(this.handleUpload)}}_.VERSION="2.4.6",e.exports=_},3461:(e,t,n)=>{"use strict";const s=n(4043);class i extends Error{constructor(e,t){void 0===t&&(t={}),super(e),this.cause=t.cause,this.cause&&s(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}}e.exports=i},8692:e=>{"use strict";function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function s(e){return"__private_"+n+++"_"+e}var i=s("emitter"),r=s("events");e.exports=class{constructor(e){Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,r,{writable:!0,value:[]}),t(this,i)[i]=e}on(e,n){return t(this,r)[r].push([e,n]),t(this,i)[i].on(e,n)}remove(){for(const[e,n]of t(this,r)[r].splice(0))t(this,i)[i].off(e,n)}}},3860:e=>{"use strict";e.exports=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])']},6144:e=>{"use strict";class t extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}e.exports=t},9315:(e,t)=>{"use strict";function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}Object.defineProperty(t,"__esModule",{value:!0}),t.internalRateLimitedQueue=t.RateLimitedQueue=void 0;var s=0;function i(e){return"__private_"+s+++"_"+e}var r=i("activeRequests"),o=i("queuedHandlers"),a=i("paused"),l=i("pauseTimer"),u=i("downLimit"),c=i("upperLimit"),d=i("rateLimitingTimer"),p=i("call"),h=i("queueNext"),f=i("next"),m=i("queue"),g=i("dequeue"),y=i("resume"),v=i("increaseLimit");function b(e){n(this,r)[r]+=1;let t,s=!1;try{t=e()}catch(e){throw n(this,r)[r]-=1,e}return{abort:()=>{s||(s=!0,n(this,r)[r]-=1,t(),n(this,h)[h]())},done:()=>{s||(s=!0,n(this,r)[r]-=1,n(this,h)[h]())}}}function w(){queueMicrotask((()=>n(this,f)[f]()))}function E(){if(n(this,a)[a]||n(this,r)[r]>=this.limit)return;if(0===n(this,o)[o].length)return;const e=n(this,o)[o].shift(),t=n(this,p)[p](e.fn);e.abort=t.abort,e.done=t.done}function _(e,t){void 0===t&&(t={});const s={fn:e,priority:t.priority||0,abort:()=>{n(this,g)[g](s)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},i=n(this,o)[o].findIndex((e=>s.priority>e.priority));return-1===i?n(this,o)[o].push(s):n(this,o)[o].splice(i,0,s),s}function x(e){const t=n(this,o)[o].indexOf(e);-1!==t&&n(this,o)[o].splice(t,1)}t.RateLimitedQueue=class{constructor(e){Object.defineProperty(this,g,{value:x}),Object.defineProperty(this,m,{value:_}),Object.defineProperty(this,f,{value:E}),Object.defineProperty(this,h,{value:w}),Object.defineProperty(this,p,{value:b}),Object.defineProperty(this,r,{writable:!0,value:0}),Object.defineProperty(this,o,{writable:!0,value:[]}),Object.defineProperty(this,a,{writable:!0,value:!1}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,u,{writable:!0,value:1}),Object.defineProperty(this,c,{writable:!0,value:void 0}),Object.defineProperty(this,d,{writable:!0,value:void 0}),Object.defineProperty(this,y,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,v,{writable:!0,value:()=>{if(n(this,a)[a])n(this,d)[d]=setTimeout(n(this,v)[v],0);else{n(this,u)[u]=this.limit,this.limit=Math.ceil((n(this,c)[c]+n(this,u)[u])/2);for(let e=n(this,u)[u];e<=this.limit;e++)n(this,h)[h]();n(this,c)[c]-n(this,u)[u]>3?n(this,d)[d]=setTimeout(n(this,v)[v],2e3):n(this,u)[u]=Math.floor(n(this,u)[u]/2)}}}),this.limit="number"!=typeof e||0===e?1/0:e}run(e,t){return!n(this,a)[a]&&n(this,r)[r]<this.limit?n(this,p)[p](e):n(this,m)[m](e,t)}wrapPromiseFunction(e,t){var n=this;return function(){for(var s=arguments.length,i=new Array(s),r=0;r<s;r++)i[r]=arguments[r];let o;const a=new Promise(((s,r)=>{o=n.run((()=>{let t,n;try{n=Promise.resolve(e(...i))}catch(e){n=Promise.reject(e)}return n.then((e=>{t?r(t):(o.done(),s(e))}),(e=>{t?r(t):(o.done(),r(e))})),()=>{t=new Error("Cancelled")}}),t)}));return a.abort=()=>{o.abort()},a}}resume(){n(this,a)[a]=!1,clearTimeout(n(this,l)[l]);for(let e=0;e<this.limit;e++)n(this,h)[h]()}pause(e){void 0===e&&(e=null),n(this,a)[a]=!0,clearTimeout(n(this,l)[l]),null!=e&&(n(this,l)[l]=setTimeout(n(this,y)[y],e))}rateLimit(e){clearTimeout(n(this,d)[d]),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(n(this,c)[c]=this.limit-1,this.limit=n(this,u)[u],n(this,d)[d]=setTimeout(n(this,v)[v],e))}get isPaused(){return n(this,a)[a]}};const P=Symbol("__queue");t.internalRateLimitedQueue=P},6458:(e,t,n)=>{"use strict";function s(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var i=0;function r(e){return"__private_"+i+++"_"+e}const o=n(4043);function a(e,t,n){const s=[];return e.forEach((e=>"string"!=typeof e?s.push(e):t[Symbol.split](e).forEach(((e,t,i)=>{""!==e&&s.push(e),t<i.length-1&&s.push(n)})))),s}function l(e,t){const n=/\$/g;let s=[e];if(null==t)return s;for(const e of Object.keys(t))if("_"!==e){let i=t[e];"string"==typeof i&&(i=n[Symbol.replace](i,"$$$$")),s=a(s,new RegExp(`%\\{${e}\\}`,"g"),i)}return s}var u=r("apply");function c(e){if(null==e||!e.strings)return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}e.exports=class{constructor(e){Object.defineProperty(this,u,{value:c}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(e)?e.forEach(s(this,u)[u],this):s(this,u)[u](e)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(!o(this.locale.strings,e))throw new Error(`missing string: ${e}`);const n=this.locale.strings[e];if("object"==typeof n){if(t&&void 0!==t.smart_count)return l(n[this.locale.pluralize(t.smart_count)],t);throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return l(n,t)}}},6902:e=>{"use strict";const t=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;e.exports=function(e,n,s){var i,r;const o=t.exec(e),a=null!=(i=null!=(r=n.mimeType)?r:null==o?void 0:o[1])?i:"plain/text";let l;if(null!=o[2]){const e=atob(decodeURIComponent(o[3])),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);l=[t]}else l=[decodeURIComponent(o[3])];return s?new File(l,n.name||"",{type:a}):new Blob(l,{type:a})}},693:(e,t,n)=>{"use strict";const s=n(5858);e.exports=s((function(e,t,n){const{progress:s,bytesUploaded:i,bytesTotal:r}=t;s&&(e.uppy.log(`Upload progress: ${s}`),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:i,bytesTotal:r}))}),300,{leading:!0,trailing:!0})},9214:(e,t,n)=>{"use strict";const s=n(6144);e.exports=function(){return fetch(...arguments).catch((e=>{throw"AbortError"===e.name?e:new s(e)}))}},1167:(e,t,n)=>{"use strict";const s=n(8172);e.exports=function(e){if("string"==typeof e){const t=document.querySelectorAll(e);return 0===t.length?null:Array.from(t)}return"object"==typeof e&&s(e)?[e]:null}},515:(e,t,n)=>{"use strict";const s=n(8172);e.exports=function(e,t){return void 0===t&&(t=document),"string"==typeof e?t.querySelector(e):s(e)?e:null}},6340:e=>{"use strict";function t(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}e.exports=function(e){let n="uppy";return"string"==typeof e.name&&(n+=`-${t(e.name.toLowerCase())}`),void 0!==e.type&&(n+=`-${e.type}`),e.meta&&"string"==typeof e.meta.relativePath&&(n+=`-${t(e.meta.relativePath.toLowerCase())}`),void 0!==e.data.size&&(n+=`-${e.data.size}`),void 0!==e.data.lastModified&&(n+=`-${e.data.lastModified}`),n}},1839:e=>{"use strict";e.exports=function(e){return e.bytesTotal-e.bytesUploaded}},4920:(e,t,n)=>{"use strict";const s=n(4691),i=n(4352);e.exports=async function(e,t){let{logDropError:n=()=>{}}=void 0===t?{}:t;try{const t=[];for await(const i of s(e,n))t.push(i);return t}catch{return i(e)}}},4352:(e,t,n)=>{"use strict";const s=n(3708);e.exports=function(e){const t=s(e.files);return Promise.resolve(t)}},9901:e=>{"use strict";e.exports=function e(t,n,s,i){let{onSuccess:r}=i;t.readEntries((i=>{const o=[...n,...i];i.length?queueMicrotask((()=>{e(t,o,s,{onSuccess:r})})):r(o)}),(e=>{s(e),r(n)}))}},4691:(e,t,n)=>{"use strict";const s=n(9901);function i(e,t){return null==e?e:{kind:e.isFile?"file":e.isDirectory?"directory":void 0,name:e.name,getFile:()=>new Promise(((t,n)=>e.file(t,n))),async*values(){const n=e.createReader(),r=await new Promise((e=>{s(n,[],t,{onSuccess:n=>e(n.map((e=>i(e,t))))})}));yield*r}}}async function*r(e,t){if("file"===e.kind){const n=await e.getFile();null!==n&&(n.relativePath=t?`${t}/${e.name}`:null,yield n)}else if("directory"===e.kind)for await(const n of e.values())yield*r(n,`${t}/${e.name}`)}e.exports=async function*(e,t){const n=await Promise.all(Array.from(e.items,(async e=>{var n;return{lastResortFile:e.getAsFile(),entry:null!=(n=await(null==e.getAsFileSystemHandle?void 0:e.getAsFileSystemHandle()))?n:i(e.webkitGetAsEntry(),t)}})));for(const{lastResortFile:e,entry:s}of n)if(null!=s)try{yield*r(s,"")}catch(n){e?yield e:t(n)}}},8545:e=>{"use strict";e.exports=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}},7856:(e,t,n)=>{"use strict";const s=n(8545),i=n(2367);e.exports=function(e){var t;if(e.type)return e.type;const n=e.name?null==(t=s(e.name).extension)?void 0:t.toLowerCase():null;return n&&n in i?i[n]:"application/octet-stream"}},9097:e=>{"use strict";e.exports=function(e){const t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${t}`}},7143:e=>{"use strict";e.exports=function(e){if(!e.bytesUploaded)return 0;const t=Date.now()-e.uploadStarted;return e.bytesUploaded/(t/1e3)}},8200:e=>{"use strict";e.exports=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir}},3792:e=>{"use strict";function t(e){return e<10?`0${e}`:e.toString()}e.exports=function(){const e=new Date;return`${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`}},4043:e=>{"use strict";e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},8172:e=>{"use strict";e.exports=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE}},5573:e=>{"use strict";e.exports=function(){const e=document.body;return"draggable"in e&&"ondragstart"in e&&"ondrop"in e&&"FormData"in window&&"FileReader"in window}},6132:e=>{"use strict";e.exports=function(e){return!!e&&(0!==e.readyState&&4!==e.readyState||0===e.status)}},3294:e=>{"use strict";e.exports=function(e){return e.startsWith("blob:")}},7806:e=>{"use strict";e.exports=function(e){return!!e&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)}},2367:e=>{"use strict";e.exports={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"}},2038:(e,t,n)=>{"use strict";const s=n(6791);e.exports=function(e){const t=s(e);return`${0===t.hours?"":`${t.hours}h`}${0===t.minutes?"":`${0===t.hours?t.minutes:` ${t.minutes.toString(10).padStart(2,"0")}`}m`}${0!==t.hours?"":`${0===t.minutes?t.seconds:` ${t.seconds.toString(10).padStart(2,"0")}`}s`}`}},6791:e=>{"use strict";e.exports=function(e){return{hours:Math.floor(e/3600)%24,minutes:Math.floor(e/60)%60,seconds:Math.floor(e%60)}}},3379:e=>{"use strict";e.exports=function(e){const t=[],n=[];function s(e){t.push(e)}function i(e){n.push(e)}return Promise.all(e.map((e=>e.then(s,i)))).then((()=>({successful:t,failed:n})))}},3708:e=>{"use strict";e.exports=Array.from},7283:e=>{"use strict";e.exports=function(e,t){if(0===t)return"";if(e.length<=t)return e;if(t<=4)return`${e.slice(0,t-1)}…`;const n=t-3,s=Math.ceil(n/2),i=Math.floor(n/2);return e.slice(0,s)+"..."+e.slice(-i)}},6942:(e,t)=>{var n;!function(){"use strict";var s={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=o(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)s.call(e,n)&&e[n]&&(t=o(t,n));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},5042:e=>{e.exports={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let s="",i=0|n;for(;i--;)s+=e[Math.random()*e.length|0];return s}}}},n={};function s(e){var i=n[e];if(void 0!==i)return i.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(r.exports,r,r.exports,s),r.loaded=!0,r.exports}s.m=t,s.amdO={},e=[],s.O=(t,n,i,r)=>{if(!n){var o=1/0;for(c=0;c<e.length;c++){for(var[n,i,r]=e[c],a=!0,l=0;l<n.length;l++)(!1&r||o>=r)&&Object.keys(s.O).every((e=>s.O[e](n[l])))?n.splice(l--,1):(a=!1,r<o&&(o=r));if(a){e.splice(c--,1);var u=i();void 0!==u&&(t=u)}}return t}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[n,i,r]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={366:0,337:0};s.O.j=t=>0===e[t];var t=(t,n)=>{var i,r,[o,a,l]=n,u=0;if(o.some((t=>0!==e[t]))){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);if(l)var c=l(s)}for(t&&t(n);u<o.length;u++)r=o[u],s.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return s.O(c)},n=globalThis.webpackChunkinfinite_uploads=globalThis.webpackChunkinfinite_uploads||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var i=s.O(void 0,[337],(()=>s(9781)));i=s.O(i)})();
|