You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
6.7 KiB

!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1421)}({110:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return u}));var i=n(5),r=n.n(i),o=n(93);let s,a,c;!function(e){e.Screenshot="m.capability.screenshot",e.Sticker="m.sticker",e.AlwaysOnScreen="m.always_on_screen"}(s||(s={})),function(e){e.GetSupportedApiVersions="supported_api_versions",e.TakeScreenshot="screenshot",e.GetCapabilities="capabilities",e.SendEvent="send_event",e.UpdateVisibility="visibility",e.ReceiveOpenIDCredentials="openid_credentials",e.SetAlwaysOnScreen="set_always_on_screen",e.ClientReady="im.vector.ready"}(a||(a={})),function(e){e.ToWidget="toWidget",e.FromWidget="fromWidget"}(c||(c={}));class u{constructor(e,t,n){this.widgetId=t,this.requestedCapabilities=n,r()(this,"origin",void 0),r()(this,"inFlightRequests",{}),r()(this,"readyPromise",void 0),r()(this,"readyPromiseResolve",void 0),r()(this,"expectingExplicitReady",!1),this.origin=new URL(e).origin,this.readyPromise=new Promise(e=>this.readyPromiseResolve=e),window.addEventListener("message",e=>{if(e.origin!==this.origin)return;if(!e.data)return;if(e.data.widgetId!==this.widgetId)return;const t=e.data;if(t.api===c.ToWidget&&t.action)console.log("[WidgetAPI] Got request: ".concat(JSON.stringify(t))),t.action===a.GetCapabilities?(this.onCapabilitiesRequest(t),this.expectingExplicitReady||this.readyPromiseResolve()):t.action===a.ClientReady?(this.readyPromiseResolve(),this.replyToRequest(t,{})):console.warn("[WidgetAPI] Got unexpected action: ".concat(t.action));else if(t.api===c.FromWidget&&this.inFlightRequests[t.requestId]){console.log("[WidgetAPI] Got reply: ".concat(JSON.stringify(t)));const e=this.inFlightRequests[t.requestId];delete this.inFlightRequests[t.requestId],e(t)}else console.warn("[WidgetAPI] Unhandled payload: ".concat(JSON.stringify(t)))})}waitReady(){return this.readyPromise}replyToRequest(e,t){if(!window.parent)return;const n=JSON.parse(JSON.stringify(e));n.response=t,window.parent.postMessage(n,this.origin)}onCapabilitiesRequest(e){return this.replyToRequest(e,{capabilities:this.requestedCapabilities})}callAction(e,t,n){if(!window.parent)return;const i={api:c.FromWidget,widgetId:this.widgetId,action:e,requestId:Object(o.a)(160),data:t,response:{}};n&&(this.inFlightRequests[i.requestId]=n),console.log("[WidgetAPI] Sending request: ",i),window.parent.postMessage(i,"*")}setAlwaysOnScreen(e){return new Promise(t=>{this.callAction(a.SetAlwaysOnScreen,{value:e},null),t()})}}},1421:function(e,t,n){"use strict";n.r(t);var i=n(157),r=n(110);n(1422);let o,s,a,c,u,d,l=!1;function p(){l=!l,document.getElementById("jitsiContainer").style.visibility=l?"unset":"hidden",document.getElementById("joinButtonContainer").style.visibility=l?"hidden":"unset"}!async function(){try{const e=i.parse(window.location.hash.substring(1)),t=Object.assign({},i.parse(window.location.search.substring(1)),e),n=(e,n=!1)=>{if(!(n||t[e]&&"string"==typeof t[e]))throw new Error("Expected singular ".concat(e," in query string"));return t[e]},l=n("parentUrl",!0),f=n("widgetId",!0);l&&f&&(d=new r.c(n("parentUrl"),n("widgetId"),[r.a.AlwaysOnScreen]),d.expectingExplicitReady=!0),o=n("conferenceDomain"),s=n