Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6509 | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

"use strict";(self.webpackChunkleaderslinked=self.webpackChunkleaderslinked||[]).push([[830],{3772:(e,t,n)=>{var r=n(1941);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(1268)),i=n(5893),a=(0,o.default)((0,i.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.default=a},8560:(e,t,n)=>{n.r(t),n.d(t,{default:()=>J,getIconButtonUtilityClass:()=>q,iconButtonClasses:()=>X});var r=n(1048),o=n(2793),i=n(7294),a=n(3680),l=n(4780),c=n(1796),u=n(8875),s=n(2079),p=n(8192),d=n(5430),f=n(3511);function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}const v=i.createContext(null);function h(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,i.isValidElement)(e)?t(e):e}(e)})),n}function g(e,t,n){return null!=n[t]?n[t]:e.props[t]}function y(e,t,n){var r=h(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var l={};for(var c in t){if(o[c])for(r=0;r<o[c].length;r++){var u=o[c][r];l[o[c][r]]=n(u)}l[c]=n(c)}for(r=0;r<i.length;r++)l[i[r]]=n(i[r]);return l}(t,r);return Object.keys(o).forEach((function(a){var l=o[a];if((0,i.isValidElement)(l)){var c=a in t,u=a in r,s=t[a],p=(0,i.isValidElement)(s)&&!s.props.in;!u||c&&!p?u||!c||p?u&&c&&(0,i.isValidElement)(s)&&(o[a]=(0,i.cloneElement)(l,{onExited:n.bind(null,l),in:s.props.in,exit:g(l,"exit",e),enter:g(l,"enter",e)})):o[a]=(0,i.cloneElement)(l,{in:!1}):o[a]=(0,i.cloneElement)(l,{onExited:n.bind(null,l),in:!0,exit:g(l,"exit",e),enter:g(l,"enter",e)})}})),o}var b=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},x=function(e){var t,n;function a(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var l=a.prototype;return l.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},l.componentWillUnmount=function(){this.mounted=!1},a.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,r=a,h(n.children,(function(e){return(0,i.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:g(e,"appear",n),enter:g(e,"enter",n),exit:g(e,"exit",n)})}))):y(e,o,a),firstRender:!1}},l.handleExited=function(e,t){var n=h(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,o.Z)({},t.children);return delete n[e.key],{children:n}})))},l.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=(0,r.Z)(e,["component","childFactory"]),a=this.state.contextValue,l=b(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?i.createElement(v.Provider,{value:a},l):i.createElement(v.Provider,{value:a},i.createElement(t,o,l))},a}(i.Component);x.propTypes={},x.defaultProps={component:"div",childFactory:function(e){return e}};const w=x;n(6751),n(8679);var O=n(7646);n(7278);function D(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,O.O)(t)}var E=function(){var e=D.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};var S=n(5893);const k=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:l,rippleSize:c,in:u,onExited:s,timeout:p}=e,[d,f]=i.useState(!1),m=(0,a.Z)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),v={width:c,height:c,top:-c/2+l,left:-c/2+o},h=(0,a.Z)(n.child,d&&n.childLeaving,r&&n.childPulsate);return u||d||f(!0),i.useEffect((()=>{if(!u&&null!=s){const e=setTimeout(s,p);return()=>{clearTimeout(e)}}}),[s,u,p]),(0,S.jsx)("span",{className:m,style:v,children:(0,S.jsx)("span",{className:h})})};var j=n(1588);const R=(0,j.Z)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),C=["center","classes","className"];let P,F,A,T,z=e=>e;const M=E(P||(P=z`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`)),Z=E(F||(F=z`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`)),L=E(A||(A=z`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`)),I=(0,u.ZP)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),$=(0,u.ZP)(k,{name:"MuiTouchRipple",slot:"Ripple"})(T||(T=z`
  opacity: 0;
  position: absolute;

  &.${0} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  &.${0} {
    animation-duration: ${0}ms;
  }

  & .${0} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${0} {
    opacity: 0;
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  & .${0} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${0};
    animation-duration: 2500ms;
    animation-timing-function: ${0};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`),R.rippleVisible,M,550,(({theme:e})=>e.transitions.easing.easeInOut),R.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),R.child,R.childLeaving,Z,550,(({theme:e})=>e.transitions.easing.easeInOut),R.childPulsate,L,(({theme:e})=>e.transitions.easing.easeInOut)),B=i.forwardRef((function(e,t){const n=(0,s.Z)({props:e,name:"MuiTouchRipple"}),{center:l=!1,classes:c={},className:u}=n,p=(0,r.Z)(n,C),[d,f]=i.useState([]),m=i.useRef(0),v=i.useRef(null);i.useEffect((()=>{v.current&&(v.current(),v.current=null)}),[d]);const h=i.useRef(!1),g=i.useRef(null),y=i.useRef(null),b=i.useRef(null);i.useEffect((()=>()=>{clearTimeout(g.current)}),[]);const x=i.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:i}=e;f((e=>[...e,(0,S.jsx)($,{classes:{ripple:(0,a.Z)(c.ripple,R.ripple),rippleVisible:(0,a.Z)(c.rippleVisible,R.rippleVisible),ripplePulsate:(0,a.Z)(c.ripplePulsate,R.ripplePulsate),child:(0,a.Z)(c.child,R.child),childLeaving:(0,a.Z)(c.childLeaving,R.childLeaving),childPulsate:(0,a.Z)(c.childPulsate,R.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},m.current)])),m.current+=1,v.current=i}),[c]),O=i.useCallback(((e={},t={},n=(()=>{}))=>{const{pulsate:r=!1,center:o=l||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&h.current)return void(h.current=!1);"touchstart"===(null==e?void 0:e.type)&&(h.current=!0);const a=i?null:b.current,c=a?a.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,s,p;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(c.width/2),s=Math.round(c.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-c.left),s=Math.round(n-c.top)}if(o)p=Math.sqrt((2*c.width**2+c.height**2)/3),p%2==0&&(p+=1);else{const e=2*Math.max(Math.abs((a?a.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((a?a.clientHeight:0)-s),s)+2;p=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===y.current&&(y.current=()=>{x({pulsate:r,rippleX:u,rippleY:s,rippleSize:p,cb:n})},g.current=setTimeout((()=>{y.current&&(y.current(),y.current=null)}),80)):x({pulsate:r,rippleX:u,rippleY:s,rippleSize:p,cb:n})}),[l,x]),D=i.useCallback((()=>{O({},{pulsate:!0})}),[O]),E=i.useCallback(((e,t)=>{if(clearTimeout(g.current),"touchend"===(null==e?void 0:e.type)&&y.current)return y.current(),y.current=null,void(g.current=setTimeout((()=>{E(e,t)})));y.current=null,f((e=>e.length>0?e.slice(1):e)),v.current=t}),[]);return i.useImperativeHandle(t,(()=>({pulsate:D,start:O,stop:E})),[D,O,E]),(0,S.jsx)(I,(0,o.Z)({className:(0,a.Z)(R.root,c.root,u),ref:b},p,{children:(0,S.jsx)(w,{component:null,exit:!0,children:d})}))}));var N=n(5677);function U(e){return(0,N.Z)("MuiButtonBase",e)}const K=(0,j.Z)("MuiButtonBase",["root","disabled","focusVisible"]),V=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],_=(0,u.ZP)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${K.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),H=i.forwardRef((function(e,t){const n=(0,s.Z)({props:e,name:"MuiButtonBase"}),{action:c,centerRipple:u=!1,children:m,className:v,component:h="button",disabled:g=!1,disableRipple:y=!1,disableTouchRipple:b=!1,focusRipple:x=!1,LinkComponent:w="a",onBlur:O,onClick:D,onContextMenu:E,onDragLeave:k,onFocus:j,onFocusVisible:R,onKeyDown:C,onKeyUp:P,onMouseDown:F,onMouseLeave:A,onMouseUp:T,onTouchEnd:z,onTouchMove:M,onTouchStart:Z,tabIndex:L=0,TouchRippleProps:I,touchRippleRef:$,type:N}=n,K=(0,r.Z)(n,V),H=i.useRef(null),W=i.useRef(null),q=(0,p.Z)(W,$),{isFocusVisibleRef:X,onFocus:Y,onBlur:G,ref:J}=(0,f.Z)(),[Q,ee]=i.useState(!1);g&&Q&&ee(!1),i.useImperativeHandle(c,(()=>({focusVisible:()=>{ee(!0),H.current.focus()}})),[]);const[te,ne]=i.useState(!1);i.useEffect((()=>{ne(!0)}),[]);const re=te&&!y&&!g;function oe(e,t,n=b){return(0,d.Z)((r=>{t&&t(r);return!n&&W.current&&W.current[e](r),!0}))}i.useEffect((()=>{Q&&x&&!y&&te&&W.current.pulsate()}),[y,x,Q,te]);const ie=oe("start",F),ae=oe("stop",E),le=oe("stop",k),ce=oe("stop",T),ue=oe("stop",(e=>{Q&&e.preventDefault(),A&&A(e)})),se=oe("start",Z),pe=oe("stop",z),de=oe("stop",M),fe=oe("stop",(e=>{G(e),!1===X.current&&ee(!1),O&&O(e)}),!1),me=(0,d.Z)((e=>{H.current||(H.current=e.currentTarget),Y(e),!0===X.current&&(ee(!0),R&&R(e)),j&&j(e)})),ve=()=>{const e=H.current;return h&&"button"!==h&&!("A"===e.tagName&&e.href)},he=i.useRef(!1),ge=(0,d.Z)((e=>{x&&!he.current&&Q&&W.current&&" "===e.key&&(he.current=!0,W.current.stop(e,(()=>{W.current.start(e)}))),e.target===e.currentTarget&&ve()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&ve()&&"Enter"===e.key&&!g&&(e.preventDefault(),D&&D(e))})),ye=(0,d.Z)((e=>{x&&" "===e.key&&W.current&&Q&&!e.defaultPrevented&&(he.current=!1,W.current.stop(e,(()=>{W.current.pulsate(e)}))),P&&P(e),D&&e.target===e.currentTarget&&ve()&&" "===e.key&&!e.defaultPrevented&&D(e)}));let be=h;"button"===be&&(K.href||K.to)&&(be=w);const xe={};"button"===be?(xe.type=void 0===N?"button":N,xe.disabled=g):(K.href||K.to||(xe.role="button"),g&&(xe["aria-disabled"]=g));const we=(0,p.Z)(t,J,H);const Oe=(0,o.Z)({},n,{centerRipple:u,component:h,disabled:g,disableRipple:y,disableTouchRipple:b,focusRipple:x,tabIndex:L,focusVisible:Q}),De=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,l.Z)(i,U,o);return n&&r&&(a.root+=` ${r}`),a})(Oe);return(0,S.jsxs)(_,(0,o.Z)({as:be,className:(0,a.Z)(De.root,v),ownerState:Oe,onBlur:fe,onClick:D,onContextMenu:ae,onFocus:me,onKeyDown:ge,onKeyUp:ye,onMouseDown:ie,onMouseLeave:ue,onMouseUp:ce,onDragLeave:le,onTouchEnd:pe,onTouchMove:de,onTouchStart:se,ref:we,tabIndex:g?-1:L,type:N},xe,K,{children:[m,re?(0,S.jsx)(B,(0,o.Z)({ref:q,center:u},I)):null]}))}));var W=n(1220);function q(e){return(0,N.Z)("MuiIconButton",e)}const X=(0,j.Z)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Y=["edge","children","className","color","disabled","disableFocusRipple","size"],G=(0,u.ZP)(H,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,W.Z)(n.color)}`],n.edge&&t[`edge${(0,W.Z)(n.edge)}`],t[`size${(0,W.Z)(n.size)}`]]}})((({theme:e,ownerState:t})=>(0,o.Z)({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var n;const r=null==(n=(e.vars||e).palette)?void 0:n[t.color];return(0,o.Z)({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&(0,o.Z)({color:null==r?void 0:r.main},!t.disableRipple&&{"&:hover":(0,o.Z)({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.Fq)(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${X.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})})),J=i.forwardRef((function(e,t){const n=(0,s.Z)({props:e,name:"MuiIconButton"}),{edge:i=!1,children:c,className:u,color:p="default",disabled:d=!1,disableFocusRipple:f=!1,size:m="medium"}=n,v=(0,r.Z)(n,Y),h=(0,o.Z)({},n,{edge:i,color:p,disabled:d,disableFocusRipple:f,size:m}),g=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled","default"!==r&&`color${(0,W.Z)(r)}`,o&&`edge${(0,W.Z)(o)}`,`size${(0,W.Z)(i)}`]};return(0,l.Z)(a,q,t)})(h);return(0,S.jsx)(G,(0,o.Z)({className:(0,a.Z)(g.root,u),centerRipple:!0,focusRipple:!f,disabled:d,ref:t,ownerState:h},v,{children:c}))}))},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:()=>A,CKEditorEventAction:()=>b,prefixEventName:()=>v,registerEditorEventHandler:()=>O,stripPrefix:()=>h,useCKEditor:()=>j});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 l(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=l.scriptLoader(e).then((function(e){return t&&t(e),e}))),r)}l.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,l,c,u,s;o=e,l=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."))},u=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script"),"function"==typeof l&&(c=l,l={}),l=l||{},c=c||function(){},s.type=l.type||"text/javascript",s.charset=l.charset||"utf8",s.async=!("async"in l)||!!l.async,s.src=o,l.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(s,l.attrs),l.text&&(s.text=String(l.text)),("onload"in s?i:a)(s,c),s.onload||i(s,c),u.appendChild(s)}))};var c=n(5697),u=function(){return u=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},u.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 p=["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"],d=["beforeLoad","namespaceLoaded"],f=s(s([],p,!0),d,!0),m="__CKE__";function v(e){return"".concat(m).concat(e)}function h(e){return e.substr(m.length)}function g(e){var t=e.substr(0,1).toUpperCase()+e.substr(1);return"on".concat(t)}function y(e){return e.substr(2,1).toLowerCase()+e.substr(3)}var b=s(s([],p,!0),d,!0).reduce((function(e,t){var n;return u(u({},e),((n={})[t]=v(t),n))}),{});function x(e){return e.split(/(?=[A-Z])/).join("-").toLowerCase()}function w(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,l=t&&Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),c=o;return t&&(c=function(e){console.log({operation:"invoke",editor:n.name,evtName:r,handlerId:l,data:e.data,listenerData:e.listenerData}),o(e)}),t&&console.log({operation:"register",editor:n.name,evtName:r,handlerId:l}),n.on(r,c,null,i,a),function(){t&&console.log({operation:"unregister",editor:n.name,evtName:r,handlerId:l}),n.removeListener(r,c)}}var D=o.useEffect,E=o.useReducer,S=o.useRef,k={};function j(e){var t=e.config,n=e.debug,r=e.dispatchEvent,o=e.subscribeTo,i=void 0===o?f:o,a=e.editorUrl,c=e.element,u=e.initContent,s=e.type,p=void 0===s?"classic":s,v=S(a||"https://cdn.ckeditor.com/4.17.2/standard-all/ckeditor.js"),h=S(null!=i?i:f),g=S(n),y=S(r),x=S(u),w=S(t||k),j=S(p),C=E(R,{editor:void 0,hookStatus:"init"}),P=C[0],F=P.editor,A=P.hookStatus,T=C[1];return D((function(){if(c&&!F){T({type:"loading"});l(v.current,(function(e){var t;-1!==h.current.indexOf("namespaceLoaded")&&(null===(t=y.current)||void 0===t||t.call(y,{type:b.namespaceLoaded,payload:e}))})).then((function(e){var t,n="inline"===j.current,r=w.current.readOnly;-1!==h.current.indexOf("beforeLoad")&&(null===(t=y.current)||void 0===t||t.call(y,{type:b.beforeLoad,payload:e}));var o=e[n?"inline":"replace"](c,w.current);h.current.filter((function(e){return-1===d.indexOf(e)})).forEach((function(e){O({debug:g.current,editor:o,evtName:e,handler:function(t){var n;null===(n=y.current)||void 0===n||n.call(y,{type:"".concat(m).concat(e),payload:t})}})})),O({debug:g.current,editor:o,evtName:"loaded",handler:function(){T({type:"loaded"})},priority:-1}),O({debug:g.current,editor:o,evtName:"instanceReady",handler:function(e){var t=e.editor;T({type:"ready"}),n&&!r&&t.setReadOnly(!1),x.current&&t.setData(x.current,{noSnapshot:!0,callback:function(){t.resetUndo()}})},priority:-1}),O({debug:g.current,editor:o,evtName:"destroy",handler:function(){T({type:"destroyed"})},priority:-1}),T({type:"unloaded",payload:o})})).catch((function(e){console.error(e),T({type:"error"})}))}return function(){F&&F.destroy()}}),[F,c]),{editor:F,status:null==F?void 0:F.status,error:"error"===A,loading:"loading"===A}}function R(e,t){switch(t.type){case"init":return u(u({},e),{hookStatus:"init"});case"loading":return u(u({},e),{hookStatus:"loading"});case"unloaded":return{editor:t.payload,hookStatus:"unloaded"};case"loaded":return u(u({},e),{hookStatus:"loaded"});case"ready":return u(u({},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,P=o.useRef,F=o.useState;function A(e){var t=e.config,n=void 0===t?{}:t,r=e.debug,i=e.editorUrl,a=e.initData,l=e.name,c=e.readOnly,u=e.style,s=e.type,p=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"]),d=F(null),f=d[0],m=d[1],v=P(p);n&&"boolean"==typeof c&&(n.readOnly=c);var b=j({config:n,dispatchEvent:function(e){var t=e.type,n=e.payload,r=g(h(t)),o=v.current[r];o&&o(n)},debug:r,editorUrl:i,element:f,initContent:"string"==typeof a?a:void 0,subscribeTo:Object.keys(p).filter((function(e){return 0===e.indexOf("on")})).map(y),type:s}),O=b.editor,D=b.status;return C((function(){var e="inline"!==s&&O&&("loaded"===D||"ready"===D);return u&&e&&O.container.setStyles(u),function(){u&&e&&Object.keys(u).map(x).forEach((function(e){O.container.removeStyle(e)}))}}),[O,D,u,s]),C((function(){O&&"ready"===D&&"boolean"==typeof c&&O.setReadOnly(c)}),[O,D,c]),o.createElement("div",{id:null!=l?l:void 0,ref:m,style:w(null!=s?s:"classic",D,u)},"string"==typeof a?null:a)}var T=u({config:c.object,debug:c.bool,editorUrl:c.string,initData:c.node,name:c.string,readOnly:c.bool,style:c.object,type:c.oneOf(["classic","inline"])},f.reduce((function(e,t){var n;return u(u({},e),((n={})[g(t)]=c.func,n))}),{}));A.propTypes=T},463:(e,t,n)=>{n.r(t),n.d(t,{ErrorCode:()=>z,default:()=>de,useDropzone:()=>me});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{c(r.next(e))}catch(e){i(e)}}function l(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}c((r=r.apply(e,t||[])).next())}))}function l(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:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){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,l])}}}Object.create;function c(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 u=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=u.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 p=[".DS_Store","Thumbs.db"];function d(e){return"object"==typeof e&&null!==e}function f(e){return g(e.target.files).map((function(e){return s(e)}))}function m(e){return a(this,void 0,void 0,(function(){return l(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 v(e,t){return a(this,void 0,void 0,(function(){var n;return l(this,(function(r){switch(r.label){case 0:return null===e?[2,[]]:e.items?(n=g(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(y))]):[3,2];case 1:return[2,h(b(r.sent()))];case 2:return[2,h(g(e.files).map((function(e){return s(e)})))]}}))}))}function h(e){return e.filter((function(e){return-1===p.indexOf(e.name)}))}function g(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function y(e){if("function"!=typeof e.webkitGetAsEntry)return x(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?O(t):x(e)}function b(e){return e.reduce((function(e,t){return function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e}(e,Array.isArray(t)?b(t):[t])}),[])}function x(e){var t=e.getAsFile();if(!t)return Promise.reject(e+" is not a File");var n=s(t);return Promise.resolve(n)}function w(e){return a(this,void 0,void 0,(function(){return l(this,(function(t){return[2,e.isDirectory?O(e):D(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,c;return l(this,(function(l){switch(l.label){case 0:if(t.length)return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return i=l.sent(),e(i),[3,4];case 3:return a=l.sent(),n(a),[3,4];case 4:return[3,6];case 5:c=Promise.all(t.map(w)),r.push(c),o(),l.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function D(e){return a(this,void 0,void 0,(function(){return l(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 E=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 k(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){j(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 j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(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,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)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 P="file-invalid-type",F="file-too-large",A="file-too-small",T="too-many-files",z={FileInvalidType:P,FileTooLarge:F,FileTooSmall:A,TooManyFiles:T},M=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)}},Z=function(e){return{code:F,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},L=function(e){return{code:A,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},I={code:T,message:"Too many files"};function $(e,t){var n="application/x-moz-file"===e.type||(0,E.Z)(e,t);return[n,n?null:M(t)]}function B(e,t,n){if(N(e.size))if(N(t)&&N(n)){if(e.size>n)return[!1,Z(n)];if(e.size<t)return[!1,L(t)]}else{if(N(t)&&e.size<t)return[!1,L(t)];if(N(n)&&e.size>n)return[!1,Z(n)]}return[!0,null]}function N(e){return null!=e}function U(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=R($(e,n),1)[0],i=R(B(e,r,o),1)[0];return t&&i}))}function K(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function V(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 _(e){e.preventDefault()}function H(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function W(e){return-1!==e.indexOf("Edge/")}function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return H(e)||W(e)}function X(){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 Y(){return"showOpenFilePicker"in window}function G(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 k(k({},e),{},j({},t,[]))}),{}):{}}]}var J=["children"],Q=["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,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)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 le(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){ce(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 ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ue(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=me(ue(e,J)),i=o.open,a=ue(o,Q);return(0,r.useImperativeHandle)(t,(function(){return{open:i}}),[i]),r.createElement(r.Fragment,null,n(le(le({},a),{},{open:i})))}));se.displayName="Dropzone";var pe={disabled:!1,getFilesFromEvent:function(e){return a(this,void 0,void 0,(function(){return l(this,(function(t){return d(e)&&d(e.dataTransfer)?[2,v(e.dataTransfer,e.type)]:function(e){return d(e)&&d(e.target)}(e)?[2,f(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,m(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=pe,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 de=se;var fe={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=le(le({},pe),e),n=t.accept,o=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,l=t.minSize,c=t.multiple,u=t.maxFiles,s=t.onDragEnter,p=t.onDragLeave,d=t.onDragOver,f=t.onDrop,m=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,g=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.preventDropOnDocument,x=t.noClick,w=t.noKeyboard,O=t.noDrag,D=t.noDragEventsBubbling,E=t.validator,S=(0,r.useMemo)((function(){return"function"==typeof g?g:he}),[g]),k=(0,r.useMemo)((function(){return"function"==typeof h?h:he}),[h]),j=(0,r.useRef)(null),R=(0,r.useRef)(null),C=(0,r.useReducer)(ve,fe),P=re(C,2),F=P[0],A=P[1],T=F.isFocused,z=F.isFileDialogActive,M=F.draggedFiles,Z=function(){z&&setTimeout((function(){R.current&&(R.current.files.length||(A({type:"closeDialog"}),k()))}),300)};(0,r.useEffect)((function(){return y&&Y()?function(){}:(window.addEventListener("focus",Z,!1),function(){window.removeEventListener("focus",Z,!1)})}),[R,z,k,y]);var L=(0,r.useRef)([]),N=function(e){j.current&&j.current.contains(e.target)||(e.preventDefault(),L.current=[])};(0,r.useEffect)((function(){return b&&(document.addEventListener("dragover",_,!1),document.addEventListener("drop",N,!1)),function(){b&&(document.removeEventListener("dragover",_),document.removeEventListener("drop",N))}}),[j,b]);var H=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),xe(e),L.current=[].concat(ne(L.current),[e.target]),V(e)&&Promise.resolve(i(e)).then((function(t){K(e)&&!D||(A({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),s&&s(e))}))}),[i,s,D]),W=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),xe(e);var t=V(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&d&&d(e),!1}),[d,D]),J=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),xe(e);var t=L.current.filter((function(e){return j.current&&j.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),L.current=t,t.length>0||(A({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),V(e)&&p&&p(e))}),[j,p,D]),Q=(0,r.useCallback)((function(e,t){var r=[],o=[];e.forEach((function(e){var t=re($(e,n),2),i=t[0],c=t[1],u=re(B(e,l,a),2),s=u[0],p=u[1],d=E?E(e):null;if(i&&s&&!d)r.push(e);else{var f=[c,p];d&&(f=f.concat(d)),o.push({file:e,errors:f.filter((function(e){return e}))})}})),(!c&&r.length>1||c&&u>=1&&r.length>u)&&(r.forEach((function(e){o.push({file:e,errors:[I]})})),r.splice(0)),A({acceptedFiles:r,fileRejections:o,type:"setFiles"}),f&&f(r,o,t),o.length>0&&v&&v(o,t),r.length>0&&m&&m(r,t)}),[A,c,n,l,a,u,f,m,v,E]),oe=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),xe(e),L.current=[],V(e)&&Promise.resolve(i(e)).then((function(t){K(e)&&!D||Q(t,e)})),A({type:"reset"})}),[i,Q,D]),ie=(0,r.useCallback)((function(){if(y&&Y()){A({type:"openDialog"}),S();var e={multiple:c,types:G(n)};window.showOpenFilePicker(e).then((function(e){return i(e)})).then((function(e){return Q(e,null)})).catch((function(e){return k(e)})).finally((function(){return A({type:"closeDialog"})}))}else R.current&&(A({type:"openDialog"}),S(),R.current.value=null,R.current.click())}),[A,S,k,y,Q,n,c]),ae=(0,r.useCallback)((function(e){j.current&&j.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),ie()))}),[j,R,ie]),se=(0,r.useCallback)((function(){A({type:"focus"})}),[]),de=(0,r.useCallback)((function(){A({type:"blur"})}),[]),me=(0,r.useCallback)((function(){x||(q()?setTimeout(ie,0):ie())}),[R,x,ie]),ge=function(e){return o?null:e},ye=function(e){return w?null:ge(e)},be=function(e){return O?null:ge(e)},xe=function(e){D&&e.stopPropagation()},we=(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,l=e.onBlur,c=e.onClick,u=e.onDragEnter,s=e.onDragOver,p=e.onDragLeave,d=e.onDrop,f=ue(e,ee);return le(le(ce({onKeyDown:ye(X(i,ae)),onFocus:ye(X(a,se)),onBlur:ye(X(l,de)),onClick:ge(X(c,me)),onDragEnter:be(X(u,H)),onDragOver:be(X(s,W)),onDragLeave:be(X(p,J)),onDrop:be(X(d,oe)),role:"string"==typeof r&&""!==r?r:"button"},n,j),o||w?{}:{tabIndex:0}),f)}}),[j,ae,se,de,me,H,W,J,oe,w,O,o]),Oe=(0,r.useCallback)((function(e){e.stopPropagation()}),[]),De=(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=ue(e,te),l=ce({accept:n,multiple:c,type:"file",style:{display:"none"},onChange:ge(X(o,oe)),onClick:ge(X(i,Oe)),autoComplete:"off",tabIndex:-1},r,R);return le(le({},l),a)}}),[R,n,c,oe,o]),Ee=M.length,Se=Ee>0&&U({files:M,accept:n,minSize:l,maxSize:a,multiple:c,maxFiles:u}),ke=Ee>0&&!Se;return le(le({},F),{},{isDragAccept:Se,isDragReject:ke,isFocused:T&&!o,getRootProps:we,getInputProps:De,rootRef:j,inputRef:R,open:ge(ie)})}function ve(e,t){switch(t.type){case"focus":return le(le({},e),{},{isFocused:!0});case"blur":return le(le({},e),{},{isFocused:!1});case"openDialog":return le(le({},fe),{},{isFileDialogActive:!0});case"closeDialog":return le(le({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return le(le({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return le(le({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return le({},fe);default:return e}}function he(){}}}]);