import{p as zt,b as oe,d as Wr,c as Ke,f as Yr,h as Hr,o as Zr,i as Qr,B as Ne,j as Kr,k as hr}from"./index-D953jVe0.chunk.mjs";import{e as Jr}from"./index-B7npabGH.chunk.mjs";function fr(e,t,n){const o=document.querySelector(`#initial-state-${e}-${t}`);if(o===null)return n;try{return JSON.parse(atob(o.value))}catch{throw new Error(`Could not parse initial state ${t} of ${e}`)}}function Je(){return fr("files_sharing","isPublic",null)??document.querySelector('input#isPublic[type="hidden"][name="isPublic"][value="1"]')!==null}function to(){return fr("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}function jt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function In(e,t,n){eo(e,t),t.set(e,n)}function eo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pt(e,t){var n=pr(e,t,"get");return no(e,n)}function no(e,t){return t.get?t.get.call(e):t.value}function On(e,t,n){var o=pr(e,t,"set");return ro(e,o,n),n}function pr(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function ro(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}var oo=typeof Symbol<"u"?Symbol.toStringTag:"@@toStringTag",dt=new WeakMap,Yt=new WeakMap;class me{constructor(t){var{executor:n=()=>{},internals:o=en(),promise:i=new Promise((a,l)=>n(a,l,h=>{o.onCancelList.push(h)}))}=t;In(this,dt,{writable:!0,value:void 0}),In(this,Yt,{writable:!0,value:void 0}),jt(this,oo,"CancelablePromise"),this.cancel=this.cancel.bind(this),On(this,dt,o),On(this,Yt,i||new Promise((a,l)=>n(a,l,h=>{o.onCancelList.push(h)})))}then(t,n){return ue(pt(this,Yt).then(ie(t,pt(this,dt)),ie(n,pt(this,dt))),pt(this,dt))}catch(t){return ue(pt(this,Yt).catch(ie(t,pt(this,dt))),pt(this,dt))}finally(t,n){return n&&pt(this,dt).onCancelList.push(t),ue(pt(this,Yt).finally(ie(()=>{if(t)return n&&(pt(this,dt).onCancelList=pt(this,dt).onCancelList.filter(o=>o!==t)),t()},pt(this,dt))),pt(this,dt))}cancel(){pt(this,dt).isCanceled=!0;var t=pt(this,dt).onCancelList;pt(this,dt).onCancelList=[];for(var n of t)if(typeof n=="function")try{n()}catch(o){console.error(o)}}isCanceled(){return pt(this,dt).isCanceled===!0}}class Pt extends me{constructor(t){super({executor:t})}}jt(Pt,"all",function(e){return se(e,Promise.all(e))}),jt(Pt,"allSettled",function(e){return se(e,Promise.allSettled(e))}),jt(Pt,"any",function(e){return se(e,Promise.any(e))}),jt(Pt,"race",function(e){return se(e,Promise.race(e))}),jt(Pt,"resolve",function(e){return Tn(Promise.resolve(e))}),jt(Pt,"reject",function(e){return Tn(Promise.reject(e))}),jt(Pt,"isCancelable",tn);function Tn(e){return ue(e,en())}function tn(e){return e instanceof Pt||e instanceof me}function ie(e,t){if(e)return n=>{if(!t.isCanceled){var o=e(n);return tn(o)&&t.onCancelList.push(o.cancel),o}return n}}function ue(e,t){return new me({internals:t,promise:e})}function se(e,t){var n=en();return n.onCancelList.push(()=>{for(var o of e)tn(o)&&o.cancel()}),new me({internals:n,promise:t})}function en(){return{isCanceled:!1,onCancelList:[]}}var Ie={},io={2:e=>{function t(i,a,l){i instanceof RegExp&&(i=n(i,l)),a instanceof RegExp&&(a=n(a,l));var h=o(i,a,l);return h&&{start:h[0],end:h[1],pre:l.slice(0,h[0]),body:l.slice(h[0]+i.length,h[1]),post:l.slice(h[1]+a.length)}}function n(i,a){var l=a.match(i);return l?l[0]:null}function o(i,a,l){var h,d,s,u,f,p=l.indexOf(i),v=l.indexOf(a,p+1),y=p;if(p>=0&&v>0){for(h=[],s=l.length;y>=0&&!f;)y==p?(h.push(y),p=l.indexOf(i,y+1)):h.length==1?f=[h.pop(),v]:((d=h.pop())=0?p:v;h.length&&(f=[s,u])}return f}e.exports=t,t.range=o},101:function(e,t,n){var o;e=n.nmd(e),(function(i){var a=(e&&e.exports,typeof oe=="object"&&oe);a.global!==a&&a.window;var l=function(f){this.message=f};(l.prototype=new Error).name="InvalidCharacterError";var h=function(f){throw new l(f)},d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=/[\t\n\f\r ]/g,u={encode:function(f){f=String(f),/[^\0-\xFF]/.test(f)&&h("The string to be encoded contains characters outside of the Latin1 range.");for(var p,v,y,w,N=f.length%3,O="",g=-1,b=f.length-N;++g>18&63)+d.charAt(w>>12&63)+d.charAt(w>>6&63)+d.charAt(63&w);return N==2?(p=f.charCodeAt(g)<<8,v=f.charCodeAt(++g),O+=d.charAt((w=p+v)>>10)+d.charAt(w>>4&63)+d.charAt(w<<2&63)+"="):N==1&&(w=f.charCodeAt(g),O+=d.charAt(w>>2)+d.charAt(w<<4&63)+"=="),O},decode:function(f){var p=(f=String(f).replace(s,"")).length;p%4==0&&(p=(f=f.replace(/==?$/,"")).length),(p%4==1||/[^+a-zA-Z0-9/]/.test(f))&&h("Invalid character: the string to be decoded is not correctly encoded.");for(var v,y,w=0,N="",O=-1;++O
>(-2*w&6)));return N},version:"1.0.0"};(o=function(){return u}.call(t,n,t,e))===void 0||(e.exports=o)})()},172:(e,t)=>{t.d=function(n){if(!n)return 0;for(var o=(n=n.toString()).length,i=n.length;i--;){var a=n.charCodeAt(i);56320<=a&&a<=57343&&i--,127{var t={utf8:{stringToBytes:function(n){return t.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(t.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var o=[],i=0;i{const o=n(705),i={allowBooleanAttributes:!1,unpairedTags:[]};function a(g){return g===" "||g===" "||g===`
`||g==="\r"}function l(g,b){const T=b;for(;b0;g[T+G]=x&255,G+=X,x/=256,k-=8);g[T+G-X]|=V*128},(function(g){const b=n,T=N,P=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;g.Buffer=C,g.SlowBuffer=Mt,g.INSPECT_MAX_BYTES=50;const S=2147483647;g.kMaxLength=S;const{Uint8Array:L,ArrayBuffer:x,SharedArrayBuffer:I}=globalThis;C.TYPED_ARRAY_SUPPORT=j(),!C.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function j(){try{const r=new L(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,L.prototype),Object.setPrototypeOf(r,c),r.foo()===42}catch{return!1}}Object.defineProperty(C.prototype,"parent",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.buffer}}),Object.defineProperty(C.prototype,"offset",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.byteOffset}});function k(r){if(r>S)throw new RangeError('The value "'+r+'" is invalid for option "size"');const c=new L(r);return Object.setPrototypeOf(c,C.prototype),c}function C(r,c,m){if(typeof r=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return X(r)}return $(r,c,m)}C.poolSize=8192;function $(r,c,m){if(typeof r=="string")return V(r,c);if(x.isView(r))return W(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(xt(r,x)||r&&xt(r.buffer,x)||typeof I<"u"&&(xt(r,I)||r&&xt(r.buffer,I)))return st(r,c,m);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const R=r.valueOf&&r.valueOf();if(R!=null&&R!==r)return C.from(R,c,m);const D=q(r);if(D)return D;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return C.from(r[Symbol.toPrimitive]("string"),c,m);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}C.from=function(r,c,m){return $(r,c,m)},Object.setPrototypeOf(C.prototype,L.prototype),Object.setPrototypeOf(C,L);function F(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function G(r,c,m){return F(r),r<=0?k(r):c!==void 0?typeof m=="string"?k(r).fill(c,m):k(r).fill(c):k(r)}C.alloc=function(r,c,m){return G(r,c,m)};function X(r){return F(r),k(r<0?0:Q(r)|0)}C.allocUnsafe=function(r){return X(r)},C.allocUnsafeSlow=function(r){return X(r)};function V(r,c){if((typeof c!="string"||c==="")&&(c="utf8"),!C.isEncoding(c))throw new TypeError("Unknown encoding: "+c);const m=Dt(r,c)|0;let R=k(m);const D=R.write(r,c);return D!==m&&(R=R.slice(0,D)),R}function Z(r){const c=r.length<0?0:Q(r.length)|0,m=k(c);for(let R=0;R