${e}
If this is unexpected, please contact your system administrator or technical support representative.
`;const t=document.getElementsByClassName("mx_HomePage_container"),r=document.getElementsByClassName("mx_HomePage_errorContainer");for(const e of t)e.innerHTML="";for(const t of r)t.style.display="block",t.innerHTML=e}!async function(){document.getElementById("back_to_riot_button").onclick=n;let e=await Object(o.a)("..");const t=e.default_server_config,r=e.default_server_name,a=e.default_hs_url,s=e.default_is_url,u=[t,r,a].filter(e=>!!e);if(u.length>1)return i("Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.");if(u.length<1)return i("Invalid configuration: no default server specified.");let d="",c="";if(t&&t["m.homeserver"]&&(d=t["m.homeserver"].base_url,t["m.identity_server"]&&(c=t["m.identity_server"].base_url)),r)try{const e=await fetch(`https://${r}/.well-known/matrix/client`),t=await e.json();t&&t["m.homeserver"]&&(d=t["m.homeserver"].base_url,t["m.identity_server"]&&(c=t["m.identity_server"].base_url))}catch(e){return console.error(e),i("Unable to fetch homeserver configuration")}if(a&&(d=a,c=s),!d)return i("Unable to locate homeserver");d&&!d.endsWith("/")&&(d+="/"),c&&!c.endsWith("/")&&(c+="/"),"https://matrix.org/"!==d&&(document.getElementById("configure_riot_button").href="https://riot.im/config/config?hs_url="+encodeURIComponent(d)+"&is_url="+encodeURIComponent(c),document.getElementById("step1_heading").innerHTML="1: Install the app",document.getElementById("step2_container").style.display="block",document.getElementById("hs_url").innerText=d,c&&(document.getElementById("custom_is").style.display="block",document.getElementById("is_url").style.display="block",document.getElementById("is_url").innerText=c))}()},8:function(e,t,r){var o,n,i;n=[],void 0===(i="function"==typeof(o=function(){var e=XMLHttpRequest;if(!e)throw new Error("missing XMLHttpRequest");function t(i,a){if("function"!=typeof a)throw new Error("Bad callback given: "+a);if(!i)throw new Error("No options given");var s=i.onResponse;if((i="string"==typeof i?{uri:i}:JSON.parse(JSON.stringify(i))).onResponse=s,i.verbose&&(t.log=function(){var e,t,r={},i=["trace","debug","info","warn","error"];for(t=0;t%(homeserverDomain)s
) to configure a TURN server in order for calls to work reliably.",{homeserverDomain:e.getDomain()},{code:n})),React.createElement("p",null,Object(a.a)("Alternatively, you can try to use the public server at turn.matrix.org
, but this will not be as reliable, and it will share your IP address with that server. You can also manage this in Settings.",null,{code:n}))),button:Object(a.a)("Try using turn.matrix.org"),cancelButton:Object(a.a)("OK"),onFinished:t=>{p.b.setValue("fallbackICEServerAllowed",null,p.a.DEVICE,t),e.setFallbackICEServerAllowed(t)}},null,!0)}();const e=s.getComponent("dialogs.ErrorDialog");i.a.createTrackedDialog("Call Failed","",e,{title:Object(a.a)("Call Failed"),description:t.message})}})),e.on("hangup",(function(){C(void 0,e.roomId,"ended")})),e.on("state",(function(t,n){if("ringing"===t)C(e,e.roomId,"ringing"),y("ringbackAudio");else if("invite_sent"===t)C(e,e.roomId,"ringback"),E("ringbackAudio");else if("ended"===t&&"connected"===n)C(void 0,e.roomId,"ended"),y("ringbackAudio"),E("callendAudio");else if("ended"===t&&"invite_sent"===n&&("remote"===e.hangupParty||"local"===e.hangupParty&&"invite_timeout"===e.hangupReason)){C(e,e.roomId,"busy"),y("ringbackAudio"),E("busyAudio");const t=s.getComponent("dialogs.ErrorDialog");i.a.createTrackedDialog("Call Handler","Call Timeout",t,{title:Object(a.a)("Call Timeout"),description:Object(a.a)("The remote side failed to pick up")+"."})}else"invite_sent"===n?(C(e,e.roomId,"stop_ringback"),y("ringbackAudio")):"ringing"===n?(C(e,e.roomId,"stop_ringing"),y("ringbackAudio")):"connected"===t&&(C(e,e.roomId,"connected"),y("ringbackAudio"))}))}function C(e,t,n){console.log(`Call state in ${t} changed to ${n} (${e?e.call_state:"-"})`),f[t]=e,"ringing"===n?E("ringAudio"):e&&"ringing"===e.call_state&&y("ringAudio"),e&&(e.call_state=n),l.a.dispatch({action:"call_state",room_id:t,state:n})}e.mxCallHandler||(l.a.register((function(e){switch(e.action){case"place_call":{if(w.getAnyActiveCall()){const e=s.getComponent("dialogs.ErrorDialog");return void i.a.createTrackedDialog("Call Handler","Existing Call",e,{title:Object(a.a)("Existing Call"),description:Object(a.a)("You are already in a call.")})}if(!o.a.get().supportsVoip()){const e=s.getComponent("dialogs.ErrorDialog");return void i.a.createTrackedDialog("Call Handler","VoIP is unsupported",e,{title:Object(a.a)("VoIP is unsupported"),description:Object(a.a)("You cannot place VoIP calls in this browser.")})}const t=o.a.get().getRoom(e.room_id);if(!t)return void console.error("Room %s does not exist.",e.room_id);const n=t.getJoinedMembers();if(n.length<=1){const e=s.getComponent("dialogs.ErrorDialog");return void i.a.createTrackedDialog("Call Handler","Cannot place call with self",e,{description:Object(a.a)("You cannot place a call with yourself.")})}if(2===n.length){console.info("Place %s call in %s",e.type,e.room_id);!function(t){if(S(t),"voice"===e.type)t.placeVoiceCall();else if("video"===e.type)t.placeVideoCall(e.remote_element,e.local_element);else if("screensharing"===e.type){const n=r.a.get().screenCaptureErrorString();if(n){C(void 0,t.roomId,"ended"),console.log("Can't capture screen: "+n);const e=s.getComponent("dialogs.ErrorDialog");return void i.a.createTrackedDialog("Call Handler","Unable to capture screen",e,{title:Object(a.a)("Unable to capture screen"),description:n})}t.placeScreenSharingCall(e.remote_element,e.local_element)}else console.error("Unknown conf call type: %s",e.type)}(c.s.createNewMatrixCall(o.a.get(),e.room_id))}else l.a.dispatch({action:"place_conference_call",room_id:e.room_id,type:e.type,remote_element:e.remote_element,local_element:e.local_element})}break;case"place_conference_call":console.info("Place conference call in %s",e.room_id),async function(e,t){l.a.dispatch({action:"appsDrawer",show:!0});const n=o.a.get().getRoom(e),r=d.a.getRoomWidgetsOfType(n,_.a.JITSI);if(h.a.roomHasPendingWidgetsOfType(e,r,_.a.JITSI)){const e=s.getComponent("dialogs.ErrorDialog");return void i.a.createTrackedDialog("Call already in progress","",e,{title:Object(a.a)("Call in Progress"),description:Object(a.a)("A call is currently being placed!")})}if(r.length>0){console.warn("Refusing to start conference call widget in "+e+" a conference call widget is already present");const t=s.getComponent("dialogs.ErrorDialog");return void i.a.createTrackedDialog("Already have Jitsi Widget","",t,{title:Object(a.a)("Call in Progress"),description:Object(a.a)("A call is already in progress!")})}const c="JitsiConference"+Object(m.a)(),u=g.a.getInstance().preferredDomain;let p=d.a.getLocalJitsiWrapperUrl();const f=new URL(p);f.search="",f.searchParams.set("confId",c),p=f.toString();const v={conferenceId:c,isAudioOnly:"voice"===t,domain:u},b="jitsi_"+o.a.get().credentials.userId+"_"+Date.now();d.a.setRoomWidget(e,b,_.a.JITSI,p,"Jitsi",v).then(()=>{console.log("Jitsi widget added")}).catch(e=>{if("M_FORBIDDEN"===e.errcode){const e=s.getComponent("dialogs.ErrorDialog");i.a.createTrackedDialog("Call Failed","",e,{title:Object(a.a)("Permission Required"),description:Object(a.a)("You do not have permission to start a conference call in this room")})}console.error(e)})}(e.room_id,e.type);break;case"incoming_call":{if(w.getAnyActiveCall())return;if(!o.a.get().supportsVoip())return;const t=e.call;S(t),C(t,t.roomId,"ringing")}break;case"hangup":if(!f[e.room_id])return;f[e.room_id].hangup(),C(null,e.room_id,"ended");break;case"answer":if(!f[e.room_id])return;f[e.room_id].answer(),C(f[e.room_id],e.room_id,"connected"),l.a.dispatch({action:"view_room",room_id:e.room_id})}})),navigator.mediaSession&&(navigator.mediaSession.setActionHandler("play",(function(){})),navigator.mediaSession.setActionHandler("pause",(function(){})),navigator.mediaSession.setActionHandler("seekbackward",(function(){})),navigator.mediaSession.setActionHandler("seekforward",(function(){})),navigator.mediaSession.setActionHandler("previoustrack",(function(){})),navigator.mediaSession.setActionHandler("nexttrack",(function(){}))));const w={getCallForRoom:function(e){let t=w.getCall(e);return t||(v&&(t=v.getConferenceCallForRoom(e)),t||null)},getCall:function(e){return f[e]||null},getAnyActiveCall:function(){const e=Object.keys(f);for(let t=0;tIn reply to ${s}
${o}
In reply to ${s}
sent an image.
In reply to ${s}
sent a video.
In reply to ${s}
sent an audio file.
In reply to ${s}
sent a file.
In reply to * ${s}
${o}