mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-22 10:11:32 +03:00
25 lines
37 KiB
JavaScript
25 lines
37 KiB
JavaScript
var Ql=Object.defineProperty,Zl=Object.defineProperties;var $l=Object.getOwnPropertyDescriptors;var hl=Object.getOwnPropertySymbols;var xl=Object.prototype.hasOwnProperty,ei=Object.prototype.propertyIsEnumerable;var ml=(n,e,l)=>e in n?Ql(n,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[e]=l,vl=(n,e)=>{for(var l in e||(e={}))xl.call(e,l)&&ml(n,l,e[l]);if(hl)for(var l of hl(e))ei.call(e,l)&&ml(n,l,e[l]);return n},_l=(n,e)=>Zl(n,$l(e));import{S as V,i as J,s as K,e as a,a as m,t as M,b as u,c as T,d as t,l as y,f as j,n as I,g as S,r as Q,h as ti,j as ni,o as li,k as ii,m as gl,p as si,q as Pt,u as bl,v as hn,w as mn,x as oi,y as H,z as wl,A as kl,B as ai,C as Wt,D as lt,E as yl,F as ui,G as ri,H as ci,I as Cl,J as Ut,K as pi,L as Ml,M as zl,N as F,O as Tl,P as vn,Q as _n,R as Sl,T as Ll,U as fi,V as di,W as El,X as Hl,Y as hi,Z as mi,_ as vi,$ as _i,a0 as gi,a1 as bi,a2 as wi,a3 as ki,a4 as Ol,a5 as Rl,a6 as Al,a7 as Pl,a8 as yi,a9 as Wl,aa as Ul,ab as Ci,ac as Mi,ad as zi}from"./vendor.js";const Ti=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function l(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerpolicy&&(o.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?o.credentials="include":s.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=l(s);fetch(s.href,o)}};Ti();function Si(n){let e,l,i,s,o,r,c,h,d,k,w,f,p,v,b,_,z,C,A,P,W;return{c(){e=a("h1"),e.textContent="Welcome",l=m(),i=a("p"),i.textContent="Tauri's API capabilities using the ` @tauri-apps/api ` package. It's used as\n the main validation app, serving as the testbed of our development process. In\n the future, this app will be used on Tauri's integration tests.",s=m(),o=a("p"),r=M("Current App version: "),c=M(n[0]),h=m(),d=a("p"),k=M("Current Tauri version: "),w=M(n[1]),f=m(),p=a("p"),v=M("Current App name: "),b=M(n[2]),_=m(),z=a("button"),z.textContent="Close application",C=m(),A=a("button"),A.textContent="Relaunch application",u(z,"class","button"),u(A,"class","button")},m(L,U){T(L,e,U),T(L,l,U),T(L,i,U),T(L,s,U),T(L,o,U),t(o,r),t(o,c),T(L,h,U),T(L,d,U),t(d,k),t(d,w),T(L,f,U),T(L,p,U),t(p,v),t(p,b),T(L,_,U),T(L,z,U),T(L,C,U),T(L,A,U),P||(W=[y(z,"click",n[3]),y(A,"click",n[4])],P=!0)},p(L,[U]){U&1&&j(c,L[0]),U&2&&j(w,L[1]),U&4&&j(b,L[2])},i:I,o:I,d(L){L&&S(e),L&&S(l),L&&S(i),L&&S(s),L&&S(o),L&&S(h),L&&S(d),L&&S(f),L&&S(p),L&&S(_),L&&S(z),L&&S(C),L&&S(A),P=!1,Q(W)}}}function Li(n,e,l){let i=0,s=0,o="Unknown";ti().then(h=>{l(2,o=h)}),ni().then(h=>{l(0,i=h)}),li().then(h=>{l(1,s=h)});async function r(){await ii()}async function c(){await gl()}return[i,s,o,r,c]}class Ei extends V{constructor(e){super();J(this,e,Li,Si,K,{})}}function Hi(n){let e,l,i,s,o,r,c,h,d,k,w;return{c(){e=a("div"),l=M(`This binary can be run on the terminal and takes the following arguments:
|
|
`),i=a("ul"),i.innerHTML=`<li>--config PATH</li>
|
|
<li>--theme light|dark|system</li>
|
|
<li>--verbose</li>`,s=M(`
|
|
Additionally, it has a `),o=a("i"),o.textContent="update --background",r=M(` subcommand.
|
|
Note that the arguments are only parsed, not implemented.
|
|
`),c=a("br"),h=m(),d=a("button"),d.textContent="Get matches",u(d,"class","button"),u(d,"id","cli-matches")},m(f,p){T(f,e,p),t(e,l),t(e,i),t(e,s),t(e,o),t(e,r),t(e,c),t(e,h),t(e,d),k||(w=y(d,"click",n[0]),k=!0)},p:I,i:I,o:I,d(f){f&&S(e),k=!1,w()}}}function Oi(n,e,l){let{onMessage:i}=e;function s(){si().then(i).catch(i)}return n.$$set=o=>{"onMessage"in o&&l(1,i=o.onMessage)},[s,i]}class Ri extends V{constructor(e){super();J(this,e,Oi,Hi,K,{onMessage:1})}}function Ai(n){let e,l,i,s,o,r,c,h;return{c(){e=a("div"),l=a("button"),l.textContent="Call Log API",i=m(),s=a("button"),s.textContent="Call Request (async) API",o=m(),r=a("button"),r.textContent="Send event to Rust",u(l,"class","button"),u(l,"id","log"),u(s,"class","button"),u(s,"id","request"),u(r,"class","button"),u(r,"id","event")},m(d,k){T(d,e,k),t(e,l),t(e,i),t(e,s),t(e,o),t(e,r),c||(h=[y(l,"click",n[0]),y(s,"click",n[1]),y(r,"click",n[2])],c=!0)},p:I,i:I,o:I,d(d){d&&S(e),c=!1,Q(h)}}}function Pi(n,e,l){let{onMessage:i}=e,s;Pt(async()=>{s=await bl("rust-event",i)}),hn(()=>{s&&s()});function o(){mn("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function r(){mn("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function c(){oi("js-event","this is the payload string")}return n.$$set=h=>{"onMessage"in h&&l(3,i=h.onMessage)},[o,r,c,i]}class Wi extends V{constructor(e){super();J(this,e,Pi,Ai,K,{onMessage:3})}}function Ui(n){let e,l,i,s,o,r,c,h,d,k,w,f,p,v,b,_,z,C,A,P;return{c(){e=a("div"),l=a("input"),i=m(),s=a("input"),o=m(),r=a("div"),c=a("input"),h=m(),d=a("label"),d.textContent="Multiple",k=m(),w=a("div"),f=a("input"),p=m(),v=a("label"),v.textContent="Directory",b=m(),_=a("button"),_.textContent="Open dialog",z=m(),C=a("button"),C.textContent="Open save dialog",u(l,"id","dialog-default-path"),u(l,"placeholder","Default path"),u(s,"id","dialog-filter"),u(s,"placeholder","Extensions filter, comma-separated"),u(s,"class","svelte-1eg58yg"),u(c,"type","checkbox"),u(c,"id","dialog-multiple"),u(d,"for","dialog-multiple"),u(f,"type","checkbox"),u(f,"id","dialog-directory"),u(v,"for","dialog-directory"),u(_,"class","button"),u(_,"id","open-dialog"),u(C,"class","button"),u(C,"id","save-dialog")},m(W,L){T(W,e,L),t(e,l),H(l,n[0]),t(e,i),t(e,s),H(s,n[1]),t(e,o),t(e,r),t(r,c),c.checked=n[2],t(r,h),t(r,d),t(e,k),t(e,w),t(w,f),f.checked=n[3],t(w,p),t(w,v),t(e,b),t(e,_),t(e,z),t(e,C),A||(P=[y(l,"input",n[8]),y(s,"input",n[9]),y(c,"change",n[10]),y(f,"change",n[11]),y(_,"click",n[4]),y(C,"click",n[5])],A=!0)},p(W,[L]){L&1&&l.value!==W[0]&&H(l,W[0]),L&2&&s.value!==W[1]&&H(s,W[1]),L&4&&(c.checked=W[2]),L&8&&(f.checked=W[3])},i:I,o:I,d(W){W&&S(e),A=!1,Q(P)}}}function Ii(n,e){var l=new Blob([n],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(s){var o=s.target.result;e(o.substr(o.indexOf(",")+1))},i.readAsDataURL(l)}function Ni(n,e,l){let{onMessage:i}=e,{insecureRenderHtml:s}=e,o=null,r=null,c=!1,h=!1;function d(){wl({title:"My wonderful open dialog",defaultPath:o,filters:r?[{name:"Tauri Example",extensions:r.split(",").map(b=>b.trim())}]:[],multiple:c,directory:h}).then(function(b){if(Array.isArray(b))i(b);else{var _=b,z=_.match(/\S+\.\S+$/g);kl(_).then(function(C){z&&(_.includes(".png")||_.includes(".jpg"))?Ii(new Uint8Array(C),function(A){var P="data:image/png;base64,"+A;s('<img src="'+P+'"></img>')}):i(b)}).catch(i(b))}}).catch(i)}function k(){ai({title:"My wonderful save dialog",defaultPath:o,filters:r?[{name:"Tauri Example",extensions:r.split(",").map(b=>b.trim())}]:[]}).then(i).catch(i)}function w(){o=this.value,l(0,o)}function f(){r=this.value,l(1,r)}function p(){c=this.checked,l(2,c)}function v(){h=this.checked,l(3,h)}return n.$$set=b=>{"onMessage"in b&&l(6,i=b.onMessage),"insecureRenderHtml"in b&&l(7,s=b.insecureRenderHtml)},[o,r,c,h,d,k,i,s,w,f,p,v]}class qi extends V{constructor(e){super();J(this,e,Ni,Ui,K,{onMessage:6,insecureRenderHtml:7})}}function Il(n,e,l){const i=n.slice();return i[9]=e[l],i}function Nl(n){let e,l=n[9][0]+"",i,s;return{c(){e=a("option"),i=M(l),e.__value=s=n[9][1],e.value=e.__value},m(o,r){T(o,e,r),t(e,i)},p:I,d(o){o&&S(e)}}}function Di(n){let e,l,i,s,o,r,c,h,d,k,w,f,p,v=n[2],b=[];for(let _=0;_<v.length;_+=1)b[_]=Nl(Il(n,v,_));return{c(){e=a("form"),l=a("select"),i=a("option"),i.textContent="None";for(let _=0;_<b.length;_+=1)b[_].c();s=m(),o=a("input"),r=m(),c=a("button"),c.textContent="Read",h=m(),d=a("button"),d.textContent="Use as img src",k=m(),w=a("img"),i.__value="",i.value=i.__value,u(l,"class","button"),u(l,"id","dir"),u(o,"id","path-to-read"),u(o,"placeholder","Type the path to read..."),u(c,"class","button"),u(c,"id","read"),u(d,"class","button"),u(d,"type","button"),u(w,"alt","file")},m(_,z){T(_,e,z),t(e,l),t(l,i);for(let C=0;C<b.length;C+=1)b[C].m(l,null);t(e,s),t(e,o),H(o,n[0]),t(e,r),t(e,c),t(e,h),t(e,d),t(e,k),t(e,w),n[8](w),f||(p=[y(o,"input",n[7]),y(d,"click",n[4]),y(e,"submit",Wt(n[3]))],f=!0)},p(_,[z]){if(z&4){v=_[2];let C;for(C=0;C<v.length;C+=1){const A=Il(_,v,C);b[C]?b[C].p(A,z):(b[C]=Nl(A),b[C].c(),b[C].m(l,null))}for(;C<b.length;C+=1)b[C].d(1);b.length=v.length}z&1&&o.value!==_[0]&&H(o,_[0])},i:I,o:I,d(_){_&&S(e),lt(b,_),n[8](null),f=!1,Q(p)}}}function ql(){return document.getElementById("dir").value?parseInt(dir.value):null}function ji(n,e){const l=new Blob([n],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(s){const o=s.target.result;e(o.substr(o.indexOf(",")+1))},i.readAsDataURL(l)}function Bi(n,e,l){let{onMessage:i}=e,{insecureRenderHtml:s}=e,o="",r;const c=Object.keys(yl).filter(f=>isNaN(parseInt(f))).map(f=>[f,yl[f]]);function h(){const f=o.match(/\S+\.\S+$/g),p={dir:ql()};(f?kl(o,p):ui(o,p)).then(function(b){if(f)if(o.includes(".png")||o.includes(".jpg"))ji(new Uint8Array(b),function(_){const z="data:image/png;base64,"+_;s('<img src="'+z+'"></img>')});else{const _=String.fromCharCode.apply(null,b);s('<textarea id="file-response"></textarea><button id="file-save">Save</button>'),setTimeout(()=>{const z=document.getElementById("file-response");z.value=_,document.getElementById("file-save").addEventListener("click",function(){writeFile({file:o,contents:z.value},{dir:ql()}).catch(i)})})}else i(b)}).catch(i)}function d(){l(1,r.src=ri(o),r)}function k(){o=this.value,l(0,o)}function w(f){ci[f?"unshift":"push"](()=>{r=f,l(1,r)})}return n.$$set=f=>{"onMessage"in f&&l(5,i=f.onMessage),"insecureRenderHtml"in f&&l(6,s=f.insecureRenderHtml)},[o,r,c,h,d,i,s,k,w]}class Fi extends V{constructor(e){super();J(this,e,Bi,Di,K,{onMessage:5,insecureRenderHtml:6})}}function Gi(n){let e,l,i,s,o,r,c,h,d,k,w,f,p,v,b,_,z;return{c(){e=a("form"),l=a("select"),i=a("option"),i.textContent="GET",s=a("option"),s.textContent="POST",o=a("option"),o.textContent="PUT",r=a("option"),r.textContent="PATCH",c=a("option"),c.textContent="DELETE",h=m(),d=a("input"),k=m(),w=a("br"),f=m(),p=a("textarea"),v=m(),b=a("button"),b.textContent="Make request",i.__value="GET",i.value=i.__value,s.__value="POST",s.value=s.__value,o.__value="PUT",o.value=o.__value,r.__value="PATCH",r.value=r.__value,c.__value="DELETE",c.value=c.__value,u(l,"class","button"),u(l,"id","request-method"),n[0]===void 0&&Cl(()=>n[5].call(l)),u(d,"id","request-url"),u(d,"placeholder","Type the request URL..."),u(p,"id","request-body"),u(p,"placeholder","Request body"),u(p,"rows","5"),u(p,"class","svelte-1xfmj7b"),u(b,"class","button"),u(b,"id","make-request")},m(C,A){T(C,e,A),t(e,l),t(l,i),t(l,s),t(l,o),t(l,r),t(l,c),Ut(l,n[0]),t(e,h),t(e,d),H(d,n[1]),t(e,k),t(e,w),t(e,f),t(e,p),H(p,n[2]),t(e,v),t(e,b),_||(z=[y(l,"change",n[5]),y(d,"input",n[6]),y(p,"input",n[7]),y(e,"submit",Wt(n[3]))],_=!0)},p(C,[A]){A&1&&Ut(l,C[0]),A&2&&d.value!==C[1]&&H(d,C[1]),A&4&&H(p,C[2])},i:I,o:I,d(C){C&&S(e),_=!1,Q(z)}}}function Vi(n,e,l){let i="GET",s="https://jsonplaceholder.typicode.com/todos/1",o="",{onMessage:r}=e;async function c(){const w=await pi().catch(b=>{throw r(b),b}),v={url:s||""||"",method:i||"GET"||"GET"};o.startsWith("{")&&o.endsWith("}")||o.startsWith("[")&&o.endsWith("]")?v.body=Ml.json(JSON.parse(o)):o!==""&&(v.body=Ml.text(o)),w.request(v).then(r).catch(r)}function h(){i=zl(this),l(0,i)}function d(){s=this.value,l(1,s)}function k(){o=this.value,l(2,o)}return n.$$set=w=>{"onMessage"in w&&l(4,r=w.onMessage)},[i,s,o,c,r,h,d,k]}class Ji extends V{constructor(e){super();J(this,e,Vi,Gi,K,{onMessage:4})}}function Ki(n){let e,l,i;return{c(){e=a("button"),e.textContent="Send test notification",u(e,"class","button"),u(e,"id","notification")},m(s,o){T(s,e,o),l||(i=y(e,"click",Xi),l=!0)},p:I,i:I,o:I,d(s){s&&S(e),l=!1,i()}}}function Xi(){new Notification("Notification title",{body:"This is the notification body"})}function Yi(n,e,l){let{onMessage:i}=e;return n.$$set=s=>{"onMessage"in s&&l(0,i=s.onMessage)},[i]}class Qi extends V{constructor(e){super();J(this,e,Yi,Ki,K,{onMessage:0})}}function Dl(n,e,l){const i=n.slice();return i[54]=e[l],i}function jl(n){let e,l=n[54]+"",i,s;return{c(){e=a("option"),i=M(l),e.__value=s=n[54],e.value=e.__value},m(o,r){T(o,e,r),t(e,i)},p(o,r){r[0]&2&&l!==(l=o[54]+"")&&j(i,l),r[0]&2&&s!==(s=o[54])&&(e.__value=s,e.value=e.__value)},d(o){o&&S(e)}}}function Zi(n){let e,l,i,s,o,r,c,h,d,k,w,f,p,v,b,_,z,C,A,P,W,L,U,q,Z,se,G,D,R,x,O,X,it,st,Te,ot,Ne,$,ue,Se,at,ee,ut,Le,rt,te,ct,re,Ee,pt,ne,ft,He,dt,le,ht,N,ye,gn,ce,bn,mt,wn,pe,kn,Oe,vt,yn,oe,Cn,_t,Mn,ae,It,ie,Re,fe,Nt,zn,qe,Tn,gt=n[20].width+"",qt,Sn,De,Ln,bt=n[20].height+"",Dt,En,de,jt,Hn,je,On,wt=n[21].width+"",Bt,Rn,Be,An,kt=n[21].height+"",Ft,Pn,Ae,he,Gt,Wn,Fe,Un,yt=n[20].toLogical(n[17]).width+"",Vt,In,Ge,Nn,Ct=n[20].toLogical(n[17]).height+"",Jt,qn,me,Kt,Dn,Ve,jn,Mt=n[21].toLogical(n[17]).width+"",Xt,Bn,Je,Fn,zt=n[21].toLogical(n[17]).height+"",Yt,Gn,Pe,ve,Qt,Vn,Ke,Jn,Tt=n[18].x+"",Zt,Kn,Xe,Xn,St=n[18].y+"",$t,Yn,_e,xt,Qn,Ye,Zn,Lt=n[19].x+"",en,$n,Qe,xn,Et=n[19].y+"",tn,el,We,ge,nn,tl,Ze,nl,Ht=n[18].toLogical(n[17]).x+"",ln,ll,$e,il,Ot=n[18].toLogical(n[17]).y+"",sn,sl,be,on,ol,xe,al,Rt=n[19].toLogical(n[17]).x+"",an,ul,et,rl,At=n[19].toLogical(n[17]).y+"",un,rn,we,Ce,cl,tt,cn,ke,Me,pl,nt,pn,ze,fn,Ue,dn,fl,Ie=Object.keys(n[1]),Y=[];for(let g=0;g<Ie.length;g+=1)Y[g]=jl(Dl(n,Ie,g));return{c(){e=a("div"),l=a("select");for(let g=0;g<Y.length;g+=1)Y[g].c();i=m(),s=a("div"),o=a("label"),r=a("input"),c=M(`
|
|
Resizable`),h=m(),d=a("label"),k=a("input"),w=M(`
|
|
Maximize`),f=m(),p=a("button"),p.textContent="Center",v=m(),b=a("button"),b.textContent="Minimize",_=m(),z=a("button"),z.textContent="Hide",C=m(),A=a("label"),P=a("input"),W=M(`
|
|
Transparent`),L=m(),U=a("label"),q=a("input"),Z=M(`
|
|
Has decorations`),se=m(),G=a("label"),D=a("input"),R=M(`
|
|
Always on top`),x=m(),O=a("label"),X=a("input"),it=M(`
|
|
Fullscreen`),st=m(),Te=a("button"),Te.textContent="Change icon",ot=m(),Ne=a("div"),$=a("div"),ue=a("div"),Se=a("div"),at=M(`X
|
|
`),ee=a("input"),ut=m(),Le=a("div"),rt=M(`Y
|
|
`),te=a("input"),ct=m(),re=a("div"),Ee=a("div"),pt=M(`Width
|
|
`),ne=a("input"),ft=m(),He=a("div"),dt=M(`Height
|
|
`),le=a("input"),ht=m(),N=a("div"),ye=a("div"),gn=M(`Min width
|
|
`),ce=a("input"),bn=m(),mt=a("div"),wn=M(`Min height
|
|
`),pe=a("input"),kn=m(),Oe=a("div"),vt=a("div"),yn=M(`Max width
|
|
`),oe=a("input"),Cn=m(),_t=a("div"),Mn=M(`Max height
|
|
`),ae=a("input"),It=m(),ie=a("div"),Re=a("div"),fe=a("div"),Nt=a("div"),Nt.textContent="Inner Size",zn=m(),qe=a("span"),Tn=M("Width: "),qt=M(gt),Sn=m(),De=a("span"),Ln=M("Height: "),Dt=M(bt),En=m(),de=a("div"),jt=a("div"),jt.textContent="Outer Size",Hn=m(),je=a("span"),On=M("Width: "),Bt=M(wt),Rn=m(),Be=a("span"),An=M("Height: "),Ft=M(kt),Pn=m(),Ae=a("div"),he=a("div"),Gt=a("div"),Gt.textContent="Inner Logical Size",Wn=m(),Fe=a("span"),Un=M("Width: "),Vt=M(yt),In=m(),Ge=a("span"),Nn=M("Height: "),Jt=M(Ct),qn=m(),me=a("div"),Kt=a("div"),Kt.textContent="Outer Logical Size",Dn=m(),Ve=a("span"),jn=M("Width: "),Xt=M(Mt),Bn=m(),Je=a("span"),Fn=M("Height: "),Yt=M(zt),Gn=m(),Pe=a("div"),ve=a("div"),Qt=a("div"),Qt.textContent="Inner Position",Vn=m(),Ke=a("span"),Jn=M("x: "),Zt=M(Tt),Kn=m(),Xe=a("span"),Xn=M("y: "),$t=M(St),Yn=m(),_e=a("div"),xt=a("div"),xt.textContent="Outer Position",Qn=m(),Ye=a("span"),Zn=M("x: "),en=M(Lt),$n=m(),Qe=a("span"),xn=M("y: "),tn=M(Et),el=m(),We=a("div"),ge=a("div"),nn=a("div"),nn.textContent="Inner Logical Position",tl=m(),Ze=a("span"),nl=M("x: "),ln=M(Ht),ll=m(),$e=a("span"),il=M("y: "),sn=M(Ot),sl=m(),be=a("div"),on=a("div"),on.textContent="Outer Logical Position",ol=m(),xe=a("span"),al=M("x: "),an=M(Rt),ul=m(),et=a("span"),rl=M("y: "),un=M(At),rn=m(),we=a("form"),Ce=a("input"),cl=m(),tt=a("button"),tt.textContent="Set title",cn=m(),ke=a("form"),Me=a("input"),pl=m(),nt=a("button"),nt.textContent="Open URL",pn=m(),ze=a("button"),ze.textContent="Request attention",fn=m(),Ue=a("button"),Ue.textContent="New window",u(l,"class","button"),n[0]===void 0&&Cl(()=>n[31].call(l)),u(r,"type","checkbox"),u(k,"type","checkbox"),u(p,"title","Unminimizes after 2 seconds"),u(b,"title","Unminimizes after 2 seconds"),u(z,"title","Visible again after 2 seconds"),u(P,"type","checkbox"),u(q,"type","checkbox"),u(D,"type","checkbox"),u(X,"type","checkbox"),u(ee,"type","number"),u(ee,"min","0"),u(ee,"class","svelte-1tppwwz"),u(te,"type","number"),u(te,"min","0"),u(te,"class","svelte-1tppwwz"),u(ue,"class","flex col grow svelte-1tppwwz"),u(ne,"type","number"),u(ne,"min","400"),u(ne,"class","svelte-1tppwwz"),u(le,"type","number"),u(le,"min","400"),u(le,"class","svelte-1tppwwz"),u(re,"class","flex col grow svelte-1tppwwz"),u(ce,"type","number"),u(ce,"class","svelte-1tppwwz"),u(pe,"type","number"),u(pe,"class","svelte-1tppwwz"),u(N,"class","flex col grow svelte-1tppwwz"),u(oe,"type","number"),u(oe,"min","400"),u(oe,"class","svelte-1tppwwz"),u(ae,"type","number"),u(ae,"min","400"),u(ae,"class","svelte-1tppwwz"),u(Oe,"class","flex col grow svelte-1tppwwz"),u($,"class","window-controls flex flex-row svelte-1tppwwz"),u(e,"class","flex col"),u(qe,"class","svelte-1tppwwz"),u(De,"class","svelte-1tppwwz"),u(fe,"class","grow window-property svelte-1tppwwz"),u(je,"class","svelte-1tppwwz"),u(Be,"class","svelte-1tppwwz"),u(de,"class","grow window-property svelte-1tppwwz"),u(Re,"class","flex"),u(Fe,"class","svelte-1tppwwz"),u(Ge,"class","svelte-1tppwwz"),u(he,"class","grow window-property svelte-1tppwwz"),u(Ve,"class","svelte-1tppwwz"),u(Je,"class","svelte-1tppwwz"),u(me,"class","grow window-property svelte-1tppwwz"),u(Ae,"class","flex"),u(Ke,"class","svelte-1tppwwz"),u(Xe,"class","svelte-1tppwwz"),u(ve,"class","grow window-property svelte-1tppwwz"),u(Ye,"class","svelte-1tppwwz"),u(Qe,"class","svelte-1tppwwz"),u(_e,"class","grow window-property svelte-1tppwwz"),u(Pe,"class","flex"),u(Ze,"class","svelte-1tppwwz"),u($e,"class","svelte-1tppwwz"),u(ge,"class","grow window-property svelte-1tppwwz"),u(xe,"class","svelte-1tppwwz"),u(et,"class","svelte-1tppwwz"),u(be,"class","grow window-property svelte-1tppwwz"),u(We,"class","flex"),u(Ce,"id","title"),u(tt,"class","button"),u(tt,"type","submit"),u(we,"class","svelte-1tppwwz"),u(Me,"id","url"),u(nt,"class","button"),u(nt,"id","open-url"),u(ke,"class","svelte-1tppwwz"),u(ze,"class","button"),u(ze,"title","Minimizes the window, requests attention for 3s and then resets it"),u(Ue,"class","button")},m(g,E){T(g,e,E),t(e,l);for(let B=0;B<Y.length;B+=1)Y[B].m(l,null);Ut(l,n[0]),t(e,i),t(e,s),t(s,o),t(o,r),r.checked=n[2],t(o,c),t(s,h),t(s,d),t(d,k),k.checked=n[3],t(d,w),t(s,f),t(s,p),t(s,v),t(s,b),t(s,_),t(s,z),t(s,C),t(s,A),t(A,P),P.checked=n[16],t(A,W),t(s,L),t(s,U),t(U,q),q.checked=n[4],t(U,Z),t(s,se),t(s,G),t(G,D),D.checked=n[5],t(G,R),t(s,x),t(s,O),t(O,X),X.checked=n[6],t(O,it),t(s,st),t(s,Te),t(e,ot),t(e,Ne),t(Ne,$),t($,ue),t(ue,Se),t(Se,at),t(Se,ee),H(ee,n[13]),t(ue,ut),t(ue,Le),t(Le,rt),t(Le,te),H(te,n[14]),t($,ct),t($,re),t(re,Ee),t(Ee,pt),t(Ee,ne),H(ne,n[7]),t(re,ft),t(re,He),t(He,dt),t(He,le),H(le,n[8]),t($,ht),t($,N),t(N,ye),t(ye,gn),t(ye,ce),H(ce,n[9]),t(N,bn),t(N,mt),t(mt,wn),t(mt,pe),H(pe,n[10]),t($,kn),t($,Oe),t(Oe,vt),t(vt,yn),t(vt,oe),H(oe,n[11]),t(Oe,Cn),t(Oe,_t),t(_t,Mn),t(_t,ae),H(ae,n[12]),T(g,It,E),T(g,ie,E),t(ie,Re),t(Re,fe),t(fe,Nt),t(fe,zn),t(fe,qe),t(qe,Tn),t(qe,qt),t(fe,Sn),t(fe,De),t(De,Ln),t(De,Dt),t(Re,En),t(Re,de),t(de,jt),t(de,Hn),t(de,je),t(je,On),t(je,Bt),t(de,Rn),t(de,Be),t(Be,An),t(Be,Ft),t(ie,Pn),t(ie,Ae),t(Ae,he),t(he,Gt),t(he,Wn),t(he,Fe),t(Fe,Un),t(Fe,Vt),t(he,In),t(he,Ge),t(Ge,Nn),t(Ge,Jt),t(Ae,qn),t(Ae,me),t(me,Kt),t(me,Dn),t(me,Ve),t(Ve,jn),t(Ve,Xt),t(me,Bn),t(me,Je),t(Je,Fn),t(Je,Yt),t(ie,Gn),t(ie,Pe),t(Pe,ve),t(ve,Qt),t(ve,Vn),t(ve,Ke),t(Ke,Jn),t(Ke,Zt),t(ve,Kn),t(ve,Xe),t(Xe,Xn),t(Xe,$t),t(Pe,Yn),t(Pe,_e),t(_e,xt),t(_e,Qn),t(_e,Ye),t(Ye,Zn),t(Ye,en),t(_e,$n),t(_e,Qe),t(Qe,xn),t(Qe,tn),t(ie,el),t(ie,We),t(We,ge),t(ge,nn),t(ge,tl),t(ge,Ze),t(Ze,nl),t(Ze,ln),t(ge,ll),t(ge,$e),t($e,il),t($e,sn),t(We,sl),t(We,be),t(be,on),t(be,ol),t(be,xe),t(xe,al),t(xe,an),t(be,ul),t(be,et),t(et,rl),t(et,un),T(g,rn,E),T(g,we,E),t(we,Ce),H(Ce,n[22]),t(we,cl),t(we,tt),T(g,cn,E),T(g,ke,E),t(ke,Me),H(Me,n[15]),t(ke,pl),t(ke,nt),T(g,pn,E),T(g,ze,E),T(g,fn,E),T(g,Ue,E),dn||(fl=[y(l,"change",n[31]),y(r,"change",n[32]),y(k,"change",n[33]),y(p,"click",n[34]),y(b,"click",n[26]),y(z,"click",n[25]),y(P,"change",n[35]),y(q,"change",n[36]),y(D,"change",n[37]),y(X,"change",n[38]),y(Te,"click",n[27]),y(ee,"input",n[39]),y(te,"input",n[40]),y(ne,"input",n[41]),y(le,"input",n[42]),y(ce,"input",n[43]),y(pe,"input",n[44]),y(oe,"input",n[45]),y(ae,"input",n[46]),y(Ce,"input",n[47]),y(we,"submit",Wt(n[24])),y(Me,"input",n[48]),y(ke,"submit",Wt(n[23])),y(ze,"click",n[29]),y(Ue,"click",n[28])],dn=!0)},p(g,E){if(E[0]&2){Ie=Object.keys(g[1]);let B;for(B=0;B<Ie.length;B+=1){const dl=Dl(g,Ie,B);Y[B]?Y[B].p(dl,E):(Y[B]=jl(dl),Y[B].c(),Y[B].m(l,null))}for(;B<Y.length;B+=1)Y[B].d(1);Y.length=Ie.length}E[0]&3&&Ut(l,g[0]),E[0]&4&&(r.checked=g[2]),E[0]&8&&(k.checked=g[3]),E[0]&65536&&(P.checked=g[16]),E[0]&16&&(q.checked=g[4]),E[0]&32&&(D.checked=g[5]),E[0]&64&&(X.checked=g[6]),E[0]&8192&&F(ee.value)!==g[13]&&H(ee,g[13]),E[0]&16384&&F(te.value)!==g[14]&&H(te,g[14]),E[0]&128&&F(ne.value)!==g[7]&&H(ne,g[7]),E[0]&256&&F(le.value)!==g[8]&&H(le,g[8]),E[0]&512&&F(ce.value)!==g[9]&&H(ce,g[9]),E[0]&1024&&F(pe.value)!==g[10]&&H(pe,g[10]),E[0]&2048&&F(oe.value)!==g[11]&&H(oe,g[11]),E[0]&4096&&F(ae.value)!==g[12]&&H(ae,g[12]),E[0]&1048576&>!==(gt=g[20].width+"")&&j(qt,gt),E[0]&1048576&&bt!==(bt=g[20].height+"")&&j(Dt,bt),E[0]&2097152&&wt!==(wt=g[21].width+"")&&j(Bt,wt),E[0]&2097152&&kt!==(kt=g[21].height+"")&&j(Ft,kt),E[0]&1179648&&yt!==(yt=g[20].toLogical(g[17]).width+"")&&j(Vt,yt),E[0]&1179648&&Ct!==(Ct=g[20].toLogical(g[17]).height+"")&&j(Jt,Ct),E[0]&2228224&&Mt!==(Mt=g[21].toLogical(g[17]).width+"")&&j(Xt,Mt),E[0]&2228224&&zt!==(zt=g[21].toLogical(g[17]).height+"")&&j(Yt,zt),E[0]&262144&&Tt!==(Tt=g[18].x+"")&&j(Zt,Tt),E[0]&262144&&St!==(St=g[18].y+"")&&j($t,St),E[0]&524288&&Lt!==(Lt=g[19].x+"")&&j(en,Lt),E[0]&524288&&Et!==(Et=g[19].y+"")&&j(tn,Et),E[0]&393216&&Ht!==(Ht=g[18].toLogical(g[17]).x+"")&&j(ln,Ht),E[0]&393216&&Ot!==(Ot=g[18].toLogical(g[17]).y+"")&&j(sn,Ot),E[0]&655360&&Rt!==(Rt=g[19].toLogical(g[17]).x+"")&&j(an,Rt),E[0]&655360&&At!==(At=g[19].toLogical(g[17]).y+"")&&j(un,At),E[0]&4194304&&Ce.value!==g[22]&&H(Ce,g[22]),E[0]&32768&&Me.value!==g[15]&&H(Me,g[15])},i:I,o:I,d(g){g&&S(e),lt(Y,g),g&&S(It),g&&S(ie),g&&S(rn),g&&S(we),g&&S(cn),g&&S(ke),g&&S(pn),g&&S(ze),g&&S(fn),g&&S(Ue),dn=!1,Q(fl)}}}function $i(n,e,l){let i=Tl.label;const s={[i]:Tl};let{onMessage:o}=e,r="https://tauri.studio",c=!0,h=!1,d=!1,k=!0,w=!1,f=!1,p=900,v=700,b=600,_=600,z=null,C=null,A=100,P=100,W=1,L=new vn(A,P),U=new vn(A,P),q=new _n(p,v),Z=new _n(p,v),se,G,D="Awesome Tauri Example!";function R(){Ll(r)}function x(){s[i].setTitle(D)}function O(){s[i].hide(),setTimeout(s[i].show,2e3)}function X(){s[i].minimize(),setTimeout(s[i].unminimize,2e3)}function it(){wl({multiple:!1}).then(N=>{typeof N=="string"&&s[i].setIcon(N)})}function st(){const N=Math.random().toString().replace(".",""),ye=new fi(N);l(1,s[N]=ye,s),ye.once("tauri://error",function(){o("Error creating new webview")})}function Te(){s[i].innerSize().then(N=>{l(20,q=N),l(7,p=q.width),l(8,v=q.height)}),s[i].outerSize().then(N=>{l(21,Z=N)})}function ot(){s[i].innerPosition().then(N=>{l(18,L=N)}),s[i].outerPosition().then(N=>{l(19,U=N),l(13,A=U.x),l(14,P=U.y)})}async function Ne(N){se&&se(),G&&G(),G=await N.listen("tauri://move",ot),se=await N.listen("tauri://resize",Te)}async function $(){await s[i].minimize(),await s[i].requestUserAttention(di.Critical),await new Promise(N=>setTimeout(N,3e3)),await s[i].requestUserAttention(null)}function ue(){i=zl(this),l(0,i),l(1,s)}function Se(){c=this.checked,l(2,c)}function at(){h=this.checked,l(3,h)}const ee=()=>s[i].center();function ut(){d=this.checked,l(16,d)}function Le(){k=this.checked,l(4,k)}function rt(){w=this.checked,l(5,w)}function te(){f=this.checked,l(6,f)}function ct(){A=F(this.value),l(13,A)}function re(){P=F(this.value),l(14,P)}function Ee(){p=F(this.value),l(7,p)}function pt(){v=F(this.value),l(8,v)}function ne(){b=F(this.value),l(9,b)}function ft(){_=F(this.value),l(10,_)}function He(){z=F(this.value),l(11,z)}function dt(){C=F(this.value),l(12,C)}function le(){D=this.value,l(22,D)}function ht(){r=this.value,l(15,r)}return n.$$set=N=>{"onMessage"in N&&l(30,o=N.onMessage)},n.$$.update=()=>{n.$$.dirty[0]&7&&s[i].setResizable(c),n.$$.dirty[0]&11&&(h?s[i].maximize():s[i].unmaximize()),n.$$.dirty[0]&19&&s[i].setDecorations(k),n.$$.dirty[0]&35&&s[i].setAlwaysOnTop(w),n.$$.dirty[0]&67&&s[i].setFullscreen(f),n.$$.dirty[0]&387&&s[i].setSize(new _n(p,v)),n.$$.dirty[0]&1539&&(b&&_?s[i].setMinSize(new Sl(b,_)):s[i].setMinSize(null)),n.$$.dirty[0]&6147&&(z&&C?s[i].setMaxSize(new Sl(z,C)):s[i].setMaxSize(null)),n.$$.dirty[0]&24579&&s[i].setPosition(new vn(A,P)),n.$$.dirty[0]&3&&s[i].scaleFactor().then(N=>l(17,W=N)),n.$$.dirty[0]&3&&Ne(s[i])},[i,s,c,h,k,w,f,p,v,b,_,z,C,A,P,r,d,W,L,U,q,Z,D,R,x,O,X,it,st,$,o,ue,Se,at,ee,ut,Le,rt,te,ct,re,Ee,pt,ne,ft,He,dt,le,ht]}class xi extends V{constructor(e){super();J(this,e,$i,Zi,K,{onMessage:30},[-1,-1])}}function Bl(n,e,l){const i=n.slice();return i[9]=e[l],i}function Fl(n){let e,l=n[9]+"",i,s,o,r,c;function h(){return n[8](n[9])}return{c(){e=a("div"),i=M(l),s=m(),o=a("button"),o.textContent="Unregister",u(o,"type","button")},m(d,k){T(d,e,k),t(e,i),t(e,s),t(e,o),r||(c=y(o,"click",h),r=!0)},p(d,k){n=d,k&2&&l!==(l=n[9]+"")&&j(i,l)},d(d){d&&S(e),r=!1,c()}}}function Gl(n){let e,l,i;return{c(){e=a("button"),e.textContent="Unregister all",u(e,"type","button")},m(s,o){T(s,e,o),l||(i=y(e,"click",n[5]),l=!0)},p:I,d(s){s&&S(e),l=!1,i()}}}function es(n){let e,l,i,s,o,r,c,h,d,k,w=n[1],f=[];for(let v=0;v<w.length;v+=1)f[v]=Fl(Bl(n,w,v));let p=n[1].length&&Gl(n);return{c(){e=a("div"),l=a("div"),i=a("input"),s=m(),o=a("button"),o.textContent="Register",r=m(),c=a("div");for(let v=0;v<f.length;v+=1)f[v].c();h=m(),p&&p.c(),u(i,"placeholder","Type a shortcut with '+' as separator..."),u(o,"type","button")},m(v,b){T(v,e,b),t(e,l),t(l,i),H(i,n[0]),t(l,s),t(l,o),t(e,r),t(e,c);for(let _=0;_<f.length;_+=1)f[_].m(c,null);t(c,h),p&&p.m(c,null),d||(k=[y(i,"input",n[7]),y(o,"click",n[3])],d=!0)},p(v,[b]){if(b&1&&i.value!==v[0]&&H(i,v[0]),b&18){w=v[1];let _;for(_=0;_<w.length;_+=1){const z=Bl(v,w,_);f[_]?f[_].p(z,b):(f[_]=Fl(z),f[_].c(),f[_].m(c,h))}for(;_<f.length;_+=1)f[_].d(1);f.length=w.length}v[1].length?p?p.p(v,b):(p=Gl(v),p.c(),p.m(c,null)):p&&(p.d(1),p=null)},i:I,o:I,d(v){v&&S(e),lt(f,v),p&&p.d(),d=!1,Q(k)}}}function ts(n,e,l){let i,{onMessage:s}=e;const o=Hl([]);El(n,o,f=>l(1,i=f));let r="CmdOrControl+X";function c(){const f=r;hi(f,()=>{s(`Shortcut ${f} triggered`)}).then(()=>{o.update(p=>[...p,f]),s(`Shortcut ${f} registered successfully`)}).catch(s)}function h(f){const p=f;mi(p).then(()=>{o.update(v=>v.filter(b=>b!==p)),s(`Shortcut ${p} unregistered`)}).catch(s)}function d(){vi().then(()=>{o.update(()=>[]),s("Unregistered all shortcuts")}).catch(s)}function k(){r=this.value,l(0,r)}const w=f=>h(f);return n.$$set=f=>{"onMessage"in f&&l(6,s=f.onMessage)},[r,i,o,c,h,d,s,k,w]}class ns extends V{constructor(e){super();J(this,e,ts,es,K,{onMessage:6})}}function Vl(n){let e,l,i,s,o;return{c(){e=a("input"),l=m(),i=a("button"),i.textContent="Write",u(e,"placeholder","write to stdin"),u(i,"class","button")},m(r,c){T(r,e,c),H(e,n[3]),T(r,l,c),T(r,i,c),s||(o=[y(e,"input",n[10]),y(i,"click",n[7])],s=!0)},p(r,c){c&8&&e.value!==r[3]&&H(e,r[3])},d(r){r&&S(e),r&&S(l),r&&S(i),s=!1,Q(o)}}}function ls(n){let e,l,i,s,o,r,c,h,d,k,w,f,p,v,b,_=n[4]&&Vl(n);return{c(){e=a("div"),l=a("div"),i=a("input"),s=m(),o=a("button"),o.textContent="Run",r=m(),c=a("button"),c.textContent="Kill",h=m(),_&&_.c(),d=m(),k=a("div"),w=a("input"),f=m(),p=a("input"),u(o,"class","button"),u(c,"class","button"),u(w,"placeholder","Working directory"),u(p,"class","env-vars svelte-1g38c1n"),u(p,"placeholder","Environment variables")},m(z,C){T(z,e,C),t(e,l),t(l,i),H(i,n[0]),t(l,s),t(l,o),t(l,r),t(l,c),t(l,h),_&&_.m(l,null),t(e,d),t(e,k),t(k,w),H(w,n[1]),t(k,f),t(k,p),H(p,n[2]),v||(b=[y(i,"input",n[9]),y(o,"click",n[5]),y(c,"click",n[6]),y(w,"input",n[11]),y(p,"input",n[12])],v=!0)},p(z,[C]){C&1&&i.value!==z[0]&&H(i,z[0]),z[4]?_?_.p(z,C):(_=Vl(z),_.c(),_.m(l,null)):_&&(_.d(1),_=null),C&2&&w.value!==z[1]&&H(w,z[1]),C&4&&p.value!==z[2]&&H(p,z[2])},i:I,o:I,d(z){z&&S(e),_&&_.d(),v=!1,Q(b)}}}function is(n,e,l){const i=navigator.userAgent.includes("Windows");let s=i?"cmd":"sh",o=i?["/C"]:["-c"],{onMessage:r}=e,c='echo "hello world"',h=null,d="SOMETHING=value ANOTHER=2",k="",w;function f(){return d.split(" ").reduce((P,W)=>{let[L,U]=W.split("=");return _l(vl({},P),{[L]:U})},{})}function p(){l(4,w=null);const P=new _i(s,[...o,c],{cwd:h||null,env:f()});P.on("close",W=>{r(`command finished with code ${W.code} and signal ${W.signal}`),l(4,w=null)}),P.on("error",W=>r(`command error: "${W}"`)),P.stdout.on("data",W=>r(`command stdout: "${W}"`)),P.stderr.on("data",W=>r(`command stderr: "${W}"`)),P.spawn().then(W=>{l(4,w=W)}).catch(r)}function v(){w.kill().then(()=>r("killed child process")).catch(r)}function b(){w.write(k).catch(r)}function _(){c=this.value,l(0,c)}function z(){k=this.value,l(3,k)}function C(){h=this.value,l(1,h)}function A(){d=this.value,l(2,d)}return n.$$set=P=>{"onMessage"in P&&l(8,r=P.onMessage)},[c,h,d,k,w,p,v,b,r,_,z,C,A]}class ss extends V{constructor(e){super();J(this,e,is,ls,K,{onMessage:8})}}function os(n){let e,l,i,s,o,r;return{c(){e=a("div"),l=a("button"),l.textContent="Check update",i=m(),s=a("button"),s.textContent="Install update",u(l,"class","button"),u(l,"id","check_update"),u(s,"class","button hidden"),u(s,"id","start_update")},m(c,h){T(c,e,h),t(e,l),t(e,i),t(e,s),o||(r=[y(l,"click",n[0]),y(s,"click",n[1])],o=!0)},p:I,i:I,o:I,d(c){c&&S(e),o=!1,Q(r)}}}function as(n,e,l){let{onMessage:i}=e,s;Pt(async()=>{s=await bl("tauri://update-status",i)}),hn(()=>{s&&s()});async function o(){try{document.getElementById("check_update").classList.add("hidden");const{shouldUpdate:c,manifest:h}=await gi();i(`Should update: ${c}`),i(h),c&&document.getElementById("start_update").classList.remove("hidden")}catch(c){i(c)}}async function r(){try{document.getElementById("start_update").classList.add("hidden"),await bi(),i("Installation complete, restart required."),await gl()}catch(c){i(c)}}return n.$$set=c=>{"onMessage"in c&&l(2,i=c.onMessage)},[o,r,i]}class us extends V{constructor(e){super();J(this,e,as,os,K,{onMessage:2})}}function rs(n){let e,l,i,s,o,r,c,h,d;return{c(){e=a("div"),l=a("div"),i=a("input"),s=m(),o=a("button"),o.textContent="Write",r=m(),c=a("button"),c.textContent="Read",u(i,"placeholder","Text to write to the clipboard"),u(o,"type","button"),u(c,"type","button")},m(k,w){T(k,e,w),t(e,l),t(l,i),H(i,n[0]),t(l,s),t(l,o),t(e,r),t(e,c),h||(d=[y(i,"input",n[4]),y(o,"click",n[1]),y(c,"click",n[2])],h=!0)},p(k,[w]){w&1&&i.value!==k[0]&&H(i,k[0])},i:I,o:I,d(k){k&&S(e),h=!1,Q(d)}}}function cs(n,e,l){let{onMessage:i}=e,s="clipboard message";function o(){wi(s).then(()=>{i("Wrote to the clipboard")}).catch(i)}function r(){ki().then(h=>{i(`Clipboard contents: ${h}`)}).catch(i)}function c(){s=this.value,l(0,s)}return n.$$set=h=>{"onMessage"in h&&l(3,i=h.onMessage)},[s,o,r,i,c]}class ps extends V{constructor(e){super();J(this,e,cs,rs,K,{onMessage:3})}}function fs(n){let e;return{c(){e=a("div"),e.innerHTML=`<div class="alert"><p>Not available for Linux</p></div>
|
|
<video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`},m(l,i){T(l,e,i)},p:I,i:I,o:I,d(l){l&&S(e)}}}function ds(n,e,l){let{onMessage:i}=e;const s=window.constraints={audio:!0,video:!0};function o(c){const h=document.querySelector("video"),d=c.getVideoTracks();i("Got stream with constraints:",s),i(`Using video device: ${d[0].label}`),window.stream=c,h.srcObject=c}function r(c){if(c.name==="ConstraintNotSatisfiedError"){const h=s.video;i(`The resolution ${h.width.exact}x${h.height.exact} px is not supported by your device.`)}else c.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${c.name}`,c)}return Pt(async()=>{try{const c=await navigator.mediaDevices.getUserMedia(s);o(c)}catch(c){r(c)}}),hn(()=>{window.stream.getTracks().forEach(function(c){c.stop()})}),n.$$set=c=>{"onMessage"in c&&l(0,i=c.onMessage)},[i]}class hs extends V{constructor(e){super();J(this,e,ds,fs,K,{onMessage:0})}}function ms(n){let e,l,i,s,o,r,c,h,d,k,w,f;return{c(){e=a("input"),l=m(),i=a("input"),s=m(),o=a("button"),o.textContent="Post it.",r=m(),c=a("p"),c.textContent="Result:",h=m(),d=a("pre"),k=M(n[2]),u(o,"type","button")},m(p,v){T(p,e,v),H(e,n[0]),T(p,l,v),T(p,i,v),H(i,n[1]),T(p,s,v),T(p,o,v),T(p,r,v),T(p,c,v),T(p,h,v),T(p,d,v),t(d,k),w||(f=[y(e,"input",n[4]),y(i,"input",n[5]),y(o,"click",n[3])],w=!0)},p(p,[v]){v&1&&e.value!==p[0]&&H(e,p[0]),v&2&&i.value!==p[1]&&H(i,p[1]),v&4&&j(k,p[2])},i:I,o:I,d(p){p&&S(e),p&&S(l),p&&S(i),p&&S(s),p&&S(o),p&&S(r),p&&S(c),p&&S(h),p&&S(d),w=!1,Q(f)}}}function vs(n,e,l){let i="baz",s="qux",o=null;async function r(){let d=navigator.userAgent.includes("Windows")?"https://customprotocol.test/example.html":"customprotocol://test/example.html";const w=await(await fetch(d,{method:"POST",body:JSON.stringify({foo:i,bar:s})})).json();l(2,o=JSON.stringify(w))}function c(){i=this.value,l(0,i)}function h(){s=this.value,l(1,s)}return[i,s,o,r,c,h]}class _s extends V{constructor(e){super();J(this,e,vs,ms,K,{})}}function Jl(n,e,l){const i=n.slice();return i[10]=e[l],i}function Kl(n,e,l){const i=n.slice();return i[13]=e[l],i}function Xl(n){let e,l=n[13].label+"",i,s,o,r,c;function h(){return n[9](n[13])}return{c(){e=a("p"),i=M(l),s=m(),u(e,"class",o="nv noselect "+(n[0]===n[13]?"nv_selected":""))},m(d,k){T(d,e,k),t(e,i),t(e,s),r||(c=y(e,"click",h),r=!0)},p(d,k){n=d,k&1&&o!==(o="nv noselect "+(n[0]===n[13]?"nv_selected":""))&&u(e,"class",o)},d(d){d&&S(e),r=!1,c()}}}function gs(n){let e,l=n[10].html+"",i;return{c(){i=Ol(),e=new zi(i)},m(s,o){e.m(l,s,o),T(s,i,o)},p(s,o){o&2&&l!==(l=s[10].html+"")&&e.p(l)},d(s){s&&S(i),s&&e.d()}}}function bs(n){let e,l=n[10].text+"",i;return{c(){e=a("p"),i=M(l)},m(s,o){T(s,e,o),t(e,i)},p(s,o){o&2&&l!==(l=s[10].text+"")&&j(i,l)},d(s){s&&S(e)}}}function Yl(n){let e;function l(o,r){return o[10].text?bs:gs}let i=l(n),s=i(n);return{c(){s.c(),e=Ol()},m(o,r){s.m(o,r),T(o,e,r)},p(o,r){i===(i=l(o))&&s?s.p(o,r):(s.d(1),s=i(o),s&&(s.c(),s.m(e.parentNode,e)))},d(o){s.d(o),o&&S(e)}}}function ws(n){let e,l,i,s,o,r,c,h,d,k,w,f,p,v,b,_,z,C,A,P,W,L,U=n[2],q=[];for(let R=0;R<U.length;R+=1)q[R]=Xl(Kl(n,U,R));var Z=n[0].component;function se(R){return{props:{onMessage:R[5],insecureRenderHtml:R[6]}}}Z&&(f=new Z(se(n)));let G=n[1],D=[];for(let R=0;R<G.length;R+=1)D[R]=Yl(Jl(n,G,R));return{c(){e=a("main"),l=a("div"),i=a("img"),o=m(),r=a("div"),r.innerHTML=`<a class="dark-link" target="_blank" href="https://tauri.studio/en/docs/get-started/intro">Documentation</a>
|
|
<a class="dark-link" target="_blank" href="https://github.com/tauri-apps/tauri">Github</a>
|
|
<a class="dark-link" target="_blank" href="https://github.com/tauri-apps/tauri/tree/dev/tauri/examples/api">Source</a>`,c=m(),h=a("div"),d=a("div");for(let R=0;R<q.length;R+=1)q[R].c();k=m(),w=a("div"),f&&Rl(f.$$.fragment),p=m(),v=a("div"),b=a("p"),_=a("strong"),_.textContent="Tauri Console",z=m(),C=a("span"),C.textContent="clear",A=m();for(let R=0;R<D.length;R+=1)D[R].c();u(i,"class","logo"),i.src!==(s="tauri logo.png")&&u(i,"src",s),u(i,"height","60"),u(i,"alt","logo"),u(l,"class","flex row noselect just-around container svelte-1fam3xt"),u(l,"data-tauri-drag-region",""),u(d,"class","view-container svelte-1fam3xt"),u(w,"class","content"),u(h,"class","flex row"),u(C,"class","nv"),u(b,"class","flex row just-around"),u(v,"id","response"),u(v,"class","svelte-1fam3xt")},m(R,x){T(R,e,x),t(e,l),t(l,i),t(l,o),t(l,r),t(e,c),t(e,h),t(h,d);for(let O=0;O<q.length;O+=1)q[O].m(d,null);t(h,k),t(h,w),f&&Al(f,w,null),t(e,p),t(e,v),t(v,b),t(b,_),t(b,z),t(b,C),t(v,A);for(let O=0;O<D.length;O+=1)D[O].m(v,null);P=!0,W||(L=[y(i,"click",n[8]),y(C,"click",n[7])],W=!0)},p(R,[x]){if(x&21){U=R[2];let O;for(O=0;O<U.length;O+=1){const X=Kl(R,U,O);q[O]?q[O].p(X,x):(q[O]=Xl(X),q[O].c(),q[O].m(d,null))}for(;O<q.length;O+=1)q[O].d(1);q.length=U.length}if(Z!==(Z=R[0].component)){if(f){Ci();const O=f;Pl(O.$$.fragment,1,0,()=>{Ul(O,1)}),yi()}Z?(f=new Z(se(R)),Rl(f.$$.fragment),Wl(f.$$.fragment,1),Al(f,w,null)):f=null}if(x&2){G=R[1];let O;for(O=0;O<G.length;O+=1){const X=Jl(R,G,O);D[O]?D[O].p(X,x):(D[O]=Yl(X),D[O].c(),D[O].m(v,null))}for(;O<D.length;O+=1)D[O].d(1);D.length=G.length}},i(R){P||(f&&Wl(f.$$.fragment,R),P=!0)},o(R){f&&Pl(f.$$.fragment,R),P=!1},d(R){R&&S(e),lt(q,R),f&&Ul(f),lt(D,R),W=!1,Q(L)}}}const ks="ctrl+b";function ys(n,e,l){let i;Pt(()=>{Mi(ks,()=>{mn("menu_toggle")})});const s=[{label:"Welcome",component:Ei},{label:"Messages",component:Wi},{label:"CLI",component:Ri},{label:"Dialog",component:qi},{label:"File system",component:Fi},{label:"HTTP",component:Ji},{label:"HTTP Form",component:_s},{label:"Notifications",component:Qi},{label:"Window",component:xi},{label:"Shortcuts",component:ns},{label:"Shell",component:ss},{label:"Updater",component:us},{label:"Clipboard",component:ps},{label:"WebRTC",component:hs}];let o=s[0],r=Hl([]);El(n,r,p=>l(1,i=p));function c(p){l(0,o=p)}function h(p){r.update(v=>[{text:`[${new Date().toLocaleTimeString()}]: `+(typeof p=="string"?p:JSON.stringify(p))},...v])}function d(p){r.update(v=>[{html:p},...v])}function k(){r.update(()=>[])}function w(){Ll("https://tauri.studio/")}return[o,i,s,r,c,h,d,k,w,p=>c(p)]}class Cs extends V{constructor(e){super();J(this,e,ys,ws,K,{})}}new Cs({target:document.body});
|