function e(e,t,i,n){if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}function t(e,t,i,n,a){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,i),i}var i,n,a,s,l;"function"==typeof SuppressedError&&SuppressedError;const r="__TAURI_TO_IPC_KEY__";function o(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}class u{constructor(l){i.set(this,void 0),n.set(this,0),a.set(this,[]),s.set(this,void 0),t(this,i,l||(()=>{})),this.id=o(l=>{const r=l.index;if("end"in l)return void(r==e(this,n,"f")?this.cleanupCallback():t(this,s,r));const o=l.message;if(r==e(this,n,"f")){for(e(this,i,"f").call(this,o),t(this,n,e(this,n,"f")+1);e(this,n,"f")in e(this,a,"f");){const s=e(this,a,"f")[e(this,n,"f")];e(this,i,"f").call(this,s),delete e(this,a,"f")[e(this,n,"f")],t(this,n,e(this,n,"f")+1)}e(this,n,"f")===e(this,s,"f")&&this.cleanupCallback()}else e(this,a,"f")[r]=o})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){t(this,i,e)}get onmessage(){return e(this,i,"f")}[(i=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap,r)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[r]()}}async function c(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}class h{get rid(){return e(this,l,"f")}constructor(e){l.set(this,void 0),t(this,l,e)}async close(){return c("plugin:resources|close",{rid:this.rid})}}var d,w;async function p(e,t){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,t),await c("plugin:event|unlisten",{event:e,eventId:t})}async function b(e,t,i){var n;const a="string"==typeof(null==i?void 0:i.target)?{kind:"AnyLabel",label:i.target}:null!==(n=null==i?void 0:i.target)&&void 0!==n?n:{kind:"Any"};return c("plugin:event|listen",{event:e,target:a,handler:o(t)}).then(t=>async()=>p(e,t))}async function g(e,t,i){return b(e,i=>{p(e,i.id),t(i)},i)}async function y(e,t){await c("plugin:event|emit",{event:e,payload:t})}async function _(e,t,i){const n="string"==typeof e?{kind:"AnyLabel",label:e}:e;await c("plugin:event|emit_to",{target:n,event:t,payload:i})}l=new WeakMap,(w=d||(d={})).WINDOW_RESIZED="tauri://resize",w.WINDOW_MOVED="tauri://move",w.WINDOW_CLOSE_REQUESTED="tauri://close-requested",w.WINDOW_DESTROYED="tauri://destroyed",w.WINDOW_FOCUS="tauri://focus",w.WINDOW_BLUR="tauri://blur",w.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",w.WINDOW_THEME_CHANGED="tauri://theme-changed",w.WINDOW_CREATED="tauri://window-created",w.WEBVIEW_CREATED="tauri://webview-created",w.DRAG_ENTER="tauri://drag-enter",w.DRAG_OVER="tauri://drag-over",w.DRAG_DROP="tauri://drag-drop",w.DRAG_LEAVE="tauri://drag-leave";const f=Object.freeze(Object.defineProperty({__proto__:null,get TauriEvent(){return d},emit:y,emitTo:_,listen:b,once:g},Symbol.toStringTag,{value:"Module"}));class v extends h{constructor(e){super(e)}static async new(e,t,i){return c("plugin:image|new",{rgba:m(e),width:t,height:i}).then(e=>new v(e))}static async fromBytes(e){return c("plugin:image|from_bytes",{bytes:m(e)}).then(e=>new v(e))}static async fromPath(e){return c("plugin:image|from_path",{path:e}).then(e=>new v(e))}async rgba(){return c("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return c("plugin:image|size",{rid:this.rid})}}function m(e){return null==e?null:"string"==typeof e?e:e instanceof v?e.rid:e}var D,E;async function A(){return c("plugin:app|version")}async function z(e={}){return"object"==typeof e&&Object.freeze(e),await c("plugin:dialog|open",{options:e})}async function S(e={}){return"object"==typeof e&&Object.freeze(e),await c("plugin:dialog|save",{options:e})}(E=D||(D={})).Nsis="nsis",E.Msi="msi",E.Deb="deb",E.Rpm="rpm",E.AppImage="appimage",E.App="app";const O=Object.freeze(Object.defineProperty({__proto__:null,open:z,save:S},Symbol.toStringTag,{value:"Module"}));async function T(){await c("plugin:process|restart")}class W extends h{constructor(e){super(e.rid),this.available=!0,this.currentVersion=e.currentVersion,this.version=e.version,this.date=e.date,this.body=e.body,this.rawJson=e.rawJson}async download(e,t){R(t);const i=new u;e&&(i.onmessage=e);const n=await c("plugin:updater|download",{onEvent:i,rid:this.rid,...t});this.downloadedBytes=new h(n)}async install(){if(!this.downloadedBytes)throw new Error("Update.install called before Update.download");await c("plugin:updater|install",{updateRid:this.rid,bytesRid:this.downloadedBytes.rid}),this.downloadedBytes=void 0}async downloadAndInstall(e,t){R(t);const i=new u;e&&(i.onmessage=e),await c("plugin:updater|download_and_install",{onEvent:i,rid:this.rid,...t})}async close(){var e;await(null==(e=this.downloadedBytes)?void 0:e.close()),await super.close()}}async function C(e){R(e);const t=await c("plugin:updater|check",{...e});return t?new W(t):null}function R(e){(null==e?void 0:e.headers)&&(e.headers=Array.from(new Headers(e.headers).entries()))}async function L(e,t){await c("plugin:opener|open_url",{url:e,with:t})}var x,I;(I=x||(x={}))[I.Audio=1]="Audio",I[I.Cache=2]="Cache",I[I.Config=3]="Config",I[I.Data=4]="Data",I[I.LocalData=5]="LocalData",I[I.Document=6]="Document",I[I.Download=7]="Download",I[I.Picture=8]="Picture",I[I.Public=9]="Public",I[I.Video=10]="Video",I[I.Resource=11]="Resource",I[I.Temp=12]="Temp",I[I.AppConfig=13]="AppConfig",I[I.AppData=14]="AppData",I[I.AppLocalData=15]="AppLocalData",I[I.AppCache=16]="AppCache",I[I.AppLog=17]="AppLog",I[I.Desktop=18]="Desktop",I[I.Executable=19]="Executable",I[I.Font=20]="Font",I[I.Home=21]="Home",I[I.Runtime=22]="Runtime",I[I.Template=23]="Template";const N=Object.freeze(Object.defineProperty({__proto__:null,get BaseDirectory(){return x},downloadDir:async function(){return c("plugin:path|resolve_directory",{directory:x.Download})}},Symbol.toStringTag,{value:"Module"}));var k,P;async function B(e,t,i){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=new TextEncoder;await c("plugin:fs|write_text_file",n.encode(t),{headers:{path:encodeURIComponent(e instanceof URL?e.toString():e),options:JSON.stringify(i)}})}(P=k||(k={}))[P.Start=0]="Start",P[P.Current=1]="Current",P[P.End=2]="End";const M=Object.freeze(Object.defineProperty({__proto__:null,get BaseDirectory(){return x},get SeekMode(){return k},writeTextFile:B},Symbol.toStringTag,{value:"Module"}));class U{constructor(...e){this.type="Logical",1===e.length?"Logical"in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new F(this.width*e,this.height*e)}[r](){return{width:this.width,height:this.height}}toJSON(){return this[r]()}}class F{constructor(...e){this.type="Physical",1===e.length?"Physical"in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new U(this.width/e,this.height/e)}[r](){return{width:this.width,height:this.height}}toJSON(){return this[r]()}}class j{constructor(e){this.size=e}toLogical(e){return this.size instanceof U?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof F?this.size:this.size.toPhysical(e)}[r](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[r]()}}class V{constructor(...e){this.type="Logical",1===e.length?"Logical"in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new H(this.x*e,this.y*e)}[r](){return{x:this.x,y:this.y}}toJSON(){return this[r]()}}class H{constructor(...e){this.type="Physical",1===e.length?"Physical"in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new V(this.x/e,this.y/e)}[r](){return{x:this.x,y:this.y}}toJSON(){return this[r]()}}class G{constructor(e){this.position=e}toLogical(e){return this.position instanceof V?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof H?this.position:this.position.toPhysical(e)}[r](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[r]()}}var J,q,$,Q;(q=J||(J={}))[q.Critical=1]="Critical",q[q.Informational=2]="Informational";class Y{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function Z(){return new ee(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function K(){return c("plugin:window|get_all_windows").then(e=>e.map(e=>new ee(e,{skip:!0})))}(Q=$||($={})).None="none",Q.Normal="normal",Q.Indeterminate="indeterminate",Q.Paused="paused",Q.Error="error";const X=["tauri://created","tauri://error"];class ee{constructor(e,t={}){var i;this.label=e,this.listeners=Object.create(null),(null==t?void 0:t.skip)||c("plugin:window|create",{options:{...t,parent:"string"==typeof t.parent?t.parent:null===(i=t.parent)||void 0===i?void 0:i.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async e=>this.emit("tauri://error",e))}static async getByLabel(e){var t;return null!==(t=(await K()).find(t=>t.label===e))&&void 0!==t?t:null}static getCurrent(){return Z()}static async getAll(){return K()}static async getFocusedWindow(){for(const e of await K())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)}:b(e,t,{target:{kind:"Window",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)}:g(e,t,{target:{kind:"Window",label:this.label}})}async emit(e,t){if(!X.includes(e))return y(e,t);for(const i of this.listeners[e]||[])i({event:e,id:-1,payload:t})}async emitTo(e,t,i){if(!X.includes(t))return _(e,t,i);for(const n of this.listeners[t]||[])n({event:t,id:-1,payload:i})}_handleTauriEvent(e,t){return!!X.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async scaleFactor(){return c("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return c("plugin:window|inner_position",{label:this.label}).then(e=>new H(e))}async outerPosition(){return c("plugin:window|outer_position",{label:this.label}).then(e=>new H(e))}async innerSize(){return c("plugin:window|inner_size",{label:this.label}).then(e=>new F(e))}async outerSize(){return c("plugin:window|outer_size",{label:this.label}).then(e=>new F(e))}async isFullscreen(){return c("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return c("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return c("plugin:window|is_maximized",{label:this.label})}async isFocused(){return c("plugin:window|is_focused",{label:this.label})}async isDecorated(){return c("plugin:window|is_decorated",{label:this.label})}async isResizable(){return c("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return c("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return c("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return c("plugin:window|is_closable",{label:this.label})}async isVisible(){return c("plugin:window|is_visible",{label:this.label})}async title(){return c("plugin:window|title",{label:this.label})}async theme(){return c("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return c("plugin:window|is_always_on_top",{label:this.label})}async center(){return c("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===J.Critical?{type:"Critical"}:{type:"Informational"}),c("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return c("plugin:window|set_resizable",{label:this.label,value:e})}async setEnabled(e){return c("plugin:window|set_enabled",{label:this.label,value:e})}async isEnabled(){return c("plugin:window|is_enabled",{label:this.label})}async setMaximizable(e){return c("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return c("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return c("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return c("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return c("plugin:window|maximize",{label:this.label})}async unmaximize(){return c("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return c("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return c("plugin:window|minimize",{label:this.label})}async unminimize(){return c("plugin:window|unminimize",{label:this.label})}async show(){return c("plugin:window|show",{label:this.label})}async hide(){return c("plugin:window|hide",{label:this.label})}async close(){return c("plugin:window|close",{label:this.label})}async destroy(){return c("plugin:window|destroy",{label:this.label})}async setDecorations(e){return c("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return c("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return c("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return c("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return c("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return c("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return c("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){return c("plugin:window|set_size",{label:this.label,value:e instanceof j?e:new j(e)})}async setMinSize(e){return c("plugin:window|set_min_size",{label:this.label,value:e instanceof j?e:e?new j(e):null})}async setMaxSize(e){return c("plugin:window|set_max_size",{label:this.label,value:e instanceof j?e:e?new j(e):null})}async setSizeConstraints(e){function t(e){return e?{Logical:e}:null}return c("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:t(null==e?void 0:e.minWidth),minHeight:t(null==e?void 0:e.minHeight),maxWidth:t(null==e?void 0:e.maxWidth),maxHeight:t(null==e?void 0:e.maxHeight)}})}async setPosition(e){return c("plugin:window|set_position",{label:this.label,value:e instanceof G?e:new G(e)})}async setFullscreen(e){return c("plugin:window|set_fullscreen",{label:this.label,value:e})}async setSimpleFullscreen(e){return c("plugin:window|set_simple_fullscreen",{label:this.label,value:e})}async setFocus(){return c("plugin:window|set_focus",{label:this.label})}async setFocusable(e){return c("plugin:window|set_focusable",{label:this.label,value:e})}async setIcon(e){return c("plugin:window|set_icon",{label:this.label,value:m(e)})}async setSkipTaskbar(e){return c("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return c("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return c("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return c("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setBackgroundColor(e){return c("plugin:window|set_background_color",{color:e})}async setCursorPosition(e){return c("plugin:window|set_cursor_position",{label:this.label,value:e instanceof G?e:new G(e)})}async setIgnoreCursorEvents(e){return c("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return c("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return c("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setBadgeCount(e){return c("plugin:window|set_badge_count",{label:this.label,value:e})}async setBadgeLabel(e){return c("plugin:window|set_badge_label",{label:this.label,value:e})}async setOverlayIcon(e){return c("plugin:window|set_overlay_icon",{label:this.label,value:e?m(e):void 0})}async setProgressBar(e){return c("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return c("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async setTitleBarStyle(e){return c("plugin:window|set_title_bar_style",{label:this.label,value:e})}async setTheme(e){return c("plugin:window|set_theme",{label:this.label,value:e})}async onResized(e){return this.listen(d.WINDOW_RESIZED,t=>{t.payload=new F(t.payload),e(t)})}async onMoved(e){return this.listen(d.WINDOW_MOVED,t=>{t.payload=new H(t.payload),e(t)})}async onCloseRequested(e){return this.listen(d.WINDOW_CLOSE_REQUESTED,async t=>{const i=new Y(t);await e(i),i.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){const t=await this.listen(d.DRAG_ENTER,t=>{e({...t,payload:{type:"enter",paths:t.payload.paths,position:new H(t.payload.position)}})}),i=await this.listen(d.DRAG_OVER,t=>{e({...t,payload:{type:"over",position:new H(t.payload.position)}})}),n=await this.listen(d.DRAG_DROP,t=>{e({...t,payload:{type:"drop",paths:t.payload.paths,position:new H(t.payload.position)}})}),a=await this.listen(d.DRAG_LEAVE,t=>{e({...t,payload:{type:"leave"}})});return()=>{t(),n(),i(),a()}}async onFocusChanged(e){const t=await this.listen(d.WINDOW_FOCUS,t=>{e({...t,payload:!0})}),i=await this.listen(d.WINDOW_BLUR,t=>{e({...t,payload:!1})});return()=>{t(),i()}}async onScaleChanged(e){return this.listen(d.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(d.WINDOW_THEME_CHANGED,e)}}var te,ie,ne,ae,se,le,re,oe;(ie=te||(te={})).Disabled="disabled",ie.Throttle="throttle",ie.Suspend="suspend",(ae=ne||(ne={})).Default="default",ae.FluentOverlay="fluentOverlay",(le=se||(se={})).AppearanceBased="appearanceBased",le.Light="light",le.Dark="dark",le.MediumLight="mediumLight",le.UltraDark="ultraDark",le.Titlebar="titlebar",le.Selection="selection",le.Menu="menu",le.Popover="popover",le.Sidebar="sidebar",le.HeaderView="headerView",le.Sheet="sheet",le.WindowBackground="windowBackground",le.HudWindow="hudWindow",le.FullScreenUI="fullScreenUI",le.Tooltip="tooltip",le.ContentBackground="contentBackground",le.UnderWindowBackground="underWindowBackground",le.UnderPageBackground="underPageBackground",le.Mica="mica",le.Blur="blur",le.Acrylic="acrylic",le.Tabbed="tabbed",le.TabbedDark="tabbedDark",le.TabbedLight="tabbedLight",(oe=re||(re={})).FollowsWindowActiveState="followsWindowActiveState",oe.Active="active",oe.Inactive="inactive";const ue=Object.freeze(Object.defineProperty({__proto__:null,CloseRequestedEvent:Y,get Effect(){return se},get EffectState(){return re},LogicalPosition:V,LogicalSize:U,PhysicalPosition:H,PhysicalSize:F,get ProgressBarStatus(){return $},get UserAttentionType(){return J},Window:ee,getAllWindows:K,getCurrentWindow:Z},Symbol.toStringTag,{value:"Module"}));export{L as a,f as b,C as c,O as d,y as e,M as f,A as g,ue as h,c as i,b as l,z as o,N as p,T as r,S as s,B as w};