12 |
- "use strict";var __TAURI_IIFE__=(()=>{var m=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var O=Object.prototype.hasOwnProperty;var l=(n,e)=>{for(var i in e)m(n,i,{get:e[i],enumerable:!0})},T=(n,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of k(e))!O.call(n,a)&&a!==i&&m(n,a,{get:()=>e[a],enumerable:!(o=R(e,a))||o.enumerable});return n};var L=n=>T(m({},"__esModule",{value:!0}),n);var b=(n,e,i)=>{if(!e.has(n))throw TypeError("Cannot "+i)};var y=(n,e,i)=>(b(n,e,"read from private field"),i?i.call(n):e.get(n)),A=(n,e,i)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,i)},w=(n,e,i,o)=>(b(n,e,"write to private field"),o?o.call(n,i):e.set(n,i),i);var bn={};l(bn,{event:()=>_,invoke:()=>Dn,path:()=>P,tauri:()=>f});var _={};l(_,{TauriEvent:()=>W,emit:()=>V,listen:()=>S,once:()=>H});var f={};l(f,{Channel:()=>p,PluginListener:()=>d,addPluginListener:()=>U,convertFileSrc:()=>F,invoke:()=>t,transformCallback:()=>u});function x(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function u(n,e=!1){let i=x(),o=`_${i}`;return Object.defineProperty(window,o,{value:a=>(e&&Reflect.deleteProperty(window,o),n?.(a)),writable:!1,configurable:!0}),i}var c,p=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;A(this,c,()=>{});this.id=u(e=>{y(this,c).call(this,e)})}set onmessage(e){w(this,c,e)}get onmessage(){return y(this,c)}toJSON(){return`__CHANNEL__:${this.id}`}};c=new WeakMap;var d=class{constructor(e,i,o){this.plugin=e,this.event=i,this.channelId=o}async unregister(){return t(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function U(n,e,i){let o=new p;return o.onmessage=i,t(`plugin:${n}|register_listener`,{event:e,handler:o}).then(()=>new d(n,e,o.id))}async function t(n,e={}){return new Promise((i,o)=>{let a=u(g=>{i(g),Reflect.deleteProperty(window,`_${D}`)},!0),D=u(g=>{o(g),Reflect.deleteProperty(window,`_${a}`)},!0);window.__TAURI_IPC__({cmd:n,callback:a,error:D,...e})})}function F(n,e="asset"){let i=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${i}`:`${e}://localhost/${i}`}async function E(n,e){await t("plugin:event|unlisten",{event:n,eventId:e})}async function C(n,e,i){await t("plugin:event|emit",{event:n,windowLabel:e,payload:i})}async function v(n,e,i){return t("plugin:event|listen",{event:n,windowLabel:e,handler:u(i)}).then(o=>async()=>E(n,o))}async function I(n,e,i){return v(n,e,o=>{i(o),E(n,o.id).catch(()=>{})})}var W=(s=>(s.WINDOW_RESIZED="tauri://resize",s.WINDOW_MOVED="tauri://move",s.WINDOW_CLOSE_REQUESTED="tauri://close-requested",s.WINDOW_CREATED="tauri://window-created",s.WINDOW_DESTROYED="tauri://destroyed",s.WINDOW_FOCUS="tauri://focus",s.WINDOW_BLUR="tauri://blur",s.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",s.WINDOW_THEME_CHANGED="tauri://theme-changed",s.WINDOW_FILE_DROP="tauri://file-drop",s.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",s.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",s.MENU="tauri://menu",s))(W||{});async function S(n,e){return v(n,null,e)}async function H(n,e){return I(n,null,e)}async function V(n,e){return C(n,void 0,e)}var P={};l(P,{BaseDirectory:()=>N,appCacheDir:()=>G,appConfigDir:()=>M,appDataDir:()=>j,appLocalDataDir:()=>z,appLogDir:()=>pn,audioDir:()=>q,basename:()=>hn,cacheDir:()=>J,configDir:()=>K,dataDir:()=>Q,delimiter:()=>gn,desktopDir:()=>Y,dirname:()=>vn,documentDir:()=>Z,downloadDir:()=>X,executableDir:()=>B,extname:()=>_n,fontDir:()=>nn,homeDir:()=>en,isAbsolute:()=>Pn,join:()=>fn,localDataDir:()=>rn,normalize:()=>yn,pictureDir:()=>tn,publicDir:()=>on,resolve:()=>mn,resolveResource:()=>an,resourceDir:()=>sn,runtimeDir:()=>cn,sep:()=>dn,templateDir:()=>un,videoDir:()=>ln});function h(){return navigator.appVersion.includes("Win")}var N=(r=>(r[r.Audio=1]="Audio",r[r.Cache=2]="Cache",r[r.Config=3]="Config",r[r.Data=4]="Data",r[r.LocalData=5]="LocalData",r[r.Document=6]="Document",r[r.Download=7]="Download",r[r.Picture=8]="Picture",r[r.Public=9]="Public",r[r.Video=10]="Video",r[r.Resource=11]="Resource",r[r.Temp=12]="Temp",r[r.AppConfig=13]="AppConfig",r[r.AppData=14]="AppData",r[r.AppLocalData=15]="AppLocalData",r[r.AppCache=16]="AppCache",r[r.AppLog=17]="AppLog",r[r.Desktop=18]="Desktop",r[r.Executable=19]="Executable",r[r.Font=20]="Font",r[r.Home=21]="Home",r[r.Runtime=22]="Runtime",r[r.Template=23]="Template",r))(N||{});async function M(){return t("plugin:path|resolve_directory",{directory:13})}async function j(){return t("plugin:path|resolve_directory",{directory:14})}async function z(){return t("plugin:path|resolve_directory",{directory:15})}async function G(){return t("plugin:path|resolve_directory",{directory:16})}async function q(){return t("plugin:path|resolve_directory",{directory:1})}async function J(){return t("plugin:path|resolve_directory",{directory:2})}async function K(){return t("plugin:path|resolve_directory",{directory:3})}async function Q(){return t("plugin:path|resolve_directory",{directory:4})}async function Y(){return t("plugin:path|resolve_directory",{directory:18})}async function Z(){return t("plugin:path|resolve_directory",{directory:6})}async function X(){return t("plugin:path|resolve_directory",{directory:7})}async function B(){return t("plugin:path|resolve_directory",{directory:19})}async function nn(){return t("plugin:path|resolve_directory",{directory:20})}async function en(){return t("plugin:path|resolve_directory",{directory:21})}async function rn(){return t("plugin:path|resolve_directory",{directory:5})}async function tn(){return t("plugin:path|resolve_directory",{directory:8})}async function on(){return t("plugin:path|resolve_directory",{directory:9})}async function sn(){return t("plugin:path|resolve_directory",{directory:11})}async function an(n){return t("plugin:path|resolve_directory",{directory:11,path:n})}async function cn(){return t("plugin:path|resolve_directory",{directory:22})}async function un(){return t("plugin:path|resolve_directory",{directory:23})}async function ln(){return t("plugin:path|resolve_directory",{directory:10})}async function pn(){return t("plugin:path|resolve_directory",{directory:17})}var dn=h()?"\\":"/",gn=h()?";":":";async function mn(...n){return t("plugin:path|resolve",{paths:n})}async function yn(n){return t("plugin:path|normalize",{path:n})}async function fn(...n){return t("plugin:path|join",{paths:n})}async function vn(n){return t("plugin:path|dirname",{path:n})}async function _n(n){return t("plugin:path|extname",{path:n})}async function hn(n,e){return t("plugin:path|basename",{path:n,ext:e})}async function Pn(n){return t("plugin:path|isAbsolute",{path:n})}var Dn=t;return L(bn);})();
- window.__TAURI__ = __TAURI_IIFE__
|