bundle.global.js 6.3 KB

12
  1. "use strict";var __TAURI_IIFE__=(()=>{var d=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var p=(n,e)=>{for(var i in e)d(n,i,{get:e[i],enumerable:!0})},O=(n,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of k(e))!I.call(n,a)&&a!==i&&d(n,a,{get:()=>e[a],enumerable:!(o=R(e,a))||o.enumerable});return n};var L=n=>O(d({},"__esModule",{value:!0}),n);var D=(n,e,i)=>{if(!e.has(n))throw TypeError("Cannot "+i)};var g=(n,e,i)=>(D(n,e,"read from private field"),i?i.call(n):e.get(n)),b=(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)},A=(n,e,i,o)=>(D(n,e,"write to private field"),o?o.call(n,i):e.set(n,i),i);var Pn={};p(Pn,{event:()=>v,invoke:()=>hn,path:()=>h,tauri:()=>y});var v={};p(v,{TauriEvent:()=>W,emit:()=>$,listen:()=>F,once:()=>S});var y={};p(y,{Channel:()=>m,convertFileSrc:()=>T,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,m=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;b(this,c,()=>{});this.id=u(e=>{g(this,c).call(this,e)})}set onmessage(e){A(this,c,e)}get onmessage(){return g(this,c)}toJSON(){return`__CHANNEL__:${this.id}`}};c=new WeakMap;async function t(n,e={}){return new Promise((i,o)=>{let a=u(l=>{i(l),Reflect.deleteProperty(window,`_${P}`)},!0),P=u(l=>{o(l),Reflect.deleteProperty(window,`_${a}`)},!0);window.__TAURI_IPC__({cmd:n,callback:a,error:P,...e})})}function T(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 w(n,e,i){await t("plugin:event|emit",{event:n,windowLabel:e,payload:i})}async function f(n,e,i){return t("plugin:event|listen",{event:n,windowLabel:e,handler:u(i)}).then(o=>async()=>E(n,o))}async function C(n,e,i){return f(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 F(n,e){return f(n,null,e)}async function S(n,e){return C(n,null,e)}async function $(n,e){return w(n,void 0,e)}var h={};p(h,{BaseDirectory:()=>N,appCacheDir:()=>j,appConfigDir:()=>H,appDataDir:()=>V,appLocalDataDir:()=>M,appLogDir:()=>un,audioDir:()=>z,basename:()=>vn,cacheDir:()=>G,configDir:()=>q,dataDir:()=>J,delimiter:()=>ln,desktopDir:()=>K,dirname:()=>yn,documentDir:()=>Q,downloadDir:()=>Y,executableDir:()=>Z,extname:()=>fn,fontDir:()=>X,homeDir:()=>B,isAbsolute:()=>_n,join:()=>mn,localDataDir:()=>nn,normalize:()=>gn,pictureDir:()=>en,publicDir:()=>rn,resolve:()=>dn,resolveResource:()=>on,resourceDir:()=>tn,runtimeDir:()=>sn,sep:()=>pn,templateDir:()=>an,videoDir:()=>cn});function _(){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 H(){return t("plugin:path|resolve_directory",{directory:13})}async function V(){return t("plugin:path|resolve_directory",{directory:14})}async function M(){return t("plugin:path|resolve_directory",{directory:15})}async function j(){return t("plugin:path|resolve_directory",{directory:16})}async function z(){return t("plugin:path|resolve_directory",{directory:1})}async function G(){return t("plugin:path|resolve_directory",{directory:2})}async function q(){return t("plugin:path|resolve_directory",{directory:3})}async function J(){return t("plugin:path|resolve_directory",{directory:4})}async function K(){return t("plugin:path|resolve_directory",{directory:18})}async function Q(){return t("plugin:path|resolve_directory",{directory:6})}async function Y(){return t("plugin:path|resolve_directory",{directory:7})}async function Z(){return t("plugin:path|resolve_directory",{directory:19})}async function X(){return t("plugin:path|resolve_directory",{directory:20})}async function B(){return t("plugin:path|resolve_directory",{directory:21})}async function nn(){return t("plugin:path|resolve_directory",{directory:5})}async function en(){return t("plugin:path|resolve_directory",{directory:8})}async function rn(){return t("plugin:path|resolve_directory",{directory:9})}async function tn(){return t("plugin:path|resolve_directory",{directory:11})}async function on(n){return t("plugin:path|resolve_directory",{directory:11,path:n})}async function sn(){return t("plugin:path|resolve_directory",{directory:22})}async function an(){return t("plugin:path|resolve_directory",{directory:23})}async function cn(){return t("plugin:path|resolve_directory",{directory:10})}async function un(){return t("plugin:path|resolve_directory",{directory:17})}var pn=_()?"\\":"/",ln=_()?";":":";async function dn(...n){return t("plugin:path|resolve",{paths:n})}async function gn(n){return t("plugin:path|normalize",{path:n})}async function mn(...n){return t("plugin:path|join",{paths:n})}async function yn(n){return t("plugin:path|dirname",{path:n})}async function fn(n){return t("plugin:path|extname",{path:n})}async function vn(n,e){return t("plugin:path|basename",{path:n,ext:e})}async function _n(n){return t("plugin:path|isAbsolute",{path:n})}var hn=t;return L(Pn);})();
  2. window.__TAURI__ = __TAURI_IIFE__