@micromag/viewer-build 0.3.472 → 0.3.473
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +23 -23
- package/build/index.html +1 -1
- package/build/static/js/{868.be66637a.chunk.js → 101.2e46a68e.chunk.js} +1 -1
- package/build/static/js/110.97f6466e.chunk.js +1 -0
- package/build/static/js/170.521231d8.chunk.js +1 -0
- package/build/static/js/212.4dead6eb.js +2 -0
- package/build/static/js/{220.cd918c32.js.LICENSE.txt → 212.4dead6eb.js.LICENSE.txt} +20 -0
- package/build/static/js/269.93a0e94e.chunk.js +1 -0
- package/build/static/js/312.89ce3861.chunk.js +1 -0
- package/build/static/js/{544.63e945b9.chunk.js → 328.b8a2c3b7.chunk.js} +1 -1
- package/build/static/js/377.c2ae2cae.chunk.js +1 -0
- package/build/static/js/{176.1814880f.chunk.js → 490.afe84570.chunk.js} +1 -1
- package/build/static/js/544.c6e33d23.chunk.js +1 -0
- package/build/static/js/66.e8eaa59a.chunk.js +2 -0
- package/build/static/js/763.7dcb377d.chunk.js +1 -0
- package/build/static/js/90.9c41e456.chunk.js +1 -0
- package/build/static/js/{308.c559389d.chunk.js → 939.adcc064e.chunk.js} +1 -1
- package/build/static/js/96.f15fcbb9.chunk.js +2 -0
- package/build/static/js/972.1828ddb5.chunk.js +1 -0
- package/build/static/js/990.d9598426.chunk.js +1 -0
- package/build/static/js/998.8b31cc77.chunk.js +1 -0
- package/build/static/js/main.e4f2b684.js +2 -0
- package/build/static/js/runtime~main.5c0faae5.js +1 -0
- package/package.json +6 -6
- package/build/static/js/132.70dbc667.chunk.js +0 -1
- package/build/static/js/136.46047610.chunk.js +0 -1
- package/build/static/js/220.cd918c32.js +0 -2
- package/build/static/js/352.a97f0465.chunk.js +0 -1
- package/build/static/js/361.abf7eeba.chunk.js +0 -1
- package/build/static/js/384.02cf3911.chunk.js +0 -1
- package/build/static/js/408.4cb30b4b.chunk.js +0 -1
- package/build/static/js/448.5015f630.chunk.js +0 -1
- package/build/static/js/452.9a175451.chunk.js +0 -2
- package/build/static/js/52.b1372f55.chunk.js +0 -1
- package/build/static/js/540.cde8b46e.chunk.js +0 -1
- package/build/static/js/564.d96a10b9.chunk.js +0 -1
- package/build/static/js/600.51a837b6.chunk.js +0 -1
- package/build/static/js/848.6e27d6eb.chunk.js +0 -2
- package/build/static/js/main.91045933.js +0 -2
- package/build/static/js/runtime~main.28553115.js +0 -1
- /package/build/static/js/{452.9a175451.chunk.js.LICENSE.txt → 66.e8eaa59a.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{848.6e27d6eb.chunk.js.LICENSE.txt → 96.f15fcbb9.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.91045933.js.LICENSE.txt → main.e4f2b684.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[600],{772:function(e,t,s){const i=s(5668),n=s(7996),a=s(5376).dashboard,r=s(692),o=s(3240),l=i.createElement;class p extends i.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(o(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(n,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=r(this.props),l("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}p.propTypes=a,p.defaultProps={inline:!0},e.exports=p},6440:function(e,t,s){const i=s(5668),n=s(900),a=s(7996),r=s(5376).dashboard,o=s(692),l=s(3240),p=i.createElement;class h extends i.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(a,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=o(this.props),p("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}h.propTypes={target:"undefined"!=typeof window?n.instanceOf(window.HTMLElement):n.any,open:n.bool,onRequestClose:n.func,closeModalOnClickOutside:n.bool,disablePageScrollWhenModalOpen:n.bool,...r},e.exports=h},24:function(e,t,s){const i=s(5668),n=s(608),a=s(5376),r=s(692),o=s(3240),l=i.createElement;class p extends i.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(o(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(n,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=r(this.props),l("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}p.propTypes={uppy:a.uppy,locale:a.locale},p.defaultProps={},e.exports=p},4704:function(e,t,s){const i=s(900),n=s(5668),a=s(2204),r=s(5376),o=n.createElement;class l extends n.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(a,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 o("div",{className:"uppy-Container",ref:e=>{this.container=e}})}}l.propTypes={uppy:r.uppy,locale:r.locale,pretty:i.bool,inputName:i.string},l.defaultProps={},e.exports=l},3740:function(e,t,s){const i=s(5668),n=s(900),a=s(64),r=s(5376).uppy,o=s(692),l=s(3240),p=i.createElement;class h extends i.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(a,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),p("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}h.propTypes={uppy:r,fixed:n.bool,hideAfterFinish:n.bool},h.defaultProps={},e.exports=h},7064:function(e,t,s){const i=s(5668),n=s(900),a=s(1505),r=s(5376).uppy,o=s(692),l=s(3240),p=i.createElement;class h extends i.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(a,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),p("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}h.propTypes={uppy:r,hideAfterFinish:n.bool,showProgressDetails:n.bool},h.defaultProps={},e.exports=h},692:function(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"],s=/^(aria-|data-)/;e.exports=e=>Object.fromEntries(Object.entries(e).filter((e=>{let[i]=e;return s.test(i)||t.includes(i)})))},3240:function(e){"use strict";e.exports=function(e,t){return Object.keys(e.props).some((s=>!((e,t)=>Object.prototype.hasOwnProperty.call(e,t))(e.validProps,s)&&e.props[s]!==t[s]))}},5376:function(e,t,s){const i=s(900),n=s(9540).Uppy,a=i.instanceOf(n).isRequired,r=i.arrayOf(i.string),o=i.shape({strings:i.object,pluralize:i.func}),l=i.shape({id:i.string.isRequired,name:i.string.isRequired,placeholder:i.string}),p=i.oneOfType([i.arrayOf(l),i.func]),h=i.oneOfType([i.string,i.number]),u={uppy:a,inline:i.bool,plugins:r,width:h,height:h,showProgressDetails:i.bool,hideUploadButton:i.bool,hideProgressAfterFinish:i.bool,note:i.string,metaFields:p,proudlyDisplayPoweredByUppy:i.bool,disableStatusBar:i.bool,disableInformer:i.bool,disableThumbnailGenerator:i.bool,thumbnailWidth:i.number,locale:o};e.exports={uppy:a,locale:o,dashboard:u}},9040:function(e,t,s){const{useEffect:i,useRef:n}=s(5668),a=s(9540).Uppy;e.exports=function(e){if("function"!=typeof e)throw new TypeError("useUppy: expected a function that returns a new Uppy instance");const t=n(void 0);if(void 0===t.current&&(t.current=e(),!(t.current instanceof a)))throw new TypeError("useUppy: factory function must return an Uppy instance, got "+typeof t.current);return i((()=>()=>{t.current.close({reason:"unmount"}),t.current=void 0}),[t]),t.current}},7688:function(e,t,s){!function(e){"use strict";function t(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}var i="undefined"!=typeof self?self:s.g;const n="undefined"!=typeof navigator,a=n&&"undefined"==typeof HTMLImageElement,r=!(void 0===s.g||"undefined"==typeof process||!process.versions||!process.versions.node),o=i.Buffer,l=!!o,p=e=>void 0!==e;function h(e){return void 0===e||(e instanceof Map?0===e.size:0===Object.values(e).filter(p).length)}function u(e){let t=new Error(e);throw delete t.stack,t}function d(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 c=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,s,i){if("boolean"==typeof i&&(this.le=i),Array.isArray(e)&&(e=new Uint8Array(e)),0===e)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){void 0===s&&(s=e.byteLength-t);let i=new DataView(e,t,s);this._swapDataView(i)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof m){void 0===s&&(s=e.byteLength-t),(t+=e.byteOffset)+s>e.byteOffset+e.byteLength&&u("Creating view outside of available memory in ArrayBuffer");let i=new DataView(e.buffer,t,s);this._swapDataView(i)}else if("number"==typeof e){let t=new DataView(new ArrayBuffer(e));this._swapDataView(t)}else u("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,s=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||u("BufferView.set(): Invalid data argument."),this.toUint8().set(e,t),new s(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 s=this.getUint8Array(e,t),f?f.decode(s):l?Buffer.from(s).toString("utf8"):decodeURIComponent(escape(c(s)));var s}getLatin1String(e=0,t=this.byteLength){let s=this.getUint8Array(e,t);return c(s)}getUnicodeString(e=0,t=this.byteLength){const s=[];for(let i=0;i<t&&e+i<this.byteLength;i+=2)s.push(this.getUint16(e+i));return c(s)}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,s){switch(t){case 1:return this.getUint8(e,s);case 2:return this.getUint16(e,s);case 4:return this.getUint32(e,s);case 8:return this.getUint64&&this.getUint64(e,s)}}getUint(e,t,s){switch(t){case 8:return this.getUint8(e,s);case 16:return this.getUint16(e,s);case 32:return this.getUint32(e,s);case 64:return this.getUint64&&this.getUint64(e,s)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}}function g(e,t){u(`${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){u(`Unknown ${e} '${t}'.`)}(this.kind,e),t[e].enabled||g(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var b=new y("file parser"),v=new y("segment parser"),w=new y("file reader");let C=i.fetch;const P="Invalid input argument";function F(e,t){return(s=e).startsWith("data:")||s.length>1e4?S(e,t,"base64"):r&&e.includes("://")?D(e,t,"url",k):r?S(e,t,"fs"):n?D(e,t,"url",k):void u(P);var s}async function D(e,t,s,i){return w.has(s)?S(e,t,s):i?async function(e,t){let s=await t(e);return new m(s)}(e,i):void u(`Parser ${s} is not loaded`)}async function S(e,t,s){let i=new(w.get(s))(e,t);return await i.read(),i}const k=e=>C(e).then((e=>e.arrayBuffer())),T=e=>new Promise(((t,s)=>{let i=new FileReader;i.onloadend=()=>t(i.result||new ArrayBuffer),i.onerror=s,i.readAsArrayBuffer(e)}));class A 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 O(e,t,s){let i=new A;for(let[e,t]of s)i.set(e,t);if(Array.isArray(t))for(let s of t)e.set(s,i);else e.set(t,i);return i}function E(e,t,s){let i,n=e.get(t);for(i of s)n.set(i[0],i[1])}const U=new Map,B=new Map,x=new Map,I=37500,N=37510,M=33723,R=34675,L=34665,z=34853,_=40965,V=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],q=["jfif","xmp","icc","iptc","ihdr"],H=["tiff",...q],j=["ifd0","ifd1","exif","gps","interop"],W=[...H,...j],$=["makerNote","userComment"],G=["translateKeys","translateValues","reviveValues","multiSegment"],K=[...G,"sanitize","mergeOutput","silentErrors"];class X{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class Y extends X{get needed(){return this.enabled||this.deps.size>0}constructor(e,s,i,n){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=s,this.parse=this.enabled,this.applyInheritables(n),this.canBeFiltered=j.includes(e),this.canBeFiltered&&(this.dict=U.get(e)),void 0!==i)if(Array.isArray(i))this.parse=this.enabled=!0,this.canBeFiltered&&i.length>0&&this.translateTagSet(i,this.pick);else if("object"==typeof i){if(this.enabled=!0,this.parse=!1!==i.parse,this.canBeFiltered){let{pick:e,skip:t}=i;e&&e.length>0&&this.translateTagSet(e,this.pick),t&&t.length>0&&this.translateTagSet(t,this.skip)}this.applyInheritables(i)}else!0===i||!1===i?this.parse=this.enabled=i:u(`Invalid options argument: ${i}`)}applyInheritables(e){let t,s;for(t of G)s=e[t],void 0!==s&&(this[t]=s)}translateTagSet(e,t){if(this.dict){let s,i,{tagKeys:n,tagValues:a}=this.dict;for(s of e)"string"==typeof s?(i=a.indexOf(s),-1===i&&(i=n.indexOf(Number(s))),-1!==i&&t.add(Number(n[i]))):t.add(s)}else for(let s of e)t.add(s)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,se(this.pick,this.deps)):this.enabled&&this.pick.size>0&&se(this.pick,this.deps)}}var Q={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},J=new Map;class Z extends X{static useCached(e){let t=J.get(e);return void 0!==t||(t=new this(e),J.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):u(`Invalid options argument ${e}`),void 0===this.firstChunkSize&&(this.firstChunkSize=n?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of V)this[e]=Q[e];for(e of K)this[e]=Q[e];for(e of $)this[e]=Q[e];for(e of W)this[e]=new Y(e,Q[e],void 0,this)}setupFromTrue(){let e;for(e of V)this[e]=Q[e];for(e of K)this[e]=Q[e];for(e of $)this[e]=!0;for(e of W)this[e]=new Y(e,!0,void 0,this)}setupFromArray(e){let t;for(t of V)this[t]=Q[t];for(t of K)this[t]=Q[t];for(t of $)this[t]=Q[t];for(t of W)this[t]=new Y(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,j)}setupFromObject(e){let t;for(t of(j.ifd0=j.ifd0||j.image,j.ifd1=j.ifd1||j.thumbnail,Object.assign(this,e),V))this[t]=te(e[t],Q[t]);for(t of K)this[t]=te(e[t],Q[t]);for(t of $)this[t]=te(e[t],Q[t]);for(t of H)this[t]=new Y(t,Q[t],e[t],this);for(t of j)this[t]=new Y(t,Q[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,j,W),!0===e.tiff?this.batchEnableWithBool(j,!0):!1===e.tiff?this.batchEnableWithUserValue(j,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,j):"object"==typeof e.tiff&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,j)}batchEnableWithBool(e,t){for(let s of e)this[s].enabled=t}batchEnableWithUserValue(e,t){for(let s of e){let e=t[s];this[s].enabled=!1!==e&&void 0!==e}}setupGlobalFilters(e,t,s,i=s){if(e&&e.length){for(let e of i)this[e].enabled=!1;let t=ee(e,s);for(let[e,s]of t)se(this[e].pick,s),this[e].enabled=!0}else if(t&&t.length){let e=ee(t,s);for(let[t,s]of e)se(this[t].skip,s)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:s,iptc:i,icc:n}=this;this.makerNote?t.deps.add(I):t.skip.add(I),this.userComment?t.deps.add(N):t.skip.add(N),s.enabled||e.skip.add(700),i.enabled||e.skip.add(M),n.enabled||e.skip.add(R)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:s,interop:i}=this;i.needed&&(t.deps.add(_),e.deps.add(_)),t.needed&&e.deps.add(L),s.needed&&e.deps.add(z),this.tiff.enabled=j.some((e=>!0===this[e].enabled))||this.makerNote||this.userComment;for(let e of j)this[e].finalizeFilters()}get onlyTiff(){return!q.map((e=>this[e].enabled)).some((e=>!0===e))&&this.tiff.enabled}checkLoadedPlugins(){for(let e of H)this[e].enabled&&!v.has(e)&&g("segment parser",e)}}function ee(e,t){let s,i,n,a,r=[];for(n of t){for(a of(s=U.get(n),i=[],s))(e.includes(a[0])||e.includes(a[1]))&&i.push(a[0]);i.length&&r.push([n,i])}return r}function te(e,t){return void 0!==e?e:void 0!==t?t:void 0}function se(e,t){for(let s of t)e.add(s)}t(Z,"default",Q);class ie{constructor(e){t(this,"parsers",{}),t(this,"output",{}),t(this,"errors",[]),t(this,"pushToErrors",(e=>this.errors.push(e))),this.options=Z.useCached(e)}async read(e){this.file=await function(e,t){return"string"==typeof e?F(e,t):n&&!a&&e instanceof HTMLImageElement?F(e.src,t):e instanceof Uint8Array||e instanceof ArrayBuffer||e instanceof DataView?new m(e):n&&e instanceof Blob?D(e,t,"blob",T):void u(P)}(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[s,i]of b)if(i.canHandle(e,t))return this.fileParser=new i(this.options,this.file,this.parsers),e[s]=!0;this.file.close&&this.file.close(),u("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),h(s=e)?void 0:s;var s}async executeParsers(){let{output:e}=this;await this.fileParser.parse();let t=Object.values(this.parsers).map((async t=>{let s=await t.parse();t.assignToOutput(e,s)}));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,s=v.get("tiff",e);var i;if(t.tiff?i={start:0,type:"tiff"}:t.jpeg&&(i=await this.fileParser.getOrFindSegment("tiff")),void 0===i)return;let n=await this.fileParser.ensureSegmentChunk(i),a=this.parsers.tiff=new s(n,e,t),r=await a.extractThumbnail();return t.close&&t.close(),r}}async function ne(e,t){let s=new ie(t);return await s.read(e),s.parse()}var ae=Object.freeze({__proto__:null,parse:ne,Exifr:ie,fileParsers:b,segmentParsers:v,fileReaders:w,tagKeys:U,tagValues:B,tagRevivers:x,createDictionary:O,extendDictionary:E,fetchUrlAsArrayBuffer:k,readBlobAsArrayBuffer:T,chunkedProps:V,otherSegments:q,segments:H,tiffBlocks:j,segmentsAndBlocks:W,tiffExtractables:$,inheritables:G,allFormatters:K,Options:Z});class re{static findPosition(e,t){let s=e.getUint16(t+2)+2,i="function"==typeof this.headerLength?this.headerLength(e,t,s):this.headerLength,n=t+i,a=s-i;return{offset:t,length:s,headerLength:i,start:n,size:a,end:n+a}}static parse(e,t={}){return new this(e,new Z({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof m?e:new m(e)}constructor(e,s={},i){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=i,this.type=this.constructor.type,this.globalOptions=this.options=s,this.localOptions=s[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 s=x.get(t),i=B.get(t),n=U.get(t),a=this.options[t],r=a.reviveValues&&!!s,o=a.translateValues&&!!i,l=a.translateKeys&&!!n,p={};for(let[t,a]of e)r&&s.has(t)?a=s.get(t)(a):o&&i.has(t)&&(a=this.translateValue(a,i.get(t))),l&&n.has(t)&&(t=n.get(t)||t),p[t]=a;return p}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,s){if(this.globalOptions.mergeOutput)return Object.assign(e,s);e[t]?Object.assign(e[t],s):e[t]=s}}function oe(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 pe(e,t,s){for(let[i,n]of v)if(n.canHandle(e,t,s))return i}t(re,"headerLength",4),t(re,"type",void 0),t(re,"multiSegment",!1),t(re,"canHandle",(()=>!1));class he extends class{constructor(e,s,i){t(this,"errors",[]),t(this,"ensureSegmentChunk",(async e=>{let t=e.start,s=e.size||65536;if(this.file.chunked)if(this.file.available(t,s))e.chunk=this.file.subarray(t,s);else try{e.chunk=await this.file.readChunk(t,s)}catch(t){u(`Couldn't read segment: ${JSON.stringify(e)}. ${t.message}`)}else this.file.byteLength>t+s?e.chunk=this.file.subarray(t,s):void 0===e.size?e.chunk=this.file.subarray(t):u("Segment unreachable: "+JSON.stringify(e));return e.chunk})),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=s,this.parsers=i}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let s=new(v.get(e))(t,this.options,this.file);return this.parsers[e]=s}createParsers(e){for(let t of e){let{type:e,chunk:s}=t,i=this.options[e];if(i&&i.enabled){let t=this.parsers[e];t&&t.append||t||this.createParser(e,s)}}}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(v.keyList())):(e=void 0===e?v.keyList().filter((e=>this.options[e].enabled)):e.filter((e=>this.options[e].enabled&&v.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:s,findAll:i,wanted:n,remaining:a}=this;if(!i&&this.file.chunked&&(i=Array.from(n).some((e=>{let t=v.get(e),s=this.options[e];return t.multiSegment&&s.multiSegment})),i&&await this.file.readWhole()),e=this.findAppSegmentsInRange(e,s.byteLength),!this.options.onlyTiff&&s.chunked){let t=!1;for(;a.size>0&&!t&&(s.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:i}=s,n=this.appSegments.some((e=>!this.file.available(e.offset||e.start,e.length||e.size)));if(t=e>i&&!n?!await s.readNextChunk(e):!await s.readNextChunk(i),void 0===(e=this.findAppSegmentsInRange(e,s.byteLength)))return}}}findAppSegmentsInRange(e,t){t-=2;let s,i,n,a,r,o,{file:l,findAll:p,wanted:h,remaining:u,options:d}=this;for(;e<t;e++)if(255===l.getUint8(e))if(s=l.getUint8(e+1),le(s)){if(i=l.getUint16(e+2),n=pe(l,e,i),n&&h.has(n)&&(a=v.get(n),r=a.findPosition(l,e),o=d[n],r.type=n,this.appSegments.push(r),!p&&(a.multiSegment&&o.multiSegment?(this.unfinishedMultiSegment=r.chunkNumber<r.chunkCount,this.unfinishedMultiSegment||u.delete(n)):u.delete(n),0===u.size)))break;d.recordUnknownSegments&&(r=re.findPosition(l,e),r.marker=s,this.unknownSegments.push(r)),e+=i+1}else if(oe(s)){if(i=l.getUint16(e+2),218===s&&!1!==d.stopAfterSos)return;d.recordJpegSegments&&this.jpegSegments.push({offset:e,length:i,marker:s}),e+=i+1}return e}mergeMultiSegments(){if(!this.appSegments.some((e=>e.multiSegment)))return;let e=function(e,t){let s,i,n,a=new Map;for(let t=0;t<e.length;t++)s=e[t],i=s.type,a.has(i)?n=a.get(i):a.set(i,n=[]),n.push(s);return Array.from(a)}(this.appSegments);this.mergedAppSegments=e.map((([e,t])=>{let s=v.get(e,this.options);return s.handleMultiSegments?{type:e,chunk:s.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(he,"type","jpeg"),b.set("jpeg",he);const ue=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class de extends re{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,s=new Map){let{pick:i,skip:n}=this.options[t];i=new Set(i);let a=i.size>0,r=0===n.size,o=this.chunk.getUint16(e);e+=2;for(let l=0;l<o;l++){let o=this.chunk.getUint16(e);if(a){if(i.has(o)&&(s.set(o,this.parseTag(e,o,t)),i.delete(o),0===i.size))break}else!r&&n.has(o)||s.set(o,this.parseTag(e,o,t));e+=12}return s}parseTag(e,t,s){let{chunk:i}=this,n=i.getUint16(e+2),a=i.getUint32(e+4),r=ue[n];if(r*a<=4?e+=8:e=i.getUint32(e+8),(n<1||n>13)&&u(`Invalid TIFF value type. block: ${s.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e}`),e>i.byteLength&&u(`Invalid TIFF value offset. block: ${s.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e} is outside of chunk size ${i.byteLength}`),1===n)return i.getUint8Array(e,a);if(2===n)return""===(o=function(e){for(;e.endsWith("\0");)e=e.slice(0,-1);return e}(o=i.getString(e,a)).trim())?void 0:o;var o;if(7===n)return i.getUint8Array(e,a);if(1===a)return this.parseTagValue(n,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}}(n))(a),s=r;for(let i=0;i<a;i++)t[i]=this.parseTagValue(n,e),e+=s;return t}}parseTagValue(e,t){let{chunk:s}=this;switch(e){case 1:return s.getUint8(t);case 3:return s.getUint16(t);case 4:case 13:return s.getUint32(t);case 5:return s.getUint32(t)/s.getUint32(t+4);case 6:return s.getInt8(t);case 8:return s.getInt16(t);case 9:return s.getInt32(t);case 10:return s.getInt32(t)/s.getInt32(t+4);case 11:return s.getFloat(t);case 12:return s.getDouble(t);default:u(`Invalid tiff type ${e}`)}}}class ce extends de{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 s=new Map;return this[t]=s,this.parseTags(e,t,s),s}async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&u("Malformed EXIF data"),!e.chunked&&this.ifd0Offset>e.byteLength&&u(`IFD0 offset points to outside of file.\nthis.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,d(this.options));let t=this.parseBlock(this.ifd0Offset,"ifd0");return 0!==t.size?(this.exifOffset=t.get(L),this.interopOffset=t.get(_),this.gpsOffset=t.get(z),this.xmp=t.get(700),this.iptc=t.get(M),this.icc=t.get(R),this.options.sanitize&&(t.delete(L),t.delete(_),t.delete(z),t.delete(700),t.delete(M),t.delete(R)),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,d(this.options));let e=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=e.get(_)),this.makerNote=e.get(I),this.userComment=e.get(N),this.options.sanitize&&(e.delete(_),e.delete(I),e.delete(N)),this.unpack(e,41728),this.unpack(e,41729),e}unpack(e,t){let s=e.get(t);s&&1===s.length&&e.set(t,s[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,s,i={};for(t of j)if(e=this[t],!h(e))if(s=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if("ifd1"===t)continue;Object.assign(i,s)}else i[t]=s;return this.makerNote&&(i.makerNote=this.makerNote),this.userComment&&(i.userComment=this.userComment),i}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[s,i]of Object.entries(t))this.assignObjectToOutput(e,s,i)}}function fe(e,t,s,i){var n=e+t/60+s/3600;return"S"!==i&&"W"!==i||(n*=-1),n}t(ce,"type","tiff"),t(ce,"headerLength",10),v.set("tiff",ce);var me=Object.freeze({__proto__:null,default:ae,Exifr:ie,fileParsers:b,segmentParsers:v,fileReaders:w,tagKeys:U,tagValues:B,tagRevivers:x,createDictionary:O,extendDictionary:E,fetchUrlAsArrayBuffer:k,readBlobAsArrayBuffer:T,chunkedProps:V,otherSegments:q,segments:H,tiffBlocks:j,segmentsAndBlocks:W,tiffExtractables:$,inheritables:G,allFormatters:K,Options:Z,parse:ne});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]}),be=Object.assign({},ge,{tiff:!1,ifd1:!0,mergeOutput:!1}),ve=Object.assign({},ge,{firstChunkSize:4e4,ifd0:[274]});async function we(e){let t=new ie(ve);await t.read(e);let s=await t.parse();if(s&&s.ifd0)return s.ifd0[274]}const Ce=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 s=t.match(/OS (\d+)_(\d+)/);if(s){let[,t,i]=s,n=Number(t)+.1*Number(i);e.rotateCanvas=n<13.4,e.rotateCss=!1}}else if(t.includes("OS X 10")){let[,s]=t.match(/OS X 10[_.](\d+)/);e.rotateCanvas=e.rotateCss=Number(s)<15}if(t.includes("Chrome/")){let[,s]=t.match(/Chrome\/(\d+)/);e.rotateCanvas=e.rotateCss=Number(s)<81}else if(t.includes("Firefox/")){let[,s]=t.match(/Firefox\/(\d+)/);e.rotateCanvas=e.rotateCss=Number(s)<77}}class Pe extends m{constructor(...e){super(...e),t(this,"ranges",new Fe),0!==this.byteLength&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,s){if(0===e&&0===this.byteLength&&s){let e=new DataView(s.buffer||s,s.byteOffset,s.byteLength);this._swapDataView(e)}else{let s=e+t;if(s>this.byteLength){let{dataView:e}=this._extend(s);this._swapDataView(e)}}}_extend(e){let t;t=l?o.allocUnsafe(e):new Uint8Array(e);let s=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:s}}subarray(e,t,s=!1){return t=t||this._lengthToEnd(e),s&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,s=!1){s&&this._tryExtend(t,e.byteLength,e);let i=super.set(e,t);return this.ranges.add(t,i.byteLength),i}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 Fe{constructor(){t(this,"list",[])}get length(){return this.list.length}add(e,t,s=0){let i=e+t,n=this.list.filter((t=>De(e,t.offset,i)||De(e,t.end,i)));if(n.length>0){e=Math.min(e,...n.map((e=>e.offset))),i=Math.max(i,...n.map((e=>e.end))),t=i-e;let s=n.shift();s.offset=e,s.length=t,s.end=i,this.list=this.list.filter((e=>!n.includes(e)))}else this.list.push({offset:e,length:t,end:i})}available(e,t){let s=e+t;return this.list.some((t=>t.offset<=e&&s<=t.end))}}function De(e,t,s){return e<=t&&t<=s}class Se extends Pe{constructor(e,s){super(0),t(this,"chunksRead",0),this.input=e,this.options=s}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,s=await this.readChunk(e,t);return!!s&&s.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 Se{async readWhole(){this.chunked=!1;let e=await T(this.input);this._swapArrayBuffer(e)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(e,t){let s=t?e+t:void 0,i=this.input.slice(e,s),n=await T(i);return this.set(n,e,!0)}}),e.Exifr=ie,e.Options=Z,e.allFormatters=K,e.chunkedProps=V,e.createDictionary=O,e.default=me,e.extendDictionary=E,e.fetchUrlAsArrayBuffer=k,e.fileParsers=b,e.fileReaders=w,e.gps=async function(e){let t=new ie(ye);await t.read(e);let s=await t.parse();if(s&&s.gps){let{latitude:e,longitude:t}=s.gps;return{latitude:e,longitude:t}}},e.gpsOnlyOptions=ye,e.inheritables=G,e.orientation=we,e.orientationOnlyOptions=ve,e.otherSegments=q,e.parse=ne,e.readBlobAsArrayBuffer=T,e.rotation=async function(t){let s=await we(t);return Object.assign({canvas:e.rotateCanvas,css:e.rotateCss},Ce[s])},e.rotations=Ce,e.segmentParsers=v,e.segments=H,e.segmentsAndBlocks=W,e.tagKeys=U,e.tagRevivers=x,e.tagValues=B,e.thumbnail=async function(e){let t=new ie(be);await t.read(e);let s=await t.extractThumbnail();return s&&l?o.from(s):s},e.thumbnailOnlyOptions=be,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=j,e.tiffExtractables=$,Object.defineProperty(e,"__esModule",{value:!0})}(t)},7572:function(e){e.exports=function(e,t){if(e===t)return!0;for(var s in e)if(!(s in t))return!1;for(var s in t)if(e[s]!==t[s])return!1;return!0}},6532:function(e,t,s){var i=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,r=/^0o[0-7]+$/i,o=parseInt,l="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,p="object"==typeof self&&self&&self.Object===Object&&self,h=l||p||Function("return this")(),u=Object.prototype.toString,d=Math.max,c=Math.min,f=function(){return h.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]"==u.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(i,"");var s=a.test(e);return s||r.test(e)?o(e.slice(2),s?2:8):n.test(e)?NaN:+e}e.exports=function(e,t,s){var i,n,a,r,o,l,p=0,h=!1,u=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var s=i,a=n;return i=n=void 0,p=t,r=e.apply(a,s)}function v(e){var s=e-l;return void 0===l||s>=t||s<0||u&&e-p>=a}function w(){var e=f();if(v(e))return C(e);o=setTimeout(w,function(e){var s=t-(e-l);return u?c(s,a-(e-p)):s}(e))}function C(e){return o=void 0,y&&i?b(e):(i=n=void 0,r)}function P(){var e=f(),s=v(e);if(i=arguments,n=this,l=e,s){if(void 0===o)return function(e){return p=e,o=setTimeout(w,t),h?b(e):r}(l);if(u)return o=setTimeout(w,t),b(l)}return void 0===o&&(o=setTimeout(w,t)),r}return t=g(t)||0,m(s)&&(h=!!s.leading,a=(u="maxWait"in s)?d(g(s.maxWait)||0,t):a,y="trailing"in s?!!s.trailing:y),P.cancel=function(){void 0!==o&&clearTimeout(o),p=0,i=l=n=o=void 0},P.flush=function(){return void 0===o?r:C(f())},P}},4756:function(e,t,s){"use strict";s.r(t);var i=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function n(e,t){if(e.length!==t.length)return!1;for(var s=0;s<e.length;s++)if(!((n=e[s])===(a=t[s])||i(n)&&i(a)))return!1;var n,a;return!0}t.default=function(e,t){var s;void 0===t&&(t=n);var i,a=[],r=!1;return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return r&&s===this&&t(n,a)||(i=e.apply(this,n),r=!0,s=this,a=n),i}}},1436:function(e,t,s){"use strict";var i=s(9372),n=s(9540),a=s(1848),r=s(1792);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 l=0;function p(e){return"__private_"+l+++"_"+e}const h=s(1505),u=s(5416),d=s(4304),c=s(8576),f=s(9568),m=s(4732),g=s(4756),y=s(7164),b=s(6760),v=s(1240),w=s(3728),C=g.default||g;function P(){const e={};return e.promise=new Promise(((t,s)=>{e.resolve=t,e.reject=s})),e}function F(){return(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",width:"30",height:"30",viewBox:"0 0 30 30"},(0,i.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 D=p("openFileEditorWhenFilesAdded"),S=p("attachRenderFunctionToTarget"),k=p("isTargetSupported"),T=p("getAcquirers"),A=p("getProgressIndicators"),O=p("getEditors");class E extends n.UIPlugin{constructor(e,t){var s;super(e,t),s=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,s=e.title||t,i=e.type;if("acquirer"!==i&&"progressindicator"!==i&&"editor"!==i){const e="Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor";return void this.uppy.log(e,"error")}const n={id:t,name:s,type:i},a=this.getPluginState().targets.slice();return a.push(n),this.setPluginState({targets:a}),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(),s=t.filter((t=>"acquirer"===t.type&&t.id===e))[0];this.setPluginState({activePickerPanel:s,activeOverlayType:"PickerPanel"})},this.canEditFile=e=>{const{targets:t}=this.getPluginState();return o(this,O)[O](t).some((t=>this.uppy.getPlugin(t.id).canEditFile(e)))},this.openFileEditor=e=>{const{targets:t}=this.getPluginState(),s=o(this,O)[O](t);this.setPluginState({showFileEditor:!0,fileCardFor:e.id||null,activeOverlayType:"FileEditor"}),s.forEach((t=>{this.uppy.getPlugin(t.id).selectFile(e)}))},this.saveFileEditor=()=>{const{targets:e}=this.getPluginState();o(this,O)[O](e).forEach((e=>{this.uppy.getPlugin(e.id).save()})),this.hideAllPanels()},this.openModal=()=>{const{promise:e,resolve:t}=P();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:i,isClosing:n}=s.getPluginState();if(i||n)return;const{promise:a,resolve:r}=P();if(s.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),s.opts.animateOpenClose){s.setPluginState({isClosing:!0});const e=()=>{s.setPluginState({isHidden:!0,isClosing:!1}),s.superFocus.cancel(),s.savedActiveElement.focus(),s.el.removeEventListener("animationend",e,!1),r()};s.el.addEventListener("animationend",e,!1)}else s.setPluginState({isHidden:!0}),s.superFocus.cancel(),s.savedActiveElement.focus(),r();var o;return document.removeEventListener("keydown",s.handleKeyDownInModal),t&&s.opts.browserBackButtonClose&&null!=(o=history.state)&&o[s.modalName]&&history.back(),s.uppy.emit("dashboard:modal-closed"),a},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 s=this.uppy.getFile(t);e?this.uppy.emit("dashboard:file-edit-start",s):this.uppy.emit("dashboard:file-edit-complete",s),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:s,height:i}=t.contentRect;this.uppy.log(`[Dashboard] resized: ${s} / ${i}`,"debug"),this.setPluginState({containerWidth:s,containerHeight:i,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&&r.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,s;e.preventDefault(),e.stopPropagation();const i=(()=>{let t=!0;return this.uppy.iteratePlugins((s=>{null!=s.canHandleRootDrop&&s.canHandleRootDrop(e)&&(t=!0)})),t})(),n=(()=>{const{types:t}=e.dataTransfer;return t.some((e=>"Files"===e))})();if(!i&&!n||this.opts.disabled||this.opts.disableLocalFiles&&(n||!i)||!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=(s=this.opts).onDragOver)||t.call(s,e)},this.handleDragLeave=e=>{var t,s;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((()=>{this.setPluginState({isDraggingOver:!1})}),50),null==(t=(s=this.opts).onDragLeave)||t.call(s,e)},this.handleDrop=async e=>{var t,s;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 i=!1;const n=await m(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,"error"),i||(this.uppy.info(e.message,"error"),i=!0)}});n.length>0&&(this.uppy.log("[Dashboard] Files dropped"),this.addFiles(n)),null==(t=(s=this.opts).onDrop)||t.call(s,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&&r.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,D,{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=c(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",o(this,D)[D])},this.removeEvents=()=>{const e=c(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",o(this,D)[D])},this.superFocusOnEachUpdate=()=>{const e=this.el.contains(document.activeElement),t=document.activeElement===document.body||null===document.activeElement,s=0===this.uppy.getState().info.length,i=!this.opts.inline;s&&(i||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,S,{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,k,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return"function"!=typeof t.isSupported||t.isSupported()}}),Object.defineProperty(this,T,{writable:!0,value:C((e=>e.filter((e=>"acquirer"===e.type&&o(this,k)[k](e))).map(o(this,S)[S])))}),Object.defineProperty(this,A,{writable:!0,value:C((e=>e.filter((e=>"progressindicator"===e.type)).map(o(this,S)[S])))}),Object.defineProperty(this,O,{writable:!0,value:C((e=>e.filter((e=>"editor"===e.type)).map(o(this,S)[S])))}),this.render=e=>{const t=this.getPluginState(),{files:s,capabilities:i,allowNewUpload:n}=e,{newFiles:a,uploadStartedFiles:r,completeFiles:l,erroredFiles:p,inProgressFiles:h,inProgressNotPausedFiles:u,processingFiles:d,isUploadStarted:c,isAllComplete:f,isAllErrored:m,isAllPaused:g}=this.uppy.getObjectOfFilesPerState(),y=o(this,T)[T](t.targets),b=o(this,A)[A](t.targets),w=o(this,O)[O](t.targets);let C;return C="auto"===this.opts.theme?i.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}".`)),v({state:e,isHidden:t.isHidden,files:s,newFiles:a,uploadStartedFiles:r,completeFiles:l,erroredFiles:p,inProgressFiles:h,inProgressNotPausedFiles:u,processingFiles:d,isUploadStarted:c,isAllComplete:f,isAllErrored:m,isAllPaused:g,totalFileCount:Object.keys(s).length,totalProgress:e.totalProgress,allowNewUpload:n,acquirers:y,theme:C,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:b,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:i.resumableUploads||!1,individualCancellation:i.individualCancellation,isMobileDevice:i.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:s,allowMultipleUploadBatches:i}=this.uppy.opts;(s||i)&&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:n}=this.opts;n&&this.mount(n,this),(this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t&&t.mount(this,t)})),this.opts.disableStatusBar||this.uppy.use(h,{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(u,{id:`${this.id}:Informer`,target:this}),this.opts.disableThumbnailGenerator||this.uppy.use(d,{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 a=!!this.darkModeMediaQuery&&this.darkModeMediaQuery.matches;this.uppy.log("[Dashboard] Dark mode is "+(a?"on":"off")),this.setDarkModeCapability(a),"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,a.nanoid)()}`,this.defaultLocale=w;const i={target:"body",metaFields:[],trigger:null,inline:!1,width:750,height:550,thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:F,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={...i,...t},this.i18nInit(),this.superFocus=b(),this.ifFocusedOnUppyRecently=!1,this.makeDashboardInsidesVisibleAnywayTimeout=null,this.removeDragOverClassTimeout=null}}E.VERSION="2.4.3",e.exports=E},8388:function(e,t,s){"use strict";var i=s(9372);let n;n=Symbol.for("uppy test: disable unused locale key warning");class a extends i.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,i.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,i.h)("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MyDevice"},(0,i.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,i.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,i.h)("g",{fill:"none",fillRule:"evenodd"},(0,i.h)("rect",{className:"uppy-ProviderIconBg",width:"32",height:"32",rx:"16",fill:"#2275D7"}),(0,i.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,i.h)("div",{className:"uppy-DashboardTab-name"},this.props.i18n("myDevice")))),this.renderBrowseButton=(e,t)=>{const s=this.props.acquirers.length;return(0,i.h)("button",{type:"button",className:"uppy-u-reset uppy-Dashboard-browse",onClick:t,"data-uppy-super-focusable":0===s},e)},this.renderDropPasteBrowseTagline=()=>{const e=this.props.acquirers.length,t=this.renderBrowseButton(this.props.i18n("browseFiles"),this.triggerFileInputClick),s=this.renderBrowseButton(this.props.i18n("browseFolders"),this.triggerFolderInputClick),n=this.props.fileManagerSelectionType,a=n.charAt(0).toUpperCase()+n.slice(1);return(0,i.h)("div",{class:"uppy-Dashboard-AddFiles-title"},this.props.disableLocalFiles?this.props.i18n("importFiles"):e>0?this.props.i18nArray(`dropPasteImport${a}`,{browseFiles:t,browseFolders:s,browse:t}):this.props.i18nArray(`dropPaste${a}`,{browseFiles:t,browseFolders:s,browse:t}))},this.renderAcquirer=e=>(0,i.h)("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":e.id},(0,i.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,i.h)("div",{className:"uppy-DashboardTab-name"},e.name))),this.renderAcquirers=(e,t)=>{const s=[...e],n=s.splice(e.length-2,e.length);return(0,i.h)("div",{className:"uppy-Dashboard-AddFiles-list",role:"tablist"},!t&&this.renderMyDeviceAcquirer(),s.map((e=>this.renderAcquirer(e))),(0,i.h)("span",{role:"presentation",style:{"white-space":"nowrap"}},n.map((e=>this.renderAcquirer(e)))))}}[n](){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,i.h)("span",null,(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11"},(0,i.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,i.h)("span",{className:"uppy-Dashboard-poweredByUppy"},"Uppy"))});return(0,i.h)("a",{tabIndex:"-1",href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",className:"uppy-Dashboard-poweredBy"},t)}render(){return(0,i.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,i.h)("div",{className:"uppy-Dashboard-AddFiles-info"},this.props.note&&(0,i.h)("div",{className:"uppy-Dashboard-note"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy(this.props)))}}e.exports=a},2308:function(e,t,s){"use strict";var i=s(9372);const n=s(1252),a=s(8388);e.exports=e=>(0,i.h)("div",{className:n("uppy-Dashboard-AddFilesPanel",e.className),"data-uppy-panelType":"AddFiles","aria-hidden":e.showAddFilesPanel},(0,i.h)("div",{className:"uppy-DashboardContent-bar"},(0,i.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18n("addingMoreFiles")),(0,i.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>e.toggleAddFilesPanel(!1)},e.i18n("back"))),(0,i.h)(a,e))},1240:function(e,t,s){"use strict";var i=s(9372);function n(){return n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},n.apply(this,arguments)}const a=s(1252),r=s(372),o=s(3912),l=s(8388),p=s(2308),h=s(2736),u=s(2304),d=s(3312),c=s(9696),f=s(5760);e.exports=function(e){const t=0===e.totalFileCount,s=e.containerWidth>576,m=a({"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,b=e.recoveredState?Object.keys(e.recoveredState.files).length:null,v=e.files?Object.keys(e.files).filter((t=>e.files[t].isGhost)).length:null;return(0,i.h)("div",{className:m,"data-uppy-theme":e.theme,"data-uppy-num-acquirers":e.acquirers.length,"data-uppy-drag-drop-supported":!e.disableLocalFiles&&r(),"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,i.h)("div",{"aria-hidden":"true",className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:e.handleClickOutside}),(0,i.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,i.h)("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":e.i18n("closeModal"),title:e.i18n("closeModal"),onClick:e.closeModal},(0,i.h)("span",{"aria-hidden":"true"},"×")),(0,i.h)("div",{className:"uppy-Dashboard-innerWrap"},(0,i.h)("div",{className:"uppy-Dashboard-dropFilesHereHint"},e.i18n("dropHint")),y&&(0,i.h)(d,e),b&&(0,i.h)("div",{className:"uppy-Dashboard-serviceMsg"},(0,i.h)("svg",{className:"uppy-Dashboard-serviceMsg-icon","aria-hidden":"true",focusable:"false",width:"21",height:"16",viewBox:"0 0 24 19"},(0,i.h)("g",{transform:"translate(0 -1)",fill:"none",fillRule:"evenodd"},(0,i.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,i.h)("path",{fill:"#000",d:"M11 6h2l-.3 8h-1.4z"}),(0,i.h)("circle",{fill:"#000",cx:"12",cy:"17",r:"1"}))),(0,i.h)("strong",{className:"uppy-Dashboard-serviceMsg-title"},e.i18n("sessionRestored")),(0,i.h)("div",{className:"uppy-Dashboard-serviceMsg-text"},v>0?e.i18n("recoveredXFiles",{smart_count:v}):e.i18n("recoveredAllFiles"))),y?(0,i.h)(o,n({},e,{itemsPerRow:g})):(0,i.h)(l,n({},e,{isSizeMD:s})),(0,i.h)(f,null,e.showAddFilesPanel?(0,i.h)(p,n({key:"AddFiles"},e,{isSizeMD:s})):null),(0,i.h)(f,null,e.fileCardFor?(0,i.h)(c,n({key:"FileCard"},e)):null),(0,i.h)(f,null,e.activePickerPanel?(0,i.h)(h,n({key:"Picker"},e)):null),(0,i.h)(f,null,e.showFileEditor?(0,i.h)(u,n({key:"Editor"},e)):null),(0,i.h)("div",{className:"uppy-Dashboard-progressindicators"},e.progressindicators.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))))}},2304:function(e,t,s){"use strict";var i=s(9372);const n=s(1252);e.exports=function(e){const t=e.files[e.fileCardFor];return(0,i.h)("div",{className:n("uppy-DashboardContent-panel",e.className),role:"tabpanel","data-uppy-panelType":"FileEditor",id:"uppy-DashboardContent-panel--editor"},(0,i.h)("div",{className:"uppy-DashboardContent-bar"},(0,i.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18nArray("editing",{file:(0,i.h)("span",{className:"uppy-DashboardContent-titleFile"},t.meta?t.meta.name:t.name)})),(0,i.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:e.hideAllPanels},e.i18n("cancel")),(0,i.h)("button",{className:"uppy-DashboardContent-save",type:"button",onClick:e.saveFileEditor},e.i18n("save"))),(0,i.h)("div",{className:"uppy-DashboardContent-panelBody"},e.editors.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))}},9696:function(e,t,s){"use strict";var i=s(9372),n=s(1848);const a=s(1252),r=s(9332),o=s(6700),l=s(7036);class p extends i.Component{constructor(e){super(e),this.form=document.createElement("form"),this.updateMeta=(e,t)=>{this.setState((s=>{let{formState:i}=s;return{formState:{...i,[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 s=`uppy-Dashboard-FileCard-input-${e.id}`,n=this.props.requiredMetaFields.includes(e.id);return(0,i.h)("fieldset",{key:e.id,className:"uppy-Dashboard-FileCard-fieldset"},(0,i.h)("label",{className:"uppy-Dashboard-FileCard-label",htmlFor:s},e.name),void 0!==e.render?e.render({value:this.state.formState[e.id],onChange:t=>this.updateMeta(t,e.id),fieldCSSClasses:t,required:n,form:this.form.id},i.h):(0,i.h)("input",{className:t.text,id:s,form:this.form.id,type:e.type||"text",required:n,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],s=this.getMetaFields()||[],a={};s.forEach((e=>{a[e.id]=t.meta[e.id]||""})),this.state={formState:a},this.form.id=(0,n.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,i.h)("div",{className:a("uppy-Dashboard-FileCard",this.props.className),"data-uppy-panelType":"FileCard",onDragOver:o,onDragLeave:o,onDrop:o,onPaste:o},(0,i.h)("div",{className:"uppy-DashboardContent-bar"},(0,i.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},this.props.i18nArray("editing",{file:(0,i.h)("span",{className:"uppy-DashboardContent-titleFile"},e.meta?e.meta.name:e.name)})),(0,i.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,i.h)("div",{className:"uppy-Dashboard-FileCard-inner"},(0,i.h)("div",{className:"uppy-Dashboard-FileCard-preview",style:{backgroundColor:r(e.type).color}},(0,i.h)(l,{file:e}),t&&(0,i.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,i.h)("div",{className:"uppy-Dashboard-FileCard-info"},this.renderMetaFields()),(0,i.h)("div",{className:"uppy-Dashboard-FileCard-actions"},(0,i.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,i.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=p},3060:function(e,t,s){"use strict";var i=s(9372);const n=s(4140);function a(e){let{file:t,uploadInProgressOrComplete:s,metaFields:n,canEditFile:a,i18n:r,onClick:o}=e;return!s&&n&&n.length>0||!s&&a(t)?(0,i.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit",type:"button","aria-label":r("editFileWithFilename",{file:t.meta.name}),title:r("editFileWithFilename",{file:t.meta.name}),onClick:()=>o()},(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 14"},(0,i.h)("g",{fillRule:"evenodd"},(0,i.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,i.h)("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),(0,i.h)("path",{fillRule:"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})))):null}function r(e){let{i18n:t,onClick:s,file:n}=e;return(0,i.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove",type:"button","aria-label":t("removeFile",{file:n.meta.name}),title:t("removeFile",{file:n.meta.name}),onClick:()=>s()},(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"18",height:"18",viewBox:"0 0 18 18"},(0,i.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,i.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 o(e){const{i18n:t}=e;return(0,i.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)=>{n(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,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 12"},(0,i.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:s,uploadInProgressOrComplete:n,canEditFile:l,metaFields:p,showLinkToFileUploadResult:h,showRemoveButton:u,i18n:d,toggleFileCard:c,openFileEditor:f}=e;return(0,i.h)("div",{className:"uppy-Dashboard-Item-actionWrapper"},(0,i.h)(a,{i18n:d,file:s,uploadInProgressOrComplete:n,canEditFile:l,metaFields:p,onClick:()=>{p&&p.length>0?c(!0,s.id):f(s)}}),h&&s.uploadURL?(0,i.h)(o,{file:s,uppy:t,i18n:d}):null,u?(0,i.h)(r,{i18n:d,file:s,uppy:t,onClick:()=>e.uppy.removeFile(s.id,"removed-by-user")}):null)}},992:function(e,t,s){"use strict";var i=s(9372);const n=s(4596),a=s(5720),r=s(7056),o=e=>{let{file:t,onClick:s}=e;return t.error?(0,i.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-errorDetails","aria-label":t.error,"data-microtip-position":"bottom","data-microtip-size":"medium",onClick:s,type:"button"},"?"):null};e.exports=function(e){const{file:t}=e;return(0,i.h)("div",{className:"uppy-Dashboard-Item-fileInfo","data-uppy-file-source":t.source},(0,i.h)("div",{className:"uppy-Dashboard-Item-fileName"},(e=>{const{author:t,name:s}=e.file.meta;return(0,i.h)("div",{className:"uppy-Dashboard-Item-name",title:s},a(s,e.containerWidth<=352?35:e.containerWidth<=576?60:t?20:30))})(e),(0,i.h)(o,{file:e.file,onClick:()=>alert(e.file.error)})),(0,i.h)("div",{className:"uppy-Dashboard-Item-status"},(e=>{const{author:t}=e.file.meta,{providerName:s}=e.file.remote;return t?(0,i.h)("div",{className:"uppy-Dashboard-Item-author"},(0,i.h)("a",{href:`${t.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer"},a(t.name,13)),s?(0,i.h)(i.Fragment,null," · ",s," · "):null):null})(e),(e=>e.file.size&&(0,i.h)("div",{className:"uppy-Dashboard-Item-statusSize"},n(e.file.size)))(e),(e=>e.file.isGhost&&(0,i.h)("span",null," • ",(0,i.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect",type:"button",onClick:e.toggleAddFilesPanel},e.i18n("reSelect"))))(e)),(0,i.h)(r,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))}},7632:function(e,t,s){"use strict";var i=s(9372);const n=s(7036),a=s(7056),r=s(9332);e.exports=function(e){return(0,i.h)("div",{className:"uppy-Dashboard-Item-previewInnerWrap",style:{backgroundColor:r(e.file.type).color}},e.showLinkToFileUploadResult&&e.file.uploadURL&&(0,i.h)("a",{className:"uppy-Dashboard-Item-previewLink",href:e.file.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":e.file.meta.name},(0,i.h)("span",{hidden:!0},e.file.meta.name)),(0,i.h)(n,{file:e.file}),(0,i.h)(a,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))}},408:function(e,t,s){"use strict";var i=s(9372);function n(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 a(e){return(0,i.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,i.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-progressIndicator",type:"button","aria-label":n(e),title:n(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 r(e){let{children:t}=e;return(0,i.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 o(e){let{progress:t}=e;const s=2*Math.PI*15;return(0,i.h)("g",null,(0,i.h)("circle",{className:"uppy-Dashboard-Item-progressIcon--bg",r:"15",cx:"18",cy:"18","stroke-width":"2",fill:"none"}),(0,i.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":s,"stroke-dashoffset":s-s/100*t}))}e.exports=function(e){return e.file.progress.uploadStarted?e.isUploaded?(0,i.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,i.h)("div",{className:"uppy-Dashboard-Item-progressIndicator"},(0,i.h)(r,null,(0,i.h)("circle",{r:"15",cx:"18",cy:"18",fill:"#1bb240"}),(0,i.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,i.h)(a,e,(0,i.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,i.h)("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),(0,i.h)("path",{d:"M7.9 3H10v2H7.9z"}),(0,i.h)("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),(0,i.h)("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"}))):e.resumableUploads&&!e.hidePauseResumeButton?(0,i.h)(a,e,(0,i.h)(r,null,(0,i.h)(o,{progress:e.file.progress.percentage}),e.file.isPaused?(0,i.h)("polygon",{className:"uppy-Dashboard-Item-progressIcon--play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}):(0,i.h)("g",{className:"uppy-Dashboard-Item-progressIcon--pause",transform:"translate(14.5, 13)"},(0,i.h)("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),(0,i.h)("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})))):e.resumableUploads||!e.individualCancellation||e.hideCancelButton?(0,i.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,i.h)("div",{className:"uppy-Dashboard-Item-progressIndicator"},(0,i.h)(r,null,(0,i.h)(o,{progress:e.file.progress.percentage})))):(0,i.h)(a,e,(0,i.h)(r,null,(0,i.h)(o,{progress:e.file.progress.percentage}),(0,i.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}},7056:function(e,t,s){"use strict";var i=s(9372);e.exports=function(e){const{file:t,toggleFileCard:s,i18n:n,metaFields:a}=e,{missingRequiredMetaFields:r}=t;if(null==r||!r.length)return null;const o=r.map((e=>((e,t)=>t.filter((t=>t.id===e))[0].name)(e,a))).join(", ");return(0,i.h)("div",{className:"uppy-Dashboard-Item-errorMessage"},n("missingRequiredMetaFields",{smart_count:r.length,fields:o})," ",(0,i.h)("button",{type:"button",class:"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn",onClick:()=>s(!0,t.id)},n("editFile")))}},8160:function(e,t,s){"use strict";var i=s(9372);const n=s(1252),a=s(7572),r=s(7632),o=s(408),l=s(992),p=s(3060);class h extends i.Component{componentDidMount(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}shouldComponentUpdate(e){return!a(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,s=e.progress.uploadComplete&&!t&&!e.error,a=e.progress.uploadStarted||t,h=e.progress.uploadStarted&&!e.progress.uploadComplete||t,u=e.error||!1,{isGhost:d}=e;let c=(this.props.individualCancellation||!h)&&!s;s&&this.props.showRemoveButtonAfterComplete&&(c=!0);const f=n({"uppy-Dashboard-Item":!0,"is-inprogress":h&&!this.props.recoveredState,"is-processing":t,"is-complete":s,"is-error":!!u,"is-resumable":this.props.resumableUploads,"is-noIndividualCancellation":!this.props.individualCancellation,"is-ghost":d});return(0,i.h)("div",{className:f,id:`uppy_${e.id}`,role:this.props.role},(0,i.h)("div",{className:"uppy-Dashboard-Item-preview"},(0,i.h)(r,{file:e,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,i18n:this.props.i18n,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),(0,i.h)(o,{uppy:this.props.uppy,file:e,error:u,isUploaded:s,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,i.h)("div",{className:"uppy-Dashboard-Item-fileInfoAndButtons"},(0,i.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,i.h)(p,{file:e,metaFields:this.props.metaFields,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,showRemoveButton:c,canEditFile:this.props.canEditFile,uploadInProgressOrComplete:a,toggleFileCard:this.props.toggleFileCard,openFileEditor:this.props.openFileEditor,uppy:this.props.uppy,i18n:this.props.i18n})))}}e.exports=h},3912:function(e,t,s){"use strict";var i=s(9372);function n(){return n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},n.apply(this,arguments)}const a=s(1252),r=s(8160),o=s(2453);e.exports=e=>{const t=0===e.totalFileCount,s=a("uppy-Dashboard-files",{"uppy-Dashboard-files--noFiles":t}),l=1===e.itemsPerRow?71:200,p={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},h=Object.keys(e.files);e.recoveredState&&h.sort(((t,s)=>e.files[s].isGhost-e.files[t].isGhost));const u=function(e,t){const s=[];let i=[];return e.forEach((e=>{i.length<t?i.push(e):(s.push(i),i=[e])})),i.length&&s.push(i),s}(h,e.itemsPerRow);return(0,i.h)(o,{class:s,role:"list",data:u,renderRow:t=>(0,i.h)("div",{role:"presentation",key:t[0]},t.map((t=>(0,i.h)(r,n({key:t,uppy:e.uppy},p,{role:"listitem",openFileEditor:e.openFileEditor,canEditFile:e.canEditFile,toggleAddFilesPanel:e.toggleAddFilesPanel,file:e.files[t]}))))),rowHeight:l})}},7036:function(e,t,s){"use strict";var i=s(9372);const n=s(9332);e.exports=function(e){const{file:t}=e;if(t.preview)return(0,i.h)("img",{className:"uppy-Dashboard-Item-previewImg",alt:t.name,src:t.preview});const{color:s,icon:a}=n(t.type);return(0,i.h)("div",{className:"uppy-Dashboard-Item-previewIconWrap"},(0,i.h)("span",{className:"uppy-Dashboard-Item-previewIcon",style:{color:s}},a),(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-Dashboard-Item-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76"},(0,i.h)("rect",{fill:"#FFF",width:"58",height:"76",rx:"3",fillRule:"evenodd"})))}},2736:function(e,t,s){"use strict";var i=s(9372);const n=s(1252),a=s(6700);e.exports=function(e){let{activePickerPanel:t,className:s,hideAllPanels:r,i18n:o,state:l,uppy:p}=e;return(0,i.h)("div",{className:n("uppy-DashboardContent-panel",s),role:"tabpanel","data-uppy-panelType":"PickerPanel",id:`uppy-DashboardContent-panel--${t.id}`,onDragOver:a,onDragLeave:a,onDrop:a,onPaste:a},(0,i.h)("div",{className:"uppy-DashboardContent-bar"},(0,i.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},o("importFrom",{name:t.name})),(0,i.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:r},o("cancel"))),(0,i.h)("div",{className:"uppy-DashboardContent-panelBody"},p.getPlugin(t.id).render(l)))}},3312:function(e,t,s){"use strict";var i=s(9372);const n="error",a="waiting",r="preprocessing",o="uploading",l="postprocessing",p="complete",h="paused";function u(e){let{files:t,i18n:s,isAllComplete:i,isAllErrored:u,isAllPaused:d,inProgressNotPausedFiles:c,newFiles:f,processingFiles:m}=e;const g=function(e,t,s,i){if(void 0===i&&(i={}),e)return n;if(t)return p;if(s)return h;let u=a;const d=Object.keys(i);for(let e=0;e<d.length;e++){const{progress:t}=i[d[e]];if(t.uploadStarted&&!t.uploadComplete)return o;t.preprocess&&u!==o&&(u=r),t.postprocess&&u!==o&&u!==r&&(u=l)}return u}(u,i,d,t);switch(g){case"uploading":return s("uploadingXFiles",{smart_count:c.length});case"preprocessing":case"postprocessing":return s("processingXFiles",{smart_count:m.length});case"paused":return s("uploadPaused");case"waiting":return s("xFilesSelected",{smart_count:f.length});case"complete":return s("uploadComplete")}}e.exports=function(e){const{i18n:t,isAllComplete:s,hideCancelButton:n,maxNumberOfFiles:a,toggleAddFilesPanel:r,uppy:o}=e;let{allowNewUpload:l}=e;return l&&a&&(l=e.totalFileCount<e.maxNumberOfFiles),(0,i.h)("div",{className:"uppy-DashboardContent-bar"},s||n?(0,i.h)("div",null):(0,i.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>o.cancelAll()},t("cancel")),(0,i.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},(0,i.h)(u,e)),l?(0,i.h)("button",{className:"uppy-DashboardContent-addMore",type:"button","aria-label":t("addMoreFiles"),title:t("addMoreFiles"),onClick:()=>r(!0)},(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"15",height:"15",viewBox:"0 0 15 15"},(0,i.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,i.h)("span",{className:"uppy-DashboardContent-addMoreCaption"},t("addMore"))):(0,i.h)("div",null))}},5760:function(e,t,s){"use strict";var i=s(9372);const n=s(1252),a="uppy-transition-slideDownUp";class r extends i.Component{constructor(e){super(e),this.state={cachedChildren:null,className:""}}componentWillUpdate(e){const{cachedChildren:t}=this.state,s=(0,i.toChildArray)(e.children)[0];if(t===s)return null;const n={cachedChildren:s};s&&!t&&(n.className=`${a}-enter`,cancelAnimationFrame(this.animationFrame),clearTimeout(this.leaveTimeout),this.leaveTimeout=void 0,this.animationFrame=requestAnimationFrame((()=>{this.setState({className:`${a}-enter ${a}-enter-active`}),this.enterTimeout=setTimeout((()=>{this.setState({className:""})}),250)}))),t&&!s&&void 0===this.leaveTimeout&&(n.cachedChildren=t,n.className=`${a}-leave`,cancelAnimationFrame(this.animationFrame),clearTimeout(this.enterTimeout),this.enterTimeout=void 0,this.animationFrame=requestAnimationFrame((()=>{this.setState({className:`${a}-leave ${a}-leave-active`}),this.leaveTimeout=setTimeout((()=>{this.setState({cachedChildren:null,className:""})}),250)}))),this.setState(n)}render(){const{cachedChildren:e,className:t}=this.state;return e?(0,i.cloneElement)(e,{className:n(t,e.props.className)}):null}}e.exports=r},2453:function(e,t,s){"use strict";var i=s(9372);function n(){return n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},n.apply(this,arguments)}const a={position:"relative",width:"100%",minHeight:"100%"},r={position:"absolute",top:0,left:0,width:"100%",overflow:"visible"};class o extends i.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:s,renderRow:o,overscanCount:l=10,...p}=e;const{offset:h,height:u}=this.state;let d=Math.floor(h/s),c=Math.floor(u/s);l&&(d=Math.max(0,d-d%l),c+=l);const f=d+c+4,m=t.slice(d,f),g={...a,height:t.length*s},y={...r,top:d*s};return(0,i.h)("div",n({onScroll:this.handleScroll},p),(0,i.h)("div",{role:"presentation",style:g},(0,i.h)("div",{role:"presentation",style:y},m.map(o))))}}e.exports=o},7996:function(e,t,s){"use strict";e.exports=s(1436)},3728:function(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}."}}}},4140:function(e){"use strict";e.exports=function(e,t){return t||(t="Copy the URL below"),new Promise((s=>{const i=document.createElement("textarea");i.setAttribute("style",{position:"fixed",top:0,left:0,width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}),i.value=e,document.body.appendChild(i),i.select();const n=()=>{document.body.removeChild(i),window.prompt(t,e),s()};try{return document.execCommand("copy")?(document.body.removeChild(i),s()):n()}catch(e){return document.body.removeChild(i),n()}}))}},6760:function(e,t,s){"use strict";const i=s(6532),n=s(7164),a=s(3112);e.exports=function(){let e=!1;return i(((t,s)=>{const i=a(t,s),r=i.contains(document.activeElement);if(r&&e)return;const o=i.querySelector("[data-uppy-super-focusable]");if(!r||o)if(o)o.focus({preventScroll:!0}),e=!0;else{const t=i.querySelector(n);null==t||t.focus({preventScroll:!0}),e=!1}}),260)}},3112:function(e){"use strict";e.exports=function(e,t){if(t){const s=e.querySelector(`[data-uppy-paneltype="${t}"]`);if(s)return s}return e}},9332:function(e,t,s){"use strict";var i=s(9372);e.exports=function(e){const t={color:"#838999",icon:(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,i.h)("g",{fill:"#A7AFB7",fillRule:"nonzero"},(0,i.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,i.h)("path",{d:"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z"})))};if(!e)return t;const s=e.split("/")[0],n=e.split("/")[1];return"text"===s?{color:"#5a5e69",icon:(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,i.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"===s?{color:"#686de0",icon:(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},(0,i.h)("g",{fill:"#686DE0",fillRule:"evenodd"},(0,i.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,i.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,i.h)("circle",{cx:"7.5",cy:"9.5",r:"1.5"})))}:"audio"===s?{color:"#068dbb",icon:(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,i.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"===s?{color:"#19af67",icon:(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,i.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"===s&&"pdf"===n?{color:"#e25149",icon:(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,i.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"===s&&-1!==["zip","x-7z-compressed","x-rar-compressed","x-tar","x-gzip","x-apple-diskimage"].indexOf(n)?{color:"#00C469",icon:(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},(0,i.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}},6700:function(e){"use strict";e.exports=function(e){const{tagName:t}=e.target;"INPUT"!==t&&"TEXTAREA"!==t?(e.preventDefault(),e.stopPropagation()):e.stopPropagation()}},1792:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forInline=function(e,t,s){null===t||o(e,t,s)},t.forModal=o;const i=s(9568),n=s(7164),a=s(3112);function r(e,t){const s=t[0];s&&(s.focus(),e.preventDefault())}function o(e,t,s){const o=a(s,t),l=i(o.querySelectorAll(n)),p=l.indexOf(document.activeElement);!function(e){return e.contains(document.activeElement)}(o)?r(e,l):e.shiftKey&&0===p?function(e,t){const s=t[t.length-1];s&&(s.focus(),e.preventDefault())}(e,l):e.shiftKey||p!==l.length-1||r(e,l)}},160:function(e,t,s){"use strict";var i=s(9540),n=s(9372);const a=s(9568),r=s(372),o=s(4732),l=s(4740);class p extends i.UIPlugin{constructor(e,t){super(e,t),this.handleDrop=async e=>{var t,s;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1});const i=await o(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,"error")}});i.length>0&&(this.uppy.log("[DragDrop] Files dropped"),this.addFiles(i)),null==(t=(s=this.opts).onDrop)||t.call(s,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=r(),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=a(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,s;e.preventDefault(),e.stopPropagation();const{types:i}=e.dataTransfer,n=i.some((e=>"Files"===e)),{allowNewUpload:a}=this.uppy.getState();if(!n||!a)return e.dataTransfer.dropEffect="none",void clearTimeout(this.removeDragOverClassTimeout);e.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0}),null==(t=(s=this.opts).onDragOver)||t.call(s,e)}handleDragLeave(e){var t,s;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((()=>{this.setPluginState({isDraggingOver:!1})}),50),null==(t=(s=this.opts).onDragLeave)||t.call(s,e)}renderHiddenFileInput(){const{restrictions:e}=this.uppy.opts;return(0,n.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,n.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-DragDrop-arrow",width:"16",height:"16",viewBox:"0 0 16 16"},(0,n.h)("path",{d:"M11 10V0H5v10H2l6 6 6-6h-3zm0 0",fillRule:"evenodd"}))}renderLabel(){return(0,n.h)("div",{className:"uppy-DragDrop-label"},this.i18nArray("dropHereOr",{browse:(0,n.h)("span",{className:"uppy-DragDrop-browse"},this.i18n("browse"))}))}renderNote(){return(0,n.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,n.h)("button",{type:"button",className:e,style:t,onClick:()=>this.fileInputRef.click(),onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},this.renderHiddenFileInput(),(0,n.h)("div",{className:"uppy-DragDrop-inner"},p.renderArrowSvg(),this.renderLabel(),this.renderNote()))}install(){const{target:e}=this.opts;this.setPluginState({isDraggingOver:!1}),e&&this.mount(e,this)}uninstall(){this.unmount()}}p.VERSION="2.1.2",e.exports=p},608:function(e,t,s){"use strict";e.exports=s(160)},4740:function(e){"use strict";e.exports={strings:{dropHereOr:"Drop here or %{browse}",browse:"browse"}}},3483:function(e,t,s){"use strict";var i=s(9540),n=s(9372);const a=s(9568),r=s(4300);class o extends i.UIPlugin{constructor(e,t){super(e,t),this.id=this.opts.id||"FileInput",this.title="File Input",this.type="acquirer",this.defaultLocale=r,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=a(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,n.h)("div",{className:"uppy-FileInput-container"},(0,n.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,n.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()}}o.VERSION="2.1.2",e.exports=o},2204:function(e,t,s){"use strict";e.exports=s(3483)},4300:function(e){"use strict";e.exports={strings:{chooseFiles:"Choose files"}}},8768:function(e,t,s){"use strict";var i=s(9372);class n extends i.Component{constructor(){super(...arguments),this.ref=(0,i.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,i.h)("div",{className:"uppy-Informer-animated",ref:this.ref},e)}}e.exports=n},1352:function(e,t,s){"use strict";var i=s(9372),n=s(9540);const a=s(8768),r=s(1695);class o extends n.UIPlugin{constructor(e,t){super(e,t),this.render=e=>(0,i.h)("div",{className:"uppy uppy-Informer"},(0,i.h)(r,null,e.info.map((e=>(0,i.h)(a,{key:e.message},(0,i.h)("p",{role:"alert"},e.message," ",e.details&&(0,i.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)}}o.VERSION="2.1.1",e.exports=o},1695:function(e,t,s){"use strict";var i=s(9372);function n(e,t){const s=e._ptgLinkedRefs||(e._ptgLinkedRefs={});return s[t]||(s[t]=s=>{e.refs[t]=s})}function a(e){const t={};for(let a=0;a<e.length;a++)null!=e[a]&&(t[(s=e[a],i=a.toString(36),void 0,null!=(n=null==s?void 0:s.key)?n:i)]=e[a]);var s,i,n;return t}function r(e,t){e=e||{},t=t||{};const s=s=>t.hasOwnProperty(s)?t[s]:e[s],i={};let n=[];for(const s in e)t.hasOwnProperty(s)?n.length&&(i[s]=n,n=[]):n.push(s);const a={};for(const e in t){if(i.hasOwnProperty(e))for(let t=0;t<i[e].length;t++){const n=i[e][t];a[i[e][t]]=s(n)}a[e]=s(e)}for(let e=0;e<n.length;e++)a[n[e]]=s(n[e]);return a}class o extends i.Component{constructor(e,t){super(e,t),this.refs={},this.state={children:a((0,i.toChildArray)((0,i.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=a((0,i.toChildArray)(e.children)||[]),s=this.state.children;let n;for(n in this.setState((e=>({children:r(e.children,t)}))),t)if(t.hasOwnProperty(n)){const e=s&&s.hasOwnProperty(n);t[n]&&e&&this.currentlyTransitioningKeys[n]?(this.keysToEnter.push(n),this.keysToAbortLeave.push(n)):!t[n]||e||this.currentlyTransitioningKeys[n]||this.keysToEnter.push(n)}for(n in s)if(s.hasOwnProperty(n)){const e=t&&t.hasOwnProperty(n);!s[n]||e||this.currentlyTransitioningKeys[n]||this.keysToLeave.push(n)}}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 s=a((0,i.toChildArray)(this.props.children)||[]);s&&s.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 s=a((0,i.toChildArray)(this.props.children)||[]);s&&s.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 s=a((0,i.toChildArray)(this.props.children)||[]);if(s&&s.hasOwnProperty(e))this.performEnter(e);else{const t=(n={},r=this.state.children,Object.assign(n,r));delete t[e],this.setState({children:t})}var n,r}render(e,t){let{childFactory:s,transitionLeave:a,transitionName:r,transitionAppear:o,transitionEnter:l,transitionLeaveTimeout:p,transitionEnterTimeout:h,transitionAppearTimeout:u,component:d,...c}=e,{children:f}=t;const m=[];for(const e in f)if(f.hasOwnProperty(e)){const t=f[e];if(t){const a=n(this,e),r=(0,i.cloneElement)(s(t),{ref:a,key:e});m.push(r)}}return(0,i.h)(d,c,m)}}o.defaultProps={component:"span",childFactory:e=>e},e.exports=o},5416:function(e,t,s){"use strict";e.exports=s(1352)},2800:function(e,t,s){"use strict";var i=s(9372),n=s(9540);class a extends n.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,s=(0===t||100===t)&&this.opts.hideAfterFinish;return(0,i.h)("div",{className:"uppy uppy-ProgressBar",style:{position:this.opts.fixed?"fixed":"initial"},"aria-hidden":s},(0,i.h)("div",{className:"uppy-ProgressBar-inner",style:{width:`${t}%`}}),(0,i.h)("div",{className:"uppy-ProgressBar-percentage"},t))}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}a.VERSION="2.1.2",e.exports=a},64:function(e,t,s){"use strict";e.exports=s(2800)},7528:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancelBtn=function(e){const{i18n:t,uppy:s}=e;return(0,i.h)("button",{type:"button",className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:t("cancel"),"aria-label":t("cancel"),onClick:()=>s.cancelAll(),"data-cy":"cancel","data-uppy-super-focusable":!0},(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},(0,i.h)("g",{fill:"none",fillRule:"evenodd"},(0,i.h)("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),(0,i.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:s}=e;return(0,i.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done",onClick:s,"data-uppy-super-focusable":!0},t("done"))},t.LoadingSpinner=h,t.PauseResumeButton=function(e){const{isAllPaused:t,i18n:s,isAllComplete:n,resumableUploads:a,uppy:r}=e,o=s(t?"resume":"pause");return(0,i.h)("button",{title:o,"aria-label":o,className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onClick:function(){return n?null:a?t?r.resumeAll():r.pauseAll():r.cancelAll()},"data-uppy-super-focusable":!0},(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},(0,i.h)("g",{fill:"none",fillRule:"evenodd"},(0,i.h)("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),(0,i.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,i.h)("div",{className:"uppy-StatusBar-content",role:"status",title:t("complete")},(0,i.h)("div",{className:"uppy-StatusBar-status"},(0,i.h)("div",{className:"uppy-StatusBar-statusPrimary"},(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"15",height:"11",viewBox:"0 0 15 11"},(0,i.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:s,complete:n,numUploads:a}=e;return(0,i.h)("div",{className:"uppy-StatusBar-content",title:s("uploadFailed")},(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11"},(0,i.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,i.h)("div",{className:"uppy-StatusBar-status"},(0,i.h)("div",{className:"uppy-StatusBar-statusPrimary"},s("uploadFailed"),(0,i.h)("button",{className:"uppy-u-reset uppy-StatusBar-details","aria-label":s("showErrorDetails"),"data-microtip-position":"top-right","data-microtip-size":"medium",onClick:function(){const e=`${s("uploadFailed")} \n\n ${t}`;alert(e)},type:"button"},"?")),(0,i.h)(d,{i18n:s,complete:n,numUploads:a})))},t.ProgressBarProcessing=function(e){const{progress:t}=e,{value:s,mode:n,message:a}=t,r=Math.round(100*s);return(0,i.h)("div",{className:"uppy-StatusBar-content"},(0,i.h)(h,null),"determinate"===n?`${r}% · `:"",a)},t.ProgressBarUploading=function(e){const{i18n:t,supportsUploadProgress:s,totalProgress:n,showProgressDetails:a,isUploadStarted:r,isAllComplete:o,isAllPaused:l,newFiles:p,numUploads:u,complete:m,totalUploadedSize:g,totalSize:y,totalETA:b,startUpload:v}=e,w=p&&r;if(!r||o)return null;const C=t(l?"paused":"uploading");return(0,i.h)("div",{className:"uppy-StatusBar-content","aria-label":C,title:C},l?null:(0,i.h)(h,null),(0,i.h)("div",{className:"uppy-StatusBar-status"},(0,i.h)("div",{className:"uppy-StatusBar-statusPrimary"},s?`${C}: ${n}%`:C),l||w||!a?null:s?(0,i.h)(f,{numUploads:u,complete:m,totalUploadedSize:g,totalSize:y,totalETA:b,i18n:t}):(0,i.h)(d,{i18n:t,complete:m,numUploads:u}),w?(0,i.h)(c,{i18n:t,newFiles:p,startUpload:v}):null))},t.ProgressDetails=u,t.RetryBtn=function(e){const{i18n:t,uppy:s}=e;return(0,i.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":t("retryUpload"),onClick:()=>s.retryAll(),"data-uppy-super-focusable":!0},(0,i.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"8",height:"10",viewBox:"0 0 8 10"},(0,i.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:s,recoveredState:a,i18n:r,uploadState:o,isSomeGhost:p,startUpload:h}=e,u=n("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":o===l.STATE_WAITING},{"uppy-StatusBar-actionBtn--disabled":p}),d=r(t&&s&&!a?"uploadXNewFiles":"uploadXFiles",{smart_count:t});return(0,i.h)("button",{type:"button",className:u,"aria-label":r("uploadXFiles",{smart_count:t}),onClick:h,disabled:p,"data-uppy-super-focusable":!0},d)};var i=s(9372);const n=s(1252),a=s(3228),r=s(4596),o=s(8104),l=s(8812),p=()=>" · ";function h(){return(0,i.h)("svg",{className:"uppy-StatusBar-spinner","aria-hidden":"true",focusable:"false",width:"14",height:"14"},(0,i.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 u(e){const{numUploads:t,complete:s,totalUploadedSize:n,totalSize:a,totalETA:l,i18n:h}=e,u=t>1;return(0,i.h)("div",{className:"uppy-StatusBar-statusSecondary"},u&&h("filesUploadedOfTotal",{complete:s,smart_count:t}),(0,i.h)("span",{className:"uppy-StatusBar-additionalInfo"},u&&p(),h("dataUploadedOfTotal",{complete:r(n),total:r(a)}),p(),h("xTimeLeft",{time:o(l)})))}function d(e){const{i18n:t,complete:s,numUploads:n}=e;return(0,i.h)("div",{className:"uppy-StatusBar-statusSecondary"},t("filesUploadedOfTotal",{complete:s,smart_count:n}))}function c(e){const{i18n:t,newFiles:s,startUpload:a}=e,r=n("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return(0,i.h)("div",{className:"uppy-StatusBar-statusSecondary"},(0,i.h)("div",{className:"uppy-StatusBar-statusSecondaryHint"},t("xMoreFilesAdded",{smart_count:s})),(0,i.h)("button",{type:"button",className:r,"aria-label":t("uploadXFiles",{smart_count:s}),onClick:a},t("upload")))}const f=a(u,500,{leading:!0,trailing:!0})},2776:function(e,t,s){"use strict";var i=s(9372),n=s(7528);const a=s(1252),r=s(8812),o=s(3936),{STATE_ERROR:l,STATE_WAITING:p,STATE_PREPROCESSING:h,STATE_UPLOADING:u,STATE_POSTPROCESSING:d,STATE_COMPLETE:c}=r;e.exports=function(e){const{newFiles:t,allowNewUpload:s,isUploadInProgress:r,isAllPaused:f,resumableUploads:m,error:g,hideUploadButton:y,hidePauseResumeButton:b,hideCancelButton:v,hideRetryButton:w,recoveredState:C,uploadState:P,totalProgress:F,files:D,supportsUploadProgress:S,hideAfterFinish:k,isSomeGhost:T,doneButtonHandler:A,isUploadStarted:O,i18n:E,startUpload:U,uppy:B,isAllComplete:x,showProgressDetails:I,numUploads:N,complete:M,totalSize:R,totalETA:L,totalUploadedSize:z}=e,_=function(){switch(P){case d:case h:{const e=o(D);return"determinate"===e.mode?100*e.value:F}case l:return null;case u:return S?F:null;default:return F}}(),V=function(){if(C)return!1;switch(P){case p:return y||0===t;case c:return k;default:return!1}}(),q=null!=_?_:100,H=!g&&t&&!r&&!f&&s&&!y,j=!v&&P!==p&&P!==c,W=m&&!b&&P===u,$=g&&!x&&!w,G=A&&P===c,K=a("uppy-StatusBar-progress",{"is-indeterminate":function(){switch(P){case d:case h:{const{mode:e}=o(D);return"indeterminate"===e}case u:return!S;default:return!1}}()}),X=a("uppy-StatusBar",`is-${P}`,{"has-ghosts":T});return(0,i.h)("div",{className:X,"aria-hidden":V},(0,i.h)("div",{className:K,style:{width:`${q}%`},role:"progressbar","aria-label":`${q}%`,"aria-valuetext":`${q}%`,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":_}),(()=>{switch(P){case h:case d:return(0,i.h)(n.ProgressBarProcessing,{progress:o(D)});case c:return(0,i.h)(n.ProgressBarComplete,{i18n:E});case l:return(0,i.h)(n.ProgressBarError,{error:g,i18n:E,numUploads:N,complete:M});case u:return(0,i.h)(n.ProgressBarUploading,{i18n:E,supportsUploadProgress:S,totalProgress:F,showProgressDetails:I,isUploadStarted:O,isAllComplete:x,isAllPaused:f,newFiles:t,numUploads:N,complete:M,totalUploadedSize:z,totalSize:R,totalETA:L,startUpload:U});default:return null}})(),(0,i.h)("div",{className:"uppy-StatusBar-actions"},C||H?(0,i.h)(n.UploadBtn,{newFiles:t,isUploadStarted:O,recoveredState:C,i18n:E,isSomeGhost:T,startUpload:U,uploadState:P}):null,$?(0,i.h)(n.RetryBtn,{i18n:E,uppy:B}):null,W?(0,i.h)(n.PauseResumeButton,{isAllPaused:f,i18n:E,isAllComplete:x,resumableUploads:m,uppy:B}):null,j?(0,i.h)(n.CancelBtn,{i18n:E,uppy:B}):null,G?(0,i.h)(n.DoneBtn,{i18n:E,doneButtonHandler:A}):null))}},8812:function(e){"use strict";e.exports={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"}},639:function(e,t,s){"use strict";var i=s(9540);const n=s(7192),a=s(5628),r=s(984),o=s(8812),l=s(2776),p=s(1320);function h(e,t,s,i){if(e&&!t)return o.STATE_ERROR;if(t)return o.STATE_COMPLETE;if(s)return o.STATE_WAITING;let n=o.STATE_WAITING;const a=Object.keys(i);for(let e=0;e<a.length;e++){const{progress:t}=i[a[e]];if(t.uploadStarted&&!t.uploadComplete)return o.STATE_UPLOADING;t.preprocess&&n!==o.STATE_UPLOADING&&(n=o.STATE_PREPROCESSING),t.postprocess&&n!==o.STATE_UPLOADING&&n!==o.STATE_PREPROCESSING&&(n=o.STATE_POSTPROCESSING)}return n}class u extends i.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=p,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:s,allowNewUpload:i,totalProgress:r,error:o,recoveredState:p}=e,{newFiles:u,startedFiles:d,completeFiles:c,inProgressNotPausedFiles:f,isUploadStarted:m,isAllComplete:g,isAllErrored:y,isAllPaused:b,isUploadInProgress:v,isSomeGhost:w}=this.uppy.getObjectOfFilesPerState(),C=p?Object.values(s):u,P=function(e){const t=function(e){let t=0;return e.forEach((e=>{t+=n(e.progress)})),t}(e);if(0===t)return 0;const s=e.reduce(((e,t)=>e+a(t.progress)),0);return Math.round(s/t*10)/10}(f),F=!!t.resumableUploads,D=!1!==t.uploadProgress;let S=0,k=0;return d.forEach((e=>{S+=e.progress.bytesTotal||0,k+=e.progress.bytesUploaded||0})),l({error:o,uploadState:h(o,g,p,e.files||{}),allowNewUpload:i,totalProgress:r,totalSize:S,totalUploadedSize:k,isAllComplete:!1,isAllPaused:b,isAllErrored:y,isUploadStarted:m,isUploadInProgress:v,isSomeGhost:w,recoveredState:p,complete:c.length,newFiles:C.length,numUploads:d.length,totalETA:P,files:s,i18n:this.i18n,uppy:this.uppy,startUpload:this.startUpload,doneButtonHandler:this.opts.doneButtonHandler,resumableUploads:F,supportsUploadProgress:D,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;r(e)||(e.dir="ltr")}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}u.VERSION="2.2.2",e.exports=u},3936:function(e){"use strict";e.exports=function(e){const t=[];let s,i;for(const{progress:n}of Object.values(e)){const{preprocess:e,postprocess:a}=n;null==i&&(e||a)&&({mode:s,message:i}=e||a),"determinate"===(null==e?void 0:e.mode)&&t.push(e.value),"determinate"===(null==a?void 0:a.mode)&&t.push(a.value)}return{mode:s,message:i,value:t.reduce(((e,s)=>e+s/t.length),0)}}},1505:function(e,t,s){"use strict";e.exports=s(639)},1320:function(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"}}},4304:function(e,t,s){"use strict";var i=s(9540),n=s(7688);const a=s(4728),r=s(6472),o=s(4360),l=s(4968);class p extends i.UIPlugin{constructor(e,t){if(super(e,t),this.onFileAdded=e=>{!e.preview&&e.data&&o(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&&r(e.preview)&&URL.revokeObjectURL(e.preview)},this.onRestored=()=>{this.uppy.getFiles().filter((e=>e.isRestored)).forEach((e=>{e.preview&&!r(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,s){const i=URL.createObjectURL(e.data),a=new Promise(((e,t)=>{const s=new Image;s.src=i,s.addEventListener("load",(()=>{URL.revokeObjectURL(i),e(s)})),s.addEventListener("error",(e=>{URL.revokeObjectURL(i),t(e.error||new Error("Could not create thumbnail"))}))})),r=(0,n.rotation)(e.data).catch((()=>1));return Promise.all([a,r]).then((e=>{let[i,n]=e;const a=this.getProportionalDimensions(i,t,s,n.deg),r=this.rotateImage(i,n),o=this.resizeImage(r,a.width,a.height);return this.canvasToBlob(o,this.thumbnailType,80)})).then((e=>URL.createObjectURL(e)))}getProportionalDimensions(e,t,s,i){let n=e.width/e.height;return 90!==i&&270!==i||(n=e.height/e.width),null!=t?{width:t,height:Math.round(t/n)}:null!=s?{width:Math.round(s*n),height:s}:{width:this.defaultThumbnailDimension,height:Math.round(this.defaultThumbnailDimension/n)}}resizeImage(e,t,s){let i=this.protect(e),n=Math.ceil(Math.log2(i.width/t));n<1&&(n=1);let a=t*2**(n-1),r=s*2**(n-1);for(;n--;){const e=document.createElement("canvas");e.width=a,e.height=r,e.getContext("2d").drawImage(i,0,0,a,r),i=e,a=Math.round(a/2),r=Math.round(r/2)}return i}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 o(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)}}p.VERSION="2.2.2",e.exports=p,p.prototype.canvasToBlob=function(e,t,s){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((i=>{e.toBlob(i,t,s)})).then((e=>{if(null===e)throw new Error("cannot read image, probably an svg with external resources");return e})):Promise.resolve().then((()=>a(e.toDataURL(t,s),{}))).then((e=>{if(null===e)throw new Error("could not extract blob, probably an old browser");return e}))},p.prototype.protect=function(e){const t=e.width/e.height,s=5e6,i=4096;let n=Math.floor(Math.sqrt(s*t)),a=Math.floor(s/Math.sqrt(s*t));if(n>i&&(n=i,a=Math.round(n/t)),a>i&&(a=i,n=Math.round(t*a)),e.width>n){const t=document.createElement("canvas");return t.width=n,t.height=a,t.getContext("2d").drawImage(e,0,0,n,a),t}return e},p.prototype.rotateImage=function(e,t){let s=e.width,i=e.height;90!==t.deg&&270!==t.deg||(s=e.height,i=e.width);const n=document.createElement("canvas");n.width=s,n.height=i;const a=n.getContext("2d");return a.translate(s/2,i/2),t.canvas&&(a.rotate(t.rad),a.scale(t.scaleX,t.scaleY)),a.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),n}},4968:function(e){"use strict";e.exports={strings:{generatingThumbnails:"Generating thumbnails..."}}},7164:function(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])']},4728:function(e){"use strict";const t=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;e.exports=function(e,s,i){var n,a;const r=t.exec(e),o=null!=(n=null!=(a=s.mimeType)?a:null==r?void 0:r[1])?n:"plain/text";let l;if(null!=r[2]){const e=atob(decodeURIComponent(r[3])),t=new Uint8Array(e.length);for(let s=0;s<e.length;s++)t[s]=e.charCodeAt(s);l=[t]}else l=[decodeURIComponent(r[3])];return i?new File(l,s.name||"",{type:o}):new Blob(l,{type:o})}},8576:function(e,t,s){"use strict";const i=s(6208);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&&i(e)?[e]:null}},5628:function(e){"use strict";e.exports=function(e){return e.bytesTotal-e.bytesUploaded}},4732:function(e,t,s){"use strict";const i=s(3336),n=s(1588);e.exports=async function(e,t){let{logDropError:s=(()=>{})}=void 0===t?{}:t;try{const t=[];for await(const n of i(e,s))t.push(n);return t}catch{return n(e)}}},1588:function(e,t,s){"use strict";const i=s(9568);e.exports=function(e){const t=i(e.files);return Promise.resolve(t)}},9272:function(e){"use strict";e.exports=function e(t,s,i,n){let{onSuccess:a}=n;t.readEntries((n=>{const r=[...s,...n];n.length?queueMicrotask((()=>{e(t,r,i,{onSuccess:a})})):a(r)}),(e=>{i(e),a(s)}))}},3336:function(e,t,s){"use strict";const i=s(9272);function n(e,t){return null==e?e:{kind:e.isFile?"file":e.isDirectory?"directory":void 0,name:e.name,getFile(){return new Promise(((t,s)=>e.file(t,s)))},async*values(){const s=e.createReader(),a=await new Promise((e=>{i(s,[],t,{onSuccess:s=>e(s.map((e=>n(e,t))))})}));yield*a}}}async function*a(e,t){if("file"===e.kind){const s=await e.getFile();null!==s&&(s.relativePath=t?`${t}/${e.name}`:null,yield s)}else if("directory"===e.kind)for await(const s of e.values())yield*a(s,`${t}/${e.name}`)}e.exports=async function*(e,t){const s=await Promise.all(Array.from(e.items,(async e=>{var s;return{lastResortFile:e.getAsFile(),entry:null!=(s=await(null==e.getAsFileSystemHandle?void 0:e.getAsFileSystemHandle()))?s:n(e.webkitGetAsEntry(),t)}})));for(const{lastResortFile:e,entry:i}of s)if(null!=i)try{yield*a(i,"")}catch(s){e?yield e:t(s)}}},7192:function(e){"use strict";e.exports=function(e){if(!e.bytesUploaded)return 0;const t=Date.now()-e.uploadStarted;return e.bytesUploaded/(t/1e3)}},372:function(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}},6472:function(e){"use strict";e.exports=function(e){return e.startsWith("blob:")}},4360:function(e){"use strict";e.exports=function(e){return!!e&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)}},8104:function(e,t,s){"use strict";const i=s(9892);e.exports=function(e){const t=i(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`}`}},9892:function(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)}}},9568:function(e){"use strict";e.exports=Array.from},5720:function(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 s=t-3,i=Math.ceil(s/2),n=Math.floor(s/2);return e.slice(0,i)+"..."+e.slice(-n)}},8600:function(e,t,s){"use strict";s.r(t),s.d(t,{Dashboard:function(){return i},DashboardModal:function(){return n},DragDrop:function(){return a},FileInput:function(){return l},ProgressBar:function(){return r},StatusBar:function(){return o},useUppy:function(){return p}});var i=s(772),n=s(6440),a=s(24),r=s(3740),o=s(7064),l=s(4704),p=s(9040)}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 848.6e27d6eb.chunk.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[848],{3228:function(t,n,e){var r="Expected a function",i=NaN,o="[object Symbol]",s=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,f="object"==typeof e.g&&e.g&&e.g.Object===Object&&e.g,p="object"==typeof self&&self&&self.Object===Object&&self,h=f||p||Function("return this")(),g=Object.prototype.toString,d=Math.max,y=Math.min,v=function(){return h.Date.now()};function b(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function m(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&g.call(t)==o}(t))return i;if(b(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=b(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(s,"");var e=a.test(t);return e||c.test(t)?l(t.slice(2),e?2:8):u.test(t)?i:+t}t.exports=function(t,n,e){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(r);return b(e)&&(i="leading"in e?!!e.leading:i,o="trailing"in e?!!e.trailing:o),function(t,n,e){var i,o,s,u,a,c,l=0,f=!1,p=!1,h=!0;if("function"!=typeof t)throw new TypeError(r);function g(n){var e=i,r=o;return i=o=void 0,l=n,u=t.apply(r,e)}function w(t){var e=t-c;return void 0===c||e>=n||e<0||p&&t-l>=s}function _(){var t=v();if(w(t))return j(t);a=setTimeout(_,function(t){var e=n-(t-c);return p?y(e,s-(t-l)):e}(t))}function j(t){return a=void 0,h&&i?g(t):(i=o=void 0,u)}function O(){var t=v(),e=w(t);if(i=arguments,o=this,c=t,e){if(void 0===a)return function(t){return l=t,a=setTimeout(_,n),f?g(t):u}(c);if(p)return a=setTimeout(_,n),g(c)}return void 0===a&&(a=setTimeout(_,n)),u}return n=m(n)||0,b(e)&&(f=!!e.leading,s=(p="maxWait"in e)?d(m(e.maxWait)||0,n):s,h="trailing"in e?!!e.trailing:h),O.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=o=a=void 0},O.flush=function(){return void 0===a?u:j(v())},O}(t,n,{leading:i,maxWait:n,trailing:o})}},1816:function(t){t.exports=function(){var t={},n=t._fns={};return t.emit=function(t,e,r,i,o,s,u){var a=function(t){for(var e=n[t]?n[t]:[],r=t.indexOf(":"),i=-1===r?[t]:[t.substring(0,r),t.substring(r+1)],o=Object.keys(n),s=0,u=o.length;s<u;s++){var a=o[s];if("*"===a&&(e=e.concat(n[a])),2===i.length&&i[0]===a){e=e.concat(n[a]);break}}return e}(t);a.length&&function(t,n,e){for(var r=0,i=n.length;r<i&&n[r];r++)n[r].event=t,n[r].apply(n[r],e)}(t,a,[e,r,i,o,s,u])},t.on=function(t,e){n[t]||(n[t]=[]),n[t].push(e)},t.once=function(n,e){this.on(n,(function r(){e.apply(this,arguments),t.off(n,r)}))},t.off=function(t,n){var e=[];if(t&&n)for(var r=this._fns[t],i=0,o=r?r.length:0;i<o;i++)r[i]!==n&&e.push(r[i]);e.length?this._fns[t]=e:delete this._fns[t]},t}},3868:function(t,n,e){"use strict";const r=e(4595);t.exports=class{constructor(t,n){void 0===n&&(n={}),this.uppy=t,this.opts=n}getPluginState(){const{plugins:t}=this.uppy.getState();return t[this.id]||{}}setPluginState(t){const{plugins:n}=this.uppy.getState();this.uppy.setState({plugins:{...n,[this.id]:{...n[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new r([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),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(){}}},4595:function(t,n,e){"use strict";function r(t,n){if(!Object.prototype.hasOwnProperty.call(t,n))throw new TypeError("attempted to use private field on non-instance");return t}var i=0;function o(t){return"__private_"+i+++"_"+t}const s=e(5412);function u(t,n,e){const r=[];return t.forEach((t=>"string"!=typeof t?r.push(t):n[Symbol.split](t).forEach(((t,n,i)=>{""!==t&&r.push(t),n<i.length-1&&r.push(e)})))),r}function a(t,n){const e=/\$/g;let r=[t];if(null==n)return r;for(const t of Object.keys(n))if("_"!==t){let i=n[t];"string"==typeof i&&(i=e[Symbol.replace](i,"$$$$")),r=u(r,new RegExp(`%\\{${t}\\}`,"g"),i)}return r}var c=o("apply");function l(t){if(null==t||!t.strings)return;const n=this.locale;this.locale={...n,strings:{...n.strings,...t.strings}},this.locale.pluralize=t.pluralize||n.pluralize}t.exports=class{constructor(t){Object.defineProperty(this,c,{value:l}),this.locale={strings:{},pluralize(t){return 1===t?0:1}},Array.isArray(t)?t.forEach(r(this,c)[c],this):r(this,c)[c](t)}translate(t,n){return this.translateArray(t,n).join("")}translateArray(t,n){if(!s(this.locale.strings,t))throw new Error(`missing string: ${t}`);const e=this.locale.strings[t];if("object"==typeof e){if(n&&void 0!==n.smart_count)return a(e[this.locale.pluralize(n.smart_count)],n);throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return a(e,n)}}},5412:function(t){"use strict";t.exports=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)}}}]);
|