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

44 lines
90 KiB
JavaScript
Raw Normal View History

const Ql=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 r of o)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerpolicy&&(r.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?r.credentials="include":o.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}};Ql();function G(){}function hl(t){return t()}function Ho(){return Object.create(null)}function ue(t){t.forEach(hl)}function Zl(t){return typeof t=="function"}function me(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Nn;function xl(t,e){return Nn||(Nn=document.createElement("a")),Nn.href=e,t===Nn.href}function $l(t){return Object.keys(t).length===0}function er(t,...e){if(t==null)return G;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function ml(t,e,n){t.$$.on_destroy.push(er(e,n))}function l(t,e){t.appendChild(e)}function v(t,e,n){t.insertBefore(e,n||null)}function m(t){t.parentNode.removeChild(t)}function ut(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 tr(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function E(t){return document.createTextNode(t)}function _(){return E(" ")}function Wi(){return E("")}function P(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function Yn(t){return function(e){return e.preventDefault(),t.call(this,e)}}function u(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function re(t){return t===""?null:+t}function nr(t){return Array.from(t.childNodes)}function Q(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function B(t,e){t.value=e==null?"":e}function Ct(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 Oi(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function Un(t,e,n){t.classList[n?"add":"remove"](e)}class ir{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=tr(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)v(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(m)}}let qt;function Ut(t){qt=t}function vl(){if(!qt)throw new Error("Function called outside component initialization");return qt}function Mt(t){vl().$$.on_mount.push(t)}function Ei(t){vl().$$.on_destroy.push(t)}const It=[],Xn=[],Bn=[],Fo=[],or=Promise.resolve();let Li=!1;function lr(){Li||(Li=!0,or.then(_l))}function zt(t){Bn.push(t)}const Si=new Set;let qn=0;function _l(){const t=qt;do{for(;qn<It.length;){const e=It[qn];qn++,Ut(e),rr(e.$$)}for(Ut(null),It.length=0,qn=0;Xn.length;)Xn.pop()();for(let e=0;e<Bn.length;e+=1){const n=Bn[e];Si.has(n)||(Si.add(n),n())}Bn.length=0}while(It.length);for(;Fo.length;)Fo.pop()();Li=!1,Si.clear(),Ut(t)}function rr(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 Vn=new Set;let lt;function $n(){lt={r:0,c:[],p:lt}}function ei(){lt.r||ue(lt.c),lt=lt.p}function Te(t,e){t&&t.i&&(Vn.delete(t),t.i(e))}function Ee(t,e,n,i){if(t&&t.o){if(Vn.has(t))return;Vn.add(t),lt.c.push(()=>{Vn.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}}function Kn(t){t&&t.c()}function Bt(t,e,n,i){const{fragment:o,on_mount:r,on_destroy:a,after_update:f}=t.$$;o&&o.m(e,n),i||zt(()=>{const c=r.map(hl).filter(Zl);a?a.push(...c):ue(c),t.$$.on_mount=[]}),f.forEach(zt)}function Vt(t,e){const n=t.$$;n.fragment!==null&&(ue(n.on_destroy),n.fragment&&n.
`),stderr:f.join(`
`)})}),n.spawn().catch(r)})]})})},e}(Gn);function Di(t,e){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"Shell",message:{cmd:"open",path:t,with:e}})]})})}Object.freeze({__proto__:null,Command:kl,Child:wl,EventEmitter:Gn,open:Di});function Ml(t,e){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"Event",message:{cmd:"unlisten",event:t,eventId:e}})]})})}function Tl(t,e,n){return T(this,void 0,void 0,function(){return C(this,function(i){switch(i.label){case 0:return[4,A({__tauriModule:"Event",message:{cmd:"emit",event:t,windowLabel:e,payload:typeof n=="string"?n:JSON.stringify(n)}})];case 1:return i.sent(),[2]}})})}function Ri(t,e,n){return T(this,void 0,void 0,function(){var i=this;return C(this,function(o){return[2,A({__tauriModule:"Event",message:{cmd:"listen",event:t,windowLabel:e,handler:at(n)}}).then(function(r){return function(){return T(i,void 0,void 0,function(){return C(this,function(a){return[2,Ml(t,r)]})})}})]})})}function Cl(t,e,n){return T(this,void 0,void 0,function(){return C(this,function(i){return[2,Ri(t,e,function(o){n(o),Ml(t,o.id).catch(function(){})})]})})}var Gt,Zn=function(t,e){this.type="Logical",this.width=t,this.height=e},Tt=function(){function t(e,n){this.type="Physical",this.width=e,this.height=n}return t.prototype.toLogical=function(e){return new Zn(this.width/e,this.height/e)},t}(),zl=function(t,e){this.type="Logical",this.x=t,this.y=e},rt=function(){function t(e,n){this.type="Physical",this.x=e,this.y=n}return t.prototype.toLogical=function(e){return new zl(this.x/e,this.y/e)},t}();function Nt(){return new St(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Sl(){return window.__TAURI_METADATA__.__windows.map(function(t){return new St(t.label,{skip:!0})})}(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(Gt||(Gt={}));var st,Io=["tauri://created","tauri://error"],Al=function(){function t(e){this.label=e,this.listeners=Object.create(null)}return t.prototype.listen=function(e,n){return T(this,void 0,void 0,function(){var i=this;return C(this,function(o){return this._handleTauriEvent(e,n)?[2,Promise.resolve(function(){var r=i.listeners[e];r.splice(r.indexOf(n),1)})]:[2,Ri(e,this.label,n)]})})},t.prototype.once=function(e,n){return T(this,void 0,void 0,function(){var i=this;return C(this,function(o){return this._handleTauriEvent(e,n)?[2,Promise.resolve(function(){var r=i.listeners[e];r.splice(r.indexOf(n),1)})]:[2,Cl(e,this.label,n)]})})},t.prototype.emit=function(e,n){return T(this,void 0,void 0,function(){var i,o;return C(this,function(r){if(Io.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,Tl(e,this.label,n)]})})},t.prototype._handleTauriEvent=function(e,n){return!!Io.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)},t}(),Ol=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return ji(e,t),e.prototype.scaleFactor=function(){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})]})})},e.prototype.innerPosition=function(){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(function(i){var o=i.x,r=i.y;return new rt(o,r)})]})})},e.prototype.outerPosition=function(){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(function(i){var o=i.x,r=i.y;return new rt(o,r)})]})})},e.prototype.innerSize=function(){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(function(i){var o=i.width,r=i.height;return new Tt(o,r)})
Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),st=new St("main",{skip:!0}));Object.freeze({__proto__:null,WebviewWindow:St,WebviewWindowHandle:Al,WindowManager:Ol,getCurrent:Nt,getAll:Sl,get appWindow(){return st},LogicalSize:Zn,PhysicalSize:Tt,LogicalPosition:zl,PhysicalPosition:rt,get UserAttentionType(){return Gt},currentMonitor:ar,primaryMonitor:cr,availableMonitors:fr});function dr(){return navigator.appVersion.includes("Win")}var pr=dr()?`\r
`:`
`;function Ll(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"platform"}})]})})}function hr(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"version"}})]})})}function mr(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"osType"}})]})})}function vr(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"arch"}})]})})}function _r(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"tempdir"}})]})})}Object.freeze({__proto__:null,EOL:pr,platform:Ll,version:hr,type:mr,arch:vr,tempdir:_r});function Pl(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"App",message:{cmd:"getAppVersion"}})]})})}function Wl(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"App",message:{cmd:"getAppName"}})]})})}function El(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"App",message:{cmd:"getTauriVersion"}})]})})}Object.freeze({__proto__:null,getName:Wl,getVersion:Pl,getTauriVersion:El});function jl(t){return t===void 0&&(t=0),T(this,void 0,void 0,function(){return C(this,function(e){return[2,A({__tauriModule:"Process",message:{cmd:"exit",exitCode:t}})]})})}function Hi(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"Process",message:{cmd:"relaunch"}})]})})}Object.freeze({__proto__:null,exit:jl,relaunch:Hi});function br(t){let e,n,i,o,r,a,f,c,p,d,k,b,y,g,h,O,j,I,R,H,M,z,S,D,L,N;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=_(),i=s("br"),o=_(),r=s("br"),a=_(),f=s("pre"),c=E("App name: "),p=s("code"),d=E(t[2]),k=E(`
App version: `),b=s("code"),y=E(t[0]),g=E(`
Tauri version: `),h=s("code"),O=E(t[1]),j=E(`
`),I=_(),R=s("br"),H=_(),M=s("div"),z=s("button"),z.textContent="Close application",S=_(),D=s("button"),D.textContent="Relaunch application",u(z,"class","btn"),u(D,"class","btn"),u(M,"class","flex flex-wrap gap-1 shadow-")},m(q,X){v(q,e,X),v(q,n,X),v(q,i,X),v(q,o,X),v(q,r,X),v(q,a,X),v(q,f,X),l(f,c),l(f,p),l(p,d),l(f,k),l(f,b),l(b,y),l(f,g),l(f,h),l(h,O),l(f,j),v(q,I,X),v(q,R,X),v(q,H,X),v(q,M,X),l(M,z),l(M,S),l(M,D),L||(N=[P(z,"click",t[3]),P(D,"click",t[4])],L=!0)},p(q,[X]){X&4&&Q(d,q[2]),X&1&&Q(y,q[0]),X&2&&Q(O,q[1])},i:G,o:G,d(q){q&&m(e),q&&m(n),q&&m(i),q&&m(o),q&&m(r),q&&m(a),q&&m(f),q&&m(I),q&&m(R),q&&m(H),q&&m(M),L=!1,ue(N)}}}function gr(t,e,n){let i="0.0.0",o="0.0.0",r="Unknown";Wl().then(c=>{n(2,r=c)}),Pl().then(c=>{n(0,i=c)}),El().then(c=>{n(1,o=c)});async function a(){await jl()}async function f(){await Hi()}return[i,o,r,a,f]}class yr extends ye{constructor(e){super(),ge(this,e,gr,br,me,{})}}function Dl(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"Cli",message:{cmd:"cliMatches"}})]})})}Object.freeze({__proto__:null,getMatches:Dl});function wr(t){let e,n,i,o,r,a,f,c,p,d,k,b,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=_(),i=s("br"),o=_(),r=s("div"),r.textContent="Note that the arguments are only parsed, not implemented.",a=_(),f=s("br"),c=_(),p=s("br"),d=_(),k=s("button"),k.textContent="Get matches",u(r,"class","note"),u(k,"class","btn"),u(k,"id","cli-matches")},m(g,h){v(g,e,h),v(g,n,h),v(g,i,h),v(g,o,h),v(g,r,h),v(g,a,h),v(g,f,h),v(g,c,h),v(g,p,h),v(g,d,h),v(g,k,h),b||(y=P(k,"click",t[0]),b=!0)},p:G,i:G,o:G,d(g){g&&m(e),g&&m(n),g&&m(i),g&&m(o),g&&m(r),g&&m(a),g&&m(f),g&&m(c),g&&m(p),g&&m(d),g&&m(k),b=!1,y()}}}function kr(t,e,n){let{onMessage:i}=e;function o(){Dl().then(i).catch(i)}return t.$$set=r=>{"onMessage"in r&&n(1,i=r.onMessage)},[o,i]}class Mr extends ye{constructor(e){super(),ge(this,e,kr,wr,me,{onMessage:1})}}function Lt(t,e){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,Ri(t,null,e)]})})}function Rl(t,e){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,Cl(t,null,e)]})})}function ti(t,e){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,Tl(t,void 0,e)]})})}Object.freeze({__proto__:null,listen:Lt,once:Rl,emit:ti});function Tr(t){let e,n,i,o,r,a,f,c;return{c(){e=s("div"),n=s("button"),n.textContent="Call Log API",i=_(),o=s("button"),o.textContent="Call Request (async) API",r=_(),a=s("button"),a.textContent="Send event to Rust",u(n,"class","btn"),u(n,"id","log"),u(o,"class","btn"),u(o,"id","request"),u(a,"class","btn"),u(a,"id","event")},m(p,d){v(p,e,d),l(e,n),l(e,i),l(e,o),l(e,r),l(e,a),f||(c=[P(n,"click",t[0]),P(o,"click",t[1]),P(a,"click",t[2])],f=!0)},p:G,i:G,o:G,d(p){p&&m(e),f=!1,ue(c)}}}function Cr(t,e,n){let{onMessage:i}=e,o;Mt(async()=>{o=await Lt("rust-event",i)}),Ei(()=>{o&&o()});function r(){Qn("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function a(){Qn("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function f(){ti("js-event","this is the payload string")}return t.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[r,a,f,i]}class zr extends ye{constructor(e){super(),ge(this,e,Cr,Tr,me,{onMessage:3})}}function Fi(t){return t===void 0&&(t={}),T(this,void 0,void 0,function(){return C(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,A({__tauriModule:"Dialog",message:{cmd:"openDialog",options:t}})]})})}function Hl(t){return t===void 0&&(t={}),T(this,void 0,void 0,function(){return C(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,A({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:t}})]})})}function Sr(t,e){return T(this,void 0,void 0,function(){var n;return C(this,function(i){return[2,A({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:t,title:(n=typeof e=="string"?{title:e}:e)==null?void 0:n.title,type:n==null?void 0:n.type}})]})})}function Fl(t,e){return T(this,void 0,void 0,function(){var n;return C(this,function(i){return[2,A({__tauriModule:"Dialog",message:{cmd:"askDialog",message:t,title:(n=typeof e=="string"?{title:e}:e)==null?void 0:n.title,type:n==null?void 0:n.type}})]})})}function Ar(t,e){return T(this,void 0,void 0,function(){var n;return C(this,function(i){return[2,A({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:t,title:(n=typeof e=="string"?{title:e}:e)==null?void 0:n.title,type:n==null?void 0:n.type}})]})})}Object.freeze({__proto__:null,open:Fi,save:Hl,message:Sr,ask:Fl,confirm:Ar});var At;function Or(t,e){return e===void 0&&(e={}),T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"readTextFile",path:t,options:e}})]})})}function Ii(t,e){return e===void 0&&(e={}),T(this,void 0,void 0,function(){var n;return C(this,function(i){switch(i.label){case 0:return[4,A({__tauriModule:"Fs",message:{cmd:"readFile",path:t,options:e}})];case 1:return n=i.sent(),[2,Uint8Array.from(n)]}})})}function Pi(t,e,n){return T(this,void 0,void 0,function(){var i,o;return C(this,function(r){return typeof n=="object"&&Object.freeze(n),typeof t=="object"&&Object.freeze(t)
Multipart`),Y=_(),ce=s("br"),$=_(),pe=s("br"),ve=_(),ie=s("button"),ie.textContent="Post it",we=_(),Ce=s("br"),te=_(),_e=s("br"),fe=_(),Kn(oe.$$.fragment),i.__value="GET",i.value=i.__value,o.__value="POST",o.value=o.__value,r.__value="PUT",r.value=r.__value,a.__value="PATCH",a.value=a.__value,f.__value="DELETE",f.value=f.__value,u(n,"class","input"),u(n,"id","request-method"),t[0]===void 0&&zt(()=>t[9].call(n)),u(k,"class","input h-auto w-100%"),u(k,"id","request-body"),u(k,"placeholder","Request body"),u(k,"rows","5"),u(h,"class","btn"),u(h,"id","make-request"),u(z,"class","input"),u(D,"class","input"),u(M,"class","flex gap-2 children:grow"),u(x,"type","checkbox"),u(ie,"class","btn"),u(ie,"type","button")},m(W,V){v(W,e,V),l(e,n),l(n,i),l(n,o),l(n,r),l(n,a),l(n,f),Ct(n,t[0]),l(e,c),l(e,p),l(e,d),l(e,k),B(k,t[1]),l(e,b),l(e,y),l(e,g),l(e,h),v(W,O,V),v(W,j,V),v(W,I,V),v(W,R,V),v(W,H,V),v(W,M,V),l(M,z),B(z,t[2]),l(M,S),l(M,D),B(D,t[3]),v(W,L,V),v(W,N,V),v(W,q,V),v(W,X,V),l(X,x),x.checked=t[5],l(X,ae),v(W,Y,V),v(W,ce,V),v(W,$,V),v(W,pe,V),v(W,ve,V),v(W,ie,V),v(W,we,V),v(W,Ce,V),v(W,te,V),v(W,_e,V),v(W,fe,V),Bt(oe,W,V),le=!0,Ae||(ee=[P(n,"change",t[9]),P(k,"input",t[10]),P(e,"submit",Yn(t[6])),P(z,"input",t[11]),P(D,"input",t[12]),P(x,"change",t[13]),P(ie,"click",t[7])],Ae=!0)},p(W,[V]){V&1&&Ct(n,W[0]),V&2&&B(k,W[1]),V&4&&z.value!==W[2]&&B(z,W[2]),V&8&&D.value!==W[3]&&B(D,W[3]),V&32&&(x.checked=W[5]);const ne={};V&16&&(ne.json=W[4]),oe.$set(ne)},i(W){le||(Te(oe.$$.fragment,W),le=!0)},o(W){Ee(oe.$$.fragment,W),le=!1},d(W){W&&m(e),W&&m(O),W&&m(j),W&&m(I),W&&m(R),W&&m(H),W&&m(M),W&&m(L),W&&m(N),W&&m(q),W&&m(X),W&&m(Y),W&&m(ce),W&&m($),W&&m(pe),W&&m(ve),W&&m(ie),W&&m(we),W&&m(Ce),W&&m(te),W&&m(_e),W&&m(fe),Vt(oe,W),Ae=!1,ue(ee)}}}function Zr(t,e,n){let i="GET",o="",{onMessage:r}=e;async function a(){const j=await xn().catch(H=>{throw r(H),H}),R={url:"http://localhost:3003",method:i||"GET"||"GET"};o.startsWith("{")&&o.endsWith("}")||o.startsWith("[")&&o.endsWith("]")?R.body=Jn.json(JSON.parse(o)):o!==""&&(R.body=Jn.text(o)),j.request(R).then(r).catch(r)}let f="baz",c="qux",p=null,d=!0;async function k(){const j=await xn().catch(I=>{throw r(I),I});n(4,p=await j.request({url:"http://localhost:3003",method:"POST",body:Jn.form({foo:f,bar:c}),headers:d?{"Content-Type":"multipart/form-data"}:void 0,responseType:Ot.Text}))}function b(){i=Oi(this),n(0,i)}function y(){o=this.value,n(1,o)}function g(){f=this.value,n(2,f)}function h(){c=this.value,n(3,c)}function O(){d=this.checked,n(5,d)}return t.$$set=j=>{"onMessage"in j&&n(8,r=j.onMessage)},[i,o,f,c,p,d,a,k,r,b,y,g,h,O]}class xr extends ye{constructor(e){super(),ge(this,e,Zr,Qr,me,{onMessage:8})}}function $r(t){let e,n,i;return{c(){e=s("button"),e.textContent="Send test notification",u(e,"class","btn"),u(e,"id","notification")},m(o,r){v(o,e,r),n||(i=P(e,"click",es),n=!0)},p:G,i:G,o:G,d(o){o&&m(e),n=!1,i()}}}function es(){new Notification("Notification title",{body:"This is the notification body"})}function ts(t,e,n){let{onMessage:i}=e;return t.$$set=o=>{"onMessage"in o&&n(0,i=o.onMessage)},[i]}class ns extends ye{constructor(e){super(),ge(this,e,ts,$r,me,{onMessage:0})}}function Qo(t,e,n){const i=t.slice();return i[65]=e[n],i}function Zo(t,e,n){const i=t.slice();return i[68]=e[n],i}function xo(t){let e,n,i,o,r,a,f=Object.keys(t[1]),c=[];for(let p=0;p<f.length;p+=1)c[p]=$o(Zo(t,f,p));return{c(){e=s("span"),e.textContent="Selected window:",n=_(),i=s("select"),o=s("option"),o.textContent="Choose a window...";for(let p=0;p<c.length;p+=1)c[p].c();u(e,"class","font-700 text-sm"),o.__value="",o.value=o.__value,o.disabled=!0,o.selected=!0,u(i,"class","input"),t[0]===void 0&&zt(()=>t[38].call(i))},m(p,d){v(p,e,d),v(p,n,d),v(p,i,d),l(i,o);for(let k=0;k<c.length;k+=1)c[k].m(i,null);Ct(i,t[0]),r||(a=P(i,"change",t[38]),r=!0)},p(p,d){if(d[0]&2){f=Object.keys(p[1]);let k;for(k=0;k<f.length;k+=1){const b=Zo(p,f,k);c[k]?c[k].p(b,d):(c[k]=$o(b),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&&Ct(i,p[0])},d(p){p&&m(e),p&&m(n),p&&m(i),ut(c,p),r=!1,a()}}}function $o(t){let
`),R=s("input"),H=_(),M=s("label"),z=E(`Resizable
`),S=s("input"),D=_(),L=s("label"),N=E(`Has decorations
`),q=s("input"),X=_(),x=s("label"),ae=E(`Always on top
`),Y=s("input"),ce=_(),$=s("label"),pe=E(`Fullscreen
`),ve=s("input"),ie=_(),we=s("br"),Ce=_(),te=s("div"),_e=s("div"),fe=s("div"),oe=E(`X
`),le=s("input"),Ae=_(),ee=s("div"),W=E(`Y
`),V=s("input"),ne=_(),be=s("div"),je=s("div"),Oe=E(`Width
`),Z=s("input"),U=_(),se=s("div"),J=E(`Height
`),de=s("input"),Jt=_(),Ie=s("div"),ct=s("div"),Yt=E(`Min width
`),Pe=s("input"),Xt=_(),ft=s("div"),Kt=E(`Min height
`),We=s("input"),Qt=_(),Ne=s("div"),K=s("div"),Pt=E(`Max width
`),ze=s("input"),Wt=_(),xe=s("div"),Et=E(`Max height
`),Se=s("input"),dt=_(),pt=s("br"),ht=_(),Me=s("div"),De=s("div"),Le=s("div"),$e=s("div"),$e.textContent="Inner Size",jt=_(),et=s("span"),Dt=E("Width: "),ni=E(mt),Ni=_(),Zt=s("span"),Ui=E("Height: "),ii=E(xt),qi=_(),Ue=s("div"),$t=s("div"),$t.textContent="Outer Size",Bi=_(),en=s("span"),Vi=E("Width: "),oi=E(tn),Gi=_(),nn=s("span"),Ji=E("Height: "),li=E(on),Yi=_(),vt=s("div"),qe=s("div"),ln=s("div"),ln.textContent="Inner Logical Size",Xi=_(),rn=s("span"),Ki=E("Width: "),ri=E(sn),Qi=_(),un=s("span"),Zi=E("Height: "),si=E(an),xi=_(),Be=s("div"),cn=s("div"),cn.textContent="Outer Logical Size",$i=_(),fn=s("span"),eo=E("Width: "),ui=E(dn),to=_(),pn=s("span"),no=E("Height: "),ai=E(hn),io=_(),_t=s("div"),Ve=s("div"),mn=s("div"),mn.textContent="Inner Position",oo=_(),vn=s("span"),lo=E("x: "),ci=E(_n),ro=_(),bn=s("span"),so=E("y: "),fi=E(gn),uo=_(),Ge=s("div"),yn=s("div"),yn.textContent="Outer Position",ao=_(),wn=s("span"),co=E("x: "),di=E(kn),fo=_(),Mn=s("span"),po=E("y: "),pi=E(Tn),ho=_(),bt=s("div"),Je=s("div"),Cn=s("div"),Cn.textContent="Inner Logical Position",mo=_(),zn=s("span"),vo=E("x: "),hi=E(Sn),_o=_(),An=s("span"),bo=E("y: "),mi=E(On),go=_(),Ye=s("div"),Ln=s("div"),Ln.textContent="Outer Logical Position",yo=_(),Pn=s("span"),wo=E("x: "),vi=E(Wn),ko=_(),En=s("span"),Mo=E("y: "),_i=E(jn),bi=_(),gi=s("br"),yi=_(),Rt=s("h4"),Rt.textContent="Cursor",wi=_(),tt=s("div"),Dn=s("label"),gt=s("input"),To=E(`
Grab`),Co=_(),Rn=s("label"),yt=s("input"),zo=E(`
Visible`),ki=_(),Re=s("div"),Hn=s("label"),So=E(`Icon
`),He=s("select");for(let w=0;w<ke.length;w+=1)ke[w].c();Ao=_(),Fn=s("label"),Oo=E(`X position
`),Xe=s("input"),Lo=_(),In=s("label"),Po=E(`Y position
`),Ke=s("input"),Mi=_(),Ti=s("br"),Ci=_(),nt=s("div"),it=s("form"),Qe=s("input"),Wo=_(),Ht=s("button"),Ht.textContent="Set title",Eo=_(),ot=s("form"),Ze=s("input"),jo=_(),Ft=s("button"),Ft.textContent="Open URL",u(o,"class","btn"),u(o,"title","Unminimizes after 2 seconds"),u(a,"class","btn"),u(a,"title","Unminimizes after 2 seconds"),u(c,"class","btn"),u(c,"title","Visible again after 2 seconds"),u(d,"class","btn"),u(b,"class","btn"),u(b,"title","Minimizes the window, requests attention for 3s and then resets it"),u(R,"type","checkbox"),u(S,"type","checkbox"),u(q,"type","checkbox"),u(Y,"type","checkbox"),u(ve,"type","checkbox"),u(O,"class","flex flex-wrap gap-2"),u(le,"class","input"),u(le,"type","number"),u(le,"min","0"),u(V,"class","input"),u(V,"type","number"),u(V,"min","0"),u(_e,"class","flex children:grow flex-col"),u(Z,"class","input"),u(Z,"type","number"),u(Z,"min","400"),u(de,"class","input"),u(de,"type","number"),u(de,"min","400"),u(be,"class","flex children:grow flex-col"),u(Pe,"class","input"),u(Pe,"type","number"),u(We,"class","input"),u(We,"type","number"),u(Ie,"class","flex children:grow flex-col"),u(ze,"class","input"),u(ze,"type","number"),u(ze,"min","800"),u(Se,"class","input"),u(Se,"type","number"),u(Se,"min","400"),u(Ne,"class","flex children:grow flex-col"),u(te,"class","flex flex-row gap-2 flex-wrap"),u($e,"class","text-accent dark:text-darkAccent font-700"),u(Le,"class","grow"),u($t,"class","text-accent dark:text-darkAccent font-700"),u(Ue,"class","grow"),u(De,"class","flex"),u(ln,"class","text-accent dark:text-darkAccent font-700"),u(qe,"class","grow"),u(cn,"class","text-accent dark:text-darkAccent font-700"),u(Be,"class","grow"),u(vt,"class","flex"),u(mn,"class","text-accent dark:text-darkAccent font-700"),u(Ve,"class","grow"),u(yn,"class","text-accent dark:text-darkAccent font-700"),u(Ge,"class","grow"),u(_t,"class","flex"),u(Cn,"class","text-accent dark:text-darkAccent font-700"),u(Je,"class","grow"),u(Ln,"class","text-accent dark:text-darkAccent font-700"),u(Ye,"class","grow"),u(bt,"class","flex"),u(Rt,"class","mb-2"),u(gt,"type","checkbox"),u(yt,"type","checkbox"),u(tt,"class","flex gap-2"),u(He,"class","input"),t[19]===void 0&&zt(()=>t[55].call(He)),u(Xe,"class","input"),u(Xe,"type","number"),u(Ke,"class","input"),u(Ke,"type","number"),u(Re,"class","flex gap-2"),u(Qe,"class","input grow"),u(Qe,"id","title"),u(Ht,"class","btn"),u(Ht,"type","submit"),u(it,"class","flex gap-1"),u(Ze,"class","input grow"),u(Ze,"id","url"),u(Ft,"class","btn"),u(Ft,"id","open-url"),u(ot,"class","flex gap-1"),u(nt,"class","flex flex-col gap-1")},m(w,F){v(w,e,F),v(w,n,F),v(w,i,F),l(i,o),l(i,r),l(i,a),l(i,f),l(i,c),l(i,p),l(i,d),l(i,k),l(i,b),v(w,y,F),v(w,g,F),v(w,h,F),v(w,O,F),l(O,j),l(j,I),l(j,R),R.checked=t[3],l(O,H),l(O,M),l(M,z),l(M,S),S.checked=t[2],l(O,D),l(O,L),l(L,N),l(L,q),q.checked=t[4],l(O,X),l(O,x),l(x,ae),l(x,Y),Y.checked=t[5],l(O,ce),l(O,$),l($,pe),l($,ve),ve.checked=t[6],v(w,ie,F),v(w,we,F),v(w,Ce,F),v(w,te,F),l(te,_e),l(_e,fe),l(fe,oe),l(fe,le),B(le,t[13]),l(_e,Ae),l(_e,ee),l(ee,W),l(ee,V),B(V,t[14]),l(te,ne),l(te,be),l(be,je),l(je,Oe),l(je,Z),B(Z,t[7]),l(be,U),l(be,se),l(se,J),l(se,de),B(de,t[8]),l(te,Jt),l(te,Ie),l(Ie,ct),l(ct,Yt),l(ct,Pe),B(Pe,t[9]),l(Ie,Xt),l(Ie,ft),l(ft,Kt),l(ft,We),B(We,t[10]),l(te,Qt),l(te,Ne),l(Ne,K),l(K,Pt),l(K,ze),B(ze,t[11]),l(Ne,Wt),l(Ne,xe),l(xe,Et),l(xe,Se),B(Se,t[12]),v(w,dt,F),v(w,pt,F),v(w,ht,F),v(w,Me,F),l(Me,De),l(De,Le),l(Le,$e),l(Le,jt),l(Le,et),l(et,Dt),l(et,ni),l(Le,Ni),l(Le,Zt),l(Zt,Ui),l(Zt,ii),l(De,qi),l(De,Ue),l(Ue,$t),l(Ue,Bi),l(Ue,en),l(en,Vi),l(en,oi),l(Ue,Gi),l(Ue,nn),l(nn,Ji),l(nn,li),l(Me,Yi),l(Me,vt),l(vt,qe),l(qe,ln),l(qe,Xi),l(qe,rn),l(rn,Ki),l(rn,ri),l(qe,Qi),l(qe,un),l(un,Zi),l(un,si),l(vt,xi),l(vt,Be),l(Be,cn),l(Be,$i),l(Be,fn),l(fn,eo),l(fn,ui),l(Be,to),l(Be,pn),l(pn,no),l(pn,ai),l(Me,io),l(Me,_t),l(_t,Ve),l(Ve,mn),l(Ve,oo),l(Ve,vn),l(vn,lo),l(vn,ci),l(Ve,ro),l(Ve,bn),l(bn,so),l(bn,fi),l(_t,uo),l(_t,Ge),l(Ge,yn),l(Ge,ao),l(Ge,wn),l(wn,co),l(wn,di),l(Ge,fo),l(Ge,Mn),l(Mn,po),l(Mn,pi),l(Me,ho),l(Me,bt),l(bt,Je),l(Je,Cn),l(Je,mo),l(Je,zn),
`),o=s("input"),r=_(),a=s("div"),f=E(`Working directory:
`),c=s("input"),p=_(),d=s("div"),k=E(`Arguments:
`),b=s("input"),y=_(),g=s("div"),h=s("button"),h.textContent="Run",O=_(),j=s("button"),j.textContent="Kill",I=_(),M&&M.c(),u(o,"class","grow input"),u(n,"class","flex items-center gap-1"),u(c,"class","grow input"),u(c,"placeholder","Working directory"),u(a,"class","flex items-center gap-1"),u(b,"class","grow input"),u(b,"placeholder","Environment variables"),u(d,"class","flex items-center gap-1"),u(h,"class","btn"),u(j,"class","btn"),u(g,"class","flex children:grow gap-1"),u(e,"class","flex flex-col childre:grow gap-1")},m(z,S){v(z,e,S),l(e,n),l(n,i),l(n,o),B(o,t[0]),l(e,r),l(e,a),l(a,f),l(a,c),B(c,t[1]),l(e,p),l(e,d),l(d,k),l(d,b),B(b,t[2]),l(e,y),l(e,g),l(g,h),l(g,O),l(g,j),l(e,I),M&&M.m(e,null),R||(H=[P(o,"input",t[9]),P(c,"input",t[10]),P(b,"input",t[11]),P(h,"click",t[5]),P(j,"click",t[6])],R=!0)},p(z,[S]){S&1&&o.value!==z[0]&&B(o,z[0]),S&2&&c.value!==z[1]&&B(c,z[1]),S&4&&b.value!==z[2]&&B(b,z[2]),z[4]?M?M.p(z,S):(M=ll(z),M.c(),M.m(e,null)):M&&(M.d(1),M=null)},i:G,o:G,d(z){z&&m(e),M&&M.d(),R=!1,ue(H)}}}function ds(t,e,n){const i=navigator.userAgent.includes("Windows");let o=i?"cmd":"sh",r=i?["/C"]:["-c"],{onMessage:a}=e,f='echo "hello world"',c=null,p="SOMETHING=value ANOTHER=2",d="",k;function b(){return p.split(" ").reduce((H,M)=>{let[z,S]=M.split("=");return{...H,[z]:S}},{})}function y(){n(4,k=null);const H=new kl(o,[...r,f],{cwd:c||null,env:b()});H.on("close",M=>{a(`command finished with code ${M.code} and signal ${M.signal}`),n(4,k=null)}),H.on("error",M=>a(`command error: "${M}"`)),H.stdout.on("data",M=>a(`command stdout: "${M}"`)),H.stderr.on("data",M=>a(`command stderr: "${M}"`)),H.spawn().then(M=>{n(4,k=M)}).catch(a)}function g(){k.kill().then(()=>a("killed child process")).catch(a)}function h(){k.write(d).catch(a)}function O(){f=this.value,n(0,f)}function j(){c=this.value,n(1,c)}function I(){p=this.value,n(2,p)}function R(){d=this.value,n(3,d)}return t.$$set=H=>{"onMessage"in H&&n(8,a=H.onMessage)},[f,c,p,d,k,y,g,h,a,O,j,I,R]}class ps extends ye{constructor(e){super(),ge(this,e,ds,fs,me,{onMessage:8})}}function Jl(){return T(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){Lt("tauri://update-status",function(r){var a;(a=r==null?void 0:r.payload).error?(t(),o(a.error)):a.status==="DONE"&&(t(),i())}).then(function(r){e=r}).catch(function(r){throw t(),r}),ti("tauri://update-install").catch(function(r){throw t(),r})})]})})}function Yl(){return T(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){Rl("tauri://update-available",function(r){var a;a=r==null?void 0:r.payload,t(),i({manifest:a,shouldUpdate:!0})}).catch(function(r){throw t(),r}),Lt("tauri://update-status",function(r){var a;(a=r==null?void 0:r.payload).error?(t(),o(a.error)):a.status==="UPTODATE"&&(t(),i({shouldUpdate:!1}))}).then(function(r){e=r}).catch(function(r){throw t(),r}),ti("tauri://update").catch(function(r){throw t(),r})})]})})}Object.freeze({__proto__:null,installUpdate:Jl,checkUpdate:Yl});function hs(t){let e;return{c(){e=s("button"),e.innerHTML='<div class="spinner animate-spin svelte-4xesec"></div>',u(e,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){v(n,e,i)},p:G,d(n){n&&m(e)}}}function ms(t){let e,n,i;return{c(){e=s("button"),e.textContent="Install update",u(e,"class","btn")},m(o,r){v(o,e,r),n||(i=P(e,"click",t[4]),n=!0)},p:G,d(o){o&&m(e),n=!1,i()}}}function vs(t){let e,n,i;return{c(){e=s("button"),e.textContent="Check update",u(e,"class","btn")},m(o,r){v(o,e,r),n||(i=P(e,"click",t[3]),n=!0)},p:G,d(o){o&&m(e),n=!1,i()}}}function _s(t){let e;function n(r,a){return!r[0]&&!r[2]?vs:!r[1]&&r[2]?ms:hs}let i=n(t),o=i(t);return{c(){e=s("div"),o.c(),u(e,"class","flex children:grow children:h10")},m(r,a){v(r,e,a),o.m(e,null)},p(r,[a]){i===(i=n(r))&&o?o.p(r,a):(o.d(1),o=i(r),o&&(o.c(),o.m(e,null)))},i:G,o:G,d(r){r&&m(e),o.d()}}}function bs(t,e,n){let{onMessage:i}=e,o;Mt(async()=>{o=await Lt("tauri://update-status",i)}),Ei(()=>{o&&o()});let r,a,
<video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`,u(e,"class","flex flex-col gap-2")},m(n,i){v(n,e,i)},p:G,i:G,o:G,d(n){n&&m(e)}}}function Ts(t,e,n){let{onMessage:i}=e;const o=window.constraints={audio:!0,video:!0};function r(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 a(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 Mt(async()=>{try{const f=await navigator.mediaDevices.getUserMedia(o);r(f)}catch(f){a(f)}}),Ei(()=>{window.stream.getTracks().forEach(function(f){f.stop()})}),t.$$set=f=>{"onMessage"in f&&n(0,i=f.onMessage)},[i]}class Cs extends ye{constructor(e){super(),ge(this,e,Ts,Ms,me,{onMessage:0})}}function rl(t,e,n){const i=t.slice();return i[23]=e[n],i}function sl(t,e,n){const i=t.slice();return i[26]=e[n],i}function ul(t){let e,n,i,o,r,a,f,c,p,d,k,b,y,g,h;function O(z,S){return z[2]?Ss:zs}let j=O(t),I=j(t);function R(z,S){return z[1]?Os:As}let H=R(t),M=H(t);return{c(){e=s("div"),n=s("span"),n.textContent="Tauri API Validation",i=_(),o=s("span"),r=s("span"),I.c(),f=_(),c=s("span"),c.innerHTML='<div class="i-codicon-chrome-minimize"></div>',p=_(),d=s("span"),M.c(),b=_(),y=s("span"),y.innerHTML='<div class="i-codicon-chrome-close"></div>',u(n,"class","text-darkPrimaryText"),u(r,"title",a=t[2]?"Switch to Light mode":"Switch to Dark mode"),u(r,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),u(c,"title","Minimize"),u(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),u(d,"title",k=t[1]?"Restore":"Maximize"),u(d,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),u(y,"title","Close"),u(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 "),u(o,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),u(e,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),u(e,"data-tauri-drag-region","")},m(z,S){v(z,e,S),l(e,n),l(e,i),l(e,o),l(o,r),I.m(r,null),l(o,f),l(o,c),l(o,p),l(o,d),M.m(d,null),l(o,b),l(o,y),g||(h=[P(r,"click",t[11]),P(c,"click",t[8]),P(d,"click",t[9]),P(y,"click",t[10])],g=!0)},p(z,S){j!==(j=O(z))&&(I.d(1),I=j(z),I&&(I.c(),I.m(r,null))),S&4&&a!==(a=z[2]?"Switch to Light mode":"Switch to Dark mode")&&u(r,"title",a),H!==(H=R(z))&&(M.d(1),M=H(z),M&&(M.c(),M.m(d,null))),S&2&&k!==(k=z[1]?"Restore":"Maximize")&&u(d,"title",k)},d(z){z&&m(e),I.d(),M.d(),g=!1,ue(h)}}}function zs(t){let e;return{c(){e=s("div"),u(e,"class","i-ph-moon")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Ss(t){let e;return{c(){e=s("div"),u(e,"class","i-ph-sun")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function As(t){let e;return{c(){e=s("div"),u(e,"class","i-codicon-chrome-maximize")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Os(t){let e;return{c(){e=s("div"),u(e,"class","i-codicon-chrome-restore")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function al(t){let e,n,i,o,r,a,f,c,p;function d(y,g){return y[2]?Ps:Ls}let k=d(t),b=k(t);return{c(){e=s("a"),b.c(),n=_(),i=s("br"),o=_(),r=s("div"),a=_(),f=s("br"),u(e,"href","##"),u(e,"class","nv justify-between h-8"),u(r,"class","bg-white/5 h-2px")},m(y,g){v(y,e,g),b.m(e,null),v(y,n,g),v(y,i,g),v(y,o,g),v(y,r,g),v(y,a,g),v(y,f,g),c||(p=P(e,"click",t[11]),c=!0)},p(y,g){k!==(k=d(y))&&(b.d(1),b=k(y),b&&(b.c(),b.m(e,null)))},d(y){y&&m(e),b.d(),y&&m(n),y&&m(i),y&&m(o)
`),n=s("div"),u(n,"class","i-ph-moon")},m(i,o){v(i,e,o),v(i,n,o)},d(i){i&&m(e),i&&m(n)}}}function Ps(t){let e,n;return{c(){e=E(`Switch to Light mode
`),n=s("div"),u(n,"class","i-ph-sun")},m(i,o){v(i,e,o),v(i,n,o)},d(i){i&&m(e),i&&m(n)}}}function cl(t){let e,n,i,o,r,a=t[26].label+"",f,c,p,d;function k(){return t[18](t[26])}return{c(){e=s("a"),n=s("div"),o=_(),r=s("p"),f=E(a),u(n,"class",i=t[26].icon+" mr-2"),u(e,"href","##"),u(e,"class",c="nv "+(t[0]===t[26]?"nv_selected":""))},m(b,y){v(b,e,y),l(e,n),l(e,o),l(e,r),l(r,f),p||(d=P(e,"click",k),p=!0)},p(b,y){t=b,y&1&&c!==(c="nv "+(t[0]===t[26]?"nv_selected":""))&&u(e,"class",c)},d(b){b&&m(e),p=!1,d()}}}function fl(t){let e,n=t[23].html+"",i;return{c(){e=new ir(!1),i=Wi(),e.a=i},m(o,r){e.m(n,o,r),v(o,i,r)},p(o,r){r&32&&n!==(n=o[23].html+"")&&e.p(n)},d(o){o&&m(i),o&&e.d()}}}function Ws(t){let e,n,i,o,r,a,f,c,p,d,k,b,y,g,h,O,j,I,R,H,M,z,S,D,L,N=t[0].label+"",q,X,x,ae,Y,ce,$,pe,ve,ie,we,Ce,te,_e,fe,oe,le,Ae,ee=t[4]&&ul(t),W=!t[4]&&al(t),V=t[6],ne=[];for(let U=0;U<V.length;U+=1)ne[U]=cl(sl(t,V,U));var be=t[0].component;function je(U){return{props:{onMessage:U[13],insecureRenderHtml:U[14]}}}be&&(Y=new be(je(t)));let Oe=t[5],Z=[];for(let U=0;U<Oe.length;U+=1)Z[U]=fl(rl(t,Oe,U));return{c(){ee&&ee.c(),e=_(),n=s("div"),i=s("aside"),o=s("img"),a=_(),W&&W.c(),f=_(),c=s("a"),c.innerHTML=`Documentation
<span class="i-codicon-link-external"></span>`,p=_(),d=s("a"),d.innerHTML=`Github
<span class="i-codicon-link-external"></span>`,k=_(),b=s("a"),b.innerHTML=`Source
<span class="i-codicon-link-external"></span>`,y=_(),g=s("br"),h=_(),O=s("div"),j=_(),I=s("br"),R=_(),H=s("div");for(let U=0;U<ne.length;U+=1)ne[U].c();z=_(),S=s("main"),D=s("div"),L=s("h1"),q=E(N),X=_(),x=s("div"),ae=s("div"),Y&&Kn(Y.$$.fragment),ce=_(),$=s("div"),pe=s("div"),ve=_(),ie=s("div"),we=s("p"),we.textContent="Console",Ce=_(),te=s("div"),te.innerHTML='<div class="i-codicon-clear-all"></div>',_e=_(),fe=s("div");for(let U=0;U<Z.length;U+=1)Z[U].c();u(o,"class","self-center p-7 cursor-pointer"),xl(o.src,r="tauri_logo.png")||u(o,"src",r),u(o,"alt","Tauri logo"),u(c,"class","nv justify-between h-8"),u(c,"target","_blank"),u(c,"href","https://tauri.app/v1/guides/"),u(d,"class","nv justify-between h-8"),u(d,"target","_blank"),u(d,"href","https://github.com/tauri-apps/tauri"),u(b,"class","nv justify-between h-8"),u(b,"target","_blank"),u(b,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),u(O,"class","bg-white/5 h-2px"),u(H,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),u(i,"class",M="w-75 "+(t[4]?"bg-darkPrimaryLighter/60":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"),u(ae,"class","mr-2"),u(x,"class","overflow-y-auto"),u(D,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),u(pe,"class","bg-black/20 h-2px cursor-ns-resize"),u(we,"class","font-semibold"),u(te,"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 "),u(ie,"class","flex justify-between items-center px-2"),u(fe,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),u($,"id","console"),u($,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),u(S,"class","flex-1 bg-primary dark:bg-darkPrimary transition-colors-250 grid grid-rows-[2fr_auto]"),u(n,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(U,se){ee&&ee.m(U,se),v(U,e,se),v(U,n,se),l(n,i),l(i,o),l(i,a),W&&W.m(i,null),l(i,f),l(i,c),l(i,p),l(i,d),l(i,k),l(i,b),l(i,y),l(i,g),l(i,h),l(i,O),l(i,j),l(i,I),l(i,R),l(i,H);for(let J=0;J<ne.length;J+=1)ne[J].m(H,null);l(n,z),l(n,S),l(S,D),l(D,L),l(L,q),l(D,X),l(D,x),l(x,ae),Y&&Bt(Y,ae,null),l(S,ce),l(S,$),l($,pe),l($,ve),l($,ie),l(ie,we),l(ie,Ce),l(ie,te),l($,_e),l($,fe);for(let J=0;J<Z.length;J+=1)Z[J].m(fe,null);t[19]($),oe=!0,le||(Ae=[P(o,"click",t[17]),P(pe,"mousedown",t[16]),P(te,"click",t[15])],le=!0)},p(U,[se]){if(U[4]?ee?ee.p(U,se):(ee=ul(U),ee.c(),ee.m(e.parentNode,e)):ee&&(ee.d(1),ee=null),U[4]?W&&(W.d(1),W=null):W?W.p(U,se):(W=al(U),W.c(),W.m(i,f)),se&193){V=U[6];let J;for(J=0;J<V.length;J+=1){const de=sl(U,V,J);ne[J]?ne[J].p(de,se):(ne[J]=cl(de),ne[J].c(),ne[J].m(H,null))}for(;J<ne.length;J+=1)ne[J].d(1);ne.length=V.length}if((!oe||se&16&&M!==(M="w-75 "+(U[4]?"bg-darkPrimaryLighter/60":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"))&&u(i,"class",M),(!oe||se&1)&&N!==(N=U[0].label+"")&&Q(q,N),be!==(be=U[0].component)){if(Y){$n();const J=Y;Ee(J.$$.fragment,1,0,()=>{Vt(J,1)}),ei()}be?(Y=new be(je(U)),Kn(Y.$$.fragment),Te(Y.$$.fragment,1),Bt(Y,ae,null)):Y=null}if(se&32){Oe=U[5];let J;for(J=0;J<Oe.length;J+=1){const de=rl(U,Oe,J);Z[J]?Z[J].p(de,se):(Z[J]=fl(de),Z[J].c(),Z[J].m(fe,null))}for(;J<Z.length;J+=1)Z[J].d(1);Z.length=Oe.length}},i(U){oe||(Y&&Te(Y.$$.fragment,U),oe=!0)},o(U){Y&&Ee(Y.$$.fragment,U),oe=!1},d(U){ee&&ee.d(U),U&&m(e),U&&m(n),W&&W.d(),ut(ne,U),Y&&Vt(Y),ut(Z,U),t[19](null),le=!1,ue(Ae)}}}let dl=50;function pl(t){const e=document.querySelector("html");t?e.classList.add("dark"):e.classList.remove("dark"),localStorage.setItem("theme",t?"dark":"")}function Es(t,e,n){let i;st.listen("tauri://file-drop",function(N){h(`File drop: ${N.payload}`)});const o=[{label:"Welcome",component:yr,icon:"i-ph-hand-waving"},{label:"Communication",component:zr,icon:"i-codicon-radio-tower"},{label:"CLI",component:Mr,icon:"i-codicon-terminal"},{label:"Dialog",component:Ir,ico