import{S as Q,i as V,s as W,V as Y,b as F,d as Z,g as o,W as U,a as B,h as j,u as d,Y as c,Q as h,Z as G,_ as I,a0 as J,t as N,p as P,k as X,y as x,H as $,K as m,E as ee}from"./vendor.906e418a.js";function te(t){let a,s,n,f,i,p,y;const _=t[12].default,l=Y(_,t,t[11],null);return{c(){a=F("div"),l&&l.c(),s=Z(),n=F("input"),o(n,"class","hidden-upload hidden svelte-ow1yme"),o(n,"type","file"),o(n,"accept",t[0]),n.multiple=t[4]==="multiple"||void 0,o(n,"webkitdirectory",t[4]==="directory"||void 0),o(n,"mozdirectory",t[4]==="directory"||void 0),o(a,"class",f=U(t[3]?"upload h-60 border-green-300 text-green-400 dark:text-green-500 dark:border-green-500 border-8 border-dashed w-full flex justify-center items-center text-3xl text-center cursor-pointer leading-10":"upload h-60 border-gray-300 text-gray-400 dark:text-gray-500 dark:border-gray-500 border-8 border-dashed w-full flex justify-center items-center text-3xl text-center cursor-pointer leading-10")+" svelte-ow1yme"),o(a,"theme",t[1])},m(r,u){B(r,a,u),l&&l.m(a,null),j(a,s),j(a,n),t[20](n),i=!0,p||(y=[d(n,"change",t[7]),d(a,"drag",c(h(t[13]))),d(a,"dragstart",c(h(t[14]))),d(a,"dragend",c(h(t[15]))),d(a,"dragover",c(h(t[16]))),d(a,"dragenter",c(h(t[17]))),d(a,"dragleave",c(h(t[18]))),d(a,"drop",c(h(t[19]))),d(a,"click",t[6]),d(a,"drop",t[8]),d(a,"dragenter",t[5]),d(a,"dragleave",t[5])],p=!0)},p(r,[u]){l&&l.p&&(!i||u&2048)&&G(l,_,r,r[11],i?J(_,r[11],u,null):I(r[11]),null),(!i||u&1)&&o(n,"accept",r[0]),(!i||u&8&&f!==(f=U(r[3]?"upload h-60 border-green-300 text-green-400 dark:text-green-500 dark:border-green-500 border-8 border-dashed w-full flex justify-center items-center text-3xl text-center cursor-pointer leading-10":"upload h-60 border-gray-300 text-gray-400 dark:text-gray-500 dark:border-gray-500 border-8 border-dashed w-full flex justify-center items-center text-3xl text-center cursor-pointer leading-10")+" svelte-ow1yme"))&&o(a,"class",f),(!i||u&2)&&o(a,"theme",r[1])},i(r){i||(N(l,r),i=!0)},o(r){P(l,r),i=!1},d(r){r&&X(a),l&&l.d(r),t[20](null),p=!1,x(y)}}}function ae(t,a,s){let{$$slots:n={},$$scope:f}=a,{filetype:i=void 0}=a,{theme:p="default"}=a,{single_file:y=!0}=a,{include_file_metadata:_=!0}=a,l,r=!1,u;const D=$(),R=()=>{s(3,r=!r)},z=()=>{l.click()},k=e=>{let g=Array.from(e);if(!(!e.length||!window.FileReader)){var b=[];g.forEach((v,O)=>{let w=new FileReader;w.readAsDataURL(v),w.onloadend=function(){b[O]=_?{name:v.name,size:v.size,data:this.result}:this.result,b.length===e.length&&D("load",y?b[0]:b)}})}},E=e=>{const g=e.target;!g.files||k(g.files)},A=e=>{var g;!((g=e.dataTransfer)==null?void 0:g.files)||k(e.dataTransfer.files)};function S(e){m.call(this,t,e)}function T(e){m.call(this,t,e)}function q(e){m.call(this,t,e)}function C(e){m.call(this,t,e)}function H(e){m.call(this,t,e)}function K(e){m.call(this,t,e)}function L(e){m.call(this,t,e)}function M(e){ee[e?"unshift":"push"](()=>{l=e,s(2,l)})}return t.$$set=e=>{"filetype"in e&&s(0,i=e.filetype),"theme"in e&&s(1,p=e.theme),"single_file"in e&&s(9,y=e.single_file),"include_file_metadata"in e&&s(10,_=e.include_file_metadata),"$$scope"in e&&s(11,f=e.$$scope)},[i,p,l,r,u,R,z,E,A,y,_,f,n,S,T,q,C,H,K,L,M]}class le extends Q{constructor(a){super();V(this,a,ae,te,W,{filetype:0,theme:1,single_file:9,include_file_metadata:10})}}export{le as U};
