Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Autoría | Ultima modificación | Ver Log |

"use strict";(self.webpackChunkleaderslinked=self.webpackChunkleaderslinked||[]).push([[800],{8363:(e,t)=>{t.Z=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}},5390:(e,t,n)=>{n.r(t),n.d(t,{CKEditor:()=>z,CKEditorEventAction:()=>h,prefixEventName:()=>y,registerEditorEventHandler:()=>O,stripPrefix:()=>g,useCKEditor:()=>k});var r,o=n(7294);function i(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function a(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}function c(e,t){return"CKEDITOR"in window?Promise.resolve(CKEDITOR):"string"!=typeof e||e.length<1?Promise.reject(new TypeError("CKEditor URL must be a non-empty string.")):(r||(r=c.scriptLoader(e).then((function(e){return t&&t(e),e}))),r)}c.scriptLoader=function(e){return new Promise((function(t,n){
/**
 * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.md.
 */
var o,c,u,l,s;o=e,c=function(e){return r=void 0,e?n(e):window.CKEDITOR?void t(CKEDITOR):n(new Error("Script loaded from editorUrl doesn't provide CKEDITOR namespace."))},l=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script"),"function"==typeof c&&(u=c,c={}),c=c||{},u=u||function(){},s.type=c.type||"text/javascript",s.charset=c.charset||"utf8",s.async=!("async"in c)||!!c.async,s.src=o,c.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(s,c.attrs),c.text&&(s.text=String(c.text)),("onload"in s?i:a)(s,u),s.onload||i(s,u),l.appendChild(s)}))};var u=n(5697),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function s(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var f=["activeEnterModeChange","activeFilterChange","afterCommandExec","afterInsertHtml","afterPaste","afterPasteFromWord","afterSetData","afterUndoImage","ariaEditorHelpLabel","ariaWidget","autogrow","beforeCommandExec","beforeDestroy","beforeGetData","beforeModeUnload","beforeSetMode","beforeUndoImage","blur","change","configLoaded","contentDirChanged","contentDom","contentDomInvalidated","contentDomUnload","contentPreview","customConfigLoaded","dataFiltered","dataReady","destroy","dialogHide","dialogShow","dirChanged","doubleclick","dragend","dragstart","drop","elementsPathUpdate","exportPdf","fileUploadRequest","fileUploadResponse","floatingSpaceLayout","focus","getData","getSnapshot","insertElement","insertHtml","insertText","instanceReady","key","langLoaded","loadSnapshot","loaded","lockSnapshot","maximize","menuShow","mode","notificationHide","notificationShow","notificationUpdate","paste","pasteFromWord","pluginsLoaded","readOnly","removeFormatCleanup","required","resize","save","saveSnapshot","selectionChange","setData","stylesRemove","stylesSet","template","toDataFormat","toHtml","uiSpace","unlockSnapshot","updateSnapshot","widgetDefinition"],p=["beforeLoad","namespaceLoaded"],d=s(s([],f,!0),p,!0),v="__CKE__";function y(e){return"".concat(v).concat(e)}function g(e){return e.substr(v.length)}function m(e){var t=e.substr(0,1).toUpperCase()+e.substr(1);return"on".concat(t)}function b(e){return e.substr(2,1).toLowerCase()+e.substr(3)}var h=s(s([],f,!0),p,!0).reduce((function(e,t){var n;return l(l({},e),((n={})[t]=y(t),n))}),{});function w(e){return e.split(/(?=[A-Z])/).join("-").toLowerCase()}function D(e,t,n){var r={display:"none",visibility:"hidden"};return"classic"===e?r:"ready"===t?null!=n?n:void 0:r}function O(e){var t=e.debug,n=e.editor,r=e.evtName,o=e.handler,i=e.listenerData,a=e.priority,c=t&&Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),u=o;return t&&(u=function(e){console.log({operation:"invoke",editor:n.name,evtName:r,handlerId:c,data:e.data,listenerData:e.listenerData}),o(e)}),t&&console.log({operation:"register",editor:n.name,evtName:r,handlerId:c}),n.on(r,u,null,i,a),function(){t&&console.log({operation:"unregister",editor:n.name,evtName:r,handlerId:c}),n.removeListener(r,u)}}var x=o.useEffect,j=o.useReducer,S=o.useRef,E={};function k(e){var t=e.config,n=e.debug,r=e.dispatchEvent,o=e.subscribeTo,i=void 0===o?d:o,a=e.editorUrl,u=e.element,l=e.initContent,s=e.type,f=void 0===s?"classic":s,y=S(a||"https://cdn.ckeditor.com/4.17.2/standard-all/ckeditor.js"),g=S(null!=i?i:d),m=S(n),b=S(r),w=S(l),D=S(t||E),k=S(f),C=j(F,{editor:void 0,hookStatus:"init"}),A=C[0],P=A.editor,z=A.hookStatus,R=C[1];return x((function(){if(u&&!P){R({type:"loading"});c(y.current,(function(e){var t;-1!==g.current.indexOf("namespaceLoaded")&&(null===(t=b.current)||void 0===t||t.call(b,{type:h.namespaceLoaded,payload:e}))})).then((function(e){var t,n="inline"===k.current,r=D.current.readOnly;-1!==g.current.indexOf("beforeLoad")&&(null===(t=b.current)||void 0===t||t.call(b,{type:h.beforeLoad,payload:e}));var o=e[n?"inline":"replace"](u,D.current);g.current.filter((function(e){return-1===p.indexOf(e)})).forEach((function(e){O({debug:m.current,editor:o,evtName:e,handler:function(t){var n;null===(n=b.current)||void 0===n||n.call(b,{type:"".concat(v).concat(e),payload:t})}})})),O({debug:m.current,editor:o,evtName:"loaded",handler:function(){R({type:"loaded"})},priority:-1}),O({debug:m.current,editor:o,evtName:"instanceReady",handler:function(e){var t=e.editor;R({type:"ready"}),n&&!r&&t.setReadOnly(!1),w.current&&t.setData(w.current,{noSnapshot:!0,callback:function(){t.resetUndo()}})},priority:-1}),O({debug:m.current,editor:o,evtName:"destroy",handler:function(){R({type:"destroyed"})},priority:-1}),R({type:"unloaded",payload:o})})).catch((function(e){console.error(e),R({type:"error"})}))}return function(){P&&P.destroy()}}),[P,u]),{editor:P,status:null==P?void 0:P.status,error:"error"===z,loading:"loading"===z}}function F(e,t){switch(t.type){case"init":return l(l({},e),{hookStatus:"init"});case"loading":return l(l({},e),{hookStatus:"loading"});case"unloaded":return{editor:t.payload,hookStatus:"unloaded"};case"loaded":return l(l({},e),{hookStatus:"loaded"});case"ready":return l(l({},e),{hookStatus:"ready"});case"destroyed":return{editor:void 0,hookStatus:"destroyed"};case"error":return{editor:void 0,hookStatus:"error"};default:return e}}var C=o.useEffect,A=o.useRef,P=o.useState;function z(e){var t=e.config,n=void 0===t?{}:t,r=e.debug,i=e.editorUrl,a=e.initData,c=e.name,u=e.readOnly,l=e.style,s=e.type,f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["config","debug","editorUrl","initData","name","readOnly","style","type"]),p=P(null),d=p[0],v=p[1],y=A(f);n&&"boolean"==typeof u&&(n.readOnly=u);var h=k({config:n,dispatchEvent:function(e){var t=e.type,n=e.payload,r=m(g(t)),o=y.current[r];o&&o(n)},debug:r,editorUrl:i,element:d,initContent:"string"==typeof a?a:void 0,subscribeTo:Object.keys(f).filter((function(e){return 0===e.indexOf("on")})).map(b),type:s}),O=h.editor,x=h.status;return C((function(){var e="inline"!==s&&O&&("loaded"===x||"ready"===x);return l&&e&&O.container.setStyles(l),function(){l&&e&&Object.keys(l).map(w).forEach((function(e){O.container.removeStyle(e)}))}}),[O,x,l,s]),C((function(){O&&"ready"===x&&"boolean"==typeof u&&O.setReadOnly(u)}),[O,x,u]),o.createElement("div",{id:null!=c?c:void 0,ref:v,style:D(null!=s?s:"classic",x,l)},"string"==typeof a?null:a)}var R=l({config:u.object,debug:u.bool,editorUrl:u.string,initData:u.node,name:u.string,readOnly:u.bool,style:u.object,type:u.oneOf(["classic","inline"])},d.reduce((function(e,t){var n;return l(l({},e),((n={})[m(t)]=u.func,n))}),{}));z.propTypes=R},463:(e,t,n)=>{n.r(t),n.d(t,{ErrorCode:()=>L,default:()=>pe,useDropzone:()=>ve});var r=n(7294),o=n(5697),i=n.n(o);function a(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}Object.create;var l=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"],["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 s(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=l.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 f=[".DS_Store","Thumbs.db"];function p(e){return"object"==typeof e&&null!==e}function d(e){return m(e.target.files).map((function(e){return s(e)}))}function v(e){return a(this,void 0,void 0,(function(){return c(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 s(e)}))]}}))}))}function y(e,t){return a(this,void 0,void 0,(function(){var n;return c(this,(function(r){switch(r.label){case 0:return null===e?[2,[]]:e.items?(n=m(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(b))]):[3,2];case 1:return[2,g(h(r.sent()))];case 2:return[2,g(m(e.files).map((function(e){return s(e)})))]}}))}))}function g(e){return e.filter((function(e){return-1===f.indexOf(e.name)}))}function m(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function b(e){if("function"!=typeof e.webkitGetAsEntry)return w(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?O(t):w(e)}function h(e){return e.reduce((function(e,t){return function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e}(e,Array.isArray(t)?h(t):[t])}),[])}function w(e){var t=e.getAsFile();if(!t)return Promise.reject(e+" is not a File");var n=s(t);return Promise.resolve(n)}function D(e){return a(this,void 0,void 0,(function(){return c(this,(function(t){return[2,e.isDirectory?O(e):x(e)]}))}))}function O(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function o(){var i=this;t.readEntries((function(t){return a(i,void 0,void 0,(function(){var i,a,u;return c(this,(function(c){switch(c.label){case 0:if(t.length)return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return i=c.sent(),e(i),[3,4];case 3:return a=c.sent(),n(a),[3,4];case 4:return[3,6];case 5:u=Promise.all(t.map(D)),r.push(u),o(),c.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function x(e){return a(this,void 0,void 0,(function(){return c(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=s(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var j=n(8363);function S(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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(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(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(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 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 A="file-invalid-type",P="file-too-large",z="file-too-small",R="too-many-files",L={FileInvalidType:A,FileTooLarge:P,FileTooSmall:z,TooManyFiles:R},T=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:A,message:"File type must be ".concat(t)}},I=function(e){return{code:P,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},K=function(e){return{code:z,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},U={code:R,message:"Too many files"};function M(e,t){var n="application/x-moz-file"===e.type||(0,j.Z)(e,t);return[n,n?null:T(t)]}function N(e,t,n){if(B(e.size))if(B(t)&&B(n)){if(e.size>n)return[!1,I(n)];if(e.size<t)return[!1,K(t)]}else{if(B(t)&&e.size<t)return[!1,K(t)];if(B(n)&&e.size>n)return[!1,I(n)]}return[!0,null]}function B(e){return null!=e}function H(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=F(M(e,n),1)[0],i=F(N(e,r,o),1)[0];return t&&i}))}function W(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function _(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 q(e){e.preventDefault()}function G(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function $(e){return-1!==e.indexOf("Edge/")}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return G(e)||$(e)}function J(){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!W(e)&&t&&t.apply(void 0,[e].concat(r)),W(e)}))}}function Q(){return"showOpenFilePicker"in window}function V(e){return e="string"==typeof e?e.split(","):e,[{description:"everything",accept:Array.isArray(e)?e.filter((function(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)})).reduce((function(e,t){return E(E({},e),{},k({},t,[]))}),{}):{}}]}var X=["children"],Y=["open"],ee=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],te=["refKey","onChange","onClick"];function ne(e){return function(e){if(Array.isArray(e))return ie(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||oe(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 re(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(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||oe(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 oe(e,t){if(e){if("string"==typeof e)return ie(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)?ie(e,t):void 0}}function ie(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 ae(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 ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){ue(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(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 se=(0,r.forwardRef)((function(e,t){var n=e.children,o=ve(le(e,X)),i=o.open,a=le(o,Y);return(0,r.useImperativeHandle)(t,(function(){return{open:i}}),[i]),r.createElement(r.Fragment,null,n(ce(ce({},a),{},{open:i})))}));se.displayName="Dropzone";var fe={disabled:!1,getFilesFromEvent:function(e){return a(this,void 0,void 0,(function(){return c(this,(function(t){return p(e)&&p(e.dataTransfer)?[2,y(e.dataTransfer,e.type)]:function(e){return p(e)&&p(e.target)}(e)?[2,d(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,v(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1};se.defaultProps=fe,se.propTypes={children:i().func,accept:i().oneOfType([i().string,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,onDragEnter:i().func,onDragLeave:i().func,onDragOver:i().func,onDrop:i().func,onDropAccepted:i().func,onDropRejected:i().func,validator:i().func};const pe=se;var de={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ce(ce({},fe),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,v=t.onDropAccepted,y=t.onDropRejected,g=t.onFileDialogCancel,m=t.onFileDialogOpen,b=t.useFsAccessApi,h=t.preventDropOnDocument,w=t.noClick,D=t.noKeyboard,O=t.noDrag,x=t.noDragEventsBubbling,j=t.validator,S=(0,r.useMemo)((function(){return"function"==typeof m?m:ge}),[m]),E=(0,r.useMemo)((function(){return"function"==typeof g?g:ge}),[g]),k=(0,r.useRef)(null),F=(0,r.useRef)(null),C=(0,r.useReducer)(ye,de),A=re(C,2),P=A[0],z=A[1],R=P.isFocused,L=P.isFileDialogActive,T=P.draggedFiles,I=function(){L&&setTimeout((function(){F.current&&(F.current.files.length||(z({type:"closeDialog"}),E()))}),300)};(0,r.useEffect)((function(){return b&&Q()?function(){}:(window.addEventListener("focus",I,!1),function(){window.removeEventListener("focus",I,!1)})}),[F,L,E,b]);var K=(0,r.useRef)([]),B=function(e){k.current&&k.current.contains(e.target)||(e.preventDefault(),K.current=[])};(0,r.useEffect)((function(){return h&&(document.addEventListener("dragover",q,!1),document.addEventListener("drop",B,!1)),function(){h&&(document.removeEventListener("dragover",q),document.removeEventListener("drop",B))}}),[k,h]);var G=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),we(e),K.current=[].concat(ne(K.current),[e.target]),_(e)&&Promise.resolve(i(e)).then((function(t){W(e)&&!x||(z({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),s&&s(e))}))}),[i,s,x]),$=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),we(e);var t=_(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&p&&p(e),!1}),[p,x]),X=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),we(e);var t=K.current.filter((function(e){return k.current&&k.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),K.current=t,t.length>0||(z({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),_(e)&&f&&f(e))}),[k,f,x]),Y=(0,r.useCallback)((function(e,t){var r=[],o=[];e.forEach((function(e){var t=re(M(e,n),2),i=t[0],u=t[1],l=re(N(e,c,a),2),s=l[0],f=l[1],p=j?j(e):null;if(i&&s&&!p)r.push(e);else{var d=[u,f];p&&(d=d.concat(p)),o.push({file:e,errors:d.filter((function(e){return e}))})}})),(!u&&r.length>1||u&&l>=1&&r.length>l)&&(r.forEach((function(e){o.push({file:e,errors:[U]})})),r.splice(0)),z({acceptedFiles:r,fileRejections:o,type:"setFiles"}),d&&d(r,o,t),o.length>0&&y&&y(o,t),r.length>0&&v&&v(r,t)}),[z,u,n,c,a,l,d,v,y,j]),oe=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),we(e),K.current=[],_(e)&&Promise.resolve(i(e)).then((function(t){W(e)&&!x||Y(t,e)})),z({type:"reset"})}),[i,Y,x]),ie=(0,r.useCallback)((function(){if(b&&Q()){z({type:"openDialog"}),S();var e={multiple:u,types:V(n)};window.showOpenFilePicker(e).then((function(e){return i(e)})).then((function(e){return Y(e,null)})).catch((function(e){return E(e)})).finally((function(){return z({type:"closeDialog"})}))}else F.current&&(z({type:"openDialog"}),S(),F.current.value=null,F.current.click())}),[z,S,E,b,Y,n,u]),ae=(0,r.useCallback)((function(e){k.current&&k.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),ie()))}),[k,F,ie]),se=(0,r.useCallback)((function(){z({type:"focus"})}),[]),pe=(0,r.useCallback)((function(){z({type:"blur"})}),[]),ve=(0,r.useCallback)((function(){w||(Z()?setTimeout(ie,0):ie())}),[F,w,ie]),me=function(e){return o?null:e},be=function(e){return D?null:me(e)},he=function(e){return O?null:me(e)},we=function(e){x&&e.stopPropagation()},De=(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=le(e,ee);return ce(ce(ue({onKeyDown:be(J(i,ae)),onFocus:be(J(a,se)),onBlur:be(J(c,pe)),onClick:me(J(u,ve)),onDragEnter:he(J(l,G)),onDragOver:he(J(s,$)),onDragLeave:he(J(f,X)),onDrop:he(J(p,oe)),role:"string"==typeof r&&""!==r?r:"button"},n,k),o||D?{}:{tabIndex:0}),d)}}),[k,ae,se,pe,ve,G,$,X,oe,D,O,o]),Oe=(0,r.useCallback)((function(e){e.stopPropagation()}),[]),xe=(0,r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.onChange,i=e.onClick,a=le(e,te),c=ue({accept:n,multiple:u,type:"file",style:{display:"none"},onChange:me(J(o,oe)),onClick:me(J(i,Oe)),autoComplete:"off",tabIndex:-1},r,F);return ce(ce({},c),a)}}),[F,n,u,oe,o]),je=T.length,Se=je>0&&H({files:T,accept:n,minSize:c,maxSize:a,multiple:u,maxFiles:l}),Ee=je>0&&!Se;return ce(ce({},P),{},{isDragAccept:Se,isDragReject:Ee,isFocused:R&&!o,getRootProps:De,getInputProps:xe,rootRef:k,inputRef:F,open:me(ie)})}function ye(e,t){switch(t.type){case"focus":return ce(ce({},e),{},{isFocused:!0});case"blur":return ce(ce({},e),{},{isFocused:!1});case"openDialog":return ce(ce({},de),{},{isFileDialogActive:!0});case"closeDialog":return ce(ce({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return ce(ce({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return ce(ce({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ce({},de);default:return e}}function ge(){}}}]);