"use strict";(self.webpackChunkweb_toolbox=self.webpackChunkweb_toolbox||[]).push([[916],{70060:(e,t,n)=>{var r=n(24994);t.A=void 0;var o=r(n(79526)),i=n(44414);t.A=(0,o.default)((0,i.jsx)("path",{d:"M23 18V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2M8.5 12.5l2.5 3.01L14.5 11l4.5 6H5z"}),"Panorama")},48089:(e,t,n)=>{n.d(t,{A:()=>b});var r=n(58168),o=n(98587),i=n(9950),a=n(72004),c=n(74061),u=n(59254),l=n(48283),s=n(2235),f=n(80863),p=n(68483);function d(e){return(0,p.Ay)("MuiCard",e)}(0,f.A)("MuiCard",["root"]);var m=n(44414);const v=["className","raised"],g=(0,u.Ay)(s.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({overflow:"hidden"}))),b=i.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiCard"}),{className:i,raised:u=!1}=n,s=(0,o.A)(n,v),f=(0,r.A)({},n,{raised:u}),p=(e=>{const{classes:t}=e;return(0,c.A)({root:["root"]},d,t)})(f);return(0,m.jsx)(g,(0,r.A)({className:(0,a.A)(p.root,i),elevation:u?8:void 0,ref:t,ownerState:f},s))}))},50704:(e,t,n)=>{n.d(t,{A:()=>g});var r=n(58168),o=n(98587),i=n(9950),a=n(72004),c=n(74061),u=n(59254),l=n(48283),s=n(80863),f=n(68483);function p(e){return(0,f.Ay)("MuiCardContent",e)}(0,s.A)("MuiCardContent",["root"]);var d=n(44414);const m=["className","component"],v=(0,u.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}}))),g=i.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiCardContent"}),{className:i,component:u="div"}=n,s=(0,o.A)(n,m),f=(0,r.A)({},n,{component:u}),g=(e=>{const{classes:t}=e;return(0,c.A)({root:["root"]},p,t)})(f);return(0,d.jsx)(v,(0,r.A)({as:u,className:(0,a.A)(g.root,i),ownerState:f,ref:t},s))}))},86189:(e,t)=>{t.A=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t}))}return!0}},36275:(e,t,n)=>{n.d(t,{VB:()=>ue});var r=n(9950),o=n(11942),i=n.n(o),a=n(37827),c=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function u(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=c.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!==typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"===typeof t?t:"string"===typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var l=[".DS_Store","Thumbs.db"];function s(e){return"object"===typeof e&&null!==e}function f(e){return v(e.target.files).map((function(e){return u(e)}))}function p(e){return(0,a.sH)(this,void 0,void 0,(function(){return(0,a.YH)(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return u(e)}))]}}))}))}function d(e,t){return(0,a.sH)(this,void 0,void 0,(function(){var n;return(0,a.YH)(this,(function(r){switch(r.label){case 0:return e.items?(n=v(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(g))]):[3,2];case 1:return[2,m(b(r.sent()))];case 2:return[2,m(v(e.files).map((function(e){return u(e)})))]}}))}))}function m(e){return e.filter((function(e){return-1===l.indexOf(e.name)}))}function v(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function g(e){if("function"!==typeof e.webkitGetAsEntry)return y(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?w(t):y(e)}function b(e){return e.reduce((function(e,t){return(0,a.fX)((0,a.fX)([],(0,a.zs)(e),!1),(0,a.zs)(Array.isArray(t)?b(t):[t]),!1)}),[])}function y(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=u(t);return Promise.resolve(n)}function h(e){return(0,a.sH)(this,void 0,void 0,(function(){return(0,a.YH)(this,(function(t){return[2,e.isDirectory?w(e):D(e)]}))}))}function w(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function o(){var i=this;t.readEntries((function(t){return(0,a.sH)(i,void 0,void 0,(function(){var i,c,u;return(0,a.YH)(this,(function(a){switch(a.label){case 0:if(t.length)return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return i=a.sent(),e(i),[3,4];case 3:return c=a.sent(),n(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(t.map(h)),r.push(u),o(),a.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function D(e){return(0,a.sH)(this,void 0,void 0,(function(){return(0,a.YH)(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=u(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var A=n(86189);function x(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){if(e){if("string"===typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var P="file-invalid-type",S="file-too-large",z="file-too-small",M="too-many-files",R=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:P,message:"File type must be ".concat(t)}},B=function(e){return{code:S,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},T=function(e){return{code:z,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},I={code:M,message:"Too many files"};function L(e,t){var n="application/x-moz-file"===e.type||(0,A.A)(e,t);return[n,n?null:R(t)]}function H(e,t,n){if(_(e.size))if(_(t)&&_(n)){if(e.size>n)return[!1,B(n)];if(e.size<t)return[!1,T(t)]}else{if(_(t)&&e.size<t)return[!1,T(t)];if(_(n)&&e.size>n)return[!1,B(n)]}return[!0,null]}function _(e){return void 0!==e&&null!==e}function K(e){return"function"===typeof e.isPropagationStopped?e.isPropagationStopped():"undefined"!==typeof e.cancelBubble&&e.cancelBubble}function Y(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function N(e){e.preventDefault()}function G(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!K(e)&&t&&t.apply(void 0,[e].concat(r)),K(e)}))}}function U(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function $(e){return/^.*\.[\w]+$/.test(e)}var W=["children"],Z=["open"],q=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],V=["refKey","onChange","onClick"];function X(e){return function(e){if(Array.isArray(e))return ee(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Q(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||Q(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){if(e){if("string"===typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(e,t):void 0}}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ie=(0,r.forwardRef)((function(e,t){var n=e.children,o=ue(oe(e,W)),i=o.open,a=oe(o,Z);return(0,r.useImperativeHandle)(t,(function(){return{open:i}}),[i]),r.createElement(r.Fragment,null,n(ne(ne({},a),{},{open:i})))}));ie.displayName="Dropzone";var ae={disabled:!1,getFilesFromEvent:function(e){return(0,a.sH)(this,void 0,void 0,(function(){return(0,a.YH)(this,(function(t){return s(e)&&s(e.dataTransfer)?[2,d(e.dataTransfer,e.type)]:function(e){return s(e)&&s(e.target)}(e)?[2,f(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"===typeof e.getFile}))?[2,p(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ie.defaultProps=ae,ie.propTypes={children:i().func,accept:i().objectOf(i().arrayOf(i().string)),multiple:i().bool,preventDropOnDocument:i().bool,noClick:i().bool,noKeyboard:i().bool,noDrag:i().bool,noDragEventsBubbling:i().bool,minSize:i().number,maxSize:i().number,maxFiles:i().number,disabled:i().bool,getFilesFromEvent:i().func,onFileDialogCancel:i().func,onFileDialogOpen:i().func,useFsAccessApi:i().bool,autoFocus:i().bool,onDragEnter:i().func,onDragLeave:i().func,onDragOver:i().func,onDrop:i().func,onDropAccepted:i().func,onDropRejected:i().func,onError:i().func,validator:i().func};var ce={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ne(ne({},ae),e),n=t.accept,o=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,c=t.minSize,u=t.multiple,l=t.maxFiles,s=t.onDragEnter,f=t.onDragLeave,p=t.onDragOver,d=t.onDrop,m=t.onDropAccepted,v=t.onDropRejected,g=t.onFileDialogCancel,b=t.onFileDialogOpen,y=t.useFsAccessApi,h=t.autoFocus,w=t.preventDropOnDocument,D=t.noClick,A=t.noKeyboard,O=t.noDrag,k=t.noDragEventsBubbling,C=t.onError,P=t.validator,S=(0,r.useMemo)((function(){return function(e){if(_(e))return Object.entries(e).reduce((function(e,t){var n=E(t,2),r=n[0],o=n[1];return[].concat(x(e),[r],x(o))}),[]).filter((function(e){return U(e)||$(e)})).join(",")}(n)}),[n]),z=(0,r.useMemo)((function(){return function(e){return _(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=E(e,2),n=t[0],r=t[1],o=!0;return U(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every($)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=E(t,2),r=n[0],o=n[1];return j(j({},e),{},F({},r,o))}),{})}]:e}(n)}),[n]),M=(0,r.useMemo)((function(){return"function"===typeof b?b:se}),[b]),R=(0,r.useMemo)((function(){return"function"===typeof g?g:se}),[g]),B=(0,r.useRef)(null),T=(0,r.useRef)(null),W=J((0,r.useReducer)(le,ce),2),Z=W[0],Q=W[1],ee=Z.isFocused,te=Z.isFileDialogActive,ie=(0,r.useRef)("undefined"!==typeof window&&window.isSecureContext&&y&&"showOpenFilePicker"in window),ue=function(){!ie.current&&te&&setTimeout((function(){T.current&&(T.current.files.length||(Q({type:"closeDialog"}),R()))}),300)};(0,r.useEffect)((function(){return window.addEventListener("focus",ue,!1),function(){window.removeEventListener("focus",ue,!1)}}),[T,te,R,ie]);var fe=(0,r.useRef)([]),pe=function(e){B.current&&B.current.contains(e.target)||(e.preventDefault(),fe.current=[])};(0,r.useEffect)((function(){return w&&(document.addEventListener("dragover",N,!1),document.addEventListener("drop",pe,!1)),function(){w&&(document.removeEventListener("dragover",N),document.removeEventListener("drop",pe))}}),[B,w]),(0,r.useEffect)((function(){return!o&&h&&B.current&&B.current.focus(),function(){}}),[B,h,o]);var de=(0,r.useCallback)((function(e){C?C(e):console.error(e)}),[C]),me=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),Ee(e),fe.current=[].concat(X(fe.current),[e.target]),Y(e)&&Promise.resolve(i(e)).then((function(t){if(!K(e)||k){var n=t.length,r=n>0&&function(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,c=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=E(L(e,n),1)[0],i=E(H(e,r,o),1)[0],a=c?c(e):null;return t&&i&&!a}))}({files:t,accept:S,minSize:c,maxSize:a,multiple:u,maxFiles:l,validator:P});Q({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),s&&s(e)}})).catch((function(e){return de(e)}))}),[i,s,de,k,S,c,a,u,l,P]),ve=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),Ee(e);var t=Y(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(n){}return t&&p&&p(e),!1}),[p,k]),ge=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),Ee(e);var t=fe.current.filter((function(e){return B.current&&B.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),fe.current=t,t.length>0||(Q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Y(e)&&f&&f(e))}),[B,f,k]),be=(0,r.useCallback)((function(e,t){var n=[],r=[];e.forEach((function(e){var t=J(L(e,S),2),o=t[0],i=t[1],u=J(H(e,c,a),2),l=u[0],s=u[1],f=P?P(e):null;if(o&&l&&!f)n.push(e);else{var p=[i,s];f&&(p=p.concat(f)),r.push({file:e,errors:p.filter((function(e){return e}))})}})),(!u&&n.length>1||u&&l>=1&&n.length>l)&&(n.forEach((function(e){r.push({file:e,errors:[I]})})),n.splice(0)),Q({acceptedFiles:n,fileRejections:r,type:"setFiles"}),d&&d(n,r,t),r.length>0&&v&&v(r,t),n.length>0&&m&&m(n,t)}),[Q,u,S,c,a,l,d,m,v,P]),ye=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),Ee(e),fe.current=[],Y(e)&&Promise.resolve(i(e)).then((function(t){K(e)&&!k||be(t,e)})).catch((function(e){return de(e)})),Q({type:"reset"})}),[i,be,de,k]),he=(0,r.useCallback)((function(){if(ie.current){Q({type:"openDialog"}),M();var e={multiple:u,types:z};window.showOpenFilePicker(e).then((function(e){return i(e)})).then((function(e){be(e,null),Q({type:"closeDialog"})})).catch((function(e){var t;(t=e)instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)?(R(e),Q({type:"closeDialog"})):!function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?de(e):(ie.current=!1,T.current?(T.current.value=null,T.current.click()):de(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.")))}))}else T.current&&(Q({type:"openDialog"}),M(),T.current.value=null,T.current.click())}),[Q,M,R,y,be,de,z,u]),we=(0,r.useCallback)((function(e){B.current&&B.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),he()))}),[B,he]),De=(0,r.useCallback)((function(){Q({type:"focus"})}),[]),Ae=(0,r.useCallback)((function(){Q({type:"blur"})}),[]),xe=(0,r.useCallback)((function(){D||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?he():setTimeout(he,0))}),[D,he]),Oe=function(e){return o?null:e},je=function(e){return A?null:Oe(e)},Fe=function(e){return O?null:Oe(e)},Ee=function(e){k&&e.stopPropagation()},ke=(0,r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.role,i=e.onKeyDown,a=e.onFocus,c=e.onBlur,u=e.onClick,l=e.onDragEnter,s=e.onDragOver,f=e.onDragLeave,p=e.onDrop,d=oe(e,q);return ne(ne(re({onKeyDown:je(G(i,we)),onFocus:je(G(a,De)),onBlur:je(G(c,Ae)),onClick:Oe(G(u,xe)),onDragEnter:Fe(G(l,me)),onDragOver:Fe(G(s,ve)),onDragLeave:Fe(G(f,ge)),onDrop:Fe(G(p,ye)),role:"string"===typeof r&&""!==r?r:"presentation"},n,B),o||A?{}:{tabIndex:0}),d)}}),[B,we,De,Ae,xe,me,ve,ge,ye,A,O,o]),Ce=(0,r.useCallback)((function(e){e.stopPropagation()}),[]),Pe=(0,r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,o=e.onClick,i=oe(e,V);return ne(ne({},re({accept:S,multiple:u,type:"file",style:{display:"none"},onChange:Oe(G(r,ye)),onClick:Oe(G(o,Ce)),tabIndex:-1},n,T)),i)}}),[T,n,u,ye,o]);return ne(ne({},Z),{},{isFocused:ee&&!o,getRootProps:ke,getInputProps:Pe,rootRef:B,inputRef:T,open:Oe(he)})}function le(e,t){switch(t.type){case"focus":return ne(ne({},e),{},{isFocused:!0});case"blur":return ne(ne({},e),{},{isFocused:!1});case"openDialog":return ne(ne({},ce),{},{isFileDialogActive:!0});case"closeDialog":return ne(ne({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ne(ne({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ne(ne({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ne({},ce);default:return e}}function se(){}},24086:(e,t,n)=>{n.d(t,{A:()=>u});const r=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],o=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],a=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],c=(e,t,n)=>{let r=e;return"string"===typeof t||Array.isArray(t)?r=e.toLocaleString(t,n):!0!==t&&void 0===n||(r=e.toLocaleString(void 0,n)),r};function u(e,t){if(!Number.isFinite(e))throw new TypeError("Expected a finite number, got ".concat(typeof e,": ").concat(e));const n=(t={bits:!1,binary:!1,space:!0,...t}).bits?t.binary?a:i:t.binary?o:r,u=t.space?" ":"";if(t.signed&&0===e)return" 0".concat(u).concat(n[0]);const l=e<0,s=l?"-":t.signed?"+":"";let f;if(l&&(e=-e),void 0!==t.minimumFractionDigits&&(f={minimumFractionDigits:t.minimumFractionDigits}),void 0!==t.maximumFractionDigits&&(f={maximumFractionDigits:t.maximumFractionDigits,...f}),e<1){return s+c(e,t.locale,f)+u+n[0]}const p=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**p,f||(e=e.toPrecision(3));return s+c(Number(e),t.locale,f)+u+n[p]}}}]);