tauri/examples/api/dist/assets/index.js

46 lines
99 KiB
JavaScript
Raw Normal View History

const rr=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerpolicy&&(l.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?l.credentials="include":o.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}};rr();function J(){}function kl(t){return t()}function Go(){return Object.create(null)}function ue(t){t.forEach(kl)}function sr(t){return typeof t=="function"}function be(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Gn;function ur(t,e){return Gn||(Gn=document.createElement("a")),Gn.href=e,t===Gn.href}function ar(t){return Object.keys(t).length===0}function cr(t,...e){if(t==null)return J;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Ml(t,e,n){t.$$.on_destroy.push(cr(e,n))}function r(t,e){t.appendChild(e)}function m(t,e,n){t.insertBefore(e,n||null)}function h(t){t.parentNode.removeChild(t)}function ht(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function s(t){return document.createElement(t)}function fr(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function z(t){return document.createTextNode(t)}function v(){return z(" ")}function oi(){return z("")}function D(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function Zn(t){return function(e){return e.preventDefault(),t.call(this,e)}}function a(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function re(t){return t===""?null:+t}function dr(t){return Array.from(t.childNodes)}function Z(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function G(t,e){t.value=e==null?"":e}function Dt(t,e){for(let n=0;n<t.options.length;n+=1){const i=t.options[n];if(i.__value===e){i.selected=!0;return}}t.selectedIndex=-1}function Pi(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function Jn(t,e,n){t.classList[n?"add":"remove"](e)}class pr{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,i=null){this.e||(this.is_svg?this.e=fr(n.nodeName):this.e=s(n.nodeName),this.t=n,this.c(e)),this.i(i)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let n=0;n<this.n.length;n+=1)m(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(h)}}let Xt;function Jt(t){Xt=t}function Cl(){if(!Xt)throw new Error("Function called outside component initialization");return Xt}function ft(t){Cl().$$.on_mount.push(t)}function ji(t){Cl().$$.on_destroy.push(t)}const Vt=[],$n=[],Yn=[],Jo=[],hr=Promise.resolve();let Ri=!1;function mr(){Ri||(Ri=!0,hr.then(Tl))}function zt(t){Yn.push(t)}const zi=new Set;let Xn=0;function Tl(){const t=Xt;do{for(;Xn<Vt.length;){const e=Vt[Xn];Xn++,Jt(e),vr(e.$$)}for(Jt(null),Vt.length=0,Xn=0;$n.length;)$n.pop()();for(let e=0;e<Yn.length;e+=1){const n=Yn[e];zi.has(n)||(zi.add(n),n())}Yn.length=0}while(Vt.length);for(;Jo.length;)Jo.pop()();Ri=!1,zi.clear(),Jt(t)}function vr(t){if(t.fragment!==null){t.update(),ue(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(zt)}}const Kn=new Set;let dt;function li(){dt={r:0,c:[],p:dt}}function ri(){dt.r||ue(dt.c),dt=dt.p}function We(t,e){t&&t.i&&(Kn.delete(t),t.i(e))}function je(t,e,n,i){if(t&&t.o){if(Kn.has(t))return;Kn.add(t),dt.c.push(()=>{Kn.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function ei(t){t&&t.c()}function Yt(t,e,n,i){const{fragment:o,on_mount:l,on_destroy:u,after_update:f}=t.$$;o&&o.m(e,n),i||zt(()=>{const c=l.map(kl).filter(sr);u?u.push(...c):ue(c),t.$$.on_mount=[]}),f.forEach(zt)}function Kt(t,e){const n=t.$$;n.fragment!==null&&(ue(n.on_destroy),n.f
`),stderr:f.join(`
`)})}),n.spawn().catch(l)})]})})},e}(xn);function Fi(t,e){return M(this,void 0,void 0,function(){return C(this,function(n){return[2,S({__tauriModule:"Shell",message:{cmd:"open",path:t,with:e}})]})})}Object.freeze({__proto__:null,Command:Sl,Child:El,EventEmitter:xn,open:Fi});function Ol(t,e){return M(this,void 0,void 0,function(){return C(this,function(n){return[2,S({__tauriModule:"Event",message:{cmd:"unlisten",event:t,eventId:e}})]})})}function Dl(t,e,n){return M(this,void 0,void 0,function(){return C(this,function(i){switch(i.label){case 0:return[4,S({__tauriModule:"Event",message:{cmd:"emit",event:t,windowLabel:e,payload:typeof n=="string"?n:JSON.stringify(n)}})];case 1:return i.sent(),[2]}})})}function Ui(t,e,n){return M(this,void 0,void 0,function(){var i=this;return C(this,function(o){return[2,S({__tauriModule:"Event",message:{cmd:"listen",event:t,windowLabel:e,handler:mt(n)}}).then(function(l){return function(){return M(i,void 0,void 0,function(){return C(this,function(u){return[2,Ol(t,l)]})})}})]})})}function zl(t,e,n){return M(this,void 0,void 0,function(){return C(this,function(i){return[2,Ui(t,e,function(o){n(o),Ol(t,o.id).catch(function(){})})]})})}var ve;function Qt(t,e){return M(this,void 0,void 0,function(){return C(this,function(n){return[2,Ui(t,null,e)]})})}function Wl(t,e){return M(this,void 0,void 0,function(){return C(this,function(n){return[2,zl(t,null,e)]})})}function si(t,e){return M(this,void 0,void 0,function(){return C(this,function(n){return[2,Dl(t,void 0,e)]})})}(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_FILE_DROP="tauri://file-drop",t.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",t.MENU="tauri://menu",t.CHECK_UPDATE="tauri://update",t.UPDATE_AVAILABLE="tauri://update-available",t.INSTALL_UPDATE="tauri://update-install",t.STATUS_UPDATE="tauri://update-status",t.DOWNLOAD_PROGRESS="tauri://update-download-progress"})(ve||(ve={}));Object.freeze({__proto__:null,get TauriEvent(){return ve},listen:Qt,once:Wl,emit:si});var xt,ni=function(t,e){this.type="Logical",this.width=t,this.height=e},pt=function(){function t(e,n){this.type="Physical",this.width=e,this.height=n}return t.prototype.toLogical=function(e){return new ni(this.width/e,this.height/e)},t}(),Pl=function(t,e){this.type="Logical",this.x=t,this.y=e},nt=function(){function t(e,n){this.type="Physical",this.x=e,this.y=n}return t.prototype.toLogical=function(e){return new Pl(this.x/e,this.y/e)},t}();function Gt(){return new Wt(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Rl(){return window.__TAURI_METADATA__.__windows.map(function(t){return new Wt(t.label,{skip:!0})})}(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(xt||(xt={}));var Be,Xo=["tauri://created","tauri://error"],Il=function(){function t(e){this.label=e,this.listeners=Object.create(null)}return t.prototype.listen=function(e,n){return M(this,void 0,void 0,function(){var i=this;return C(this,function(o){return this._handleTauriEvent(e,n)?[2,Promise.resolve(function(){var l=i.listeners[e];l.splice(l.indexOf(n),1)})]:[2,Ui(e,this.label,n)]})})},t.prototype.once=function(e,n){return M(this,void 0,void 0,function(){var i=this;return C(this,function(o){return this._handleTauriEvent(e,n)?[2,Promise.resolve(function(){var l=i.listeners[e];l.splice(l.indexOf(n),1)})]:[2,zl(e,this.label,n)]})})},t.prototype.emit=function(e,n){return M(this,void 0,void 0,function(){var i,o;return C(this,function(l){if(Xo.includes(e)){for(i=0,o=this.listeners[e]||[];i<o.length;i++)(0,o[i])({event:e,id:-1,windowLabel:this.label,payload:n});return[2,Promise.resolve()]}return[2,Dl(e,this.label,n)]})})},t.prototype._handleTauriEvent=function(e,n){return!!Xo.includes(e)&&(e in
Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),Be=new Wt("main",{skip:!0}));Object.freeze({__proto__:null,WebviewWindow:Wt,WebviewWindowHandle:Il,WindowManager:Nl,CloseRequestedEvent:jl,getCurrent:Gt,getAll:Rl,get appWindow(){return Be},LogicalSize:ni,PhysicalSize:pt,LogicalPosition:Pl,PhysicalPosition:nt,get UserAttentionType(){return xt},currentMonitor:gr,primaryMonitor:yr,availableMonitors:wr});function kr(){return navigator.appVersion.includes("Win")}var Mr=kr()?`\r
`:`
`;function Hl(){return M(this,void 0,void 0,function(){return C(this,function(t){return[2,S({__tauriModule:"Os",message:{cmd:"platform"}})]})})}function Cr(){return M(this,void 0,void 0,function(){return C(this,function(t){return[2,S({__tauriModule:"Os",message:{cmd:"version"}})]})})}function Tr(){return M(this,void 0,void 0,function(){return C(this,function(t){return[2,S({__tauriModule:"Os",message:{cmd:"osType"}})]})})}function Ar(){return M(this,void 0,void 0,function(){return C(this,function(t){return[2,S({__tauriModule:"Os",message:{cmd:"arch"}})]})})}function Lr(){return M(this,void 0,void 0,function(){return C(this,function(t){return[2,S({__tauriModule:"Os",message:{cmd:"tempdir"}})]})})}Object.freeze({__proto__:null,EOL:Mr,platform:Hl,version:Cr,type:Tr,arch:Ar,tempdir:Lr});function Fl(){return M(this,void 0,void 0,function(){return C(this,function(t){return[2,S({__tauriModule:"App",message:{cmd:"getAppVersion"}})]})})}function Ul(){return M(this,void 0,void 0,function(){return C(this,function(t){return[2,S({__tauriModule:"App",message:{cmd:"getAppName"}})]})})}function ql(){return M(this,void 0,void 0,function(){return C(this,function(t){return[2,S({__tauriModule:"App",message:{cmd:"getTauriVersion"}})]})})}function Bl(){return M(this,void 0,void 0,function(){return C(this,function(t){return[2,S({__tauriModule:"App",message:{cmd:"show"}})]})})}function Vl(){return M(this,void 0,void 0,function(){return C(this,function(t){return[2,S({__tauriModule:"App",message:{cmd:"hide"}})]})})}Object.freeze({__proto__:null,getName:Ul,getVersion:Fl,getTauriVersion:ql,show:Bl,hide:Vl});function Gl(t){return t===void 0&&(t=0),M(this,void 0,void 0,function(){return C(this,function(e){return[2,S({__tauriModule:"Process",message:{cmd:"exit",exitCode:t}})]})})}function Bi(){return M(this,void 0,void 0,function(){return C(this,function(t){return[2,S({__tauriModule:"Process",message:{cmd:"relaunch"}})]})})}Object.freeze({__proto__:null,exit:Gl,relaunch:Bi});function Er(t){let e,n,i,o,l,u,f,c,p,d,k,_,y,g,b,E,W,F,R,q,O,A,L,P,T,U;return{c(){e=s("p"),e.innerHTML=`This is a demo of Tauri&#39;s API capabilities using the <code>@tauri-apps/api</code> package. It&#39;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&#39;s integration
tests.`,n=v(),i=s("br"),o=v(),l=s("br"),u=v(),f=s("pre"),c=z("App name: "),p=s("code"),d=z(t[2]),k=z(`
App version: `),_=s("code"),y=z(t[0]),g=z(`
Tauri version: `),b=s("code"),E=z(t[1]),W=z(`
`),F=v(),R=s("br"),q=v(),O=s("div"),A=s("button"),A.textContent="Close application",L=v(),P=s("button"),P.textContent="Relaunch application",a(A,"class","btn"),a(P,"class","btn"),a(O,"class","flex flex-wrap gap-1 shadow-")},m(B,Y){m(B,e,Y),m(B,n,Y),m(B,i,Y),m(B,o,Y),m(B,l,Y),m(B,u,Y),m(B,f,Y),r(f,c),r(f,p),r(p,d),r(f,k),r(f,_),r(_,y),r(f,g),r(f,b),r(b,E),r(f,W),m(B,F,Y),m(B,R,Y),m(B,q,Y),m(B,O,Y),r(O,A),r(O,L),r(O,P),T||(U=[D(A,"click",t[3]),D(P,"click",t[4])],T=!0)},p(B,[Y]){Y&4&&Z(d,B[2]),Y&1&&Z(y,B[0]),Y&2&&Z(E,B[1])},i:J,o:J,d(B){B&&h(e),B&&h(n),B&&h(i),B&&h(o),B&&h(l),B&&h(u),B&&h(f),B&&h(F),B&&h(R),B&&h(q),B&&h(O),T=!1,ue(U)}}}function Sr(t,e,n){let i="0.0.0",o="0.0.0",l="Unknown";Ul().then(c=>{n(2,l=c)}),Fl().then(c=>{n(0,i=c)}),ql().then(c=>{n(1,o=c)});async function u(){await Gl()}async function f(){await Bi()}return[i,o,l,u,f]}class Or extends Te{constructor(e){super(),Ce(this,e,Sr,Er,be,{})}}function Jl(){return M(this,void 0,void 0,function(){return C(this,function(t){return[2,S({__tauriModule:"Cli",message:{cmd:"cliMatches"}})]})})}Object.freeze({__proto__:null,getMatches:Jl});function Dr(t){let e,n,i,o,l,u,f,c,p,d,k,_,y;return{c(){e=s("p"),e.innerHTML=`This binary can be run from the terminal and takes the following arguments:
<code class="code-block flex flex-wrap my-2"><pre> --config &lt;PATH&gt;
--theme &lt;light|dark|system&gt;
--verbose</pre></code>
Additionally, it has a <code>update --background</code> subcommand.`,n=v(),i=s("br"),o=v(),l=s("div"),l.textContent="Note that the arguments are only parsed, not implemented.",u=v(),f=s("br"),c=v(),p=s("br"),d=v(),k=s("button"),k.textContent="Get matches",a(l,"class","note"),a(k,"class","btn"),a(k,"id","cli-matches")},m(g,b){m(g,e,b),m(g,n,b),m(g,i,b),m(g,o,b),m(g,l,b),m(g,u,b),m(g,f,b),m(g,c,b),m(g,p,b),m(g,d,b),m(g,k,b),_||(y=D(k,"click",t[0]),_=!0)},p:J,i:J,o:J,d(g){g&&h(e),g&&h(n),g&&h(i),g&&h(o),g&&h(l),g&&h(u),g&&h(f),g&&h(c),g&&h(p),g&&h(d),g&&h(k),_=!1,y()}}}function zr(t,e,n){let{onMessage:i}=e;function o(){Jl().then(i).catch(i)}return t.$$set=l=>{"onMessage"in l&&n(1,i=l.onMessage)},[o,i]}class Wr extends Te{constructor(e){super(),Ce(this,e,zr,Dr,be,{onMessage:1})}}function Pr(t){let e,n,i,o,l,u,f,c;return{c(){e=s("div"),n=s("button"),n.textContent="Call Log API",i=v(),o=s("button"),o.textContent="Call Request (async) API",l=v(),u=s("button"),u.textContent="Send event to Rust",a(n,"class","btn"),a(n,"id","log"),a(o,"class","btn"),a(o,"id","request"),a(u,"class","btn"),a(u,"id","event")},m(p,d){m(p,e,d),r(e,n),r(e,i),r(e,o),r(e,l),r(e,u),f||(c=[D(n,"click",t[0]),D(o,"click",t[1]),D(u,"click",t[2])],f=!0)},p:J,i:J,o:J,d(p){p&&h(e),f=!1,ue(c)}}}function Rr(t,e,n){let{onMessage:i}=e,o;ft(async()=>{o=await Qt("rust-event",i)}),ji(()=>{o&&o()});function l(){ti("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){ti("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function f(){si("js-event","this is the payload string")}return t.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,u,f,i]}class Ir extends Te{constructor(e){super(),Ce(this,e,Rr,Pr,be,{onMessage:3})}}function Vi(t){return t===void 0&&(t={}),M(this,void 0,void 0,function(){return C(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,S({__tauriModule:"Dialog",message:{cmd:"openDialog",options:t}})]})})}function Xl(t){return t===void 0&&(t={}),M(this,void 0,void 0,function(){return C(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,S({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:t}})]})})}function Nr(t,e){var n;return M(this,void 0,void 0,function(){var i;return C(this,function(o){return i=typeof e=="string"?{title:e}:e,[2,S({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:t.toString(),title:(n=i==null?void 0:i.title)===null||n===void 0?void 0:n.toString(),type:i==null?void 0:i.type}})]})})}function Yl(t,e){var n;return M(this,void 0,void 0,function(){var i;return C(this,function(o){return i=typeof e=="string"?{title:e}:e,[2,S({__tauriModule:"Dialog",message:{cmd:"askDialog",message:t.toString(),title:(n=i==null?void 0:i.title)===null||n===void 0?void 0:n.toString(),type:i==null?void 0:i.type}})]})})}function jr(t,e){var n;return M(this,void 0,void 0,function(){var i;return C(this,function(o){return i=typeof e=="string"?{title:e}:e,[2,S({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:t.toString(),title:(n=i==null?void 0:i.title)===null||n===void 0?void 0:n.toString(),type:i==null?void 0:i.type}})]})})}Object.freeze({__proto__:null,open:Vi,save:Xl,message:Nr,ask:Yl,confirm:jr});var Pt;function Hr(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return C(this,function(n){return[2,S({__tauriModule:"Fs",message:{cmd:"readTextFile",path:t,options:e}})]})})}function Gi(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){var n;return C(this,function(i){switch(i.label){case 0:return[4,S({__tauriModule:"Fs",message:{cmd:"readFile",path:t,options:e}})];case 1:return n=i.sent(),[2,Uint8Array.from(n)]}})})}function Ni(t,e,n){return M(this,void 0,void 0,function(){var i,o;return C(this,function(l){return typeof n=="object"&&Object.freeze(n),typeof t=="object"&&Object.freeze(t),i={path:"",contents:""},o=n,typeof t=="string"?i.path=t:(i.path=t.path,i.contents=t.contents),typeof e=="string"?i.contents=e!=null?e:"":o=e,[2,S({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,
Multipart`),te=v(),oe=s("br"),x=v(),ye=s("br"),I=v(),Q=s("button"),Q.textContent="Post it",le=v(),ae=s("br"),ee=v(),_e=s("br"),ce=v(),ei(we.$$.fragment),i.__value="GET",i.value=i.__value,o.__value="POST",o.value=o.__value,l.__value="PUT",l.value=l.__value,u.__value="PATCH",u.value=u.__value,f.__value="DELETE",f.value=f.__value,a(n,"class","input"),a(n,"id","request-method"),t[0]===void 0&&zt(()=>t[9].call(n)),a(k,"class","input h-auto w-100%"),a(k,"id","request-body"),a(k,"placeholder","Request body"),a(k,"rows","5"),a(b,"class","btn"),a(b,"id","make-request"),a(A,"class","input"),a(P,"class","input"),a(O,"class","flex gap-2 children:grow"),a($,"type","checkbox"),a(Q,"class","btn"),a(Q,"type","button")},m(N,V){m(N,e,V),r(e,n),r(n,i),r(n,o),r(n,l),r(n,u),r(n,f),Dt(n,t[0]),r(e,c),r(e,p),r(e,d),r(e,k),G(k,t[1]),r(e,_),r(e,y),r(e,g),r(e,b),m(N,E,V),m(N,W,V),m(N,F,V),m(N,R,V),m(N,q,V),m(N,O,V),r(O,A),G(A,t[2]),r(O,L),r(O,P),G(P,t[3]),m(N,T,V),m(N,U,V),m(N,B,V),m(N,Y,V),r(Y,$),$.checked=t[5],r(Y,ge),m(N,te,V),m(N,oe,V),m(N,x,V),m(N,ye,V),m(N,I,V),m(N,Q,V),m(N,le,V),m(N,ae,V),m(N,ee,V),m(N,_e,V),m(N,ce,V),Yt(we,N,V),ne=!0,Ae||(Se=[D(n,"change",t[9]),D(k,"input",t[10]),D(e,"submit",Zn(t[6])),D(A,"input",t[11]),D(P,"input",t[12]),D($,"change",t[13]),D(Q,"click",t[7])],Ae=!0)},p(N,[V]){V&1&&Dt(n,N[0]),V&2&&G(k,N[1]),V&4&&A.value!==N[2]&&G(A,N[2]),V&8&&P.value!==N[3]&&G(P,N[3]),V&32&&($.checked=N[5]);const Ie={};V&16&&(Ie.json=N[4]),we.$set(Ie)},i(N){ne||(We(we.$$.fragment,N),ne=!0)},o(N){je(we.$$.fragment,N),ne=!1},d(N){N&&h(e),N&&h(E),N&&h(W),N&&h(F),N&&h(R),N&&h(q),N&&h(O),N&&h(T),N&&h(U),N&&h(B),N&&h(Y),N&&h(te),N&&h(oe),N&&h(x),N&&h(ye),N&&h(I),N&&h(Q),N&&h(le),N&&h(ae),N&&h(ee),N&&h(_e),N&&h(ce),Kt(we,N),Ae=!1,ue(Se)}}}function us(t,e,n){let i="GET",o="",{onMessage:l}=e;async function u(){const W=await ii().catch(q=>{throw l(q),q}),R={url:"http://localhost:3003",method:i||"GET"||"GET"};o.startsWith("{")&&o.endsWith("}")||o.startsWith("[")&&o.endsWith("]")?R.body=Qn.json(JSON.parse(o)):o!==""&&(R.body=Qn.text(o)),W.request(R).then(l).catch(l)}let f="baz",c="qux",p=null,d=!0;async function k(){const W=await ii().catch(F=>{throw l(F),F});n(4,p=await W.request({url:"http://localhost:3003",method:"POST",body:Qn.form({foo:f,bar:c}),headers:d?{"Content-Type":"multipart/form-data"}:void 0,responseType:Rt.Text}))}function _(){i=Pi(this),n(0,i)}function y(){o=this.value,n(1,o)}function g(){f=this.value,n(2,f)}function b(){c=this.value,n(3,c)}function E(){d=this.checked,n(5,d)}return t.$$set=W=>{"onMessage"in W&&n(8,l=W.onMessage)},[i,o,f,c,p,d,u,k,l,_,y,g,b,E]}class as extends Te{constructor(e){super(),Ce(this,e,us,ss,be,{onMessage:8})}}function cs(t){let e,n,i;return{c(){e=s("button"),e.textContent="Send test notification",a(e,"class","btn"),a(e,"id","notification")},m(o,l){m(o,e,l),n||(i=D(e,"click",fs),n=!0)},p:J,i:J,o:J,d(o){o&&h(e),n=!1,i()}}}function fs(){new Notification("Notification title",{body:"This is the notification body"})}function ds(t,e,n){let{onMessage:i}=e;return t.$$set=o=>{"onMessage"in o&&n(0,i=o.onMessage)},[i]}class ps extends Te{constructor(e){super(),Ce(this,e,ds,cs,be,{onMessage:0})}}function ol(t,e,n){const i=t.slice();return i[67]=e[n],i}function ll(t,e,n){const i=t.slice();return i[70]=e[n],i}function rl(t){let e,n,i,o,l,u,f=Object.keys(t[1]),c=[];for(let p=0;p<f.length;p+=1)c[p]=sl(ll(t,f,p));return{c(){e=s("span"),e.textContent="Selected window:",n=v(),i=s("select"),o=s("option"),o.textContent="Choose a window...";for(let p=0;p<c.length;p+=1)c[p].c();a(e,"class","font-700 text-sm"),o.__value="",o.value=o.__value,o.disabled=!0,o.selected=!0,a(i,"class","input"),t[0]===void 0&&zt(()=>t[39].call(i))},m(p,d){m(p,e,d),m(p,n,d),m(p,i,d),r(i,o);for(let k=0;k<c.length;k+=1)c[k].m(i,null);Dt(i,t[0]),l||(u=D(i,"change",t[39]),l=!0)},p(p,d){if(d[0]&2){f=Object.keys(p[1]);let k;for(k=0;k<f.length;k+=1){const _=ll(p,f,k);c[k]?c[k].p(_,d):(c[k]=sl(_),c[k].c(),c[k].m(i,null))}for(;k<c.length;k+=1)c[k].d(1);c.length=f.length}d[0]&3&&Dt(i,p[0])},d(p){p&&h(e),p&&h(n),p&&h(i),ht(c,p),l=!1,u()}}}function sl(t){let e,n=t[
`),R=s("input"),q=v(),O=s("label"),A=z(`Resizable
`),L=s("input"),P=v(),T=s("label"),U=z(`Has decorations
`),B=s("input"),Y=v(),$=s("label"),ge=z(`Always on top
`),te=s("input"),oe=v(),x=s("label"),ye=z(`Fullscreen
`),I=s("input"),Q=v(),le=s("br"),ae=v(),ee=s("div"),_e=s("div"),ce=s("div"),we=z(`X
`),ne=s("input"),Ae=v(),Se=s("div"),N=z(`Y
`),V=s("input"),Ie=v(),Oe=s("div"),Le=s("div"),fe=z(`Width
`),he=s("input"),de=v(),De=s("div"),it=z(`Height
`),me=s("input"),pe=v(),H=s("div"),ie=s("div"),X=z(`Min width
`),ke=s("input"),Zt=v(),vt=s("div"),$t=z(`Min height
`),Ne=s("input"),en=v(),Ve=s("div"),_t=s("div"),tn=z(`Max width
`),K=s("input"),It=v(),ot=s("div"),Nt=z(`Max height
`),Pe=s("input"),bt=v(),gt=s("br"),yt=v(),ze=s("div"),He=s("div"),Re=s("div"),lt=s("div"),lt.textContent="Inner Size",jt=v(),rt=s("span"),Ht=z("Width: "),wt=z(st),Ft=v(),kt=s("span"),Xi=z("Height: "),ui=z(nn),Yi=v(),Ge=s("div"),on=s("div"),on.textContent="Outer Size",Ki=v(),ln=s("span"),xi=z("Width: "),ai=z(rn),Qi=v(),sn=s("span"),Zi=z("Height: "),ci=z(un),$i=v(),Mt=s("div"),Je=s("div"),an=s("div"),an.textContent="Inner Logical Size",eo=v(),cn=s("span"),to=z("Width: "),fi=z(fn),no=v(),dn=s("span"),io=z("Height: "),di=z(pn),oo=v(),Xe=s("div"),hn=s("div"),hn.textContent="Outer Logical Size",lo=v(),mn=s("span"),ro=z("Width: "),pi=z(vn),so=v(),_n=s("span"),uo=z("Height: "),hi=z(bn),ao=v(),Ct=s("div"),Ye=s("div"),gn=s("div"),gn.textContent="Inner Position",co=v(),yn=s("span"),fo=z("x: "),mi=z(wn),po=v(),kn=s("span"),ho=z("y: "),vi=z(Mn),mo=v(),Ke=s("div"),Cn=s("div"),Cn.textContent="Outer Position",vo=v(),Tn=s("span"),_o=z("x: "),_i=z(An),bo=v(),Ln=s("span"),go=z("y: "),bi=z(En),yo=v(),Tt=s("div"),xe=s("div"),Sn=s("div"),Sn.textContent="Inner Logical Position",wo=v(),On=s("span"),ko=z("x: "),gi=z(Dn),Mo=v(),zn=s("span"),Co=z("y: "),yi=z(Wn),To=v(),Qe=s("div"),Pn=s("div"),Pn.textContent="Outer Logical Position",Ao=v(),Rn=s("span"),Lo=z("x: "),wi=z(In),Eo=v(),Nn=s("span"),So=z("y: "),ki=z(jn),Mi=v(),Ci=s("br"),Ti=v(),Ut=s("h4"),Ut.textContent="Cursor",Ai=v(),Fe=s("div"),Hn=s("label"),At=s("input"),Oo=z(`
Grab`),Do=v(),Fn=s("label"),Lt=s("input"),zo=z(`
Visible`),Wo=v(),Un=s("label"),Et=s("input"),Po=z(`
Ignore events`),Li=v(),Ue=s("div"),qn=s("label"),Ro=z(`Icon
`),qe=s("select");for(let w=0;w<Ee.length;w+=1)Ee[w].c();Io=v(),Bn=s("label"),No=z(`X position
`),Ze=s("input"),jo=v(),Vn=s("label"),Ho=z(`Y position
`),$e=s("input"),Ei=v(),Si=s("br"),Oi=v(),ut=s("div"),at=s("form"),et=s("input"),Fo=v(),qt=s("button"),qt.textContent="Set title",Uo=v(),ct=s("form"),tt=s("input"),qo=v(),Bt=s("button"),Bt.textContent="Open URL",a(o,"class","btn"),a(o,"title","Unminimizes after 2 seconds"),a(u,"class","btn"),a(u,"title","Unminimizes after 2 seconds"),a(c,"class","btn"),a(c,"title","Visible again after 2 seconds"),a(d,"class","btn"),a(_,"class","btn"),a(_,"title","Minimizes the window, requests attention for 3s and then resets it"),a(i,"class","flex flex-wrap gap-2"),a(R,"type","checkbox"),a(L,"type","checkbox"),a(B,"type","checkbox"),a(te,"type","checkbox"),a(I,"type","checkbox"),a(E,"class","flex flex-wrap gap-2"),a(ne,"class","input"),a(ne,"type","number"),a(ne,"min","0"),a(V,"class","input"),a(V,"type","number"),a(V,"min","0"),a(_e,"class","flex children:grow flex-col"),a(he,"class","input"),a(he,"type","number"),a(he,"min","400"),a(me,"class","input"),a(me,"type","number"),a(me,"min","400"),a(Oe,"class","flex children:grow flex-col"),a(ke,"class","input"),a(ke,"type","number"),a(Ne,"class","input"),a(Ne,"type","number"),a(H,"class","flex children:grow flex-col"),a(K,"class","input"),a(K,"type","number"),a(K,"min","800"),a(Pe,"class","input"),a(Pe,"type","number"),a(Pe,"min","400"),a(Ve,"class","flex children:grow flex-col"),a(ee,"class","flex flex-row gap-2 flex-wrap"),a(lt,"class","text-accent dark:text-darkAccent font-700"),a(Re,"class","grow"),a(on,"class","text-accent dark:text-darkAccent font-700"),a(Ge,"class","grow"),a(He,"class","flex"),a(an,"class","text-accent dark:text-darkAccent font-700"),a(Je,"class","grow"),a(hn,"class","text-accent dark:text-darkAccent font-700"),a(Xe,"class","grow"),a(Mt,"class","flex"),a(gn,"class","text-accent dark:text-darkAccent font-700"),a(Ye,"class","grow"),a(Cn,"class","text-accent dark:text-darkAccent font-700"),a(Ke,"class","grow"),a(Ct,"class","flex"),a(Sn,"class","text-accent dark:text-darkAccent font-700"),a(xe,"class","grow"),a(Pn,"class","text-accent dark:text-darkAccent font-700"),a(Qe,"class","grow"),a(Tt,"class","flex"),a(Ut,"class","mb-2"),a(At,"type","checkbox"),a(Lt,"type","checkbox"),a(Et,"type","checkbox"),a(Fe,"class","flex gap-2"),a(qe,"class","input"),t[19]===void 0&&zt(()=>t[57].call(qe)),a(Ze,"class","input"),a(Ze,"type","number"),a($e,"class","input"),a($e,"type","number"),a(Ue,"class","flex gap-2"),a(et,"class","input grow"),a(et,"id","title"),a(qt,"class","btn"),a(qt,"type","submit"),a(at,"class","flex gap-1"),a(tt,"class","input grow"),a(tt,"id","url"),a(Bt,"class","btn"),a(Bt,"id","open-url"),a(ct,"class","flex gap-1"),a(ut,"class","flex flex-col gap-1")},m(w,j){m(w,e,j),m(w,n,j),m(w,i,j),r(i,o),r(i,l),r(i,u),r(i,f),r(i,c),r(i,p),r(i,d),r(i,k),r(i,_),m(w,y,j),m(w,g,j),m(w,b,j),m(w,E,j),r(E,W),r(W,F),r(W,R),R.checked=t[3],r(E,q),r(E,O),r(O,A),r(O,L),L.checked=t[2],r(E,P),r(E,T),r(T,U),r(T,B),B.checked=t[4],r(E,Y),r(E,$),r($,ge),r($,te),te.checked=t[5],r(E,oe),r(E,x),r(x,ye),r(x,I),I.checked=t[6],m(w,Q,j),m(w,le,j),m(w,ae,j),m(w,ee,j),r(ee,_e),r(_e,ce),r(ce,we),r(ce,ne),G(ne,t[13]),r(_e,Ae),r(_e,Se),r(Se,N),r(Se,V),G(V,t[14]),r(ee,Ie),r(ee,Oe),r(Oe,Le),r(Le,fe),r(Le,he),G(he,t[7]),r(Oe,de),r(Oe,De),r(De,it),r(De,me),G(me,t[8]),r(ee,pe),r(ee,H),r(H,ie),r(ie,X),r(ie,ke),G(ke,t[9]),r(H,Zt),r(H,vt),r(vt,$t),r(vt,Ne),G(Ne,t[10]),r(ee,en),r(ee,Ve),r(Ve,_t),r(_t,tn),r(_t,K),G(K,t[11]),r(Ve,It),r(Ve,ot),r(ot,Nt),r(ot,Pe),G(Pe,t[12]),m(w,bt,j),m(w,gt,j),m(w,yt,j),m(w,ze,j),r(ze,He),r(He,Re),r(Re,lt),r(Re,jt),r(Re,rt),r(rt,Ht),r(rt,wt),r(Re,Ft),r(Re,kt),r(kt,Xi),r(kt,ui),r(He,Yi),r(He,Ge),r(Ge,on),r(Ge,Ki),r(Ge,ln),r(ln,xi),r(ln,ai),r(Ge,Qi),r(Ge,sn),r(sn,Zi),r(sn,ci),r(ze,$i),r(ze,Mt),r(Mt,Je),r(Je,an),r(Je,eo),r(Je,cn),r(cn,to),r(cn,fi),r(Je,no),r(Je,dn),r(dn,io),r(dn,di),r(Mt,oo),r(Mt,Xe),r(Xe,hn),r(Xe,lo),r(Xe,mn),r(mn,ro),r(mn,pi),r(Xe,so),r(Xe,_n),r(_n,uo),r(_n,hi),r(ze,ao),r(ze,Ct),r(Ct,Ye),r(Ye,gn),r(Ye,co),r(Ye,yn),r(yn,fo),r(yn,mi),r(Ye,po),r(Ye,kn),r(kn,ho),r(kn,vi),r(Ct,mo),r(Ct,Ke),r(Ke,Cn),r(Ke,vo),r(Ke,Tn),r(Tn,_o),r(Tn,_i),r(Ke,bo),r(Ke,Ln),r(Ln,go),r(Ln,
`),o=s("input"),l=v(),u=s("div"),f=z(`Encoding:
`),c=s("input"),p=v(),d=s("div"),k=z(`Working directory:
`),_=s("input"),y=v(),g=s("div"),b=z(`Arguments:
`),E=s("input"),W=v(),F=s("div"),R=s("button"),R.textContent="Run",q=v(),O=s("button"),O.textContent="Kill",A=v(),T&&T.c(),a(o,"class","grow input"),a(n,"class","flex items-center gap-1"),a(c,"class","grow input"),a(u,"class","flex items-center gap-1"),a(_,"class","grow input"),a(_,"placeholder","Working directory"),a(d,"class","flex items-center gap-1"),a(E,"class","grow input"),a(E,"placeholder","Environment variables"),a(g,"class","flex items-center gap-1"),a(R,"class","btn"),a(O,"class","btn"),a(F,"class","flex children:grow gap-1"),a(e,"class","flex flex-col childre:grow gap-1")},m(U,B){m(U,e,B),r(e,n),r(n,i),r(n,o),G(o,t[0]),r(e,l),r(e,u),r(u,f),r(u,c),G(c,t[3]),r(e,p),r(e,d),r(d,k),r(d,_),G(_,t[1]),r(e,y),r(e,g),r(g,b),r(g,E),G(E,t[2]),r(e,W),r(e,F),r(F,R),r(F,q),r(F,O),r(e,A),T&&T.m(e,null),L||(P=[D(o,"input",t[10]),D(c,"input",t[11]),D(_,"input",t[12]),D(E,"input",t[13]),D(R,"click",t[6]),D(O,"click",t[7])],L=!0)},p(U,[B]){B&1&&o.value!==U[0]&&G(o,U[0]),B&8&&c.value!==U[3]&&G(c,U[3]),B&2&&_.value!==U[1]&&G(_,U[1]),B&4&&E.value!==U[2]&&G(E,U[2]),U[5]?T?T.p(U,B):(T=pl(U),T.c(),T.m(e,null)):T&&(T.d(1),T=null)},i:J,o:J,d(U){U&&h(e),T&&T.d(),L=!1,ue(P)}}}function Ms(t,e,n){const i=navigator.userAgent.includes("Windows");let o=i?"cmd":"sh",l=i?["/C"]:["-c"],{onMessage:u}=e,f='echo "hello world"',c=null,p="SOMETHING=value ANOTHER=2",d="",k="",_;function y(){return p.split(" ").reduce((A,L)=>{let[P,T]=L.split("=");return{...A,[P]:T}},{})}function g(){n(5,_=null);const A=new Sl(o,[...l,f],{cwd:c||null,env:y(),encoding:d});A.on("close",L=>{u(`command finished with code ${L.code} and signal ${L.signal}`),n(5,_=null)}),A.on("error",L=>u(`command error: "${L}"`)),A.stdout.on("data",L=>u(`command stdout: "${L}"`)),A.stderr.on("data",L=>u(`command stderr: "${L}"`)),A.spawn().then(L=>{n(5,_=L)}).catch(u)}function b(){_.kill().then(()=>u("killed child process")).catch(u)}function E(){_.write(k).catch(u)}function W(){f=this.value,n(0,f)}function F(){d=this.value,n(3,d)}function R(){c=this.value,n(1,c)}function q(){p=this.value,n(2,p)}function O(){k=this.value,n(4,k)}return t.$$set=A=>{"onMessage"in A&&n(9,u=A.onMessage)},[f,c,p,d,k,_,g,b,E,u,W,F,R,q,O]}class Cs extends Te{constructor(e){super(),Ce(this,e,Ms,ks,be,{onMessage:9})}}function Ji(t){return M(this,void 0,void 0,function(){return C(this,function(e){return[2,Qt(ve.STATUS_UPDATE,function(n){t(n==null?void 0:n.payload)})]})})}function nr(){return M(this,void 0,void 0,function(){function t(){e&&e(),e=void 0}var e;return C(this,function(n){return[2,new Promise(function(i,o){Ji(function(l){return l.error?(t(),o(l.error)):l.status==="DONE"?(t(),i()):void 0}).then(function(l){e=l}).catch(function(l){throw t(),l}),si(ve.INSTALL_UPDATE).catch(function(l){throw t(),l})})]})})}function ir(){return M(this,void 0,void 0,function(){function t(){e&&e(),e=void 0}var e;return C(this,function(n){return[2,new Promise(function(i,o){Wl(ve.UPDATE_AVAILABLE,function(l){var u;u=l==null?void 0:l.payload,t(),i({manifest:u,shouldUpdate:!0})}).catch(function(l){throw t(),l}),Ji(function(l){return l.error?(t(),o(l.error)):l.status==="UPTODATE"?(t(),i({shouldUpdate:!1})):void 0}).then(function(l){e=l}).catch(function(l){throw t(),l}),si(ve.CHECK_UPDATE).catch(function(l){throw t(),l})})]})})}Object.freeze({__proto__:null,onUpdaterEvent:Ji,installUpdate:nr,checkUpdate:ir});function Ts(t){let e;return{c(){e=s("button"),e.innerHTML='<div class="spinner animate-spin svelte-4xesec"></div>',a(e,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){m(n,e,i)},p:J,d(n){n&&h(e)}}}function As(t){let e,n,i;return{c(){e=s("button"),e.textContent="Install update",a(e,"class","btn")},m(o,l){m(o,e,l),n||(i=D(e,"click",t[4]),n=!0)},p:J,d(o){o&&h(e),n=!1,i()}}}function Ls(t){let e,n,i;return{c(){e=s("button"),e.textContent="Check update",a(e,"class","btn")},m(o,l){m(o,e,l),n||(i=D(e,"click",t[3]),n=!0)},p:J,d(o){o&&h(e),n=!1,i()}}}function Es(t){let e;function n(l,u){return!l[0]&&!l[2]?Ls:!l[1]&&l[2]?As:Ts}let i=n(t),o=i(t);return{c(){e=s("div"),o.c(),a(e,"class","flex ch
<video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`,a(e,"class","flex flex-col gap-2")},m(n,i){m(n,e,i)},p:J,i:J,o:J,d(n){n&&h(e)}}}function Rs(t,e,n){let{onMessage:i}=e;const o=window.constraints={audio:!0,video:!0};function l(f){const c=document.querySelector("video"),p=f.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${p[0].label}`),window.stream=f,c.srcObject=f}function u(f){if(f.name==="ConstraintNotSatisfiedError"){const c=o.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else f.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: ${f.name}`,f)}return ft(async()=>{try{const f=await navigator.mediaDevices.getUserMedia(o);l(f)}catch(f){u(f)}}),ji(()=>{window.stream.getTracks().forEach(function(f){f.stop()})}),t.$$set=f=>{"onMessage"in f&&n(0,i=f.onMessage)},[i]}class Is extends Te{constructor(e){super(),Ce(this,e,Rs,Ps,be,{onMessage:0})}}function Ns(t){let e,n,i,o,l,u;return{c(){e=s("div"),n=s("button"),n.textContent="Show",i=v(),o=s("button"),o.textContent="Hide",a(n,"class","btn"),a(n,"id","show"),a(n,"title","Hides and shows the app after 2 seconds"),a(o,"class","btn"),a(o,"id","hide")},m(f,c){m(f,e,c),r(e,n),r(e,i),r(e,o),l||(u=[D(n,"click",t[0]),D(o,"click",t[1])],l=!0)},p:J,i:J,o:J,d(f){f&&h(e),l=!1,ue(u)}}}function js(t,e,n){let{onMessage:i}=e;function o(){l().then(()=>{setTimeout(()=>{Bl().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function l(){return Vl().then(()=>i("Hide app")).catch(i)}return t.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[o,l,i]}class Hs extends Te{constructor(e){super(),Ce(this,e,js,Ns,be,{onMessage:2})}}function hl(t,e,n){const i=t.slice();return i[32]=e[n],i}function ml(t,e,n){const i=t.slice();return i[35]=e[n],i}function vl(t){let e,n,i,o,l,u,f,c,p,d,k,_,y,g,b;function E(A,L){return A[3]?Us:Fs}let W=E(t),F=W(t);function R(A,L){return A[2]?Bs:qs}let q=R(t),O=q(t);return{c(){e=s("div"),n=s("span"),n.textContent="Tauri API Validation",i=v(),o=s("span"),l=s("span"),F.c(),f=v(),c=s("span"),c.innerHTML='<div class="i-codicon-chrome-minimize"></div>',p=v(),d=s("span"),O.c(),_=v(),y=s("span"),y.innerHTML='<div class="i-codicon-chrome-close"></div>',a(n,"class","lt-sm:pl-10 text-darkPrimaryText"),a(l,"title",u=t[3]?"Switch to Light mode":"Switch to Dark mode"),a(l,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),a(c,"title","Minimize"),a(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),a(d,"title",k=t[2]?"Restore":"Maximize"),a(d,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),a(y,"title","Close"),a(y,"class","hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText "),a(o,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),a(e,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),a(e,"data-tauri-drag-region","")},m(A,L){m(A,e,L),r(e,n),r(e,i),r(e,o),r(o,l),F.m(l,null),r(o,f),r(o,c),r(o,p),r(o,d),O.m(d,null),r(o,_),r(o,y),g||(b=[D(l,"click",t[12]),D(c,"click",t[9]),D(d,"click",t[10]),D(y,"click",t[11])],g=!0)},p(A,L){W!==(W=E(A))&&(F.d(1),F=W(A),F&&(F.c(),F.m(l,null))),L[0]&8&&u!==(u=A[3]?"Switch to Light mode":"Switch to Dark mode")&&a(l,"title",u),q!==(q=R(A))&&(O.d(1),O=q(A),O&&(O.c(),O.m(d,null))),L[0]&4&&k!==(k=A[2]?"Restore":"Maximize")&&a(d,"title",k)},d(A){A&&h(e),F.d(),O.d(),g=!1,ue(b)}}}function Fs(t){let e;return{c(){e=s("div"),a(e,"class","i-ph-moon")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function Us(t){let e;return{c(){e=s("div"),a(e,"class","i-ph-su
`),n=s("div"),a(n,"class","i-ph-moon")},m(i,o){m(i,e,o),m(i,n,o)},d(i){i&&h(e),i&&h(n)}}}function Xs(t){let e,n;return{c(){e=z(`Switch to Light mode
`),n=s("div"),a(n,"class","i-ph-sun")},m(i,o){m(i,e,o),m(i,n,o)},d(i){i&&h(e),i&&h(n)}}}function Ys(t){let e,n,i,o,l,u=t[35].label+"",f,c,p,d;function k(){return t[20](t[35])}return{c(){e=s("a"),n=s("div"),o=v(),l=s("p"),f=z(u),a(n,"class",i=t[35].icon+" mr-2"),a(e,"href","##"),a(e,"class",c="nv "+(t[1]===t[35]?"nv_selected":""))},m(_,y){m(_,e,y),r(e,n),r(e,o),r(e,l),r(l,f),p||(d=D(e,"click",k),p=!0)},p(_,y){t=_,y[0]&2&&c!==(c="nv "+(t[1]===t[35]?"nv_selected":""))&&a(e,"class",c)},d(_){_&&h(e),p=!1,d()}}}function bl(t){let e,n=t[35]&&Ys(t);return{c(){n&&n.c(),e=oi()},m(i,o){n&&n.m(i,o),m(i,e,o)},p(i,o){i[35]&&n.p(i,o)},d(i){n&&n.d(i),i&&h(e)}}}function gl(t){let e,n=t[32].html+"",i;return{c(){e=new pr(!1),i=oi(),e.a=i},m(o,l){e.m(n,o,l),m(o,i,l)},p(o,l){l[0]&64&&n!==(n=o[32].html+"")&&e.p(n)},d(o){o&&h(i),o&&e.d()}}}function Ks(t){let e,n,i,o,l,u,f,c,p,d,k,_,y,g,b,E,W,F,R,q,O,A,L,P,T,U,B,Y=t[1].label+"",$,ge,te,oe,x,ye,I,Q,le,ae,ee,_e,ce,we,ne,Ae,Se,N,V=t[5]&&vl(t);function Ie(H,ie){return H[0]?Gs:Vs}let Oe=Ie(t),Le=Oe(t),fe=!t[5]&&_l(t),he=t[7],de=[];for(let H=0;H<he.length;H+=1)de[H]=bl(ml(t,he,H));var De=t[1].component;function it(H){return{props:{onMessage:H[14],insecureRenderHtml:H[15]}}}De&&(x=new De(it(t)));let me=t[6],pe=[];for(let H=0;H<me.length;H+=1)pe[H]=gl(hl(t,me,H));return{c(){V&&V.c(),e=v(),n=s("div"),Le.c(),i=v(),o=s("div"),l=s("aside"),u=s("img"),c=v(),fe&&fe.c(),p=v(),d=s("a"),d.innerHTML=`Documentation
<span class="i-codicon-link-external"></span>`,k=v(),_=s("a"),_.innerHTML=`GitHub
<span class="i-codicon-link-external"></span>`,y=v(),g=s("a"),g.innerHTML=`Source
<span class="i-codicon-link-external"></span>`,b=v(),E=s("br"),W=v(),F=s("div"),R=v(),q=s("br"),O=v(),A=s("div");for(let H=0;H<de.length;H+=1)de[H].c();P=v(),T=s("main"),U=s("div"),B=s("h1"),$=z(Y),ge=v(),te=s("div"),oe=s("div"),x&&ei(x.$$.fragment),ye=v(),I=s("div"),Q=s("div"),le=v(),ae=s("div"),ee=s("p"),ee.textContent="Console",_e=v(),ce=s("div"),ce.innerHTML='<div class="i-codicon-clear-all"></div>',we=v(),ne=s("div");for(let H=0;H<pe.length;H+=1)pe[H].c();a(n,"id","sidebarToggle"),a(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"),a(u,"class","self-center p-7 cursor-pointer"),ur(u.src,f="tauri_logo.png")||a(u,"src",f),a(u,"alt","Tauri logo"),a(d,"class","nv justify-between h-8"),a(d,"target","_blank"),a(d,"href","https://tauri.app/v1/guides/"),a(_,"class","nv justify-between h-8"),a(_,"target","_blank"),a(_,"href","https://github.com/tauri-apps/tauri"),a(g,"class","nv justify-between h-8"),a(g,"target","_blank"),a(g,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),a(F,"class","bg-white/5 h-2px"),a(A,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),a(l,"id","sidebar"),a(l,"class",L="lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 "+(t[5]?"bg-darkPrimaryLighter/60 lt-sm:bg-darkPrimaryLighter":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"),a(oe,"class","mr-2"),a(te,"class","overflow-y-auto"),a(U,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),a(Q,"class","bg-black/20 h-2px cursor-ns-resize"),a(ee,"class","font-semibold"),a(ce,"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 "),a(ae,"class","flex justify-between items-center px-2"),a(ne,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),a(I,"id","console"),a(I,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),a(T,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),a(o,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(H,ie){V&&V.m(H,ie),m(H,e,ie),m(H,n,ie),Le.m(n,null),m(H,i,ie),m(H,o,ie),r(o,l),r(l,u),r(l,c),fe&&fe.m(l,null),r(l,p),r(l,d),r(l,k),r(l,_),r(l,y),r(l,g),r(l,b),r(l,E),r(l,W),r(l,F),r(l,R),r(l,q),r(l,O),r(l,A);for(let X=0;X<de.length;X+=1)de[X].m(A,null);r(o,P),r(o,T),r(T,U),r(U,B),r(B,$),r(U,ge),r(U,te),r(te,oe),x&&Yt(x,oe,null),r(T,ye),r(T,I),r(I,Q),r(I,le),r(I,ae),r(ae,ee),r(ae,_e),r(ae,ce),r(I,we),r(I,ne);for(let X=0;X<pe.length;X+=1)pe[X].m(ne,null);t[21](I),Ae=!0,Se||(N=[D(u,"click",t[19]),D(Q,"mousedown",t[17]),D(ce,"click",t[16])],Se=!0)},p(H,ie){if(H[5]?V?V.p(H,ie):(V=vl(H),V.c(),V.m(e.parentNode,e)):V&&(V.d(1),V=null),Oe!==(Oe=Ie(H))&&(Le.d(1),Le=Oe(H),Le&&(Le.c(),Le.m(n,null))),H[5]?fe&&(fe.d(1),fe=null):fe?fe.p(H,ie):(fe=_l(H),fe.c(),fe.m(l,p)),ie[0]&387){he=H[7];let X;for(X=0;X<he.length;X+=1){const ke=ml(H,he,X);de[X]?de[X].p(ke,ie):(de[X]=bl(ke),de[X].c(),de[X].m(A,null))}for(;X<de.length;X+=1)de[X].d(1);de.length=he.length}if((!Ae||ie[0]&32&&L!==(L="lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 "+(H[5]?"bg-darkPrimaryLighter/60 lt-sm:bg-darkPrimaryLighter":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"))&&a(l,"class",L),(!Ae||ie[0]&2)&&Y!==(Y=H[1].label+"")&&Z($,Y),De!==(De=H[1].component)){if(x){li();const X=x;je(X.$$.fragment,1,0,()=>{Kt(X,1)}),ri()}De?(x=new De(it(H)),ei(x.$$.fragment),We(x.$$.fragment,1),Yt(x,oe,null)):x=null}if(ie[0]&64){me=H[6];let X;for(X=0;X<me.length;X+=1){const ke=hl(H,me,X);pe[X]?pe[X].p(ke,ie):(pe[X]=gl(ke),pe[X].c(),pe[X].m(ne,null))}for(;X<pe.length;X+=1)pe[X].d(1);pe.length=me.length}},i(H){Ae||(x&&We(x.$$.