From 3713066e451bd30d0cc6f57bb437f08276f4c4ad Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Wed, 31 Mar 2021 02:19:03 -0300 Subject: [PATCH] refactor(core): rewrite shell execute API, closes #1229 (#1408) --- .changes/command-refactor.md | 6 + api/src/shell.ts | 174 +++++++++++- examples/api/public/build/bundle.js | 4 +- examples/api/public/build/bundle.js.map | 2 +- examples/api/src/App.svelte | 9 +- examples/api/src/components/Shell.svelte | 52 ++++ tauri-api/Cargo.toml | 3 + tauri-api/src/command.rs | 341 +++++++++++++---------- tauri-api/src/error.rs | 3 - tauri-api/src/lib.rs | 27 ++ tauri/scripts/bundle.js | 2 +- tauri/src/app/utils.rs | 16 -- tauri/src/async_runtime.rs | 21 -- tauri/src/endpoints.rs | 8 +- tauri/src/endpoints/shell.rs | 106 ++++++- tauri/src/lib.rs | 3 +- 16 files changed, 569 insertions(+), 208 deletions(-) create mode 100644 .changes/command-refactor.md create mode 100644 examples/api/src/components/Shell.svelte delete mode 100644 tauri/src/async_runtime.rs diff --git a/.changes/command-refactor.md b/.changes/command-refactor.md new file mode 100644 index 000000000..13734a645 --- /dev/null +++ b/.changes/command-refactor.md @@ -0,0 +1,6 @@ +--- +"tauri": minor +"api": minor +--- + +The shell process spawning API was rewritten and now includes stream access. diff --git a/api/src/shell.ts b/api/src/shell.ts index 738300b37..37ffd1fed 100644 --- a/api/src/shell.ts +++ b/api/src/shell.ts @@ -1,30 +1,192 @@ import { invokeTauriCommand } from './helpers/tauri' +import { transformCallback } from './tauri' /** * spawns a process * - * @param command the name of the cmd to execute e.g. 'mkdir' or 'node' + * @param program the name of the program to execute e.g. 'mkdir' or 'node' + * @param sidecar whether the program is a sidecar or a system program * @param [args] command args * @return promise resolving to the stdout text */ async function execute( - command: string, + program: string, + sidecar: boolean, + onEvent: (event: CommandEvent) => void, args?: string | string[] -): Promise { +): Promise { if (typeof args === 'object') { Object.freeze(args) } - return invokeTauriCommand({ + return invokeTauriCommand({ __tauriModule: 'Shell', message: { cmd: 'execute', - command, + program, + sidecar, + onEventFn: transformCallback(onEvent), args: typeof args === 'string' ? [args] : args } }) } +interface ChildProcess { + code: number | null + signal: number | null + stdout: string + stderr: string +} + +class EventEmitter { + eventListeners: { [key: string]: Array<(arg: any) => void> } = {} + + private addEventListener(event: string, handler: (arg: any) => void): void { + if (event in this.eventListeners) { + // eslint-disable-next-line security/detect-object-injection + this.eventListeners[event].push(handler) + } else { + // eslint-disable-next-line security/detect-object-injection + this.eventListeners[event] = [handler] + } + } + + _emit(event: E, payload: any): void { + if (event in this.eventListeners) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + const listeners = this.eventListeners[event as any] + for (const listener of listeners) { + listener(payload) + } + } + } + + on(event: E, handler: (arg: any) => void): EventEmitter { + this.addEventListener(event as any, handler) + return this + } +} + +class Child { + pid: number + + constructor(pid: number) { + this.pid = pid + } + + async write(data: string | number[]): Promise { + return invokeTauriCommand({ + __tauriModule: 'Shell', + message: { + cmd: 'stdinWrite', + pid: this.pid, + buffer: data + } + }) + } + + async kill(): Promise { + return invokeTauriCommand({ + __tauriModule: 'Shell', + message: { + cmd: 'killChild', + pid: this.pid + } + }) + } +} + +class Command extends EventEmitter<'close' | 'error'> { + program: string + args: string[] + sidecar = false + stdout = new EventEmitter<'data'>() + stderr = new EventEmitter<'data'>() + pid: number | null = null + + constructor(program: string, args: string | string[] = []) { + super() + this.program = program + this.args = typeof args === 'string' ? [args] : args + } + + /** + * Creates a command to execute the given sidecar binary + * + * @param {string} program Binary name + * + * @return {Command} + */ + static sidecar(program: string, args: string | string[] = []): Command { + const instance = new Command(program, args) + instance.sidecar = true + return instance + } + + async spawn(): Promise { + return execute( + this.program, + this.sidecar, + (event) => { + switch (event.event) { + case 'Error': + this._emit('error', event.payload) + break + case 'Terminated': + this._emit('close', event.payload) + break + case 'Stdout': + this.stdout._emit('data', event.payload) + break + case 'Stderr': + this.stderr._emit('data', event.payload) + break + } + }, + this.args + ).then((pid) => new Child(pid)) + } + + async execute(): Promise { + return new Promise((resolve, reject) => { + this.on('error', reject) + const stdout: string[] = [] + const stderr: string[] = [] + this.stdout.on('data', (line) => { + stdout.push(line) + }) + this.stderr.on('data', (line) => { + stderr.push(line) + }) + this.on('close', (payload: TerminatedPayload) => { + resolve({ + code: payload.code, + signal: payload.signal, + stdout: stdout.join('\n'), + stderr: stderr.join('\n') + }) + }) + this.spawn().catch(reject) + }) + } +} + +interface Event { + event: T + payload: V +} + +interface TerminatedPayload { + code: number | null + signal: number | null +} + +type CommandEvent = + | Event<'Stdout', string> + | Event<'Stderr', string> + | Event<'Terminated', TerminatedPayload> + | Event<'Error', string> + /** * opens a path or URL with the system's default app, * or the one specified with `openWith` @@ -43,4 +205,4 @@ async function open(path: string, openWith?: string): Promise { }) } -export { execute, open } +export { Command, Child, open } diff --git a/examples/api/public/build/bundle.js b/examples/api/public/build/bundle.js index 6a4978dfa..e3957bbfe 100644 --- a/examples/api/public/build/bundle.js +++ b/examples/api/public/build/bundle.js @@ -1,4 +1,4 @@ -var app=function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function i(e){e.forEach(t)}function o(e){return"function"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function u(t,n,i){t.$$.on_destroy.push(function(t,...n){if(null==t)return e;const i=t.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}(n,i))}function a(e,t){e.appendChild(t)}function s(e,t,n){e.insertBefore(t,n||null)}function c(e){e.parentNode.removeChild(e)}function l(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function _(e){return function(t){return t.preventDefault(),e.call(this,t)}}function m(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function v(e){return""===e?null:+e}function g(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function b(e,t){e.value=null==t?"":t}function y(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function w(e,t){for(let n=0;n{z.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}function R(e){e&&e.c()}function q(e,n,r,u){const{fragment:a,on_mount:s,on_destroy:c,after_update:l}=e.$$;a&&a.m(n,r),u||D((()=>{const n=s.map(t).filter(o);c?c.push(...n):i(n),e.$$.on_mount=[]})),l.forEach(D)}function I(e,t){const n=e.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function H(e,t){-1===e.$$.dirty[0]&&(C.push(e),F||(F=!0,O.then(W)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const o=i.length?i[0]:n;return f.ctx&&a(f.ctx[e],f.ctx[e]=o)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](o),p&&H(t,e)),n})):[],f.update(),p=!0,i(f.before_update),f.fragment=!!u&&u(f.ctx),o.target){if(o.hydrate){const e=function(e){return Array.from(e.childNodes)}(o.target);f.fragment&&f.fragment.l(e),e.forEach(c)}else f.fragment&&f.fragment.c();o.intro&&S(t.$$.fragment),q(t,o.target,o.anchor,o.customElement),W()}x(d)}class N{$destroy(){I(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function U(e){var t={exports:{}};return e(t,t.exports),t.exports}var G=U((function(e,t){ +var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function i(t){t.forEach(e)}function r(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function u(e,n,i){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const i=e.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}(n,i))}function a(t,e){t.appendChild(e)}function s(t,e,n){t.insertBefore(e,n||null)}function c(t){t.parentNode.removeChild(t)}function l(t,e){for(let n=0;nt.removeEventListener(e,n,i)}function m(t){return function(e){return e.preventDefault(),t.call(this,e)}}function _(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t){return""===t?null:+t}function g(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function b(t,e){t.value=null==e?"":e}function y(t,e,n,i){t.style.setProperty(e,n,i?"important":"")}function w(t,e){for(let n=0;n{E.delete(t),i&&(n&&t.d(1),i())})),t.o(e)}}function B(t){t&&t.c()}function L(t,n,o,u){const{fragment:a,on_mount:s,on_destroy:c,after_update:l}=t.$$;a&&a.m(n,o),u||D((()=>{const n=s.map(e).filter(r);c?c.push(...n):i(n),t.$$.on_mount=[]})),l.forEach(D)}function q(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function I(t,e){-1===t.$$.dirty[0]&&(x.push(t),F||(F=!0,O.then(W)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const r=i.length?i[0]:n;return f.ctx&&a(f.ctx[t],f.ctx[t]=r)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](r),p&&I(e,t)),n})):[],f.update(),p=!0,i(f.before_update),f.fragment=!!u&&u(f.ctx),r.target){if(r.hydrate){const t=function(t){return Array.from(t.childNodes)}(r.target);f.fragment&&f.fragment.l(t),t.forEach(c)}else f.fragment&&f.fragment.c();r.intro&&z(e.$$.fragment),L(e,r.target,r.anchor,r.customElement),W()}C(d)}class U{$destroy(){q(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function N(t){var e={exports:{}};return t(e,e.exports),e.exports}var G=N((function(t,e){ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -13,5 +13,5 @@ var app=function(){"use strict";function e(){}function t(e){return e()}function OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t,n,i){return new(n||(n=Promise))((function(o,r){function u(e){try{s(i.next(e))}catch(e){r(e)}}function a(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((i=i.apply(e,t||[])).next())}))}function o(e,t){var n,i,o,r,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){u=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]{"onMessage"in e&&n(1,i=e.onMessage)},[function(){K.getMatches().then(i).catch(i)},i]}class ee extends N{constructor(e){super(),L(this,e,Z,Q,r,{onMessage:1})}}var te=U((function(e,t){function n(e,t){return G.__awaiter(this,void 0,void 0,(function(){var n=this;return G.__generator(this,(function(o){return[2,J.invokeTauriCommand({__tauriModule:"Event",message:{cmd:"listen",event:e,handler:G.transformCallback(t)}}).then((function(e){return function(){return G.__awaiter(n,void 0,void 0,(function(){return G.__generator(this,(function(t){return[2,i(e)]}))}))}}))]}))}))}function i(e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return[2,J.invokeTauriCommand({__tauriModule:"Event",message:{cmd:"unlisten",eventId:e}})]}))}))}t.emit=function(e,t,n){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){switch(i.label){case 0:return[4,J.invokeTauriCommand({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})];case 1:return i.sent(),[2]}}))}))},t.listen=function(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){return[2,n(e,t)]}))}))},t.once=function(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(o){return[2,n(e,(function(e){t(e),i(e.id).catch((function(){}))}))]}))}))}})),ne=U((function(e,t){function n(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,te.emit(e,void 0,t)]}))}))}var i=Object.freeze({__proto__:null,emit:n,listen:te.listen,once:te.once});t.emit=n,t.event=i})),ie=U((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.listen=te.listen,t.once=te.once,t.emit=ne.emit})),oe=U((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.invoke=G.invoke,t.transformCallback=G.transformCallback}));function re(t){let n,o,r,u,l,f,_,v;return{c(){n=d("div"),o=d("button"),o.textContent="Call Log API",r=p(),u=d("button"),u.textContent="Call Request (async) API",l=p(),f=d("button"),f.textContent="Send event to Rust",m(o,"class","button"),m(o,"id","log"),m(u,"class","button"),m(u,"id","request"),m(f,"class","button"),m(f,"id","event")},m(e,i){s(e,n,i),a(n,o),a(n,r),a(n,u),a(n,l),a(n,f),_||(v=[h(o,"click",t[0]),h(u,"click",t[1]),h(f,"click",t[2])],_=!0)},p:e,i:e,o:e,d(e){e&&c(n),_=!1,i(v)}}}function ue(e,t,n){let{onMessage:i}=t;return ie.listen("rust-event",i),e.$$set=e=>{"onMessage"in e&&n(3,i=e.onMessage)},[function(){oe.invoke("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})},function(){oe.invoke("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)},function(){ie.emit("js-event","this is the payload string")},i]}class ae extends N{constructor(e){super(),L(this,e,ue,re,r,{onMessage:3})}}var se=U((function(e,t){function n(e){return void 0===e&&(e={}),G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return"object"==typeof e&&Object.freeze(e),[2,J.invokeTauriCommand({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"openDialog",options:e}})]}))}))}function i(e){return void 0===e&&(e={}),G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return"object"==typeof e&&Object.freeze(e),[2,J.invokeTauriCommand({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"saveDialog",options:e}})]}))}))}var o=Object.freeze({__proto__:null,open:n,save:i});t.dialog=o,t.open=n,t.save=i})),ce=U((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.open=se.open,t.save=se.save})),le=U((function(e,t){var n,i=G;function o(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})]}))}))}function r(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"Fs",message:{cmd:"readBinaryFile",path:e,options:t}})]}))}))}function u(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(n){return"object"==typeof t&&Object.freeze(t),"object"==typeof e&&Object.freeze(e),[2,J.invokeTauriCommand({__tauriModule:"Fs",message:{cmd:"writeFile",path:e.path,contents:e.contents,options:t}})]}))}))}function a(e){var t=function(e){if(e.length<65536)return String.fromCharCode.apply(null,Array.from(e));for(var t="",n=e.length,i=0;i{"onMessage"in e&&n(6,i=e.onMessage)},[o,r,u,a,function(){ce.open({defaultPath:o,filters:r?[{name:"Tauri Example",extensions:r.split(",").map((e=>e.trim()))}]:[],multiple:u,directory:a}).then((function(e){if(Array.isArray(e))i(e);else{var t=e,n=t.match(/\S+\.\S+$/g);de.readBinaryFile(t).then((function(o){var r,u,a,s;n&&(t.includes(".png")||t.includes(".jpg"))?(r=new Uint8Array(o),u=function(e){i('')},a=new Blob([r],{type:"application/octet-binary"}),(s=new FileReader).onload=function(e){var t=e.target.result;u(t.substr(t.indexOf(",")+1))},s.readAsDataURL(a)):i(e)})).catch(i(e))}})).catch(i)},function(){ce.save({defaultPath:o,filters:r?[{name:"Tauri Example",extensions:r.split(",").map((e=>e.trim()))}]:[]}).then(i).catch(i)},i,function(){o=this.value,n(0,o)},function(){r=this.value,n(1,r)},function(){u=this.checked,n(2,u)},function(){a=this.checked,n(3,a)}]}class he extends N{constructor(e){var t;super(),document.getElementById("svelte-1eg58yg-style")||((t=d("style")).id="svelte-1eg58yg-style",t.textContent="#dialog-filter.svelte-1eg58yg{width:260px}",a(document.head,t)),L(this,e,pe,fe,r,{onMessage:6})}}function _e(e,t,n){const i=e.slice();return i[5]=t[n],i}function me(t){let n,i,o=t[5][0]+"";return{c(){n=d("option"),i=f(o),n.__value=t[5][1],n.value=n.__value},m(e,t){s(e,n,t),a(n,i)},p:e,d(e){e&&c(n)}}}function ve(t){let n,o,r,u,f,v,g,y,w,k=t[1],x=[];for(let e=0;eisNaN(parseInt(e)))).map((e=>[e,de.Dir[e]]));return e.$$set=e=>{"onMessage"in e&&n(3,i=e.onMessage)},[o,r,function(){const e=o.match(/\S+\.\S+$/g),t={dir:ge()};(e?de.readBinaryFile(o,t):de.readDir(o,t)).then((function(t){if(e)if(o.includes(".png")||o.includes(".jpg"))!function(e,t){const n=new Blob([e],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(e){const n=e.target.result;t(n.substr(n.indexOf(",")+1))},i.readAsDataURL(n)}(new Uint8Array(t),(function(e){i('')}));else{const e=String.fromCharCode.apply(null,t);i(''),setTimeout((()=>{const t=document.getElementById("file-response");t.value=e,document.getElementById("file-save").addEventListener("click",(function(){writeFile({file:o,contents:t.value},{dir:ge()}).catch(i)}))}))}else i(t)})).catch(i)},i,function(){o=this.value,n(0,o)}]}class ye extends N{constructor(e){super(),L(this,e,be,ve,r,{onMessage:3})}}var we=U((function(e,t){var n;t.ResponseType=void 0,(n=t.ResponseType||(t.ResponseType={}))[n.JSON=1]="JSON",n[n.Text=2]="Text",n[n.Binary=3]="Binary";var i=function(){function e(e,t){this.type=e,this.payload=t}return e.form=function(t){return new e("Form",t)},e.json=function(t){return new e("Json",t)},e.text=function(t){return new e("Text",t)},e.bytes=function(t){return new e("Bytes",t)},e}(),o=function(){function e(e){this.id=e}return e.prototype.drop=function(){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(e){return[2,J.invokeTauriCommand({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})]}))}))},e.prototype.request=function(e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return[2,J.invokeTauriCommand({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}})]}))}))},e.prototype.get=function(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,this.request(G._assign({method:"GET",url:e},t))]}))}))},e.prototype.post=function(e,t,n){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){return[2,this.request(G._assign({method:"POST",url:e,body:t},n))]}))}))},e.prototype.put=function(e,t,n){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){return[2,this.request(G._assign({method:"PUT",url:e,body:t},n))]}))}))},e.prototype.patch=function(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,this.request(G._assign({method:"PATCH",url:e},t))]}))}))},e.prototype.delete=function(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,this.request(G._assign({method:"DELETE",url:e},t))]}))}))},e}();function r(e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return[2,J.invokeTauriCommand({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then((function(e){return new o(e)}))]}))}))}var u=null;function a(e,t){var n;return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){switch(i.label){case 0:return null!==u?[3,2]:[4,r()];case 1:u=i.sent(),i.label=2;case 2:return[2,u.request(G._assign({url:e,method:null!==(n=null==t?void 0:t.method)&&void 0!==n?n:"GET"},t))]}}))}))}var s=Object.freeze({__proto__:null,get ResponseType(){return t.ResponseType},Body:i,Client:o,getClient:r,fetch:a});t.Body=i,t.Client=o,t.fetch=a,t.getClient=r,t.http=s})),ke=U((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Body=we.Body,t.Client=we.Client,Object.defineProperty(t,"ResponseType",{enumerable:!0,get:function(){return we.ResponseType}}),t.fetch=we.fetch,t.getClient=we.getClient}));function xe(t){let n,o,r,u,l,f,v,g,k,x,C,T,M,$,O,F,j;return{c(){n=d("form"),o=d("select"),r=d("option"),r.textContent="GET",u=d("option"),u.textContent="POST",l=d("option"),l.textContent="PUT",f=d("option"),f.textContent="PATCH",v=d("option"),v.textContent="DELETE",g=p(),k=d("input"),x=p(),C=d("br"),T=p(),M=d("textarea"),$=p(),O=d("button"),O.textContent="Make request",r.__value="GET",r.value=r.__value,u.__value="POST",u.value=u.__value,l.__value="PUT",l.value=l.__value,f.__value="PATCH",f.value=f.__value,v.__value="DELETE",v.value=v.__value,m(o,"class","button"),m(o,"id","request-method"),void 0===t[0]&&D((()=>t[5].call(o))),m(k,"id","request-url"),m(k,"placeholder","Type the request URL..."),m(M,"id","request-body"),m(M,"placeholder","Request body"),m(M,"rows","5"),y(M,"width","100%"),y(M,"margin-right","10px"),y(M,"font-size","12px"),m(O,"class","button"),m(O,"id","make-request")},m(e,i){s(e,n,i),a(n,o),a(o,r),a(o,u),a(o,l),a(o,f),a(o,v),w(o,t[0]),a(n,g),a(n,k),b(k,t[1]),a(n,x),a(n,C),a(n,T),a(n,M),b(M,t[2]),a(n,$),a(n,O),F||(j=[h(o,"change",t[5]),h(k,"input",t[6]),h(M,"input",t[7]),h(n,"submit",_(t[3]))],F=!0)},p(e,[t]){1&t&&w(o,e[0]),2&t&&k.value!==e[1]&&b(k,e[1]),4&t&&b(M,e[2])},i:e,o:e,d(e){e&&c(n),F=!1,i(j)}}}function Ce(e,t,n){let i="GET",o="",r="",{onMessage:u}=t;return e.$$set=e=>{"onMessage"in e&&n(4,u=e.onMessage)},[i,o,r,async function(){const e=await ke.getClient(),t={url:o||""||"",method:i||"GET"||"GET"};r.startsWith("{")&&r.endsWith("}")||r.startsWith("[")&&r.endsWith("]")?t.body=ke.Body.json(JSON.parse(r)):""!==r&&(t.body=ke.Body.text(r)),e.request(t).then(u).catch(u)},u,function(){i=function(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}(this),n(0,i)},function(){o=this.value,n(1,o)},function(){r=this.value,n(2,r)}]}class Te extends N{constructor(e){super(),L(this,e,Ce,xe,r,{onMessage:4})}}function Me(t){let n,i,o;return{c(){n=d("button"),n.textContent="Send test notification",m(n,"class","button"),m(n,"id","notification")},m(e,r){s(e,n,r),i||(o=h(n,"click",t[0]),i=!0)},p:e,i:e,o:e,d(e){e&&c(n),i=!1,o()}}}function $e(){new Notification("Notification title",{body:"This is the notification body"})}function Oe(e,t,n){let{onMessage:i}=t;return e.$$set=e=>{"onMessage"in e&&n(1,i=e.onMessage)},[function(){"default"===Notification.permission?Notification.requestPermission().then((function(e){"granted"===e?$e():i("Permission is "+e)})).catch(i):"granted"===Notification.permission?$e():i("Permission is denied")},i]}class Fe extends N{constructor(e){super(),L(this,e,Oe,Me,r,{onMessage:1})}}var De=U((function(e,t){function n(){return new r(window.__TAURI__.__currentWindow.label)}function i(){return window.__TAURI__.__windows}var o=["tauri://created","tauri://error"],r=function(){function e(e){this.label=e,this.listeners={}}return e.prototype.listen=function(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return this._handleTauriEvent(e,t)?[2,Promise.resolve((function(){}))]:[2,te.listen(e,t)]}))}))},e.prototype.once=function(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return this._handleTauriEvent(e,t)?[2,Promise.resolve()]:[2,te.once(e,t)]}))}))},e.prototype.emit=function(e,t){return G.__awaiter(this,void 0,void 0,(function(){var n,i;return G.__generator(this,(function(r){if(o.includes(e)){for(n=0,i=this.listeners[e]||[];n{1&e.$$.dirty[0]&&i(C),2&e.$$.dirty[0]&&(T?r():u()),4&e.$$.dirty[0]&&f($),8&e.$$.dirty[0]&&p(O),16&e.$$.dirty[0]&&w(F),32&e.$$.dirty[0]&&h(D),64&e.$$.dirty[0]&&_(j),384&e.$$.dirty[0]&&P&&W&&m(P,W),1536&e.$$.dirty[0]&&A&&z&&g(A,z),2048&e.$$.dirty[0]&&b(E),4096&e.$$.dirty[0]&&y(S)},[C,T,$,O,F,D,j,P,W,A,z,E,S,x,M,B,function(){Y.open(x)},function(){o(B)},function(){l(),setTimeout(c,2e3)},function(){a(),setTimeout(s,2e3)},function(){ce.open({multiple:!1}).then(k)},function(){C=this.checked,n(0,C)},function(){T=this.checked,n(1,T)},function(){M=this.checked,n(14,M)},function(){$=this.checked,n(2,$)},function(){O=this.checked,n(3,O)},function(){F=this.checked,n(4,F)},function(){E=v(this.value),n(11,E)},function(){S=v(this.value),n(12,S)},function(){D=v(this.value),n(5,D)},function(){j=v(this.value),n(6,j)},function(){P=v(this.value),n(7,P)},function(){W=v(this.value),n(8,W)},function(){A=v(this.value),n(9,A)},function(){z=v(this.value),n(10,z)},function(){B=this.value,n(15,B)},function(){x=this.value,n(13,x)}]}class Ae extends N{constructor(e){var t;super(),document.getElementById("svelte-b76pvm-style")||((t=d("style")).id="svelte-b76pvm-style",t.textContent=".flex-row.svelte-b76pvm.svelte-b76pvm{flex-direction:row}.grow.svelte-b76pvm.svelte-b76pvm{flex-grow:1}.window-controls.svelte-b76pvm input.svelte-b76pvm{width:50px}",a(document.head,t)),L(this,e,We,Pe,r,{},[-1,-1])}}const ze=[];var Ee=U((function(e,t){function n(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:G.transformCallback(t)}})]}))}))}function i(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:G.transformCallback(t)}})]}))}))}function o(e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})]}))}))}function r(e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})]}))}))}function u(){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(e){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})]}))}))}var a=Object.freeze({__proto__:null,register:n,registerAll:i,isRegistered:o,unregister:r,unregisterAll:u});t.globalShortcut=a,t.isRegistered=o,t.register=n,t.registerAll=i,t.unregister=r,t.unregisterAll=u})),Se=U((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isRegistered=Ee.isRegistered,t.register=Ee.register,t.registerAll=Ee.registerAll,t.unregister=Ee.unregister,t.unregisterAll=Ee.unregisterAll}));function Be(e,t,n){const i=e.slice();return i[9]=t[n],i}function Re(e){let t,n,i,o,r,u,l=e[9]+"";function _(){return e[8](e[9])}return{c(){t=d("div"),n=f(l),i=p(),o=d("button"),o.textContent="Unregister",m(o,"type","button")},m(e,c){s(e,t,c),a(t,n),a(t,i),a(t,o),r||(u=h(o,"click",_),r=!0)},p(t,i){e=t,2&i&&l!==(l=e[9]+"")&&g(n,l)},d(e){e&&c(t),r=!1,u()}}}function qe(t){let n,i,o;return{c(){n=d("button"),n.textContent="Unregister all",m(n,"type","button")},m(e,r){s(e,n,r),i||(o=h(n,"click",t[5]),i=!0)},p:e,d(e){e&&c(n),i=!1,o()}}}function Ie(t){let n,o,r,u,f,_,v,g,y,w,k=t[1],x=[];for(let e=0;e{const e=o.indexOf(s);-1!==e&&o.splice(e,1),0===o.length&&(i(),i=null)}}}}([]);u(t,s,(e=>i(1,o=e)));let c="CmdOrControl+X";function l(e){const t=e;Se.unregister(t).then((()=>{s.update((e=>e.filter((e=>e!==t)))),a(`Shortcut ${t} unregistered`)})).catch(a)}return t.$$set=e=>{"onMessage"in e&&i(6,a=e.onMessage)},[c,o,s,function(){const e=c;Se.register(e,(()=>{a(`Shortcut ${e} triggered`)})).then((()=>{s.update((t=>[...t,e])),a(`Shortcut ${e} registered successfully`)})).catch(a)},l,function(){Se.unregisterAll().then((()=>{s.update((()=>[])),a("Unregistered all shortcuts")})).catch(a)},a,function(){c=this.value,i(0,c)},e=>l(e)]}class Le extends N{constructor(e){super(),L(this,e,He,Ie,r,{onMessage:6})}}function Ne(t){let n,i,o;return{c(){n=d("h1"),n.textContent="Welcome",i=p(),o=d("p"),o.textContent="Tauri's API capabilities using the ` @tauri-apps/api ` package. It's used as\n the main validation app, serving as the testbed of our development process. In\n the future, this app will be used on Tauri's integration tests."},m(e,t){s(e,n,t),s(e,i,t),s(e,o,t)},p:e,i:e,o:e,d(e){e&&c(n),e&&c(i),e&&c(o)}}}class Ue extends N{constructor(e){super(),L(this,e,null,Ne,r,{})}}function Ge(e,t,n){const i=e.slice();return i[8]=t[n],i}function Je(e){let t,n,i,o,r,u,l=e[8].label+"";function _(){return e[6](e[8])}return{c(){t=d("p"),n=f(l),i=p(),m(t,"class",o="nv noselect "+(e[0]===e[8]?"nv_selected":""))},m(e,o){s(e,t,o),a(t,n),a(t,i),r||(u=h(t,"click",_),r=!0)},p(n,i){e=n,1&i&&o!==(o="nv noselect "+(e[0]===e[8]?"nv_selected":""))&&m(t,"class",o)},d(e){e&&c(t),r=!1,u()}}}function Xe(e){let t,n,o,r,u,_,v,b,w,k,x,C,T,M,$,O,F,D,j,P,W,A,z,H=e[2],L=[];for(let t=0;tDocumentation \n Github \n Source',v=p(),b=d("div"),w=d("div");for(let e=0;e{I(e,1)})),E.r||i(E.c),E=E.p}N?(C=new N(U(e)),R(C.$$.fragment),S(C.$$.fragment,1),q(C,x,null)):C=null}(!W||2&t)&&g(P,e[1])},i(e){W||(C&&S(C.$$.fragment,e),W=!0)},o(e){C&&B(C.$$.fragment,e),W=!1},d(e){e&&c(t),l(L,e),C&&I(C),A=!1,i(z)}}}function Ye(e,t,n){const i=[{label:"Welcome",component:Ue},{label:"Messages",component:ae},{label:"CLI",component:ee},{label:"Dialog",component:he},{label:"File system",component:ye},{label:"HTTP",component:Te},{label:"Notifications",component:Fe},{label:"Window",component:Ae},{label:"Shortcuts",component:Le}];let o=i[0],r=[""];function u(e){n(0,o=e)}return[o,r,i,u,function(e){n(1,r+="string"==typeof e?e:JSON.stringify(e)),n(1,r+="\n")},function(){Y.open("https://tauri.studio/")},e=>u(e),()=>{n(1,r=[""])}]}return new class extends N{constructor(e){super(),L(this,e,Ye,Xe,r,{})}}({target:document.body})}(); +var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function i(t,e,n,i){return new(n||(n=Promise))((function(r,o){function u(t){try{s(i.next(t))}catch(t){o(t)}}function a(t){try{s(i.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}s((i=i.apply(t,e||[])).next())}))}function r(t,e){var n,i,r,o,u={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,i=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((r=(r=u.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]{"onMessage"in t&&n(1,i=t.onMessage)},[function(){Z.getMatches().then(i).catch(i)},i]}class nt extends U{constructor(t){super(),H(this,t,et,tt,o,{onMessage:1})}}var it=N((function(t,e){function n(t,e){return G.__awaiter(this,void 0,void 0,(function(){var n=this;return G.__generator(this,(function(r){return[2,J.invokeTauriCommand({__tauriModule:"Event",message:{cmd:"listen",event:t,handler:G.transformCallback(e)}}).then((function(t){return function(){return G.__awaiter(n,void 0,void 0,(function(){return G.__generator(this,(function(e){return[2,i(t)]}))}))}}))]}))}))}function i(t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(e){return[2,J.invokeTauriCommand({__tauriModule:"Event",message:{cmd:"unlisten",eventId:t}})]}))}))}e.emit=function(t,e,n){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){switch(i.label){case 0:return[4,J.invokeTauriCommand({__tauriModule:"Event",message:{cmd:"emit",event:t,windowLabel:e,payload:n}})];case 1:return i.sent(),[2]}}))}))},e.listen=function(t,e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){return[2,n(t,e)]}))}))},e.once=function(t,e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(r){return[2,n(t,(function(t){e(t),i(t.id).catch((function(){}))}))]}))}))}})),rt=N((function(t,e){function n(t,e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,it.emit(t,void 0,e)]}))}))}var i=Object.freeze({__proto__:null,emit:n,listen:it.listen,once:it.once});e.emit=n,e.event=i})),ot=N((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.listen=it.listen,e.once=it.once,e.emit=rt.emit})),ut=N((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.invoke=G.invoke,e.transformCallback=G.transformCallback}));function at(e){let n,r,o,u,l,f,m,v;return{c(){n=d("div"),r=d("button"),r.textContent="Call Log API",o=p(),u=d("button"),u.textContent="Call Request (async) API",l=p(),f=d("button"),f.textContent="Send event to Rust",_(r,"class","button"),_(r,"id","log"),_(u,"class","button"),_(u,"id","request"),_(f,"class","button"),_(f,"id","event")},m(t,i){s(t,n,i),a(n,r),a(n,o),a(n,u),a(n,l),a(n,f),m||(v=[h(r,"click",e[0]),h(u,"click",e[1]),h(f,"click",e[2])],m=!0)},p:t,i:t,o:t,d(t){t&&c(n),m=!1,i(v)}}}function st(t,e,n){let{onMessage:i}=e;return ot.listen("rust-event",i),t.$$set=t=>{"onMessage"in t&&n(3,i=t.onMessage)},[function(){ut.invoke("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})},function(){ut.invoke("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)},function(){ot.emit("js-event","this is the payload string")},i]}class ct extends U{constructor(t){super(),H(this,t,st,at,o,{onMessage:3})}}var lt=N((function(t,e){function n(t){return void 0===t&&(t={}),G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(e){return"object"==typeof t&&Object.freeze(t),[2,J.invokeTauriCommand({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"openDialog",options:t}})]}))}))}function i(t){return void 0===t&&(t={}),G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(e){return"object"==typeof t&&Object.freeze(t),[2,J.invokeTauriCommand({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"saveDialog",options:t}})]}))}))}var r=Object.freeze({__proto__:null,open:n,save:i});e.dialog=r,e.open=n,e.save=i})),dt=N((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.open=lt.open,e.save=lt.save})),ft=N((function(t,e){var n,i=G;function r(t,e){return void 0===e&&(e={}),i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"Fs",message:{cmd:"readTextFile",path:t,options:e}})]}))}))}function o(t,e){return void 0===e&&(e={}),i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"Fs",message:{cmd:"readBinaryFile",path:t,options:e}})]}))}))}function u(t,e){return void 0===e&&(e={}),i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(n){return"object"==typeof e&&Object.freeze(e),"object"==typeof t&&Object.freeze(t),[2,J.invokeTauriCommand({__tauriModule:"Fs",message:{cmd:"writeFile",path:t.path,contents:t.contents,options:e}})]}))}))}function a(t){var e=function(t){if(t.length<65536)return String.fromCharCode.apply(null,Array.from(t));for(var e="",n=t.length,i=0;i{"onMessage"in t&&n(6,i=t.onMessage)},[r,o,u,a,function(){dt.open({defaultPath:r,filters:o?[{name:"Tauri Example",extensions:o.split(",").map((t=>t.trim()))}]:[],multiple:u,directory:a}).then((function(t){if(Array.isArray(t))i(t);else{var e=t,n=e.match(/\S+\.\S+$/g);pt.readBinaryFile(e).then((function(r){var o,u,a,s;n&&(e.includes(".png")||e.includes(".jpg"))?(o=new Uint8Array(r),u=function(t){i('')},a=new Blob([o],{type:"application/octet-binary"}),(s=new FileReader).onload=function(t){var e=t.target.result;u(e.substr(e.indexOf(",")+1))},s.readAsDataURL(a)):i(t)})).catch(i(t))}})).catch(i)},function(){dt.save({defaultPath:r,filters:o?[{name:"Tauri Example",extensions:o.split(",").map((t=>t.trim()))}]:[]}).then(i).catch(i)},i,function(){r=this.value,n(0,r)},function(){o=this.value,n(1,o)},function(){u=this.checked,n(2,u)},function(){a=this.checked,n(3,a)}]}class _t extends U{constructor(t){var e;super(),document.getElementById("svelte-1eg58yg-style")||((e=d("style")).id="svelte-1eg58yg-style",e.textContent="#dialog-filter.svelte-1eg58yg{width:260px}",a(document.head,e)),H(this,t,mt,ht,o,{onMessage:6})}}function vt(t,e,n){const i=t.slice();return i[5]=e[n],i}function gt(e){let n,i,r=e[5][0]+"";return{c(){n=d("option"),i=f(r),n.__value=e[5][1],n.value=n.__value},m(t,e){s(t,n,e),a(n,i)},p:t,d(t){t&&c(n)}}}function bt(e){let n,r,o,u,f,v,g,y,w,k=e[1],C=[];for(let t=0;tisNaN(parseInt(t)))).map((t=>[t,pt.Dir[t]]));return t.$$set=t=>{"onMessage"in t&&n(3,i=t.onMessage)},[r,o,function(){const t=r.match(/\S+\.\S+$/g),e={dir:yt()};(t?pt.readBinaryFile(r,e):pt.readDir(r,e)).then((function(e){if(t)if(r.includes(".png")||r.includes(".jpg"))!function(t,e){const n=new Blob([t],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(t){const n=t.target.result;e(n.substr(n.indexOf(",")+1))},i.readAsDataURL(n)}(new Uint8Array(e),(function(t){i('')}));else{const t=String.fromCharCode.apply(null,e);i(''),setTimeout((()=>{const e=document.getElementById("file-response");e.value=t,document.getElementById("file-save").addEventListener("click",(function(){writeFile({file:r,contents:e.value},{dir:yt()}).catch(i)}))}))}else i(e)})).catch(i)},i,function(){r=this.value,n(0,r)}]}class kt extends U{constructor(t){super(),H(this,t,wt,bt,o,{onMessage:3})}}var Ct=N((function(t,e){var n;e.ResponseType=void 0,(n=e.ResponseType||(e.ResponseType={}))[n.JSON=1]="JSON",n[n.Text=2]="Text",n[n.Binary=3]="Binary";var i=function(){function t(t,e){this.type=t,this.payload=e}return t.form=function(e){return new t("Form",e)},t.json=function(e){return new t("Json",e)},t.text=function(e){return new t("Text",e)},t.bytes=function(e){return new t("Bytes",e)},t}(),r=function(){function t(t){this.id=t}return t.prototype.drop=function(){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return[2,J.invokeTauriCommand({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})]}))}))},t.prototype.request=function(t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(e){return[2,J.invokeTauriCommand({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:t}})]}))}))},t.prototype.get=function(t,e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,this.request(G._assign({method:"GET",url:t},e))]}))}))},t.prototype.post=function(t,e,n){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){return[2,this.request(G._assign({method:"POST",url:t,body:e},n))]}))}))},t.prototype.put=function(t,e,n){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){return[2,this.request(G._assign({method:"PUT",url:t,body:e},n))]}))}))},t.prototype.patch=function(t,e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,this.request(G._assign({method:"PATCH",url:t},e))]}))}))},t.prototype.delete=function(t,e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,this.request(G._assign({method:"DELETE",url:t},e))]}))}))},t}();function o(t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(e){return[2,J.invokeTauriCommand({__tauriModule:"Http",message:{cmd:"createClient",options:t}}).then((function(t){return new r(t)}))]}))}))}var u=null;function a(t,e){var n;return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){switch(i.label){case 0:return null!==u?[3,2]:[4,o()];case 1:u=i.sent(),i.label=2;case 2:return[2,u.request(G._assign({url:t,method:null!==(n=null==e?void 0:e.method)&&void 0!==n?n:"GET"},e))]}}))}))}var s=Object.freeze({__proto__:null,get ResponseType(){return e.ResponseType},Body:i,Client:r,getClient:o,fetch:a});e.Body=i,e.Client=r,e.fetch=a,e.getClient=o,e.http=s})),xt=N((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Body=Ct.Body,e.Client=Ct.Client,Object.defineProperty(e,"ResponseType",{enumerable:!0,get:function(){return Ct.ResponseType}}),e.fetch=Ct.fetch,e.getClient=Ct.getClient}));function Tt(e){let n,r,o,u,l,f,v,g,k,C,x,T,M,$,O,F,j;return{c(){n=d("form"),r=d("select"),o=d("option"),o.textContent="GET",u=d("option"),u.textContent="POST",l=d("option"),l.textContent="PUT",f=d("option"),f.textContent="PATCH",v=d("option"),v.textContent="DELETE",g=p(),k=d("input"),C=p(),x=d("br"),T=p(),M=d("textarea"),$=p(),O=d("button"),O.textContent="Make request",o.__value="GET",o.value=o.__value,u.__value="POST",u.value=u.__value,l.__value="PUT",l.value=l.__value,f.__value="PATCH",f.value=f.__value,v.__value="DELETE",v.value=v.__value,_(r,"class","button"),_(r,"id","request-method"),void 0===e[0]&&D((()=>e[5].call(r))),_(k,"id","request-url"),_(k,"placeholder","Type the request URL..."),_(M,"id","request-body"),_(M,"placeholder","Request body"),_(M,"rows","5"),y(M,"width","100%"),y(M,"margin-right","10px"),y(M,"font-size","12px"),_(O,"class","button"),_(O,"id","make-request")},m(t,i){s(t,n,i),a(n,r),a(r,o),a(r,u),a(r,l),a(r,f),a(r,v),w(r,e[0]),a(n,g),a(n,k),b(k,e[1]),a(n,C),a(n,x),a(n,T),a(n,M),b(M,e[2]),a(n,$),a(n,O),F||(j=[h(r,"change",e[5]),h(k,"input",e[6]),h(M,"input",e[7]),h(n,"submit",m(e[3]))],F=!0)},p(t,[e]){1&e&&w(r,t[0]),2&e&&k.value!==t[1]&&b(k,t[1]),4&e&&b(M,t[2])},i:t,o:t,d(t){t&&c(n),F=!1,i(j)}}}function Mt(t,e,n){let i="GET",r="",o="",{onMessage:u}=e;return t.$$set=t=>{"onMessage"in t&&n(4,u=t.onMessage)},[i,r,o,async function(){const t=await xt.getClient(),e={url:r||""||"",method:i||"GET"||"GET"};o.startsWith("{")&&o.endsWith("}")||o.startsWith("[")&&o.endsWith("]")?e.body=xt.Body.json(JSON.parse(o)):""!==o&&(e.body=xt.Body.text(o)),t.request(e).then(u).catch(u)},u,function(){i=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),n(0,i)},function(){r=this.value,n(1,r)},function(){o=this.value,n(2,o)}]}class $t extends U{constructor(t){super(),H(this,t,Mt,Tt,o,{onMessage:4})}}function Ot(e){let n,i,r;return{c(){n=d("button"),n.textContent="Send test notification",_(n,"class","button"),_(n,"id","notification")},m(t,o){s(t,n,o),i||(r=h(n,"click",e[0]),i=!0)},p:t,i:t,o:t,d(t){t&&c(n),i=!1,r()}}}function Ft(){new Notification("Notification title",{body:"This is the notification body"})}function Dt(t,e,n){let{onMessage:i}=e;return t.$$set=t=>{"onMessage"in t&&n(1,i=t.onMessage)},[function(){"default"===Notification.permission?Notification.requestPermission().then((function(t){"granted"===t?Ft():i("Permission is "+t)})).catch(i):"granted"===Notification.permission?Ft():i("Permission is denied")},i]}class jt extends U{constructor(t){super(),H(this,t,Dt,Ot,o,{onMessage:1})}}var Pt=N((function(t,e){function n(){return new o(window.__TAURI__.__currentWindow.label)}function i(){return window.__TAURI__.__windows}var r=["tauri://created","tauri://error"],o=function(){function t(t){this.label=t,this.listeners={}}return t.prototype.listen=function(t,e){return G.__awaiter(this,void 0,void 0,(function(){var n=this;return G.__generator(this,(function(i){return this._handleTauriEvent(t,e)?[2,Promise.resolve((function(){var i=n.listeners[t];i.splice(i.indexOf(e),1)}))]:[2,it.listen(t,e)]}))}))},t.prototype.once=function(t,e){return G.__awaiter(this,void 0,void 0,(function(){var n=this;return G.__generator(this,(function(i){return this._handleTauriEvent(t,e)?[2,Promise.resolve((function(){var i=n.listeners[t];i.splice(i.indexOf(e),1)}))]:[2,it.once(t,e)]}))}))},t.prototype.emit=function(t,e){return G.__awaiter(this,void 0,void 0,(function(){var n,i;return G.__generator(this,(function(o){if(r.includes(t)){for(n=0,i=this.listeners[t]||[];n{1&t.$$.dirty[0]&&i(x),2&t.$$.dirty[0]&&(T?o():u()),4&t.$$.dirty[0]&&f($),8&t.$$.dirty[0]&&p(O),16&t.$$.dirty[0]&&w(F),32&t.$$.dirty[0]&&h(D),64&t.$$.dirty[0]&&m(j),384&t.$$.dirty[0]&&P&&W&&_(P,W),1536&t.$$.dirty[0]&&A&&E&&g(A,E),2048&t.$$.dirty[0]&&b(S),4096&t.$$.dirty[0]&&y(z)},[x,T,$,O,F,D,j,P,W,A,E,S,z,C,M,R,function(){X.open(C)},function(){r(R)},function(){l(),setTimeout(c,2e3)},function(){a(),setTimeout(s,2e3)},function(){dt.open({multiple:!1}).then(k)},function(){x=this.checked,n(0,x)},function(){T=this.checked,n(1,T)},function(){M=this.checked,n(14,M)},function(){$=this.checked,n(2,$)},function(){O=this.checked,n(3,O)},function(){F=this.checked,n(4,F)},function(){S=v(this.value),n(11,S)},function(){z=v(this.value),n(12,z)},function(){D=v(this.value),n(5,D)},function(){j=v(this.value),n(6,j)},function(){P=v(this.value),n(7,P)},function(){W=v(this.value),n(8,W)},function(){A=v(this.value),n(9,A)},function(){E=v(this.value),n(10,E)},function(){R=this.value,n(15,R)},function(){C=this.value,n(13,C)}]}class St extends U{constructor(t){var e;super(),document.getElementById("svelte-b76pvm-style")||((e=d("style")).id="svelte-b76pvm-style",e.textContent=".flex-row.svelte-b76pvm.svelte-b76pvm{flex-direction:row}.grow.svelte-b76pvm.svelte-b76pvm{flex-grow:1}.window-controls.svelte-b76pvm input.svelte-b76pvm{width:50px}",a(document.head,e)),H(this,t,Et,At,o,{},[-1,-1])}}const zt=[];var Rt=N((function(t,e){function n(t,e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:t,handler:G.transformCallback(e)}})]}))}))}function i(t,e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:t,handler:G.transformCallback(e)}})]}))}))}function r(t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(e){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:t}})]}))}))}function o(t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(e){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:t}})]}))}))}function u(){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})]}))}))}var a=Object.freeze({__proto__:null,register:n,registerAll:i,isRegistered:r,unregister:o,unregisterAll:u});e.globalShortcut=a,e.isRegistered=r,e.register=n,e.registerAll=i,e.unregister=o,e.unregisterAll=u})),Bt=N((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.isRegistered=Rt.isRegistered,e.register=Rt.register,e.registerAll=Rt.registerAll,e.unregister=Rt.unregister,e.unregisterAll=Rt.unregisterAll}));function Lt(t,e,n){const i=t.slice();return i[9]=e[n],i}function qt(t){let e,n,i,r,o,u,l=t[9]+"";function m(){return t[8](t[9])}return{c(){e=d("div"),n=f(l),i=p(),r=d("button"),r.textContent="Unregister",_(r,"type","button")},m(t,c){s(t,e,c),a(e,n),a(e,i),a(e,r),o||(u=h(r,"click",m),o=!0)},p(e,i){t=e,2&i&&l!==(l=t[9]+"")&&g(n,l)},d(t){t&&c(e),o=!1,u()}}}function It(e){let n,i,r;return{c(){n=d("button"),n.textContent="Unregister all",_(n,"type","button")},m(t,o){s(t,n,o),i||(r=h(n,"click",e[5]),i=!0)},p:t,d(t){t&&c(n),i=!1,r()}}}function Ht(e){let n,r,o,u,f,m,v,g,y,w,k=e[1],C=[];for(let t=0;t{const t=r.indexOf(s);-1!==t&&r.splice(t,1),0===r.length&&(i(),i=null)}}}}([]);u(e,s,(t=>i(1,r=t)));let c="CmdOrControl+X";function l(t){const e=t;Bt.unregister(e).then((()=>{s.update((t=>t.filter((t=>t!==e)))),a(`Shortcut ${e} unregistered`)})).catch(a)}return e.$$set=t=>{"onMessage"in t&&i(6,a=t.onMessage)},[c,r,s,function(){const t=c;Bt.register(t,(()=>{a(`Shortcut ${t} triggered`)})).then((()=>{s.update((e=>[...e,t])),a(`Shortcut ${t} registered successfully`)})).catch(a)},l,function(){Bt.unregisterAll().then((()=>{s.update((()=>[])),a("Unregistered all shortcuts")})).catch(a)},a,function(){c=this.value,i(0,c)},t=>l(t)]}class Nt extends U{constructor(t){super(),H(this,t,Ut,Ht,o,{onMessage:6})}}function Gt(t){let e,n,r,o,u;return{c(){e=d("input"),n=p(),r=d("button"),r.textContent="Write",_(e,"placeholder","write to stdin"),_(r,"class","button")},m(i,a){s(i,e,a),b(e,t[1]),s(i,n,a),s(i,r,a),o||(u=[h(e,"input",t[8]),h(r,"click",t[5])],o=!0)},p(t,n){2&n&&e.value!==t[1]&&b(e,t[1])},d(t){t&&c(e),t&&c(n),t&&c(r),o=!1,i(u)}}}function Jt(e){let n,r,o,u,l,f,m,v,g,y,w=e[2]&&Gt(e);return{c(){n=d("div"),r=d("div"),o=d("input"),u=p(),l=d("button"),l.textContent="Run",f=p(),m=d("button"),m.textContent="Kill",v=p(),w&&w.c(),_(l,"class","button"),_(m,"class","button")},m(t,i){s(t,n,i),a(n,r),a(r,o),b(o,e[0]),a(r,u),a(r,l),a(r,f),a(r,m),a(r,v),w&&w.m(r,null),g||(y=[h(o,"input",e[7]),h(l,"click",e[3]),h(m,"click",e[4])],g=!0)},p(t,[e]){1&e&&o.value!==t[0]&&b(o,t[0]),t[2]?w?w.p(t,e):(w=Gt(t),w.c(),w.m(r,null)):w&&(w.d(1),w=null)},i:t,o:t,d(t){t&&c(n),w&&w.d(),g=!1,i(y)}}}function Vt(t,e,n){const i=navigator.userAgent.includes("Windows");let r,o=i?"cmd":"sh",u=i?["/C"]:["-c"],{onMessage:a}=e,s='echo "hello world"',c="";return t.$$set=t=>{"onMessage"in t&&n(6,a=t.onMessage)},[s,c,r,function(){n(2,r=null);const t=new X.Command(o,[...u,s]);t.on("close",(t=>{a(`command finished with code ${t.code} and signal ${t.signal}`),n(2,r=null)})),t.on("error",(t=>a(`command error: "${t}"`))),t.stdout.on("data",(t=>a(`command stdout: "${t}"`))),t.stderr.on("data",(t=>a(`command stderr: "${t}"`))),t.spawn().then((t=>{n(2,r=t)})).catch(a)},function(){r.kill().then((()=>a("killed child process"))).error(a)},function(){r.write(c).catch(a)},a,function(){s=this.value,n(0,s)},function(){c=this.value,n(1,c)}]}class Xt extends U{constructor(t){super(),H(this,t,Vt,Jt,o,{onMessage:6})}}function Yt(t,e,n){const i=t.slice();return i[8]=e[n],i}function Kt(t){let e,n,i,r,o,u,l=t[8].label+"";function m(){return t[6](t[8])}return{c(){e=d("p"),n=f(l),i=p(),_(e,"class",r="nv noselect "+(t[0]===t[8]?"nv_selected":""))},m(t,r){s(t,e,r),a(e,n),a(e,i),o||(u=h(e,"click",m),o=!0)},p(n,i){t=n,1&i&&r!==(r="nv noselect "+(t[0]===t[8]?"nv_selected":""))&&_(e,"class",r)},d(t){t&&c(e),o=!1,u()}}}function Qt(t){let e,n,r,o,u,m,v,b,w,k,C,x,T,M,$,O,F,D,j,P,W,A,E,I=t[2],H=[];for(let e=0;eDocumentation \n Github \n Source',v=p(),b=d("div"),w=d("div");for(let t=0;t{q(t,1)})),S.r||i(S.c),S=S.p}U?(x=new U(N(t)),B(x.$$.fragment),z(x.$$.fragment,1),L(x,C,null)):x=null}(!W||2&e)&&g(P,t[1])},i(t){W||(x&&z(x.$$.fragment,t),W=!0)},o(t){x&&R(x.$$.fragment,t),W=!1},d(t){t&&c(e),l(H,t),x&&q(x),A=!1,i(E)}}}function Zt(t,e,n){const i=[{label:"Welcome",component:K},{label:"Messages",component:ct},{label:"CLI",component:nt},{label:"Dialog",component:_t},{label:"File system",component:kt},{label:"HTTP",component:$t},{label:"Notifications",component:jt},{label:"Window",component:St},{label:"Shortcuts",component:Nt},{label:"Shell",component:Xt}];let r=i[0],o=[""];function u(t){n(0,r=t)}return[r,o,i,u,function(t){n(1,o+="string"==typeof t?t:JSON.stringify(t)),n(1,o+="\n")},function(){X.open("https://tauri.studio/")},t=>u(t),()=>{n(1,o=[""])}]}return new class extends U{constructor(t){super(),H(this,t,Zt,Qt,o,{})}}({target:document.body})}(); //# sourceMappingURL=bundle.js.map diff --git a/examples/api/public/build/bundle.js.map b/examples/api/public/build/bundle.js.map index 5e137ef30..7a1548741 100644 --- a/examples/api/public/build/bundle.js.map +++ b/examples/api/public/build/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../../../api/dist/tauri-9f03c3f0.js","../../../../api/dist/tauri-c613af6d.js","../../../../api/dist/shell-b1aa90e6.js","../../../../api/dist/shell.js","../../../../api/dist/cli-905e66c4.js","../../../../api/dist/cli.js","../../src/components/Cli.svelte","../../../../api/dist/event-08015720.js","../../../../api/dist/event-c0bb16b0.js","../../../../api/dist/event.js","../../../../api/dist/tauri.js","../../src/components/Communication.svelte","../../../../api/dist/dialog-c385e907.js","../../../../api/dist/dialog.js","../../../../api/dist/fs-256059a8.js","../../../../api/dist/fs.js","../../src/components/Dialog.svelte","../../src/components/FileSystem.svelte","../../../../api/dist/http-1650abc6.js","../../../../api/dist/http.js","../../src/components/Http.svelte","../../src/components/Notifications.svelte","../../../../api/dist/window-2f480af6.js","../../../../api/dist/window.js","../../src/components/Window.svelte","../../node_modules/svelte/store/index.mjs","../../../../api/dist/globalShortcut-5d3ed41f.js","../../../../api/dist/globalShortcut.js","../../src/components/Shortcuts.svelte","../../src/App.svelte","../../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n let j = 0;\n const remove = [];\n while (j < node.attributes.length) {\n const attribute = node.attributes[j++];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n for (let k = 0; k < remove.length; k++) {\n node.removeAttribute(remove[k]);\n }\n return nodes.splice(i, 1)[0];\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n callbacks.slice().forEach(fn => fn(event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, options = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, options);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : []),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.35.0' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to seperate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","\"use strict\";\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};function n(t,n,e,r){return new(e||(e=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,c)}u((r=r.apply(t,n||[])).next())}))}function e(t,n){var e,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},\"function\"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(e)throw new TypeError(\"Generator is already executing.\");for(;a;)try{if(e=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]\n import { getMatches } from \"@tauri-apps/api/cli\";\n\n export let onMessage;\n\n function cliMatches() {\n getMatches().then(onMessage).catch(onMessage);\n }\n\n\n
\n \n
\n","\"use strict\";var t=require(\"./tauri-9f03c3f0.js\"),n=require(\"./tauri-c613af6d.js\");function e(e,i){return t.__awaiter(this,void 0,void 0,(function(){var u=this;return t.__generator(this,(function(o){return[2,n.invokeTauriCommand({__tauriModule:\"Event\",message:{cmd:\"listen\",event:e,handler:t.transformCallback(i)}}).then((function(n){return function(){return t.__awaiter(u,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,r(n)]}))}))}}))]}))}))}function r(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,n.invokeTauriCommand({__tauriModule:\"Event\",message:{cmd:\"unlisten\",eventId:e}})]}))}))}exports.emit=function(e,r,i){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){switch(t.label){case 0:return[4,n.invokeTauriCommand({__tauriModule:\"Event\",message:{cmd:\"emit\",event:e,windowLabel:r,payload:i}})];case 1:return t.sent(),[2]}}))}))},exports.listen=function(n,r){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,e(n,r)]}))}))},exports.once=function(n,i){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,e(n,(function(t){i(t),r(t.id).catch((function(){}))}))]}))}))};\n","\"use strict\";var e=require(\"./tauri-9f03c3f0.js\"),t=require(\"./event-08015720.js\");function r(r,i){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,t.emit(r,void 0,i)]}))}))}var i=Object.freeze({__proto__:null,emit:r,listen:t.listen,once:t.once});exports.emit=r,exports.event=i;\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),require(\"./tauri-9f03c3f0.js\");var e=require(\"./event-08015720.js\"),r=require(\"./event-c0bb16b0.js\");require(\"./tauri-c613af6d.js\"),exports.listen=e.listen,exports.once=e.once,exports.emit=r.emit;\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0});var e=require(\"./tauri-9f03c3f0.js\");exports.invoke=e.invoke,exports.transformCallback=e.transformCallback;\n","\n\n
\n \n \n \n
\n","\"use strict\";var e=require(\"./tauri-9f03c3f0.js\"),o=require(\"./tauri-c613af6d.js\");function r(r){return void 0===r&&(r={}),e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return\"object\"==typeof r&&Object.freeze(r),[2,o.invokeTauriCommand({__tauriModule:\"Dialog\",mainThread:!0,message:{cmd:\"openDialog\",options:r}})]}))}))}function t(r){return void 0===r&&(r={}),e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return\"object\"==typeof r&&Object.freeze(r),[2,o.invokeTauriCommand({__tauriModule:\"Dialog\",mainThread:!0,message:{cmd:\"saveDialog\",options:r}})]}))}))}var i=Object.freeze({__proto__:null,open:r,save:t});exports.dialog=i,exports.open=r,exports.save=t;\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),require(\"./tauri-9f03c3f0.js\"),require(\"./tauri-c613af6d.js\");var e=require(\"./dialog-c385e907.js\");exports.open=e.open,exports.save=e.save;\n","\"use strict\";var e,r=require(\"./tauri-9f03c3f0.js\"),t=require(\"./tauri-c613af6d.js\");function i(e,i){return void 0===i&&(i={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,t.invokeTauriCommand({__tauriModule:\"Fs\",message:{cmd:\"readTextFile\",path:e,options:i}})]}))}))}function o(e,i){return void 0===i&&(i={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,t.invokeTauriCommand({__tauriModule:\"Fs\",message:{cmd:\"readBinaryFile\",path:e,options:i}})]}))}))}function n(e,i){return void 0===i&&(i={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return\"object\"==typeof i&&Object.freeze(i),\"object\"==typeof e&&Object.freeze(e),[2,t.invokeTauriCommand({__tauriModule:\"Fs\",message:{cmd:\"writeFile\",path:e.path,contents:e.contents,options:i}})]}))}))}exports.BaseDirectory=void 0,(e=exports.BaseDirectory||(exports.BaseDirectory={}))[e.Audio=1]=\"Audio\",e[e.Cache=2]=\"Cache\",e[e.Config=3]=\"Config\",e[e.Data=4]=\"Data\",e[e.LocalData=5]=\"LocalData\",e[e.Desktop=6]=\"Desktop\",e[e.Document=7]=\"Document\",e[e.Download=8]=\"Download\",e[e.Executable=9]=\"Executable\",e[e.Font=10]=\"Font\",e[e.Home=11]=\"Home\",e[e.Picture=12]=\"Picture\",e[e.Public=13]=\"Public\",e[e.Runtime=14]=\"Runtime\",e[e.Template=15]=\"Template\",e[e.Video=16]=\"Video\",e[e.Resource=17]=\"Resource\",e[e.App=18]=\"App\";function a(e){var r=function(e){if(e.length<65536)return String.fromCharCode.apply(null,Array.from(e));for(var r=\"\",t=e.length,i=0;i\n import { open, save } from \"@tauri-apps/api/dialog\";\n import { readBinaryFile } from \"@tauri-apps/api/fs\";\n\n export let onMessage;\n let defaultPath = null;\n let filter = null;\n let multiple = false;\n let directory = false;\n\n function arrayBufferToBase64(buffer, callback) {\n var blob = new Blob([buffer], {\n type: \"application/octet-binary\",\n });\n var reader = new FileReader();\n reader.onload = function (evt) {\n var dataurl = evt.target.result;\n callback(dataurl.substr(dataurl.indexOf(\",\") + 1));\n };\n reader.readAsDataURL(blob);\n }\n\n function openDialog() {\n open({\n defaultPath,\n filters: filter\n ? [\n {\n name: \"Tauri Example\",\n extensions: filter.split(\",\").map((f) => f.trim()),\n },\n ]\n : [],\n multiple,\n directory,\n })\n .then(function (res) {\n if (Array.isArray(res)) {\n onMessage(res);\n } else {\n var pathToRead = res;\n var isFile = pathToRead.match(/\\S+\\.\\S+$/g);\n readBinaryFile(pathToRead)\n .then(function (response) {\n if (isFile) {\n if (\n pathToRead.includes(\".png\") ||\n pathToRead.includes(\".jpg\")\n ) {\n arrayBufferToBase64(\n new Uint8Array(response),\n function (base64) {\n var src = \"data:image/png;base64,\" + base64;\n onMessage('');\n }\n );\n } else {\n onMessage(res);\n }\n } else {\n onMessage(res);\n }\n })\n .catch(onMessage(res));\n }\n })\n .catch(onMessage);\n }\n\n function saveDialog() {\n save({\n defaultPath,\n filters: filter\n ? [\n {\n name: \"Tauri Example\",\n extensions: filter.split(\",\").map((f) => f.trim()),\n },\n ]\n : [],\n })\n .then(onMessage)\n .catch(onMessage);\n }\n\n\n
\n \n \n
\n \n \n
\n
\n \n \n
\n\n
\n\n\n","\n\n
\n \n \n \n\n","\"use strict\";var t,e=require(\"./tauri-9f03c3f0.js\"),n=require(\"./tauri-c613af6d.js\");exports.ResponseType=void 0,(t=exports.ResponseType||(exports.ResponseType={}))[t.JSON=1]=\"JSON\",t[t.Text=2]=\"Text\",t[t.Binary=3]=\"Binary\";var r=function(){function t(t,e){this.type=t,this.payload=e}return t.form=function(e){return new t(\"Form\",e)},t.json=function(e){return new t(\"Json\",e)},t.text=function(e){return new t(\"Text\",e)},t.bytes=function(e){return new t(\"Bytes\",e)},t}(),i=function(){function t(t){this.id=t}return t.prototype.drop=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){return[2,n.invokeTauriCommand({__tauriModule:\"Http\",message:{cmd:\"dropClient\",client:this.id}})]}))}))},t.prototype.request=function(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,n.invokeTauriCommand({__tauriModule:\"Http\",message:{cmd:\"httpRequest\",client:this.id,options:t}})]}))}))},t.prototype.get=function(t,n){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(r){return[2,this.request(e._assign({method:\"GET\",url:t},n))]}))}))},t.prototype.post=function(t,n,r){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(i){return[2,this.request(e._assign({method:\"POST\",url:t,body:n},r))]}))}))},t.prototype.put=function(t,n,r){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(i){return[2,this.request(e._assign({method:\"PUT\",url:t,body:n},r))]}))}))},t.prototype.patch=function(t,n){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(r){return[2,this.request(e._assign({method:\"PATCH\",url:t},n))]}))}))},t.prototype.delete=function(t,n){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(r){return[2,this.request(e._assign({method:\"DELETE\",url:t},n))]}))}))},t}();function o(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,n.invokeTauriCommand({__tauriModule:\"Http\",message:{cmd:\"createClient\",options:t}}).then((function(t){return new i(t)}))]}))}))}var u=null;function s(t,n){var r;return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(i){switch(i.label){case 0:return null!==u?[3,2]:[4,o()];case 1:u=i.sent(),i.label=2;case 2:return[2,u.request(e._assign({url:t,method:null!==(r=null==n?void 0:n.method)&&void 0!==r?r:\"GET\"},n))]}}))}))}var a=Object.freeze({__proto__:null,get ResponseType(){return exports.ResponseType},Body:r,Client:i,getClient:o,fetch:s});exports.Body=r,exports.Client=i,exports.fetch=s,exports.getClient=o,exports.http=a;\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),require(\"./tauri-9f03c3f0.js\"),require(\"./tauri-c613af6d.js\");var e=require(\"./http-1650abc6.js\");exports.Body=e.Body,exports.Client=e.Client,Object.defineProperty(exports,\"ResponseType\",{enumerable:!0,get:function(){return e.ResponseType}}),exports.fetch=e.fetch,exports.getClient=e.getClient;\n","\n\n
\n \n \n
\n \n \n\n","\n\n\n","\"use strict\";var t=require(\"./tauri-9f03c3f0.js\"),e=require(\"./tauri-c613af6d.js\"),n=require(\"./event-08015720.js\");function i(){return new u(window.__TAURI__.__currentWindow.label)}function r(){return window.__TAURI__.__windows}var o=[\"tauri://created\",\"tauri://error\"],u=function(){function e(t){this.label=t,this.listeners={}}return e.prototype.listen=function(e,i){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this._handleTauriEvent(e,i)?[2,Promise.resolve((function(){}))]:[2,n.listen(e,i)]}))}))},e.prototype.once=function(e,i){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this._handleTauriEvent(e,i)?[2,Promise.resolve()]:[2,n.once(e,i)]}))}))},e.prototype.emit=function(e,i){return t.__awaiter(this,void 0,void 0,(function(){var r,u;return t.__generator(this,(function(t){if(o.includes(e)){for(r=0,u=this.listeners[e]||[];r\n import { appWindow } from \"@tauri-apps/api/window\";\n import { open as openDialog } from \"@tauri-apps/api/dialog\";\n import { open } from \"@tauri-apps/api/shell\";\n\n const {\n setResizable,\n setTitle,\n maximize,\n unmaximize,\n minimize,\n unminimize,\n show,\n hide,\n setTransparent,\n setDecorations,\n setAlwaysOnTop,\n setWidth,\n setHeight,\n // resize,\n setMinSize,\n setMaxSize,\n setX,\n setY,\n // setPosition,\n setFullscreen,\n setIcon,\n } = appWindow;\n\n let urlValue = \"https://tauri.studio\";\n let resizable = true;\n let maximized = false;\n let transparent = false;\n let decorations = true;\n let alwaysOnTop = false;\n let fullscreen = false;\n let width = 900;\n let height = 700;\n let minWidth = 600;\n let minHeight = 600;\n let maxWidth = null;\n let maxHeight = null;\n let x = 100;\n let y = 100;\n\n let windowTitle = \"Awesome Tauri Example!\";\n\n function openUrl() {\n open(urlValue);\n }\n\n function setTitle_() {\n setTitle(windowTitle);\n }\n\n function hide_() {\n hide();\n setTimeout(show, 2000);\n }\n\n function minimize_() {\n minimize();\n setTimeout(unminimize, 2000);\n }\n\n function getIcon() {\n openDialog({\n multiple: false,\n }).then(setIcon);\n }\n\n $: setResizable(resizable);\n $: maximized ? maximize() : unmaximize();\n //$: setTransparent(transparent)\n $: setDecorations(decorations);\n $: setAlwaysOnTop(alwaysOnTop);\n $: setFullscreen(fullscreen);\n\n $: setWidth(width);\n $: setHeight(height);\n $: minWidth && minHeight && setMinSize(minWidth, minHeight);\n $: maxWidth && maxHeight && setMaxSize(maxWidth, maxHeight);\n $: setX(x);\n $: setY(y);\n\n\n
\n
\n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n
\n X\n \n
\n
\n Y\n \n
\n
\n\n
\n
\n Width\n \n
\n
\n Height\n \n
\n
\n\n
\n
\n Min width\n \n
\n
\n Min height\n \n
\n
\n\n
\n
\n Max width\n \n
\n
\n Max height\n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n\n\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = [];\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (let i = 0; i < subscribers.length; i += 1) {\n const s = subscribers[i];\n s[1]();\n subscriber_queue.push(s, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.push(subscriber);\n if (subscribers.length === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n const index = subscribers.indexOf(subscriber);\n if (index !== -1) {\n subscribers.splice(index, 1);\n }\n if (subscribers.length === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","\"use strict\";var r=require(\"./tauri-9f03c3f0.js\"),t=require(\"./tauri-c613af6d.js\");function e(e,i){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,t.invokeTauriCommand({__tauriModule:\"GlobalShortcut\",message:{cmd:\"register\",shortcut:e,handler:r.transformCallback(i)}})]}))}))}function i(e,i){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,t.invokeTauriCommand({__tauriModule:\"GlobalShortcut\",message:{cmd:\"registerAll\",shortcuts:e,handler:r.transformCallback(i)}})]}))}))}function n(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,t.invokeTauriCommand({__tauriModule:\"GlobalShortcut\",message:{cmd:\"isRegistered\",shortcut:e}})]}))}))}function o(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,t.invokeTauriCommand({__tauriModule:\"GlobalShortcut\",message:{cmd:\"unregister\",shortcut:e}})]}))}))}function u(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,t.invokeTauriCommand({__tauriModule:\"GlobalShortcut\",message:{cmd:\"unregisterAll\"}})]}))}))}var s=Object.freeze({__proto__:null,register:e,registerAll:i,isRegistered:n,unregister:o,unregisterAll:u});exports.globalShortcut=s,exports.isRegistered=n,exports.register=e,exports.registerAll=i,exports.unregister=o,exports.unregisterAll=u;\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),require(\"./tauri-9f03c3f0.js\"),require(\"./tauri-c613af6d.js\");var e=require(\"./globalShortcut-5d3ed41f.js\");exports.isRegistered=e.isRegistered,exports.register=e.register,exports.registerAll=e.registerAll,exports.unregister=e.unregister,exports.unregisterAll=e.unregisterAll;\n","\n\n
\n
\n \n \n
\n
\n {#each $shortcuts as savedShortcut}\n
\n {savedShortcut}\n
\n {/each}\n {#if $shortcuts.length}\n \n {/if}\n
\n
\n","\n\n
\n \n
\n
\n {#each views as view}\n

select(view)}\n >\n {view.label}\n

\n {/each}\n
\n
\n \n
\n
\n
\n

\n Tauri Console\n {\n responses = [\"\"];\n }}>clear\n

\n {responses}\n
\n
\n","import App from \"./App.svelte\";\n\nconst app = new App({\n target: document.body,\n});\n\nexport default app;\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","component_subscribe","component","store","callback","$$","on_destroy","push","callbacks","unsub","subscribe","unsubscribe","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","i","length","d","element","name","document","createElement","text","data","createTextNode","space","listen","event","handler","options","addEventListener","removeEventListener","prevent_default","preventDefault","call","this","attr","attribute","value","removeAttribute","getAttribute","setAttribute","to_number","set_data","wholeText","set_input_value","input","set_style","key","important","style","setProperty","select_option","select","option","__value","selected","current_component","set_current_component","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","flushing","seen_callbacks","Set","flush","update","pop","has","add","clear","fragment","before_update","dirty","p","ctx","after_update","outroing","outros","transition_in","block","local","delete","transition_out","o","c","create_component","mount_component","customElement","on_mount","m","new_on_destroy","map","filter","destroy_component","make_dirty","then","fill","init","instance","create_fragment","not_equal","props","parent_component","bound","on_disconnect","context","Map","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","intro","SvelteComponent","[object Object]","$destroy","type","index","indexOf","splice","$$props","obj","$$set","keys","t","n","e","setPrototypeOf","__proto__","prototype","hasOwnProperty","r","u","next","throw","done","apply","label","sent","trys","ops","return","Symbol","iterator","TypeError","Math","floor","random","toString","substring","defineProperty","window","Reflect","deleteProperty","writable","configurable","rpc","notify","exports","_assign","error","assign","arguments","freeze","transformCallback","invoke","String","constructor","__awaiter","__generator","invokeTauriCommand","__tauriModule","message","cmd","command","args","path","with","execute","open","getMatches","onMessage","catch","eventId","windowLabel","payload","id","emit","once","endpoint","body","mainThread","save","require$$0","contents","fromCharCode","subarray","Uint8Array","btoa","s","_","source","destination","oldPath","newPath","BaseDirectory","Audio","Cache","Config","Data","LocalData","Desktop","Document","Download","Executable","Font","Home","Picture","Public","Runtime","Template","Video","Resource","App","f","Dir","readTextFile","readBinaryFile","writeFile","writeBinaryFile","readDir","createDir","removeDir","copyFile","removeFile","renameFile","enumerable","get","defaultPath","multiple","directory","filters","extensions","split","trim","res","isArray","pathToRead","isFile","match","response","buffer","blob","reader","includes","base64","Blob","FileReader","onload","evt","dataurl","result","substr","readAsDataURL","getDir","getElementById","parseInt","dir","DirOptions","isNaN","opts","arrayBufferToBase64","setTimeout","fileInput","file","ResponseType","JSON","Text","Binary","form","json","bytes","drop","client","request","method","url","post","put","patch","Body","Client","getClient","fetch","httpMethod","httpUrl","httpBody","startsWith","endsWith","parse","selected_option","querySelector","_sendNotification","Notification","permission","requestPermission","__TAURI__","__currentWindow","__windows","listeners","_handleTauriEvent","__extends","getByLabel","some","setResizable","resizable","setTitle","title","maximize","unmaximize","minimize","unminimize","show","hide","close","setDecorations","decorations","setAlwaysOnTop","alwaysOnTop","setWidth","width","setHeight","height","resize","setMinSize","minWidth","minHeight","setMaxSize","maxWidth","maxHeight","setX","x","setY","y","setPosition","setFullscreen","fullscreen","setIcon","icon","WebviewWindow","getCurrent","getAll","appWindow","setTransparent","urlValue","maximized","transparent","windowTitle","openDialog","subscriber_queue","shortcut","shortcuts","register","registerAll","isRegistered","unregister","unregisterAll","start","stop","subscribers","set","new_value","run_queue","invalidate","subscriber","shortcut_","unregisterShortcut","shortcuts_","registerShortcut","unregisterAllShortcuts","savedShortcut","views","Welcome","Communication","Cli","Dialog","FileSystem","Http","Notifications","Window","Shortcuts","responses","view","stringify"],"mappings":"gCAAA,SAASA,KAgBT,SAASC,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,EAElB,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,iBAANA,GAAgC,mBAANA,EAyBhF,SAASE,EAAoBC,EAAWC,EAAOC,GAC3CF,EAAUG,GAAGC,WAAWC,KAb5B,SAAmBJ,KAAUK,GACzB,GAAa,MAATL,EACA,OAAOhB,EAEX,MAAMsB,EAAQN,EAAMO,aAAaF,GACjC,OAAOC,EAAME,YAAc,IAAMF,EAAME,cAAgBF,EAQ1BC,CAAUP,EAAOC,IAwIlD,SAASQ,EAAOC,EAAQC,GACpBD,EAAOE,YAAYD,GAEvB,SAASE,EAAOH,EAAQC,EAAMG,GAC1BJ,EAAOK,aAAaJ,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qCAQsBiE,KAASzF,qsBAUlCyF,siBAjC0CA,8DAelCA,aAALjE,+HAAAA,iBAQsBiE,KAASzF,kB9BgrBnC4F,EAAS,CACL4D,EAAG,EACHrD,EAAG,GACHX,EAAGI,iDAIFA,EAAO4D,GACRjK,EAAQqG,EAAOO,GAEnBP,EAASA,EAAOJ,0F8BhrBfC,+IA5FGyT,IAEFpP,MAAO,UACP9J,UAAWmZ,KAGXrP,MAAO,WACP9J,UAAWoZ,KAGXtP,MAAO,MACP9J,UAAWqZ,KAGXvP,MAAO,SACP9J,UAAWsZ,KAGXxP,MAAO,cACP9J,UAAWuZ,KAGXzP,MAAO,OACP9J,UAAWwZ,KAGX1P,MAAO,gBACP9J,UAAWyZ,KAGX3P,MAAO,SACP9J,UAAW0Z,KAGX5P,MAAO,YACP9J,UAAW2Z,SAIX3V,EAAWkV,EAAM,GAEjBU,GAAa,aAER/V,EAAOgW,OACd7V,EAAW6V,2BAGM/W,OACjB8W,GAA8B,iBAAV9W,EAAqBA,EAAQ2P,KAAKqH,UAAUhX,QAChE8W,GAAa,kBAIbpN,OAAK,6BAsB4E3I,EAAOgW,YAcpFD,GAAa,cCrGT,kEAAQ,CAClBjZ,OAAQiB,SAASuL"} \ No newline at end of file +{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../../../api/dist/tauri-aed0aa5f.js","../../../../api/dist/tauri-8c12a76a.js","../../../../api/dist/shell-8db284b7.js","../../../../api/dist/shell.js","../../../../api/dist/cli-a6f8013c.js","../../../../api/dist/cli.js","../../src/components/Cli.svelte","../../../../api/dist/event-c67193a9.js","../../../../api/dist/event-f8250585.js","../../../../api/dist/event.js","../../../../api/dist/tauri.js","../../src/components/Communication.svelte","../../../../api/dist/dialog-ffe8f83d.js","../../../../api/dist/dialog.js","../../../../api/dist/fs-06318d8b.js","../../../../api/dist/fs.js","../../src/components/Dialog.svelte","../../src/components/FileSystem.svelte","../../../../api/dist/http-ff4db9a9.js","../../../../api/dist/http.js","../../src/components/Http.svelte","../../src/components/Notifications.svelte","../../../../api/dist/window-773a979e.js","../../../../api/dist/window.js","../../src/components/Window.svelte","../../node_modules/svelte/store/index.mjs","../../../../api/dist/globalShortcut-37b3a06f.js","../../../../api/dist/globalShortcut.js","../../src/components/Shortcuts.svelte","../../src/components/Shell.svelte","../../src/App.svelte","../../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n let j = 0;\n const remove = [];\n while (j < node.attributes.length) {\n const attribute = node.attributes[j++];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n for (let k = 0; k < remove.length; k++) {\n node.removeAttribute(remove[k]);\n }\n return nodes.splice(i, 1)[0];\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n callbacks.slice().forEach(fn => fn(event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, options = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, options);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : []),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.35.0' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to seperate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","\"use strict\";\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};function n(t,n,e,r){return new(e||(e=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,c)}u((r=r.apply(t,n||[])).next())}))}function e(t,n){var e,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},\"function\"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(e)throw new TypeError(\"Generator is already executing.\");for(;a;)try{if(e=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]\n import { getMatches } from \"@tauri-apps/api/cli\";\n\n export let onMessage;\n\n function cliMatches() {\n getMatches().then(onMessage).catch(onMessage);\n }\n\n\n
\n \n
\n","\"use strict\";var t=require(\"./tauri-aed0aa5f.js\"),n=require(\"./tauri-8c12a76a.js\");function e(e,i){return t.__awaiter(this,void 0,void 0,(function(){var u=this;return t.__generator(this,(function(o){return[2,n.invokeTauriCommand({__tauriModule:\"Event\",message:{cmd:\"listen\",event:e,handler:t.transformCallback(i)}}).then((function(n){return function(){return t.__awaiter(u,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,r(n)]}))}))}}))]}))}))}function r(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,n.invokeTauriCommand({__tauriModule:\"Event\",message:{cmd:\"unlisten\",eventId:e}})]}))}))}exports.emit=function(e,r,i){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){switch(t.label){case 0:return[4,n.invokeTauriCommand({__tauriModule:\"Event\",message:{cmd:\"emit\",event:e,windowLabel:r,payload:i}})];case 1:return t.sent(),[2]}}))}))},exports.listen=function(n,r){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,e(n,r)]}))}))},exports.once=function(n,i){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,e(n,(function(t){i(t),r(t.id).catch((function(){}))}))]}))}))};\n","\"use strict\";var e=require(\"./tauri-aed0aa5f.js\"),t=require(\"./event-c67193a9.js\");function r(r,i){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,t.emit(r,void 0,i)]}))}))}var i=Object.freeze({__proto__:null,emit:r,listen:t.listen,once:t.once});exports.emit=r,exports.event=i;\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),require(\"./tauri-aed0aa5f.js\");var e=require(\"./event-c67193a9.js\"),r=require(\"./event-f8250585.js\");require(\"./tauri-8c12a76a.js\"),exports.listen=e.listen,exports.once=e.once,exports.emit=r.emit;\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0});var e=require(\"./tauri-aed0aa5f.js\");exports.invoke=e.invoke,exports.transformCallback=e.transformCallback;\n","\n\n
\n \n \n \n
\n","\"use strict\";var e=require(\"./tauri-aed0aa5f.js\"),o=require(\"./tauri-8c12a76a.js\");function r(r){return void 0===r&&(r={}),e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return\"object\"==typeof r&&Object.freeze(r),[2,o.invokeTauriCommand({__tauriModule:\"Dialog\",mainThread:!0,message:{cmd:\"openDialog\",options:r}})]}))}))}function t(r){return void 0===r&&(r={}),e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return\"object\"==typeof r&&Object.freeze(r),[2,o.invokeTauriCommand({__tauriModule:\"Dialog\",mainThread:!0,message:{cmd:\"saveDialog\",options:r}})]}))}))}var i=Object.freeze({__proto__:null,open:r,save:t});exports.dialog=i,exports.open=r,exports.save=t;\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),require(\"./tauri-aed0aa5f.js\"),require(\"./tauri-8c12a76a.js\");var e=require(\"./dialog-ffe8f83d.js\");exports.open=e.open,exports.save=e.save;\n","\"use strict\";var e,r=require(\"./tauri-aed0aa5f.js\"),t=require(\"./tauri-8c12a76a.js\");function i(e,i){return void 0===i&&(i={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,t.invokeTauriCommand({__tauriModule:\"Fs\",message:{cmd:\"readTextFile\",path:e,options:i}})]}))}))}function o(e,i){return void 0===i&&(i={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,t.invokeTauriCommand({__tauriModule:\"Fs\",message:{cmd:\"readBinaryFile\",path:e,options:i}})]}))}))}function n(e,i){return void 0===i&&(i={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return\"object\"==typeof i&&Object.freeze(i),\"object\"==typeof e&&Object.freeze(e),[2,t.invokeTauriCommand({__tauriModule:\"Fs\",message:{cmd:\"writeFile\",path:e.path,contents:e.contents,options:i}})]}))}))}exports.BaseDirectory=void 0,(e=exports.BaseDirectory||(exports.BaseDirectory={}))[e.Audio=1]=\"Audio\",e[e.Cache=2]=\"Cache\",e[e.Config=3]=\"Config\",e[e.Data=4]=\"Data\",e[e.LocalData=5]=\"LocalData\",e[e.Desktop=6]=\"Desktop\",e[e.Document=7]=\"Document\",e[e.Download=8]=\"Download\",e[e.Executable=9]=\"Executable\",e[e.Font=10]=\"Font\",e[e.Home=11]=\"Home\",e[e.Picture=12]=\"Picture\",e[e.Public=13]=\"Public\",e[e.Runtime=14]=\"Runtime\",e[e.Template=15]=\"Template\",e[e.Video=16]=\"Video\",e[e.Resource=17]=\"Resource\",e[e.App=18]=\"App\",e[e.Current=19]=\"Current\";function a(e){var r=function(e){if(e.length<65536)return String.fromCharCode.apply(null,Array.from(e));for(var r=\"\",t=e.length,i=0;i\n import { open, save } from \"@tauri-apps/api/dialog\";\n import { readBinaryFile } from \"@tauri-apps/api/fs\";\n\n export let onMessage;\n let defaultPath = null;\n let filter = null;\n let multiple = false;\n let directory = false;\n\n function arrayBufferToBase64(buffer, callback) {\n var blob = new Blob([buffer], {\n type: \"application/octet-binary\",\n });\n var reader = new FileReader();\n reader.onload = function (evt) {\n var dataurl = evt.target.result;\n callback(dataurl.substr(dataurl.indexOf(\",\") + 1));\n };\n reader.readAsDataURL(blob);\n }\n\n function openDialog() {\n open({\n defaultPath,\n filters: filter\n ? [\n {\n name: \"Tauri Example\",\n extensions: filter.split(\",\").map((f) => f.trim()),\n },\n ]\n : [],\n multiple,\n directory,\n })\n .then(function (res) {\n if (Array.isArray(res)) {\n onMessage(res);\n } else {\n var pathToRead = res;\n var isFile = pathToRead.match(/\\S+\\.\\S+$/g);\n readBinaryFile(pathToRead)\n .then(function (response) {\n if (isFile) {\n if (\n pathToRead.includes(\".png\") ||\n pathToRead.includes(\".jpg\")\n ) {\n arrayBufferToBase64(\n new Uint8Array(response),\n function (base64) {\n var src = \"data:image/png;base64,\" + base64;\n onMessage('');\n }\n );\n } else {\n onMessage(res);\n }\n } else {\n onMessage(res);\n }\n })\n .catch(onMessage(res));\n }\n })\n .catch(onMessage);\n }\n\n function saveDialog() {\n save({\n defaultPath,\n filters: filter\n ? [\n {\n name: \"Tauri Example\",\n extensions: filter.split(\",\").map((f) => f.trim()),\n },\n ]\n : [],\n })\n .then(onMessage)\n .catch(onMessage);\n }\n\n\n
\n \n \n
\n \n \n
\n
\n \n \n
\n\n
\n\n\n","\n\n
\n \n \n \n\n","\"use strict\";var t,e=require(\"./tauri-aed0aa5f.js\"),n=require(\"./tauri-8c12a76a.js\");exports.ResponseType=void 0,(t=exports.ResponseType||(exports.ResponseType={}))[t.JSON=1]=\"JSON\",t[t.Text=2]=\"Text\",t[t.Binary=3]=\"Binary\";var r=function(){function t(t,e){this.type=t,this.payload=e}return t.form=function(e){return new t(\"Form\",e)},t.json=function(e){return new t(\"Json\",e)},t.text=function(e){return new t(\"Text\",e)},t.bytes=function(e){return new t(\"Bytes\",e)},t}(),i=function(){function t(t){this.id=t}return t.prototype.drop=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){return[2,n.invokeTauriCommand({__tauriModule:\"Http\",message:{cmd:\"dropClient\",client:this.id}})]}))}))},t.prototype.request=function(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,n.invokeTauriCommand({__tauriModule:\"Http\",message:{cmd:\"httpRequest\",client:this.id,options:t}})]}))}))},t.prototype.get=function(t,n){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(r){return[2,this.request(e._assign({method:\"GET\",url:t},n))]}))}))},t.prototype.post=function(t,n,r){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(i){return[2,this.request(e._assign({method:\"POST\",url:t,body:n},r))]}))}))},t.prototype.put=function(t,n,r){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(i){return[2,this.request(e._assign({method:\"PUT\",url:t,body:n},r))]}))}))},t.prototype.patch=function(t,n){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(r){return[2,this.request(e._assign({method:\"PATCH\",url:t},n))]}))}))},t.prototype.delete=function(t,n){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(r){return[2,this.request(e._assign({method:\"DELETE\",url:t},n))]}))}))},t}();function o(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,n.invokeTauriCommand({__tauriModule:\"Http\",message:{cmd:\"createClient\",options:t}}).then((function(t){return new i(t)}))]}))}))}var u=null;function s(t,n){var r;return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(i){switch(i.label){case 0:return null!==u?[3,2]:[4,o()];case 1:u=i.sent(),i.label=2;case 2:return[2,u.request(e._assign({url:t,method:null!==(r=null==n?void 0:n.method)&&void 0!==r?r:\"GET\"},n))]}}))}))}var a=Object.freeze({__proto__:null,get ResponseType(){return exports.ResponseType},Body:r,Client:i,getClient:o,fetch:s});exports.Body=r,exports.Client=i,exports.fetch=s,exports.getClient=o,exports.http=a;\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),require(\"./tauri-aed0aa5f.js\"),require(\"./tauri-8c12a76a.js\");var e=require(\"./http-ff4db9a9.js\");exports.Body=e.Body,exports.Client=e.Client,Object.defineProperty(exports,\"ResponseType\",{enumerable:!0,get:function(){return e.ResponseType}}),exports.fetch=e.fetch,exports.getClient=e.getClient;\n","\n\n
\n \n \n
\n \n \n\n","\n\n\n","\"use strict\";var t=require(\"./tauri-aed0aa5f.js\"),e=require(\"./tauri-8c12a76a.js\"),n=require(\"./event-c67193a9.js\");function i(){return new u(window.__TAURI__.__currentWindow.label)}function r(){return window.__TAURI__.__windows}var o=[\"tauri://created\",\"tauri://error\"],u=function(){function e(t){this.label=t,this.listeners={}}return e.prototype.listen=function(e,i){return t.__awaiter(this,void 0,void 0,(function(){var r=this;return t.__generator(this,(function(t){return this._handleTauriEvent(e,i)?[2,Promise.resolve((function(){var t=r.listeners[e];t.splice(t.indexOf(i),1)}))]:[2,n.listen(e,i)]}))}))},e.prototype.once=function(e,i){return t.__awaiter(this,void 0,void 0,(function(){var r=this;return t.__generator(this,(function(t){return this._handleTauriEvent(e,i)?[2,Promise.resolve((function(){var t=r.listeners[e];t.splice(t.indexOf(i),1)}))]:[2,n.once(e,i)]}))}))},e.prototype.emit=function(e,i){return t.__awaiter(this,void 0,void 0,(function(){var r,u;return t.__generator(this,(function(t){if(o.includes(e)){for(r=0,u=this.listeners[e]||[];r\n import { appWindow } from \"@tauri-apps/api/window\";\n import { open as openDialog } from \"@tauri-apps/api/dialog\";\n import { open } from \"@tauri-apps/api/shell\";\n\n const {\n setResizable,\n setTitle,\n maximize,\n unmaximize,\n minimize,\n unminimize,\n show,\n hide,\n setTransparent,\n setDecorations,\n setAlwaysOnTop,\n setWidth,\n setHeight,\n // resize,\n setMinSize,\n setMaxSize,\n setX,\n setY,\n // setPosition,\n setFullscreen,\n setIcon,\n } = appWindow;\n\n let urlValue = \"https://tauri.studio\";\n let resizable = true;\n let maximized = false;\n let transparent = false;\n let decorations = true;\n let alwaysOnTop = false;\n let fullscreen = false;\n let width = 900;\n let height = 700;\n let minWidth = 600;\n let minHeight = 600;\n let maxWidth = null;\n let maxHeight = null;\n let x = 100;\n let y = 100;\n\n let windowTitle = \"Awesome Tauri Example!\";\n\n function openUrl() {\n open(urlValue);\n }\n\n function setTitle_() {\n setTitle(windowTitle);\n }\n\n function hide_() {\n hide();\n setTimeout(show, 2000);\n }\n\n function minimize_() {\n minimize();\n setTimeout(unminimize, 2000);\n }\n\n function getIcon() {\n openDialog({\n multiple: false,\n }).then(setIcon);\n }\n\n $: setResizable(resizable);\n $: maximized ? maximize() : unmaximize();\n //$: setTransparent(transparent)\n $: setDecorations(decorations);\n $: setAlwaysOnTop(alwaysOnTop);\n $: setFullscreen(fullscreen);\n\n $: setWidth(width);\n $: setHeight(height);\n $: minWidth && minHeight && setMinSize(minWidth, minHeight);\n $: maxWidth && maxHeight && setMaxSize(maxWidth, maxHeight);\n $: setX(x);\n $: setY(y);\n\n\n
\n
\n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n
\n X\n \n
\n
\n Y\n \n
\n
\n\n
\n
\n Width\n \n
\n
\n Height\n \n
\n
\n\n
\n
\n Min width\n \n
\n
\n Min height\n \n
\n
\n\n
\n
\n Max width\n \n
\n
\n Max height\n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n\n\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = [];\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (let i = 0; i < subscribers.length; i += 1) {\n const s = subscribers[i];\n s[1]();\n subscriber_queue.push(s, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.push(subscriber);\n if (subscribers.length === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n const index = subscribers.indexOf(subscriber);\n if (index !== -1) {\n subscribers.splice(index, 1);\n }\n if (subscribers.length === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","\"use strict\";var r=require(\"./tauri-aed0aa5f.js\"),t=require(\"./tauri-8c12a76a.js\");function e(e,i){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,t.invokeTauriCommand({__tauriModule:\"GlobalShortcut\",message:{cmd:\"register\",shortcut:e,handler:r.transformCallback(i)}})]}))}))}function i(e,i){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,t.invokeTauriCommand({__tauriModule:\"GlobalShortcut\",message:{cmd:\"registerAll\",shortcuts:e,handler:r.transformCallback(i)}})]}))}))}function n(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,t.invokeTauriCommand({__tauriModule:\"GlobalShortcut\",message:{cmd:\"isRegistered\",shortcut:e}})]}))}))}function o(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,t.invokeTauriCommand({__tauriModule:\"GlobalShortcut\",message:{cmd:\"unregister\",shortcut:e}})]}))}))}function u(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,t.invokeTauriCommand({__tauriModule:\"GlobalShortcut\",message:{cmd:\"unregisterAll\"}})]}))}))}var a=Object.freeze({__proto__:null,register:e,registerAll:i,isRegistered:n,unregister:o,unregisterAll:u});exports.globalShortcut=a,exports.isRegistered=n,exports.register=e,exports.registerAll=i,exports.unregister=o,exports.unregisterAll=u;\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),require(\"./tauri-aed0aa5f.js\"),require(\"./tauri-8c12a76a.js\");var e=require(\"./globalShortcut-37b3a06f.js\");exports.isRegistered=e.isRegistered,exports.register=e.register,exports.registerAll=e.registerAll,exports.unregister=e.unregister,exports.unregisterAll=e.unregisterAll;\n","\n\n
\n
\n \n \n
\n
\n {#each $shortcuts as savedShortcut}\n
\n {savedShortcut}\n
\n {/each}\n {#if $shortcuts.length}\n \n {/if}\n
\n
\n","\n\n
\n
\n \n \n \n {#if child}\n \n \n {/if}\n
\n
\n","\n\n
\n \n
\n
\n {#each views as view}\n

select(view)}\n >\n {view.label}\n

\n {/each}\n
\n
\n \n
\n
\n
\n

\n Tauri Console\n {\n responses = [\"\"];\n }}>clear\n

\n {responses}\n
\n
\n","import App from \"./App.svelte\";\n\nconst app = new App({\n target: document.body,\n});\n\nexport default app;\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","component_subscribe","component","store","callback","$$","on_destroy","push","callbacks","unsub","subscribe","unsubscribe","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","i","length","d","element","name","document","createElement","text","data","createTextNode","space","listen","event","handler","options","addEventListener","removeEventListener","prevent_default","preventDefault","call","this","attr","attribute","value","removeAttribute","getAttribute","setAttribute","to_number","set_data","wholeText","set_input_value","input","set_style","key","important","style","setProperty","select_option","select","option","__value","selected","current_component","set_current_component","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","flushing","seen_callbacks","Set","flush","update","pop","has","add","clear","fragment","before_update","dirty","p","ctx","after_update","outroing","outros","transition_in","block","local","delete","transition_out","o","c","create_component","mount_component","customElement","on_mount","m","new_on_destroy","map","filter","destroy_component","make_dirty","then","fill","init","instance","create_fragment","not_equal","props","parent_component","bound","on_disconnect","context","Map","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","intro","SvelteComponent","[object Object]","$destroy","type","index","indexOf","splice","$$props","obj","$$set","keys","t","n","e","setPrototypeOf","__proto__","prototype","hasOwnProperty","r","u","next","throw","done","apply","label","sent","trys","ops","return","Symbol","iterator","TypeError","Int8Array","window","crypto","getRandomValues","Uint8Array","Math","max","abs","join","defineProperty","Reflect","deleteProperty","writable","configurable","rpc","notify","exports","_assign","error","assign","arguments","freeze","transformCallback","invoke","String","constructor","__awaiter","__generator","require$$0","invokeTauriCommand","__tauriModule","message","cmd","program","sidecar","onEventFn","args","eventListeners","_emit","on","pid","write","buffer","kill","stdout","stderr","__extends","spawn","payload","execute","code","signal","catch","path","with","s","Command","Child","open","getMatches","onMessage","eventId","windowLabel","id","emit","once","endpoint","body","mainThread","save","contents","fromCharCode","subarray","btoa","_","source","destination","oldPath","newPath","BaseDirectory","Audio","Cache","Config","Data","LocalData","Desktop","Document","Download","Executable","Font","Home","Picture","Public","Runtime","Template","Video","Resource","App","Current","Dir","readTextFile","readBinaryFile","writeFile","writeBinaryFile","readDir","createDir","removeDir","copyFile","removeFile","renameFile","enumerable","get","defaultPath","multiple","directory","filters","extensions","split","f","trim","res","isArray","pathToRead","isFile","match","response","blob","reader","includes","base64","Blob","FileReader","onload","evt","dataurl","result","substr","readAsDataURL","getDir","getElementById","parseInt","dir","DirOptions","isNaN","opts","arrayBufferToBase64","setTimeout","fileInput","file","ResponseType","JSON","Text","Binary","form","json","bytes","drop","client","request","method","url","post","put","patch","Body","Client","getClient","fetch","httpMethod","httpUrl","httpBody","startsWith","endsWith","parse","selected_option","querySelector","_sendNotification","Notification","permission","requestPermission","__TAURI__","__currentWindow","__windows","listeners","_handleTauriEvent","getByLabel","some","setResizable","resizable","setTitle","title","maximize","unmaximize","minimize","unminimize","show","hide","close","setDecorations","decorations","setAlwaysOnTop","alwaysOnTop","setWidth","width","setHeight","height","resize","setMinSize","minWidth","minHeight","setMaxSize","maxWidth","maxHeight","setX","x","setY","y","setPosition","setFullscreen","fullscreen","setIcon","icon","WebviewWindow","getCurrent","getAll","appWindow","setTransparent","urlValue","maximized","transparent","windowTitle","openDialog","subscriber_queue","shortcut","shortcuts","register","registerAll","isRegistered","unregister","unregisterAll","start","stop","subscribers","set","new_value","run_queue","invalidate","subscriber","shortcut_","unregisterShortcut","shortcuts_","registerShortcut","unregisterAllShortcuts","savedShortcut","windows","navigator","userAgent","child","script","stdin","command","line","views","Welcome","Communication","Cli","Dialog","FileSystem","Http","Notifications","Window","Shortcuts","Shell","responses","view","stringify"],"mappings":"gCAAA,SAASA,KAgBT,SAASC,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB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Aa,aAER1X,EAAO2X,OACdxX,EAAWwX,2BAGM1Y,OACjByY,GAA8B,iBAAVzY,EAAqBA,EAAQ8Q,KAAK6H,UAAU3Y,QAChEyY,GAAa,kBAIbvN,OAAK,6BAsB4EnK,EAAO2X,YAcpFD,GAAa,cC1GT,kEAAQ,CAClB5a,OAAQiB,SAAS6M"} \ No newline at end of file diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte index 22ed3c8e5..f30cea6f3 100644 --- a/examples/api/src/App.svelte +++ b/examples/api/src/App.svelte @@ -2,6 +2,7 @@ import { onMount } from "svelte"; import { open } from "@tauri-apps/api/shell"; + import Welcome from "./components/Welcome.svelte"; import Cli from "./components/Cli.svelte"; import Communication from "./components/Communication.svelte"; import Dialog from "./components/Dialog.svelte"; @@ -10,7 +11,7 @@ import Notifications from "./components/Notifications.svelte"; import Window from "./components/Window.svelte"; import Shortcuts from "./components/Shortcuts.svelte"; - import Welcome from "./components/Welcome.svelte"; + import Shell from "./components/Shell.svelte"; const views = [ { @@ -49,6 +50,10 @@ label: "Shortcuts", component: Shortcuts, }, + { + label: "Shell", + component: Shell, + } ]; let selected = views[0]; @@ -97,7 +102,7 @@ -
+

Tauri Console { diff --git a/examples/api/src/components/Shell.svelte b/examples/api/src/components/Shell.svelte new file mode 100644 index 000000000..50554b483 --- /dev/null +++ b/examples/api/src/components/Shell.svelte @@ -0,0 +1,52 @@ + + +

diff --git a/tauri-api/Cargo.toml b/tauri-api/Cargo.toml index b23bde947..1075bb6ee 100644 --- a/tauri-api/Cargo.toml +++ b/tauri-api/Cargo.toml @@ -38,6 +38,9 @@ notify-rust = { version = "4.3.0", optional = true } once_cell = "1.7.2" tauri-hotkey = { git = "https://github.com/tauri-apps/tauri-hotkey-rs", branch = "dev", optional = true } open = "1.6.0" +tokio = { version = "1.3", features = ["rt", "rt-multi-thread", "sync"] } +shared_child = "0.3" +os_pipe = "0.9" [dev-dependencies] quickcheck = "1.0.3" diff --git a/tauri-api/src/command.rs b/tauri-api/src/command.rs index b3001e071..b36cdce99 100644 --- a/tauri-api/src/command.rs +++ b/tauri-api/src/command.rs @@ -1,106 +1,183 @@ -use std::process::{Child, Command, Stdio}; +use std::{ + io::{BufRead, BufReader, Write}, + process::{Command as StdCommand, Stdio}, + sync::Arc, +}; +#[cfg(unix)] +use std::os::unix::process::ExitStatusExt; #[cfg(windows)] use std::os::windows::process::CommandExt; #[cfg(windows)] const CREATE_NO_WINDOW: u32 = 0x0800_0000; +use crate::private::async_runtime::{channel, spawn, Receiver}; +use os_pipe::{pipe, PipeWriter}; +use serde::Serialize; +use shared_child::SharedChild; use tauri_utils::platform; -/// Gets the output of the given command. -#[cfg(not(windows))] -pub fn get_output(cmd: String, args: Vec, stdout: Stdio) -> crate::Result { - let output = Command::new(cmd).args(args).stdout(stdout).output()?; +/// Payload for the `Terminated` command event. +#[derive(Serialize)] +pub struct TerminatedPayload { + /// Exit code of the process. + pub code: Option, + /// If the process was terminated by a signal, represents that signal. + pub signal: Option, +} - if output.status.success() { - Ok(String::from_utf8_lossy(&output.stdout).to_string()) - } else { - Err(crate::Error::Command( - String::from_utf8_lossy(&output.stderr).to_string(), +/// A event sent to the command callback. +#[derive(Serialize)] +#[serde(tag = "event", content = "payload")] +pub enum CommandEvent { + /// Stderr line. + Stderr(String), + /// Stdout line. + Stdout(String), + /// An error happened. + Error(String), + /// Command process terminated. + Terminated(TerminatedPayload), +} + +macro_rules! get_std_command { + ($self: ident) => {{ + let mut command = StdCommand::new($self.program); + command.args(&$self.args); + command.stdout(Stdio::piped()); + command.stdin(Stdio::piped()); + command.stderr(Stdio::piped()); + #[cfg(windows)] + command.creation_flags(CREATE_NO_WINDOW); + command + }}; +} + +/// API to spawn commands. +pub struct Command { + program: String, + args: Vec, +} + +/// Child spawned. +pub struct CommandChild { + inner: Arc, + stdin_writer: PipeWriter, +} + +impl CommandChild { + /// Write to process stdin. + pub fn write(&mut self, buf: &[u8]) -> crate::Result<()> { + self.stdin_writer.write_all(buf)?; + Ok(()) + } + /// Send a kill signal to the child. + pub fn kill(self) -> crate::Result<()> { + self.inner.kill()?; + Ok(()) + } + + /// Returns the process pid. + pub fn pid(&self) -> u32 { + self.inner.id() + } +} + +impl Command { + /// Creates a new Command for launching the given program. + pub fn new>(program: S) -> Self { + Self { + program: program.into(), + args: Default::default(), + } + } + + /// Creates a new Command for launching the given sidecar program. + pub fn new_sidecar>(program: S) -> Self { + Self::new(format!( + "{}-{}", + program.into(), + platform::target_triple().expect("unsupported platform") )) } -} -/// Gets the output of the given command. -#[cfg(windows)] -pub fn get_output(cmd: String, args: Vec, stdout: Stdio) -> crate::Result { - let output = Command::new(cmd) - .args(args) - .stdout(stdout) - .creation_flags(CREATE_NO_WINDOW) - .output()?; + /// Append args to the command. + pub fn args(mut self, args: I) -> Self + where + I: IntoIterator, + S: AsRef, + { + for arg in args { + self.args.push(arg.as_ref().to_string()); + } + self + } - if output.status.success() { - Ok(String::from_utf8_lossy(&output.stdout).to_string()) - } else { - Err(crate::Error::Command( - String::from_utf8_lossy(&output.stderr).to_string(), + /// Spawns the command. + pub fn spawn(self) -> crate::Result<(Receiver, CommandChild)> { + let mut command = get_std_command!(self); + let (stdout_reader, stdout_writer) = pipe()?; + let (stderr_reader, stderr_writer) = pipe()?; + let (stdin_reader, stdin_writer) = pipe()?; + command.stdout(stdout_writer); + command.stderr(stderr_writer); + command.stdin(stdin_reader); + + let shared_child = SharedChild::spawn(&mut command)?; + let child = Arc::new(shared_child); + let child_ = child.clone(); + + let (tx, rx) = channel(1); + let tx_ = tx.clone(); + spawn(async move { + let _ = match child_.wait() { + Ok(status) => { + tx_ + .send(CommandEvent::Terminated(TerminatedPayload { + code: status.code(), + #[cfg(windows)] + signal: None, + #[cfg(unix)] + signal: status.signal(), + })) + .await + } + Err(e) => tx_.send(CommandEvent::Error(e.to_string())).await, + }; + }); + + let tx_ = tx.clone(); + spawn(async move { + let reader = BufReader::new(stdout_reader); + for line in reader.lines() { + let _ = match line { + Ok(line) => tx_.send(CommandEvent::Stdout(line)).await, + Err(e) => tx_.send(CommandEvent::Error(e.to_string())).await, + }; + } + }); + + spawn(async move { + let reader = BufReader::new(stderr_reader); + for line in reader.lines() { + let _ = match line { + Ok(line) => tx.send(CommandEvent::Stderr(line)).await, + Err(e) => tx.send(CommandEvent::Error(e.to_string())).await, + }; + } + }); + + Ok(( + rx, + CommandChild { + inner: child, + stdin_writer, + }, )) } } -/// Gets the path to command relative to the current executable path. -#[cfg(not(windows))] -pub fn command_path(command: String) -> crate::Result { - match std::env::current_exe()?.parent() { - Some(exe_dir) => Ok(format!("{}/{}", exe_dir.display().to_string(), command)), - None => Err(crate::Error::Command( - "Could not evaluate executable dir".to_string(), - )), - } -} - -/// Gets the path to command relative to the current executable path. -#[cfg(windows)] -pub fn command_path(command: String) -> crate::Result { - match std::env::current_exe()?.parent() { - Some(exe_dir) => Ok(format!("{}/{}.exe", exe_dir.display().to_string(), command)), - None => Err(crate::Error::Command( - "Could not evaluate executable dir".to_string(), - )), - } -} - -/// Spawns a process with a command string relative to the current executable path. -/// For example, if your app bundles two executables, you don't need to worry about its path and just run `second-app`. -#[cfg(windows)] -pub fn spawn_relative_command( - command: String, - args: Vec, - stdout: Stdio, -) -> crate::Result { - let cmd = command_path(command)?; - Ok( - Command::new(cmd) - .args(args) - .creation_flags(CREATE_NO_WINDOW) - .stdout(stdout) - .spawn()?, - ) -} - -/// Spawns a process with a command string relative to the current executable path. -/// For example, if your app bundles two executables, you don't need to worry about its path and just run `second-app`. -#[cfg(not(windows))] -pub fn spawn_relative_command( - command: String, - args: Vec, - stdout: Stdio, -) -> crate::Result { - let cmd = command_path(command)?; - Ok(Command::new(cmd).args(args).stdout(stdout).spawn()?) -} - -/// Gets the binary command with the current target triple. -pub fn binary_command(binary_name: String) -> crate::Result { - Ok(format!( - "{}-{}", - binary_name, - platform::target_triple().map_err(|e| crate::Error::FailedToDetectPlatform(e.to_string()))? - )) -} - // tests for the commands functions. #[cfg(test)] mod test { @@ -108,75 +185,45 @@ mod test { #[cfg(not(windows))] #[test] - // test the get_output function with a unix cat command. fn test_cmd_output() { - // create a string with cat in it. - let cmd = String::from("cat"); + // create a command to run cat. + let cmd = Command::new("cat").args(&["test/test.txt"]); + let (mut rx, _) = cmd.spawn().unwrap(); - // call get_output with cat and the argument test/test.txt on the stdio. - let res = get_output(cmd, vec!["test/test.txt".to_string()], Stdio::piped()); - - // assert that the result is an Ok() type - assert!(res.is_ok()); - - // if the assertion passes, assert the incoming data. - if let Ok(s) = &res { - // assert that cat returns the string in the test.txt document. - assert_eq!(*s, "This is a test doc!".to_string()); - } + crate::private::async_runtime::block_on(async move { + while let Some(event) = rx.recv().await { + match event { + CommandEvent::Terminated(payload) => { + assert_eq!(payload.code, Some(0)); + } + CommandEvent::Stdout(line) => { + assert_eq!(line, "This is a test doc!".to_string()); + } + _ => {} + } + } + }); } #[cfg(not(windows))] #[test] - // test the failure case for get_output + // test the failure case fn test_cmd_fail() { - use crate::Error; + let cmd = Command::new("cat").args(&["test/"]); + let (mut rx, _) = cmd.spawn().unwrap(); - // queue up a string with cat in it. - let cmd = String::from("cat"); - - // call get output with test/ as an argument on the stdio. - let res = get_output(cmd, vec!["test/".to_string()], Stdio::piped()); - - // assert that the result is an Error type. - assert!(res.is_err()); - - // destruct the Error to check the ErrorKind and test that it is a Command type. - if let Error::Command(e) = res.unwrap_err() { - // assert that the message in the error matches this string. - assert_eq!(*e, "cat: test/: Is a directory\n".to_string()); - } - } - - #[test] - // test the command_path function - fn check_command_path() { - // generate a string for cat - let cmd = String::from("cat"); - - // call command_path on cat - let res = command_path(cmd); - - // assert that the result is an OK() type. - assert!(res.is_ok()); - } - - #[test] - // check the spawn_relative_command function - fn check_spawn_cmd() { - // generate a cat string - let cmd = String::from("cat"); - - // call spawn_relative_command with cat and the argument test/test.txt on the Stdio. - let res = spawn_relative_command(cmd, vec!["test/test.txt".to_string()], Stdio::piped()); - - // this fails because there is no cat binary in the relative parent folder of this current executing command. - assert!(res.is_err()); - - // after asserting that the result is an error, check that the error kind is ErrorKind::Io - if let crate::Error::Io(s) = res.unwrap_err() { - // assert that the ErrorKind inside of the ErrorKind Io is ErrorKind::NotFound - assert_eq!(s.kind(), std::io::ErrorKind::NotFound); - } + crate::private::async_runtime::block_on(async move { + while let Some(event) = rx.recv().await { + match event { + CommandEvent::Terminated(payload) => { + assert_eq!(payload.code, Some(1)); + } + CommandEvent::Stderr(line) => { + assert_eq!(line, "cat: test/: Is a directory".to_string()); + } + _ => {} + } + } + }); } } diff --git a/tauri-api/src/error.rs b/tauri-api/src/error.rs index bf204ee77..bcaa30cde 100644 --- a/tauri-api/src/error.rs +++ b/tauri-api/src/error.rs @@ -4,9 +4,6 @@ pub enum Error { /// The extract archive error. #[error("Extract Error: {0}")] Extract(String), - /// The Command (spawn process) error. - #[error("Command Error: {0}")] - Command(String), /// The path operation error. #[error("Path Error: {0}")] Path(String), diff --git a/tauri-api/src/lib.rs b/tauri-api/src/lib.rs index 58dc5929f..df16a86df 100644 --- a/tauri-api/src/lib.rs +++ b/tauri-api/src/lib.rs @@ -52,6 +52,33 @@ pub type Result = std::result::Result; // Not public API #[doc(hidden)] pub mod private { + // Core API only. + pub mod async_runtime { + use once_cell::sync::OnceCell; + use tokio::runtime::Runtime; + pub use tokio::sync::{ + mpsc::{channel, Receiver, Sender}, + Mutex, + }; + + use std::future::Future; + + static RUNTIME: OnceCell = OnceCell::new(); + + pub fn block_on(task: F) -> F::Output { + let runtime = RUNTIME.get_or_init(|| Runtime::new().unwrap()); + runtime.block_on(task) + } + + pub fn spawn(task: F) + where + F: Future + Send + 'static, + F::Output: Send + 'static, + { + let runtime = RUNTIME.get_or_init(|| Runtime::new().unwrap()); + runtime.spawn(task); + } + } pub use once_cell::sync::OnceCell; pub trait AsTauriContext { diff --git a/tauri/scripts/bundle.js b/tauri/scripts/bundle.js index 637af8a70..17bf7dfa0 100644 --- a/tauri/scripts/bundle.js +++ b/tauri/scripts/bundle.js @@ -1 +1 @@ -function _inherits(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&_setPrototypeOf(e,r)}function _setPrototypeOf(e,r){return(_setPrototypeOf=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e})(e,r)}function _createSuper(e){var r=_isNativeReflectConstruct();return function(){var t,n=_getPrototypeOf(e);if(r){var o=_getPrototypeOf(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return _possibleConstructorReturn(this,t)}}function _possibleConstructorReturn(e,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?_assertThisInitialized(e):r}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _createForOfIteratorHelper(e,r){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=_unsupportedIterableToArray(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,i=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return u=e.done,e},e:function(e){i=!0,a=e},f:function(){try{u||null==t.return||t.return()}finally{if(i)throw a}}}}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t=0;--a){var u=this.tryEntries[a],i=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=n.call(u,"catchLoc"),s=n.call(u,"finallyLoc");if(c&&s){if(this.prev=0;--t){var o=this.tryEntries[t];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--r){var t=this.tryEntries[r];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),P(t),d}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.tryLoc===e){var n=t.completion;if("throw"===n.type){var o=n.arg;P(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:M(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),d}},e}("object"===("undefined"==typeof module?"undefined":_typeof(module))?module.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}function t(e){for(var r=void 0,t=e[0],n=1;n1&&void 0!==arguments[1]&&arguments[1],o=n();return Object.defineProperty(window,o,{value:function(n){return r&&Reflect.deleteProperty(window,o),t([e,"optionalCall",function(e){return e(n)}])},writable:!1,configurable:!0}),o}function a(e){return u.apply(this,arguments)}function u(){return(u=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",new Promise((function(e,n){var a=o((function(r){e(r),Reflect.deleteProperty(window,u)}),!0),u=o((function(e){n(e),Reflect.deleteProperty(window,a)}),!0);window.rpc.notify(r,_objectSpread({callback:a,error:u},t))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var i=Object.freeze({__proto__:null,transformCallback:o,invoke:a});function c(e){return s.apply(this,arguments)}function s(){return(s=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a("tauri",r));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(){return(p=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Cli",message:{cmd:"cliMatches"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var f=Object.freeze({__proto__:null,getMatches:function(){return p.apply(this,arguments)}});function l(){return(l=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r,t=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(r=t.length>0&&void 0!==t[0]?t[0]:{})&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"openDialog",options:r}}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(){return(h=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r,t=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(r=t.length>0&&void 0!==t[0]?t[0]:{})&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"saveDialog",options:r}}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var m=Object.freeze({__proto__:null,open:function(){return l.apply(this,arguments)},save:function(){return h.apply(this,arguments)}});function d(e,r){return y.apply(this,arguments)}function y(){return(y=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Event",message:{cmd:"listen",event:r,handler:o(t)}}).then((function(e){return _asyncToGenerator(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",g(e));case 1:case"end":return r.stop()}}),r)})))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return _.apply(this,arguments)}function _(){return(_=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Event",message:{cmd:"unlisten",eventId:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e,r){return w.apply(this,arguments)}function w(){return(w=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d(r,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e,r){return R.apply(this,arguments)}function R(){return(R=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d(r,(function(e){t(e),g(e.id).catch((function(){}))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,r,t){return x.apply(this,arguments)}function x(){return(x=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c({__tauriModule:"Event",message:{cmd:"emit",event:r,windowLabel:t,payload:n}});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(){return(T=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",k(r,void 0,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var G,P=Object.freeze({__proto__:null,emit:function(e,r){return T.apply(this,arguments)},listen:v,once:b});function O(){return(O=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"readTextFile",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(){return(M=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"readBinaryFile",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(){return(j=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(t=n.length>1&&void 0!==n[1]?n[1]:{})&&Object.freeze(t),"object"===_typeof(r)&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"writeFile",path:r.path,contents:r.contents,options:t}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){e[e.Audio=1]="Audio";e[e.Cache=2]="Cache";e[e.Config=3]="Config";e[e.Data=4]="Data";e[e.LocalData=5]="LocalData";e[e.Desktop=6]="Desktop";e[e.Document=7]="Document";e[e.Download=8]="Download";e[e.Executable=9]="Executable";e[e.Font=10]="Font";e[e.Home=11]="Home";e[e.Picture=12]="Picture";e[e.Public=13]="Public";e[e.Runtime=14]="Runtime";e[e.Template=15]="Template";e[e.Video=16]="Video";e[e.Resource=17]="Resource";e[e.App=18]="App";e[e.Current=19]="Current"}(G||(G={}));var F=65536;function D(e){var r=function(e){if(e.length1&&void 0!==n[1]?n[1]:{})&&Object.freeze(t),"object"===_typeof(r)&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"writeBinaryFile",path:r.path,contents:D(r.contents),options:t}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(){return(C=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"readDir",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(){return(A=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"createDir",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(){return(E=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"removeDir",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(){return(z=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"copyFile",source:r,destination:t,options:n}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(){return(L=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"removeFile",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function W(){return(W=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:r,newPath:t,options:n}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var N=Object.freeze({__proto__:null,get BaseDirectory(){return G},get Dir(){return G},readTextFile:function(e){return O.apply(this,arguments)},readBinaryFile:function(e){return M.apply(this,arguments)},writeFile:function(e){return j.apply(this,arguments)},writeBinaryFile:function(e){return S.apply(this,arguments)},readDir:function(e){return C.apply(this,arguments)},createDir:function(e){return A.apply(this,arguments)},removeDir:function(e){return E.apply(this,arguments)},copyFile:function(e,r){return z.apply(this,arguments)},removeFile:function(e){return L.apply(this,arguments)},renameFile:function(e,r){return W.apply(this,arguments)}});function I(){return(I=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.App}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function H(){return(H=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Audio}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(){return(B=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Cache}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(){return(q=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Config}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(){return(U=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Data}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(){return(V=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Desktop}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(){return(Y=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Document}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function J(){return(J=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Download}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function K(){return(K=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Executable}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(){return(X=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Font}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $(){return($=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Home}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Q(){return(Q=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.LocalData}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(){return(Z=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Picture}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(){return(ee=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Public}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function re(){return(re=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Resource}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function te(){return(te=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Runtime}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(){return(ne=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Template}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oe(){return(oe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Video}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(){return(ae=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Current}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(){return(ue=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:r,directory:t}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ie,ce=Object.freeze({__proto__:null,appDir:function(){return I.apply(this,arguments)},audioDir:function(){return H.apply(this,arguments)},cacheDir:function(){return B.apply(this,arguments)},configDir:function(){return q.apply(this,arguments)},dataDir:function(){return U.apply(this,arguments)},desktopDir:function(){return V.apply(this,arguments)},documentDir:function(){return Y.apply(this,arguments)},downloadDir:function(){return J.apply(this,arguments)},executableDir:function(){return K.apply(this,arguments)},fontDir:function(){return X.apply(this,arguments)},homeDir:function(){return $.apply(this,arguments)},localDataDir:function(){return Q.apply(this,arguments)},pictureDir:function(){return Z.apply(this,arguments)},publicDir:function(){return ee.apply(this,arguments)},resourceDir:function(){return re.apply(this,arguments)},runtimeDir:function(){return te.apply(this,arguments)},templateDir:function(){return ne.apply(this,arguments)},videoDir:function(){return oe.apply(this,arguments)},currentDir:function(){return ae.apply(this,arguments)},resolvePath:function(e,r){return ue.apply(this,arguments)}});function se(e,r){return null!=e?e:r()}function pe(e){for(var r=void 0,t=e[0],n=1;n1&&void 0!==arguments[1]?arguments[1]:{};return _classCallCheck(this,t),n=r.call(this,e),c({__tauriModule:"Window",message:{cmd:"createWebview",options:_objectSpread({label:e},o)}}).then(_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.emit("tauri://created"));case 1:case"end":return e.stop()}}),e)})))).catch(function(){var e=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.emit("tauri://error",r));case 1:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}()),n}return _createClass(t,null,[{key:"getByLabel",value:function(e){return be().some((function(r){return r.label===e}))?new ke(e):null}}]),t}(ke),Te=new(function(){function e(){_classCallCheck(this,e)}var r,t,n,o,a,u,i,s,p,f,l,h,m,d,y,g,_,v,w,b,R;return _createClass(e,[{key:"setResizable",value:(R=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setResizable",resizable:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return R.apply(this,arguments)})},{key:"setTitle",value:(b=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setTitle",title:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return b.apply(this,arguments)})},{key:"maximize",value:(w=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"maximize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return w.apply(this,arguments)})},{key:"unmaximize",value:(v=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"unmaximize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return v.apply(this,arguments)})},{key:"minimize",value:(_=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"minimize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return _.apply(this,arguments)})},{key:"unminimize",value:(g=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"unminimize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return g.apply(this,arguments)})},{key:"show",value:(y=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"show"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return y.apply(this,arguments)})},{key:"hide",value:(d=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"hide"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return d.apply(this,arguments)})},{key:"close",value:(m=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"close"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return m.apply(this,arguments)})},{key:"setDecorations",value:(h=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setDecorations",decorations:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return h.apply(this,arguments)})},{key:"setAlwaysOnTop",value:(l=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setAlwaysOnTop",alwaysOnTop:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)})},{key:"setWidth",value:(f=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setWidth",width:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)})},{key:"setHeight",value:(p=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setHeight",height:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return p.apply(this,arguments)})},{key:"resize",value:(s=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"resize",width:r,height:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return s.apply(this,arguments)})},{key:"setMinSize",value:(i=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setMinSize",minWidth:r,minHeight:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return i.apply(this,arguments)})},{key:"setMaxSize",value:(u=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setMaxSize",maxWidth:r,maxHeight:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return u.apply(this,arguments)})},{key:"setX",value:(a=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setX",x:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"setY",value:(o=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setY",y:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"setPosition",value:(n=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setPosition",x:r,y:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return n.apply(this,arguments)})},{key:"setFullscreen",value:(t=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setFullscreen",fullscreen:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"setIcon",value:(r=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setIcon",icon:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})}]),e}()),Ge=Object.freeze({__proto__:null,WebviewWindow:xe,getCurrent:function(){return new ke(window.__TAURI__.__currentWindow.label)},getAll:be,appWindow:Te});function Pe(){return(Pe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("default"===window.Notification.permission){e.next=2;break}return e.abrupt("return",Promise.resolve("granted"===window.Notification.permission));case 2:return e.abrupt("return",c({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oe(){return(Oe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",window.Notification.requestPermission());case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Me=Object.freeze({__proto__:null,sendNotification:function(e){"string"==typeof e?new window.Notification(e):new window.Notification(e.title,e)},requestPermission:function(){return Oe.apply(this,arguments)},isPermissionGranted:function(){return Pe.apply(this,arguments)}});function je(){return(je=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:r,handler:o(t)}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fe(){return(Fe=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:r,handler:o(t)}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function De(){return(De=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Se(){return(Se=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ce(){return(Ce=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ae=Object.freeze({__proto__:null,register:function(e,r){return je.apply(this,arguments)},registerAll:function(e,r){return Fe.apply(this,arguments)},isRegistered:function(e){return De.apply(this,arguments)},unregister:function(e){return Se.apply(this,arguments)},unregisterAll:function(){return Ce.apply(this,arguments)}});e.cli=f,e.dialog=m,e.event=P,e.fs=N,e.globalShortcut=Ae,e.http=ge,e.notification=Me,e.path=ce,e.shell=we,e.tauri=i,e.window=Ge,Object.defineProperty(e,"__esModule",{value:!0})})); +function _inherits(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&_setPrototypeOf(e,r)}function _setPrototypeOf(e,r){return(_setPrototypeOf=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e})(e,r)}function _createSuper(e){var r=_isNativeReflectConstruct();return function(){var t,n=_getPrototypeOf(e);if(r){var a=_getPrototypeOf(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return _possibleConstructorReturn(this,t)}}function _possibleConstructorReturn(e,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?_assertThisInitialized(e):r}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _createForOfIteratorHelper(e,r){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=_unsupportedIterableToArray(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,i=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return u=e.done,e},e:function(e){i=!0,o=e},f:function(){try{u||null==t.return||t.return()}finally{if(i)throw o}}}}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t=0;--o){var u=this.tryEntries[o],i=u.completion;if("root"===u.tryLoc)return a("end");if(u.tryLoc<=this.prev){var c=n.call(u,"catchLoc"),s=n.call(u,"finallyLoc");if(c&&s){if(this.prev=0;--t){var a=this.tryEntries[t];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--r){var t=this.tryEntries[r];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),P(t),d}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.tryLoc===e){var n=t.completion;if("throw"===n.type){var a=n.arg;P(t)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),d}},e}("object"===("undefined"==typeof module?"undefined":_typeof(module))?module.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}function t(e){for(var r=void 0,t=e[0],n=1;n1&&void 0!==arguments[1]&&arguments[1],a=n();return Object.defineProperty(window,a,{value:function(n){return r&&Reflect.deleteProperty(window,a),t([e,"optionalCall",function(e){return e(n)}])},writable:!1,configurable:!0}),a}function o(e){return u.apply(this,arguments)}function u(){return(u=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",new Promise((function(e,n){var o=a((function(r){e(r),Reflect.deleteProperty(window,u)}),!0),u=a((function(e){n(e),Reflect.deleteProperty(window,o)}),!0);window.rpc.notify(r,_objectSpread({callback:o,error:u},t))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var i=Object.freeze({__proto__:null,transformCallback:a,invoke:o});function c(e){return s.apply(this,arguments)}function s(){return(s=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o("tauri",r));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(){return(p=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Cli",message:{cmd:"cliMatches"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var l=Object.freeze({__proto__:null,getMatches:function(){return p.apply(this,arguments)}});function f(){return(f=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r,t=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(r=t.length>0&&void 0!==t[0]?t[0]:{})&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"openDialog",options:r}}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(){return(h=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r,t=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(r=t.length>0&&void 0!==t[0]?t[0]:{})&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"saveDialog",options:r}}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var m=Object.freeze({__proto__:null,open:function(){return f.apply(this,arguments)},save:function(){return h.apply(this,arguments)}});function d(e,r){return y.apply(this,arguments)}function y(){return(y=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Event",message:{cmd:"listen",event:r,handler:a(t)}}).then((function(e){return _asyncToGenerator(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",_(e));case 1:case"end":return r.stop()}}),r)})))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return g.apply(this,arguments)}function g(){return(g=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Event",message:{cmd:"unlisten",eventId:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e,r){return w.apply(this,arguments)}function w(){return(w=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d(r,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e,r){return R.apply(this,arguments)}function R(){return(R=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d(r,(function(e){t(e),_(e.id).catch((function(){}))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,r,t){return x.apply(this,arguments)}function x(){return(x=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c({__tauriModule:"Event",message:{cmd:"emit",event:r,windowLabel:t,payload:n}});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(){return(T=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",k(r,void 0,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var G,P=Object.freeze({__proto__:null,emit:function(e,r){return T.apply(this,arguments)},listen:v,once:b});function M(){return(M=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"readTextFile",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(){return(O=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"readBinaryFile",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(){return(j=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(t=n.length>1&&void 0!==n[1]?n[1]:{})&&Object.freeze(t),"object"===_typeof(r)&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"writeFile",path:r.path,contents:r.contents,options:t}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){e[e.Audio=1]="Audio";e[e.Cache=2]="Cache";e[e.Config=3]="Config";e[e.Data=4]="Data";e[e.LocalData=5]="LocalData";e[e.Desktop=6]="Desktop";e[e.Document=7]="Document";e[e.Download=8]="Download";e[e.Executable=9]="Executable";e[e.Font=10]="Font";e[e.Home=11]="Home";e[e.Picture=12]="Picture";e[e.Public=13]="Public";e[e.Runtime=14]="Runtime";e[e.Template=15]="Template";e[e.Video=16]="Video";e[e.Resource=17]="Resource";e[e.App=18]="App";e[e.Current=19]="Current"}(G||(G={}));var C=65536;function F(e){var r=function(e){if(e.length1&&void 0!==n[1]?n[1]:{})&&Object.freeze(t),"object"===_typeof(r)&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"writeBinaryFile",path:r.path,contents:F(r.contents),options:t}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function D(){return(D=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"readDir",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(){return(E=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"createDir",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(){return(L=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"removeDir",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(){return(A=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>2&&void 0!==a[2]?a[2]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"copyFile",source:r,destination:t,options:n}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(){return(z=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"removeFile",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function W(){return(W=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>2&&void 0!==a[2]?a[2]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:r,newPath:t,options:n}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var I=Object.freeze({__proto__:null,get BaseDirectory(){return G},get Dir(){return G},readTextFile:function(e){return M.apply(this,arguments)},readBinaryFile:function(e){return O.apply(this,arguments)},writeFile:function(e){return j.apply(this,arguments)},writeBinaryFile:function(e){return S.apply(this,arguments)},readDir:function(e){return D.apply(this,arguments)},createDir:function(e){return E.apply(this,arguments)},removeDir:function(e){return L.apply(this,arguments)},copyFile:function(e,r){return A.apply(this,arguments)},removeFile:function(e){return z.apply(this,arguments)},renameFile:function(e,r){return W.apply(this,arguments)}});function N(){return(N=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.App}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function H(){return(H=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Audio}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(){return(B=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Cache}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(){return(q=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Config}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(){return(U=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Data}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(){return(V=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Desktop}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(){return(Y=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Document}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function J(){return(J=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Download}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function K(){return(K=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Executable}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(){return(X=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Font}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $(){return($=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Home}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Q(){return(Q=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.LocalData}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(){return(Z=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Picture}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(){return(ee=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Public}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function re(){return(re=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Resource}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function te(){return(te=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Runtime}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(){return(ne=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Template}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(){return(ae=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Video}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oe(){return(oe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:G.Current}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(){return(ue=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:r,directory:t}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ie,ce=Object.freeze({__proto__:null,appDir:function(){return N.apply(this,arguments)},audioDir:function(){return H.apply(this,arguments)},cacheDir:function(){return B.apply(this,arguments)},configDir:function(){return q.apply(this,arguments)},dataDir:function(){return U.apply(this,arguments)},desktopDir:function(){return V.apply(this,arguments)},documentDir:function(){return Y.apply(this,arguments)},downloadDir:function(){return J.apply(this,arguments)},executableDir:function(){return K.apply(this,arguments)},fontDir:function(){return X.apply(this,arguments)},homeDir:function(){return $.apply(this,arguments)},localDataDir:function(){return Q.apply(this,arguments)},pictureDir:function(){return Z.apply(this,arguments)},publicDir:function(){return ee.apply(this,arguments)},resourceDir:function(){return re.apply(this,arguments)},runtimeDir:function(){return te.apply(this,arguments)},templateDir:function(){return ne.apply(this,arguments)},videoDir:function(){return ae.apply(this,arguments)},currentDir:function(){return oe.apply(this,arguments)},resolvePath:function(e,r){return ue.apply(this,arguments)}});function se(e,r){return null!=e?e:r()}function pe(e){for(var r=void 0,t=e[0],n=1;n1&&void 0!==arguments[1]?arguments[1]:[];return _classCallCheck(this,a),r=n.call(this),a.prototype.__init2.call(_assertThisInitialized(r)),a.prototype.__init3.call(_assertThisInitialized(r)),a.prototype.__init4.call(_assertThisInitialized(r)),a.prototype.__init5.call(_assertThisInitialized(r)),r.program=e,r.args="string"==typeof t?[t]:t,r}return _createClass(a,[{key:"__init2",value:function(){this.sidecar=!1}},{key:"__init3",value:function(){this.stdout=new we}},{key:"__init4",value:function(){this.stderr=new we}},{key:"__init5",value:function(){this.pid=null}},{key:"spawn",value:(t=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ge(this.program,this.sidecar,(function(e){switch(e.event){case"Error":r._emit("error",e.payload);break;case"Terminated":r._emit("close",e.payload);break;case"Stdout":r.stdout._emit("data",e.payload);break;case"Stderr":r.stderr._emit("data",e.payload)}}),this.args).then((function(e){return new be(e)})));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"execute",value:(r=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,t){r.on("error",t);var n=[],a=[];r.stdout.on("data",(function(e){n.push(e)})),r.stderr.on("data",(function(e){a.push(e)})),r.on("close",(function(r){e({code:r.code,signal:r.signal,stdout:n.join("\n"),stderr:a.join("\n")})})),r.spawn().catch(t)})));case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})}],[{key:"sidecar",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=new a(e,r);return t.sidecar=!0,t}}]),a}(we);function ke(){return(ke=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Shell",message:{cmd:"open",path:r,with:t}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var xe=Object.freeze({__proto__:null,Command:Re,Child:be,open:function(e,r){return ke.apply(this,arguments)}});function Te(){return window.__TAURI__.__windows}var Ge=["tauri://created","tauri://error"],Pe=function(){function e(r){_classCallCheck(this,e),this.label=r,this.listeners={}}var r,t,n;return _createClass(e,[{key:"listen",value:(n=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._handleTauriEvent(r,t)){e.next=2;break}return e.abrupt("return",Promise.resolve((function(){var e=n.listeners[r];e.splice(e.indexOf(t),1)})));case 2:return e.abrupt("return",v(r,t));case 3:case"end":return e.stop()}}),e,this)}))),function(e,r){return n.apply(this,arguments)})},{key:"once",value:(t=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._handleTauriEvent(r,t)){e.next=2;break}return e.abrupt("return",Promise.resolve((function(){var e=n.listeners[r];e.splice(e.indexOf(t),1)})));case 2:return e.abrupt("return",b(r,t));case 3:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})},{key:"emit",value:(r=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Ge.includes(r)){e.next=4;break}n=_createForOfIteratorHelper(this.listeners[r]||[]);try{for(n.s();!(a=n.n()).done;)(0,a.value)({event:r,id:-1,payload:t})}catch(e){n.e(e)}finally{n.f()}return e.abrupt("return",Promise.resolve());case 4:return e.abrupt("return",k(r,this.label,t));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"_handleTauriEvent",value:function(e,r){return!!Ge.includes(e)&&(e in this.listeners?this.listeners[e].push(r):this.listeners[e]=[r],!0)}}]),e}(),Me=function(e){_inherits(t,e);var r=_createSuper(t);function t(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _classCallCheck(this,t),n=r.call(this,e),c({__tauriModule:"Window",message:{cmd:"createWebview",options:_objectSpread({label:e},a)}}).then(_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.emit("tauri://created"));case 1:case"end":return e.stop()}}),e)})))).catch(function(){var e=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.emit("tauri://error",r));case 1:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}()),n}return _createClass(t,null,[{key:"getByLabel",value:function(e){return Te().some((function(r){return r.label===e}))?new Pe(e):null}}]),t}(Pe),Oe=new(function(){function e(){_classCallCheck(this,e)}var r,t,n,a,o,u,i,s,p,l,f,h,m,d,y,_,g,v,w,b,R;return _createClass(e,[{key:"setResizable",value:(R=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setResizable",resizable:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return R.apply(this,arguments)})},{key:"setTitle",value:(b=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setTitle",title:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return b.apply(this,arguments)})},{key:"maximize",value:(w=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"maximize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return w.apply(this,arguments)})},{key:"unmaximize",value:(v=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"unmaximize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return v.apply(this,arguments)})},{key:"minimize",value:(g=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"minimize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return g.apply(this,arguments)})},{key:"unminimize",value:(_=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"unminimize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return _.apply(this,arguments)})},{key:"show",value:(y=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"show"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return y.apply(this,arguments)})},{key:"hide",value:(d=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"hide"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return d.apply(this,arguments)})},{key:"close",value:(m=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"close"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return m.apply(this,arguments)})},{key:"setDecorations",value:(h=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setDecorations",decorations:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return h.apply(this,arguments)})},{key:"setAlwaysOnTop",value:(f=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setAlwaysOnTop",alwaysOnTop:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)})},{key:"setWidth",value:(l=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setWidth",width:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)})},{key:"setHeight",value:(p=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setHeight",height:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return p.apply(this,arguments)})},{key:"resize",value:(s=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"resize",width:r,height:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return s.apply(this,arguments)})},{key:"setMinSize",value:(i=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setMinSize",minWidth:r,minHeight:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return i.apply(this,arguments)})},{key:"setMaxSize",value:(u=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setMaxSize",maxWidth:r,maxHeight:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return u.apply(this,arguments)})},{key:"setX",value:(o=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setX",x:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"setY",value:(a=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setY",y:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"setPosition",value:(n=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setPosition",x:r,y:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return n.apply(this,arguments)})},{key:"setFullscreen",value:(t=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setFullscreen",fullscreen:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"setIcon",value:(r=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setIcon",icon:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})}]),e}()),je=Object.freeze({__proto__:null,WebviewWindow:Me,getCurrent:function(){return new Pe(window.__TAURI__.__currentWindow.label)},getAll:Te,appWindow:Oe});function Ce(){return(Ce=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("default"===window.Notification.permission){e.next=2;break}return e.abrupt("return",Promise.resolve("granted"===window.Notification.permission));case 2:return e.abrupt("return",c({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fe(){return(Fe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",window.Notification.requestPermission());case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Se=Object.freeze({__proto__:null,sendNotification:function(e){"string"==typeof e?new window.Notification(e):new window.Notification(e.title,e)},requestPermission:function(){return Fe.apply(this,arguments)},isPermissionGranted:function(){return Ce.apply(this,arguments)}});function De(){return(De=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:r,handler:a(t)}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ee(){return(Ee=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:r,handler:a(t)}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Le(){return(Le=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ae(){return(Ae=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ze(){return(ze=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var We=Object.freeze({__proto__:null,register:function(e,r){return De.apply(this,arguments)},registerAll:function(e,r){return Ee.apply(this,arguments)},isRegistered:function(e){return Le.apply(this,arguments)},unregister:function(e){return Ae.apply(this,arguments)},unregisterAll:function(){return ze.apply(this,arguments)}});e.cli=l,e.dialog=m,e.event=P,e.fs=I,e.globalShortcut=We,e.http=_e,e.notification=Se,e.path=ce,e.shell=xe,e.tauri=i,e.window=je,Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/tauri/src/app/utils.rs b/tauri/src/app/utils.rs index 300db29b3..757cec38a 100644 --- a/tauri/src/app/utils.rs +++ b/tauri/src/app/utils.rs @@ -43,20 +43,6 @@ pub(super) fn get_url(context: &Context) -> String { format!("tauri://{}", context.config.tauri.bundle.identifier) } -// spawn an updater process. -#[cfg(feature = "updater")] -#[allow(dead_code)] -pub(super) fn spawn_updater() { - std::thread::spawn(|| { - tauri_api::command::spawn_relative_command( - "updater".to_string(), - Vec::new(), - std::process::Stdio::inherit(), - ) - .expect("Unable to spawn relative command"); - }); -} - pub(super) fn initialization_script( plugin_initialization_script: &str, with_global_tauri: bool, @@ -230,7 +216,6 @@ pub(super) fn build_webview( .canonicalize() .or_else(|_| Err(crate::Error::AssetNotFound(path.clone()))) .and_then(|pathbuf| { - if pathbuf.is_file() && pathbuf.starts_with(&dist_dir) { match std::fs::read(pathbuf) { Ok(asset) => return Ok(asset), @@ -242,7 +227,6 @@ pub(super) fn build_webview( } Err(crate::Error::AssetNotFound(path)) - }) }) } diff --git a/tauri/src/async_runtime.rs b/tauri/src/async_runtime.rs deleted file mode 100644 index 34de69f98..000000000 --- a/tauri/src/async_runtime.rs +++ /dev/null @@ -1,21 +0,0 @@ -use once_cell::sync::OnceCell; -use tokio::runtime::Runtime; -pub use tokio::sync::Mutex; - -use std::future::Future; - -static RUNTIME: OnceCell = OnceCell::new(); - -pub fn block_on(task: F) -> F::Output { - let runtime = RUNTIME.get_or_init(|| Runtime::new().unwrap()); - runtime.block_on(task) -} - -pub fn spawn(task: F) -where - F: Future + Send + 'static, - F::Output: Send + 'static, -{ - let runtime = RUNTIME.get_or_init(|| Runtime::new().unwrap()); - runtime.spawn(task); -} diff --git a/tauri/src/endpoints.rs b/tauri/src/endpoints.rs index 9b0fce942..9978dcc3d 100644 --- a/tauri/src/endpoints.rs +++ b/tauri/src/endpoints.rs @@ -60,8 +60,12 @@ impl Module { .and_then(|r| r.json) .map_err(|e| e.to_string()) }), - Self::Shell(cmd) => message - .respond_async(async move { cmd.run().and_then(|r| r.json).map_err(|e| e.to_string()) }), + Self::Shell(cmd) => message.respond_async(async move { + cmd + .run(webview_manager) + .and_then(|r| r.json) + .map_err(|e| e.to_string()) + }), Self::Event(cmd) => message.respond_async(async move { cmd .run(&webview_manager) diff --git a/tauri/src/endpoints/shell.rs b/tauri/src/endpoints/shell.rs index 5273353b5..f8ae32e2b 100644 --- a/tauri/src/endpoints/shell.rs +++ b/tauri/src/endpoints/shell.rs @@ -1,14 +1,54 @@ use super::InvokeResponse; +use crate::{ + api::{ + command::{Command, CommandChild, CommandEvent}, + rpc::format_callback, + }, + app::ApplicationExt, +}; + +use once_cell::sync::Lazy; use serde::Deserialize; +use std::{ + collections::HashMap, + sync::{Arc, Mutex}, +}; + +type ChildId = u32; +type ChildStore = Arc>>; + +fn command_childs() -> &'static ChildStore { + static STORE: Lazy = Lazy::new(Default::default); + &STORE +} + +#[derive(Deserialize)] +#[serde(untagged)] +pub enum Buffer { + Text(String), + Raw(Vec), +} + /// The API descriptor. #[derive(Deserialize)] #[serde(tag = "cmd", rename_all = "camelCase")] pub enum Cmd { /// The execute script API. + #[serde(rename_all = "camelCase")] Execute { - command: String, + program: String, args: Vec, + on_event_fn: String, + #[serde(default)] + sidecar: bool, + }, + StdinWrite { + pid: ChildId, + buffer: Buffer, + }, + KillChild { + pid: ChildId, }, Open { path: String, @@ -17,15 +57,71 @@ pub enum Cmd { } impl Cmd { - pub fn run(self) -> crate::Result { + pub fn run( + self, + webview_manager: crate::WebviewManager, + ) -> crate::Result { match self { Self::Execute { - command: _, - args: _, + program, + args, + on_event_fn, + sidecar, } => { #[cfg(shell_execute)] { - //TODO + let mut command = if sidecar { + Command::new_sidecar(program) + } else { + Command::new(program) + }; + command = command.args(args); + let (mut rx, child) = command.spawn()?; + + let pid = child.pid(); + command_childs().lock().unwrap().insert(pid, child); + + crate::async_runtime::spawn(async move { + while let Some(event) = rx.recv().await { + if matches!(event, CommandEvent::Terminated(_)) { + command_childs().lock().unwrap().remove(&pid); + } + let js = format_callback(on_event_fn.clone(), serde_json::to_value(event).unwrap()); + if let Ok(dispatcher) = webview_manager.current_webview() { + let _ = dispatcher.eval(js.as_str()); + } + } + }); + + Ok(pid.into()) + } + #[cfg(not(shell_execute))] + Err(crate::Error::ApiNotAllowlisted( + "shell > execute".to_string(), + )) + } + Self::KillChild { pid } => { + #[cfg(shell_execute)] + { + if let Some(child) = command_childs().lock().unwrap().remove(&pid) { + child.kill()?; + } + Ok(().into()) + } + #[cfg(not(shell_execute))] + Err(crate::Error::ApiNotAllowlisted( + "shell > execute".to_string(), + )) + } + Self::StdinWrite { pid, buffer } => { + #[cfg(shell_execute)] + { + if let Some(child) = command_childs().lock().unwrap().get_mut(&pid) { + match buffer { + Buffer::Text(t) => child.write(t.as_bytes())?, + Buffer::Raw(r) => child.write(&r)?, + } + } Ok(().into()) } #[cfg(not(shell_execute))] diff --git a/tauri/src/lib.rs b/tauri/src/lib.rs index 9b5d04d90..3961dc66f 100644 --- a/tauri/src/lib.rs +++ b/tauri/src/lib.rs @@ -25,13 +25,12 @@ pub use error::Error; /// Tauri result type. pub type Result = std::result::Result; -pub(crate) mod async_runtime; - /// A task to run on the main thread. pub type SyncTask = Box; pub use app::*; pub use tauri_api as api; +pub(crate) use tauri_api::private::async_runtime; pub use tauri_macros::*; /// The Tauri webview implementations.