index.f1ec7caa.js 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. var Fo=Object.defineProperty,Ro=Object.defineProperties;var Uo=Object.getOwnPropertyDescriptors;var Ui=Object.getOwnPropertySymbols;var Io=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable;var Ii=(e,t,n)=>t in e?Fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ni=(e,t)=>{for(var n in t||(t={}))Io.call(t,n)&&Ii(e,n,t[n]);if(Ui)for(var n of Ui(t))No.call(t,n)&&Ii(e,n,t[n]);return e},qi=(e,t)=>Ro(e,Uo(t));import{S as J,i as K,s as Y,e as s,a as g,t as z,b as a,c as O,d as r,l as T,f as H,n as U,g as W,r as Z,o as he,h as Wn,j as A,p as Ke,k as Ye,m as qo,q as Hi,u as ct,v as Xe,w as Bi,x as V,y as Ho,z as Gi,A as $i,B as Vi,C as Ji,D as Bo,E as Ki,F as Yi,H as Go,G as $o,I as Vo}from"./vendor.a59520a9.js";const Jo=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerpolicy&&(l.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?l.credentials="include":o.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}};Jo();/*! *****************************************************************************
  2. Copyright (c) Microsoft Corporation.
  3. Permission to use, copy, modify, and/or distribute this software for any
  4. purpose with or without fee is hereby granted.
  5. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  6. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  7. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  8. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  9. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  10. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  11. PERFORMANCE OF THIS SOFTWARE.
  12. ***************************************************************************** */var Xi=function(e,t){return(Xi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])})(e,t)};function Ln(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Xi(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var dt=function(){return(dt=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function b(e,t,n,i){return new(n||(n=Promise))(function(o,l){function u(f){try{p(i.next(f))}catch(d){l(d)}}function c(f){try{p(i.throw(f))}catch(d){l(d)}}function p(f){var d;f.done?o(f.value):(d=f.value,d instanceof n?d:new n(function(_){_(d)})).then(u,c)}p((i=i.apply(e,t||[])).next())})}function y(e,t){var n,i,o,l,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(p){return function(f){return function(d){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,i&&(o=2&d[0]?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[2&d[0],o.value]),d[0]){case 0:case 1:o=d;break;case 4:return u.label++,{value:d[1],done:!1};case 5:u.label++,i=d[1],d=[0];continue;case 7:d=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!((o=o.length>0&&o[o.length-1])||d[0]!==6&&d[0]!==2)){u=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){u.label=d[1];break}if(d[0]===6&&u.label<o[1]){u.label=o[1],o=d;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(d);break}o[2]&&u.ops.pop(),u.trys.pop();continue}d=t.call(e,u)}catch(_){d=[6,_],i=0}finally{n=o=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([p,f])}}}function Lt(e,t){t===void 0&&(t=!1);var n=function(){var i=new Int8Array(1);window.crypto.getRandomValues(i);var o=new Uint8Array(Math.max(16,Math.abs(i[0])));return window.crypto.getRandomValues(o),o.join("")}();return Object.defineProperty(window,n,{value:function(i){return t&&Reflect.deleteProperty(window,n),e==null?void 0:e(i)},writable:!1,configurable:!0}),n}function me(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return[2,new Promise(function(i,o){var l=Lt(function(c){i(c),Reflect.deleteProperty(window,u)},!0),u=Lt(function(c){o(c),Reflect.deleteProperty(window,l)},!0);window.__TAURI_POST_MESSAGE__(e,dt({__invokeKey:__TAURI_INVOKE_KEY__,callback:l,error:u},t))})]})})}function Qi(e){return navigator.userAgent.includes("Windows")?"https://asset.localhost/".concat(e):"asset://".concat(e)}Object.freeze({__proto__:null,transformCallback:Lt,invoke:me,convertFileSrc:Qi});function k(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,me("tauri",e)]})})}function Ko(e,t,n,i){return b(this,void 0,void 0,function(){return y(this,function(o){return typeof n=="object"&&Object.freeze(n),[2,k({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:typeof n=="string"?[n]:n,options:i,onEventFn:Lt(e)}})]})})}var En=function(){function e(){this.eventListeners=Object.create(null)}return e.prototype.addEventListener=function(t,n){t in this.eventListeners?this.eventListeners[t].push(n):this.eventListeners[t]=[n]},e.prototype._emit=function(t,n){if(t in this.eventListeners)for(var i=0,o=this.eventListeners[t];i<o.length;i++)(0,o[i])(n)},e.prototype.on=function(t,n){return this.addEventListener(t,n),this},e}(),Zi=function(){function e(t){this.pid=t}return e.prototype.write=function(t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:t}})]})})},e.prototype.kill=function(){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})]})})},e}(),xi=function(e){function t(n,i,o){i===void 0&&(i=[]);var l=e.call(this)||this;return l.stdout=new En,l.stderr=new En,l.program=n,l.args=typeof i=="string"?[i]:i,l.options=o!=null?o:{},l}return Ln(t,e),t.sidecar=function(n,i,o){i===void 0&&(i=[]);var l=new t(n,i,o);return l.options.sidecar=!0,l},t.prototype.spawn=function(){return b(this,void 0,void 0,function(){var n=this;return y(this,function(i){return[2,Ko(function(o){switch(o.event){case"Error":n._emit("error",o.payload);break;case"Terminated":n._emit("close",o.payload);break;case"Stdout":n.stdout._emit("data",o.payload);break;case"Stderr":n.stderr._emit("data",o.payload)}},this.program,this.args,this.options).then(function(o){return new Zi(o)})]})})},t.prototype.execute=function(){return b(this,void 0,void 0,function(){var n=this;return y(this,function(i){return[2,new Promise(function(o,l){n.on("error",l);var u=[],c=[];n.stdout.on("data",function(p){u.push(p)}),n.stderr.on("data",function(p){c.push(p)}),n.on("close",function(p){o({code:p.code,signal:p.signal,stdout:u.join(`
  13. `),stderr:c.join(`
  14. `)})}),n.spawn().catch(l)})]})})},t}(En);function An(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})]})})}Object.freeze({__proto__:null,Command:xi,Child:Zi,open:An});function to(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"App",message:{cmd:"getAppVersion"}})]})})}function eo(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"App",message:{cmd:"getAppName"}})]})})}function no(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"App",message:{cmd:"getTauriVersion"}})]})})}Object.freeze({__proto__:null,getName:eo,getVersion:to,getTauriVersion:no});function io(e){return e===void 0&&(e=0),b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})]})})}function Dn(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"Process",message:{cmd:"relaunch"}})]})})}Object.freeze({__proto__:null,exit:io,relaunch:Dn});function Yo(e){let t,n,i,o,l,u,c,p,f,d,_,m,h,v,C,w,P,S,D,R,j;return{c(){t=s("h1"),t.textContent="Welcome",n=g(),i=s("p"),i.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.",o=g(),l=s("p"),u=z("Current App version: "),c=z(e[0]),p=g(),f=s("p"),d=z("Current Tauri version: "),_=z(e[1]),m=g(),h=s("p"),v=z("Current App name: "),C=z(e[2]),w=g(),P=s("button"),P.textContent="Close application",S=g(),D=s("button"),D.textContent="Relaunch application",a(P,"class","button"),a(D,"class","button")},m(L,I){O(L,t,I),O(L,n,I),O(L,i,I),O(L,o,I),O(L,l,I),r(l,u),r(l,c),O(L,p,I),O(L,f,I),r(f,d),r(f,_),O(L,m,I),O(L,h,I),r(h,v),r(h,C),O(L,w,I),O(L,P,I),O(L,S,I),O(L,D,I),R||(j=[T(P,"click",e[3]),T(D,"click",e[4])],R=!0)},p(L,[I]){I&1&&H(c,L[0]),I&2&&H(_,L[1]),I&4&&H(C,L[2])},i:U,o:U,d(L){L&&W(t),L&&W(n),L&&W(i),L&&W(o),L&&W(l),L&&W(p),L&&W(f),L&&W(m),L&&W(h),L&&W(w),L&&W(P),L&&W(S),L&&W(D),R=!1,Z(j)}}}function Xo(e,t,n){let i=0,o=0,l="Unknown";eo().then(p=>{n(2,l=p)}),to().then(p=>{n(0,i=p)}),no().then(p=>{n(1,o=p)});async function u(){await io()}async function c(){await Dn()}return[i,o,l,u,c]}class Qo extends J{constructor(t){super();K(this,t,Xo,Yo,Y,{})}}function oo(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"Cli",message:{cmd:"cliMatches"}})]})})}Object.freeze({__proto__:null,getMatches:oo});function Zo(e){let t,n,i,o,l,u,c,p,f,d,_;return{c(){t=s("div"),n=z(`This binary can be run on the terminal and takes the following arguments:
  15. `),i=s("ul"),i.innerHTML=`<li>--config PATH</li>
  16. <li>--theme light|dark|system</li>
  17. <li>--verbose</li>`,o=z(`
  18. Additionally, it has a `),l=s("i"),l.textContent="update --background",u=z(` subcommand.
  19. Note that the arguments are only parsed, not implemented.
  20. `),c=s("br"),p=g(),f=s("button"),f.textContent="Get matches",a(f,"class","button"),a(f,"id","cli-matches")},m(m,h){O(m,t,h),r(t,n),r(t,i),r(t,o),r(t,l),r(t,u),r(t,c),r(t,p),r(t,f),d||(_=T(f,"click",e[0]),d=!0)},p:U,i:U,o:U,d(m){m&&W(t),d=!1,_()}}}function xo(e,t,n){let{onMessage:i}=t;function o(){oo().then(i).catch(i)}return e.$$set=l=>{"onMessage"in l&&n(1,i=l.onMessage)},[o,i]}class tr extends J{constructor(t){super();K(this,t,xo,Zo,Y,{onMessage:1})}}function ro(e,t,n){return b(this,void 0,void 0,function(){return y(this,function(i){switch(i.label){case 0:return[4,k({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})];case 1:return i.sent(),[2]}})})}function lo(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Event",message:{cmd:"unlisten",eventId:e}})]})})}function Et(e,t){return b(this,void 0,void 0,function(){var n=this;return y(this,function(i){return[2,k({__tauriModule:"Event",message:{cmd:"listen",event:e,handler:Lt(t)}}).then(function(o){return function(){return b(n,void 0,void 0,function(){return y(this,function(l){return[2,lo(o)]})})}})]})})}function jn(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,Et(e,function(i){t(i),lo(i.id).catch(function(){})})]})})}function Qe(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,ro(e,void 0,t)]})})}Object.freeze({__proto__:null,listen:Et,once:jn,emit:Qe});function er(e){let t,n,i,o,l,u,c,p;return{c(){t=s("div"),n=s("button"),n.textContent="Call Log API",i=g(),o=s("button"),o.textContent="Call Request (async) API",l=g(),u=s("button"),u.textContent="Send event to Rust",a(n,"class","button"),a(n,"id","log"),a(o,"class","button"),a(o,"id","request"),a(u,"class","button"),a(u,"id","event")},m(f,d){O(f,t,d),r(t,n),r(t,i),r(t,o),r(t,l),r(t,u),c||(p=[T(n,"click",e[0]),T(o,"click",e[1]),T(u,"click",e[2])],c=!0)},p:U,i:U,o:U,d(f){f&&W(t),c=!1,Z(p)}}}function nr(e,t,n){let{onMessage:i}=t,o;he(async()=>{o=await Et("rust-event",i)}),Wn(()=>{o&&o()});function l(){me("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){me("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function c(){Qe("js-event","this is the payload string")}return e.$$set=p=>{"onMessage"in p&&n(3,i=p.onMessage)},[l,u,c,i]}class ir extends J{constructor(t){super();K(this,t,nr,er,Y,{onMessage:3})}}function Fn(e){return e===void 0&&(e={}),b(this,void 0,void 0,function(){return y(this,function(t){return typeof e=="object"&&Object.freeze(e),[2,k({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})]})})}function so(e){return e===void 0&&(e={}),b(this,void 0,void 0,function(){return y(this,function(t){return typeof e=="object"&&Object.freeze(e),[2,k({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})]})})}function or(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e}})]})})}function rr(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Dialog",message:{cmd:"askDialog",title:t,message:e}})]})})}function lr(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Dialog",message:{cmd:"confirmDialog",title:t,message:e}})]})})}Object.freeze({__proto__:null,open:Fn,save:so,message:or,ask:rr,confirm:lr});var $t;function sr(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})]})})}function Rn(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Fs",message:{cmd:"readBinaryFile",path:e,options:t}})]})})}function ur(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return typeof t=="object"&&Object.freeze(t),typeof e=="object"&&Object.freeze(e),[2,k({__tauriModule:"Fs",message:{cmd:"writeFile",path:e.path,contents:e.contents,options:t}})]})})}(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",e[e.Log=20]="Log"})($t||($t={}));function ar(e){var t=function(n){if(n.length<65536)return String.fromCharCode.apply(null,Array.from(n));for(var i="",o=n.length,l=0;l<o;l++){var u=n.subarray(65536*l,65536*(l+1));i+=String.fromCharCode.apply(null,Array.from(u))}return i}(new Uint8Array(e));return btoa(t)}function cr(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return typeof t=="object"&&Object.freeze(t),typeof e=="object"&&Object.freeze(e),[2,k({__tauriModule:"Fs",message:{cmd:"writeBinaryFile",path:e.path,contents:ar(e.contents),options:t}})]})})}function uo(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Fs",message:{cmd:"readDir",path:e,options:t}})]})})}function dr(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Fs",message:{cmd:"createDir",path:e,options:t}})]})})}function fr(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Fs",message:{cmd:"removeDir",path:e,options:t}})]})})}function pr(e,t,n){return n===void 0&&(n={}),b(this,void 0,void 0,function(){return y(this,function(i){return[2,k({__tauriModule:"Fs",message:{cmd:"copyFile",source:e,destination:t,options:n}})]})})}function hr(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Fs",message:{cmd:"removeFile",path:e,options:t}})]})})}function mr(e,t,n){return n===void 0&&(n={}),b(this,void 0,void 0,function(){return y(this,function(i){return[2,k({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:e,newPath:t,options:n}})]})})}Object.freeze({__proto__:null,get BaseDirectory(){return $t},get Dir(){return $t},readTextFile:sr,readBinaryFile:Rn,writeFile:ur,writeBinaryFile:cr,readDir:uo,createDir:dr,removeDir:fr,copyFile:pr,removeFile:hr,renameFile:mr});function vr(e){let t,n,i,o,l,u,c,p,f,d,_,m,h,v,C,w,P,S,D,R;return{c(){t=s("div"),n=s("input"),i=g(),o=s("input"),l=g(),u=s("div"),c=s("input"),p=g(),f=s("label"),f.textContent="Multiple",d=g(),_=s("div"),m=s("input"),h=g(),v=s("label"),v.textContent="Directory",C=g(),w=s("button"),w.textContent="Open dialog",P=g(),S=s("button"),S.textContent="Open save dialog",a(n,"id","dialog-default-path"),a(n,"placeholder","Default path"),a(o,"id","dialog-filter"),a(o,"placeholder","Extensions filter, comma-separated"),a(o,"class","svelte-1eg58yg"),a(c,"type","checkbox"),a(c,"id","dialog-multiple"),a(f,"for","dialog-multiple"),a(m,"type","checkbox"),a(m,"id","dialog-directory"),a(v,"for","dialog-directory"),a(w,"class","button"),a(w,"id","open-dialog"),a(S,"class","button"),a(S,"id","save-dialog")},m(j,L){O(j,t,L),r(t,n),A(n,e[0]),r(t,i),r(t,o),A(o,e[1]),r(t,l),r(t,u),r(u,c),c.checked=e[2],r(u,p),r(u,f),r(t,d),r(t,_),r(_,m),m.checked=e[3],r(_,h),r(_,v),r(t,C),r(t,w),r(t,P),r(t,S),D||(R=[T(n,"input",e[7]),T(o,"input",e[8]),T(c,"change",e[9]),T(m,"change",e[10]),T(w,"click",e[4]),T(S,"click",e[5])],D=!0)},p(j,[L]){L&1&&n.value!==j[0]&&A(n,j[0]),L&2&&o.value!==j[1]&&A(o,j[1]),L&4&&(c.checked=j[2]),L&8&&(m.checked=j[3])},i:U,o:U,d(j){j&&W(t),D=!1,Z(R)}}}function gr(e,t){var n=new Blob([e],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(o){var l=o.target.result;t(l.substr(l.indexOf(",")+1))},i.readAsDataURL(n)}function _r(e,t,n){let{onMessage:i}=t,o=null,l=null,u=!1,c=!1;function p(){Fn({defaultPath:o,filters:l?[{name:"Tauri Example",extensions:l.split(",").map(v=>v.trim())}]:[],multiple:u,directory:c}).then(function(v){if(Array.isArray(v))i(v);else{var C=v,w=C.match(/\S+\.\S+$/g);Rn(C).then(function(P){w&&(C.includes(".png")||C.includes(".jpg"))?gr(new Uint8Array(P),function(S){var D="data:image/png;base64,"+S;i('<img src="'+D+'"></img>')}):i(v)}).catch(i(v))}}).catch(i)}function f(){so({defaultPath:o,filters:l?[{name:"Tauri Example",extensions:l.split(",").map(v=>v.trim())}]:[]}).then(i).catch(i)}function d(){o=this.value,n(0,o)}function _(){l=this.value,n(1,l)}function m(){u=this.checked,n(2,u)}function h(){c=this.checked,n(3,c)}return e.$$set=v=>{"onMessage"in v&&n(6,i=v.onMessage)},[o,l,u,c,p,f,i,d,_,m,h]}class br extends J{constructor(t){super();K(this,t,_r,vr,Y,{onMessage:6})}}function ao(e,t,n){const i=e.slice();return i[8]=t[n],i}function co(e){let t,n=e[8][0]+"",i,o;return{c(){t=s("option"),i=z(n),t.__value=o=e[8][1],t.value=t.__value},m(l,u){O(l,t,u),r(t,i)},p:U,d(l){l&&W(t)}}}function yr(e){let t,n,i,o,l,u,c,p,f,d,_,m,h,v=e[2],C=[];for(let w=0;w<v.length;w+=1)C[w]=co(ao(e,v,w));return{c(){t=s("form"),n=s("select"),i=s("option"),i.textContent="None";for(let w=0;w<C.length;w+=1)C[w].c();o=g(),l=s("input"),u=g(),c=s("button"),c.textContent="Read",p=g(),f=s("button"),f.textContent="Use as img src",d=g(),_=s("img"),i.__value="",i.value=i.__value,a(n,"class","button"),a(n,"id","dir"),a(l,"id","path-to-read"),a(l,"placeholder","Type the path to read..."),a(c,"class","button"),a(c,"id","read"),a(f,"class","button"),a(f,"type","button"),a(_,"alt","file")},m(w,P){O(w,t,P),r(t,n),r(n,i);for(let S=0;S<C.length;S+=1)C[S].m(n,null);r(t,o),r(t,l),A(l,e[0]),r(t,u),r(t,c),r(t,p),r(t,f),r(t,d),r(t,_),e[7](_),m||(h=[T(l,"input",e[6]),T(f,"click",e[4]),T(t,"submit",Ke(e[3]))],m=!0)},p(w,[P]){if(P&4){v=w[2];let S;for(S=0;S<v.length;S+=1){const D=ao(w,v,S);C[S]?C[S].p(D,P):(C[S]=co(D),C[S].c(),C[S].m(n,null))}for(;S<C.length;S+=1)C[S].d(1);C.length=v.length}P&1&&l.value!==w[0]&&A(l,w[0])},i:U,o:U,d(w){w&&W(t),Ye(C,w),e[7](null),m=!1,Z(h)}}}function fo(){return document.getElementById("dir").value?parseInt(dir.value):null}function wr(e,t){const n=new Blob([e],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(o){const l=o.target.result;t(l.substr(l.indexOf(",")+1))},i.readAsDataURL(n)}function Mr(e,t,n){let{onMessage:i}=t,o="",l;const u=Object.keys($t).filter(_=>isNaN(parseInt(_))).map(_=>[_,$t[_]]);function c(){const _=o.match(/\S+\.\S+$/g),m={dir:fo()};(_?Rn(o,m):uo(o,m)).then(function(v){if(_)if(o.includes(".png")||o.includes(".jpg"))wr(new Uint8Array(v),function(C){const w="data:image/png;base64,"+C;i('<img src="'+w+'"></img>')});else{const C=String.fromCharCode.apply(null,v);i('<textarea id="file-response" style="height: 400px"></textarea><button id="file-save">Save</button>'),setTimeout(()=>{const w=document.getElementById("file-response");w.value=C,document.getElementById("file-save").addEventListener("click",function(){writeFile({file:o,contents:w.value},{dir:fo()}).catch(i)})})}else i(v)}).catch(i)}function p(){n(1,l.src=Qi(o),l)}function f(){o=this.value,n(0,o)}function d(_){qo[_?"unshift":"push"](()=>{l=_,n(1,l)})}return e.$$set=_=>{"onMessage"in _&&n(5,i=_.onMessage)},[o,l,u,c,p,i,f,d]}class kr extends J{constructor(t){super();K(this,t,Mr,yr,Y,{onMessage:5})}}var ve;(function(e){e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary"})(ve||(ve={}));var Un=function(){function e(t,n){this.type=t,this.payload=n}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}(),po=function(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.data=e.data},ho=function(){function e(t){this.id=t}return e.prototype.drop=function(){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})]})})},e.prototype.request=function(t){return b(this,void 0,void 0,function(){var n;return y(this,function(i){return(n=!t.responseType||t.responseType===ve.JSON)&&(t.responseType=ve.Text),[2,k({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:t}}).then(function(o){var l=new po(o);if(n){try{l.data=JSON.parse(l.data)}catch(u){if(l.ok&&l.data==="")l.data={};else if(respone.ok)throw Error("Failed to parse response `".concat(l.data,"` as JSON: ").concat(u,";\n try setting the `responseType` option to `ResponseType.Text` or `ResponseType.Binary` if the API does not return a JSON response."))}return l}return l})]})})},e.prototype.get=function(t,n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,this.request(dt({method:"GET",url:t},n))]})})},e.prototype.post=function(t,n,i){return b(this,void 0,void 0,function(){return y(this,function(o){return[2,this.request(dt({method:"POST",url:t,body:n},i))]})})},e.prototype.put=function(t,n,i){return b(this,void 0,void 0,function(){return y(this,function(o){return[2,this.request(dt({method:"PUT",url:t,body:n},i))]})})},e.prototype.patch=function(t,n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,this.request(dt({method:"PATCH",url:t},n))]})})},e.prototype.delete=function(t,n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,this.request(dt({method:"DELETE",url:t},n))]})})},e}();function In(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(function(n){return new ho(n)})]})})}var Nn=null;function Cr(e,t){var n;return b(this,void 0,void 0,function(){return y(this,function(i){switch(i.label){case 0:return Nn!==null?[3,2]:[4,In()];case 1:Nn=i.sent(),i.label=2;case 2:return[2,Nn.request(dt({url:e,method:(n=t==null?void 0:t.method)!==null&&n!==void 0?n:"GET"},t))]}})})}Object.freeze({__proto__:null,getClient:In,fetch:Cr,Body:Un,Client:ho,Response:po,get ResponseType(){return ve}});function Tr(e){let t,n,i,o,l,u,c,p,f,d,_,m,h,v,C,w,P;return{c(){t=s("form"),n=s("select"),i=s("option"),i.textContent="GET",o=s("option"),o.textContent="POST",l=s("option"),l.textContent="PUT",u=s("option"),u.textContent="PATCH",c=s("option"),c.textContent="DELETE",p=g(),f=s("input"),d=g(),_=s("br"),m=g(),h=s("textarea"),v=g(),C=s("button"),C.textContent="Make request",i.__value="GET",i.value=i.__value,o.__value="POST",o.value=o.__value,l.__value="PUT",l.value=l.__value,u.__value="PATCH",u.value=u.__value,c.__value="DELETE",c.value=c.__value,a(n,"class","button"),a(n,"id","request-method"),e[0]===void 0&&Hi(()=>e[5].call(n)),a(f,"id","request-url"),a(f,"placeholder","Type the request URL..."),a(h,"id","request-body"),a(h,"placeholder","Request body"),a(h,"rows","5"),ct(h,"width","100%"),ct(h,"margin-right","10px"),ct(h,"font-size","12px"),a(C,"class","button"),a(C,"id","make-request")},m(S,D){O(S,t,D),r(t,n),r(n,i),r(n,o),r(n,l),r(n,u),r(n,c),Xe(n,e[0]),r(t,p),r(t,f),A(f,e[1]),r(t,d),r(t,_),r(t,m),r(t,h),A(h,e[2]),r(t,v),r(t,C),w||(P=[T(n,"change",e[5]),T(f,"input",e[6]),T(h,"input",e[7]),T(t,"submit",Ke(e[3]))],w=!0)},p(S,[D]){D&1&&Xe(n,S[0]),D&2&&f.value!==S[1]&&A(f,S[1]),D&4&&A(h,S[2])},i:U,o:U,d(S){S&&W(t),w=!1,Z(P)}}}function Sr(e,t,n){let i="GET",o="https://jsonplaceholder.typicode.com/todos/1",l="",{onMessage:u}=t;async function c(){const _=await In(),v={url:o||""||"",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?v.body=Un.json(JSON.parse(l)):l!==""&&(v.body=Un.text(l)),_.request(v).then(u).catch(u)}function p(){i=Bi(this),n(0,i)}function f(){o=this.value,n(1,o)}function d(){l=this.value,n(2,l)}return e.$$set=_=>{"onMessage"in _&&n(4,u=_.onMessage)},[i,o,l,c,u,p,f,d]}class zr extends J{constructor(t){super();K(this,t,Sr,Tr,Y,{onMessage:4})}}function Pr(e){let t,n,i;return{c(){t=s("button"),t.textContent="Send test notification",a(t,"class","button"),a(t,"id","notification")},m(o,l){O(o,t,l),n||(i=T(t,"click",e[0]),n=!0)},p:U,i:U,o:U,d(o){o&&W(t),n=!1,i()}}}function mo(){new Notification("Notification title",{body:"This is the notification body"})}function Or(e,t,n){let{onMessage:i}=t;function o(){Notification.permission==="default"?Notification.requestPermission().then(function(l){l==="granted"?mo():i("Permission is "+l)}).catch(i):Notification.permission==="granted"?mo():i("Permission is denied")}return e.$$set=l=>{"onMessage"in l&&n(1,i=l.onMessage)},[o,i]}class Wr extends J{constructor(t){super();K(this,t,Or,Pr,Y,{onMessage:1})}}var Vt,Ze=function(e,t){this.type="Logical",this.width=e,this.height=t},Jt=function(){function e(t,n){this.type="Physical",this.width=t,this.height=n}return e.prototype.toLogical=function(t){return new Ze(this.width/t,this.height/t)},e}(),vo=function(e,t){this.type="Logical",this.x=e,this.y=t},Kt=function(){function e(t,n){this.type="Physical",this.x=t,this.y=n}return e.prototype.toLogical=function(t){return new vo(this.x/t,this.y/t)},e}();function Lr(){return new ge(window.__TAURI__.__currentWindow.label,{skip:!0})}function go(){return window.__TAURI__.__windows.map(function(e){return new ge(e.label,{skip:!0})})}(function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"})(Vt||(Vt={}));var _o=["tauri://created","tauri://error"],bo=function(){function e(t){try{this.label=t!=null?t:window.__TAURI__.__currentWindow.label}catch{this.label=""}this.listeners=Object.create(null)}return e.prototype.listen=function(t,n){return b(this,void 0,void 0,function(){var i=this;return y(this,function(o){return this._handleTauriEvent(t,n)?[2,Promise.resolve(function(){var l=i.listeners[t];l.splice(l.indexOf(n),1)})]:[2,Et(t,n)]})})},e.prototype.once=function(t,n){return b(this,void 0,void 0,function(){var i=this;return y(this,function(o){return this._handleTauriEvent(t,n)?[2,Promise.resolve(function(){var l=i.listeners[t];l.splice(l.indexOf(n),1)})]:[2,jn(t,n)]})})},e.prototype.emit=function(t,n){return b(this,void 0,void 0,function(){var i,o;return y(this,function(l){if(_o.includes(t)){for(i=0,o=this.listeners[t]||[];i<o.length;i++)(0,o[i])({event:t,id:-1,payload:n});return[2,Promise.resolve()]}return[2,ro(t,this.label,n)]})})},e.prototype._handleTauriEvent=function(t,n){return!!_o.includes(t)&&(t in this.listeners?this.listeners[t].push(n):this.listeners[t]=[n],!0)},e}(),yo=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return Ln(t,e),t.prototype.scaleFactor=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})]})})},t.prototype.innerPosition=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(function(i){var o=i.x,l=i.y;return new Kt(o,l)})]})})},t.prototype.outerPosition=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(function(i){var o=i.x,l=i.y;return new Kt(o,l)})]})})},t.prototype.innerSize=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(function(i){var o=i.width,l=i.height;return new Jt(o,l)})]})})},t.prototype.outerSize=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(function(i){var o=i.width,l=i.height;return new Jt(o,l)})]})})},t.prototype.isFullscreen=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})]})})},t.prototype.isMaximized=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})]})})},t.prototype.isDecorated=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})]})})},t.prototype.isResizable=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})]})})},t.prototype.isVisible=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})]})})},t.prototype.center=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})]})})},t.prototype.requestUserAttention=function(n){return b(this,void 0,void 0,function(){var i;return y(this,function(o){return i=null,n&&(i=n===Vt.Critical?{type:"Critical"}:{type:"Informational"}),[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:i}}}})]})})},t.prototype.setResizable=function(n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:n}}}})]})})},t.prototype.setTitle=function(n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:n}}}})]})})},t.prototype.maximize=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})]})})},t.prototype.unmaximize=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})]})})},t.prototype.toggleMaximize=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})]})})},t.prototype.minimize=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})]})})},t.prototype.unminimize=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})]})})},t.prototype.show=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})]})})},t.prototype.hide=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})]})})},t.prototype.close=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})]})})},t.prototype.setDecorations=function(n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:n}}}})]})})},t.prototype.setAlwaysOnTop=function(n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:n}}}})]})})},t.prototype.setSize=function(n){return b(this,void 0,void 0,function(){return y(this,function(i){if(!n||n.type!=="Logical"&&n.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:n.type,data:{width:n.width,height:n.height}}}}}})]})})},t.prototype.setMinSize=function(n){return b(this,void 0,void 0,function(){return y(this,function(i){if(n&&n.type!=="Logical"&&n.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:n?{type:n.type,data:{width:n.width,height:n.height}}:null}}}})]})})},t.prototype.setMaxSize=function(n){return b(this,void 0,void 0,function(){return y(this,function(i){if(n&&n.type!=="Logical"&&n.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:n?{type:n.type,data:{width:n.width,height:n.height}}:null}}}})]})})},t.prototype.setPosition=function(n){return b(this,void 0,void 0,function(){return y(this,function(i){if(!n||n.type!=="Logical"&&n.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:n.type,data:{x:n.x,y:n.y}}}}}})]})})},t.prototype.setFullscreen=function(n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:n}}}})]})})},t.prototype.setFocus=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})]})})},t.prototype.setIcon=function(n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:n}}}}})]})})},t.prototype.setSkipTaskbar=function(n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:n}}}})]})})},t.prototype.startDragging=function(){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})]})})},t}(bo),ge=function(e){function t(n,i){i===void 0&&(i={});var o=e.call(this,n)||this;return(i==null?void 0:i.skip)||k({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:dt({label:n},i)}}}).then(function(){return b(o,void 0,void 0,function(){return y(this,function(l){return[2,this.emit("tauri://created")]})})}).catch(function(l){return b(o,void 0,void 0,function(){return y(this,function(u){return[2,this.emit("tauri://error",l)]})})}),o}return Ln(t,e),t.getByLabel=function(n){return go().some(function(i){return i.label===n})?new t(n,{skip:!0}):null},t}(yo),qn=new ge(null,{skip:!0});function Er(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}})]})})}function Ar(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}})]})})}function Dr(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}})]})})}Object.freeze({__proto__:null,WebviewWindow:ge,WebviewWindowHandle:bo,WindowManager:yo,getCurrent:Lr,getAll:go,appWindow:qn,LogicalSize:Ze,PhysicalSize:Jt,LogicalPosition:vo,PhysicalPosition:Kt,get UserAttentionType(){return Vt},currentMonitor:Er,primaryMonitor:Ar,availableMonitors:Dr});function wo(e,t,n){const i=e.slice();return i[54]=t[n],i}function Mo(e){let t,n=e[54]+"",i,o;return{c(){t=s("option"),i=z(n),t.__value=o=e[54],t.value=t.__value},m(l,u){O(l,t,u),r(t,i)},p(l,u){u[0]&2&&n!==(n=l[54]+"")&&H(i,n),u[0]&2&&o!==(o=l[54])&&(t.__value=o,t.value=t.__value)},d(l){l&&W(t)}}}function jr(e){let t,n,i,o,l,u,c,p,f,d,_,m,h,v,C,w,P,S,D,R,j,L,I,G,B,Q,tt,F,rt,q,st,ft,_e,be,At,ye,Yt,x,pt,Dt,we,et,Me,jt,ke,nt,Ce,ht,Ft,Te,it,Se,Rt,ze,ot,Pe,N,zt,Hn,mt,Bn,Oe,Gn,vt,$n,Ut,We,Vn,ut,Jn,Le,Kn,at,xe,lt,It,gt,tn,Yn,Xt,Xn,Ee=e[20].width+"",en,Qn,Qt,Zn,Ae=e[20].height+"",nn,xn,_t,on,ti,Zt,ei,De=e[21].width+"",rn,ni,xt,ii,je=e[21].height+"",ln,oi,Nt,bt,sn,ri,te,li,Fe=e[20].toLogical(e[17]).width+"",un,si,ee,ui,Re=e[20].toLogical(e[17]).height+"",an,ai,yt,cn,ci,ne,di,Ue=e[21].toLogical(e[17]).width+"",dn,fi,ie,pi,Ie=e[21].toLogical(e[17]).height+"",fn,hi,qt,wt,pn,mi,oe,vi,Ne=e[18].x+"",hn,gi,re,_i,qe=e[18].y+"",mn,bi,Mt,vn,yi,le,wi,He=e[19].x+"",gn,Mi,se,ki,Be=e[19].y+"",_n,Ci,Ht,kt,bn,Ti,ue,Si,Ge=e[18].toLogical(e[17]).x+"",yn,zi,ae,Pi,$e=e[18].toLogical(e[17]).y+"",wn,Oi,Ct,Mn,Wi,ce,Li,Ve=e[19].toLogical(e[17]).x+"",kn,Ei,de,Ai,Je=e[19].toLogical(e[17]).y+"",Cn,Tn,Tt,Pt,Di,fe,Sn,St,Ot,ji,pe,zn,Wt,Pn,Bt,On,Fi,Gt=Object.keys(e[1]),X=[];for(let M=0;M<Gt.length;M+=1)X[M]=Mo(wo(e,Gt,M));return{c(){t=s("div"),n=s("select");for(let M=0;M<X.length;M+=1)X[M].c();i=g(),o=s("div"),l=s("label"),u=s("input"),c=z(`
  21. Resizable`),p=g(),f=s("label"),d=s("input"),_=z(`
  22. Maximize`),m=g(),h=s("button"),h.textContent="Center",v=g(),C=s("button"),C.textContent="Minimize",w=g(),P=s("button"),P.textContent="Hide",S=g(),D=s("label"),R=s("input"),j=z(`
  23. Transparent`),L=g(),I=s("label"),G=s("input"),B=z(`
  24. Has decorations`),Q=g(),tt=s("label"),F=s("input"),rt=z(`
  25. Always on top`),q=g(),st=s("label"),ft=s("input"),_e=z(`
  26. Fullscreen`),be=g(),At=s("button"),At.textContent="Change icon",ye=g(),Yt=s("div"),x=s("div"),pt=s("div"),Dt=s("div"),we=z(`X
  27. `),et=s("input"),Me=g(),jt=s("div"),ke=z(`Y
  28. `),nt=s("input"),Ce=g(),ht=s("div"),Ft=s("div"),Te=z(`Width
  29. `),it=s("input"),Se=g(),Rt=s("div"),ze=z(`Height
  30. `),ot=s("input"),Pe=g(),N=s("div"),zt=s("div"),Hn=z(`Min width
  31. `),mt=s("input"),Bn=g(),Oe=s("div"),Gn=z(`Min height
  32. `),vt=s("input"),$n=g(),Ut=s("div"),We=s("div"),Vn=z(`Max width
  33. `),ut=s("input"),Jn=g(),Le=s("div"),Kn=z(`Max height
  34. `),at=s("input"),xe=g(),lt=s("div"),It=s("div"),gt=s("div"),tn=s("div"),tn.textContent="Inner Size",Yn=g(),Xt=s("span"),Xn=z("Width: "),en=z(Ee),Qn=g(),Qt=s("span"),Zn=z("Height: "),nn=z(Ae),xn=g(),_t=s("div"),on=s("div"),on.textContent="Outer Size",ti=g(),Zt=s("span"),ei=z("Width: "),rn=z(De),ni=g(),xt=s("span"),ii=z("Height: "),ln=z(je),oi=g(),Nt=s("div"),bt=s("div"),sn=s("div"),sn.textContent="Inner Logical Size",ri=g(),te=s("span"),li=z("Width: "),un=z(Fe),si=g(),ee=s("span"),ui=z("Height: "),an=z(Re),ai=g(),yt=s("div"),cn=s("div"),cn.textContent="Outer Logical Size",ci=g(),ne=s("span"),di=z("Width: "),dn=z(Ue),fi=g(),ie=s("span"),pi=z("Height: "),fn=z(Ie),hi=g(),qt=s("div"),wt=s("div"),pn=s("div"),pn.textContent="Inner Position",mi=g(),oe=s("span"),vi=z("x: "),hn=z(Ne),gi=g(),re=s("span"),_i=z("y: "),mn=z(qe),bi=g(),Mt=s("div"),vn=s("div"),vn.textContent="Outer Position",yi=g(),le=s("span"),wi=z("x: "),gn=z(He),Mi=g(),se=s("span"),ki=z("y: "),_n=z(Be),Ci=g(),Ht=s("div"),kt=s("div"),bn=s("div"),bn.textContent="Inner Logical Position",Ti=g(),ue=s("span"),Si=z("x: "),yn=z(Ge),zi=g(),ae=s("span"),Pi=z("y: "),wn=z($e),Oi=g(),Ct=s("div"),Mn=s("div"),Mn.textContent="Outer Logical Position",Wi=g(),ce=s("span"),Li=z("x: "),kn=z(Ve),Ei=g(),de=s("span"),Ai=z("y: "),Cn=z(Je),Tn=g(),Tt=s("form"),Pt=s("input"),Di=g(),fe=s("button"),fe.textContent="Set title",Sn=g(),St=s("form"),Ot=s("input"),ji=g(),pe=s("button"),pe.textContent="Open URL",zn=g(),Wt=s("button"),Wt.textContent="Request attention",Pn=g(),Bt=s("button"),Bt.textContent="New window",a(n,"class","button"),e[0]===void 0&&Hi(()=>e[31].call(n)),a(u,"type","checkbox"),a(d,"type","checkbox"),a(h,"title","Unminimizes after 2 seconds"),a(C,"title","Unminimizes after 2 seconds"),a(P,"title","Visible again after 2 seconds"),a(R,"type","checkbox"),a(G,"type","checkbox"),a(F,"type","checkbox"),a(ft,"type","checkbox"),a(et,"type","number"),a(et,"min","0"),a(et,"class","svelte-12ggtr4"),a(nt,"type","number"),a(nt,"min","0"),a(nt,"class","svelte-12ggtr4"),a(pt,"class","flex col grow svelte-12ggtr4"),a(it,"type","number"),a(it,"min","400"),a(it,"class","svelte-12ggtr4"),a(ot,"type","number"),a(ot,"min","400"),a(ot,"class","svelte-12ggtr4"),a(ht,"class","flex col grow svelte-12ggtr4"),a(mt,"type","number"),a(mt,"class","svelte-12ggtr4"),a(vt,"type","number"),a(vt,"class","svelte-12ggtr4"),a(N,"class","flex col grow svelte-12ggtr4"),a(ut,"type","number"),a(ut,"min","400"),a(ut,"class","svelte-12ggtr4"),a(at,"type","number"),a(at,"min","400"),a(at,"class","svelte-12ggtr4"),a(Ut,"class","flex col grow svelte-12ggtr4"),a(x,"class","window-controls flex flex-row svelte-12ggtr4"),a(t,"class","flex col"),a(Xt,"class","svelte-12ggtr4"),a(Qt,"class","svelte-12ggtr4"),a(gt,"class","grow window-property svelte-12ggtr4"),a(Zt,"class","svelte-12ggtr4"),a(xt,"class","svelte-12ggtr4"),a(_t,"class","grow window-property svelte-12ggtr4"),a(It,"class","flex"),a(te,"class","svelte-12ggtr4"),a(ee,"class","svelte-12ggtr4"),a(bt,"class","grow window-property svelte-12ggtr4"),a(ne,"class","svelte-12ggtr4"),a(ie,"class","svelte-12ggtr4"),a(yt,"class","grow window-property svelte-12ggtr4"),a(Nt,"class","flex"),a(oe,"class","svelte-12ggtr4"),a(re,"class","svelte-12ggtr4"),a(wt,"class","grow window-property svelte-12ggtr4"),a(le,"class","svelte-12ggtr4"),a(se,"class","svelte-12ggtr4"),a(Mt,"class","grow window-property svelte-12ggtr4"),a(qt,"class","flex"),a(ue,"class","svelte-12ggtr4"),a(ae,"class","svelte-12ggtr4"),a(kt,"class","grow window-property svelte-12ggtr4"),a(ce,"class","svelte-12ggtr4"),a(de,"class","svelte-12ggtr4"),a(Ct,"class","grow window-property svelte-12ggtr4"),a(Ht,"class","flex"),a(Pt,"id","title"),a(fe,"class","button"),a(fe,"type","submit"),ct(Tt,"margin-top","24px"),a(Ot,"id","url"),a(pe,"class","button"),a(pe,"id","open-url"),ct(St,"margin-top","24px"),a(Wt,"class","button"),a(Wt,"title","Minimizes the window, requests attention for 3s and then resets it"),a(Bt,"class","button")},m(M,E){O(M,t,E),r(t,n);for(let $=0;$<X.length;$+=1)X[$].m(n,null);Xe(n,e[0]),r(t,i),r(t,o),r(o,l),r(l,u),u.checked=e[2],r(l,c),r(o,p),r(o,f),r(f,d),d.checked=e[3],r(f,_),r(o,m),r(o,h),r(o,v),r(o,C),r(o,w),r(o,P),r(o,S),r(o,D),r(D,R),R.checked=e[16],r(D,j),r(o,L),r(o,I),r(I,G),G.checked=e[4],r(I,B),r(o,Q),r(o,tt),r(tt,F),F.checked=e[5],r(tt,rt),r(o,q),r(o,st),r(st,ft),ft.checked=e[6],r(st,_e),r(o,be),r(o,At),r(t,ye),r(t,Yt),r(Yt,x),r(x,pt),r(pt,Dt),r(Dt,we),r(Dt,et),A(et,e[13]),r(pt,Me),r(pt,jt),r(jt,ke),r(jt,nt),A(nt,e[14]),r(x,Ce),r(x,ht),r(ht,Ft),r(Ft,Te),r(Ft,it),A(it,e[7]),r(ht,Se),r(ht,Rt),r(Rt,ze),r(Rt,ot),A(ot,e[8]),r(x,Pe),r(x,N),r(N,zt),r(zt,Hn),r(zt,mt),A(mt,e[9]),r(N,Bn),r(N,Oe),r(Oe,Gn),r(Oe,vt),A(vt,e[10]),r(x,$n),r(x,Ut),r(Ut,We),r(We,Vn),r(We,ut),A(ut,e[11]),r(Ut,Jn),r(Ut,Le),r(Le,Kn),r(Le,at),A(at,e[12]),O(M,xe,E),O(M,lt,E),r(lt,It),r(It,gt),r(gt,tn),r(gt,Yn),r(gt,Xt),r(Xt,Xn),r(Xt,en),r(gt,Qn),r(gt,Qt),r(Qt,Zn),r(Qt,nn),r(It,xn),r(It,_t),r(_t,on),r(_t,ti),r(_t,Zt),r(Zt,ei),r(Zt,rn),r(_t,ni),r(_t,xt),r(xt,ii),r(xt,ln),r(lt,oi),r(lt,Nt),r(Nt,bt),r(bt,sn),r(bt,ri),r(bt,te),r(te,li),r(te,un),r(bt,si),r(bt,ee),r(ee,ui),r(ee,an),r(Nt,ai),r(Nt,yt),r(yt,cn),r(yt,ci),r(yt,ne),r(ne,di),r(ne,dn),r(yt,fi),r(yt,ie),r(ie,pi),r(ie,fn),r(lt,hi),r(lt,qt),r(qt,wt),r(wt,pn),r(wt,mi),r(wt,oe),r(oe,vi),r(oe,hn),r(wt,gi),r(wt,re),r(re,_i),r(re,mn),r(qt,bi),r(qt,Mt),r(Mt,vn),r(Mt,yi),r(Mt,le),r(le,wi),r(le,gn),r(Mt,Mi),r(Mt,se),r(se,ki),r(se,_n),r(lt,Ci),r(lt,Ht),r(Ht,kt),r(kt,bn),r(kt,Ti),r(kt,ue),r(ue,Si),r(ue,yn),r(kt,zi),r(kt,ae),r(ae,Pi),r(ae,wn),r(Ht,Oi),r(Ht,Ct),r(Ct,Mn),r(Ct,Wi),r(Ct,ce),r(ce,Li),r(ce,kn),r(Ct,Ei),r(Ct,de),r(de,Ai),r(de,Cn),O(M,Tn,E),O(M,Tt,E),r(Tt,Pt),A(Pt,e[22]),r(Tt,Di),r(Tt,fe),O(M,Sn,E),O(M,St,E),r(St,Ot),A(Ot,e[15]),r(St,ji),r(St,pe),O(M,zn,E),O(M,Wt,E),O(M,Pn,E),O(M,Bt,E),On||(Fi=[T(n,"change",e[31]),T(u,"change",e[32]),T(d,"change",e[33]),T(h,"click",e[34]),T(C,"click",e[26]),T(P,"click",e[25]),T(R,"change",e[35]),T(G,"change",e[36]),T(F,"change",e[37]),T(ft,"change",e[38]),T(At,"click",e[27]),T(et,"input",e[39]),T(nt,"input",e[40]),T(it,"input",e[41]),T(ot,"input",e[42]),T(mt,"input",e[43]),T(vt,"input",e[44]),T(ut,"input",e[45]),T(at,"input",e[46]),T(Pt,"input",e[47]),T(Tt,"submit",Ke(e[24])),T(Ot,"input",e[48]),T(St,"submit",Ke(e[23])),T(Wt,"click",e[29]),T(Bt,"click",e[28])],On=!0)},p(M,E){if(E[0]&2){Gt=Object.keys(M[1]);let $;for($=0;$<Gt.length;$+=1){const Ri=wo(M,Gt,$);X[$]?X[$].p(Ri,E):(X[$]=Mo(Ri),X[$].c(),X[$].m(n,null))}for(;$<X.length;$+=1)X[$].d(1);X.length=Gt.length}E[0]&3&&Xe(n,M[0]),E[0]&4&&(u.checked=M[2]),E[0]&8&&(d.checked=M[3]),E[0]&65536&&(R.checked=M[16]),E[0]&16&&(G.checked=M[4]),E[0]&32&&(F.checked=M[5]),E[0]&64&&(ft.checked=M[6]),E[0]&8192&&V(et.value)!==M[13]&&A(et,M[13]),E[0]&16384&&V(nt.value)!==M[14]&&A(nt,M[14]),E[0]&128&&V(it.value)!==M[7]&&A(it,M[7]),E[0]&256&&V(ot.value)!==M[8]&&A(ot,M[8]),E[0]&512&&V(mt.value)!==M[9]&&A(mt,M[9]),E[0]&1024&&V(vt.value)!==M[10]&&A(vt,M[10]),E[0]&2048&&V(ut.value)!==M[11]&&A(ut,M[11]),E[0]&4096&&V(at.value)!==M[12]&&A(at,M[12]),E[0]&1048576&&Ee!==(Ee=M[20].width+"")&&H(en,Ee),E[0]&1048576&&Ae!==(Ae=M[20].height+"")&&H(nn,Ae),E[0]&2097152&&De!==(De=M[21].width+"")&&H(rn,De),E[0]&2097152&&je!==(je=M[21].height+"")&&H(ln,je),E[0]&1179648&&Fe!==(Fe=M[20].toLogical(M[17]).width+"")&&H(un,Fe),E[0]&1179648&&Re!==(Re=M[20].toLogical(M[17]).height+"")&&H(an,Re),E[0]&2228224&&Ue!==(Ue=M[21].toLogical(M[17]).width+"")&&H(dn,Ue),E[0]&2228224&&Ie!==(Ie=M[21].toLogical(M[17]).height+"")&&H(fn,Ie),E[0]&262144&&Ne!==(Ne=M[18].x+"")&&H(hn,Ne),E[0]&262144&&qe!==(qe=M[18].y+"")&&H(mn,qe),E[0]&524288&&He!==(He=M[19].x+"")&&H(gn,He),E[0]&524288&&Be!==(Be=M[19].y+"")&&H(_n,Be),E[0]&393216&&Ge!==(Ge=M[18].toLogical(M[17]).x+"")&&H(yn,Ge),E[0]&393216&&$e!==($e=M[18].toLogical(M[17]).y+"")&&H(wn,$e),E[0]&655360&&Ve!==(Ve=M[19].toLogical(M[17]).x+"")&&H(kn,Ve),E[0]&655360&&Je!==(Je=M[19].toLogical(M[17]).y+"")&&H(Cn,Je),E[0]&4194304&&Pt.value!==M[22]&&A(Pt,M[22]),E[0]&32768&&Ot.value!==M[15]&&A(Ot,M[15])},i:U,o:U,d(M){M&&W(t),Ye(X,M),M&&W(xe),M&&W(lt),M&&W(Tn),M&&W(Tt),M&&W(Sn),M&&W(St),M&&W(zn),M&&W(Wt),M&&W(Pn),M&&W(Bt),On=!1,Z(Fi)}}}function Fr(e,t,n){window.UserAttentionType=Vt;let i=qn.label;const o={[i]:qn};let{onMessage:l}=t,u="https://tauri.studio",c=!0,p=!1,f=!1,d=!0,_=!1,m=!1,h=900,v=700,C=600,w=600,P=null,S=null,D=100,R=100,j=1,L=new Kt(D,R),I=new Kt(D,R),G=new Jt(h,v),B=new Jt(h,v),Q,tt,F="Awesome Tauri Example!";function rt(){An(u)}function q(){o[i].setTitle(F)}function st(){o[i].hide(),setTimeout(o[i].show,2e3)}function ft(){o[i].minimize(),setTimeout(o[i].unminimize,2e3)}function _e(){Fn({multiple:!1}).then(o[i].setIcon)}function be(){const N=Math.random().toString(),zt=new ge(N);n(1,o[N]=zt,o),zt.once("tauri://error",function(){l("Error creating new webview")})}function At(){o[i].innerSize().then(N=>{n(20,G=N),n(7,h=G.width),n(8,v=G.height)}),o[i].outerSize().then(N=>{n(21,B=N)})}function ye(){o[i].innerPosition().then(N=>{n(18,L=N)}),o[i].outerPosition().then(N=>{n(19,I=N),n(13,D=I.x),n(14,R=I.y)})}async function Yt(N){Q&&Q(),tt&&tt(),tt=await N.listen("tauri://move",ye),Q=await N.listen("tauri://resize",At)}async function x(){await o[i].minimize(),await o[i].requestUserAttention(Vt.Critical),await new Promise(N=>setTimeout(N,3e3)),await o[i].requestUserAttention(null)}function pt(){i=Bi(this),n(0,i),n(1,o)}function Dt(){c=this.checked,n(2,c)}function we(){p=this.checked,n(3,p)}const et=()=>o[i].center();function Me(){f=this.checked,n(16,f)}function jt(){d=this.checked,n(4,d)}function ke(){_=this.checked,n(5,_)}function nt(){m=this.checked,n(6,m)}function Ce(){D=V(this.value),n(13,D)}function ht(){R=V(this.value),n(14,R)}function Ft(){h=V(this.value),n(7,h)}function Te(){v=V(this.value),n(8,v)}function it(){C=V(this.value),n(9,C)}function Se(){w=V(this.value),n(10,w)}function Rt(){P=V(this.value),n(11,P)}function ze(){S=V(this.value),n(12,S)}function ot(){F=this.value,n(22,F)}function Pe(){u=this.value,n(15,u)}return e.$$set=N=>{"onMessage"in N&&n(30,l=N.onMessage)},e.$$.update=()=>{e.$$.dirty[0]&7&&o[i].setResizable(c),e.$$.dirty[0]&11&&(p?o[i].maximize():o[i].unmaximize()),e.$$.dirty[0]&19&&o[i].setDecorations(d),e.$$.dirty[0]&35&&o[i].setAlwaysOnTop(_),e.$$.dirty[0]&67&&o[i].setFullscreen(m),e.$$.dirty[0]&387&&o[i].setSize(new Jt(h,v)),e.$$.dirty[0]&1539&&(C&&w?o[i].setMinSize(new Ze(C,w)):o[i].setMinSize(null)),e.$$.dirty[0]&6147&&(P&&S?o[i].setMaxSize(new Ze(P,S)):o[i].setMaxSize(null)),e.$$.dirty[0]&24579&&o[i].setPosition(new Kt(D,R)),e.$$.dirty[0]&3&&o[i].scaleFactor().then(N=>n(17,j=N)),e.$$.dirty[0]&3&&Yt(o[i])},[i,o,c,p,d,_,m,h,v,C,w,P,S,D,R,u,f,j,L,I,G,B,F,rt,q,st,ft,_e,be,x,l,pt,Dt,we,et,Me,jt,ke,nt,Ce,ht,Ft,Te,it,Se,Rt,ze,ot,Pe]}class Rr extends J{constructor(t){super();K(this,t,Fr,jr,Y,{onMessage:30},[-1,-1])}}function ko(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:Lt(t)}})]})})}function Ur(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:Lt(t)}})]})})}function Ir(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})]})})}function Co(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})]})})}function To(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})]})})}Object.freeze({__proto__:null,register:ko,registerAll:Ur,isRegistered:Ir,unregister:Co,unregisterAll:To});function So(e,t,n){const i=e.slice();return i[9]=t[n],i}function zo(e){let t,n=e[9]+"",i,o,l,u,c;function p(){return e[8](e[9])}return{c(){t=s("div"),i=z(n),o=g(),l=s("button"),l.textContent="Unregister",a(l,"type","button")},m(f,d){O(f,t,d),r(t,i),r(t,o),r(t,l),u||(c=T(l,"click",p),u=!0)},p(f,d){e=f,d&2&&n!==(n=e[9]+"")&&H(i,n)},d(f){f&&W(t),u=!1,c()}}}function Po(e){let t,n,i;return{c(){t=s("button"),t.textContent="Unregister all",a(t,"type","button")},m(o,l){O(o,t,l),n||(i=T(t,"click",e[5]),n=!0)},p:U,d(o){o&&W(t),n=!1,i()}}}function Nr(e){let t,n,i,o,l,u,c,p,f,d,_=e[1],m=[];for(let v=0;v<_.length;v+=1)m[v]=zo(So(e,_,v));let h=e[1].length&&Po(e);return{c(){t=s("div"),n=s("div"),i=s("input"),o=g(),l=s("button"),l.textContent="Register",u=g(),c=s("div");for(let v=0;v<m.length;v+=1)m[v].c();p=g(),h&&h.c(),a(i,"placeholder","Type a shortcut with '+' as separator..."),a(l,"type","button")},m(v,C){O(v,t,C),r(t,n),r(n,i),A(i,e[0]),r(n,o),r(n,l),r(t,u),r(t,c);for(let w=0;w<m.length;w+=1)m[w].m(c,null);r(c,p),h&&h.m(c,null),f||(d=[T(i,"input",e[7]),T(l,"click",e[3])],f=!0)},p(v,[C]){if(C&1&&i.value!==v[0]&&A(i,v[0]),C&18){_=v[1];let w;for(w=0;w<_.length;w+=1){const P=So(v,_,w);m[w]?m[w].p(P,C):(m[w]=zo(P),m[w].c(),m[w].m(c,p))}for(;w<m.length;w+=1)m[w].d(1);m.length=_.length}v[1].length?h?h.p(v,C):(h=Po(v),h.c(),h.m(c,null)):h&&(h.d(1),h=null)},i:U,o:U,d(v){v&&W(t),Ye(m,v),h&&h.d(),f=!1,Z(d)}}}function qr(e,t,n){let i,{onMessage:o}=t;const l=Gi([]);Ho(e,l,m=>n(1,i=m));let u="CmdOrControl+X";function c(){const m=u;ko(m,()=>{o(`Shortcut ${m} triggered`)}).then(()=>{l.update(h=>[...h,m]),o(`Shortcut ${m} registered successfully`)}).catch(o)}function p(m){const h=m;Co(h).then(()=>{l.update(v=>v.filter(C=>C!==h)),o(`Shortcut ${h} unregistered`)}).catch(o)}function f(){To().then(()=>{l.update(()=>[]),o("Unregistered all shortcuts")}).catch(o)}function d(){u=this.value,n(0,u)}const _=m=>p(m);return e.$$set=m=>{"onMessage"in m&&n(6,o=m.onMessage)},[u,i,l,c,p,f,o,d,_]}class Hr extends J{constructor(t){super();K(this,t,qr,Nr,Y,{onMessage:6})}}function Oo(e){let t,n,i,o,l;return{c(){t=s("input"),n=g(),i=s("button"),i.textContent="Write",a(t,"placeholder","write to stdin"),a(i,"class","button")},m(u,c){O(u,t,c),A(t,e[3]),O(u,n,c),O(u,i,c),o||(l=[T(t,"input",e[10]),T(i,"click",e[7])],o=!0)},p(u,c){c&8&&t.value!==u[3]&&A(t,u[3])},d(u){u&&W(t),u&&W(n),u&&W(i),o=!1,Z(l)}}}function Br(e){let t,n,i,o,l,u,c,p,f,d,_,m,h,v,C,w=e[4]&&Oo(e);return{c(){t=s("div"),n=s("div"),i=s("input"),o=g(),l=s("button"),l.textContent="Run",u=g(),c=s("button"),c.textContent="Kill",p=g(),w&&w.c(),f=g(),d=s("div"),_=s("input"),m=g(),h=s("input"),a(l,"class","button"),a(c,"class","button"),a(_,"placeholder","Working directory"),a(h,"placeholder","Environment variables"),ct(h,"width","300px")},m(P,S){O(P,t,S),r(t,n),r(n,i),A(i,e[0]),r(n,o),r(n,l),r(n,u),r(n,c),r(n,p),w&&w.m(n,null),r(t,f),r(t,d),r(d,_),A(_,e[1]),r(d,m),r(d,h),A(h,e[2]),v||(C=[T(i,"input",e[9]),T(l,"click",e[5]),T(c,"click",e[6]),T(_,"input",e[11]),T(h,"input",e[12])],v=!0)},p(P,[S]){S&1&&i.value!==P[0]&&A(i,P[0]),P[4]?w?w.p(P,S):(w=Oo(P),w.c(),w.m(n,null)):w&&(w.d(1),w=null),S&2&&_.value!==P[1]&&A(_,P[1]),S&4&&h.value!==P[2]&&A(h,P[2])},i:U,o:U,d(P){P&&W(t),w&&w.d(),v=!1,Z(C)}}}function Gr(e,t,n){const i=navigator.userAgent.includes("Windows");let o=i?"cmd":"sh",l=i?["/C"]:["-c"],{onMessage:u}=t,c='echo "hello world"',p=null,f="SOMETHING=value ANOTHER=2",d="",_;function m(){return f.split(" ").reduce((R,j)=>{let[L,I]=j.split("=");return qi(Ni({},R),{[L]:I})},{})}function h(){n(4,_=null);const R=new xi(o,[...l,c],{cwd:p||null,env:m()});R.on("close",j=>{u(`command finished with code ${j.code} and signal ${j.signal}`),n(4,_=null)}),R.on("error",j=>u(`command error: "${j}"`)),R.stdout.on("data",j=>u(`command stdout: "${j}"`)),R.stderr.on("data",j=>u(`command stderr: "${j}"`)),R.spawn().then(j=>{n(4,_=j)}).catch(u)}function v(){_.kill().then(()=>u("killed child process")).catch(u)}function C(){_.write(d).catch(u)}function w(){c=this.value,n(0,c)}function P(){d=this.value,n(3,d)}function S(){p=this.value,n(1,p)}function D(){f=this.value,n(2,f)}return e.$$set=R=>{"onMessage"in R&&n(8,u=R.onMessage)},[c,p,f,d,_,h,v,C,u,w,P,S,D]}class $r extends J{constructor(t){super();K(this,t,Gr,Br,Y,{onMessage:8})}}function Wo(){return b(this,void 0,void 0,function(){function e(){t&&t(),t=void 0}var t;return y(this,function(n){return[2,new Promise(function(i,o){Et("tauri://update-status",function(l){var u;(u=l==null?void 0:l.payload).error?(e(),o(u.error)):u.status==="DONE"&&(e(),i())}).then(function(l){t=l}).catch(function(l){throw e(),l}),Qe("tauri://update-install").catch(function(l){throw e(),l})})]})})}function Lo(){return b(this,void 0,void 0,function(){function e(){t&&t(),t=void 0}var t;return y(this,function(n){return[2,new Promise(function(i,o){jn("tauri://update-available",function(l){var u;u=l==null?void 0:l.payload,e(),i({manifest:u,shouldUpdate:!0})}).catch(function(l){throw e(),l}),Et("tauri://update-status",function(l){var u;(u=l==null?void 0:l.payload).error?(e(),o(u.error)):u.status==="UPTODATE"&&(e(),i({shouldUpdate:!1}))}).then(function(l){t=l}).catch(function(l){throw e(),l}),Qe("tauri://update").catch(function(l){throw e(),l})})]})})}Object.freeze({__proto__:null,installUpdate:Wo,checkUpdate:Lo});function Vr(e){let t,n,i,o,l,u;return{c(){t=s("div"),n=s("button"),n.textContent="Check update",i=g(),o=s("button"),o.textContent="Install update",a(n,"class","button"),a(n,"id","check_update"),a(o,"class","button hidden"),a(o,"id","start_update")},m(c,p){O(c,t,p),r(t,n),r(t,i),r(t,o),l||(u=[T(n,"click",e[0]),T(o,"click",e[1])],l=!0)},p:U,i:U,o:U,d(c){c&&W(t),l=!1,Z(u)}}}function Jr(e,t,n){let{onMessage:i}=t,o;he(async()=>{o=await Et("tauri://update-status",i)}),Wn(()=>{o&&o()});async function l(){try{document.getElementById("check_update").classList.add("hidden");const{shouldUpdate:c,manifest:p}=await Lo();i(`Should update: ${c}`),i(p),c&&document.getElementById("start_update").classList.remove("hidden")}catch(c){i(c)}}async function u(){try{document.getElementById("start_update").classList.add("hidden"),await Wo(),i("Installation complete, restart required."),await Dn()}catch(c){i(c)}}return e.$$set=c=>{"onMessage"in c&&n(2,i=c.onMessage)},[l,u,i]}class Kr extends J{constructor(t){super();K(this,t,Jr,Vr,Y,{onMessage:2})}}function Eo(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})]})})}function Ao(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"Clipboard",message:{cmd:"readText"}})]})})}Object.freeze({__proto__:null,writeText:Eo,readText:Ao});function Yr(e){let t,n,i,o,l,u,c,p,f;return{c(){t=s("div"),n=s("div"),i=s("input"),o=g(),l=s("button"),l.textContent="Write",u=g(),c=s("button"),c.textContent="Read",a(i,"placeholder","Text to write to the clipboard"),a(l,"type","button"),a(c,"type","button")},m(d,_){O(d,t,_),r(t,n),r(n,i),A(i,e[0]),r(n,o),r(n,l),r(t,u),r(t,c),p||(f=[T(i,"input",e[4]),T(l,"click",e[1]),T(c,"click",e[2])],p=!0)},p(d,[_]){_&1&&i.value!==d[0]&&A(i,d[0])},i:U,o:U,d(d){d&&W(t),p=!1,Z(f)}}}function Xr(e,t,n){let{onMessage:i}=t,o="clipboard message";function l(){Eo(o).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){Ao().then(p=>{i(`Clipboard contents: ${p}`)}).catch(i)}function c(){o=this.value,n(0,o)}return e.$$set=p=>{"onMessage"in p&&n(3,i=p.onMessage)},[o,l,u,i,c]}class Qr extends J{constructor(t){super();K(this,t,Xr,Yr,Y,{onMessage:3})}}function Zr(e){let t;return{c(){t=s("div"),t.innerHTML=`<div class="alert"><p>Not available for Linux</p></div>
  35. <video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`},m(n,i){O(n,t,i)},p:U,i:U,o:U,d(n){n&&W(t)}}}function xr(e,t,n){let{onMessage:i}=t;const o=window.constraints={audio:!0,video:!0};function l(c){const p=document.querySelector("video"),f=c.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${f[0].label}`),window.stream=c,p.srcObject=c}function u(c){if(c.name==="ConstraintNotSatisfiedError"){const p=o.video;i(`The resolution ${p.width.exact}x${p.height.exact} px is not supported by your device.`)}else c.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${c.name}`,c)}return he(async()=>{try{const c=await navigator.mediaDevices.getUserMedia(o);l(c)}catch(c){u(c)}}),Wn(()=>{window.stream.getTracks().forEach(function(c){c.stop()})}),e.$$set=c=>{"onMessage"in c&&n(0,i=c.onMessage)},[i]}class tl extends J{constructor(t){super();K(this,t,xr,Zr,Y,{onMessage:0})}}function el(e){let t,n,i,o,l,u,c,p,f,d,_,m;return{c(){t=s("input"),n=g(),i=s("input"),o=g(),l=s("button"),l.textContent="Post it.",u=g(),c=s("p"),c.textContent="Result:",p=g(),f=s("pre"),d=z(e[2]),a(l,"type","button")},m(h,v){O(h,t,v),A(t,e[0]),O(h,n,v),O(h,i,v),A(i,e[1]),O(h,o,v),O(h,l,v),O(h,u,v),O(h,c,v),O(h,p,v),O(h,f,v),r(f,d),_||(m=[T(t,"input",e[4]),T(i,"input",e[5]),T(l,"click",e[3])],_=!0)},p(h,[v]){v&1&&t.value!==h[0]&&A(t,h[0]),v&2&&i.value!==h[1]&&A(i,h[1]),v&4&&H(d,h[2])},i:U,o:U,d(h){h&&W(t),h&&W(n),h&&W(i),h&&W(o),h&&W(l),h&&W(u),h&&W(c),h&&W(p),h&&W(f),_=!1,Z(m)}}}function nl(e,t,n){let i="baz",o="qux",l=null;async function u(){let f=navigator.userAgent.includes("Windows")?"https://customprotocol.test/example.html":"customprotocol://test/example.html";const _=await(await fetch(f,{method:"POST",body:JSON.stringify({foo:i,bar:o})})).json();n(2,l=JSON.stringify(_))}function c(){i=this.value,n(0,i)}function p(){o=this.value,n(1,o)}return[i,o,l,u,c,p]}class il extends J{constructor(t){super();K(this,t,nl,el,Y,{})}}function Do(e,t,n){const i=e.slice();return i[9]=t[n],i}function jo(e){let t,n=e[9].label+"",i,o,l,u,c;function p(){return e[7](e[9])}return{c(){t=s("p"),i=z(n),o=g(),a(t,"class",l="nv noselect "+(e[0]===e[9]?"nv_selected":""))},m(f,d){O(f,t,d),r(t,i),r(t,o),u||(c=T(t,"click",p),u=!0)},p(f,d){e=f,d&1&&l!==(l="nv noselect "+(e[0]===e[9]?"nv_selected":""))&&a(t,"class",l)},d(f){f&&W(t),u=!1,c()}}}function ol(e){let t,n,i,o,l,u,c,p,f,d,_,m,h,v,C,w,P,S,D,R,j,L,I,G=e[2],B=[];for(let F=0;F<G.length;F+=1)B[F]=jo(Do(e,G,F));var Q=e[0].component;function tt(F){return{props:{onMessage:F[5]}}}return Q&&(m=new Q(tt(e))),{c(){t=s("main"),n=s("div"),i=s("img"),l=g(),u=s("div"),u.innerHTML=`<a class="dark-link" target="_blank" href="https://tauri.studio/en/docs/getting-started/intro">Documentation</a>
  36. <a class="dark-link" target="_blank" href="https://github.com/tauri-apps/tauri">Github</a>
  37. <a class="dark-link" target="_blank" href="https://github.com/tauri-apps/tauri/tree/dev/tauri/examples/api">Source</a>`,c=g(),p=s("div"),f=s("div");for(let F=0;F<B.length;F+=1)B[F].c();d=g(),_=s("div"),m&&$i(m.$$.fragment),h=g(),v=s("div"),C=s("p"),w=s("strong"),w.textContent="Tauri Console",P=g(),S=s("a"),S.textContent="clear",D=g(),a(i,"class","logo"),i.src!==(o="tauri logo.png")&&a(i,"src",o),a(i,"height","60"),a(i,"alt","logo"),a(n,"class","flex row noselect just-around"),a(n,"style","margin=1em;"),a(n,"data-tauri-drag-region",""),ct(f,"width","15em"),ct(f,"margin-left","0.5em"),a(_,"class","content"),a(p,"class","flex row"),a(S,"class","nv"),a(C,"class","flex row just-around"),R=new Go(null),a(v,"id","response"),ct(v,"white-space","pre-line")},m(F,rt){O(F,t,rt),r(t,n),r(n,i),r(n,l),r(n,u),r(t,c),r(t,p),r(p,f);for(let q=0;q<B.length;q+=1)B[q].m(f,null);r(p,d),r(p,_),m&&Vi(m,_,null),r(t,h),r(t,v),r(v,C),r(C,w),r(C,P),r(C,S),r(v,D),R.m(e[1],v),j=!0,L||(I=[T(i,"click",e[6]),T(S,"click",e[8])],L=!0)},p(F,[rt]){if(rt&21){G=F[2];let q;for(q=0;q<G.length;q+=1){const st=Do(F,G,q);B[q]?B[q].p(st,rt):(B[q]=jo(st),B[q].c(),B[q].m(f,null))}for(;q<B.length;q+=1)B[q].d(1);B.length=G.length}if(Q!==(Q=F[0].component)){if(m){$o();const q=m;Ji(q.$$.fragment,1,0,()=>{Yi(q,1)}),Bo()}Q?(m=new Q(tt(F)),$i(m.$$.fragment),Ki(m.$$.fragment,1),Vi(m,_,null)):m=null}(!j||rt&2)&&R.p(F[1])},i(F){j||(m&&Ki(m.$$.fragment,F),j=!0)},o(F){m&&Ji(m.$$.fragment,F),j=!1},d(F){F&&W(t),Ye(B,F),m&&Yi(m),L=!1,Z(I)}}}const rl="ctrl+b";function ll(e,t,n){he(()=>{Vo(rl,()=>{me("menu_toggle")})});const i=[{label:"Welcome",component:Qo},{label:"Messages",component:ir},{label:"CLI",component:tr},{label:"Dialog",component:br},{label:"File system",component:kr},{label:"HTTP",component:zr},{label:"HTTP Form",component:il},{label:"Notifications",component:Wr},{label:"Window",component:Rr},{label:"Shortcuts",component:Hr},{label:"Shell",component:$r},{label:"Updater",component:Kr},{label:"Clipboard",component:Qr},{label:"WebRTC",component:tl}];let o=i[0],l=Gi([]),u="";function c(m){n(0,o=m)}function p(m){l.update(h=>[`[${new Date().toLocaleTimeString()}]: `+(typeof m=="string"?m:JSON.stringify(m)),...h])}function f(){An("https://tauri.studio/")}return he(()=>{l.subscribe(m=>{n(1,u=m.join(`
  38. `))})}),[o,u,i,l,c,p,f,m=>c(m),()=>{l.update(()=>[])}]}class sl extends J{constructor(t){super();K(this,t,ll,ol,Y,{})}}new sl({target:document.body});