!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define([],t):"object"==typeofexports?exports.JiitsiMeetExternalAPI=t():e.JiitsiMeetExternalAPI=t()}(window,(function(){returnfunction(e){vart={};functionn(r){if(t[r])returnt[r].exports;vari=t[r]={i:r,l:!1,exports:{}};returne[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}returnn.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeofSymbol&&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)returne;if(4&t&&"object"==typeofe&&e&&e.__esModule)returne;varr=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeofe)for(variine)n.d(r,i,function(t){returne[t]}.bind(null,i));returnr},n.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnn.d(t,"a",t),t},n.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},n.p="/libs/",n(n.s=7)}([function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){returns})),n.d(t,"b",(function(){returno})),n.d(t,"c",(function(){returna})),n.d(t,"d",(function(){returnc})),n.d(t,"e",(function(){returnl})),n.d(t,"f",(function(){returnu})),n.d(t,"g",(function(){returnd})),n.d(t,"h",(function(){returnp}));varr=n(6);consti=n.n(r).a.getLogger(e);functions(e){returne.sendRequest({type:"devices",name:"getAvailableDevices"}).catch(e=>(i.error(e),{}))}functiono(e){returne.sendRequest({type:"devices",name:"getCurrentDevices"}).catch(e=>(i.error(e),{}))}functiona(e,t){returne.sendRequest({deviceType:t,type:"devices",name:"isDeviceChangeAvailable"})}functionc(e){returne.sendRequest({type:"devices",name:"isDeviceListAvailable"})}functionl(e){returne.sendRequest({type:"devices",name:"isMultipleAudioInputSupported"})}functionu(e,t,n){returnh(e,{id:n,kind:"audioinput",label:t})}functiond(e,t,n){returnh(e,{id:n,kind:"audiooutput",label:t})}functionh(e,t){returne.sendRequest({type:"devices",name:"setDevice",device:t})}functionp(e,t,n){returnh(e,{id:n,kind:"videoinput",label:t})}}).call(this,"modules/API/external/functions.js")},function(e,t,n){"use strict";varr,i="object"==typeofReflect?Reflect:null,s=i&&"function"==typeofi.apply?i.apply:function(e,t,n){returnFunction.prototype.apply.call(e,t,n)};r=i&&"function"==typeofi.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){returnObject.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){returnObject.getOwnPropertyNames(e)};varo=Number.isNaN||function(e){returne!=e};functiona(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void0,a.prototype._eventsCount=0,a.prototype._maxListeners=void0;varc=10;functionl(e){if("function"!=typeofe)thrownewTypeError('The "listener" argument must be of type Function. Received type '+typeofe)}functionu(e){returnvoid0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}functiond(e,t,n,r){vari,s,o,a;if(l(n),void0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void0===o)o=s[t]=n,++e._eventsCount;elseif("function"==typeofo?o=s[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=u(e))>0&&o.length>i&&!o.warned){o.warned=!0;varc=newError("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,a=c,console&&console.warn&&console.warn(a)}returne}functionh(){if(!this.fired)returnthis.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}functionp(e,t,n){varr={fired:!1,wrapFn:void0,target:e,type:t,listener:n},i=h.bind(r);returni.listener=n,r.wrapFn=i,i}functionf(e,t,n){varr=e._events;if(void0===r)return[];vari=r[t];returnvoid0===i?[]:"function"==typeofi?n?[i.listener||i]:[i]:n?function(e){for(vart=newArray(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];returnt}(i):m(i,i.length)}functiong(e){vart=this._events;if(void0!==t){varn=t[e];if("function"==typeofn)return1;if(void0!==n)returnn.length}return0}functionm(e,t){for(varn=newArray(t),r=0;r<t;++r)n[r]=e[r];returnn}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){returnc},set:function(e){if("number"!=typeofe||e<0||o(e))thrownewRangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),a.init=function(){void0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void0},a.prototype.setMaxListeners=function(e){if("number"!=typeofe||e<0||o(e))thrownewRangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");returnthis._maxListeners=e,this},a.prototype.getMaxListeners=function(){returnu(this)},a.prototype.emit=function(e){for(vart=[],n=1;n<arguments.length;n++)t.push(arguments[n]);varr="error"===e,i=this._events;if(void0!==i)r=r&&void0===i.error;elseif(!r)return!1;if(r){varo;if(t.length>0&&(o=t[0]),oinstanceofError)throwo;vara=newError("Unhandled error."+(o?" ("+o.message+")":""));throwa.context=o,a}varc=i[e];if(void0===c)return!1;if("function"==typeofc)s(c,this,t);else{varl=c.length,u=m(c,l);for(n=0;n<l;++n)s(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){returnd(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){returnd(this,e,t,!0)},a.prototype.once=function(e,t){returnl(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){returnl(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){varn,r,i,s,o;if(l(t),void0===(r=this._events))returnthis;if(void0===(n=r[e]))returnthis;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(deleter[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));elseif("function"!=typeofn){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,i=s;break}if(i<0)returnthis;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void0!==r.removeListener&&this.emit("removeListener",e,o||t)}returnthis},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){vart,n,r;if(void0===(n=this._events))returnthis;if(void0===n.removeListener)return0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):deleten[e]),this;if(0===arguments.length){vari,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(i=s[r])&&this.removeAllListeners(i);returnthis.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);elseif(void0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);returnthis},a.prototype.listeners=function(e){returnf(this,e,!0)},a.prototype.rawListeners=function(e){returnf(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeofe.listenerCount?e.listenerCount(t):g.call(e,t)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){returnthis._eventsCount>0?r(this._events):[]}},function(e,t){varn={trace:0,debug:1,info:2,log:3,warn:4,error:5};a.consoleTransport=console;varr=[a.consoleTransport];a.addGlobalTransport=function(e){-1===r.indexOf(e)&&r.push(e)},a.removeGlobalTransport=function(e){vart=r.indexOf(e);-1!==t&&r.splice(t,1)};vari={};functions(){vare={methodName:"",fileLocation:"",line:null,column:null},t=newError,n=t.stack?t.stack.split("\n"):[];if(!n||n.length<3)returne;varr=null;returnn[3]&&(r=n[3].match(/\s*at\s*(.+?)\s*\((\S*)\s*:(\d*)\s*:(\d*)\)/)),!r||r.length<=4?(0===n[2].indexOf("log@")?e.methodName=n[3].substr(0,n[3].indexOf("@")):e.methodName=n[2].substr(0,n[2].indexOf("@")),e):(e.methodName=r[1],e.fileLocation=r[2],e.line=r[3],e.column=r[4],e)}functiono(){vare=arguments[0],t=arguments[1],o=Array.prototype.slice.call(arguments,2);if(!(n[t]<e.level))for(vara=!(e.options.disableCallerInfo||i.disableCallerInfo)&&s(),c=r.concat(e.transports),l=0;l<c.length;l++){varu=c[l],d=u[t];if(d&&"function"==typeofd){varh=[];h.push((newDate).toISOString()),e.id&&h.push("["+e.id+"]"),a&&a.methodName.length>1&&h.push("<"+a.methodName+">: ");varp=h.concat(o);d.bind(u).apply(u,p)}}}functiona(e,t,r,i){this.id=t,this.options=i||{},this.transports=r,this.transports||(this.transports=[]),this.level=n[e];for(vars=Object.keys(n),a=0;a<s.length;a++)this[s[a]]=o.bind(null,this,s[a])}a.setGlobalOptions=function(e){i=e||{}},a.prototype.setLevel=function(e){this.level=n[e]},e.exports=a,a.levels={TRACE:"trace",DEBUG:"debug",INFO:"info",LOG:"log",WARN:"warn",ERROR:"error"}},function(e,t,n){"use strict";constr=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*\:/;t.parse=function(e,...n){consti="object"==typeofn[0]&&n[0],s=n.length>1||!i?n[0]:void0,o=n.length>1&&n[1]||i||{},a=JSON.parse(e,s);return"ignore"===o.protoAction?a:a&&"object"==typeofa&&e.match(r)?(t.scan(a,o),a):a},t.scan=function(e,t={}){letn=[e];for(;n.length;){conste=n;n=[];for(constrofe){if(Object.prototype.hasOwnProperty.call(r,"__proto__")){if("remove"!==t.protoAction)thrownewSyntaxError("Object contains forbidden prototype property");deleter.__proto__}for(consteinr){constt=r[e];t&&"object"==typeoft&&n.push(r[e])}}}},t.safeParse=function(e,n){try{returnt.parse(e,n)}catch(e){returnnull}}},function(e,t){functionn(){returnnewDOMException("The request is not allowed","NotAllowedError")}/*! clipboard-copy. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */e.exports=asyncfunction(e){try{awaitasyncfunction(e){if(!navigator.clipboard)thrown();returnnavigator.clipboard.writeText(e)}(e)}catch(t){try{awaitasyncfunction(e){constt=document.createElement("span");t.textContent=e,t.style.whiteSpace="pre",t.style.webkitUserSelect="auto",t.style.userSelect="all",document.body.appendChild(t);constr=window.getSelection(),i=window.document.createRange();r.removeAllRanges(),i.selectNode(t),r.addRange(i);lets=!1;try{s=window.document.execCommand("copy")}finally{r.removeAllRanges(),window.document.body.removeChild(t)}if(!s)thrown()}(e)}catch(e){throwe||t||n()}}}},function(e,t){e.exports=function(e){vart,n=e.scope,r=e.window,i=e.windowForEventListening||window,s=e.allowedOrigin,o={},a=[],c={},l=!1,u=function(e){vart;try{t=JSON.parse(e.data)}catch(e){return}if((!s||e.origin===s)&&t&&t.postis&&t.scope===n){varr=o[t.method];if(r)for(vari=0;i<r.length;i++)r[i].call(null,t.params);elsec[t.method]=c[t.method]||[],c[t.method].push(t.params)}};i.addEventListener("message",u,!1);vard={listen:function(e,t){o[e]=o[e]||[],o[e].push(t);varn=c[e];if(n)for(varr=o[e],i=0;i<r.length;i++)for(vars=0;s<n.length;s++)r[i].call(null,n[s]);deletec[e]},send:function(e){vart=e.method;(l||"__ready__"===e.method)&&r&&"function"==typeofr.postMessage?r.postMessage(JSON.stringify({postis:!0,scope:n,method:t,params:e.params}),"*"):a.push(e)},ready:function(e){l?e():setTimeout((function(){d.ready(e)}),50)},destroy:function(e){clearInterval(t),l=!1,i&&"function"==typeofi.removeEventListener&&i.removeEventListener("message",u),e&&e()}},h=+newDate+Math.random()+"";returnt=setInterval((function(){d.send({method:"__ready__",params:h})}),50),d.listen("__ready__",(function(e){if(e===h){clearInterval(t),l=!0;for(varn=0;n<a.length;n++)d.send(a[n]);a=[]}elsed.send({method:"__ready__",params:e})})),d}},function(e,t,n){varr=n(2),i=n(8),s={},o=[],a=r.levels.TRACE;e.exports={addGlobalTransport:function(e){r.addGlobalTransport(e)},removeGlobalTransport:function(e){r.removeGlobalTransport(e)},setGlobalOptions:function(e){r.setGlobalOptions(e)},getLogger:function(e,t,n){vari=newr(a,e,t,n);returne?(s[e]=s[e]||[],s[e].push(i)):o.push(i),i},setLogLevelById:function(e,t){for(varn=t?s[t]||[]:o,r=0;r<n.length;r++)n[r].setLevel(e)},setLogLevel:function(e){a=e;for(vart=0;t<o.length;t++)o[t].setLevel(e);for(varnins){varr=s[n]||[];for(t=0;t<r.length;t++)r[t].setLevel(e)}},levels:r.levels,LogCollector:i}},function(e,t,n){e.exports=n(9).default},function(e,t,n){varr=n(2);functioni(e,t){this.logStorage=e,this.stringifyObjects=!(!t||!t.stringifyObjects)&&t.stringifyObjects,this.storeInterval=t&&t.storeInterval?t.storeInterval:3e4,this.maxEntryLength=t&&t.maxEntryLength?t.maxEntryLength:1e4,Object.keys(r.levels).forEach(function(e){this[r.levels[e]]=function(){this._log.apply(this,arguments)}.bind(this,e)}.bind(this)),this.storeLogsIntervalID=null,this.queue=[],this.totalLen=0,this.outputCache=[]}i.prototype.stringify=function(e){try{returnJSON.stringify(e)}catch(e){return"[object with circular refs?]"}},i.prototype.formatLogMessage=function(e){for(vart="",n=1,i=arguments.length;n<i;n++){vars=arguments[n];!this.stringifyObjects&&e!==r.levels.ERROR||"object"!=typeofs||(s=this.stringify(s)),t+=s,n!==i-1&&(t+=" ")}returnt.length?t:null},i.prototype._log=function(){vare=arguments[1],t=this.formatLogMessage.apply(this,arguments);if(t){varn=this.queue[this.queue.length-1],r=n&&n.text;r===t?n.count+=1:(this.queue.push({text:t,timestamp:e,count:1}),this.totalLen+=t.length)}this.totalLen>=this.maxEntryLength&&this._flush(!0,!0)},i.prototype.start=function(){this._reschedulePublishInterval()},i.prototype._reschedulePublishInterval=function(){this.storeLogsIntervalID&&(window.clearTimeout(this.storeLogsIntervalID),this.storeLogsIntervalID=null),this.storeLogsIntervalID=window.setTimeout(this._flush.bind(this,!1,!0),this.storeInterval)},i.prototype.flush=function(){this._flush(!1,!0)},i.prototype._flush=function(e,t){this.totalLen>0&&(this.logStorage.isReady()||e)&&(this.logStorage.isReady()?(this.outputCache.length&&(this.outputCache.forEach(function(e){this.logStorage.storeLogs(e)}.bind(this)),this.outputCache=[]),this.logStorage.storeLogs(this.queue)):this.outputCache.push(this.queue),this.queue=[],this.totalLen=0),t&&this._reschedulePublishInterval()},i.prototype.stop=function(){this._flush(!1,!1)},e.exports=i},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){returnM}));varr=n(1),i=n.n(r);classsextendsi.a{constructor(...e){vart,n,r;super(...e),r={},(n="_storage")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r}clear(){this._storage={}}getlength(){returnObject.keys(this._storage).length}getItem(e){returnthis._storage[e]}setItem(e,t){this._storage[e]=t}removeItem(e){deletethis._storage[e]}key(e){constt=Object.keys(this._storage);if(!(t.length<=e))returnt[e]}serialize(){returnJSON.stringify(this._storage)}}classoextendsi.a{constructor(){super();try{this._storage=window.localStorage,this._localStorageDisabled=!1}catch(e){}this._storage||(console.warn("Local storage is disabled."),this._storage=news,this._localStorageDisabled=!0)}isLocalStorageDisabled(){returnthis._localStorageDisabled}clear(){this._storage.clear(),this.emit("changed")}getlength(){returnthis._storage.length}getItem(e){returnthis._storage.getItem(e)}setItem(e,t,n=!1){this._storage.setItem(e,t),n||this.emit("changed")}removeItem(e){this._storage.removeItem(e),this.emit("changed")}key(e){returnthis._storage.key(e)}serialize(){if(this.isLocalStorageDisabled())returnthis._storage.serialize();conste=this._storage.length,t={};for(letn=0;n<e;n++){conste=this._storage.key(n);t[e]=this._storage.getItem(e)}returnJSON.stringify(t)}}consta=newo;varc=n(3),l=n.n(c);n(4);constu=["__proto__","constructor","prototype"];functiond(e,t=!1,n="hash"){constr="search"===n?e.search:e.hash,i={},s=r&&r.substr(1).split("&")||[];if("hash"===n&&1===s.length){conste=s[0];if(e.startsWith("/")&&1===e.split("&").length)returni}returns.forEach(e=>{constn=e.split("="),r=n[0];if(!r||u.includes(r.split(".")[0]))return;lets;try{if(s=n[1],!t){conste=decodeURIComponent(s).replace(/\\&/,"&");s="undefined"===e?void0:l.a.parse(e)}}catch(e){returnvoidfunction(e,t=""){console.error(t,e),window.onerror&&window.onerror(t,null,null,null,e)}(e,"Failed to parse URL parameter value: "+String(s))}i[r]=s}),i}functionh(e){constt=newRegExp("^([a-z][a-z0-9\\.\\+-]*:)+","gi"),n=t.exec(e);if(n){letr=n[n.length-1].toLowerCase();"http:"!==r&&"https:"!==r&&(r="https:"),(e=e.substring(t.lastIndex)).startsWith("//")&&(e=r+e)}returne}functionp(e={}){constt=[];for(constnine)try{t.push(`${n}=${encodeURIComponent(JSON.stringify(e[n]))}`)}catch(e){console.warn(`Error encoding ${n}: ${e}`)}returnt}functionf(e){constt={toString:g};letn,r,i;if(e=e.replace(/\s/g,""),n=newRegExp("^([a-z][a-z0-9\\.\\+-]*:)","gi"),r=n.exec(e),r&&(t.protocol=r[1].toLowerCase(),e=e.substring(n.lastIndex)),n=newRegExp("^(//[^/?#]+)","gi"),r=n.exec(e),r){leti=r[1].substring(2);e=e.substring(n.lastIndex);consts=i.indexOf("@");-1!==s&&(i=i.substring(s+1)),t.host=i;consto=i.lastIndexOf(":");-1!==o&&(t.port=i.substring(o+1),i=i.substring(0,o)),t.hostname=i}if(n=newRegExp("^([^?#]*)","gi"),r=n.exec(e),r&&(i=r[1],e=e.substring(n.lastIndex)),i?i.startsWith("/")||(i="/"+i):i="/",t.pathname=i,e.startsWith("?")){letn=e.indexOf("#",1);-1===n&&(n=e.length),t.search=e.substring(0,n),e=e.substring(n)}elset.search="";returnt.hash=e.startsWith("#")?e:"",t}functiong(e){const{hash:t,host:n,pathname:r,protocol:i,search:s}=e||this;leto="";returni&&(o+=i),n&&(o+="//"+n),o+=r||"/",s&&(o+=s),t&&(o+=t),o}functionm(e){lett;t=e.serverURL&&e.room?newURL(e.room,e.serverURL).toString():e.room?e.room:e.url||"";constn=f(h(t));if(!n.protocol){lett=e.protocol||e.scheme;t&&(t.endsWith(":")||(t+=":"),n.protocol=t)}let{pathname:r}=n;if(!n.host){constt=e.domain||e.host||e.hostname;if(t){const{host:e,hostname:i,pathname:s,port:o}=f(h("org.jitsi.meet://"+t));e&&(n.host=e,n.hostname=i,n.port=o),"/"===r&&"/"!==s&&(r=s)}}consti=e.roomName||e.room;!i||!n.pathname.endsWith("/")&&n.pathname.endsWith("/"+i)||(r.endsWith("/")||(r+="/"),r+=i),n.pathname=r;const{jwt:s}=e;if(s){let{search:e}=n;-1===e.indexOf("?jwt=")&&-1===e.indexOf("&jwt=")&&(e.startsWith("?")||(e="?"+e),1===e.length||(e+="&"),e+="jwt="+s,n.search=e)}let{hash:o}=n;for(consttof["config","interfaceConfig","devices","userInfo","appData"]){constn=p(e[t+"Overwrite"]||e[t]||e[t+"Override"]);if(n.length){lete=`${t}.${n.join(`&${t}.`)}`;o.length?e="&"+e:o="#",o+=e}}returnn.hash=o,n.toString()||void0}varv=n(5),y=n.n(v);function_(e,t,n){returntine?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}constb={window:window.opener||window.parent};classw{constructor({postisOptions:e}={}){this.postis=y()(function(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeofObject.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){returnObject.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_(e,t,n[t])}))}returne}({},b,e)),this._receiveCallback=()=>{},this.postis.listen("message",e=>this._receiveCallback(e))}dispose(){this.postis.destroy()}send(e){this.postis.send({method:"message",params:e})}setReceiveCallback(e){this._receiveCallback=e}}classL{constructor({backend:e}={}){this._listeners=newMap,this._requestID=0,this._responseHandlers=newMap,this._unprocessedMessages=newSet,this.addListener=this.on,e&&this.setBackend(e)}_disposeBackend(){this._backend&&(this._backend.dispose(),this._backend=null)}_onMessageReceived(e){if("response"===e.type){constt=this._responseHandlers.get(e.id);t&&(t(e),this._responseHandlers.delete(e.id))}else"request"===e.type?this.emit("request",e.data,(t,n)=>{this._backend.send({type:"response",error:n,id:e.id,result:t})}):this.emit("event",e.data)}dispose(){this._responseHandlers.clear(),this._unprocessedMessages.clear(),this.removeAllListeners(),this._disposeBackend()}emit(e,...t){constn=this._listeners.get(e);letr=!1;returnn&&n.size&&n.forEach(e=>{r=e(...t)||r}),r||this._unprocessedMessages.add(t),r}on(e,t){letn=this._listeners.get(e);returnn||(n=newSet,this._listeners.set(e,n)),n.add(t),this._unprocessedMessages.forEach(e=>{t(...e)&&this._unprocessedMessages.delete(e)}),this}removeAllListeners(e){returne?this._listeners.delete(e):this._listeners.clear(),this}removeListener(e,t){constn=this._listeners.get(e);returnn&&n.delete(t),this}sendEvent(e={}){this._backend&&this._backend.send({type:"event",data:e})}sendRequest(e){if(!this._backend)returnPromise.reject(newError("No transport backend defined!"));this._requestID++;constt=this._requestID;returnnewPromise((n,r)=>{this._responseHandlers.set(t,({error:e,result:t})=>{void0!==t?n(t):r(void0!==e?e:newError("Unexpected response format!"))}),this._backend.send({type:"request",data:e,id:t})})}setBackend(e){this._disposeBackend(),this._backend=e,this._backend.setReceiveCallback(this._onMessageReceived.bind(this))}}constO=d(window.location).jitsi_meet_external_api_id,x={};letj;"number"==typeofO&&(x.scope="jitsi_meet_external_api_"+O),(window.JitsiMeetJS||(window.JitsiMeetJS={}),window.JitsiMeetJS.app||(window.JitsiMeetJS.app={}),window.JitsiMeetJS.app).setExternalTransportBackend=e=>j.setBackend(e);varC=n(0);functionS(e,t){if(null==e)return{};varn,r,i=function(e,t){if(null==e)return{};varn,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);returni}(e,t);if(Object.getOwnPropertySymbols){vars=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}returni}functionE(e,t,n){returntine?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}constI=["css/all.css","libs/alwaysontop.min.js"],k={avatarUrl:"avatar-url",cancelPrivateChat:"cancel-private-chat",displayName:"display-name",e2eeKey:"e2ee-key",email:"email",toggleLobby:"toggle-lobby",hangup:"video-hangup",initiatePrivateChat:"initiate-private-chat",kickParticipant:"kick-participant",muteEveryone:"mute-everyone",overwriteConfig:"overwrite-config",password:"password",pinParticipant:"pin-participant",resizeLargeVideo:"resize-large-video",sendEndpointTextMessage:"send-endpoint-text-message",sendTones:"send-tones",setLargeVideoParticipant:"set-large-video-participant",setTileView:"set-tile-view",setVideoQuality:"set-video-quality",startRecording:"start-recording",startShareVideo:"start-share-video",stopRecording:"stop-recording",stopShareVideo:"stop-share-video",subject:"subject",submitFeedback:"submit-feedback",toggleAudio:"toggle-audio",toggleCamera:"toggle-camera",toggleCameraMirror:"toggle-camera-mirror",toggleChat:"toggle-chat",toggleFilmStrip:"toggle-film-strip",toggleRaiseHand:"toggle-raise-hand",toggleShareScreen:"toggle-share-screen",toggleTileView:"toggle-tile-view",toggleVideo:"toggle-video"},R={"avatar-changed":"avatarChanged","audio-availability-changed":"audioAvailabilityChanged","audio-mute-status-changed":"audioMuteStatusChanged","camera-error":"cameraError","chat-updated":"chatUpdated","content-sharing-participants-changed":"contentSharingParticipantsChanged","device-list-changed":"deviceListChanged","display-name-change":"displayNameChange","email-change":"emailChange","endpoint-text-message-received":"endpointTextMessageReceived","feedback-submitted":"feedbackSubmitted","feedback-prompt-displayed":"feedbackPromptDisplayed","filmstrip-display-changed":"filmstripDisplayChanged","incoming-message":"incomingMessage",log:"log","mic-error":"micError","outgoing-message":"outgoingMessage","participant-joined":"participantJoined","participant-kicked-out":"participantKickedOut","participant-left":"participantLeft","participant-role-changed":"participantRoleChanged","password-required":"passwordRequired","proxy-connection-event":"proxyConnectionEvent","raise-hand-updated":"raiseHandUpdated","recording-status-changed":"recordingStatusChanged","video-ready-to-close":"readyToClose","video-conference-joined":"videoConferenceJoined","video-conference-left":"videoConferenceLeft","video-availability-changed":"videoAvailabilityChanged","video-mute-status-changed":"videoMuteStatusChanged","video-quality-changed":"videoQualityChanged","screen-sharing-status-changed":"screenSharingStatusChanged","dominant-speaker-changed":"dominantSpeakerChanged","subject-change":"subjectChange","suspend-detected":"suspendDetected","tile-view-changed":"tileViewChanged"};letP=0;functionN(e,t){e._numberOfParticipants+=t}functionD(e,t={}){returnm(function(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeofObject.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){returnObject.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}returne}({},t,{url:`https://${e}/#jitsi_meet_external_api_id=${P}`}))}functionA(e){lett;return"string"==typeofe&&null!==String(e).match(/([0-9]*\.?[0-9]+)(em|pt|px|%)$/)?t=e:"number"==typeofe&&(t=e+"px"),t}classMextendsi.a{constructor(e,...t){super();const{roomName:n="",width:r="100%",height:i="100%",parentNode:s=document.body,configOverwrite:o={},interfaceConfigOverwrite:c={},jwt:l,onload:u,invitees:d,devices:h,userInfo:p,e2eeKey:f}=function(e){if(!e.length)return{};switch(typeofe[0]){case"string":casevoid0:{const[t,n,r,i,s,o,a,c]=e;return{roomName:t,width:n,height:r,parentNode:i,configOverwrite:s,interfaceConfigOverwrite:o,jwt:a,onload:c}}case"object":returne[0];default:thrownewError("Can't parse the arguments!")}}(t),g=a.getItem("jitsiLocalStorage");this._parentNode=s,this._url=D(e,{configOverwrite:o,interfaceConfigOverwrite:c,jwt:l,roomName:n,devices:h,userInfo:p,appData:{localStorageContent:g}}),this._createIFrame(i,r,u),this._transport=newL({backend:neww({postisOptions:{allowedOrigin:newURL(this._url).origin,scope:"jitsi_meet_external_api_"+P,window:this._frame.contentWindow}})}),Array.isArray(d)&&d.length>0&&this.invite(d),this._tmpE2EEKey=f,this._isLargeVideoVisible=!0,this._numberOfParticipants=0,this._participants={},this._myUserID=void0,this._onStageParticipant=void0,this._setupListeners(),P++}_createIFrame(e,t,n){constr="jitsiConferenceFrame"+P;this._frame=document.createElement("iframe"),this._frame.allow="camera; microphone; display-capture; autoplay; clipboard-write",this._frame.src=this._url,this._frame.name=r,this._frame.id=r,this._setSize(e,t),this._frame.setAttribute("allowFullScreen","true"),this._frame.style.border=0,n&&(this._frame.onload=n),this._frame=this._parentNode.appendChild(this._frame)}_getAlwaysOnTopResources(){conste=this._frame.contentWindow,t=e.document;letn="";constr=t.querySelector("base");if(r&&r.href)n=r.href;else{const{protocol:t,host:r}=e.location;n=`${t}//${r}`}returnI.map(e=>newURL(e,n).href)}_getFormattedDisplayName(e){const{formattedDisplayName:t}=this._participants[e]||{};returnt}_getOnStageParticipant(){returnthis._onStageParticipant}_getLargeVideo(){conste=this.getIFrame();if(this._isLargeVideoVisible&&e&&e.contentWindow&&e.contentWindow.document)returne.contentWindow.document.getElementById("largeVideo")}_getParticipantVideo(e){constt=this.getIFrame();if(t&&t.contentWindow&&t.contentWindow.document)returnvoid0===e||e===this._myUserID?t.contentWindow.document.getElementById("localVideo_container"):t.contentWindow.document.querySelector(`#participant_${e} video`)}_setSize(e,t){constn=A(e),r=A(t);void0!==n&&(this._height=e,this._frame.style.height=n),void0!==r&&(this._width=t,this._frame.style.width=r)}_setupListeners(){this._transport.on("event",e=>{let{name:t}=e,n=S(e,["name"]);constr=n.id;switch(t){case"video-conference-joined":void0!==this._tmpE2EEKey&&(this.executeCommand(k.e2eeKey,this._tmpE2EEKey),this._tmpE2EEKey=void0),this._myUserID=r,this._participants[r]={avatarURL:n.avatarURL};case"participant-joined":this._participants[r]=this._participants[r]||{},this._participants[r].displayName=n.displayName,this._participants[r].formattedDisplayName=n.formattedDisplayName,N(this,1);break;case"participant-left":N(this,-1),deletethis._participants[r];break;case"display-name-change":{conste=this._participants[r];e&&(e.displayName=n.displayname,e.formattedDisplayName=n.formattedDisplayName);break}case"email-change":{conste=this._participants[r];e&&(e.email=n.email);break}case"avatar-changed":{conste=this._participants[r];e&&(e.avatarURL=n.avatarURL);break}case"on-stage-participant-changed":this._onStageParticipant=r,this.emit("largeVideoChanged");break;case"large-video-visibility-changed":this._isLargeVideoVisible=n.isVisible,this.emit("largeVideoChanged");break;case"video-conference-left":N(this,-1),deletethis._participants[this._myUserID];break;case"video-quality-changed":this._videoQuality=n.videoQuality;break;case"local-storage-changed":returna.setItem("jitsiLocalStorage",n.localStorageContent),!0}consti=R[t];return!!i&&(this.emit(i,n),!0)})}addEventListener(e,t){this.on(e,t)}addEventListeners(e){for(consttine)this.addEventListener(t,e[t])}captureLargeVideoScreenshot(){returnthis._transport.sendRequest({name:"capture-largevideo-screenshot"})}dispose(){this.emit("_willDispose"),this._transport.dispose(),this.removeAllListeners(),this._frame&&this._frame.parentNode&&this._frame.parentNode.removeChild(this._frame)}executeCommand(e,...t){eink?this._transport.sendEvent({data:t,name:k[e]}):console.error("Not supported command name.")}executeCommands(e){for(consttine)this.executeCommand(t,e[t])}getAvailableDevices(){returnObject(C.a)(this._transport)}getContentSharingParticipants(){returnthis._transport.sendRequest({name:"get-content-sharing-participants"})}getCurrentDevices(){returnObject(C.b)(this._transport)}getLivestreamUrl(){returnthis._transport.sendRequest({name:"get-livestream-url"})}getParticipantsInfo(){conste=Object.keys(this._participants),t=Object.values(this._participants);returnt.forEach((t,n)=>{t.participantId=e[n]}),t}getVideoQuality(){returnthis._videoQuality}isAudioAvailable(){returnthis._transport.sendRequest({name:"is-audio-available"})}isDeviceChangeAvailable(e){returnObject(C.c)(this._transport,e)}isDeviceListAvailable(){returnObject(C.d)(this._transport)}isMultipleAudioInputSupported(){returnObject(C.e)(this._transport)}invite(e){returnArray.isArray(e)&&0!==e.length?this._transport.sendRequest({name:"invite",invitees:e}):Promise.reject(newTypeError("Invalid Argument"))}isAudioMuted(){returnthis._transport.sendRequest({name:"is-audio-muted"})}isSharingScreen(){returnthis._transport.sendRequest({name:"is-sharing-screen"})}getAvatarURL(e){const{avatarURL:t}=this._participants[e]||{};returnt}getDisplayName(e){const{displayName:t}=this._participants[e]||{};returnt}getEmail(e){const{email:t}=this._participants[e]||{};returnt}getIFrame(){returnthis._frame}getNumberOfParticipants(){returnthis._numberOfParticipants}isVideoAvailable(){returnthis._transport.sendRequest({name:"is-video-available"})}isVideoMuted(){returnthis._transport.sendRequest({name:"is-video-muted"})}pinParticipant(e){this.executeCommand("pinParticipant",e)}removeEventListener(e){this.removeAllListeners(e)}removeEventListeners(e){e.forEach(e=>this.removeEventListener(e))}resizeLargeVideo(e,t){e<=this._width&&t<=this._height&&this.executeCommand("resizeLargeVideo",e,t)}sendProxyConnectionEvent(e){this._transport.sendEvent({data:[e],name:"proxy-connection-event"})}setAudioInputDevice(e,t){returnObject(C.f)(this._transport,e,t)}setAudioOutputDevice(e,t){returnObject(C.g)(this._transport,e,t)}setLargeVideoParticipant(e){this.executeCommand("setLargeVideoParticipant",e)}setVideoInputDevice(e,t){returnObject(C.h)(this._transport,e,t)}startRecording(e){this.executeCommand("startRecording",e)}stopRecording(e){this.executeCommand("startRecording",e)}}}])}));//# sourceMappingURL=external_api.min.map