bundle.js 55 KB

1234567891011
  1. 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 a(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function s(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 r(e,t){e.appendChild(t)}function c(e,t,n){e.insertBefore(t,n||null)}function l(e){e.parentNode.removeChild(e)}function u(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function d(e){return document.createElement(e)}function p(e){return document.createTextNode(e)}function h(){return p(" ")}function m(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function f(e){return function(t){return t.preventDefault(),e.call(this,t)}}function g(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function y(e){return""===e?null:+e}function b(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function _(e,t){e.value=null==t?"":t}function v(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function w(e,t){for(let n=0;n<e.options.length;n+=1){const i=e.options[n];if(i.__value===t)return void(i.selected=!0)}}function x(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}class M{constructor(e=null){this.a=e,this.e=this.n=null}m(e,t,n=null){this.e||(this.e=d(t.nodeName),this.t=t,this.h(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)c(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(l)}}let k;function $(e){k=e}function C(){if(!k)throw new Error("Function called outside component initialization");return k}function T(e){C().$$.on_mount.push(e)}function O(e){C().$$.on_destroy.push(e)}const S=[],E=[],z=[],P=[],A=Promise.resolve();let W=!1;function j(e){z.push(e)}let L=!1;const F=new Set;function D(){if(!L){L=!0;do{for(let e=0;e<S.length;e+=1){const t=S[e];$(t),R(t.$$)}for($(null),S.length=0;E.length;)E.pop()();for(let e=0;e<z.length;e+=1){const t=z[e];F.has(t)||(F.add(t),t())}z.length=0}while(S.length);for(;P.length;)P.pop()();W=!1,L=!1,F.clear()}}function R(e){if(null!==e.fragment){e.update(),i(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(j)}}const U=new Set;let I;function N(e,t){e&&e.i&&(U.delete(e),e.i(t))}function q(e,t,n,i){if(e&&e.o){if(U.has(e))return;U.add(e),I.c.push((()=>{U.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}function K(e){e&&e.c()}function B(e,n,a,s){const{fragment:r,on_mount:c,on_destroy:l,after_update:u}=e.$$;r&&r.m(n,a),s||j((()=>{const n=c.map(t).filter(o);l?l.push(...n):i(n),e.$$.on_mount=[]})),u.forEach(j)}function H(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 G(e,t){-1===e.$$.dirty[0]&&(S.push(e),W||(W=!0,A.then(D)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function V(t,o,a,s,r,c,u=[-1]){const d=k;$(t);const p=t.$$={fragment:null,ctx:null,props:c,update:e,not_equal:r,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:[]),callbacks:n(),dirty:u,skip_bound:!1};let h=!1;if(p.ctx=a?a(t,o.props||{},((e,n,...i)=>{const o=i.length?i[0]:n;return p.ctx&&r(p.ctx[e],p.ctx[e]=o)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](o),h&&G(t,e)),n})):[],p.update(),h=!0,i(p.before_update),p.fragment=!!s&&s(p.ctx),o.target){if(o.hydrate){const e=function(e){return Array.from(e.childNodes)}(o.target);p.fragment&&p.fragment.l(e),e.forEach(l)}else p.fragment&&p.fragment.c();o.intro&&N(t.$$.fragment),B(t,o.target,o.anchor,o.customElement),D()}$(d)}class J{$destroy(){H(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)}}const X=[];function Y(t,n=e){let i;const o=[];function s(e){if(a(t,e)&&(t=e,i)){const e=!X.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),X.push(n,t)}if(e){for(let e=0;e<X.length;e+=2)X[e][0](X[e+1]);X.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(a,r=e){const c=[a,r];return o.push(c),1===o.length&&(i=n(s)||e),a(t),()=>{const e=o.indexOf(c);-1!==e&&o.splice(e,1),0===o.length&&(i(),i=null)}}}}
  2. /*!
  3. * hotkeys-js v3.8.5
  4. * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
  5. *
  6. * Copyright (c) 2021 kenny wong <wowohoo@qq.com>
  7. * http://jaywcjlove.github.io/hotkeys
  8. *
  9. * Licensed under the MIT license.
  10. */var Q="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function Z(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on".concat(t),(function(){n(window.event)}))}function ee(e,t){for(var n=t.slice(0,t.length-1),i=0;i<n.length;i++)n[i]=e[n[i].toLowerCase()];return n}function te(e){"string"!=typeof e&&(e="");for(var t=(e=e.replace(/\s/g,"")).split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}for(var ne={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Q?173:189,"=":Q?61:187,";":Q?59:186,"'":222,"[":219,"]":221,"\\":220},ie={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},oe={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},ae={16:!1,18:!1,17:!1,91:!1},se={},re=1;re<20;re++)ne["f".concat(re)]=111+re;var ce=[],le="all",ue=[],de=function(e){return ne[e.toLowerCase()]||ie[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function pe(e){le=e||"all"}function he(){return le||"all"}var me=function(e){var t=e.key,n=e.scope,i=e.method,o=e.splitKey,a=void 0===o?"+":o;te(t).forEach((function(e){var t=e.split(a),o=t.length,s=t[o-1],r="*"===s?"*":de(s);if(se[r]){n||(n=he());var c=o>1?ee(ie,t):[];se[r]=se[r].map((function(e){return(!i||e.method===i)&&e.scope===n&&function(e,t){for(var n=e.length>=t.length?e:t,i=e.length>=t.length?t:e,o=!0,a=0;a<n.length;a++)-1===i.indexOf(n[a])&&(o=!1);return o}(e.mods,c)?{}:e}))}}))};function fe(e,t,n){var i;if(t.scope===n||"all"===t.scope){for(var o in i=t.mods.length>0,ae)Object.prototype.hasOwnProperty.call(ae,o)&&(!ae[o]&&t.mods.indexOf(+o)>-1||ae[o]&&-1===t.mods.indexOf(+o))&&(i=!1);(0!==t.mods.length||ae[16]||ae[18]||ae[17]||ae[91])&&!i&&"*"!==t.shortcut||!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function ge(e){var t=se["*"],n=e.keyCode||e.which||e.charCode;if(ye.filter.call(this,e)){if(93!==n&&224!==n||(n=91),-1===ce.indexOf(n)&&229!==n&&ce.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(t){var n=oe[t];e[t]&&-1===ce.indexOf(n)?ce.push(n):!e[t]&&ce.indexOf(n)>-1?ce.splice(ce.indexOf(n),1):"metaKey"===t&&e[t]&&3===ce.length&&(e.ctrlKey||e.shiftKey||e.altKey||(ce=ce.slice(ce.indexOf(n))))})),n in ae){for(var i in ae[n]=!0,ie)ie[i]===n&&(ye[i]=!0);if(!t)return}for(var o in ae)Object.prototype.hasOwnProperty.call(ae,o)&&(ae[o]=e[oe[o]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===ce.indexOf(17)&&ce.push(17),-1===ce.indexOf(18)&&ce.push(18),ae[17]=!0,ae[18]=!0);var a=he();if(t)for(var s=0;s<t.length;s++)t[s].scope===a&&("keydown"===e.type&&t[s].keydown||"keyup"===e.type&&t[s].keyup)&&fe(e,t[s],a);if(n in se)for(var r=0;r<se[n].length;r++)if(("keydown"===e.type&&se[n][r].keydown||"keyup"===e.type&&se[n][r].keyup)&&se[n][r].key){for(var c=se[n][r],l=c.splitKey,u=c.key.split(l),d=[],p=0;p<u.length;p++)d.push(de(u[p]));d.sort().join("")===ce.sort().join("")&&fe(e,c,a)}}}function ye(e,t,n){ce=[];var i=te(e),o=[],a="all",s=document,r=0,c=!1,l=!0,u="+";for(void 0===n&&"function"==typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(a=t.scope),t.element&&(s=t.element),t.keyup&&(c=t.keyup),void 0!==t.keydown&&(l=t.keydown),"string"==typeof t.splitKey&&(u=t.splitKey)),"string"==typeof t&&(a=t);r<i.length;r++)o=[],(e=i[r].split(u)).length>1&&(o=ee(ie,e)),(e="*"===(e=e[e.length-1])?"*":de(e))in se||(se[e]=[]),se[e].push({keyup:c,keydown:l,scope:a,mods:o,shortcut:i[r],method:n,key:i[r],splitKey:u});void 0!==s&&!function(e){return ue.indexOf(e)>-1}(s)&&window&&(ue.push(s),Z(s,"keydown",(function(e){ge(e)})),Z(window,"focus",(function(){ce=[]})),Z(s,"keyup",(function(e){ge(e),function(e){var t=e.keyCode||e.which||e.charCode,n=ce.indexOf(t);if(n>=0&&ce.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&ce.splice(0,ce.length),93!==t&&224!==t||(t=91),t in ae)for(var i in ae[t]=!1,ie)ie[i]===t&&(ye[i]=!1)}(e)})))}var be,_e={setScope:pe,getScope:he,deleteScope:function(e,t){var n,i;for(var o in e||(e=he()),se)if(Object.prototype.hasOwnProperty.call(se,o))for(n=se[o],i=0;i<n.length;)n[i].scope===e?n.splice(i,1):i++;he()===e&&pe(t||"all")},getPressedKeyCodes:function(){return ce.slice(0)},isPressed:function(e){return"string"==typeof e&&(e=de(e)),-1!==ce.indexOf(e)},filter:function(e){var t=e.target||e.srcElement,n=t.tagName,i=!0;return!t.isContentEditable&&("INPUT"!==n&&"TEXTAREA"!==n&&"SELECT"!==n||t.readOnly)||(i=!1),i},unbind:function(e){if(e){if(Array.isArray(e))e.forEach((function(e){e.key&&me(e)}));else if("object"==typeof e)e.key&&me(e);else if("string"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var o=n[0],a=n[1];"function"==typeof o&&(a=o,o=""),me({key:e,scope:o,method:a,splitKey:"+"})}}else Object.keys(se).forEach((function(e){return delete se[e]}))}};for(var ve in _e)Object.prototype.hasOwnProperty.call(_e,ve)&&(ye[ve]=_e[ve]);if("undefined"!=typeof window){var we=window.hotkeys;ye.noConflict=function(e){return e&&window.hotkeys===ye&&(window.hotkeys=we),ye},window.hotkeys=ye}function xe(e,t=!1){const n=function(){const e=new Int8Array(1);window.crypto.getRandomValues(e);const t=new Uint8Array(Math.max(16,Math.abs(e[0])));return window.crypto.getRandomValues(t),t.join("")}();return Object.defineProperty(window,n,{value:i=>(t&&Reflect.deleteProperty(window,n),e?.(i)),writable:!1,configurable:!0}),n}async function Me(e,t={}){return new Promise(((n,i)=>{const o=xe((e=>{n(e),Reflect.deleteProperty(window,a)}),!0),a=xe((e=>{i(e),Reflect.deleteProperty(window,o)}),!0);window.rpc.notify(e,{__invokeKey:__TAURI_INVOKE_KEY__,callback:o,error:a,...t})}))}function ke(e){return navigator.userAgent.includes("Windows")?`https://custom.protocol.asset_${e}`:`asset://${e}`}async function $e(e){return Me("tauri",e)}Object.freeze({__proto__:null,transformCallback:xe,invoke:Me,convertFileSrc:ke});class Ce{constructor(){this.eventListeners=Object.create(null)}addEventListener(e,t){e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t]}_emit(e,t){if(e in this.eventListeners){const n=this.eventListeners[e];for(const e of n)e(t)}}on(e,t){return this.addEventListener(e,t),this}}class Te{constructor(e){this.pid=e}async write(e){return $e({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:e}})}async kill(){return $e({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}}class Oe extends Ce{constructor(e,t=[],n){super(),this.stdout=new Ce,this.stderr=new Ce,this.program=e,this.args="string"==typeof t?[t]:t,this.options=n??{}}static sidecar(e,t=[],n){const i=new Oe(e,t,n);return i.options.sidecar=!0,i}async spawn(){return async function(e,t,n,i){return"object"==typeof n&&Object.freeze(n),$e({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:"string"==typeof n?[n]:n,options:i,onEventFn:xe(e)}})}((e=>{switch(e.event){case"Error":this._emit("error",e.payload);break;case"Terminated":this._emit("close",e.payload);break;case"Stdout":this.stdout._emit("data",e.payload);break;case"Stderr":this.stderr._emit("data",e.payload)}}),this.program,this.args,this.options).then((e=>new Te(e)))}async execute(){return new Promise(((e,t)=>{this.on("error",t);const n=[],i=[];this.stdout.on("data",(e=>{n.push(e)})),this.stderr.on("data",(e=>{i.push(e)})),this.on("close",(t=>{e({code:t.code,signal:t.signal,stdout:n.join("\n"),stderr:i.join("\n")})})),this.spawn().catch(t)}))}}async function Se(e,t){return $e({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}async function Ee(e,t,n){await $e({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function ze(e){return $e({__tauriModule:"Event",message:{cmd:"unlisten",eventId:e}})}async function Pe(e,t){return $e({__tauriModule:"Event",message:{cmd:"listen",event:e,handler:xe(t)}}).then((e=>async()=>ze(e)))}async function Ae(e,t){return Pe(e,(e=>{t(e),ze(e.id).catch((()=>{}))}))}async function We(e,t){return Ee(e,void 0,t)}Object.freeze({__proto__:null,Command:Oe,Child:Te,open:Se}),Object.freeze({__proto__:null,listen:Pe,once:Ae,emit:We});class je{constructor(e,t){this.type="Logical",this.width=e,this.height=t}}class Le{constructor(e,t){this.type="Logical",this.x=e,this.y=t}}function Fe(){return new Ne(window.__TAURI__.__currentWindow.label,{skip:!0})}function De(){return window.__TAURI__.__windows.map((e=>new Ne(e.label,{skip:!0})))}!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(be||(be={}));const Re=["tauri://created","tauri://error"];class Ue{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const n=this.listeners[e];n.splice(n.indexOf(t),1)})):Pe(e,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const n=this.listeners[e];n.splice(n.indexOf(t),1)})):Ae(e,t)}async emit(e,t){if(Re.includes(e)){for(const n of this.listeners[e]||[])n({event:e,id:-1,payload:t});return Promise.resolve()}return Ee(e,this.label,t)}_handleTauriEvent(e,t){return!!Re.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}}class Ie extends Ue{async scaleFactor(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}})}async outerPosition(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}})}async innerSize(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}})}async outerSize(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}})}async isFullscreen(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMaximized(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async center(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(t=e===be.Critical?{type:"Critical"}:{type:"Informational"}),$e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setAlwaysOnTop(e){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:e}}}}})}async setSkipTaskbar(e){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async startDragging(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}}class Ne extends Ie{constructor(e,t={}){super(e),t?.skip||$e({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return De().some((t=>t.label===e))?new Ne(e,{skip:!0}):null}}const qe=new Ne(null,{skip:!0});async function Ke(){return $e({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function Be(){return $e({__tauriModule:"App",message:{cmd:"getAppName"}})}async function He(){return $e({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function Ge(e=0){return $e({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function Ve(){return $e({__tauriModule:"Process",message:{cmd:"relaunch"}})}function Je(t){let n,o,a,s,u,f,y,_,v,w,x,M,k,$,C,T,O,S,E,z,P;return{c(){n=d("h1"),n.textContent="Welcome",o=h(),a=d("p"),a.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.",s=h(),u=d("p"),f=p("Current App version: "),y=p(t[0]),_=h(),v=d("p"),w=p("Current Tauri version: "),x=p(t[1]),M=h(),k=d("p"),$=p("Current App name: "),C=p(t[2]),T=h(),O=d("button"),O.textContent="Close application",S=h(),E=d("button"),E.textContent="Relaunch application",g(O,"class","button"),g(E,"class","button")},m(e,i){c(e,n,i),c(e,o,i),c(e,a,i),c(e,s,i),c(e,u,i),r(u,f),r(u,y),c(e,_,i),c(e,v,i),r(v,w),r(v,x),c(e,M,i),c(e,k,i),r(k,$),r(k,C),c(e,T,i),c(e,O,i),c(e,S,i),c(e,E,i),z||(P=[m(O,"click",t[3]),m(E,"click",t[4])],z=!0)},p(e,[t]){1&t&&b(y,e[0]),2&t&&b(x,e[1]),4&t&&b(C,e[2])},i:e,o:e,d(e){e&&l(n),e&&l(o),e&&l(a),e&&l(s),e&&l(u),e&&l(_),e&&l(v),e&&l(M),e&&l(k),e&&l(T),e&&l(O),e&&l(S),e&&l(E),z=!1,i(P)}}}function Xe(e,t,n){let i=0,o=0,a="Unknown";return Be().then((e=>{n(2,a=e)})),Ke().then((e=>{n(0,i=e)})),He().then((e=>{n(1,o=e)})),[i,o,a,async function(){await Ge()},async function(){await Ve()}]}Object.freeze({__proto__:null,WebviewWindow:Ne,WebviewWindowHandle:Ue,WindowManager:Ie,getCurrent:Fe,getAll:De,appWindow:qe,LogicalSize:je,PhysicalSize:class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new je(this.width/e,this.height/e)}},LogicalPosition:Le,PhysicalPosition:class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Le(this.x/e,this.y/e)}},get UserAttentionType(){return be},currentMonitor:async function(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}})},primaryMonitor:async function(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}})},availableMonitors:async function(){return $e({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}})}}),Object.freeze({__proto__:null,getName:Be,getVersion:Ke,getTauriVersion:He}),Object.freeze({__proto__:null,exit:Ge,relaunch:Ve});class Ye extends J{constructor(e){super(),V(this,e,Xe,Je,a,{})}}async function Qe(){return $e({__tauriModule:"Cli",message:{cmd:"cliMatches"}})}function Ze(t){let n,i,o,a,s,u,f,y,b,_,v;return{c(){n=d("div"),i=p("This binary can be run on the terminal and takes the following arguments:\n "),o=d("ul"),o.innerHTML="<li>--config PATH</li> \n <li>--theme light|dark|system</li> \n <li>--verbose</li>",a=p("\n Additionally, it has a "),s=d("i"),s.textContent="update --background",u=p(" subcommand.\n Note that the arguments are only parsed, not implemented.\n "),f=d("br"),y=h(),b=d("button"),b.textContent="Get matches",g(b,"class","button"),g(b,"id","cli-matches")},m(e,l){c(e,n,l),r(n,i),r(n,o),r(n,a),r(n,s),r(n,u),r(n,f),r(n,y),r(n,b),_||(v=m(b,"click",t[0]),_=!0)},p:e,i:e,o:e,d(e){e&&l(n),_=!1,v()}}}function et(e,t,n){let{onMessage:i}=t;return e.$$set=e=>{"onMessage"in e&&n(1,i=e.onMessage)},[function(){Qe().then(i).catch(i)},i]}Object.freeze({__proto__:null,getMatches:Qe});class tt extends J{constructor(e){super(),V(this,e,et,Ze,a,{onMessage:1})}}function nt(t){let n,o,a,s,u,p,f,y;return{c(){n=d("div"),o=d("button"),o.textContent="Call Log API",a=h(),s=d("button"),s.textContent="Call Request (async) API",u=h(),p=d("button"),p.textContent="Send event to Rust",g(o,"class","button"),g(o,"id","log"),g(s,"class","button"),g(s,"id","request"),g(p,"class","button"),g(p,"id","event")},m(e,i){c(e,n,i),r(n,o),r(n,a),r(n,s),r(n,u),r(n,p),f||(y=[m(o,"click",t[0]),m(s,"click",t[1]),m(p,"click",t[2])],f=!0)},p:e,i:e,o:e,d(e){e&&l(n),f=!1,i(y)}}}function it(e,t,n){let i,{onMessage:o}=t;return T((async()=>{i=await Pe("rust-event",o)})),O((()=>{i&&i()})),e.$$set=e=>{"onMessage"in e&&n(3,o=e.onMessage)},[function(){Me("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})},function(){Me("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(o).catch(o)},function(){We("js-event","this is the payload string")},o]}class ot extends J{constructor(e){super(),V(this,e,it,nt,a,{onMessage:3})}}async function at(e={}){return"object"==typeof e&&Object.freeze(e),$e({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function st(e={}){return"object"==typeof e&&Object.freeze(e),$e({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}var rt,ct;async function lt(e,t={}){return $e({__tauriModule:"Fs",message:{cmd:"readBinaryFile",path:e,options:t}})}function ut(e){const t=function(e){if(e.length<65536)return String.fromCharCode.apply(null,Array.from(e));let t="";const n=e.length;for(let i=0;i<n;i++){const n=e.subarray(65536*i,65536*(i+1));t+=String.fromCharCode.apply(null,Array.from(n))}return t}(new Uint8Array(e));return btoa(t)}async function dt(e,t={}){return $e({__tauriModule:"Fs",message:{cmd:"readDir",path:e,options:t}})}function pt(t){let n,o,a,s,u,p,f,y,b,v,w,x,M,k,$,C,T,O,S,E;return{c(){n=d("div"),o=d("input"),a=h(),s=d("input"),u=h(),p=d("div"),f=d("input"),y=h(),b=d("label"),b.textContent="Multiple",v=h(),w=d("div"),x=d("input"),M=h(),k=d("label"),k.textContent="Directory",$=h(),C=d("button"),C.textContent="Open dialog",T=h(),O=d("button"),O.textContent="Open save dialog",g(o,"id","dialog-default-path"),g(o,"placeholder","Default path"),g(s,"id","dialog-filter"),g(s,"placeholder","Extensions filter, comma-separated"),g(s,"class","svelte-1eg58yg"),g(f,"type","checkbox"),g(f,"id","dialog-multiple"),g(b,"for","dialog-multiple"),g(x,"type","checkbox"),g(x,"id","dialog-directory"),g(k,"for","dialog-directory"),g(C,"class","button"),g(C,"id","open-dialog"),g(O,"class","button"),g(O,"id","save-dialog")},m(e,i){c(e,n,i),r(n,o),_(o,t[0]),r(n,a),r(n,s),_(s,t[1]),r(n,u),r(n,p),r(p,f),f.checked=t[2],r(p,y),r(p,b),r(n,v),r(n,w),r(w,x),x.checked=t[3],r(w,M),r(w,k),r(n,$),r(n,C),r(n,T),r(n,O),S||(E=[m(o,"input",t[7]),m(s,"input",t[8]),m(f,"change",t[9]),m(x,"change",t[10]),m(C,"click",t[4]),m(O,"click",t[5])],S=!0)},p(e,[t]){1&t&&o.value!==e[0]&&_(o,e[0]),2&t&&s.value!==e[1]&&_(s,e[1]),4&t&&(f.checked=e[2]),8&t&&(x.checked=e[3])},i:e,o:e,d(e){e&&l(n),S=!1,i(E)}}}function ht(e,t,n){let{onMessage:i}=t,o=null,a=null,s=!1,r=!1;return e.$$set=e=>{"onMessage"in e&&n(6,i=e.onMessage)},[o,a,s,r,function(){at({defaultPath:o,filters:a?[{name:"Tauri Example",extensions:a.split(",").map((e=>e.trim()))}]:[],multiple:s,directory:r}).then((function(e){if(Array.isArray(e))i(e);else{var t=e,n=t.match(/\S+\.\S+$/g);lt(t).then((function(o){var a,s,r,c;n&&(t.includes(".png")||t.includes(".jpg"))?(a=new Uint8Array(o),s=function(e){i('<img src="data:image/png;base64,'+e+'"></img>')},r=new Blob([a],{type:"application/octet-binary"}),(c=new FileReader).onload=function(e){var t=e.target.result;s(t.substr(t.indexOf(",")+1))},c.readAsDataURL(r)):i(e)})).catch(i(e))}})).catch(i)},function(){st({defaultPath:o,filters:a?[{name:"Tauri Example",extensions:a.split(",").map((e=>e.trim()))}]:[]}).then(i).catch(i)},i,function(){o=this.value,n(0,o)},function(){a=this.value,n(1,a)},function(){s=this.checked,n(2,s)},function(){r=this.checked,n(3,r)}]}Object.freeze({__proto__:null,open:at,save:st}),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"}(rt||(rt={})),Object.freeze({__proto__:null,get BaseDirectory(){return rt},get Dir(){return rt},readTextFile:async function(e,t={}){return $e({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})},readBinaryFile:lt,writeFile:async function(e,t={}){return"object"==typeof t&&Object.freeze(t),"object"==typeof e&&Object.freeze(e),$e({__tauriModule:"Fs",message:{cmd:"writeFile",path:e.path,contents:e.contents,options:t}})},writeBinaryFile:async function(e,t={}){return"object"==typeof t&&Object.freeze(t),"object"==typeof e&&Object.freeze(e),$e({__tauriModule:"Fs",message:{cmd:"writeBinaryFile",path:e.path,contents:ut(e.contents),options:t}})},readDir:dt,createDir:async function(e,t={}){return $e({__tauriModule:"Fs",message:{cmd:"createDir",path:e,options:t}})},removeDir:async function(e,t={}){return $e({__tauriModule:"Fs",message:{cmd:"removeDir",path:e,options:t}})},copyFile:async function(e,t,n={}){return $e({__tauriModule:"Fs",message:{cmd:"copyFile",source:e,destination:t,options:n}})},removeFile:async function(e,t={}){return $e({__tauriModule:"Fs",message:{cmd:"removeFile",path:e,options:t}})},renameFile:async function(e,t,n={}){return $e({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:e,newPath:t,options:n}})}});class mt extends J{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}",r(document.head,t)),V(this,e,ht,pt,a,{onMessage:6})}}function ft(e,t,n){const i=e.slice();return i[8]=t[n],i}function gt(t){let n,i,o=t[8][0]+"";return{c(){n=d("option"),i=p(o),n.__value=t[8][1],n.value=n.__value},m(e,t){c(e,n,t),r(n,i)},p:e,d(e){e&&l(n)}}}function yt(t){let n,o,a,s,p,y,b,v,w,x,M,k,$,C=t[2],T=[];for(let e=0;e<C.length;e+=1)T[e]=gt(ft(t,C,e));return{c(){n=d("form"),o=d("select"),a=d("option"),a.textContent="None";for(let e=0;e<T.length;e+=1)T[e].c();s=h(),p=d("input"),y=h(),b=d("button"),b.textContent="Read",v=h(),w=d("button"),w.textContent="Use as img src",x=h(),M=d("img"),a.__value="",a.value=a.__value,g(o,"class","button"),g(o,"id","dir"),g(p,"id","path-to-read"),g(p,"placeholder","Type the path to read..."),g(b,"class","button"),g(b,"id","read"),g(w,"class","button"),g(w,"type","button"),g(M,"alt","file")},m(e,i){c(e,n,i),r(n,o),r(o,a);for(let e=0;e<T.length;e+=1)T[e].m(o,null);r(n,s),r(n,p),_(p,t[0]),r(n,y),r(n,b),r(n,v),r(n,w),r(n,x),r(n,M),t[7](M),k||($=[m(p,"input",t[6]),m(w,"click",t[4]),m(n,"submit",f(t[3]))],k=!0)},p(e,[t]){if(4&t){let n;for(C=e[2],n=0;n<C.length;n+=1){const i=ft(e,C,n);T[n]?T[n].p(i,t):(T[n]=gt(i),T[n].c(),T[n].m(o,null))}for(;n<T.length;n+=1)T[n].d(1);T.length=C.length}1&t&&p.value!==e[0]&&_(p,e[0])},i:e,o:e,d(e){e&&l(n),u(T,e),t[7](null),k=!1,i($)}}}function bt(){return document.getElementById("dir").value?parseInt(dir.value):null}function _t(e,t,n){let i,{onMessage:o}=t,a="";const s=Object.keys(rt).filter((e=>isNaN(parseInt(e)))).map((e=>[e,rt[e]]));return e.$$set=e=>{"onMessage"in e&&n(5,o=e.onMessage)},[a,i,s,function(){const e=a.match(/\S+\.\S+$/g),t={dir:bt()};(e?lt(a,t):dt(a,t)).then((function(t){if(e)if(a.includes(".png")||a.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){o('<img src="'+("data:image/png;base64,"+e)+'"></img>')}));else{const e=String.fromCharCode.apply(null,t);o('<textarea id="file-response" style="height: 400px"></textarea><button id="file-save">Save</button>'),setTimeout((()=>{const t=document.getElementById("file-response");t.value=e,document.getElementById("file-save").addEventListener("click",(function(){writeFile({file:a,contents:t.value},{dir:bt()}).catch(o)}))}))}else o(t)})).catch(o)},function(){n(1,i.src=ke(a),i)},o,function(){a=this.value,n(0,a)},function(e){E[e?"unshift":"push"]((()=>{i=e,n(1,i)}))}]}class vt extends J{constructor(e){super(),V(this,e,_t,yt,a,{onMessage:5})}}!function(e){e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary"}(ct||(ct={}));class wt{constructor(e,t){this.type=e,this.payload=t}static form(e){return new wt("Form",e)}static json(e){return new wt("Json",e)}static text(e){return new wt("Text",e)}static bytes(e){return new wt("Bytes",e)}}class xt{constructor(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}}class Mt{constructor(e){this.id=e}async drop(){return $e({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){const t=!e.responseType||e.responseType===ct.JSON;return t&&(e.responseType=ct.Text),$e({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then((e=>{const n=new xt(e);if(t){try{n.data=JSON.parse(n.data)}catch(e){if(n.ok)throw Error(`Failed to parse response \`${n.data}\` as JSON: ${e};\n try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return n}return n}))}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,n){return this.request({method:"POST",url:e,body:t,...n})}async put(e,t,n){return this.request({method:"PUT",url:e,body:t,...n})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}}async function kt(e){return $e({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then((e=>new Mt(e)))}let $t=null;function Ct(t){let n,o,a,s,u,p,y,b,x,M,k,$,C,T,O,S,E;return{c(){n=d("form"),o=d("select"),a=d("option"),a.textContent="GET",s=d("option"),s.textContent="POST",u=d("option"),u.textContent="PUT",p=d("option"),p.textContent="PATCH",y=d("option"),y.textContent="DELETE",b=h(),x=d("input"),M=h(),k=d("br"),$=h(),C=d("textarea"),T=h(),O=d("button"),O.textContent="Make request",a.__value="GET",a.value=a.__value,s.__value="POST",s.value=s.__value,u.__value="PUT",u.value=u.__value,p.__value="PATCH",p.value=p.__value,y.__value="DELETE",y.value=y.__value,g(o,"class","button"),g(o,"id","request-method"),void 0===t[0]&&j((()=>t[5].call(o))),g(x,"id","request-url"),g(x,"placeholder","Type the request URL..."),g(C,"id","request-body"),g(C,"placeholder","Request body"),g(C,"rows","5"),v(C,"width","100%"),v(C,"margin-right","10px"),v(C,"font-size","12px"),g(O,"class","button"),g(O,"id","make-request")},m(e,i){c(e,n,i),r(n,o),r(o,a),r(o,s),r(o,u),r(o,p),r(o,y),w(o,t[0]),r(n,b),r(n,x),_(x,t[1]),r(n,M),r(n,k),r(n,$),r(n,C),_(C,t[2]),r(n,T),r(n,O),S||(E=[m(o,"change",t[5]),m(x,"input",t[6]),m(C,"input",t[7]),m(n,"submit",f(t[3]))],S=!0)},p(e,[t]){1&t&&w(o,e[0]),2&t&&x.value!==e[1]&&_(x,e[1]),4&t&&_(C,e[2])},i:e,o:e,d(e){e&&l(n),S=!1,i(E)}}}function Tt(e,t,n){let i="GET",o="https://jsonplaceholder.typicode.com/todos/1",a="",{onMessage:s}=t;return e.$$set=e=>{"onMessage"in e&&n(4,s=e.onMessage)},[i,o,a,async function(){const e=await kt(),t={url:o||""||"",method:i||"GET"||"GET"};a.startsWith("{")&&a.endsWith("}")||a.startsWith("[")&&a.endsWith("]")?t.body=wt.json(JSON.parse(a)):""!==a&&(t.body=wt.text(a)),e.request(t).then(s).catch(s)},s,function(){i=x(this),n(0,i)},function(){o=this.value,n(1,o)},function(){a=this.value,n(2,a)}]}Object.freeze({__proto__:null,getClient:kt,fetch:async function(e,t){return null===$t&&($t=await kt()),$t.request({url:e,method:t?.method??"GET",...t})},Body:wt,Client:Mt,Response:xt,get ResponseType(){return ct}});class Ot extends J{constructor(e){super(),V(this,e,Tt,Ct,a,{onMessage:4})}}function St(t){let n,i,o;return{c(){n=d("button"),n.textContent="Send test notification",g(n,"class","button"),g(n,"id","notification")},m(e,a){c(e,n,a),i||(o=m(n,"click",t[0]),i=!0)},p:e,i:e,o:e,d(e){e&&l(n),i=!1,o()}}}function Et(){new Notification("Notification title",{body:"This is the notification body"})}function zt(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?Et():i("Permission is "+e)})).catch(i):"granted"===Notification.permission?Et():i("Permission is denied")},i]}class Pt extends J{constructor(e){super(),V(this,e,zt,St,a,{onMessage:1})}}function At(e,t,n){const i=e.slice();return i[44]=t[n],i}function Wt(e){let t,n,i,o=e[44]+"";return{c(){t=d("option"),n=p(o),t.__value=i=e[44],t.value=t.__value},m(e,i){c(e,t,i),r(t,n)},p(e,a){2&a[0]&&o!==(o=e[44]+"")&&b(n,o),2&a[0]&&i!==(i=e[44])&&(t.__value=i,t.value=t.__value)},d(e){e&&l(t)}}}function jt(t){let n,o,a,s,b,x,M,k,$,C,T,O,S,E,z,P,A,W,L,F,D,R,U,I,N,q,K,B,H,G,V,J,X,Y,Q,Z,ee,te,ne,ie,oe,ae,se,re,ce,le,ue,de,pe,he,me,fe,ge,ye,be,_e,ve,we,xe,Me,ke,$e,Ce,Te,Oe,Se,Ee,ze,Pe,Ae,We,je,Le,Fe,De,Re,Ue,Ie,Ne,qe,Ke,Be,He,Ge,Ve,Je,Xe,Ye,Qe,Ze=Object.keys(t[1]),et=[];for(let e=0;e<Ze.length;e+=1)et[e]=Wt(At(t,Ze,e));return{c(){n=d("div"),o=d("select");for(let e=0;e<et.length;e+=1)et[e].c();a=h(),s=d("div"),b=d("label"),x=d("input"),M=p("\n Resizable"),k=h(),$=d("label"),C=d("input"),T=p("\n Maximize"),O=h(),S=d("button"),S.textContent="Center",E=h(),z=d("button"),z.textContent="Minimize",P=h(),A=d("button"),A.textContent="Hide",W=h(),L=d("label"),F=d("input"),D=p("\n Transparent"),R=h(),U=d("label"),I=d("input"),N=p("\n Has decorations"),q=h(),K=d("label"),B=d("input"),H=p("\n Always on top"),G=h(),V=d("label"),J=d("input"),X=p("\n Fullscreen"),Y=h(),Q=d("button"),Q.textContent="Change icon",Z=h(),ee=d("div"),te=d("div"),ne=d("div"),ie=d("div"),oe=p("X\n "),ae=d("input"),se=h(),re=d("div"),ce=p("Y\n "),le=d("input"),ue=h(),de=d("div"),pe=d("div"),he=p("Width\n "),me=d("input"),fe=h(),ge=d("div"),ye=p("Height\n "),be=d("input"),_e=h(),ve=d("div"),we=d("div"),xe=p("Min width\n "),Me=d("input"),ke=h(),$e=d("div"),Ce=p("Min height\n "),Te=d("input"),Oe=h(),Se=d("div"),Ee=d("div"),ze=p("Max width\n "),Pe=d("input"),Ae=h(),We=d("div"),je=p("Max height\n "),Le=d("input"),Fe=h(),De=d("form"),Re=d("input"),Ue=h(),Ie=d("button"),Ie.textContent="Set title",Ne=h(),qe=d("form"),Ke=d("input"),Be=h(),He=d("button"),He.textContent="Open URL",Ge=h(),Ve=d("button"),Ve.textContent="Request attention",Je=h(),Xe=d("button"),Xe.textContent="New window",g(o,"class","button"),void 0===t[0]&&j((()=>t[26].call(o))),g(x,"type","checkbox"),g(C,"type","checkbox"),g(S,"title","Unminimizes after 2 seconds"),g(z,"title","Unminimizes after 2 seconds"),g(A,"title","Visible again after 2 seconds"),g(F,"type","checkbox"),g(I,"type","checkbox"),g(B,"type","checkbox"),g(J,"type","checkbox"),g(ae,"type","number"),g(ae,"min","0"),g(ae,"class","svelte-b76pvm"),g(le,"type","number"),g(le,"min","0"),g(le,"class","svelte-b76pvm"),g(ne,"class","flex col grow svelte-b76pvm"),g(me,"type","number"),g(me,"min","400"),g(me,"class","svelte-b76pvm"),g(be,"type","number"),g(be,"min","400"),g(be,"class","svelte-b76pvm"),g(de,"class","flex col grow svelte-b76pvm"),g(Me,"type","number"),g(Me,"class","svelte-b76pvm"),g(Te,"type","number"),g(Te,"class","svelte-b76pvm"),g(ve,"class","flex col grow svelte-b76pvm"),g(Pe,"type","number"),g(Pe,"min","400"),g(Pe,"class","svelte-b76pvm"),g(Le,"type","number"),g(Le,"min","400"),g(Le,"class","svelte-b76pvm"),g(Se,"class","flex col grow svelte-b76pvm"),g(te,"class","window-controls flex flex-row svelte-b76pvm"),g(n,"class","flex col"),g(Re,"id","title"),g(Ie,"class","button"),g(Ie,"type","submit"),v(De,"margin-top","24px"),g(Ke,"id","url"),g(He,"class","button"),g(He,"id","open-url"),v(qe,"margin-top","24px"),g(Ve,"class","button"),g(Ve,"title","Minimizes the window, requests attention for 3s and then resets it"),g(Xe,"class","button")},m(e,i){c(e,n,i),r(n,o);for(let e=0;e<et.length;e+=1)et[e].m(o,null);w(o,t[0]),r(n,a),r(n,s),r(s,b),r(b,x),x.checked=t[2],r(b,M),r(s,k),r(s,$),r($,C),C.checked=t[3],r($,T),r(s,O),r(s,S),r(s,E),r(s,z),r(s,P),r(s,A),r(s,W),r(s,L),r(L,F),F.checked=t[16],r(L,D),r(s,R),r(s,U),r(U,I),I.checked=t[4],r(U,N),r(s,q),r(s,K),r(K,B),B.checked=t[5],r(K,H),r(s,G),r(s,V),r(V,J),J.checked=t[6],r(V,X),r(s,Y),r(s,Q),r(n,Z),r(n,ee),r(ee,te),r(te,ne),r(ne,ie),r(ie,oe),r(ie,ae),_(ae,t[13]),r(ne,se),r(ne,re),r(re,ce),r(re,le),_(le,t[14]),r(te,ue),r(te,de),r(de,pe),r(pe,he),r(pe,me),_(me,t[7]),r(de,fe),r(de,ge),r(ge,ye),r(ge,be),_(be,t[8]),r(te,_e),r(te,ve),r(ve,we),r(we,xe),r(we,Me),_(Me,t[9]),r(ve,ke),r(ve,$e),r($e,Ce),r($e,Te),_(Te,t[10]),r(te,Oe),r(te,Se),r(Se,Ee),r(Ee,ze),r(Ee,Pe),_(Pe,t[11]),r(Se,Ae),r(Se,We),r(We,je),r(We,Le),_(Le,t[12]),c(e,Fe,i),c(e,De,i),r(De,Re),_(Re,t[17]),r(De,Ue),r(De,Ie),c(e,Ne,i),c(e,qe,i),r(qe,Ke),_(Ke,t[15]),r(qe,Be),r(qe,He),c(e,Ge,i),c(e,Ve,i),c(e,Je,i),c(e,Xe,i),Ye||(Qe=[m(o,"change",t[26]),m(x,"change",t[27]),m(C,"change",t[28]),m(S,"click",t[29]),m(z,"click",t[21]),m(A,"click",t[20]),m(F,"change",t[30]),m(I,"change",t[31]),m(B,"change",t[32]),m(J,"change",t[33]),m(Q,"click",t[22]),m(ae,"input",t[34]),m(le,"input",t[35]),m(me,"input",t[36]),m(be,"input",t[37]),m(Me,"input",t[38]),m(Te,"input",t[39]),m(Pe,"input",t[40]),m(Le,"input",t[41]),m(Re,"input",t[42]),m(De,"submit",f(t[19])),m(Ke,"input",t[43]),m(qe,"submit",f(t[18])),m(Ve,"click",t[24]),m(Xe,"click",t[23])],Ye=!0)},p(e,t){if(2&t[0]){let n;for(Ze=Object.keys(e[1]),n=0;n<Ze.length;n+=1){const i=At(e,Ze,n);et[n]?et[n].p(i,t):(et[n]=Wt(i),et[n].c(),et[n].m(o,null))}for(;n<et.length;n+=1)et[n].d(1);et.length=Ze.length}3&t[0]&&w(o,e[0]),4&t[0]&&(x.checked=e[2]),8&t[0]&&(C.checked=e[3]),65536&t[0]&&(F.checked=e[16]),16&t[0]&&(I.checked=e[4]),32&t[0]&&(B.checked=e[5]),64&t[0]&&(J.checked=e[6]),8192&t[0]&&y(ae.value)!==e[13]&&_(ae,e[13]),16384&t[0]&&y(le.value)!==e[14]&&_(le,e[14]),128&t[0]&&y(me.value)!==e[7]&&_(me,e[7]),256&t[0]&&y(be.value)!==e[8]&&_(be,e[8]),512&t[0]&&y(Me.value)!==e[9]&&_(Me,e[9]),1024&t[0]&&y(Te.value)!==e[10]&&_(Te,e[10]),2048&t[0]&&y(Pe.value)!==e[11]&&_(Pe,e[11]),4096&t[0]&&y(Le.value)!==e[12]&&_(Le,e[12]),131072&t[0]&&Re.value!==e[17]&&_(Re,e[17]),32768&t[0]&&Ke.value!==e[15]&&_(Ke,e[15])},i:e,o:e,d(e){e&&l(n),u(et,e),e&&l(Fe),e&&l(De),e&&l(Ne),e&&l(qe),e&&l(Ge),e&&l(Ve),e&&l(Je),e&&l(Xe),Ye=!1,i(Qe)}}}function Lt(e,t,n){window.UserAttentionType=be;let i=Fe().label;const o={[i]:qe};let{onMessage:a}=t,s="https://tauri.studio",r=!0,c=!1,l=!1,u=!0,d=!1,p=!1,h=900,m=700,f=600,g=600,b=null,_=null,v=100,w=100,M="Awesome Tauri Example!";return e.$$set=e=>{"onMessage"in e&&n(25,a=e.onMessage)},e.$$.update=()=>{7&e.$$.dirty[0]&&o[i].setResizable(r),11&e.$$.dirty[0]&&(c?o[i].maximize():o[i].unmaximize()),19&e.$$.dirty[0]&&o[i].setDecorations(u),35&e.$$.dirty[0]&&o[i].setAlwaysOnTop(d),67&e.$$.dirty[0]&&o[i].setFullscreen(p),387&e.$$.dirty[0]&&o[i].setSize(new je(h,m)),1539&e.$$.dirty[0]&&(f&&g?o[i].setMinSize(new je(f,g)):o[i].setMinSize(null)),6147&e.$$.dirty[0]&&(b&&_?o[i].setMaxSize(new je(b,_)):o[i].setMaxSize(null)),24579&e.$$.dirty[0]&&o[i].setPosition(new Le(v,w))},[i,o,r,c,u,d,p,h,m,f,g,b,_,v,w,s,l,M,function(){Se(s)},function(){o[i].setTitle(M)},function(){o[i].hide(),setTimeout(o[i].show,2e3)},function(){o[i].minimize(),setTimeout(o[i].unminimize,2e3)},function(){at({multiple:!1}).then(o[i].setIcon)},function(){const e=Math.random().toString(),t=new Ne(e);n(1,o[e]=t,o),t.once("tauri://error",(function(){a("Error creating new webview")}))},async function(){await o[i].minimize(),await o[i].requestUserAttention(be.Critical),await new Promise((e=>setTimeout(e,3e3))),await o[i].requestUserAttention(null)},a,function(){i=x(this),n(0,i),n(1,o)},function(){r=this.checked,n(2,r)},function(){c=this.checked,n(3,c)},()=>o[i].center(),function(){l=this.checked,n(16,l)},function(){u=this.checked,n(4,u)},function(){d=this.checked,n(5,d)},function(){p=this.checked,n(6,p)},function(){v=y(this.value),n(13,v)},function(){w=y(this.value),n(14,w)},function(){h=y(this.value),n(7,h)},function(){m=y(this.value),n(8,m)},function(){f=y(this.value),n(9,f)},function(){g=y(this.value),n(10,g)},function(){b=y(this.value),n(11,b)},function(){_=y(this.value),n(12,_)},function(){M=this.value,n(17,M)},function(){s=this.value,n(15,s)}]}class Ft extends J{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}",r(document.head,t)),V(this,e,Lt,jt,a,{onMessage:25},[-1,-1])}}async function Dt(e,t){return $e({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:xe(t)}})}async function Rt(e){return $e({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})}async function Ut(){return $e({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}function It(e,t,n){const i=e.slice();return i[9]=t[n],i}function Nt(e){let t,n,i,o,a,s,u=e[9]+"";function f(){return e[8](e[9])}return{c(){t=d("div"),n=p(u),i=h(),o=d("button"),o.textContent="Unregister",g(o,"type","button")},m(e,l){c(e,t,l),r(t,n),r(t,i),r(t,o),a||(s=m(o,"click",f),a=!0)},p(t,i){e=t,2&i&&u!==(u=e[9]+"")&&b(n,u)},d(e){e&&l(t),a=!1,s()}}}function qt(t){let n,i,o;return{c(){n=d("button"),n.textContent="Unregister all",g(n,"type","button")},m(e,a){c(e,n,a),i||(o=m(n,"click",t[5]),i=!0)},p:e,d(e){e&&l(n),i=!1,o()}}}function Kt(t){let n,o,a,s,p,f,y,b,v,w,x=t[1],M=[];for(let e=0;e<x.length;e+=1)M[e]=Nt(It(t,x,e));let k=t[1].length&&qt(t);return{c(){n=d("div"),o=d("div"),a=d("input"),s=h(),p=d("button"),p.textContent="Register",f=h(),y=d("div");for(let e=0;e<M.length;e+=1)M[e].c();b=h(),k&&k.c(),g(a,"placeholder","Type a shortcut with '+' as separator..."),g(p,"type","button")},m(e,i){c(e,n,i),r(n,o),r(o,a),_(a,t[0]),r(o,s),r(o,p),r(n,f),r(n,y);for(let e=0;e<M.length;e+=1)M[e].m(y,null);r(y,b),k&&k.m(y,null),v||(w=[m(a,"input",t[7]),m(p,"click",t[3])],v=!0)},p(e,[t]){if(1&t&&a.value!==e[0]&&_(a,e[0]),18&t){let n;for(x=e[1],n=0;n<x.length;n+=1){const i=It(e,x,n);M[n]?M[n].p(i,t):(M[n]=Nt(i),M[n].c(),M[n].m(y,b))}for(;n<M.length;n+=1)M[n].d(1);M.length=x.length}e[1].length?k?k.p(e,t):(k=qt(e),k.c(),k.m(y,null)):k&&(k.d(1),k=null)},i:e,o:e,d(e){e&&l(n),u(M,e),k&&k.d(),v=!1,i(w)}}}function Bt(e,t,n){let i,{onMessage:o}=t;const a=Y([]);s(e,a,(e=>n(1,i=e)));let r="CmdOrControl+X";function c(e){const t=e;Rt(t).then((()=>{a.update((e=>e.filter((e=>e!==t)))),o(`Shortcut ${t} unregistered`)})).catch(o)}return e.$$set=e=>{"onMessage"in e&&n(6,o=e.onMessage)},[r,i,a,function(){const e=r;Dt(e,(()=>{o(`Shortcut ${e} triggered`)})).then((()=>{a.update((t=>[...t,e])),o(`Shortcut ${e} registered successfully`)})).catch(o)},c,function(){Ut().then((()=>{a.update((()=>[])),o("Unregistered all shortcuts")})).catch(o)},o,function(){r=this.value,n(0,r)},e=>c(e)]}Object.freeze({__proto__:null,register:Dt,registerAll:async function(e,t){return $e({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:xe(t)}})},isRegistered:async function(e){return $e({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})},unregister:Rt,unregisterAll:Ut});class Ht extends J{constructor(e){super(),V(this,e,Bt,Kt,a,{onMessage:6})}}function Gt(e){let t,n,o,a,s;return{c(){t=d("input"),n=h(),o=d("button"),o.textContent="Write",g(t,"placeholder","write to stdin"),g(o,"class","button")},m(i,r){c(i,t,r),_(t,e[3]),c(i,n,r),c(i,o,r),a||(s=[m(t,"input",e[10]),m(o,"click",e[7])],a=!0)},p(e,n){8&n&&t.value!==e[3]&&_(t,e[3])},d(e){e&&l(t),e&&l(n),e&&l(o),a=!1,i(s)}}}function Vt(t){let n,o,a,s,u,p,f,y,b,w,x,M,k,$,C,T=t[4]&&Gt(t);return{c(){n=d("div"),o=d("div"),a=d("input"),s=h(),u=d("button"),u.textContent="Run",p=h(),f=d("button"),f.textContent="Kill",y=h(),T&&T.c(),b=h(),w=d("div"),x=d("input"),M=h(),k=d("input"),g(u,"class","button"),g(f,"class","button"),g(x,"placeholder","Working directory"),g(k,"placeholder","Environment variables"),v(k,"width","300px")},m(e,i){c(e,n,i),r(n,o),r(o,a),_(a,t[0]),r(o,s),r(o,u),r(o,p),r(o,f),r(o,y),T&&T.m(o,null),r(n,b),r(n,w),r(w,x),_(x,t[1]),r(w,M),r(w,k),_(k,t[2]),$||(C=[m(a,"input",t[9]),m(u,"click",t[5]),m(f,"click",t[6]),m(x,"input",t[11]),m(k,"input",t[12])],$=!0)},p(e,[t]){1&t&&a.value!==e[0]&&_(a,e[0]),e[4]?T?T.p(e,t):(T=Gt(e),T.c(),T.m(o,null)):T&&(T.d(1),T=null),2&t&&x.value!==e[1]&&_(x,e[1]),4&t&&k.value!==e[2]&&_(k,e[2])},i:e,o:e,d(e){e&&l(n),T&&T.d(),$=!1,i(C)}}}function Jt(e,t,n){const i=navigator.userAgent.includes("Windows");let o,a=i?"cmd":"sh",s=i?["/C"]:["-c"],{onMessage:r}=t,c='echo "hello world"',l=null,u="SOMETHING=value ANOTHER=2",d="";return e.$$set=e=>{"onMessage"in e&&n(8,r=e.onMessage)},[c,l,u,d,o,function(){n(4,o=null);const e=new Oe(a,[...s,c],{cwd:l||null,env:u.split(" ").reduce(((e,t)=>{let[n,i]=t.split("=");return{...e,[n]:i}}),{})});e.on("close",(e=>{r(`command finished with code ${e.code} and signal ${e.signal}`),n(4,o=null)})),e.on("error",(e=>r(`command error: "${e}"`))),e.stdout.on("data",(e=>r(`command stdout: "${e}"`))),e.stderr.on("data",(e=>r(`command stderr: "${e}"`))),e.spawn().then((e=>{n(4,o=e)})).catch(r)},function(){o.kill().then((()=>r("killed child process"))).catch(r)},function(){o.write(d).catch(r)},r,function(){c=this.value,n(0,c)},function(){d=this.value,n(3,d)},function(){l=this.value,n(1,l)},function(){u=this.value,n(2,u)}]}class Xt extends J{constructor(e){super(),V(this,e,Jt,Vt,a,{onMessage:8})}}async function Yt(){let e;function t(){e&&e(),e=void 0}return new Promise(((n,i)=>{Pe("tauri://update-status",(e=>{var o;(o=e?.payload).error?(t(),i(o.error)):"DONE"===o.status&&(t(),n())})).then((t=>{e=t})).catch((e=>{throw t(),e})),We("tauri://update-install").catch((e=>{throw t(),e}))}))}async function Qt(){let e;function t(){e&&e(),e=void 0}return new Promise(((n,i)=>{Ae("tauri://update-available",(e=>{var i;i=e?.payload,t(),n({manifest:i,shouldUpdate:!0})})).catch((e=>{throw t(),e})),Pe("tauri://update-status",(e=>{var o;(o=e?.payload).error?(t(),i(o.error)):"UPTODATE"===o.status&&(t(),n({shouldUpdate:!1}))})).then((t=>{e=t})).catch((e=>{throw t(),e})),We("tauri://update").catch((e=>{throw t(),e}))}))}function Zt(t){let n,o,a,s,u,p;return{c(){n=d("div"),o=d("button"),o.textContent="Check update",a=h(),s=d("button"),s.textContent="Install update",g(o,"class","button"),g(o,"id","check_update"),g(s,"class","button hidden"),g(s,"id","start_update")},m(e,i){c(e,n,i),r(n,o),r(n,a),r(n,s),u||(p=[m(o,"click",t[0]),m(s,"click",t[1])],u=!0)},p:e,i:e,o:e,d(e){e&&l(n),u=!1,i(p)}}}function en(e,t,n){let i,{onMessage:o}=t;return T((async()=>{i=await Pe("tauri://update-status",o)})),O((()=>{i&&i()})),e.$$set=e=>{"onMessage"in e&&n(2,o=e.onMessage)},[async function(){try{document.getElementById("check_update").classList.add("hidden");const{shouldUpdate:e,manifest:t}=await Qt();o(`Should update: ${e}`),o(t),e&&document.getElementById("start_update").classList.remove("hidden")}catch(e){o(e)}},async function(){try{document.getElementById("start_update").classList.add("hidden"),await Yt(),o("Installation complete, restart required."),await Ve()}catch(e){o(e)}},o]}Object.freeze({__proto__:null,installUpdate:Yt,checkUpdate:Qt});class tn extends J{constructor(e){super(),V(this,e,en,Zt,a,{onMessage:2})}}async function nn(e){return $e({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})}async function on(){return $e({__tauriModule:"Clipboard",message:{cmd:"readText"}})}function an(t){let n,o,a,s,u,p,f,y,b;return{c(){n=d("div"),o=d("div"),a=d("input"),s=h(),u=d("button"),u.textContent="Write",p=h(),f=d("button"),f.textContent="Read",g(a,"placeholder","Text to write to the clipboard"),g(u,"type","button"),g(f,"type","button")},m(e,i){c(e,n,i),r(n,o),r(o,a),_(a,t[0]),r(o,s),r(o,u),r(n,p),r(n,f),y||(b=[m(a,"input",t[4]),m(u,"click",t[1]),m(f,"click",t[2])],y=!0)},p(e,[t]){1&t&&a.value!==e[0]&&_(a,e[0])},i:e,o:e,d(e){e&&l(n),y=!1,i(b)}}}function sn(e,t,n){let{onMessage:i}=t,o="clipboard message";return e.$$set=e=>{"onMessage"in e&&n(3,i=e.onMessage)},[o,function(){nn(o).then((()=>{i("Wrote to the clipboard")})).catch(i)},function(){on().then((e=>{i(`Clipboard contents: ${e}`)})).catch(i)},i,function(){o=this.value,n(0,o)}]}Object.freeze({__proto__:null,writeText:nn,readText:on});class rn extends J{constructor(e){super(),V(this,e,sn,an,a,{onMessage:3})}}function cn(e,t,n){const i=e.slice();return i[9]=t[n],i}function ln(e){let t,n,i,o,a,s,u=e[9].label+"";function f(){return e[7](e[9])}return{c(){t=d("p"),n=p(u),i=h(),g(t,"class",o="nv noselect "+(e[0]===e[9]?"nv_selected":""))},m(e,o){c(e,t,o),r(t,n),r(t,i),a||(s=m(t,"click",f),a=!0)},p(n,i){e=n,1&i&&o!==(o="nv noselect "+(e[0]===e[9]?"nv_selected":""))&&g(t,"class",o)},d(e){e&&l(t),a=!1,s()}}}function un(e){let t,n,o,a,s,p,f,y,b,_,w,x,k,$,C,T,O,S,E,z,P,A,W,j=e[2],L=[];for(let t=0;t<j.length;t+=1)L[t]=ln(cn(e,j,t));var F=e[0].component;function D(e){return{props:{onMessage:e[5]}}}return F&&(x=new F(D(e))),{c(){t=d("main"),n=d("div"),o=d("img"),s=h(),p=d("div"),p.innerHTML='<a class="dark-link" target="_blank" href="https://tauri.studio/en/docs/getting-started/intro">Documentation</a> \n <a class="dark-link" target="_blank" href="https://github.com/tauri-apps/tauri">Github</a> \n <a class="dark-link" target="_blank" href="https://github.com/tauri-apps/tauri/tree/dev/tauri/examples/api">Source</a>',f=h(),y=d("div"),b=d("div");for(let e=0;e<L.length;e+=1)L[e].c();_=h(),w=d("div"),x&&K(x.$$.fragment),k=h(),$=d("div"),C=d("p"),T=d("strong"),T.textContent="Tauri Console",O=h(),S=d("a"),S.textContent="clear",E=h(),g(o,"class","logo"),o.src!==(a="tauri logo.png")&&g(o,"src","tauri logo.png"),g(o,"height","60"),g(o,"alt","logo"),g(n,"class","flex row noselect just-around"),g(n,"style","margin=1em;"),g(n,"data-tauri-drag-region",""),v(b,"width","15em"),v(b,"margin-left","0.5em"),g(w,"class","content"),g(y,"class","flex row"),g(S,"class","nv"),g(C,"class","flex row just-around"),z=new M(null),g($,"id","response"),v($,"white-space","pre-line")},m(i,a){c(i,t,a),r(t,n),r(n,o),r(n,s),r(n,p),r(t,f),r(t,y),r(y,b);for(let e=0;e<L.length;e+=1)L[e].m(b,null);r(y,_),r(y,w),x&&B(x,w,null),r(t,k),r(t,$),r($,C),r(C,T),r(C,O),r(C,S),r($,E),z.m(e[1],$),P=!0,A||(W=[m(o,"click",e[6]),m(S,"click",e[8])],A=!0)},p(e,[t]){if(21&t){let n;for(j=e[2],n=0;n<j.length;n+=1){const i=cn(e,j,n);L[n]?L[n].p(i,t):(L[n]=ln(i),L[n].c(),L[n].m(b,null))}for(;n<L.length;n+=1)L[n].d(1);L.length=j.length}if(F!==(F=e[0].component)){if(x){I={r:0,c:[],p:I};const e=x;q(e.$$.fragment,1,0,(()=>{H(e,1)})),I.r||i(I.c),I=I.p}F?(x=new F(D(e)),K(x.$$.fragment),N(x.$$.fragment,1),B(x,w,null)):x=null}(!P||2&t)&&z.p(e[1])},i(e){P||(x&&N(x.$$.fragment,e),P=!0)},o(e){x&&q(x.$$.fragment,e),P=!1},d(e){e&&l(t),u(L,e),x&&H(x),A=!1,i(W)}}}function dn(e,t,n){T((()=>{ye("ctrl+b",(()=>{Me("menu_toggle")})),Fe().listen("close-requested",(async()=>{await confirm("Are you sure?")&&await qe.close()}))}));const i=[{label:"Welcome",component:Ye},{label:"Messages",component:ot},{label:"CLI",component:tt},{label:"Dialog",component:mt},{label:"File system",component:vt},{label:"HTTP",component:Ot},{label:"Notifications",component:Pt},{label:"Window",component:Ft},{label:"Shortcuts",component:Ht},{label:"Shell",component:Xt},{label:"Updater",component:tn},{label:"Clipboard",component:rn}];let o=i[0],a=Y([]),s="";function r(e){n(0,o=e)}T((()=>{a.subscribe((e=>{n(1,s=e.join("\n"))}))}));return[o,s,i,a,r,function(e){a.update((t=>[`[${(new Date).toLocaleTimeString()}]: `+("string"==typeof e?e:JSON.stringify(e)),...t]))},function(){Se("https://tauri.studio/")},e=>r(e),()=>{a.update((()=>[]))}]}return new class extends J{constructor(e){super(),V(this,e,dn,un,a,{})}}({target:document.body})}();
  11. //# sourceMappingURL=bundle.js.map