var e=Symbol(`adapter`),t=class{[e];name;kind;constructor(t){this.kind=t.kind,this.name=t.name,this[e]=t}async queryPermission(t={}){let{mode:n=`read`}=t,r=this[e];if(r.queryPermission)return r.queryPermission({mode:n});if(n===`read`)return`granted`;if(n===`readwrite`)return r.writable?`granted`:`denied`;throw TypeError(`Mode ${n} must be 'read' or 'readwrite'`)}async requestPermission({mode:t=`read`}={}){let n=this[e];if(n.requestPermission)return n.requestPermission({mode:t});if(t===`read`)return`granted`;if(t===`readwrite`)return n.writable?`granted`:`denied`;throw TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async remove(t={}){await this[e].remove(t)}async isSameEntry(t){return this===t?!0:!t||typeof t!=`object`||this.kind!==t.kind||!t[e]?!1:this[e].isSameEntry(t[e])}};Object.defineProperty(t.prototype,Symbol.toStringTag,{value:`FileSystemHandle`,writable:!1,enumerable:!1,configurable:!0}),globalThis.FileSystemHandle&&(globalThis.FileSystemHandle.prototype.queryPermission??=function(e){return`granted`});export{t};