(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const u of r.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerpolicy&&(r.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?r.credentials="include":s.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();function F(){}function Bl(e){return e()}function Wl(){return Object.create(null)}function he(e){e.forEach(Bl)}function gs(e){return typeof e=="function"}function Se(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let In;function vs(e,t){return In||(In=document.createElement("a")),In.href=t,e===In.href}function ys(e){return Object.keys(e).length===0}function ws(e,...t){if(e==null)return F;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ks(e,t,n){e.$$.on_destroy.push(ws(t,n))}function l(e,t){e.appendChild(t)}function b(e,t,n){e.insertBefore(t,n||null)}function _(e){e.parentNode.removeChild(e)}function qn(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function Cl(e){return function(t){return t.preventDefault(),e.call(this,t)}}function o(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function ee(e){return e===""?null:+e}function Ls(e){return Array.from(e.childNodes)}function Q(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function N(e,t){e.value=t==null?"":t}function Fn(e,t){for(let n=0;n{Un.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function El(e){e&&e.c()}function yi(e,t,n,i){const{fragment:s,on_mount:r,on_destroy:u,after_update:p}=e.$$;s&&s.m(t,n),i||Ut(()=>{const d=r.map(Bl).filter(gs);u?u.push(...d):he(d),e.$$.on_mount=[]}),p.forEach(Ut)}function wi(e,t){const n=e.$$;n.fragment!==null&&(he(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Es(e,t){e.$$.dirty[0]===-1&&(It.push(e),Cs(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const h=M.length?M[0]:y;return f.ctx&&s(f.ctx[v],f.ctx[v]=h)&&(!f.skip_bound&&f.bound[v]&&f.bound[v](h),g&&Es(e,v)),y}):[],f.update(),g=!0,he(f.before_update),f.fragment=i?i(f.ctx):!1,t.target){if(t.hydrate){const v=Ls(t.target);f.fragment&&f.fragment.l(v),v.forEach(_)}else f.fragment&&f.fragment.c();t.intro&&vi(e.$$.fragment),yi(e,t.target,t.anchor,t.customElement),$l()}Rt(d)}class He{$destroy(){wi(this,1),this.$destroy=F}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!ys(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Wt=[];function Ps(e,t=F){let n;const i=new Set;function s(p){if(Se(e,p)&&(e=p,n)){const d=!Wt.length;for(const f of i)f[1](),Wt.push(f,e);if(d){for(let f=0;f{i.delete(f),i.size===0&&(n(),n=null)}}return{set:s,update:r,subscribe:u}}var Os=Object.defineProperty,Qe=(e,t)=>{for(var n in t)Os(e,n,{get:t[n],enumerable:!0})},Ds={};Qe(Ds,{convertFileSrc:()=>Rs,invoke:()=>jt,transformCallback:()=>Nt});function Is(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function Nt(e,t=!1){let n=Is(),i=`_${n}`;return Object.defineProperty(window,i,{value:s=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(s)),writable:!1,configurable:!0}),n}async function jt(e,t={}){return new Promise((n,i)=>{let s=Nt(u=>{n(u),Reflect.deleteProperty(window,`_${r}`)},!0),r=Nt(u=>{i(u),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:e,callback:s,error:r,...t})})}function Rs(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function L(e){return jt("tauri",e)}var Hs={};Qe(Hs,{Child:()=>Ql,Command:()=>Vn,EventEmitter:()=>Nn,open:()=>Mi});async function Us(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),L({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:Nt(e)}})}var Nn=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let n=i=>{this.removeListener(e,n),t(i)};return this.addListener(e,n)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(n=>n!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){let n=this.eventListeners[e];for(let i of n)i(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let n=i=>{this.removeListener(e,n),t(i)};return this.prependListener(e,n)}},Ql=class{constructor(e){this.pid=e}async write(e){return L({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return L({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},Vn=class extends Nn{constructor(e,t=[],n){super(),this.stdout=new Nn,this.stderr=new Nn,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static create(e,t=[],n){return new Vn(e,t,n)}static sidecar(e,t=[],n){let i=new Vn(e,t,n);return i.options.sidecar=!0,i}async spawn(){return Us(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);break}},this.program,this.args,this.options).then(e=>new Ql(e))}async execute(){return new Promise((e,t)=>{this.on("error",t);let n=[],i=[];this.stdout.on("data",s=>{n.push(s)}),this.stderr.on("data",s=>{i.push(s)}),this.on("close",s=>{e({code:s.code,signal:s.signal,stdout:this.collectOutput(n),stderr:this.collectOutput(i)})}),this.spawn().catch(t)})}collectOutput(e){return this.options.encoding==="raw"?e.reduce((t,n)=>new Uint8Array([...t,...n,10]),new Uint8Array):e.join(` `)}};async function Mi(e,t){return L({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var Ns={};Qe(Ns,{TauriEvent:()=>ns,emit:()=>Gn,listen:()=>qt,once:()=>is});async function Zl(e,t){return L({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function es(e,t,n){await L({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Li(e,t,n){return L({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:Nt(n)}}).then(i=>async()=>Zl(e,i))}async function ts(e,t,n){return Li(e,t,i=>{n(i),Zl(e,i.id).catch(()=>{})})}var ns=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(ns||{});async function qt(e,t){return Li(e,null,t)}async function is(e,t){return ts(e,null,t)}async function Gn(e,t){return es(e,void 0,t)}var js={};Qe(js,{CloseRequestedEvent:()=>rs,LogicalPosition:()=>ls,LogicalSize:()=>xn,PhysicalPosition:()=>$e,PhysicalSize:()=>rt,UserAttentionType:()=>zi,WebviewWindow:()=>ct,WebviewWindowHandle:()=>as,WindowManager:()=>os,appWindow:()=>ut,availableMonitors:()=>Vs,currentMonitor:()=>qs,getAll:()=>ss,getCurrent:()=>jn,primaryMonitor:()=>Fs});var xn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},rt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new xn(this.width/e,this.height/e)}},ls=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},$e=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new ls(this.x/e,this.y/e)}},zi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(zi||{});function jn(){return new ct(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function ss(){return window.__TAURI_METADATA__.__windows.map(e=>new ct(e.label,{skip:!0}))}var Pl=["tauri://created","tauri://error"],as=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Li(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):ts(e,this.label,t)}async emit(e,t){if(Pl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return es(e,this.label,t)}_handleTauriEvent(e,t){return Pl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},os=class extends as{async scaleFactor(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new $e(e,t))}async outerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new $e(e,t))}async innerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new rt(e,t))}async outerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new rt(e,t))}async isFullscreen(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return L({__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&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return L({__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&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return L({__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||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return L({__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 L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new rs(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),n=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",s=>{e({...s,payload:{type:"drop",paths:s.payload}})}),n=await this.listen("tauri://file-drop-hover",s=>{e({...s,payload:{type:"hover",paths:s.payload}})}),i=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},rs=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},ct=class extends os{constructor(e,t={}){super(e),t!=null&&t.skip||L({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return ss().some(t=>t.label===e)?new ct(e,{skip:!0}):null}},ut;"__TAURI_METADATA__"in window?ut=new ct(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),ut=new ct("main",{skip:!0}));function Wi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new $e(e.position.x,e.position.y),size:new rt(e.size.width,e.size.height)}}async function qs(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Wi)}async function Fs(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Wi)}async function Vs(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(Wi))}function xs(){return navigator.appVersion.includes("Win")}var Gs={};Qe(Gs,{EOL:()=>Xs,arch:()=>Ks,platform:()=>us,tempdir:()=>Js,type:()=>Bs,version:()=>Ys});var Xs=xs()?`\r `:` `;async function us(){return L({__tauriModule:"Os",message:{cmd:"platform"}})}async function Ys(){return L({__tauriModule:"Os",message:{cmd:"version"}})}async function Bs(){return L({__tauriModule:"Os",message:{cmd:"osType"}})}async function Ks(){return L({__tauriModule:"Os",message:{cmd:"arch"}})}async function Js(){return L({__tauriModule:"Os",message:{cmd:"tempdir"}})}var $s={};Qe($s,{getName:()=>ds,getTauriVersion:()=>fs,getVersion:()=>cs,hide:()=>ms,show:()=>ps});async function cs(){return L({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function ds(){return L({__tauriModule:"App",message:{cmd:"getAppName"}})}async function fs(){return L({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function ps(){return L({__tauriModule:"App",message:{cmd:"show"}})}async function ms(){return L({__tauriModule:"App",message:{cmd:"hide"}})}var Qs={};Qe(Qs,{exit:()=>hs,relaunch:()=>Ci});async function hs(e=0){return L({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function Ci(){return L({__tauriModule:"Process",message:{cmd:"relaunch"}})}function Zs(e){let t,n,i,s,r,u,p,d,f,g,v,y,M,h,W,T,G,H,U,R,E,I,P,X,O,j;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our development process. In the future, this app will be used on Tauri's integration tests.`,n=m(),i=a("br"),s=m(),r=a("br"),u=m(),p=a("pre"),d=w("App name: "),f=a("code"),g=w(e[2]),v=w(` App version: `),y=a("code"),M=w(e[0]),h=w(` Tauri version: `),W=a("code"),T=w(e[1]),G=w(` `),H=m(),U=a("br"),R=m(),E=a("div"),I=a("button"),I.textContent="Close application",P=m(),X=a("button"),X.textContent="Relaunch application",o(I,"class","btn"),o(X,"class","btn"),o(E,"class","flex flex-wrap gap-1 shadow-")},m(S,V){b(S,t,V),b(S,n,V),b(S,i,V),b(S,s,V),b(S,r,V),b(S,u,V),b(S,p,V),l(p,d),l(p,f),l(f,g),l(p,v),l(p,y),l(y,M),l(p,h),l(p,W),l(W,T),l(p,G),b(S,H,V),b(S,U,V),b(S,R,V),b(S,E,V),l(E,I),l(E,P),l(E,X),O||(j=[A(I,"click",e[3]),A(X,"click",e[4])],O=!0)},p(S,[V]){V&4&&Q(g,S[2]),V&1&&Q(M,S[0]),V&2&&Q(T,S[1])},i:F,o:F,d(S){S&&_(t),S&&_(n),S&&_(i),S&&_(s),S&&_(r),S&&_(u),S&&_(p),S&&_(H),S&&_(U),S&&_(R),S&&_(E),O=!1,he(j)}}}function ea(e,t,n){let i="0.0.0",s="0.0.0",r="Unknown";ds().then(d=>{n(2,r=d)}),cs().then(d=>{n(0,i=d)}),fs().then(d=>{n(1,s=d)});async function u(){await hs()}async function p(){await Ci()}return[i,s,r,u,p]}class ta extends He{constructor(t){super(),Re(this,t,ea,Zs,Se,{})}}function na(e){let t,n,i,s,r,u,p,d,f,g,v,y,M;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments:
  --config <PATH>
  --theme <light|dark|system>
  --verbose
Additionally, it has a update --background subcommand.`,n=m(),i=a("br"),s=m(),r=a("div"),r.textContent="Note that the arguments are only parsed, not implemented.",u=m(),p=a("br"),d=m(),f=a("br"),g=m(),v=a("button"),v.textContent="Get matches",o(r,"class","note"),o(v,"class","btn"),o(v,"id","cli-matches")},m(h,W){b(h,t,W),b(h,n,W),b(h,i,W),b(h,s,W),b(h,r,W),b(h,u,W),b(h,p,W),b(h,d,W),b(h,f,W),b(h,g,W),b(h,v,W),y||(M=A(v,"click",e[0]),y=!0)},p:F,i:F,o:F,d(h){h&&_(t),h&&_(n),h&&_(i),h&&_(s),h&&_(r),h&&_(u),h&&_(p),h&&_(d),h&&_(f),h&&_(g),h&&_(v),y=!1,M()}}}function ia(e,t,n){let{onMessage:i}=t;function s(){jt("plugin:cli|cli_matches").then(i).catch(i)}return e.$$set=r=>{"onMessage"in r&&n(1,i=r.onMessage)},[s,i]}class la extends He{constructor(t){super(),Re(this,t,ia,na,Se,{onMessage:1})}}function sa(e){let t,n,i,s,r,u,p,d;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=m(),s=a("button"),s.textContent="Call Request (async) API",r=m(),u=a("button"),u.textContent="Send event to Rust",o(n,"class","btn"),o(n,"id","log"),o(s,"class","btn"),o(s,"id","request"),o(u,"class","btn"),o(u,"id","event")},m(f,g){b(f,t,g),l(t,n),l(t,i),l(t,s),l(t,r),l(t,u),p||(d=[A(n,"click",e[0]),A(s,"click",e[1]),A(u,"click",e[2])],p=!0)},p:F,i:F,o:F,d(f){f&&_(t),p=!1,he(d)}}}function aa(e,t,n){let{onMessage:i}=t,s;at(async()=>{s=await qt("rust-event",i)}),ki(()=>{s&&s()});function r(){jt("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){jt("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function p(){Gn("js-event","this is the payload string")}return e.$$set=d=>{"onMessage"in d&&n(3,i=d.onMessage)},[r,u,p,i]}class oa extends He{constructor(t){super(),Re(this,t,aa,sa,Se,{onMessage:3})}}function Ol(e,t,n){const i=e.slice();return i[68]=t[n],i}function Dl(e,t,n){const i=e.slice();return i[71]=t[n],i}function Il(e){let t,n,i,s,r,u,p=Object.keys(e[1]),d=[];for(let f=0;fe[39].call(i))},m(f,g){b(f,t,g),b(f,n,g),b(f,i,g),l(i,s);for(let v=0;ve[58].call(Ie)),o(Ye,"class","input"),o(Ye,"type","number"),o(Be,"class","input"),o(Be,"type","number"),o(De,"class","flex gap-2"),o(Ke,"class","input grow"),o(Ke,"id","title"),o(Ot,"class","btn"),o(Ot,"type","submit"),o(lt,"class","flex gap-1"),o(Je,"class","input grow"),o(Je,"id","url"),o(Dt,"class","btn"),o(Dt,"id","open-url"),o(st,"class","flex gap-1"),o(it,"class","flex flex-col gap-1")},m(c,k){b(c,t,k),b(c,n,k),b(c,i,k),l(i,s),l(i,r),l(i,u),l(i,p),l(i,d),l(i,f),l(i,g),b(c,v,k),b(c,y,k),b(c,M,k),b(c,h,k),l(h,W),l(W,T),l(W,G),G.checked=e[3],l(h,H),l(h,U),l(U,R),l(U,E),E.checked=e[2],l(h,I),l(h,P),l(P,X),l(P,O),O.checked=e[4],l(h,j),l(h,S),l(S,V),l(S,oe),oe.checked=e[5],l(h,ce),l(h,ie),l(ie,x),l(ie,C),C.checked=e[6],l(h,q),l(h,K),l(K,_e),l(K,le),le.checked=e[7],b(c,ve,k),b(c,ke,k),b(c,Me,k),b(c,se,k),l(se,re),l(re,be),l(be,Ue),l(be,de),N(de,e[14]),l(re,te),l(re,Te),l(Te,Ee),l(Te,Z),N(Z,e[15]),l(se,ne),l(se,ue),l(ue,J),l(J,Le),l(J,fe),N(fe,e[8]),l(ue,ze),l(ue,$),l($,z),l($,Y),N(Y,e[9]),l(se,D),l(se,pe),l(pe,dt),l(dt,Ft),l(dt,Ce),N(Ce,e[10]),l(pe,Vt),l(pe,ft),l(ft,xt),l(ft,Ae),N(Ae,e[11]),l(se,Gt),l(se,Ne),l(Ne,pt),l(pt,B),l(pt,ye),N(ye,e[12]),l(Ne,Ct),l(Ne,Ze),l(Ze,At),l(Ze,we),N(we,e[13]),b(c,mt,k),b(c,ht,k),b(c,_t,k),b(c,ge,k),l(ge,Pe),l(Pe,We),l(We,et),l(We,St),l(We,tt),l(tt,Tt),l(tt,bt),l(We,Et),l(We,gt),l(gt,Si),l(gt,Xn),l(Pe,Ti),l(Pe,je),l(je,Yt),l(je,Ei),l(je,Bt),l(Bt,Pi),l(Bt,Yn),l(je,Oi),l(je,Jt),l(Jt,Di),l(Jt,Bn),l(ge,Ii),l(ge,vt),l(vt,qe),l(qe,Qt),l(qe,Ri),l(qe,Zt),l(Zt,Hi),l(Zt,Kn),l(qe,Ui),l(qe,tn),l(tn,Ni),l(tn,Jn),l(vt,ji),l(vt,Fe),l(Fe,ln),l(Fe,qi),l(Fe,sn),l(sn,Fi),l(sn,$n),l(Fe,Vi),l(Fe,on),l(on,xi),l(on,Qn),l(ge,Gi),l(ge,yt),l(yt,Ve),l(Ve,un),l(Ve,Xi),l(Ve,cn),l(cn,Yi),l(cn,Zn),l(Ve,Bi),l(Ve,fn),l(fn,Ki),l(fn,ei),l(yt,Ji),l(yt,xe),l(xe,mn),l(xe,$i),l(xe,hn),l(hn,Qi),l(hn,ti),l(xe,Zi),l(xe,bn),l(bn,el),l(bn,ni),l(ge,tl),l(ge,wt),l(wt,Ge),l(Ge,vn),l(Ge,nl),l(Ge,yn),l(yn,il),l(yn,ii),l(Ge,ll),l(Ge,kn),l(kn,sl),l(kn,li),l(wt,al),l(wt,Xe),l(Xe,Ln),l(Xe,ol),l(Xe,zn),l(zn,rl),l(zn,si),l(Xe,ul),l(Xe,Cn),l(Cn,cl),l(Cn,ai),b(c,oi,k),b(c,ri,k),b(c,ui,k),b(c,Pt,k),b(c,ci,k),b(c,Oe,k),l(Oe,Sn),l(Sn,kt),kt.checked=e[16],l(Sn,dl),l(Oe,fl),l(Oe,Tn),l(Tn,Mt),Mt.checked=e[17],l(Tn,pl),l(Oe,ml),l(Oe,En),l(En,Lt),Lt.checked=e[21],l(En,hl),b(c,di,k),b(c,De,k),l(De,Pn),l(Pn,_l),l(Pn,Ie);for(let ae=0;ae=1,g,v,y,M=f&&Il(e),h=e[1][e[0]]&&Hl(e);return{c(){t=a("div"),n=a("div"),i=a("input"),s=m(),r=a("button"),r.textContent="New window",u=m(),p=a("br"),d=m(),M&&M.c(),g=m(),h&&h.c(),o(i,"class","input grow"),o(i,"type","text"),o(i,"placeholder","New Window label.."),o(r,"class","btn"),o(n,"class","flex gap-1"),o(t,"class","flex flex-col children:grow gap-2")},m(W,T){b(W,t,T),l(t,n),l(n,i),N(i,e[22]),l(n,s),l(n,r),l(t,u),l(t,p),l(t,d),M&&M.m(t,null),l(t,g),h&&h.m(t,null),v||(y=[A(i,"input",e[38]),A(r,"click",e[35])],v=!0)},p(W,T){T[0]&4194304&&i.value!==W[22]&&N(i,W[22]),T[0]&2&&(f=Object.keys(W[1]).length>=1),f?M?M.p(W,T):(M=Il(W),M.c(),M.m(t,g)):M&&(M.d(1),M=null),W[1][W[0]]?h?h.p(W,T):(h=Hl(W),h.c(),h.m(t,null)):h&&(h.d(1),h=null)},i:F,o:F,d(W){W&&_(t),M&&M.d(),h&&h.d(),v=!1,he(y)}}}function ua(e,t,n){let i=ut.label;const s={[ut.label]:ut},r=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:u}=t,p,d="https://tauri.app",f=!0,g=!1,v=!0,y=!1,M=!0,h=!1,W=null,T=null,G=null,H=null,U=null,R=null,E=null,I=null,P=1,X=new $e(E,I),O=new $e(E,I),j=new rt(W,T),S=new rt(W,T),V,oe,ce=!1,ie=!0,x=null,C=null,q="default",K=!1,_e="Awesome Tauri Example!";function le(){Mi(d)}function ve(){s[i].setTitle(_e)}function ke(){s[i].hide(),setTimeout(s[i].show,2e3)}function Me(){s[i].minimize(),setTimeout(s[i].unminimize,2e3)}function se(){if(!p)return;const B=new ct(p);n(1,s[p]=B,s),B.once("tauri://error",function(){u("Error creating new webview")})}function re(){s[i].innerSize().then(B=>{n(27,j=B),n(8,W=j.width),n(9,T=j.height)}),s[i].outerSize().then(B=>{n(28,S=B)})}function be(){s[i].innerPosition().then(B=>{n(25,X=B)}),s[i].outerPosition().then(B=>{n(26,O=B),n(14,E=O.x),n(15,I=O.y)})}async function Ue(B){!B||(V&&V(),oe&&oe(),oe=await B.listen("tauri://move",be),V=await B.listen("tauri://resize",re))}async function de(){await s[i].minimize(),await s[i].requestUserAttention(zi.Critical),await new Promise(B=>setTimeout(B,3e3)),await s[i].requestUserAttention(null)}function te(){p=this.value,n(22,p)}function Te(){i=Al(this),n(0,i),n(1,s)}const Ee=()=>s[i].center();function Z(){g=this.checked,n(3,g)}function ne(){f=this.checked,n(2,f)}function ue(){v=this.checked,n(4,v)}function J(){y=this.checked,n(5,y)}function Le(){M=this.checked,n(6,M)}function fe(){h=this.checked,n(7,h)}function ze(){E=ee(this.value),n(14,E)}function $(){I=ee(this.value),n(15,I)}function z(){W=ee(this.value),n(8,W)}function Y(){T=ee(this.value),n(9,T)}function D(){G=ee(this.value),n(10,G)}function pe(){H=ee(this.value),n(11,H)}function dt(){U=ee(this.value),n(12,U)}function Ft(){R=ee(this.value),n(13,R)}function Ce(){ce=this.checked,n(16,ce)}function Vt(){ie=this.checked,n(17,ie)}function ft(){K=this.checked,n(21,K)}function xt(){q=Al(this),n(20,q),n(30,r)}function Ae(){x=ee(this.value),n(18,x)}function Gt(){C=ee(this.value),n(19,C)}function Ne(){_e=this.value,n(29,_e)}function pt(){d=this.value,n(23,d)}return e.$$set=B=>{"onMessage"in B&&n(37,u=B.onMessage)},e.$$.update=()=>{var B,ye,Ct,Ze,At,we,mt,ht,_t,ge,Pe,We,et,St,tt,Tt,nt,bt,Et;e.$$.dirty[0]&3&&(s[i],be(),re()),e.$$.dirty[0]&7&&((B=s[i])==null||B.setResizable(f)),e.$$.dirty[0]&11&&(g?(ye=s[i])==null||ye.maximize():(Ct=s[i])==null||Ct.unmaximize()),e.$$.dirty[0]&19&&((Ze=s[i])==null||Ze.setDecorations(v)),e.$$.dirty[0]&35&&((At=s[i])==null||At.setAlwaysOnTop(y)),e.$$.dirty[0]&67&&((we=s[i])==null||we.setContentProtected(M)),e.$$.dirty[0]&131&&((mt=s[i])==null||mt.setFullscreen(h)),e.$$.dirty[0]&771&&W&&T&&((ht=s[i])==null||ht.setSize(new rt(W,T))),e.$$.dirty[0]&3075&&(G&&H?(_t=s[i])==null||_t.setMinSize(new xn(G,H)):(ge=s[i])==null||ge.setMinSize(null)),e.$$.dirty[0]&12291&&(U>800&&R>400?(Pe=s[i])==null||Pe.setMaxSize(new xn(U,R)):(We=s[i])==null||We.setMaxSize(null)),e.$$.dirty[0]&49155&&E!==null&&I!==null&&((et=s[i])==null||et.setPosition(new $e(E,I))),e.$$.dirty[0]&3&&((St=s[i])==null||St.scaleFactor().then(gt=>n(24,P=gt))),e.$$.dirty[0]&3&&Ue(s[i]),e.$$.dirty[0]&65539&&((tt=s[i])==null||tt.setCursorGrab(ce)),e.$$.dirty[0]&131075&&((Tt=s[i])==null||Tt.setCursorVisible(ie)),e.$$.dirty[0]&1048579&&((nt=s[i])==null||nt.setCursorIcon(q)),e.$$.dirty[0]&786435&&x!==null&&C!==null&&((bt=s[i])==null||bt.setCursorPosition(new $e(x,C))),e.$$.dirty[0]&2097155&&((Et=s[i])==null||Et.setIgnoreCursorEvents(K))},[i,s,f,g,v,y,M,h,W,T,G,H,U,R,E,I,ce,ie,x,C,q,K,p,d,P,X,O,j,S,_e,r,le,ve,ke,Me,se,de,u,te,Te,Ee,Z,ne,ue,J,Le,fe,ze,$,z,Y,D,pe,dt,Ft,Ce,Vt,ft,xt,Ae,Gt,Ne,pt]}class ca extends He{constructor(t){super(),Re(this,t,ua,ra,Se,{onMessage:37},null,[-1,-1,-1])}}function Nl(e){let t,n,i,s,r,u,p;return{c(){t=a("br"),n=m(),i=a("input"),s=m(),r=a("button"),r.textContent="Write",o(i,"class","input"),o(i,"placeholder","write to stdin"),o(r,"class","btn")},m(d,f){b(d,t,f),b(d,n,f),b(d,i,f),N(i,e[4]),b(d,s,f),b(d,r,f),u||(p=[A(i,"input",e[14]),A(r,"click",e[8])],u=!0)},p(d,f){f&16&&i.value!==d[4]&&N(i,d[4])},d(d){d&&_(t),d&&_(n),d&&_(i),d&&_(s),d&&_(r),u=!1,he(p)}}}function da(e){let t,n,i,s,r,u,p,d,f,g,v,y,M,h,W,T,G,H,U,R,E,I,P,X,O=e[5]&&Nl(e);return{c(){t=a("div"),n=a("div"),i=w(`Script: `),s=a("input"),r=m(),u=a("div"),p=w(`Encoding: `),d=a("input"),f=m(),g=a("div"),v=w(`Working directory: `),y=a("input"),M=m(),h=a("div"),W=w(`Arguments: `),T=a("input"),G=m(),H=a("div"),U=a("button"),U.textContent="Run",R=m(),E=a("button"),E.textContent="Kill",I=m(),O&&O.c(),o(s,"class","grow input"),o(n,"class","flex items-center gap-1"),o(d,"class","grow input"),o(u,"class","flex items-center gap-1"),o(y,"class","grow input"),o(y,"placeholder","Working directory"),o(g,"class","flex items-center gap-1"),o(T,"class","grow input"),o(T,"placeholder","Environment variables"),o(h,"class","flex items-center gap-1"),o(U,"class","btn"),o(E,"class","btn"),o(H,"class","flex children:grow gap-1"),o(t,"class","flex flex-col childre:grow gap-1")},m(j,S){b(j,t,S),l(t,n),l(n,i),l(n,s),N(s,e[0]),l(t,r),l(t,u),l(u,p),l(u,d),N(d,e[3]),l(t,f),l(t,g),l(g,v),l(g,y),N(y,e[1]),l(t,M),l(t,h),l(h,W),l(h,T),N(T,e[2]),l(t,G),l(t,H),l(H,U),l(H,R),l(H,E),l(t,I),O&&O.m(t,null),P||(X=[A(s,"input",e[10]),A(d,"input",e[11]),A(y,"input",e[12]),A(T,"input",e[13]),A(U,"click",e[6]),A(E,"click",e[7])],P=!0)},p(j,[S]){S&1&&s.value!==j[0]&&N(s,j[0]),S&8&&d.value!==j[3]&&N(d,j[3]),S&2&&y.value!==j[1]&&N(y,j[1]),S&4&&T.value!==j[2]&&N(T,j[2]),j[5]?O?O.p(j,S):(O=Nl(j),O.c(),O.m(t,null)):O&&(O.d(1),O=null)},i:F,o:F,d(j){j&&_(t),O&&O.d(),P=!1,he(X)}}}function fa(e,t,n){const i=navigator.userAgent.includes("Windows");let s=i?"cmd":"sh",r=i?["/C"]:["-c"],{onMessage:u}=t,p='echo "hello world"',d=null,f="SOMETHING=value ANOTHER=2",g="",v="",y;function M(){return f.split(" ").reduce((I,P)=>{let[X,O]=P.split("=");return{...I,[X]:O}},{})}function h(){n(5,y=null);const I=Vn.create(s,[...r,p],{cwd:d||null,env:M(),encoding:g||void 0});I.on("close",P=>{u(`command finished with code ${P.code} and signal ${P.signal}`),n(5,y=null)}),I.on("error",P=>u(`command error: "${P}"`)),I.stdout.on("data",P=>u(`command stdout: "${P}"`)),I.stderr.on("data",P=>u(`command stderr: "${P}"`)),I.spawn().then(P=>{n(5,y=P)}).catch(u)}function W(){y.kill().then(()=>u("killed child process")).catch(u)}function T(){y.write(v).catch(u)}function G(){p=this.value,n(0,p)}function H(){g=this.value,n(3,g)}function U(){d=this.value,n(1,d)}function R(){f=this.value,n(2,f)}function E(){v=this.value,n(4,v)}return e.$$set=I=>{"onMessage"in I&&n(9,u=I.onMessage)},[p,d,f,g,v,y,h,W,T,u,G,H,U,R,E]}class pa extends He{constructor(t){super(),Re(this,t,fa,da,Se,{onMessage:9})}}var ma={};Qe(ma,{checkUpdate:()=>bs,installUpdate:()=>_s,onUpdaterEvent:()=>Ai});async function Ai(e){return qt("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function _s(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function s(r){if(r.error){t(),i(r.error);return}r.status==="DONE"&&(t(),n())}Ai(s).then(r=>{e=r}).catch(r=>{throw t(),r}),Gn("tauri://update-install").catch(r=>{throw t(),r})})}async function bs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function s(u){t(),n({manifest:u,shouldUpdate:!0})}function r(u){if(u.error){t(),i(u.error);return}u.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}is("tauri://update-available",u=>{s(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),Ai(r).then(u=>{e=u}).catch(u=>{throw t(),u}),Gn("tauri://update").catch(u=>{throw t(),u})})}function ha(e){let t;return{c(){t=a("button"),t.innerHTML='
',o(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){b(n,t,i)},p:F,d(n){n&&_(t)}}}function _a(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",o(t,"class","btn")},m(s,r){b(s,t,r),n||(i=A(t,"click",e[4]),n=!0)},p:F,d(s){s&&_(t),n=!1,i()}}}function ba(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",o(t,"class","btn")},m(s,r){b(s,t,r),n||(i=A(t,"click",e[3]),n=!0)},p:F,d(s){s&&_(t),n=!1,i()}}}function ga(e){let t;function n(r,u){return!r[0]&&!r[2]?ba:!r[1]&&r[2]?_a:ha}let i=n(e),s=i(e);return{c(){t=a("div"),s.c(),o(t,"class","flex children:grow children:h10")},m(r,u){b(r,t,u),s.m(t,null)},p(r,[u]){i===(i=n(r))&&s?s.p(r,u):(s.d(1),s=i(r),s&&(s.c(),s.m(t,null)))},i:F,o:F,d(r){r&&_(t),s.d()}}}function va(e,t,n){let{onMessage:i}=t,s;at(async()=>{s=await qt("tauri://update-status",i)}),ki(()=>{s&&s()});let r,u,p;async function d(){n(0,r=!0);try{const{shouldUpdate:g,manifest:v}=await bs();i(`Should update: ${g}`),i(v),n(2,p=g)}catch(g){i(g)}finally{n(0,r=!1)}}async function f(){n(1,u=!0);try{await _s(),i("Installation complete, restart required."),await Ci()}catch(g){i(g)}finally{n(1,u=!1)}}return e.$$set=g=>{"onMessage"in g&&n(5,i=g.onMessage)},[r,u,p,d,f,i]}class ya extends He{constructor(t){super(),Re(this,t,va,ga,Se,{onMessage:5})}}function wa(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
`,o(t,"class","flex flex-col gap-2")},m(n,i){b(n,t,i)},p:F,i:F,o:F,d(n){n&&_(t)}}}function ka(e,t,n){let{onMessage:i}=t;const s=window.constraints={audio:!0,video:!0};function r(p){const d=document.querySelector("video"),f=p.getVideoTracks();i("Got stream with constraints:",s),i(`Using video device: ${f[0].label}`),window.stream=p,d.srcObject=p}function u(p){if(p.name==="ConstraintNotSatisfiedError"){const d=s.video;i(`The resolution ${d.width.exact}x${d.height.exact} px is not supported by your device.`)}else p.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: ${p.name}`,p)}return at(async()=>{try{const p=await navigator.mediaDevices.getUserMedia(s);r(p)}catch(p){u(p)}}),ki(()=>{window.stream.getTracks().forEach(function(p){p.stop()})}),e.$$set=p=>{"onMessage"in p&&n(0,i=p.onMessage)},[i]}class Ma extends He{constructor(t){super(),Re(this,t,ka,wa,Se,{onMessage:0})}}function La(e){let t,n,i,s,r,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=m(),s=a("button"),s.textContent="Hide",o(n,"class","btn"),o(n,"id","show"),o(n,"title","Hides and shows the app after 2 seconds"),o(s,"class","btn"),o(s,"id","hide")},m(p,d){b(p,t,d),l(t,n),l(t,i),l(t,s),r||(u=[A(n,"click",e[0]),A(s,"click",e[1])],r=!0)},p:F,i:F,o:F,d(p){p&&_(t),r=!1,he(u)}}}function za(e,t,n){let{onMessage:i}=t;function s(){r().then(()=>{setTimeout(()=>{ps().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function r(){return ms().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[s,r,i]}class Wa extends He{constructor(t){super(),Re(this,t,za,La,Se,{onMessage:2})}}function jl(e,t,n){const i=e.slice();return i[30]=t[n],i}function ql(e,t,n){const i=e.slice();return i[33]=t[n],i}function Fl(e){let t,n,i,s,r,u,p,d,f,g,v,y,M;function h(R,E){return R[3]?Aa:Ca}let W=h(e),T=W(e);function G(R,E){return R[2]?Ta:Sa}let H=G(e),U=H(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=m(),s=a("span"),r=a("span"),T.c(),p=m(),d=a("span"),d.innerHTML='
',f=m(),g=a("span"),U.c(),o(n,"class","lt-sm:pl-10 text-darkPrimaryText"),o(r,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),o(r,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(d,"title","Minimize"),o(d,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(g,"title",v=e[2]?"Restore":"Maximize"),o(g,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(s,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),o(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),o(t,"data-tauri-drag-region","")},m(R,E){b(R,t,E),l(t,n),l(t,i),l(t,s),l(s,r),T.m(r,null),l(s,p),l(s,d),l(s,f),l(s,g),U.m(g,null),y||(M=[A(r,"click",e[11]),A(d,"click",e[9]),A(g,"click",e[10])],y=!0)},p(R,E){W!==(W=h(R))&&(T.d(1),T=W(R),T&&(T.c(),T.m(r,null))),E[0]&8&&u!==(u=R[3]?"Switch to Light mode":"Switch to Dark mode")&&o(r,"title",u),H!==(H=G(R))&&(U.d(1),U=H(R),U&&(U.c(),U.m(g,null))),E[0]&4&&v!==(v=R[2]?"Restore":"Maximize")&&o(g,"title",v)},d(R){R&&_(t),T.d(),U.d(),y=!1,he(M)}}}function Ca(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-moon")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Aa(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-sun")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Sa(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-maximize")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Ta(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-restore")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Ea(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Pa(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Vl(e){let t,n,i,s,r,u,p,d,f;function g(M,h){return M[3]?Da:Oa}let v=g(e),y=v(e);return{c(){t=a("a"),y.c(),n=m(),i=a("br"),s=m(),r=a("div"),u=m(),p=a("br"),o(t,"href","##"),o(t,"class","nv justify-between h-8"),o(r,"class","bg-white/5 h-2px")},m(M,h){b(M,t,h),y.m(t,null),b(M,n,h),b(M,i,h),b(M,s,h),b(M,r,h),b(M,u,h),b(M,p,h),d||(f=A(t,"click",e[11]),d=!0)},p(M,h){v!==(v=g(M))&&(y.d(1),y=v(M),y&&(y.c(),y.m(t,null)))},d(M){M&&_(t),y.d(),M&&_(n),M&&_(i),M&&_(s),M&&_(r),M&&_(u),M&&_(p),d=!1,f()}}}function Oa(e){let t,n;return{c(){t=w(`Switch to Dark mode `),n=a("div"),o(n,"class","i-ph-moon")},m(i,s){b(i,t,s),b(i,n,s)},d(i){i&&_(t),i&&_(n)}}}function Da(e){let t,n;return{c(){t=w(`Switch to Light mode `),n=a("div"),o(n,"class","i-ph-sun")},m(i,s){b(i,t,s),b(i,n,s)},d(i){i&&_(t),i&&_(n)}}}function Ia(e){let t,n,i,s,r=e[33].label+"",u,p,d,f;function g(){return e[19](e[33])}return{c(){t=a("a"),n=a("div"),i=m(),s=a("p"),u=w(r),o(n,"class",e[33].icon+" mr-2"),o(t,"href","##"),o(t,"class",p="nv "+(e[1]===e[33]?"nv_selected":""))},m(v,y){b(v,t,y),l(t,n),l(t,i),l(t,s),l(s,u),d||(f=A(t,"click",g),d=!0)},p(v,y){e=v,y[0]&2&&p!==(p="nv "+(e[1]===e[33]?"nv_selected":""))&&o(t,"class",p)},d(v){v&&_(t),d=!1,f()}}}function xl(e){let t,n=e[33]&&Ia(e);return{c(){n&&n.c(),t=Kl()},m(i,s){n&&n.m(i,s),b(i,t,s)},p(i,s){i[33]&&n.p(i,s)},d(i){n&&n.d(i),i&&_(t)}}}function Gl(e){let t,n=e[30].html+"",i;return{c(){t=new zs(!1),i=Kl(),t.a=i},m(s,r){t.m(n,s,r),b(s,i,r)},p(s,r){r[0]&64&&n!==(n=s[30].html+"")&&t.p(n)},d(s){s&&_(i),s&&t.d()}}}function Ra(e){let t,n,i,s,r,u,p,d,f,g,v,y,M,h,W,T,G,H,U,R,E,I,P,X,O,j,S=e[1].label+"",V,oe,ce,ie,x,C,q,K,_e,le,ve,ke,Me,se,re,be,Ue,de,te=e[5]&&Fl(e);function Te(z,Y){return z[0]?Pa:Ea}let Ee=Te(e),Z=Ee(e),ne=!e[5]&&Vl(e),ue=e[7],J=[];for(let z=0;z`,v=m(),y=a("a"),y.innerHTML=`GitHub `,M=m(),h=a("a"),h.innerHTML=`Source `,W=m(),T=a("br"),G=m(),H=a("div"),U=m(),R=a("br"),E=m(),I=a("div");for(let z=0;z',se=m(),re=a("div");for(let z=0;z<$.length;z+=1)$[z].c();o(n,"id","sidebarToggle"),o(n,"class","z-2000 display-none lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8 bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"),o(u,"class","self-center p-7 cursor-pointer"),vs(u.src,p="tauri_logo.png")||o(u,"src",p),o(u,"alt","Tauri logo"),o(g,"class","nv justify-between h-8"),o(g,"target","_blank"),o(g,"href","https://tauri.app/v1/guides/"),o(y,"class","nv justify-between h-8"),o(y,"target","_blank"),o(y,"href","https://github.com/tauri-apps/tauri"),o(h,"class","nv justify-between h-8"),o(h,"target","_blank"),o(h,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),o(H,"class","bg-white/5 h-2px"),o(I,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),o(r,"id","sidebar"),o(r,"class","lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid select-none px-2"),o(ie,"class","mr-2"),o(ce,"class","overflow-y-auto"),o(O,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),o(K,"class","bg-black/20 h-2px cursor-ns-resize"),o(ve,"class","font-semibold"),o(Me,"class","cursor-pointer h-85% rd-1 p-1 flex justify-center items-center hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25 "),o(le,"class","flex justify-between items-center px-2"),o(re,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),o(q,"id","console"),o(q,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),o(X,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),o(s,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(z,Y){te&&te.m(z,Y),b(z,t,Y),b(z,n,Y),Z.m(n,null),b(z,i,Y),b(z,s,Y),l(s,r),l(r,u),l(r,d),ne&&ne.m(r,null),l(r,f),l(r,g),l(r,v),l(r,y),l(r,M),l(r,h),l(r,W),l(r,T),l(r,G),l(r,H),l(r,U),l(r,R),l(r,E),l(r,I);for(let D=0;D{wi(D,1)}),Ts()}Le?(x=new Le(fe(z)),El(x.$$.fragment),vi(x.$$.fragment,1),yi(x,ie,null)):x=null}if(Y[0]&64){ze=z[6];let D;for(D=0;D{W(`File drop: ${JSON.stringify(C.payload)}`)});const s=navigator.userAgent.toLowerCase(),r=s.includes("android")||s.includes("iphone"),u=[{label:"Welcome",component:ta,icon:"i-ph-hand-waving"},{label:"Communication",component:oa,icon:"i-codicon-radio-tower"},!r&&{label:"CLI",component:la,icon:"i-codicon-terminal"},!r&&{label:"App",component:Wa,icon:"i-codicon-hubot"},!r&&{label:"Window",component:ca,icon:"i-codicon-window"},{label:"Shell",component:pa,icon:"i-codicon-terminal-bash"},!r&&{label:"Updater",component:ya,icon:"i-codicon-cloud-download"},{label:"WebRTC",component:Ma,icon:"i-ph-broadcast"}];let p=u[0];function d(C){n(1,p=C)}let f;at(async()=>{const C=jn();n(2,f=await C.isMaximized()),qt("tauri://resize",async()=>{n(2,f=await C.isMaximized())})});function g(){jn().minimize()}async function v(){const C=jn();await C.isMaximized()?C.unmaximize():C.maximize()}let y;at(()=>{n(3,y=localStorage&&localStorage.getItem("theme")=="dark"),Yl(y)});function M(){n(3,y=!y),Yl(y)}let h=Ps([]);ks(e,h,C=>n(6,i=C));function W(C){h.update(q=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof C=="string"?C:JSON.stringify(C,null,1))+"
"},...q])}function T(C){h.update(q=>[{html:`
[${new Date().toLocaleTimeString()}]: `+C+"
"},...q])}function G(){h.update(()=>[])}let H,U,R;function E(C){R=C.clientY;const q=window.getComputedStyle(H);U=parseInt(q.height,10);const K=le=>{const ve=le.clientY-R,ke=U-ve;n(4,H.style.height=`${ke{document.removeEventListener("mouseup",_e),document.removeEventListener("mousemove",K)};document.addEventListener("mouseup",_e),document.addEventListener("mousemove",K)}let I;at(async()=>{n(5,I=await us()==="win32")});let P=!1,X,O,j=!1,S=0,V=0;const oe=(C,q,K)=>Math.min(Math.max(q,C),K);at(()=>{n(17,X=document.querySelector("#sidebar")),O=document.querySelector("#sidebarToggle"),document.addEventListener("click",C=>{O.contains(C.target)?n(0,P=!P):P&&!X.contains(C.target)&&n(0,P=!1)}),document.addEventListener("touchstart",C=>{if(O.contains(C.target))return;const q=C.touches[0].clientX;(0{if(j){const q=C.touches[0].clientX;V=q;const K=(q-S)/10;X.style.setProperty("--translate-x",`-${oe(0,P?0-K:18.75-K,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(j){const C=(V-S)/10;n(0,P=P?C>-(18.75/2):C>18.75/2)}j=!1})});const ce=()=>Mi("https://tauri.app/"),ie=C=>{d(C),n(0,P=!1)};function x(C){bi[C?"unshift":"push"](()=>{H=C,n(4,H)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const C=document.querySelector("#sidebar");C&&Ha(C,P)}},[P,p,f,y,H,I,i,u,d,g,v,M,h,W,T,G,E,X,ce,ie,x]}class Na extends He{constructor(t){super(),Re(this,t,Ua,Ra,Se,{},null,[-1,-1])}}new Na({target:document.querySelector("#app")});