From e0d06e1e6d4839d3d3cfd0112d63f1ebf6f3e3c1 Mon Sep 17 00:00:00 2001 From: WCY-dt <55525165+WCY-dt@users.noreply.github.com> Date: Sun, 2 Feb 2025 09:45:38 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20WCY-dt/E?= =?UTF-8?q?asyTransfer@55cc898fb98ff4c4406524b73e76aae8fd06867b=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/{index-CoyQXC7j.js => index-BY8FRap4.js} | 6 +++--- index.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename assets/{index-CoyQXC7j.js => index-BY8FRap4.js} (81%) diff --git a/assets/index-CoyQXC7j.js b/assets/index-BY8FRap4.js similarity index 81% rename from assets/index-CoyQXC7j.js rename to assets/index-BY8FRap4.js index fa63a75..b5a4caf 100644 --- a/assets/index-CoyQXC7j.js +++ b/assets/index-BY8FRap4.js @@ -15,10 +15,10 @@ * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let On;const Ar=typeof window<"u"&&window.trustedTypes;if(Ar)try{On=Ar.createPolicy("vue",{createHTML:e=>e})}catch{}const so=On?e=>On.createHTML(e):e=>e,Ac="http://www.w3.org/2000/svg",Ic="http://www.w3.org/1998/Math/MathML",st=typeof document<"u"?document:null,Ir=st&&st.createElement("template"),Nc={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?st.createElementNS(Ac,e):t==="mathml"?st.createElementNS(Ic,e):s?st.createElement(e,{is:s}):st.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>st.createTextNode(e),createComment:e=>st.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>st.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,i){const o=s?s.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{Ir.innerHTML=so(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const l=Ir.content;if(n==="svg"||n==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},kc=Symbol("_vtc");function Pc(e,t,s){const n=e[kc];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Ns=Symbol("_vod"),no=Symbol("_vsh"),$t={beforeMount(e,{value:t},{transition:s}){e[Ns]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Vt(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Vt(e,!0),n.enter(e)):n.leave(e,()=>{Vt(e,!1)}):Vt(e,t))},beforeUnmount(e,{value:t}){Vt(e,t)}};function Vt(e,t){e.style.display=t?e[Ns]:"none",e[no]=!t}const Lc=Symbol(""),Dc=/(^|;)\s*display\s*:/;function Mc(e,t,s){const n=e.style,r=he(s);let i=!1;if(s&&!r){if(t)if(he(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();s[l]==null&&vs(n,l,"")}else for(const o in t)s[o]==null&&vs(n,o,"");for(const o in s)o==="display"&&(i=!0),vs(n,o,s[o])}else if(r){if(t!==s){const o=n[Lc];o&&(s+=";"+o),n.cssText=s,i=Dc.test(s)}}else t&&e.removeAttribute("style");Ns in e&&(e[Ns]=i?n.display:"",e[no]&&(n.display="none"))}const Nr=/\s*!important$/;function vs(e,t,s){if(B(s))s.forEach(n=>vs(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Bc(e,t);Nr.test(s)?e.setProperty(St(n),s.replace(Nr,""),"important"):e[n]=s}}const kr=["Webkit","Moz","ms"],fn={};function Bc(e,t){const s=fn[t];if(s)return s;let n=ht(t);if(n!=="filter"&&n in e)return fn[t]=n;n=Qr(n);for(let r=0;rdn||($c.then(()=>dn=0),dn=Date.now());function jc(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Qe(Wc(n,s.value),t,5,[n])};return s.value=e,s.attached=Vc(),s}function Wc(e,t){if(B(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const Fr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,qc=(e,t,s,n,r,i)=>{const o=r==="svg";t==="class"?Pc(e,n,o):t==="style"?Mc(e,s,n):Ds(t)?Fn(t)||Uc(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Kc(e,t,n,o))?(Dr(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Lr(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!he(n))?Dr(e,ht(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Lr(e,t,n,o))};function Kc(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Fr(t)&&q(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Fr(t)&&he(s)?!1:t in e}const ks=e=>{const t=e.props["onUpdate:modelValue"]||!1;return B(t)?s=>gs(t,s):t};function Gc(e){e.target.composing=!0}function Ur(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const kt=Symbol("_assign"),Ps={created(e,{modifiers:{lazy:t,trim:s,number:n}},r){e[kt]=ks(r);const i=n||r.props&&r.props.type==="number";vt(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;s&&(l=l.trim()),i&&(l=yn(l)),e[kt](l)}),s&&vt(e,"change",()=>{e.value=e.value.trim()}),t||(vt(e,"compositionstart",Gc),vt(e,"compositionend",Ur),vt(e,"change",Ur))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:r,number:i}},o){if(e[kt]=ks(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?yn(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||r&&e.value.trim()===c)||(e.value=c))}},hn={deep:!0,created(e,t,s){e[kt]=ks(s),vt(e,"change",()=>{const n=e._modelValue,r=zc(e),i=e.checked,o=e[kt];if(B(n)){const l=ti(n,r),c=l!==-1;if(i&&!c)o(n.concat(r));else if(!i&&c){const f=[...n];f.splice(l,1),o(f)}}else if(Ms(n)){const l=new Set(n);i?l.add(r):l.delete(r),o(l)}else o(ro(e,i))})},mounted:Hr,beforeUpdate(e,t,s){e[kt]=ks(s),Hr(e,t,s)}};function Hr(e,{value:t,oldValue:s},n){e._modelValue=t;let r;if(B(t))r=ti(t,n.props.value)>-1;else if(Ms(t))r=t.has(n.props.value);else{if(t===s)return;r=Us(t,ro(e,!0))}e.checked!==r&&(e.checked=r)}function zc(e){return"_value"in e?e._value:e.value}function ro(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Yc=["ctrl","shift","alt","meta"],Jc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Yc.some(s=>e[`${s}Key`]&&!t.includes(s))},io=(e,t)=>{const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=(r,...i)=>{for(let o=0;o{const t=Qc().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=ta(n);if(!r)return;const i=t._component;!q(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=s(r,!1,ea(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function ea(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ta(e){return he(e)?document.querySelector(e):e}var sa=!1;/*! - * pinia v2.3.0 - * (c) 2024 Eduardo San Martin Morote + * pinia v2.3.1 + * (c) 2025 Eduardo San Martin Morote * @license MIT */let oo;const Js=e=>oo=e,lo=Symbol();function An(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Zt;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Zt||(Zt={}));function na(){const e=ii(!0),t=e.run(()=>V({}));let s=[],n=[];const r=Yn({install(i){Js(r),r._a=i,i.provide(lo,r),i.config.globalProperties.$pinia=r,n.forEach(o=>s.push(o)),n=[]},use(i){return!this._a&&!sa?n.push(i):s.push(i),this},_p:s,_a:null,_e:e,_s:new Map,state:t});return r}const co=()=>{};function Vr(e,t,s,n=co){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),n())};return!s&&oi()&&jo(r),r}function Ct(e,...t){e.slice().forEach(s=>{s(...t)})}const ra=e=>e(),jr=Symbol(),pn=Symbol();function In(e,t){e instanceof Map&&t instanceof Map?t.forEach((s,n)=>e.set(n,s)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const s in t){if(!t.hasOwnProperty(s))continue;const n=t[s],r=e[s];An(r)&&An(n)&&e.hasOwnProperty(s)&&!ae(n)&&!it(n)?e[s]=In(r,n):e[s]=n}return e}const ia=Symbol();function oa(e){return!An(e)||!e.hasOwnProperty(ia)}const{assign:ct}=Object;function la(e){return!!(ae(e)&&e.effect)}function ca(e,t,s,n){const{state:r,actions:i,getters:o}=t,l=s.state.value[e];let c;function f(){l||(s.state.value[e]=r?r():{});const u=hl(s.state.value[e]);return ct(u,i,Object.keys(o||{}).reduce((h,m)=>(h[m]=Yn(Ys(()=>{Js(s);const T=s._s.get(e);return o[m].call(T,T)})),h),{}))}return c=ao(e,f,t,s,n,!0),c}function ao(e,t,s={},n,r,i){let o;const l=ct({actions:{}},s),c={deep:!0};let f,u,h=[],m=[],T;const x=n.state.value[e];!i&&!x&&(n.state.value[e]={}),V({});let A;function L(G){let S;f=u=!1,typeof G=="function"?(G(n.state.value[e]),S={type:Zt.patchFunction,storeId:e,events:T}):(In(n.state.value[e],G),S={type:Zt.patchObject,payload:G,storeId:e,events:T});const N=A=Symbol();xi().then(()=>{A===N&&(f=!0)}),u=!0,Ct(h,S,n.state.value[e])}const U=i?function(){const{state:S}=s,N=S?S():{};this.$patch(b=>{ct(b,N)})}:co;function Y(){o.stop(),h=[],m=[],n._s.delete(e)}const K=(G,S="")=>{if(jr in G)return G[pn]=S,G;const N=function(){Js(n);const b=Array.from(arguments),P=[],W=[];function ce(z){P.push(z)}function et(z){W.push(z)}Ct(m,{args:b,name:N[pn],store:D,after:ce,onError:et});let ue;try{ue=G.apply(this&&this.$id===e?this:D,b)}catch(z){throw Ct(W,z),z}return ue instanceof Promise?ue.then(z=>(Ct(P,z),z)).catch(z=>(Ct(W,z),Promise.reject(z))):(Ct(P,ue),ue)};return N[jr]=!0,N[pn]=S,N},y={_p:n,$id:e,$onAction:Vr.bind(null,m),$patch:L,$reset:U,$subscribe(G,S={}){const N=Vr(h,G,S.detached,()=>b()),b=o.run(()=>be(()=>n.state.value[e],P=>{(S.flush==="sync"?u:f)&&G({storeId:e,type:Zt.direct,events:T},P)},ct({},c,S)));return N},$dispose:Y},D=$s(y);n._s.set(e,D);const le=(n._a&&n._a.runWithContext||ra)(()=>n._e.run(()=>(o=ii()).run(()=>t({action:K}))));for(const G in le){const S=le[G];if(ae(S)&&!la(S)||it(S))i||(x&&oa(S)&&(ae(S)?S.value=x[G]:In(S,x[G])),n.state.value[e][G]=S);else if(typeof S=="function"){const N=K(S,G);le[G]=N,l.actions[G]=S}}return ct(D,le),ct(Q(D),le),Object.defineProperty(D,"$state",{get:()=>n.state.value[e],set:G=>{L(S=>{ct(S,G)})}}),n._p.forEach(G=>{ct(D,o.run(()=>G({store:D,app:n._a,pinia:n,options:l})))}),x&&i&&s.hydrate&&s.hydrate(D.$state,x),f=!0,u=!0,D}/*! #__NO_SIDE_EFFECTS__ */function Xs(e,t,s){let n,r;const i=typeof t=="function";typeof e=="string"?(n=e,r=i?s:t):(r=e,n=e.id);function o(l,c){const f=zl();return l=l||(f?Xt(lo,null):null),l&&Js(l),l=oo,l._s.has(n)||(i?ao(n,t,r,l):ca(n,r,l)),l._s.get(n)}return o.$id=n,o}function Ue(e){{const t=Q(e),s={};for(const n in t){const r=t[n];r.effect?s[n]=Ys({get:()=>e[n],set(i){e[n]=i}}):(ae(r)||it(r))&&(s[n]=gl(e,n))}return s}}const aa=10,ua=[{urls:"stun:stun.l.google.com:19302"},{urls:"stun:stun.l.google.com:5349"},{urls:"stun:stun1.l.google.com:3478"},{urls:"stun:stun1.l.google.com:5349"},{urls:"stun:stun2.l.google.com:19302"},{urls:"stun:stun2.l.google.com:5349"},{urls:"stun:stun3.l.google.com:3478"},{urls:"stun:stun3.l.google.com:5349"},{urls:"stun:stun4.l.google.com:19302"},{urls:"stun:stun4.l.google.com:5349"},{urls:"turn:103.124.107.241:3478",username:"easytransfer",credential:"sharesimplyandstayanonymous"}],cs=Xs("setting",()=>{const e=V(!0);localStorage.getItem("autoDisplayImage")&&(e.value=JSON.parse(localStorage.getItem("autoDisplayImage"))),be(e,()=>{localStorage.setItem("autoDisplayImage",JSON.stringify(e.value))});const t=V(!0);localStorage.getItem("directlyOpenLink")&&(t.value=JSON.parse(localStorage.getItem("directlyOpenLink"))),be(t,()=>{localStorage.setItem("directlyOpenLink",JSON.stringify(t.value))});const s=V(!0);localStorage.getItem("autoDownload")&&(s.value=JSON.parse(localStorage.getItem("autoDownload"))),be(s,()=>{localStorage.setItem("autoDownload",JSON.stringify(s.value))});const n=V(aa);localStorage.getItem("maxConnectionNumber")&&(n.value=JSON.parse(localStorage.getItem("maxConnectionNumber"))),be(n,()=>{localStorage.setItem("maxConnectionNumber",JSON.stringify(n.value))});const r=V(ua);if(localStorage.getItem("iceServers")){const i=JSON.parse(localStorage.getItem("iceServers")),o=[...r.value,...i],l=Array.from(new Set(o.map(c=>JSON.stringify(c)))).map(c=>JSON.parse(c));r.value=l}return be(r,()=>{localStorage.setItem("iceServers",JSON.stringify(r.value))}),{autoDisplayImage:e,directlyOpenLink:t,autoDownload:s,maxConnectionNumber:n,iceServers:r}}),fa={class:"settings-cluster shadow"},da={class:"setting-item"},ha={class:"range-input"},pa={class:"switch-input blur shadow"},ma={class:"switch-input blur shadow"},ga={class:"switch-input blur shadow"},_a={class:"setting-button"},ya=["disabled"],va=De({__name:"SettingsModal",emits:["close"],setup(e,{emit:t}){const s=cs(),{maxConnectionNumber:n,iceServers:r,autoDisplayImage:i,directlyOpenLink:o,autoDownload:l}=Ue(s),c=t,f=()=>{c("close")},u=V(!0),h=V("Save"),m=V(null),T=V(null),x=V(null),A=V(null),L=V(null);Ws(()=>{m.value=n.value,T.value=r.value.map(K=>JSON.stringify(K)).join(` `),x.value=i.value,A.value=o.value,L.value=l.value});function U(){var y;n.value!==m.value&&(n.value=m.value);let K=JSON.parse(`[${(y=T.value)==null?void 0:y.split(` `).join(",")}]`);JSON.stringify(r.value)!==JSON.stringify(K)&&(r.value=K),i.value!==x.value&&(i.value=x.value),o.value!==A.value&&(o.value=A.value),l.value!==L.value&&(l.value=L.value),f()}const Y=()=>{var y;u.value=!1,h.value="Checking...",m.value!==null&&m.value<1&&(m.value=1);let K;try{K=JSON.parse(`[${(y=T.value)==null?void 0:y.split(` -`).join(",")}]`)}catch{u.value=!1,h.value="ICE Servers format incorrect";return}if(K.length===0){u.value=!1,h.value="ICE Servers cannot be empty";return}for(let D of K)if(!D.urls){u.value=!1,h.value="ICE Servers must have urls property";return}u.value=!0,h.value="Save"};return(K,y)=>(F(),j("div",{class:"overlay blur",onClick:io(f,["self"])},[g("div",fa,[y[15]||(y[15]=g("h2",null,[g("span",{class:"mdi mdi-cog"}),tr("Settings")],-1)),g("div",da,[y[10]||(y[10]=g("label",{for:"max-connection-number"},"Max connection number",-1)),g("div",ha,[Be(g("input",{type:"range",id:"max-connection-number",class:"blur shadow","onUpdate:modelValue":y[0]||(y[0]=D=>m.value=D),onInput:Y,min:"0",max:"16",step:"1"},null,544),[[Ps,m.value]]),y[6]||(y[6]=g("div",{class:"range-input-label"},[g("span",null,"0"),g("span",null,"4"),g("span",null,"8"),g("span",null,"12"),g("span",null,"16")],-1))]),y[11]||(y[11]=g("label",{for:"ice-servers"},"ICE Servers",-1)),Be(g("textarea",{id:"ice-servers",class:"blur shadow","onUpdate:modelValue":y[1]||(y[1]=D=>T.value=D),spellcheck:"false",onInput:Y},null,544),[[Ps,T.value]]),y[12]||(y[12]=g("label",{for:"enable-img-display"},"Auto display image",-1)),g("label",pa,[Be(g("input",{class:"blur shadow",type:"checkbox",id:"enable-img-display","onUpdate:modelValue":y[2]||(y[2]=D=>x.value=D)},null,512),[[hn,x.value]]),y[7]||(y[7]=g("span",{class:"blur shadow"},null,-1))]),y[13]||(y[13]=g("label",{for:"enable-open-link"},"Directly open link",-1)),g("label",ma,[Be(g("input",{class:"blur shadow",type:"checkbox",id:"enable-open-link","onUpdate:modelValue":y[3]||(y[3]=D=>A.value=D)},null,512),[[hn,A.value]]),y[8]||(y[8]=g("span",{class:"blur shadow"},null,-1))]),y[14]||(y[14]=g("label",{for:"auto-download"},"Auto download",-1)),g("label",ga,[Be(g("input",{class:"blur shadow",type:"checkbox",id:"auto-download","onUpdate:modelValue":y[4]||(y[4]=D=>L.value=D)},null,512),[[hn,L.value]]),y[9]||(y[9]=g("span",{class:"blur shadow"},null,-1))])]),g("div",_a,[g("button",{onClick:f,class:"cancel-button"},"Cancel"),g("button",{onClick:y[5]||(y[5]=D=>U()),class:ne(["save-button",{error:!u.value}]),disabled:!u.value},je(h.value),11,ya)])])]))}}),Re=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},ba=Re(va,[["__scopeId","data-v-000e74aa"]]),wa=De({__name:"HeaderModal",setup(e){const t=V(!1),s=()=>{t.value=!t.value},n="v3.1.15",r=V(!1),i=()=>{window.scrollY>50?r.value=!0:r.value=!1};return Ws(()=>{window.addEventListener("scroll",i)}),Qn(()=>{window.removeEventListener("scroll",i)}),(o,l)=>(F(),j(ve,null,[g("header",{class:ne({blur:r.value,shadow:r.value})},[g("div",{class:"header-cluster"},[g("div",{class:"logo-cluster"},[l[2]||(l[2]=g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[g("path",{d:"M21.4 7.5C22.2 8.3 22.2 9.6 21.4 10.3L18.6 13.1L10.8 5.3L13.6 2.5C14.4 1.7 15.7 1.7 16.4 2.5L18.2 4.3L21.2 1.3L22.6 2.7L19.6 5.7L21.4 7.5M15.6 13.3L14.2 11.9L11.4 14.7L9.3 12.6L12.1 9.8L10.7 8.4L7.9 11.2L6.4 9.8L3.6 12.6C2.8 13.4 2.8 14.7 3.6 15.4L5.4 17.2L1.4 21.2L2.8 22.6L6.8 18.6L8.6 20.4C9.4 21.2 10.7 21.2 11.4 20.4L14.2 17.6L12.8 16.2L15.6 13.3Z"})],-1)),g("div",{class:"logo-text"},[l[0]||(l[0]=g("h1",null,"EasyTransfer",-1)),g("span",null,je(n)),l[1]||(l[1]=g("p",null,"Share simply & stay anonymous.",-1))])]),g("div",{class:"link-cluster"},[g("button",{class:"link-item shadow",onClick:s},l[3]||(l[3]=[g("span",{class:"mdi mdi-cog"},null,-1),g("span",{class:"text"},"Settings",-1)])),l[4]||(l[4]=g("a",{href:"https://github.com/WCY-dt/EasyTransfer",class:"link-item shadow github"},[g("span",{class:"mdi mdi-github"}),g("span",{class:"text"},"Star on GitHub")],-1))])])],2),t.value?(F(),Gs(ba,{key:0,onClose:s})):pe("",!0)],64))}}),Ea=Re(wa,[["__scopeId","data-v-efe22c15"]]),Ze=Object.create(null);Ze.open="0";Ze.close="1";Ze.ping="2";Ze.pong="3";Ze.message="4";Ze.upgrade="5";Ze.noop="6";const bs=Object.create(null);Object.keys(Ze).forEach(e=>{bs[Ze[e]]=e});const Nn={type:"error",data:"parser error"},uo=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",fo=typeof ArrayBuffer=="function",ho=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,nr=({type:e,data:t},s,n)=>uo&&t instanceof Blob?s?n(t):Wr(t,n):fo&&(t instanceof ArrayBuffer||ho(t))?s?n(t):Wr(new Blob([t]),n):n(Ze[e]+(t||"")),Wr=(e,t)=>{const s=new FileReader;return s.onload=function(){const n=s.result.split(",")[1];t("b"+(n||""))},s.readAsDataURL(e)};function qr(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let mn;function Ta(e,t){if(uo&&e.data instanceof Blob)return e.data.arrayBuffer().then(qr).then(t);if(fo&&(e.data instanceof ArrayBuffer||ho(e.data)))return t(qr(e.data));nr(e,!1,s=>{mn||(mn=new TextEncoder),t(mn.encode(s))})}const Kr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,s=e.length,n,r=0,i,o,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),u=new Uint8Array(f);for(n=0;n>4,u[r++]=(o&15)<<4|l>>2,u[r++]=(l&3)<<6|c&63;return f},xa=typeof ArrayBuffer=="function",rr=(e,t)=>{if(typeof e!="string")return{type:"message",data:po(e,t)};const s=e.charAt(0);return s==="b"?{type:"message",data:Ra(e.substring(1),t)}:bs[s]?e.length>1?{type:bs[s],data:e.substring(1)}:{type:bs[s]}:Nn},Ra=(e,t)=>{if(xa){const s=Sa(e);return po(s,t)}else return{base64:!0,data:e}},po=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},mo="",Ca=(e,t)=>{const s=e.length,n=new Array(s);let r=0;e.forEach((i,o)=>{nr(i,!1,l=>{n[o]=l,++r===s&&t(n.join(mo))})})},Oa=(e,t)=>{const s=e.split(mo),n=[];for(let r=0;r{const n=s.length;let r;if(n<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,n);else if(n<65536){r=new Uint8Array(3);const i=new DataView(r.buffer);i.setUint8(0,126),i.setUint16(1,n)}else{r=new Uint8Array(9);const i=new DataView(r.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(r[0]|=128),t.enqueue(r),t.enqueue(s)})}})}let gn;function ps(e){return e.reduce((t,s)=>t+s.length,0)}function ms(e,t){if(e[0].length===t)return e.shift();const s=new Uint8Array(t);let n=0;for(let r=0;rMath.pow(2,21)-1){l.enqueue(Nn);break}r=u*Math.pow(2,32)+f.getUint32(4),n=3}else{if(ps(s)e){l.enqueue(Nn);break}}}})}const go=4;function de(e){if(e)return Na(e)}function Na(e){for(var t in de.prototype)e[t]=de.prototype[t];return e}de.prototype.on=de.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};de.prototype.once=function(e,t){function s(){this.off(e,s),t.apply(this,arguments)}return s.fn=t,this.on(e,s),this};de.prototype.off=de.prototype.removeListener=de.prototype.removeAllListeners=de.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+e];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,r=0;rPromise.resolve().then(t):(t,s)=>s(t,0),Me=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),ka="arraybuffer";function _o(e,...t){return t.reduce((s,n)=>(e.hasOwnProperty(n)&&(s[n]=e[n]),s),{})}const Pa=Me.setTimeout,La=Me.clearTimeout;function Zs(e,t){t.useNativeTimers?(e.setTimeoutFn=Pa.bind(Me),e.clearTimeoutFn=La.bind(Me)):(e.setTimeoutFn=Me.setTimeout.bind(Me),e.clearTimeoutFn=Me.clearTimeout.bind(Me))}const Da=1.33;function Ma(e){return typeof e=="string"?Ba(e):Math.ceil((e.byteLength||e.size)*Da)}function Ba(e){let t=0,s=0;for(let n=0,r=e.length;n=57344?s+=3:(n++,s+=4);return s}function yo(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Fa(e){let t="";for(let s in e)e.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return t}function Ua(e){let t={},s=e.split("&");for(let n=0,r=s.length;n{this.readyState="paused",t()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||s()})),this.writable||(n++,this.once("drain",function(){--n||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};Oa(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Ca(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=yo()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let vo=!1;try{vo=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Va=vo;function ja(){}class Wa extends $a{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let n=location.port;n||(n=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,s){const n=this.request({method:"POST",data:t});n.on("success",s),n.on("error",(r,i)=>{this.onError("xhr post error",r,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,n)=>{this.onError("xhr poll error",s,n)}),this.pollXhr=t}}class Je extends de{constructor(t,s,n){super(),this.createRequest=t,Zs(this,n),this._opts=n,this._method=n.method||"GET",this._uri=s,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;const s=_o(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(s);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this._opts.extraHeaders[r])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var r;n.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document<"u"&&(this._index=Je.requestsCount++,Je.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=ja,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Je.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Je.requestsCount=0;Je.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Gr);else if(typeof addEventListener=="function"){const e="onpagehide"in Me?"pagehide":"unload";addEventListener(e,Gr,!1)}}function Gr(){for(let e in Je.requests)Je.requests.hasOwnProperty(e)&&Je.requests[e].abort()}const qa=function(){const e=bo({xdomain:!1});return e&&e.responseType!==null}();class Ka extends Wa{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=qa&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Je(bo,this.uri(),t)}}function bo(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Va))return new XMLHttpRequest}catch{}if(!t)try{return new Me[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const wo=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ga extends ir{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,n=wo?{}:_o(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,n)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s{try{this.doWrite(n,i)}catch{}r&&Qs(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=yo()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const _n=Me.WebSocket||Me.MozWebSocket;class za extends Ga{createSocket(t,s,n){return wo?new _n(t,s,n):s?new _n(t,s):new _n(t)}doWrite(t,s){this.ws.send(s)}}class Ya extends ir{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=Ia(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(s).getReader(),r=Aa();r.readable.pipeTo(t.writable),this._writer=r.writable.getWriter();const i=()=>{n.read().then(({done:l,value:c})=>{l||(this.onPacket(c),i())}).catch(l=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s{r&&Qs(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Ja={websocket:za,webtransport:Ya,polling:Ka},Xa=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Qa=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function kn(e){if(e.length>8e3)throw"URI too long";const t=e,s=e.indexOf("["),n=e.indexOf("]");s!=-1&&n!=-1&&(e=e.substring(0,s)+e.substring(s,n).replace(/:/g,";")+e.substring(n,e.length));let r=Xa.exec(e||""),i={},o=14;for(;o--;)i[Qa[o]]=r[o]||"";return s!=-1&&n!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Za(i,i.path),i.queryKey=eu(i,i.query),i}function Za(e,t){const s=/\/{2,9}/g,n=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function eu(e,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,r,i){r&&(s[r]=i)}),s}const Pn=typeof addEventListener=="function"&&typeof removeEventListener=="function",ws=[];Pn&&addEventListener("offline",()=>{ws.forEach(e=>e())},!1);class dt extends de{constructor(t,s){if(super(),this.binaryType=ka,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const n=kn(t);s.hostname=n.host,s.secure=n.protocol==="https"||n.protocol==="wss",s.port=n.port,n.query&&(s.query=n.query)}else s.host&&(s.hostname=kn(s.host).host);Zs(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(n=>{const r=n.prototype.name;this.transports.push(r),this._transportsByName[r]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ua(this.opts.query)),Pn&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ws.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=go,s.transport=t,this.id&&(s.sid=this.id);const n=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&dt.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",dt.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let n=0;n0&&s>this._maxPayload)return this.writeBuffer.slice(0,n);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Qs(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,n){return this._sendPacket("message",t,s,n),this}send(t,s,n){return this._sendPacket("message",t,s,n),this}_sendPacket(t,s,n,r){if(typeof s=="function"&&(r=s,s=void 0),typeof n=="function"&&(r=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const i={type:t,data:s,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},n=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(dt.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Pn&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=ws.indexOf(this._offlineEventListener);n!==-1&&ws.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}dt.protocol=go;class tu extends dt{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{n||(s.send([{type:"ping",data:"probe"}]),s.once("packet",h=>{if(!n)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;dt.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(u(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=s.name,this.emitReserved("upgradeError",m)}}))};function i(){n||(n=!0,u(),s.close(),s=null)}const o=h=>{const m=new Error("probe error: "+h);m.transport=s.name,i(),this.emitReserved("upgradeError",m)};function l(){o("transport closed")}function c(){o("socket closed")}function f(h){s&&h.name!==s.name&&i()}const u=()=>{s.removeListener("open",r),s.removeListener("error",o),s.removeListener("close",l),this.off("close",c),this.off("upgrading",f)};s.once("open",r),s.once("error",o),s.once("close",l),this.once("close",c),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let n=0;nJa[r]).filter(r=>!!r)),super(t,n)}};function nu(e,t="",s){let n=e;s=s||typeof location<"u"&&location,e==null&&(e=s.protocol+"//"+s.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=s.protocol+e:e=s.host+e),/^(https?|wss?):\/\//.test(e)||(typeof s<"u"?e=s.protocol+"//"+e:e="https://"+e),n=kn(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+t,n.href=n.protocol+"://"+i+(s&&s.port===n.port?"":":"+n.port),n}const ru=typeof ArrayBuffer=="function",iu=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Eo=Object.prototype.toString,ou=typeof Blob=="function"||typeof Blob<"u"&&Eo.call(Blob)==="[object BlobConstructor]",lu=typeof File=="function"||typeof File<"u"&&Eo.call(File)==="[object FileConstructor]";function or(e){return ru&&(e instanceof ArrayBuffer||iu(e))||ou&&e instanceof Blob||lu&&e instanceof File}function Es(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let s=0,n=e.length;s=0&&e.num{delete this.acks[t];for(let l=0;l{this.io.clearTimeoutFn(i),s.apply(this,l)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...s){return new Promise((n,r)=>{const i=(o,l)=>o?r(o):n(l);i.withError=!0,s.push(i),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((r,...i)=>n!==this._queue[0]?void 0:(r!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(r)):(this._queue.shift(),s&&s(null,...i)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:J.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(n=>String(n.id)===t)){const n=this.acks[t];delete this.acks[t],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case J.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case J.EVENT:case J.BINARY_EVENT:this.onevent(t);break;case J.ACK:case J.BINARY_ACK:this.onack(t);break;case J.DISCONNECT:this.ondisconnect();break;case J.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const n of s)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let n=!1;return function(...r){n||(n=!0,s.packet({type:J.ACK,id:t,data:r}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:J.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let n=0;n0&&e.jitter<=1?e.jitter:0,this.attempts=0}Lt.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+s:e-s}return Math.min(e,this.max)|0};Lt.prototype.reset=function(){this.attempts=0};Lt.prototype.setMin=function(e){this.ms=e};Lt.prototype.setMax=function(e){this.max=e};Lt.prototype.setJitter=function(e){this.jitter=e};class Mn extends de{constructor(t,s){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Zs(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((n=s.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Lt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const r=s.parser||pu;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new su(this.uri,this.opts);const s=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Ve(s,"open",function(){n.onopen(),t&&t()}),i=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},o=Ve(s,"error",i);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{r(),i(new Error("timeout")),s.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Ve(t,"ping",this.onping.bind(this)),Ve(t,"data",this.ondata.bind(this)),Ve(t,"error",this.onerror.bind(this)),Ve(t,"close",this.onclose.bind(this)),Ve(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){Qs(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new To(this,t,s),this.nsps[t]=n),n}_destroy(t){const s=Object.keys(this.nsps);for(const n of s)if(this.nsps[n].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let n=0;nt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},s);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const jt={};function Ts(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const s=nu(e,t.path||"/socket.io"),n=s.source,r=s.id,i=s.path,o=jt[r]&&i in jt[r].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let c;return l?c=new Mn(n,t):(jt[r]||(jt[r]=new Mn(n,t)),c=jt[r]),s.query&&!t.query&&(t.query=s.queryKey),c.socket(s.path,t)}Object.assign(Ts,{Manager:Mn,Socket:To,io:Ts,connect:Ts});var gu={VITE_SIGNAL_SERVER_URL:"https://easy-transfer.glitch.me/",GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_f8946b43-a535-4a6e-ba83-6c51dd77b581",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.9.2 node/v23.7.0 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_f8946b43-a535-4a6e-ba83-6c51dd77b581",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/23.7.0/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",OLDPWD:"/home/runner/work/EasyTransfer/EasyTransfer",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/EasyTransfer/EasyTransfer/client/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"WCY-dt",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"55525165",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/EasyTransfer/EasyTransfer/client",SYSTEMD_EXEC_PID:"837",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250126.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.11/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.5/x64",JOURNAL_STREAM:"8:6717",GITHUB_WORKFLOW:"Deploy Client",_:"/opt/hostedtoolcache/node/23.7.0/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/23.7.0/x64",npm_config_npm_version:"10.9.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13097640481",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"557e91557bb9c39a50177b27d3e79abad2f7656d",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"WCY-dt/EasyTransfer/.github/workflows/deploy.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/23.7.0/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/EasyTransfer/EasyTransfer/client/node_modules/.bin:/home/runner/work/EasyTransfer/EasyTransfer/node_modules/.bin:/home/runner/work/EasyTransfer/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/23.7.0/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/23.7.0/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_c9fb982b-7eaf-489f-8939-356b56f63cdc",INVOCATION_ID:"a166deb558674f88a0c6e756519e4f66",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/23.7.0/x64/bin/node",npm_package_name:"client",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"134",GITHUB_TRIGGERING_ACTOR:"WCY-dt",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 2",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"WCY-dt/EasyTransfer",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"816812807",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"3.1.15",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",GITHUB_WORKSPACE:"/home/runner/work/EasyTransfer/EasyTransfer",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"557e91557bb9c39a50177b27d3e79abad2f7656d",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"WCY-dt",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/23.7.0/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_f8946b43-a535-4a6e-ba83-6c51dd77b581",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/EasyTransfer/EasyTransfer/client",GITHUB_ACTOR_ID:"55525165",RUNNER_WORKSPACE:"/home/runner/work/EasyTransfer",npm_execpath:"/opt/hostedtoolcache/node/23.7.0/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_f8946b43-a535-4a6e-ba83-6c51dd77b581",npm_config_global_prefix:"/opt/hostedtoolcache/node/23.7.0/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_f8946b43-a535-4a6e-ba83-6c51dd77b581",INIT_CWD:"/home/runner/work/EasyTransfer/EasyTransfer/client",EDITOR:"vi",NODE_ENV:"production"};const xt=Xs("connect",()=>{const e=cs(),{maxConnectionNumber:t,iceServers:s}=Ue(e),n=gu.VITE_SIGNAL_SERVER_URL;let r=null;const i=V(null),o=V(!1),l=V("LOADING"),c=V("");let f=[];const u=V(!1),h=V([]),m=1024*16,T=10,x=V(!1);function A(){h.value=[];const S={iceServers:s.value};r=Ts(n),i.value=new RTCPeerConnection(S),K(),D()}async function L(){r==null||r.emit("register",t.value)}function U(){var S;x.value=!0,(S=i.value)==null||S.createOffer().then(N=>{var b;return(b=i.value)==null?void 0:b.setLocalDescription(N)}).then(()=>{var N;r==null||r.emit("offer",(N=i.value)==null?void 0:N.localDescription,l.value,c.value)}),Y()}function Y(){i.value.onicecandidate=S=>{S.candidate&&(r==null||r.emit("candidate",S.candidate,c.value))}}function K(){r==null||r.on("success",S=>{l.value=S,o.value=!0}),r==null||r.on("disconnect",()=>{o.value=!1,window.location.reload()}),r==null||r.on("offer",(S,N,b)=>{var P;c.value=N,t.value=b,x.value=!0,(P=i.value)==null||P.setRemoteDescription(new RTCSessionDescription(S)).then(()=>{var W;return(W=i.value)==null?void 0:W.createAnswer()}).then(W=>{var ce;return(ce=i.value)==null?void 0:ce.setLocalDescription(W)}).then(()=>{var W;r==null||r.emit("answer",(W=i.value)==null?void 0:W.localDescription,l.value,c.value)}).then(()=>{y()}),Y()}),r==null||r.on("answer",(S,N)=>{var b;c.value===N?(b=i.value)==null||b.setRemoteDescription(new RTCSessionDescription(S)).then(()=>{y()}):console.error(`[ERROR] Received answer from unexpected id: ${N}`)}),r==null||r.on("candidate",S=>{var N;(N=i.value)!=null&&N.remoteDescription?i.value.addIceCandidate(new RTCIceCandidate(S)):f.push(S)})}function y(){var S;for(;f.length;)(S=i.value)==null||S.addIceCandidate(new RTCIceCandidate(f.shift()))}function D(){var S;for(let N=0;N{x.value=!1,u.value=!0},b.onerror=P=>{console.error(`[ERR] Data channel error: ${P}`),x.value=!1,u.value=!1},b.onclose=()=>{x.value=!1,u.value=!1},h.value.push(b))}}function Ee(){return h.value.map(N=>N.readyState).every(N=>N==="open")?"open":"pending"}let le=s.value,G=t.value;return be([s,t],async()=>{i.value&&(s.value!==le||t.value!==G)&&(console.warn("[INFO] ===Reconnecting==="),await Promise.all(h.value.map(S=>S.close())),i.value.close(),r==null||r.disconnect(),window.location.reload(),le=s.value,G=t.value)}),{peerConnection:i,isConnectSuccess:u,registered:o,clientId:l,targetId:c,sendChannels:h,maxBufferedAmount:m,isConnecting:x,initializeConnection:A,registerClient:L,connectTarget:U,getSendChannelState:Ee}});async function _u(e){const t={iceServers:e},s=new RTCPeerConnection(t);return new Promise(n=>{s.onicecandidate=r=>{r.candidate&&r.candidate.candidate.includes("typ relay")&&(n(!0),s.close())},s.onicegatheringstatechange=()=>{s.iceGatheringState==="complete"&&(n(!1),s.close())},s.createDataChannel(""),s.createOffer().then(r=>s.setLocalDescription(r)).catch(()=>{n(!1),s.close()})})}const yu={class:"id-cluster"},vu={class:"cover blur"},bu={key:0,class:"mdi mdi-check-bold"},wu={key:1,class:"mdi mdi-content-copy"},Eu=["disabled"],Tu={key:0,class:"mdi mdi-dots-horizontal"},Su={key:1,class:"mdi mdi-connection"},xu={class:"isTurnServerAvailable"},Ru={class:"notice"},Cu=De({__name:"OperationId",setup(e){const t=xt();t.initializeConnection();const s=cs(),{isConnectSuccess:n,registered:r,clientId:i,targetId:o,isConnecting:l}=Ue(t),{iceServers:c}=Ue(s),f=V(!1),u=V(!1),h=Ys(()=>({disabled:!f.value&&!n.value||!r.value,ready:f.value&&!n.value&&r.value,success:!f.value&&n.value&&r.value})),m=V(!1);be(o,L=>{L!==L.toUpperCase()&&(o.value=L.toUpperCase()),T(L)}),be(n,L=>{L&&(f.value=!1)});function T(L){f.value=L.length===4,n.value=!1}function x(){r.value&&(navigator.clipboard.writeText(i.value),u.value=!0,setTimeout(()=>{u.value=!1},1e3))}function A(){o.value=o.value.toUpperCase(),t.connectTarget()}return Ws(async()=>{await t.registerClient(),m.value=await _u(c.value)}),(L,U)=>(F(),j("div",yu,[g("div",{class:ne(["clientId-cluster",H(i)==="LOADING"?"disabled":"ready"]),onClick:x},[tr(je(H(i))+" ",1),g("div",vu,[u.value?(F(),j("span",bu)):(F(),j("span",wu))])],2),g("div",{class:ne(["targetId-cluster shadow",h.value])},[U[1]||(U[1]=g("span",{class:"input-hint shadow"},"Enter the peer's code",-1)),Be(g("input",{type:"text",id:"targetIdInput",class:"targetId-input blur",placeholder:"code",maxlength:"4","onUpdate:modelValue":U[0]||(U[0]=Y=>ae(o)?o.value=Y:null)},null,512),[[Ps,H(o)]]),g("button",{id:"connectButton",class:"connect-button",disabled:!f.value||!H(r),onClick:A,"aria-label":"Connect"},[H(l)?(F(),j("span",Tu)):(F(),j("span",Su))],8,Eu)],2),g("div",xu,[g("span",{class:ne(["dot",{green:m.value,red:!m.value}])},null,2),g("span",Ru,je(m.value?"Turn server is available":"Turn server is not available"),1)])]))}}),Ou=Re(Cu,[["__scopeId","data-v-b8d6ef63"]]),en=Xs("send",()=>{const e=xt(),{sendChannels:t}=Ue(e),s=V([]);function n(b,P,W,ce,et){s.value.push({url:b,name:P,size:W,progress:ce,type:et}),s.value=[...s.value]}async function r(b,P){s.value[b].progress=P,s.value=[...s.value]}async function i(b,P){s.value[b].url=P,s.value=[...s.value]}async function o(b,P){s.value[b].success=P,s.value=[...s.value]}let l=-1,c=[];for(let b=0;b{await u()};async function f(b,P=!1){c.push(b),await u(P)}async function u(b){let P=null;if(b)P=t.value[0];else{const W=Math.floor(Math.random()*t.value.length);P=t.value[W]}for(;c.length>0&&P.bufferedAmount<=e.maxBufferedAmount;){let W=c.shift();!(W instanceof ArrayBuffer)&&!ArrayBuffer.isView(W)&&(W=new TextEncoder().encode(W)),P.send(new Uint8Array(W))}}let h="";const m=V("Drop file here or click to upload"),T=V(0),x=16384;let A=null;const L=V(0);async function U(b,P){const W=b.length;if(W===0){console.error("[ERR] No file selected");return}for(let ce=0;cenew Promise((ue,z)=>{const Z=new FileReader;Z.onload=async Ce=>{var Oe,Dt,as;const lt=new Uint8Array(2);lt[0]=(et&65280)>>8,lt[1]=et&255;const He=new Uint8Array(((Oe=Ce.target)==null?void 0:Oe.result).byteLength+2);He.set(lt,0),He.set(new Uint8Array((Dt=Ce.target)==null?void 0:Dt.result),2),await f(He),L.value=L.value+((as=Ce.target)==null?void 0:as.result).byteLength,L.value{z(Ce)},Z.readAsArrayBuffer(ce)}));await Promise.all(W)}async function Ee(){A=new FileReader,A.addEventListener("error",b=>{console.error(`[ERR] Error reading file: ${b}`)}),A.addEventListener("abort",b=>{console.log(`[INFO] File reading aborted: ${b}`)})}function le(b){return b===0?(console.error("[ERR] File is empty"),!1):e.getSendChannelState()!=="open"?(console.error("[ERR] Data channel is not open"),!1):!0}async function G(b){await S(b)}async function S(b){N(b)&&(await f("CONTENT_METAtTRANSFER_TYPE_TEXT",!0),await f("CONTENT_METAn"+b,!0),await f("CONTENT_METAs"+b.length,!0),n("javascript:void(0)",b,b.length,b.length,"TRANSFER_TYPE_TEXT"),l++,o(l,!0))}function N(b){return b===""?(console.error("[ERR] Text is empty"),!1):e.getSendChannelState()!=="open"?(console.error("[ERR] Data channel is not open"),!1):!0}return{uploadFileItems:s,sendFiles:U,sendText:G,processQueue:u}}),Au=["disabled"],Iu=["disabled"],Nu={key:0,class:"upload-text-title"},ku={key:1,class:"upload-text-title"},Pu=De({__name:"UploadText",setup(e){const t=xt(),{isConnectSuccess:s}=Ue(t),n=en(),r=V(""),i=V(!1);function o(){s.value&&(n.sendText(r.value),i.value=!0,setTimeout(()=>{i.value=!1,r.value=""},1e3))}return(l,c)=>(F(),j("div",{id:"text",class:ne(["upload-text-cluster",{disabled:!H(s),active:H(s)}])},[Be(g("textarea",{id:"textInput",class:"text-input blur",placeholder:"Send a short message...",disabled:!H(s),"onUpdate:modelValue":c[0]||(c[0]=f=>r.value=f),ref:"textInput.value"},null,8,Au),[[Ps,r.value]]),g("button",{id:"sendButton",class:"send-button",disabled:!H(s),onClick:o},[g("span",{class:ne(["mdi",{"mdi-send":!i.value,"mdi-check-bold":i.value}])},null,2),i.value?(F(),j("p",ku,"Succeed")):(F(),j("p",Nu,"Send Message"))],8,Iu)],2))}}),Lu=Re(Pu,[["__scopeId","data-v-c9d5339b"]]),Du=["disabled"],Mu=De({__name:"UploadFile",setup(e){const t=xt(),{isConnectSuccess:s}=Ue(t),n=en(),r=V(null);async function i(){r.value&&r.value.files&&await n.sendFiles(Array.from(r.value.files),"TRANSFER_TYPE_FILE")}async function o(c){var f;s.value&&(c.preventDefault(),r.value&&(r.value.files=((f=c.dataTransfer)==null?void 0:f.files)??null,await i()))}function l(){s.value&&r.value&&r.value.click()}return(c,f)=>(F(),j("div",{id:"dropzone",class:ne(["upload-file-cluster",{disabled:!H(s),active:H(s)}]),onDragover:f[0]||(f[0]=io(()=>{},["prevent"])),onDrop:o,onClick:l},[g("input",{type:"file",id:"fileInput",class:"file-input",title:"Choose a file to send",multiple:"",onChange:i,ref_key:"fileInput",ref:r,disabled:!H(s)},null,40,Du),f[1]||(f[1]=g("span",{class:"mdi mdi-file-upload"},null,-1)),f[2]||(f[2]=g("p",{class:"file-input-title"},"File",-1))],34))}}),Bu=Re(Mu,[["__scopeId","data-v-acede28d"]]),Fu={id:"cameradisplay",class:"camera-display-cluster"},Uu=De({__name:"UploadPhoto",setup(e){const t=xt(),{isConnectSuccess:s}=Ue(t),n=en(),r=V(!1),i=V(!1),o=V(!1),l=V(null),c=V(null);function f(){s.value&&navigator.mediaDevices.getUserMedia({audio:!1,video:{facingMode:"environment"}}).then(x=>{window.stream=x,l.value&&(l.value.srcObject=x),i.value=!0,o.value=!0}).catch(x=>{console.error(`[ERR] GetUserMedia error: ${x}`),i.value=!1,o.value=!1,alert("Please allow camera access to use this feature")})}function u(){var x;if(c.value&&l.value){c.value.width=l.value.videoWidth,c.value.height=l.value.videoHeight;const A=c.value.getContext("2d");A&&A.drawImage(l.value,0,0,c.value.width,c.value.height),(x=window.stream)==null||x.getTracks().forEach(L=>L.stop()),o.value=!1}}function h(){var x;(x=window.stream)==null||x.getTracks().forEach(A=>A.stop()),i.value=!1,o.value=!1}async function m(){c.value&&c.value.toBlob(async function(x){if(x){const A=new Date().getTime(),L=new File([x],`image_${A}.png`,{type:"image/png"});await n.sendFiles([L],"TRANSFER_TYPE_FILE")}},"image/png")}async function T(){s.value&&(await m(),r.value=!0,setTimeout(()=>{r.value=!1,h()},1e3))}return(x,A)=>(F(),j(ve,null,[Be(g("div",Fu,[g("button",{class:"close-button mdi mdi-close",onClick:h}),Be(g("video",{class:"stream-display",ref_key:"stream",ref:l,autoplay:"",playsinline:""},null,512),[[$t,o.value]]),Be(g("button",{class:"snapshot-button mdi mdi-camera",onClick:u},null,512),[[$t,o.value]]),Be(g("canvas",{class:"photo-display",ref_key:"photo",ref:c},null,512),[[$t,!o.value]]),Be(g("button",{class:ne(["send-button mdi",{"mdi-send":!r.value,"mdi-check-bold":r.value}]),onClick:T},null,2),[[$t,!o.value]])],512),[[$t,i.value]]),g("div",{id:"camera",class:ne(["upload-photo-cluster",{disabled:!H(s),active:H(s)}]),onClick:f},A[0]||(A[0]=[g("span",{class:"mdi mdi-camera"},null,-1),g("p",{class:"upload-photo-title"},"Photo",-1)]),2)],64))}}),Hu=Re(Uu,[["__scopeId","data-v-a386c348"]]),$u={id:"upload",class:"upload-cluster"},Vu=De({__name:"UploadModal",setup(e){return(t,s)=>(F(),j("div",$u,[fe(Bu),fe(Hu),fe(Lu)]))}}),ju=Re(Vu,[["__scopeId","data-v-ce8de059"]]),Wu={class:"operation-cluster"},qu=De({__name:"OperationModal",setup(e){return(t,s)=>(F(),j("div",Wu,[fe(Ou),fe(ju)]))}}),Ku=Re(qu,[["__scopeId","data-v-b3ad3813"]]);function Ls(e){return!!Gu.test(e)}function So(e){return Co.some(t=>e.toLowerCase().endsWith(t))}function xo(e){return Oo.some(t=>e.toLowerCase().endsWith(t))}function Ro(e){const t=e.toLowerCase();for(const[s,n]of Object.entries(zu))if(n.some(r=>t.endsWith(r)))return s;return"mdi-file-document"}const Gu=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),Co=[".png",".jpg",".jpeg",".gif",".bmp",".webp",".svg",".ico",".tiff",".tif",".heic",".raw"],Oo=[".mp4",".mkv",".avi",".mov",".wmv",".flv",".webm",".mpeg",".mpg",".m4v",".3gp",".3g2"],zu={"mdi-file-image":Co,"mdi-file-word":[".doc",".docx",".odt",".rtf",".txt",".wps",".wpd"],"mdi-file-table":[".xls",".xlsx",".ods",".csv",".tsv",".xlsm",".xlsb"],"mdi-file-powerpoint":[".ppt",".pptx",".odp",".pps",".ppsx",".pot",".potx"],"mdi-file-music":[".mp3",".wav",".flac",".ogg",".aac",".wma",".m4a",".aiff",".alac"],"mdi-file-video":Oo,"mdi-file-code":[".html",".css",".js",".ts",".jsx",".tsx",".json",".xml",".yaml",".yml",".md",".markdown",".cpp",".c",".h",".hpp",".java",".py",".rb",".php",".sql",".sh",".bat",".ps1",".psm1",".psd1",".ps1xml",".pssc",".psc1",".pssc",".pl",".perl",".go",".rs",".swift",".kt",".kts",".clj",".cljs",".scala",".groovy",".gradle",".dockerfile",".properties",".ini",".cfg",".conf",".toml",".yaml",".yml",".json",".xml",".csv",".tsv",".log",".r",".sas",".stata",".do",".m",".mat",".rmd",".ipynb"],"mdi-folder-zip":[".zip",".rar",".7z",".tar",".gz",".bz2",".xz",".lz",".lzma",".lzo",".zst",".z",".tar.gz",".tgz",".tar.bz2",".tbz2",".tar.xz",".txz",".tar.lz",".tlz",".tar.lzma",".tar.lzo",".tar.zst",".tzst"],"mdi-file-cad":[".dwg",".dxf",".dgn",".stl",".obj",".fbx",".3ds",".skp",".step",".stp",".igs",".iges",".x_t",".x_b",".sat",".sab",".3dm",".prt",".asm",".xas",".xpr"],"mdi-file-key":[".key",".pem",".pub",".asc",".gpg",".pgp",".p12",".pfx",".cer",".crt",".der",".keychain",".jks",".keystore",".bks",".pkcs12",".p7b",".p7c",".p7r",".p7s",".p8"]},Yu=["href","download"],Ju={class:"upload-item-detail"},Xu={class:"upload-item-name"},Qu=["value","max"],Zu=["src"],ef=["src","controls"],tf={class:"upload-item-detail"},sf={class:"upload-item-content"},nf={key:0,class:"mdi mdi-check-bold"},rf={key:1,class:"mdi mdi-content-copy"},of=["href"],lf={class:"upload-item-detail"},cf={class:"upload-item-content"},af=De({__name:"SendItem",props:{url:{default:"javascript:void(0)"},name:{default:"No file to upload"},size:{default:1},progress:{default:0},type:{default:"TRANSFER_TYPE_FILE"},success:{type:Boolean,default:!1}},setup(e){const t=e,s=cs(),{autoDisplayImage:n,directlyOpenLink:r}=Ue(s),i=V(!1);function o(){navigator.clipboard.writeText(t.name),i.value=!0,setTimeout(()=>{i.value=!1},1e3)}const l=window.matchMedia("(hover: hover)").matches;return(c,f)=>(F(),j(ve,null,[t.type==="TRANSFER_TYPE_FILE"?(F(),j("a",{key:0,ref:"uploadLink",href:t.url,class:ne(["upload-item file shadow",{success:t.success,loading:!t.success}]),download:t.name},[g("span",{class:ne(["mdi",H(Ro)(t.name)])},null,2),g("div",Ju,[g("p",Xu,je(t.name),1),g("progress",{class:"upload-item-progress",value:t.progress,max:t.size},null,8,Qu),H(So)(t.name)&&t.success&&H(n)?(F(),j("img",{key:0,class:"upload-item-content",src:t.url,alt:"Photo"},null,8,Zu)):pe("",!0),H(xo)(t.name)&&t.success?(F(),j("video",{key:1,class:"download-item-content",src:t.url,controls:!H(l),muted:"",autoplay:"",loop:""},null,8,ef)):pe("",!0)]),t.success?(F(),j("div",{key:0,class:ne({"copy-cover blur":H(l),"none-hover":!H(l)})},f[0]||(f[0]=[g("span",{class:"mdi mdi-download"},null,-1)]),2)):pe("",!0)],10,Yu)):pe("",!0),t.type==="TRANSFER_TYPE_TEXT"&&(!H(Ls)(t.name)||!H(r))?(F(),j("div",{key:1,class:ne(["upload-item text shadow",{success:t.success,loading:!t.success}]),onClick:o},[f[1]||(f[1]=g("span",{class:"mdi mdi-message-text"},null,-1)),g("div",tf,[g("p",sf,je(t.name),1)]),t.success?(F(),j("div",{key:0,class:ne({"copy-cover blur":H(l),"none-hover":!H(l)})},[i.value?(F(),j("span",nf)):(F(),j("span",rf))],2)):pe("",!0)],2)):pe("",!0),t.type==="TRANSFER_TYPE_TEXT"&&H(Ls)(t.name)&&H(r)?(F(),j("a",{key:2,class:ne(["upload-item text shadow",{success:t.success,loading:!t.success}]),onClick:o,href:t.name,target:"_blank",rel:"noopener noreferrer"},[f[3]||(f[3]=g("span",{class:"mdi mdi-link-variant"},null,-1)),g("div",lf,[g("p",cf,je(t.name),1)]),t.success?(F(),j("div",{key:0,class:ne({"copy-cover blur":H(l),"none-hover":!H(l)})},f[2]||(f[2]=[g("span",{class:"mdi mdi-open-in-new"},null,-1)]),2)):pe("",!0)],10,of)):pe("",!0)],64))}}),uf=Re(af,[["__scopeId","data-v-22560d61"]]),ff={class:"upload-cluster"},df={key:0,class:"noting-to-upload-text"},hf=De({__name:"SendModal",setup(e){const t=en(),s=V([]);return be(()=>t.uploadFileItems,n=>{s.value=n},{deep:!0}),(n,r)=>(F(),j("div",ff,[r[0]||(r[0]=g("div",{class:"upload-cluster-title"},[g("span",{class:"mdi mdi-upload-network"}),g("p",{class:"upload-cluster-title-text"},"Upload")],-1)),s.value.length===0?(F(),j("p",df," Nothing to upload ")):pe("",!0),(F(!0),j(ve,null,Pi(s.value,(i,o)=>(F(),Gs(uf,{key:o,url:i.url,name:i.name,size:i.size,progress:i.progress,success:i.success,type:i.type},null,8,["url","name","size","progress","success","type"]))),128))]))}}),pf=Re(hf,[["__scopeId","data-v-b5e41870"]]),mf=Xs("receive",()=>{const e=xt(),{peerConnection:t}=Ue(e),s=V([]);function n(S,N,b,P,W){s.value.push({url:S,name:N,size:b,progress:P,type:W}),s.value=[...s.value]}function r(S,N){s.value[S].progress=N,s.value=[...s.value]}function i(S,N){s.value[S].url=N,s.value=[...s.value]}function o(S,N){s.value[S].success=N,s.value=[...s.value]}let l=[],c=[],f="",u="",h=0,m=0,T="",x=[],A=[],L=[],U=-1;function Y(){if(!t.value){console.error("[ERR] Peer connection not ready");return}t.value.ondatachannel=S=>{G();const N=S.channel;N.onopen=()=>{},N.onerror=b=>{console.error(`[ERR] Receive channel error: ${b}`)},N.onclose=()=>{window.location.reload()},N.onmessage=b=>{D(b)}}}const K="CONTENT_META",y=new TextEncoder().encode(K);async function D(S){const N=new DataView(S.data);let b=!0;for(let P=0;P0&&(f=x.shift(),u=A.shift(),h=L.shift(),U++,console.log(`[INFO] ===Receiving file ${f} | ${u} | ${h}===`));const b=new DataView(S).getUint16(0,!1),P=S.slice(2);l[b]||(m+=P.byteLength),l[b]=P,r(U,m),m===h&&(c=l,T=URL.createObjectURL(new Blob(c)),u.endsWith(".svg")&&(T=URL.createObjectURL(new Blob(c,{type:"image/svg+xml"}))),i(U,T),o(U,!0),G())}function G(){l=[],c=[],f="",u="",h=0,m=0,T=""}return{downloadFileItems:s,receiveFiles:Y}}),gf=["href","download"],_f={class:"download-item-detail"},yf={class:"download-item-name"},vf=["value","max"],bf=["src"],wf=["src","controls"],Ef={class:"download-item-detail"},Tf={class:"download-item-content"},Sf={key:0,class:"mdi mdi-check-bold"},xf={key:1,class:"mdi mdi-content-copy"},Rf=["href"],Cf={class:"download-item-detail"},Of={class:"download-item-content"},Af=De({__name:"ReceiveItem",props:{url:{default:"javascript:void(0)"},name:{default:"No file to download"},size:{default:1},progress:{default:0},type:{default:"TRANSFER_TYPE_FILE"},success:{type:Boolean,default:!1}},setup(e){const t=e,s=cs(),{autoDisplayImage:n,directlyOpenLink:r,autoDownload:i}=Ue(s),o=V(!1);function l(){navigator.clipboard.writeText(t.name),o.value=!0,setTimeout(()=>{o.value=!1},1e3)}const c=window.matchMedia("(hover: hover)").matches,f=V(null);return be(()=>t.success,u=>{u&&i.value&&t.type==="TRANSFER_TYPE_FILE"&&setTimeout(()=>{f.value.click()},1e3)}),(u,h)=>(F(),j(ve,null,[t.type==="TRANSFER_TYPE_FILE"?(F(),j("a",{key:0,ref_key:"downloadLink",ref:f,href:t.url,class:ne(["download-item file shadow",{success:t.success,loading:!t.success}]),download:t.name},[g("span",{class:ne(["mdi",H(Ro)(t.name)])},null,2),g("div",_f,[g("p",yf,je(t.name),1),g("progress",{class:"download-item-progress",value:t.progress,max:t.size},null,8,vf),H(So)(t.name)&&t.success&&H(n)?(F(),j("img",{key:0,class:"download-item-content",src:t.url,alt:"Photo"},null,8,bf)):pe("",!0),H(xo)(t.name)&&t.success&&H(n)?(F(),j("video",{key:1,class:"download-item-content",src:t.url,controls:!H(c),muted:"",autoplay:"",loop:""},null,8,wf)):pe("",!0)]),t.success?(F(),j("div",{key:0,class:ne({"copy-cover blur":H(c),"none-hover":!H(c)})},h[0]||(h[0]=[g("span",{class:"mdi mdi-download"},null,-1)]),2)):pe("",!0)],10,gf)):pe("",!0),t.type==="TRANSFER_TYPE_TEXT"&&(!H(Ls)(t.name)||!H(r))?(F(),j("div",{key:1,class:ne(["download-item text shadow",{success:t.success,loading:!t.success}]),onClick:l},[h[1]||(h[1]=g("span",{class:"mdi mdi-message-text"},null,-1)),g("div",Ef,[g("p",Tf,je(t.name),1)]),t.success?(F(),j("div",{key:0,class:ne({"copy-cover blur":H(c),"none-hover":!H(c)})},[o.value?(F(),j("span",Sf)):(F(),j("span",xf))],2)):pe("",!0)],2)):pe("",!0),t.type==="TRANSFER_TYPE_TEXT"&&H(Ls)(t.name)&&H(r)?(F(),j("a",{key:2,class:ne(["download-item text shadow",{success:t.success,loading:!t.success}]),onClick:l,href:t.name,target:"_blank",rel:"noopener noreferrer"},[h[3]||(h[3]=g("span",{class:"mdi mdi-link-variant"},null,-1)),g("div",Cf,[g("p",Of,je(t.name),1)]),t.success?(F(),j("div",{key:0,class:ne({"copy-cover blur":H(c),"none-hover":!H(c)})},h[2]||(h[2]=[g("span",{class:"mdi mdi-open-in-new"},null,-1)]),2)):pe("",!0)],10,Rf)):pe("",!0)],64))}}),If=Re(Af,[["__scopeId","data-v-02e252d6"]]),Nf={class:"download-cluster"},kf={key:0,class:"noting-to-download-text"},Pf=De({__name:"ReceiveModal",setup(e){const t=xt(),s=mf(),{isConnectSuccess:n}=Ue(t),r=V([]);return be(n,i=>{i&&s.receiveFiles()}),be(()=>s.downloadFileItems,i=>{r.value=i},{deep:!0}),(i,o)=>(F(),j("div",Nf,[o[0]||(o[0]=g("div",{class:"download-cluster-title"},[g("span",{class:"mdi mdi-download-network"}),g("p",{class:"download-cluster-title-text"},"Download")],-1)),r.value.length===0?(F(),j("p",kf," Nothing to download ")):pe("",!0),(F(!0),j(ve,null,Pi(r.value,(l,c)=>(F(),Gs(If,{key:c,url:l.url,name:l.name,size:l.size,progress:l.progress,success:l.success,type:l.type},null,8,["url","name","size","progress","success","type"]))),128))]))}}),Lf=Re(Pf,[["__scopeId","data-v-2dba2b30"]]),Df={};function Mf(e,t){return F(),j("footer",null,t[0]||(t[0]=[yc('

© 2024 EasyTransfer. All rights reserved.

About | Feedback | GitHub

',2)]))}const Bf=Re(Df,[["render",Mf],["__scopeId","data-v-cd00c0b7"]]),Ff={id:"app-content"},Uf={class:"app-cluster"},Hf=De({__name:"App",setup(e){return(t,s)=>(F(),j(ve,null,[fe(Ea),g("div",Ff,[g("div",Uf,[fe(Ku),fe(pf),fe(Lf)])]),fe(Bf)],64))}}),$f=Re(Hf,[["__scopeId","data-v-e68b6bcc"]]),Ao=Zc($f);Ao.use(na());Ao.mount("#app"); +`).join(",")}]`)}catch{u.value=!1,h.value="ICE Servers format incorrect";return}if(K.length===0){u.value=!1,h.value="ICE Servers cannot be empty";return}for(let D of K)if(!D.urls){u.value=!1,h.value="ICE Servers must have urls property";return}u.value=!0,h.value="Save"};return(K,y)=>(F(),j("div",{class:"overlay blur",onClick:io(f,["self"])},[g("div",fa,[y[15]||(y[15]=g("h2",null,[g("span",{class:"mdi mdi-cog"}),tr("Settings")],-1)),g("div",da,[y[10]||(y[10]=g("label",{for:"max-connection-number"},"Max connection number",-1)),g("div",ha,[Be(g("input",{type:"range",id:"max-connection-number",class:"blur shadow","onUpdate:modelValue":y[0]||(y[0]=D=>m.value=D),onInput:Y,min:"0",max:"16",step:"1"},null,544),[[Ps,m.value]]),y[6]||(y[6]=g("div",{class:"range-input-label"},[g("span",null,"0"),g("span",null,"4"),g("span",null,"8"),g("span",null,"12"),g("span",null,"16")],-1))]),y[11]||(y[11]=g("label",{for:"ice-servers"},"ICE Servers",-1)),Be(g("textarea",{id:"ice-servers",class:"blur shadow","onUpdate:modelValue":y[1]||(y[1]=D=>T.value=D),spellcheck:"false",onInput:Y},null,544),[[Ps,T.value]]),y[12]||(y[12]=g("label",{for:"enable-img-display"},"Auto display image",-1)),g("label",pa,[Be(g("input",{class:"blur shadow",type:"checkbox",id:"enable-img-display","onUpdate:modelValue":y[2]||(y[2]=D=>x.value=D)},null,512),[[hn,x.value]]),y[7]||(y[7]=g("span",{class:"blur shadow"},null,-1))]),y[13]||(y[13]=g("label",{for:"enable-open-link"},"Directly open link",-1)),g("label",ma,[Be(g("input",{class:"blur shadow",type:"checkbox",id:"enable-open-link","onUpdate:modelValue":y[3]||(y[3]=D=>A.value=D)},null,512),[[hn,A.value]]),y[8]||(y[8]=g("span",{class:"blur shadow"},null,-1))]),y[14]||(y[14]=g("label",{for:"auto-download"},"Auto download",-1)),g("label",ga,[Be(g("input",{class:"blur shadow",type:"checkbox",id:"auto-download","onUpdate:modelValue":y[4]||(y[4]=D=>L.value=D)},null,512),[[hn,L.value]]),y[9]||(y[9]=g("span",{class:"blur shadow"},null,-1))])]),g("div",_a,[g("button",{onClick:f,class:"cancel-button"},"Cancel"),g("button",{onClick:y[5]||(y[5]=D=>U()),class:ne(["save-button",{error:!u.value}]),disabled:!u.value},je(h.value),11,ya)])])]))}}),Re=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},ba=Re(va,[["__scopeId","data-v-000e74aa"]]),wa=De({__name:"HeaderModal",setup(e){const t=V(!1),s=()=>{t.value=!t.value},n="v3.1.15",r=V(!1),i=()=>{window.scrollY>50?r.value=!0:r.value=!1};return Ws(()=>{window.addEventListener("scroll",i)}),Qn(()=>{window.removeEventListener("scroll",i)}),(o,l)=>(F(),j(ve,null,[g("header",{class:ne({blur:r.value,shadow:r.value})},[g("div",{class:"header-cluster"},[g("div",{class:"logo-cluster"},[l[2]||(l[2]=g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[g("path",{d:"M21.4 7.5C22.2 8.3 22.2 9.6 21.4 10.3L18.6 13.1L10.8 5.3L13.6 2.5C14.4 1.7 15.7 1.7 16.4 2.5L18.2 4.3L21.2 1.3L22.6 2.7L19.6 5.7L21.4 7.5M15.6 13.3L14.2 11.9L11.4 14.7L9.3 12.6L12.1 9.8L10.7 8.4L7.9 11.2L6.4 9.8L3.6 12.6C2.8 13.4 2.8 14.7 3.6 15.4L5.4 17.2L1.4 21.2L2.8 22.6L6.8 18.6L8.6 20.4C9.4 21.2 10.7 21.2 11.4 20.4L14.2 17.6L12.8 16.2L15.6 13.3Z"})],-1)),g("div",{class:"logo-text"},[l[0]||(l[0]=g("h1",null,"EasyTransfer",-1)),g("span",null,je(n)),l[1]||(l[1]=g("p",null,"Share simply & stay anonymous.",-1))])]),g("div",{class:"link-cluster"},[g("button",{class:"link-item shadow",onClick:s},l[3]||(l[3]=[g("span",{class:"mdi mdi-cog"},null,-1),g("span",{class:"text"},"Settings",-1)])),l[4]||(l[4]=g("a",{href:"https://github.com/WCY-dt/EasyTransfer",class:"link-item shadow github"},[g("span",{class:"mdi mdi-github"}),g("span",{class:"text"},"Star on GitHub")],-1))])])],2),t.value?(F(),Gs(ba,{key:0,onClose:s})):pe("",!0)],64))}}),Ea=Re(wa,[["__scopeId","data-v-efe22c15"]]),Ze=Object.create(null);Ze.open="0";Ze.close="1";Ze.ping="2";Ze.pong="3";Ze.message="4";Ze.upgrade="5";Ze.noop="6";const bs=Object.create(null);Object.keys(Ze).forEach(e=>{bs[Ze[e]]=e});const Nn={type:"error",data:"parser error"},uo=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",fo=typeof ArrayBuffer=="function",ho=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,nr=({type:e,data:t},s,n)=>uo&&t instanceof Blob?s?n(t):Wr(t,n):fo&&(t instanceof ArrayBuffer||ho(t))?s?n(t):Wr(new Blob([t]),n):n(Ze[e]+(t||"")),Wr=(e,t)=>{const s=new FileReader;return s.onload=function(){const n=s.result.split(",")[1];t("b"+(n||""))},s.readAsDataURL(e)};function qr(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let mn;function Ta(e,t){if(uo&&e.data instanceof Blob)return e.data.arrayBuffer().then(qr).then(t);if(fo&&(e.data instanceof ArrayBuffer||ho(e.data)))return t(qr(e.data));nr(e,!1,s=>{mn||(mn=new TextEncoder),t(mn.encode(s))})}const Kr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,s=e.length,n,r=0,i,o,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),u=new Uint8Array(f);for(n=0;n>4,u[r++]=(o&15)<<4|l>>2,u[r++]=(l&3)<<6|c&63;return f},xa=typeof ArrayBuffer=="function",rr=(e,t)=>{if(typeof e!="string")return{type:"message",data:po(e,t)};const s=e.charAt(0);return s==="b"?{type:"message",data:Ra(e.substring(1),t)}:bs[s]?e.length>1?{type:bs[s],data:e.substring(1)}:{type:bs[s]}:Nn},Ra=(e,t)=>{if(xa){const s=Sa(e);return po(s,t)}else return{base64:!0,data:e}},po=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},mo="",Ca=(e,t)=>{const s=e.length,n=new Array(s);let r=0;e.forEach((i,o)=>{nr(i,!1,l=>{n[o]=l,++r===s&&t(n.join(mo))})})},Oa=(e,t)=>{const s=e.split(mo),n=[];for(let r=0;r{const n=s.length;let r;if(n<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,n);else if(n<65536){r=new Uint8Array(3);const i=new DataView(r.buffer);i.setUint8(0,126),i.setUint16(1,n)}else{r=new Uint8Array(9);const i=new DataView(r.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(r[0]|=128),t.enqueue(r),t.enqueue(s)})}})}let gn;function ps(e){return e.reduce((t,s)=>t+s.length,0)}function ms(e,t){if(e[0].length===t)return e.shift();const s=new Uint8Array(t);let n=0;for(let r=0;rMath.pow(2,21)-1){l.enqueue(Nn);break}r=u*Math.pow(2,32)+f.getUint32(4),n=3}else{if(ps(s)e){l.enqueue(Nn);break}}}})}const go=4;function de(e){if(e)return Na(e)}function Na(e){for(var t in de.prototype)e[t]=de.prototype[t];return e}de.prototype.on=de.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};de.prototype.once=function(e,t){function s(){this.off(e,s),t.apply(this,arguments)}return s.fn=t,this.on(e,s),this};de.prototype.off=de.prototype.removeListener=de.prototype.removeAllListeners=de.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+e];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,r=0;rPromise.resolve().then(t):(t,s)=>s(t,0),Me=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),ka="arraybuffer";function _o(e,...t){return t.reduce((s,n)=>(e.hasOwnProperty(n)&&(s[n]=e[n]),s),{})}const Pa=Me.setTimeout,La=Me.clearTimeout;function Zs(e,t){t.useNativeTimers?(e.setTimeoutFn=Pa.bind(Me),e.clearTimeoutFn=La.bind(Me)):(e.setTimeoutFn=Me.setTimeout.bind(Me),e.clearTimeoutFn=Me.clearTimeout.bind(Me))}const Da=1.33;function Ma(e){return typeof e=="string"?Ba(e):Math.ceil((e.byteLength||e.size)*Da)}function Ba(e){let t=0,s=0;for(let n=0,r=e.length;n=57344?s+=3:(n++,s+=4);return s}function yo(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Fa(e){let t="";for(let s in e)e.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return t}function Ua(e){let t={},s=e.split("&");for(let n=0,r=s.length;n{this.readyState="paused",t()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||s()})),this.writable||(n++,this.once("drain",function(){--n||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};Oa(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Ca(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=yo()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let vo=!1;try{vo=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Va=vo;function ja(){}class Wa extends $a{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let n=location.port;n||(n=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,s){const n=this.request({method:"POST",data:t});n.on("success",s),n.on("error",(r,i)=>{this.onError("xhr post error",r,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,n)=>{this.onError("xhr poll error",s,n)}),this.pollXhr=t}}class Je extends de{constructor(t,s,n){super(),this.createRequest=t,Zs(this,n),this._opts=n,this._method=n.method||"GET",this._uri=s,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;const s=_o(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(s);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this._opts.extraHeaders[r])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var r;n.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document<"u"&&(this._index=Je.requestsCount++,Je.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=ja,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Je.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Je.requestsCount=0;Je.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Gr);else if(typeof addEventListener=="function"){const e="onpagehide"in Me?"pagehide":"unload";addEventListener(e,Gr,!1)}}function Gr(){for(let e in Je.requests)Je.requests.hasOwnProperty(e)&&Je.requests[e].abort()}const qa=function(){const e=bo({xdomain:!1});return e&&e.responseType!==null}();class Ka extends Wa{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=qa&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Je(bo,this.uri(),t)}}function bo(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Va))return new XMLHttpRequest}catch{}if(!t)try{return new Me[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const wo=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ga extends ir{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,n=wo?{}:_o(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,n)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s{try{this.doWrite(n,i)}catch{}r&&Qs(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=yo()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const _n=Me.WebSocket||Me.MozWebSocket;class za extends Ga{createSocket(t,s,n){return wo?new _n(t,s,n):s?new _n(t,s):new _n(t)}doWrite(t,s){this.ws.send(s)}}class Ya extends ir{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=Ia(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(s).getReader(),r=Aa();r.readable.pipeTo(t.writable),this._writer=r.writable.getWriter();const i=()=>{n.read().then(({done:l,value:c})=>{l||(this.onPacket(c),i())}).catch(l=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s{r&&Qs(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Ja={websocket:za,webtransport:Ya,polling:Ka},Xa=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Qa=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function kn(e){if(e.length>8e3)throw"URI too long";const t=e,s=e.indexOf("["),n=e.indexOf("]");s!=-1&&n!=-1&&(e=e.substring(0,s)+e.substring(s,n).replace(/:/g,";")+e.substring(n,e.length));let r=Xa.exec(e||""),i={},o=14;for(;o--;)i[Qa[o]]=r[o]||"";return s!=-1&&n!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Za(i,i.path),i.queryKey=eu(i,i.query),i}function Za(e,t){const s=/\/{2,9}/g,n=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function eu(e,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,r,i){r&&(s[r]=i)}),s}const Pn=typeof addEventListener=="function"&&typeof removeEventListener=="function",ws=[];Pn&&addEventListener("offline",()=>{ws.forEach(e=>e())},!1);class dt extends de{constructor(t,s){if(super(),this.binaryType=ka,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const n=kn(t);s.hostname=n.host,s.secure=n.protocol==="https"||n.protocol==="wss",s.port=n.port,n.query&&(s.query=n.query)}else s.host&&(s.hostname=kn(s.host).host);Zs(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(n=>{const r=n.prototype.name;this.transports.push(r),this._transportsByName[r]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ua(this.opts.query)),Pn&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ws.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=go,s.transport=t,this.id&&(s.sid=this.id);const n=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&dt.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",dt.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let n=0;n0&&s>this._maxPayload)return this.writeBuffer.slice(0,n);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Qs(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,n){return this._sendPacket("message",t,s,n),this}send(t,s,n){return this._sendPacket("message",t,s,n),this}_sendPacket(t,s,n,r){if(typeof s=="function"&&(r=s,s=void 0),typeof n=="function"&&(r=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const i={type:t,data:s,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},n=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(dt.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Pn&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=ws.indexOf(this._offlineEventListener);n!==-1&&ws.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}dt.protocol=go;class tu extends dt{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{n||(s.send([{type:"ping",data:"probe"}]),s.once("packet",h=>{if(!n)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;dt.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(u(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=s.name,this.emitReserved("upgradeError",m)}}))};function i(){n||(n=!0,u(),s.close(),s=null)}const o=h=>{const m=new Error("probe error: "+h);m.transport=s.name,i(),this.emitReserved("upgradeError",m)};function l(){o("transport closed")}function c(){o("socket closed")}function f(h){s&&h.name!==s.name&&i()}const u=()=>{s.removeListener("open",r),s.removeListener("error",o),s.removeListener("close",l),this.off("close",c),this.off("upgrading",f)};s.once("open",r),s.once("error",o),s.once("close",l),this.once("close",c),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let n=0;nJa[r]).filter(r=>!!r)),super(t,n)}};function nu(e,t="",s){let n=e;s=s||typeof location<"u"&&location,e==null&&(e=s.protocol+"//"+s.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=s.protocol+e:e=s.host+e),/^(https?|wss?):\/\//.test(e)||(typeof s<"u"?e=s.protocol+"//"+e:e="https://"+e),n=kn(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+t,n.href=n.protocol+"://"+i+(s&&s.port===n.port?"":":"+n.port),n}const ru=typeof ArrayBuffer=="function",iu=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Eo=Object.prototype.toString,ou=typeof Blob=="function"||typeof Blob<"u"&&Eo.call(Blob)==="[object BlobConstructor]",lu=typeof File=="function"||typeof File<"u"&&Eo.call(File)==="[object FileConstructor]";function or(e){return ru&&(e instanceof ArrayBuffer||iu(e))||ou&&e instanceof Blob||lu&&e instanceof File}function Es(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let s=0,n=e.length;s=0&&e.num{delete this.acks[t];for(let l=0;l{this.io.clearTimeoutFn(i),s.apply(this,l)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...s){return new Promise((n,r)=>{const i=(o,l)=>o?r(o):n(l);i.withError=!0,s.push(i),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((r,...i)=>n!==this._queue[0]?void 0:(r!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(r)):(this._queue.shift(),s&&s(null,...i)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:J.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(n=>String(n.id)===t)){const n=this.acks[t];delete this.acks[t],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case J.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case J.EVENT:case J.BINARY_EVENT:this.onevent(t);break;case J.ACK:case J.BINARY_ACK:this.onack(t);break;case J.DISCONNECT:this.ondisconnect();break;case J.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const n of s)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let n=!1;return function(...r){n||(n=!0,s.packet({type:J.ACK,id:t,data:r}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:J.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let n=0;n0&&e.jitter<=1?e.jitter:0,this.attempts=0}Lt.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+s:e-s}return Math.min(e,this.max)|0};Lt.prototype.reset=function(){this.attempts=0};Lt.prototype.setMin=function(e){this.ms=e};Lt.prototype.setMax=function(e){this.max=e};Lt.prototype.setJitter=function(e){this.jitter=e};class Mn extends de{constructor(t,s){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Zs(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((n=s.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Lt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const r=s.parser||pu;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new su(this.uri,this.opts);const s=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Ve(s,"open",function(){n.onopen(),t&&t()}),i=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},o=Ve(s,"error",i);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{r(),i(new Error("timeout")),s.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Ve(t,"ping",this.onping.bind(this)),Ve(t,"data",this.ondata.bind(this)),Ve(t,"error",this.onerror.bind(this)),Ve(t,"close",this.onclose.bind(this)),Ve(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){Qs(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new To(this,t,s),this.nsps[t]=n),n}_destroy(t){const s=Object.keys(this.nsps);for(const n of s)if(this.nsps[n].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let n=0;nt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},s);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const jt={};function Ts(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const s=nu(e,t.path||"/socket.io"),n=s.source,r=s.id,i=s.path,o=jt[r]&&i in jt[r].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let c;return l?c=new Mn(n,t):(jt[r]||(jt[r]=new Mn(n,t)),c=jt[r]),s.query&&!t.query&&(t.query=s.queryKey),c.socket(s.path,t)}Object.assign(Ts,{Manager:Mn,Socket:To,io:Ts,connect:Ts});var gu={VITE_SIGNAL_SERVER_URL:"https://easy-transfer.glitch.me/",GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_9eb222f8-8d18-42f8-9806-d74ca2b4c5f3",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.9.2 node/v23.7.0 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_9eb222f8-8d18-42f8-9806-d74ca2b4c5f3",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/23.7.0/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",OLDPWD:"/home/runner/work/EasyTransfer/EasyTransfer",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/EasyTransfer/EasyTransfer/client/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"WCY-dt",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"55525165",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/EasyTransfer/EasyTransfer/client",SYSTEMD_EXEC_PID:"833",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250126.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.11/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.5/x64",JOURNAL_STREAM:"8:5784",GITHUB_WORKFLOW:"Deploy Client",_:"/opt/hostedtoolcache/node/23.7.0/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/23.7.0/x64",npm_config_npm_version:"10.9.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13097641313",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"55cc898fb98ff4c4406524b73e76aae8fd06867b",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"WCY-dt/EasyTransfer/.github/workflows/deploy.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/23.7.0/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/EasyTransfer/EasyTransfer/client/node_modules/.bin:/home/runner/work/EasyTransfer/EasyTransfer/node_modules/.bin:/home/runner/work/EasyTransfer/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/23.7.0/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/23.7.0/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_8e0d6a0f-218e-4659-9158-df83568ab931",INVOCATION_ID:"9558efdf47ca41bdb13d66e273108ead",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/23.7.0/x64/bin/node",npm_package_name:"client",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"135",GITHUB_TRIGGERING_ACTOR:"WCY-dt",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 33",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"WCY-dt/EasyTransfer",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"816812807",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"3.1.15",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",GITHUB_WORKSPACE:"/home/runner/work/EasyTransfer/EasyTransfer",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"55cc898fb98ff4c4406524b73e76aae8fd06867b",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"WCY-dt",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/23.7.0/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_9eb222f8-8d18-42f8-9806-d74ca2b4c5f3",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/EasyTransfer/EasyTransfer/client",GITHUB_ACTOR_ID:"55525165",RUNNER_WORKSPACE:"/home/runner/work/EasyTransfer",npm_execpath:"/opt/hostedtoolcache/node/23.7.0/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_9eb222f8-8d18-42f8-9806-d74ca2b4c5f3",npm_config_global_prefix:"/opt/hostedtoolcache/node/23.7.0/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_9eb222f8-8d18-42f8-9806-d74ca2b4c5f3",INIT_CWD:"/home/runner/work/EasyTransfer/EasyTransfer/client",EDITOR:"vi",NODE_ENV:"production"};const xt=Xs("connect",()=>{const e=cs(),{maxConnectionNumber:t,iceServers:s}=Ue(e),n=gu.VITE_SIGNAL_SERVER_URL;let r=null;const i=V(null),o=V(!1),l=V("LOADING"),c=V("");let f=[];const u=V(!1),h=V([]),m=1024*16,T=10,x=V(!1);function A(){h.value=[];const S={iceServers:s.value};r=Ts(n),i.value=new RTCPeerConnection(S),K(),D()}async function L(){r==null||r.emit("register",t.value)}function U(){var S;x.value=!0,(S=i.value)==null||S.createOffer().then(N=>{var b;return(b=i.value)==null?void 0:b.setLocalDescription(N)}).then(()=>{var N;r==null||r.emit("offer",(N=i.value)==null?void 0:N.localDescription,l.value,c.value)}),Y()}function Y(){i.value.onicecandidate=S=>{S.candidate&&(r==null||r.emit("candidate",S.candidate,c.value))}}function K(){r==null||r.on("success",S=>{l.value=S,o.value=!0}),r==null||r.on("disconnect",()=>{o.value=!1,window.location.reload()}),r==null||r.on("offer",(S,N,b)=>{var P;c.value=N,t.value=b,x.value=!0,(P=i.value)==null||P.setRemoteDescription(new RTCSessionDescription(S)).then(()=>{var W;return(W=i.value)==null?void 0:W.createAnswer()}).then(W=>{var ce;return(ce=i.value)==null?void 0:ce.setLocalDescription(W)}).then(()=>{var W;r==null||r.emit("answer",(W=i.value)==null?void 0:W.localDescription,l.value,c.value)}).then(()=>{y()}),Y()}),r==null||r.on("answer",(S,N)=>{var b;c.value===N?(b=i.value)==null||b.setRemoteDescription(new RTCSessionDescription(S)).then(()=>{y()}):console.error(`[ERROR] Received answer from unexpected id: ${N}`)}),r==null||r.on("candidate",S=>{var N;(N=i.value)!=null&&N.remoteDescription?i.value.addIceCandidate(new RTCIceCandidate(S)):f.push(S)})}function y(){var S;for(;f.length;)(S=i.value)==null||S.addIceCandidate(new RTCIceCandidate(f.shift()))}function D(){var S;for(let N=0;N{x.value=!1,u.value=!0},b.onerror=P=>{console.error(`[ERR] Data channel error: ${P}`),x.value=!1,u.value=!1},b.onclose=()=>{x.value=!1,u.value=!1},h.value.push(b))}}function Ee(){return h.value.map(N=>N.readyState).every(N=>N==="open")?"open":"pending"}let le=s.value,G=t.value;return be([s,t],async()=>{i.value&&(s.value!==le||t.value!==G)&&(console.warn("[INFO] ===Reconnecting==="),await Promise.all(h.value.map(S=>S.close())),i.value.close(),r==null||r.disconnect(),window.location.reload(),le=s.value,G=t.value)}),{peerConnection:i,isConnectSuccess:u,registered:o,clientId:l,targetId:c,sendChannels:h,maxBufferedAmount:m,isConnecting:x,initializeConnection:A,registerClient:L,connectTarget:U,getSendChannelState:Ee}});async function _u(e){const t={iceServers:e},s=new RTCPeerConnection(t);return new Promise(n=>{s.onicecandidate=r=>{r.candidate&&r.candidate.candidate.includes("typ relay")&&(n(!0),s.close())},s.onicegatheringstatechange=()=>{s.iceGatheringState==="complete"&&(n(!1),s.close())},s.createDataChannel(""),s.createOffer().then(r=>s.setLocalDescription(r)).catch(()=>{n(!1),s.close()})})}const yu={class:"id-cluster"},vu={class:"cover blur"},bu={key:0,class:"mdi mdi-check-bold"},wu={key:1,class:"mdi mdi-content-copy"},Eu=["disabled"],Tu={key:0,class:"mdi mdi-dots-horizontal"},Su={key:1,class:"mdi mdi-connection"},xu={class:"isTurnServerAvailable"},Ru={class:"notice"},Cu=De({__name:"OperationId",setup(e){const t=xt();t.initializeConnection();const s=cs(),{isConnectSuccess:n,registered:r,clientId:i,targetId:o,isConnecting:l}=Ue(t),{iceServers:c}=Ue(s),f=V(!1),u=V(!1),h=Ys(()=>({disabled:!f.value&&!n.value||!r.value,ready:f.value&&!n.value&&r.value,success:!f.value&&n.value&&r.value})),m=V(!1);be(o,L=>{L!==L.toUpperCase()&&(o.value=L.toUpperCase()),T(L)}),be(n,L=>{L&&(f.value=!1)});function T(L){f.value=L.length===4,n.value=!1}function x(){r.value&&(navigator.clipboard.writeText(i.value),u.value=!0,setTimeout(()=>{u.value=!1},1e3))}function A(){o.value=o.value.toUpperCase(),t.connectTarget()}return Ws(async()=>{await t.registerClient(),m.value=await _u(c.value)}),(L,U)=>(F(),j("div",yu,[g("div",{class:ne(["clientId-cluster",H(i)==="LOADING"?"disabled":"ready"]),onClick:x},[tr(je(H(i))+" ",1),g("div",vu,[u.value?(F(),j("span",bu)):(F(),j("span",wu))])],2),g("div",{class:ne(["targetId-cluster shadow",h.value])},[U[1]||(U[1]=g("span",{class:"input-hint shadow"},"Enter the peer's code",-1)),Be(g("input",{type:"text",id:"targetIdInput",class:"targetId-input blur",placeholder:"code",maxlength:"4","onUpdate:modelValue":U[0]||(U[0]=Y=>ae(o)?o.value=Y:null)},null,512),[[Ps,H(o)]]),g("button",{id:"connectButton",class:"connect-button",disabled:!f.value||!H(r),onClick:A,"aria-label":"Connect"},[H(l)?(F(),j("span",Tu)):(F(),j("span",Su))],8,Eu)],2),g("div",xu,[g("span",{class:ne(["dot",{green:m.value,red:!m.value}])},null,2),g("span",Ru,je(m.value?"Turn server is available":"Turn server is not available"),1)])]))}}),Ou=Re(Cu,[["__scopeId","data-v-b8d6ef63"]]),en=Xs("send",()=>{const e=xt(),{sendChannels:t}=Ue(e),s=V([]);function n(b,P,W,ce,et){s.value.push({url:b,name:P,size:W,progress:ce,type:et}),s.value=[...s.value]}async function r(b,P){s.value[b].progress=P,s.value=[...s.value]}async function i(b,P){s.value[b].url=P,s.value=[...s.value]}async function o(b,P){s.value[b].success=P,s.value=[...s.value]}let l=-1,c=[];for(let b=0;b{await u()};async function f(b,P=!1){c.push(b),await u(P)}async function u(b){let P=null;if(b)P=t.value[0];else{const W=Math.floor(Math.random()*t.value.length);P=t.value[W]}for(;c.length>0&&P.bufferedAmount<=e.maxBufferedAmount;){let W=c.shift();!(W instanceof ArrayBuffer)&&!ArrayBuffer.isView(W)&&(W=new TextEncoder().encode(W)),P.send(new Uint8Array(W))}}let h="";const m=V("Drop file here or click to upload"),T=V(0),x=16384;let A=null;const L=V(0);async function U(b,P){const W=b.length;if(W===0){console.error("[ERR] No file selected");return}for(let ce=0;cenew Promise((ue,z)=>{const Z=new FileReader;Z.onload=async Ce=>{var Oe,Dt,as;const lt=new Uint8Array(2);lt[0]=(et&65280)>>8,lt[1]=et&255;const He=new Uint8Array(((Oe=Ce.target)==null?void 0:Oe.result).byteLength+2);He.set(lt,0),He.set(new Uint8Array((Dt=Ce.target)==null?void 0:Dt.result),2),await f(He),L.value=L.value+((as=Ce.target)==null?void 0:as.result).byteLength,L.value{z(Ce)},Z.readAsArrayBuffer(ce)}));await Promise.all(W)}async function Ee(){A=new FileReader,A.addEventListener("error",b=>{console.error(`[ERR] Error reading file: ${b}`)}),A.addEventListener("abort",b=>{console.log(`[INFO] File reading aborted: ${b}`)})}function le(b){return b===0?(console.error("[ERR] File is empty"),!1):e.getSendChannelState()!=="open"?(console.error("[ERR] Data channel is not open"),!1):!0}async function G(b){await S(b)}async function S(b){N(b)&&(await f("CONTENT_METAtTRANSFER_TYPE_TEXT",!0),await f("CONTENT_METAn"+b,!0),await f("CONTENT_METAs"+b.length,!0),n("javascript:void(0)",b,b.length,b.length,"TRANSFER_TYPE_TEXT"),l++,o(l,!0))}function N(b){return b===""?(console.error("[ERR] Text is empty"),!1):e.getSendChannelState()!=="open"?(console.error("[ERR] Data channel is not open"),!1):!0}return{uploadFileItems:s,sendFiles:U,sendText:G,processQueue:u}}),Au=["disabled"],Iu=["disabled"],Nu={key:0,class:"upload-text-title"},ku={key:1,class:"upload-text-title"},Pu=De({__name:"UploadText",setup(e){const t=xt(),{isConnectSuccess:s}=Ue(t),n=en(),r=V(""),i=V(!1);function o(){s.value&&(n.sendText(r.value),i.value=!0,setTimeout(()=>{i.value=!1,r.value=""},1e3))}return(l,c)=>(F(),j("div",{id:"text",class:ne(["upload-text-cluster",{disabled:!H(s),active:H(s)}])},[Be(g("textarea",{id:"textInput",class:"text-input blur",placeholder:"Send a short message...",disabled:!H(s),"onUpdate:modelValue":c[0]||(c[0]=f=>r.value=f),ref:"textInput.value"},null,8,Au),[[Ps,r.value]]),g("button",{id:"sendButton",class:"send-button",disabled:!H(s),onClick:o},[g("span",{class:ne(["mdi",{"mdi-send":!i.value,"mdi-check-bold":i.value}])},null,2),i.value?(F(),j("p",ku,"Succeed")):(F(),j("p",Nu,"Send Message"))],8,Iu)],2))}}),Lu=Re(Pu,[["__scopeId","data-v-c9d5339b"]]),Du=["disabled"],Mu=De({__name:"UploadFile",setup(e){const t=xt(),{isConnectSuccess:s}=Ue(t),n=en(),r=V(null);async function i(){r.value&&r.value.files&&await n.sendFiles(Array.from(r.value.files),"TRANSFER_TYPE_FILE")}async function o(c){var f;s.value&&(c.preventDefault(),r.value&&(r.value.files=((f=c.dataTransfer)==null?void 0:f.files)??null,await i()))}function l(){s.value&&r.value&&r.value.click()}return(c,f)=>(F(),j("div",{id:"dropzone",class:ne(["upload-file-cluster",{disabled:!H(s),active:H(s)}]),onDragover:f[0]||(f[0]=io(()=>{},["prevent"])),onDrop:o,onClick:l},[g("input",{type:"file",id:"fileInput",class:"file-input",title:"Choose a file to send",multiple:"",onChange:i,ref_key:"fileInput",ref:r,disabled:!H(s)},null,40,Du),f[1]||(f[1]=g("span",{class:"mdi mdi-file-upload"},null,-1)),f[2]||(f[2]=g("p",{class:"file-input-title"},"File",-1))],34))}}),Bu=Re(Mu,[["__scopeId","data-v-acede28d"]]),Fu={id:"cameradisplay",class:"camera-display-cluster"},Uu=De({__name:"UploadPhoto",setup(e){const t=xt(),{isConnectSuccess:s}=Ue(t),n=en(),r=V(!1),i=V(!1),o=V(!1),l=V(null),c=V(null);function f(){s.value&&navigator.mediaDevices.getUserMedia({audio:!1,video:{facingMode:"environment"}}).then(x=>{window.stream=x,l.value&&(l.value.srcObject=x),i.value=!0,o.value=!0}).catch(x=>{console.error(`[ERR] GetUserMedia error: ${x}`),i.value=!1,o.value=!1,alert("Please allow camera access to use this feature")})}function u(){var x;if(c.value&&l.value){c.value.width=l.value.videoWidth,c.value.height=l.value.videoHeight;const A=c.value.getContext("2d");A&&A.drawImage(l.value,0,0,c.value.width,c.value.height),(x=window.stream)==null||x.getTracks().forEach(L=>L.stop()),o.value=!1}}function h(){var x;(x=window.stream)==null||x.getTracks().forEach(A=>A.stop()),i.value=!1,o.value=!1}async function m(){c.value&&c.value.toBlob(async function(x){if(x){const A=new Date().getTime(),L=new File([x],`image_${A}.png`,{type:"image/png"});await n.sendFiles([L],"TRANSFER_TYPE_FILE")}},"image/png")}async function T(){s.value&&(await m(),r.value=!0,setTimeout(()=>{r.value=!1,h()},1e3))}return(x,A)=>(F(),j(ve,null,[Be(g("div",Fu,[g("button",{class:"close-button mdi mdi-close",onClick:h}),Be(g("video",{class:"stream-display",ref_key:"stream",ref:l,autoplay:"",playsinline:""},null,512),[[$t,o.value]]),Be(g("button",{class:"snapshot-button mdi mdi-camera",onClick:u},null,512),[[$t,o.value]]),Be(g("canvas",{class:"photo-display",ref_key:"photo",ref:c},null,512),[[$t,!o.value]]),Be(g("button",{class:ne(["send-button mdi",{"mdi-send":!r.value,"mdi-check-bold":r.value}]),onClick:T},null,2),[[$t,!o.value]])],512),[[$t,i.value]]),g("div",{id:"camera",class:ne(["upload-photo-cluster",{disabled:!H(s),active:H(s)}]),onClick:f},A[0]||(A[0]=[g("span",{class:"mdi mdi-camera"},null,-1),g("p",{class:"upload-photo-title"},"Photo",-1)]),2)],64))}}),Hu=Re(Uu,[["__scopeId","data-v-a386c348"]]),$u={id:"upload",class:"upload-cluster"},Vu=De({__name:"UploadModal",setup(e){return(t,s)=>(F(),j("div",$u,[fe(Bu),fe(Hu),fe(Lu)]))}}),ju=Re(Vu,[["__scopeId","data-v-ce8de059"]]),Wu={class:"operation-cluster"},qu=De({__name:"OperationModal",setup(e){return(t,s)=>(F(),j("div",Wu,[fe(Ou),fe(ju)]))}}),Ku=Re(qu,[["__scopeId","data-v-b3ad3813"]]);function Ls(e){return!!Gu.test(e)}function So(e){return Co.some(t=>e.toLowerCase().endsWith(t))}function xo(e){return Oo.some(t=>e.toLowerCase().endsWith(t))}function Ro(e){const t=e.toLowerCase();for(const[s,n]of Object.entries(zu))if(n.some(r=>t.endsWith(r)))return s;return"mdi-file-document"}const Gu=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),Co=[".png",".jpg",".jpeg",".gif",".bmp",".webp",".svg",".ico",".tiff",".tif",".heic",".raw"],Oo=[".mp4",".mkv",".avi",".mov",".wmv",".flv",".webm",".mpeg",".mpg",".m4v",".3gp",".3g2"],zu={"mdi-file-image":Co,"mdi-file-word":[".doc",".docx",".odt",".rtf",".txt",".wps",".wpd"],"mdi-file-table":[".xls",".xlsx",".ods",".csv",".tsv",".xlsm",".xlsb"],"mdi-file-powerpoint":[".ppt",".pptx",".odp",".pps",".ppsx",".pot",".potx"],"mdi-file-music":[".mp3",".wav",".flac",".ogg",".aac",".wma",".m4a",".aiff",".alac"],"mdi-file-video":Oo,"mdi-file-code":[".html",".css",".js",".ts",".jsx",".tsx",".json",".xml",".yaml",".yml",".md",".markdown",".cpp",".c",".h",".hpp",".java",".py",".rb",".php",".sql",".sh",".bat",".ps1",".psm1",".psd1",".ps1xml",".pssc",".psc1",".pssc",".pl",".perl",".go",".rs",".swift",".kt",".kts",".clj",".cljs",".scala",".groovy",".gradle",".dockerfile",".properties",".ini",".cfg",".conf",".toml",".yaml",".yml",".json",".xml",".csv",".tsv",".log",".r",".sas",".stata",".do",".m",".mat",".rmd",".ipynb"],"mdi-folder-zip":[".zip",".rar",".7z",".tar",".gz",".bz2",".xz",".lz",".lzma",".lzo",".zst",".z",".tar.gz",".tgz",".tar.bz2",".tbz2",".tar.xz",".txz",".tar.lz",".tlz",".tar.lzma",".tar.lzo",".tar.zst",".tzst"],"mdi-file-cad":[".dwg",".dxf",".dgn",".stl",".obj",".fbx",".3ds",".skp",".step",".stp",".igs",".iges",".x_t",".x_b",".sat",".sab",".3dm",".prt",".asm",".xas",".xpr"],"mdi-file-key":[".key",".pem",".pub",".asc",".gpg",".pgp",".p12",".pfx",".cer",".crt",".der",".keychain",".jks",".keystore",".bks",".pkcs12",".p7b",".p7c",".p7r",".p7s",".p8"]},Yu=["href","download"],Ju={class:"upload-item-detail"},Xu={class:"upload-item-name"},Qu=["value","max"],Zu=["src"],ef=["src","controls"],tf={class:"upload-item-detail"},sf={class:"upload-item-content"},nf={key:0,class:"mdi mdi-check-bold"},rf={key:1,class:"mdi mdi-content-copy"},of=["href"],lf={class:"upload-item-detail"},cf={class:"upload-item-content"},af=De({__name:"SendItem",props:{url:{default:"javascript:void(0)"},name:{default:"No file to upload"},size:{default:1},progress:{default:0},type:{default:"TRANSFER_TYPE_FILE"},success:{type:Boolean,default:!1}},setup(e){const t=e,s=cs(),{autoDisplayImage:n,directlyOpenLink:r}=Ue(s),i=V(!1);function o(){navigator.clipboard.writeText(t.name),i.value=!0,setTimeout(()=>{i.value=!1},1e3)}const l=window.matchMedia("(hover: hover)").matches;return(c,f)=>(F(),j(ve,null,[t.type==="TRANSFER_TYPE_FILE"?(F(),j("a",{key:0,ref:"uploadLink",href:t.url,class:ne(["upload-item file shadow",{success:t.success,loading:!t.success}]),download:t.name},[g("span",{class:ne(["mdi",H(Ro)(t.name)])},null,2),g("div",Ju,[g("p",Xu,je(t.name),1),g("progress",{class:"upload-item-progress",value:t.progress,max:t.size},null,8,Qu),H(So)(t.name)&&t.success&&H(n)?(F(),j("img",{key:0,class:"upload-item-content",src:t.url,alt:"Photo"},null,8,Zu)):pe("",!0),H(xo)(t.name)&&t.success?(F(),j("video",{key:1,class:"download-item-content",src:t.url,controls:!H(l),muted:"",autoplay:"",loop:""},null,8,ef)):pe("",!0)]),t.success?(F(),j("div",{key:0,class:ne({"copy-cover blur":H(l),"none-hover":!H(l)})},f[0]||(f[0]=[g("span",{class:"mdi mdi-download"},null,-1)]),2)):pe("",!0)],10,Yu)):pe("",!0),t.type==="TRANSFER_TYPE_TEXT"&&(!H(Ls)(t.name)||!H(r))?(F(),j("div",{key:1,class:ne(["upload-item text shadow",{success:t.success,loading:!t.success}]),onClick:o},[f[1]||(f[1]=g("span",{class:"mdi mdi-message-text"},null,-1)),g("div",tf,[g("p",sf,je(t.name),1)]),t.success?(F(),j("div",{key:0,class:ne({"copy-cover blur":H(l),"none-hover":!H(l)})},[i.value?(F(),j("span",nf)):(F(),j("span",rf))],2)):pe("",!0)],2)):pe("",!0),t.type==="TRANSFER_TYPE_TEXT"&&H(Ls)(t.name)&&H(r)?(F(),j("a",{key:2,class:ne(["upload-item text shadow",{success:t.success,loading:!t.success}]),onClick:o,href:t.name,target:"_blank",rel:"noopener noreferrer"},[f[3]||(f[3]=g("span",{class:"mdi mdi-link-variant"},null,-1)),g("div",lf,[g("p",cf,je(t.name),1)]),t.success?(F(),j("div",{key:0,class:ne({"copy-cover blur":H(l),"none-hover":!H(l)})},f[2]||(f[2]=[g("span",{class:"mdi mdi-open-in-new"},null,-1)]),2)):pe("",!0)],10,of)):pe("",!0)],64))}}),uf=Re(af,[["__scopeId","data-v-22560d61"]]),ff={class:"upload-cluster"},df={key:0,class:"noting-to-upload-text"},hf=De({__name:"SendModal",setup(e){const t=en(),s=V([]);return be(()=>t.uploadFileItems,n=>{s.value=n},{deep:!0}),(n,r)=>(F(),j("div",ff,[r[0]||(r[0]=g("div",{class:"upload-cluster-title"},[g("span",{class:"mdi mdi-upload-network"}),g("p",{class:"upload-cluster-title-text"},"Upload")],-1)),s.value.length===0?(F(),j("p",df," Nothing to upload ")):pe("",!0),(F(!0),j(ve,null,Pi(s.value,(i,o)=>(F(),Gs(uf,{key:o,url:i.url,name:i.name,size:i.size,progress:i.progress,success:i.success,type:i.type},null,8,["url","name","size","progress","success","type"]))),128))]))}}),pf=Re(hf,[["__scopeId","data-v-b5e41870"]]),mf=Xs("receive",()=>{const e=xt(),{peerConnection:t}=Ue(e),s=V([]);function n(S,N,b,P,W){s.value.push({url:S,name:N,size:b,progress:P,type:W}),s.value=[...s.value]}function r(S,N){s.value[S].progress=N,s.value=[...s.value]}function i(S,N){s.value[S].url=N,s.value=[...s.value]}function o(S,N){s.value[S].success=N,s.value=[...s.value]}let l=[],c=[],f="",u="",h=0,m=0,T="",x=[],A=[],L=[],U=-1;function Y(){if(!t.value){console.error("[ERR] Peer connection not ready");return}t.value.ondatachannel=S=>{G();const N=S.channel;N.onopen=()=>{},N.onerror=b=>{console.error(`[ERR] Receive channel error: ${b}`)},N.onclose=()=>{window.location.reload()},N.onmessage=b=>{D(b)}}}const K="CONTENT_META",y=new TextEncoder().encode(K);async function D(S){const N=new DataView(S.data);let b=!0;for(let P=0;P0&&(f=x.shift(),u=A.shift(),h=L.shift(),U++,console.log(`[INFO] ===Receiving file ${f} | ${u} | ${h}===`));const b=new DataView(S).getUint16(0,!1),P=S.slice(2);l[b]||(m+=P.byteLength),l[b]=P,r(U,m),m===h&&(c=l,T=URL.createObjectURL(new Blob(c)),u.endsWith(".svg")&&(T=URL.createObjectURL(new Blob(c,{type:"image/svg+xml"}))),i(U,T),o(U,!0),G())}function G(){l=[],c=[],f="",u="",h=0,m=0,T=""}return{downloadFileItems:s,receiveFiles:Y}}),gf=["href","download"],_f={class:"download-item-detail"},yf={class:"download-item-name"},vf=["value","max"],bf=["src"],wf=["src","controls"],Ef={class:"download-item-detail"},Tf={class:"download-item-content"},Sf={key:0,class:"mdi mdi-check-bold"},xf={key:1,class:"mdi mdi-content-copy"},Rf=["href"],Cf={class:"download-item-detail"},Of={class:"download-item-content"},Af=De({__name:"ReceiveItem",props:{url:{default:"javascript:void(0)"},name:{default:"No file to download"},size:{default:1},progress:{default:0},type:{default:"TRANSFER_TYPE_FILE"},success:{type:Boolean,default:!1}},setup(e){const t=e,s=cs(),{autoDisplayImage:n,directlyOpenLink:r,autoDownload:i}=Ue(s),o=V(!1);function l(){navigator.clipboard.writeText(t.name),o.value=!0,setTimeout(()=>{o.value=!1},1e3)}const c=window.matchMedia("(hover: hover)").matches,f=V(null);return be(()=>t.success,u=>{u&&i.value&&t.type==="TRANSFER_TYPE_FILE"&&setTimeout(()=>{f.value.click()},1e3)}),(u,h)=>(F(),j(ve,null,[t.type==="TRANSFER_TYPE_FILE"?(F(),j("a",{key:0,ref_key:"downloadLink",ref:f,href:t.url,class:ne(["download-item file shadow",{success:t.success,loading:!t.success}]),download:t.name},[g("span",{class:ne(["mdi",H(Ro)(t.name)])},null,2),g("div",_f,[g("p",yf,je(t.name),1),g("progress",{class:"download-item-progress",value:t.progress,max:t.size},null,8,vf),H(So)(t.name)&&t.success&&H(n)?(F(),j("img",{key:0,class:"download-item-content",src:t.url,alt:"Photo"},null,8,bf)):pe("",!0),H(xo)(t.name)&&t.success&&H(n)?(F(),j("video",{key:1,class:"download-item-content",src:t.url,controls:!H(c),muted:"",autoplay:"",loop:""},null,8,wf)):pe("",!0)]),t.success?(F(),j("div",{key:0,class:ne({"copy-cover blur":H(c),"none-hover":!H(c)})},h[0]||(h[0]=[g("span",{class:"mdi mdi-download"},null,-1)]),2)):pe("",!0)],10,gf)):pe("",!0),t.type==="TRANSFER_TYPE_TEXT"&&(!H(Ls)(t.name)||!H(r))?(F(),j("div",{key:1,class:ne(["download-item text shadow",{success:t.success,loading:!t.success}]),onClick:l},[h[1]||(h[1]=g("span",{class:"mdi mdi-message-text"},null,-1)),g("div",Ef,[g("p",Tf,je(t.name),1)]),t.success?(F(),j("div",{key:0,class:ne({"copy-cover blur":H(c),"none-hover":!H(c)})},[o.value?(F(),j("span",Sf)):(F(),j("span",xf))],2)):pe("",!0)],2)):pe("",!0),t.type==="TRANSFER_TYPE_TEXT"&&H(Ls)(t.name)&&H(r)?(F(),j("a",{key:2,class:ne(["download-item text shadow",{success:t.success,loading:!t.success}]),onClick:l,href:t.name,target:"_blank",rel:"noopener noreferrer"},[h[3]||(h[3]=g("span",{class:"mdi mdi-link-variant"},null,-1)),g("div",Cf,[g("p",Of,je(t.name),1)]),t.success?(F(),j("div",{key:0,class:ne({"copy-cover blur":H(c),"none-hover":!H(c)})},h[2]||(h[2]=[g("span",{class:"mdi mdi-open-in-new"},null,-1)]),2)):pe("",!0)],10,Rf)):pe("",!0)],64))}}),If=Re(Af,[["__scopeId","data-v-02e252d6"]]),Nf={class:"download-cluster"},kf={key:0,class:"noting-to-download-text"},Pf=De({__name:"ReceiveModal",setup(e){const t=xt(),s=mf(),{isConnectSuccess:n}=Ue(t),r=V([]);return be(n,i=>{i&&s.receiveFiles()}),be(()=>s.downloadFileItems,i=>{r.value=i},{deep:!0}),(i,o)=>(F(),j("div",Nf,[o[0]||(o[0]=g("div",{class:"download-cluster-title"},[g("span",{class:"mdi mdi-download-network"}),g("p",{class:"download-cluster-title-text"},"Download")],-1)),r.value.length===0?(F(),j("p",kf," Nothing to download ")):pe("",!0),(F(!0),j(ve,null,Pi(r.value,(l,c)=>(F(),Gs(If,{key:c,url:l.url,name:l.name,size:l.size,progress:l.progress,success:l.success,type:l.type},null,8,["url","name","size","progress","success","type"]))),128))]))}}),Lf=Re(Pf,[["__scopeId","data-v-2dba2b30"]]),Df={};function Mf(e,t){return F(),j("footer",null,t[0]||(t[0]=[yc('

© 2024 EasyTransfer. All rights reserved.

About | Feedback | GitHub

',2)]))}const Bf=Re(Df,[["render",Mf],["__scopeId","data-v-cd00c0b7"]]),Ff={id:"app-content"},Uf={class:"app-cluster"},Hf=De({__name:"App",setup(e){return(t,s)=>(F(),j(ve,null,[fe(Ea),g("div",Ff,[g("div",Uf,[fe(Ku),fe(pf),fe(Lf)])]),fe(Bf)],64))}}),$f=Re(Hf,[["__scopeId","data-v-e68b6bcc"]]),Ao=Zc($f);Ao.use(na());Ao.mount("#app"); diff --git a/index.html b/index.html index 9517b38..e3e5bc2 100644 --- a/index.html +++ b/index.html @@ -42,7 +42,7 @@ content="EasyTransfer is a free, anonymous, encrypted, and easy-to-use E2EE file transfer tool. You only need to visit a simple web page to connect to any device in any network using a device code. It is built using webRTC and Vue.js. What makes EasyTransfer different? It's these features: 🫣 Anonymous: No need to register an account, log in, or provide any personal information 🔒 Encrypted: Default encryption ensures the security of file transfer 🔄 End-to-end: Files are transferred directly from the sender to the receiver without going through the server1 🌐 Cross-network: Supports file transfer between LAN and WAN 🛠️ Easy to use: Connect devices using a four-digit device code, without any extra operations 📎 Multimedia messages: Supports sending text and various file types, and also supports sending photos ⚙️ Custom settings: All modules can be customized and deployed by yourself" /> - +