1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4147],{86005:function(e,t,n){var r,i;void 0!==(i="function"==typeof(r=function(){"use strict";var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],i={},a=null;function o(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(){for(var n=this.getLevel(),i=0;i<r.length;i++){var a=r[i];this[a]=i<n?e:this.methodFactory(a,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return"No console available for logging"}function l(e){return function(){typeof console!==t&&(u.call(this),this[e].apply(this,arguments))}}function s(r,i,a){var u;return"debug"===(u=r)&&(u="log"),typeof console!==t&&("trace"===u&&n?c:void 0!==console[u]?o(console,u):void 0!==console.log?o(console,"log"):e)||l.apply(this,arguments)}function d(e,n){var o,c,l,d=this,f="loglevel";function p(){var e;if(typeof window!==t&&f){try{e=window.localStorage[f]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(f),i=n.indexOf(r+"=");-1!==i&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch(e){}return void 0===d.levels[e]&&(e=void 0),e}}function h(e){var t=e;if("string"==typeof t&&void 0!==d.levels[t.toUpperCase()]&&(t=d.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=d.levels.SILENT)return t;throw TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?f+=":"+e:"symbol"==typeof e&&(f=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=n||s,d.getLevel=function(){return null!=l?l:null!=c?c:o},d.setLevel=function(e,n){return l=h(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&f){try{window.localStorage[f]=n;return}catch(e){}try{window.document.cookie=encodeURIComponent(f)+"="+n+";"}catch(e){}}}(l),u.call(d)},d.setDefaultLevel=function(e){c=h(e),p()||d.setLevel(e,!1)},d.resetLevel=function(){l=null,function(){if(typeof window!==t&&f){try{window.localStorage.removeItem(f)}catch(e){}try{window.document.cookie=encodeURIComponent(f)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),u.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(a!==d&&(o=h(a.getLevel())),u.call(d),a===d)for(var e in i)i[e].rebuild()},o=h(a?a.getLevel():"WARN");var v=p();null!=v&&(l=h(v)),u.call(d)}(a=new d).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new d(e,a.methodFactory)),t};var f=typeof window!==t?window.log:void 0;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=f),a},a.getLoggers=function(){return i},a.default=a,a})?r.call(t,n,t,e):r)&&(e.exports=i)},84147:function(e,t,n){"use strict";n.d(t,{WP:function(){return tD},Me:function(){return tq},IC:function(){return tY},y7:function(){return tZ},FN:function(){return tG},z1:function(){return tf},j1:function(){return tv},BL:function(){return tm},As:function(){return tb},fZ:function(){return tu},Ih:function(){return tg}});var r,i,a=n(2265),o=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t)){var a=t.length;for(n=0;n<a;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r)}return i}(e))&&(r&&(r+=" "),r+=t);return r},c=n(53819),u=n(86005),l=n(5853);function s(e){return"function"==typeof e}function d(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var f=d(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function p(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var h=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,n,r,i,a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=(0,l.__values)(a),c=o.next();!c.done;c=o.next())c.value.remove(this)}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var u=this.initialTeardown;
1if(s(u))try{u()}catch(e){i=e instanceof f?e.errors:[e]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var p=(0,l.__values)(d),h=p.next();!h.done;h=p.next()){var v=h.value;try{m(v)}catch(e){i=null!=i?i:[],e instanceof f?i=(0,l.__spreadArray)((0,l.__spreadArray)([],(0,l.__read)(i)),(0,l.__read)(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}}if(i)throw new f(i)}},t.prototype.add=function(e){var n;if(e&&e!==this){if(this.closed)m(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&p(t,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&p(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}();function v(e){return e instanceof h||e&&"closed"in e&&s(e.remove)&&s(e.add)&&s(e.unsubscribe)}function m(e){s(e)?e():e.unsubscribe()}h.EMPTY;var b={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},g={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=g.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,(0,l.__spreadArray)([e,t],(0,l.__read)(n))):setTimeout.apply(void 0,(0,l.__spreadArray)([e,t],(0,l.__read)(n)))},clearTimeout:function(e){var t=g.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function y(e){g.setTimeout(function(){var t=b.onUnhandledError;if(t)t(e);else throw e})}function w(){}var E=k("C",void 0,void 0);function k(e,t,n){return{kind:e,value:t,error:n}}var S=null,T=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,v(t)&&t.add(n)):n.destination=R,n}return(0,l.__extends)(t,e),t.create=function(e,t,n){return new P(e,t,n)},t.prototype.next=function(e){this.isStopped?A(k("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?A(k("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?A(E,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(h),C=Function.prototype.bind;function x(e,t){return C.call(e,t)}var _=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){M(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){M(e)}else M(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){M(e)}},e}(),P=function(e){function t(t,n,r){var i,a,o=e.call(this)||this;return s(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:o&&b.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},i={next:t.next&&x(t.next,a),error:t.error&&x(t.error,a),complete:t.complete&&x(t.complete,a)}):i=t,o.destination=new _(i),o}return(0,l.__extends)(t,e),t}(T);function M(e){b.useDeprecatedSynchronousErrorHandling?b.useDeprecatedSynchronousErrorHandling&&S&&(S.errorThrown=!0,S.error=e):y(e)}function A(e,t){var n=b.onStoppedNotification;n&&g.setTimeout(function(){return n(e,t)})}var R={closed:!0,next:w,error:function(e){throw e},complete:w},L="function"==typeof Symbol&&Symbol.observable||"@@observable";function Q(e){return e}var O=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,i=this,a=(r=e)&&r instanceof T||r&&s(r.next)&&s(r.error)&&s(r.complete)&&v(r)?e:ne
1w P(e,t,n);return function(e){if(b.useDeprecatedSynchronousErrorHandling){var t=!S;if(t&&(S={errorThrown:!1,error:null}),e(),t){var n=S,r=n.errorThrown,i=n.error;if(S=null,r)throw i}}else e()}(function(){var e=i.operator,t=i.source;a.add(e?e.call(a,t):t?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=I(t))(function(t,r){var i=new P({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[L]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0===e.length?Q:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=I(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function I(e){var t;return null!==(t=null!=e?e:b.Promise)&&void 0!==t?t:Promise}function N(e){return function(t){if(s(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function z(e,t,n,r,i){return new U(e,t,n,r,i)}var U=function(e){function t(t,n,r,i,a,o){var c=e.call(this,t)||this;return c.onFinalize=a,c.shouldUnsubscribe=o,c._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,c._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,c}return(0,l.__extends)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),n||null===(t=this.onFinalize)||void 0===t||t.call(this)}},t}(T);function F(e,t){return N(function(n,r){var i=0;n.subscribe(z(r,function(n){r.next(e.call(t,n,i++))}))})}var $=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function V(e){return s(null==e?void 0:e.then)}function D(e){return Symbol.asyncIterator&&s(null==e?void 0:e[Symbol.asyncIterator])}function j(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var H="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Z(e){return s(null==e?void 0:e[H])}function W(e){return(0,l.__asyncGenerator)(this,arguments,function(){var t,n,r;return(0,l.__generator)(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,(0,l.__await)(t.read())];case 3:if(r=(n=i.sent()).value,!n.done)return[3,5];return[4,(0,l.__await)(void 0)];case 4:return[2,i.sent()];case 5:return[4,(0,l.__await)(r)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function J(e){return s(null==e?void 0:e.getReader)}function B(e){if(e instanceof O)return e;if(null!=e){if(s(e[L]))return new O(function(t){var n=e[L]();if(s(n.subscribe))return n.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")});if($(e))return new O(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()});if(V(e))return new O(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,y)});if(D(e))return q(e);if(Z(e))return new O(function(t){var n,r;try{for(var i=(0,l.__values)(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()});if(J(e))return q(W(e))}throw j(e)}function q(e){return new O(function(t){(function(e,t){var n,r,i,a;return(0,l.__awaiter)(this,void 0,void 0,function(){var o;return(0,l.__generator)(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=(0,l.__asyncValues)(e),c.label=1;case 1:return[4,n.next()];case 2:if((r=c.sent()).done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:c.sent()},[3,11];case 6:if(c.trys.push([6,,9,10]),!(r&&!r.done&&(a=n.return)))return[3,8];return[4,a.call(n)];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];
1case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function Y(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function G(e,t,n){return(void 0===n&&(n=1/0),s(t))?G(function(n,r){return F(function(e,i){return t(n,e,r,i)})(B(e(n,r)))},n):("number"==typeof t&&(n=t),N(function(t,r){var i,a,o,c,u,l,s,d,f;return i=n,o=[],c=0,u=0,l=!1,s=function(){!l||o.length||c||r.complete()},d=function(e){return c<i?f(e):o.push(e)},f=function(t){c++;var n=!1;B(e(t,u++)).subscribe(z(r,function(e){a?d(e):r.next(e)},function(){n=!0},void 0,function(){if(n)try{for(c--;o.length&&c<i;)!function(){var e=o.shift();f(e)}();s()}catch(e){r.error(e)}}))},t.subscribe(z(r,d,function(){l=!0,s()})),function(){}}))}function X(e){var t;return(t=e[e.length-1])&&s(t.schedule)?e.pop():void 0}function K(e,t){return void 0===t&&(t=0),N(function(n,r){n.subscribe(z(r,function(n){return Y(r,e,function(){return r.next(n)},t)},function(){return Y(r,e,function(){return r.complete()},t)},function(n){return Y(r,e,function(){return r.error(n)},t)}))})}function ee(e,t){return void 0===t&&(t=0),N(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function et(e,t){if(!e)throw Error("Iterable cannot be null");return new O(function(n){Y(n,t,function(){var r=e[Symbol.asyncIterator]();Y(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function en(e,t){return t?function(e,t){if(null!=e){if(s(e[L]))return B(e).pipe(ee(t),K(t));if($(e))return new O(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})});if(V(e))return B(e).pipe(ee(t),K(t));if(D(e))return et(e,t);if(Z(e))return new O(function(n){var r;return Y(n,t,function(){r=e[H](),Y(n,t,function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return s(null==r?void 0:r.return)&&r.return()}});if(J(e))return et(W(e),t)}throw j(e)}(e,t):B(e)}function er(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(void 0===(e=1)&&(e=1/0),G(Q,e))(en(t,X(t)))}function ei(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=X(e);return N(function(t,r){(n?er(e,t,n):er(e,t)).subscribe(r)})}function ea(e,t){return N(function(n,r){var i=null,a=0,o=!1,c=function(){return o&&!i&&r.complete()};n.subscribe(z(r,function(n){null==i||i.unsubscribe();var o=0,u=a++;B(e(n,u)).subscribe(i=z(r,function(e){return r.next(t?t(n,e,u,o++):e)},function(){i=null,c()}))},function(){o=!0,c()}))})}function eo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=X(e);return en(e,n)}var ec=Array.isArray,eu=["addListener","removeListener"],el=["addEventListener","removeEventListener"],es=["on","off"];function ed(e,t){return function(n){return function(r){return e[n](t,r)}}}var ef=function(e){function t(t,n){return e.call(this)||this}return(0,l.__extends)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(h),ep={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=ep.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,(0,l.__spreadArray)([e,t],(0,l.__read)(n))):setInterval.apply(void 0,(0,l.__spreadArray)([e,t],(0,l.__read)(n)))},clearInterval:function(e){var t=ep.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},eh=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return(0,l.__extends)(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n,r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),ep.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&ep.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;
1this.work=this.state=this.scheduler=null,this.pending=!1,p(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(ef),ev={now:function(){return(ev.delegate||Date).now()},delegate:void 0},em=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=ev.now,e}(),eb=new(function(e){function t(t,n){void 0===n&&(n=em.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return(0,l.__extends)(t,e),t.prototype.flush=function(e){var t,n=this.actions;if(this._active){n.push(e);return}this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,t){for(;e=n.shift();)e.unsubscribe();throw t}},t}(em))(eh),eg=d(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function ey(e){throw new eg(e)}function ew(e,t){return e===t}function eE(e){var t;return void 0!==e&&(!!e&&e.hasOwnProperty("participant")&&e.hasOwnProperty("source")&&e.hasOwnProperty("track")&&void 0!==(null==(t=e.publication)?void 0:t.track)||!!e&&e.hasOwnProperty("participant")&&e.hasOwnProperty("source")&&e.hasOwnProperty("publication")&&void 0!==e.publication)}function ek(e){return!!e&&e.hasOwnProperty("participant")&&e.hasOwnProperty("source")&&void 0===e.publication}function eS(e){if("string"==typeof e||"number"==typeof e)return`${e}`;if(ek(e))return`${e.participant.identity}_${e.source}_placeholder`;if(eE(e))return`${e.participant.identity}_${e.publication.source}_${e.publication.trackSid}`;throw Error(`Can't generate a id for the given track reference: ${e}`)}function eT(e,t){return void 0!==t&&(eE(e)?t.some(t=>t.participant.identity===e.participant.identity&&eE(t)&&t.publication.trackSid===e.publication.trackSid):!!ek(e)&&t.some(t=>t.participant.identity===e.participant.identity&&ek(t)&&t.source===e.source))}Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var eC=[c.TQ.ConnectionStateChanged,c.TQ.RoomMetadataChanged,c.TQ.ActiveSpeakersChanged,c.TQ.ConnectionQualityChanged,c.TQ.ParticipantConnected,c.TQ.ParticipantDisconnected,c.TQ.ParticipantPermissionsChanged,c.TQ.ParticipantMetadataChanged,c.TQ.TrackMuted,c.TQ.TrackUnmuted,c.TQ.TrackPublished,c.TQ.TrackUnpublished,c.TQ.TrackStreamStateChanged,c.TQ.TrackSubscriptionFailed,c.TQ.TrackSubscriptionPermissionChanged,c.TQ.TrackSubscriptionStatusChanged,c.TQ.LocalTrackPublished,c.TQ.LocalTrackUnpublished];c.dd.TrackPublished,c.dd.TrackUnpublished,c.dd.TrackMuted,c.dd.TrackUnmuted,c.dd.TrackStreamStateChanged,c.dd.TrackSubscribed,c.dd.TrackUnsubscribed,c.dd.TrackSubscriptionPermissionChanged,c.dd.TrackSubscriptionFailed,c.dd.LocalTrackPublished,c.dd.LocalTrackUnpublished;var ex=[c.dd.ConnectionQualityChanged,c.dd.IsSpeakingChanged,c.dd.ParticipantMetadataChanged,c.dd.ParticipantPermissionsChanged,c.dd.TrackMuted,c.dd.TrackUnmuted,c.dd.TrackPublished,c.dd.TrackUnpublished,c.dd.TrackStreamStateChanged,c.dd.TrackSubscriptionFailed,c.dd.TrackSubscriptionPermissionChanged,c.dd.TrackSubscriptionStatusChanged,c.dd.LocalTrackPublished,c.dd.LocalTrackUnpublished],e_=u.getLogger("lk-components-js");e_.setDefaultLevel("WARN");var eP=[{columns:1,rows:1,name:"1x1",minTiles:1,maxTiles:1,minWidth:0,minHeight:0},{columns:1,rows:2,name:"1x2",minTiles:2,maxTiles:2,minWidth:0,minHeight:0},{columns:2,rows:1,name:"2x1",minTiles:2,maxTiles:2,minWidth:900,minHeight:0},{columns:2,rows:2,name:"2x2",minTiles:3,maxTiles:4,minWidth:560,minHeight:0},{columns:3,rows:3,name:"3x3",minTiles:5,maxTiles:9,minWidth:700,minHeight:0},{columns:4,rows:4,name:"4x4",minTiles:10,maxTiles:16,minWidth:960,minHeight:0},{columns:5,rows:5,name:"5x5",minTiles:17,maxTiles:25,minWidth:1100,minHeight:0}];function eM(e){return"object"==typeof e}function eA(e){return Array.isArray(e)&&e.filter(eM).length>0}function eR(e,t){var n,r,i,a;return(null!=(r=null==(n=e.joinedAt)?void 0:n.getTime())?r:0)-(null!=(a=null==(i=t.joinedAt)?void 0:i.getTime())?a:0)}function eL(e,t){return Array(Math.max(e.length,t.length)).fill([]).map((n,r)=>[e[r],t[r]])}function eQ(e,t,n){return e.filter(e=>!t.map(e=>n(e)).includes(n(e)))}function eO(e){return e.map(e=>"string"==typeof e||"number"==typeof e?`${e}`:eS(e))}function eI(e,t){let n=t.findIndex(t=>eS(t)===eS(e));if(-1===n)throw Error(`Element not part of the array: ${eS(e)} not in ${eO(t)}`);return n}function eN(e,t){return e.reduce((e,n,r)=>r%t==0?[...e,[n]]:[...e.slice(0,-1),[...e.slice(-1)[0],n]],[])}function ez(e){return`lk-${e}`}function eU(e){if(eE(e))return e.publication;{let{source:t,name:n,participant:r}=e;if(t&&n)return r.getTrackPublications().find(e=>e.source===t&&e.trackName===n);if(n)return r.getTrackPublicationByName(n);if(t)return r.getTrackPublication(t);throw Error("At least one of source and name needs to be defined")}}function eF(e,...t){return new O(n=>{let r=()=>{n.next(e)};return t.forEach(t=>{e.on(t,r)}),()=>{t.forEach(t=>{e.off(t,r)})}}).pipe(ei(e))}function e$(e,t){return new O(n=>{let r=(...e)=>{n.next(e)};return e.on(t,r),()=>{e.off(t,r)}})}function eV(e,...t){return new O(n=>{let r=()=>{n.next(e)};return t.forEach(t=>{e.on(t,r)}),()=>{t.forEach(t=>{e.off(t,r)})}}).pipe(ei(e))}function eD(e){return eV(e,c.dd.TrackMuted,c.dd.TrackUnmuted,c.dd.ParticipantPermissionsChanged,c.dd.TrackPublished,c.dd.TrackUnpublished,c.dd.LocalTrackPublished,c.dd.LocalTrackUnpublished,c.dd.MediaDevicesError,c.dd.TrackSubscriptionStatusChanged).pipe(F(e=>{let{isMicrophoneEnabled:t,isCameraEnabled:n,isScreenShareEnabled:r}=e,i=e.getTrackPublication(c.fQ.Source.Microphone);return{isCameraEnabled:n,isMicrophoneEnabled:t,isScreenShareEnabled:r,cameraTrack:e.getTrackPublication(c.fQ.Source.Camera),microphoneTrack:i,participant:e}}))}function ej(e,t){return new O(n=>{let r=(...e)=>{n.next(e)};return e.on(t,r),()=>{e.off(t,r)}})}function eH(e){var t,n,r,i;return eV(e.participant,c.dd.TrackMuted,c.dd.TrackUnmuted,c.dd.TrackSubscribed,c.dd.TrackUnsubscribed,c.dd.LocalTrackPublished,c.dd.LocalTrackUnpublished).pipe(F(t=>{var n,r;let i=null!=(n=e.publication)?n:t.getTrackPublication(e.source);return null==(r=null==i?void 0:i.isMuted)||r}),ei(null==(i=null!=(r=null==(t=e.publication)?void 0:t.isMuted)?r:null==(n=e.participant.getTrackPublication(e.source))?void 0:n.isMuted)||i))}function eZ(e,t,n=!0){let r=[e.localParticipant,...Array.from(e.remoteParticipants.values())],i=[];
1return r.forEach(e=>{t.forEach(t=>{let r=Array.from(e.trackPublications.values()).filter(e=>e.source===t&&(!n||e.track)).map(t=>({participant:e,publication:t,source:t.source}));i.push(...r)})}),{trackReferences:i,participants:r}}new TextEncoder,new TextDecoder;var{load:eW,save:eJ}=(r="lk-user-choices",{load:()=>(function(e){if("undefined"==typeof localStorage){e_.error("Local storage is not available.");return}try{let t=localStorage.getItem(e);if(!t){e_.warn(`Item with key ${e} does not exist in local storage.`);return}return JSON.parse(t)}catch(e){e_.error(`Error getting item from local storage: ${e}`);return}})(r),save:e=>(function(e,t){if("undefined"==typeof localStorage){e_.error("Local storage is not available.");return}try{localStorage.setItem(e,JSON.stringify(t))}catch(e){e_.error(`Error setting item to local storage: ${e}`)}})(r,e)}),eB=n(14123);"undefined"!=typeof window?a.useLayoutEffect:a.useEffect,n(40257);var eq=Object.defineProperty,eY=Object.defineProperties,eG=Object.getOwnPropertyDescriptors,eX=Object.getOwnPropertySymbols,eK=Object.prototype.hasOwnProperty,e0=Object.prototype.propertyIsEnumerable,e5=(e,t,n)=>t in e?eq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,e1=(e,t)=>{for(var n in t||(t={}))eK.call(t,n)&&e5(e,n,t[n]);if(eX)for(var n of eX(t))e0.call(t,n)&&e5(e,n,t[n]);return e},e2=(e,t)=>eY(e,eG(t)),e3=(e,t)=>{var n={};for(var r in e)eK.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&eX)for(var r of eX(e))0>t.indexOf(r)&&e0.call(e,r)&&(n[r]=e[r]);return n},e4=e=>{let t=a.useRef(e);return a.useEffect(()=>{t.current=e}),t},e7=()=>i||(i=function(){let e=!1,t=[],n=new Map;if("undefined"==typeof window)return;let r=new ResizeObserver((r,i)=>{t=t.concat(r),e||window.requestAnimationFrame(()=>{let r=new Set;for(let e=0;e<t.length;e++){if(r.has(t[e].target))continue;r.add(t[e].target);let a=n.get(t[e].target);null==a||a.forEach(n=>n(t[e],i))}t=[],e=!1}),e=!0});return{observer:r,subscribe(e,t){var i;r.observe(e);let a=null!=(i=n.get(e))?i:[];a.push(t),n.set(e,a)},unsubscribe(e,t){var i;let a=null!=(i=n.get(e))?i:[];if(1===a.length){r.unobserve(e),n.delete(e);return}let o=a.indexOf(t);-1!==o&&a.splice(o,1),n.set(e,a)}}}()),e6=e=>{let[t,n]=a.useState({width:0,height:0});return a.useLayoutEffect(()=>{if(e.current){let{width:t,height:r}=e.current.getBoundingClientRect();n({width:t,height:r})}},[e.current]),!function(e,t){let n=e7(),r=e4(t);a.useLayoutEffect(()=>{let t=!1,i=e.current;if(i)return null==n||n.subscribe(i,a),()=>{t=!0,null==n||n.unsubscribe(i,a)};function a(e,n){t||r.current(e,n)}},[e.current,n,r]),null==n||n.observer}(e,a.useCallback(e=>n(e.contentRect),[])),t};function e9(e,t,n=!0){let[r,i]=a.useState(t);return a.useEffect(()=>{if(n&&i(t),"undefined"==typeof window||!e)return;let r=e.subscribe(i);return()=>r.unsubscribe()},[e,n]),r}var e8=a.createContext(void 0);function te(){return a.useContext(e8)}var tt=a.createContext(void 0);function tn(){return a.useContext(tt)}function tr(e){let t=tn(),n=null!=e?e:t;if(!n)throw Error("No TrackRef, make sure you are inside a TrackRefContext or pass the TrackRef explicitly");return n}var ti=a.createContext(void 0);function ta(){return a.useContext(ti)}function to(e){var t;let n=ta(),r=tn(),i=null!=(t=null!=e?e:n)?t:null==r?void 0:r.participant;if(!i)throw Error("No participant provided, make sure you are inside a participant context or pass the participant explicitly");return i}var tc=a.createContext(void 0);function tu(){let e=a.useContext(tc);if(!e)throw Error("tried to access room context outside of livekit room component");return e}function tl(e){let t=a.useContext(tc),n=null!=e?e:t;if(!n)throw Error("No room provided, make sure you are inside a Room context or pass the room explicitly");return n}var ts=a.createContext(void 0);function td(...e){let t=e1({},e[0]);for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];"function"==typeof n&&"function"==typeof i&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=function(...e){return(...t)=>{for(let n of e)if("function"==typeof n)try{n(...t)}catch(e){console.error(e)}}}(n,i):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof i?t[e]=o(n,i):t[e]=void 0!==i?i:n}}return t}function tf(e){let t=tl(e);return e9(a.useMemo(()=>e$(t,c.TQ.ConnectionStateChanged).pipe(F(([e])=>e),ei(t.state)),[t]),t.state)}function tp(e,t={}){var n,r;let i=to("string"==typeof e?t.participant:e.participant),o="string"==typeof e?{participant:i,source:e}:e,[c,u]=a.useState(!!((null==(n=o.publication)?void 0:n.isMuted)||(null==(r=i.getTrackPublication(o.source))?void 0:r.isMuted)));return a.useEffect(()=>{let e=eH(o).subscribe(u);return()=>e.unsubscribe()},[eS(o)]),c}var th={connect:!0,audio:!1,video:!1};function tv(e={}){let t=tl(e.room),[n,r]=a.useState(t.localParticipant),[i,o]=a.use
1State(n.isMicrophoneEnabled),[c,u]=a.useState(n.isMicrophoneEnabled),[l,s]=a.useState(n.lastMicrophoneError),[d,f]=a.useState(n.lastCameraError),[p,h]=a.useState(n.isMicrophoneEnabled),[v,m]=a.useState(void 0),[b,g]=a.useState(void 0),y=e=>{u(e.isCameraEnabled),o(e.isMicrophoneEnabled),h(e.isScreenShareEnabled),g(e.cameraTrack),m(e.microphoneTrack),s(e.participant.lastMicrophoneError),f(e.participant.lastCameraError),r(e.participant)};return a.useEffect(()=>{let e=eD(t.localParticipant).subscribe(y);return()=>e.unsubscribe()},[t]),{isMicrophoneEnabled:i,isScreenShareEnabled:p,isCameraEnabled:c,microphoneTrack:v,cameraTrack:b,lastMicrophoneError:l,lastCameraError:d,localParticipant:n}}function tm(e={}){let t=function(e={}){let t=tl(e.room),[n,r]=a.useState([]);return a.useEffect(()=>{let n=(function(e,t={}){var n;let r;let i=new O(e=>(r=e,()=>o.unsubscribe())).pipe(ei(Array.from(e.remoteParticipants.values()))),a=null!=(n=t.additionalRoomEvents)?n:eC,o=eF(e,...Array.from(new Set([c.TQ.ParticipantConnected,c.TQ.ParticipantDisconnected,c.TQ.ConnectionStateChanged,...a]))).subscribe(e=>null==r?void 0:r.next(Array.from(e.remoteParticipants.values())));return e.remoteParticipants.size>0&&(null==r||r.next(Array.from(e.remoteParticipants.values()))),i})(t,{additionalRoomEvents:e.updateOnlyOn}).subscribe(r);return()=>n.unsubscribe()},[t,JSON.stringify(e.updateOnlyOn)]),n}(e),{localParticipant:n}=tv(e);return a.useMemo(()=>[n,...t],[n,t])}function tb(e,t={}){let n=tu(),[r]=a.useState(t.updateOnlyOn),i=a.useMemo(()=>"string"==typeof e?function(e,t,n={}){var r;let i=null!=(r=n.additionalEvents)?r:ex;return eF(e,c.TQ.ParticipantConnected,c.TQ.ParticipantDisconnected,c.TQ.ConnectionStateChanged).pipe(ea(e=>{let n=e.getParticipantByIdentity(t);return n?eV(n,...i):new O(e=>e.next(void 0))}),ei(e.getParticipantByIdentity(t)))}(n,e,{additionalEvents:r}):function(e,{kind:t,identity:n},r={}){var i;let a=null!=(i=r.additionalEvents)?i:ex,o=e=>{let r=!0;return t&&(r=r&&e.kind===t),n&&(r=r&&e.identity===n),r};return eF(e,c.TQ.ParticipantConnected,c.TQ.ParticipantDisconnected,c.TQ.ConnectionStateChanged).pipe(ea(e=>{let t=Array.from(e.remoteParticipants.values()).find(e=>o(e));return t?eV(t,...a):new O(e=>e.next(void 0))}),ei(Array.from(e.remoteParticipants.values()).find(e=>o(e))))}(n,e,{additionalEvents:r}),[n,JSON.stringify(e),r]),[o,u]=a.useState({p:void 0});return a.useEffect(()=>{let e=i.subscribe(e=>u({p:e}));return()=>e.unsubscribe()},[i]),o.p}function tg(e=[c.fQ.Source.Camera,c.fQ.Source.Microphone,c.fQ.Source.ScreenShare,c.fQ.Source.ScreenShareAudio,c.fQ.Source.Unknown],t={}){let n=tl(t.room),[r,i]=a.useState([]),[o,u]=a.useState([]),l=a.useMemo(()=>e.map(e=>eM(e)?e.source:e),[JSON.stringify(e)]);return a.useEffect(()=>{let e=(function(e,t,n){var r,i;let a=null!=(r=n.additionalRoomEvents)?r:eC,o=null==(i=n.onlySubscribed)||i;return eF(e,...Array.from(new Set([c.TQ.ParticipantConnected,c.TQ.ParticipantDisconnected,c.TQ.ConnectionStateChanged,c.TQ.LocalTrackPublished,c.TQ.LocalTrackUnpublished,c.TQ.TrackPublished,c.TQ.TrackUnpublished,c.TQ.TrackSubscriptionStatusChanged,...a]).values())).pipe(F(e=>{let n=eZ(e,t,o);return e_.debug(`TrackReference[] was updated. (length ${n.trackReferences.length})`,n),n}),ei(eZ(e,t,o)))})(n,l,{additionalRoomEvents:t.updateOnlyOn,onlySubscribed:t.onlySubscribed}).subscribe(({trackReferences:e,participants:t})=>{e_.debug("setting track bundles",e,t),i(e),u(t)});return()=>e.unsubscribe()},[n,JSON.stringify(t.onlySubscribed),JSON.stringify(t.updateOnlyOn),JSON.stringify(e)]),a.useMemo(()=>{if(!eA(e))return r;{let t=function(e,t){let n=new Map;if(eA(e)){let r=e.filter(e=>e.withPlaceholder).map(e=>e.source);t.forEach(e=>{let t=e.getTrackPublications().map(e=>{var t;return null==(t=e.track)?void 0:t.source}).filter(e=>void 0!==e),i=Array.from(function(e,t){let n=new Set(e);for(let e of t)n.delete(e);return n}(new Set(r),new Set(t)));i.length>0&&n.set(e.identity,i)})}return n}(e,o),n=Array.from(r);return o.forEach(e=>{var i;t.has(e.identity)&&(null!=(i=t.get(e.identity))?i:[]).forEach(t=>{r.find(({participant:n,publication:r})=>e.identity===n.identity&&r.source===t)||(e_.debug(`Add ${t} placeholder for participant ${e.identity}.`),n.push({participant:e,source:t}))})}),n}},[r,o,e])}var ty=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},e),a.createElement("path",{d:"M1.354.646a.5.5 0 1 0-.708.708l14 14a.5.5 0 0 0 .708-.708L11 10.293V4.5A1.5 1.5 0 0 0 9.5 3H3.707zM0 4.5a1.5 1.5 0 0 1 .943-1.393l9.532 9.533c-.262.224-.603.36-.975.36h-8A1.5 1.5 0 0 1 0 11.5z"}),a.createElement("path",{d:"m15.2 3.6-2.8 2.1a1 1 0 0 0-.4.8v3a1 1 0 0 0 .4.8l2.8 2.1a.5.5 0 0 0 .8-.4V4a.5.5 0 0 0-.8-.4z"})),tw=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},e),a.createElement("path",{d:"M0 4.5A1.5 1.5 0 0 1 1.5 3h8A1.5 1.5 0 0 1 11 4.5v7A1.5 1.5 0 0 1 9.5 13h-8A1.5 1.5 0 0 1 0 11.5zM15.2 3.6l-2.8 2.1a1 1 0 0 0-.4.8v3a1 1 0 0 0 .4.8l2.8 2.1a.5.5 0 0 0 .8-.4V4a.5.5 0 0 0-.8-.4z"})),tE=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),a.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M5.293 2.293a1 1 0 0 1 1.414 0l4.823 4.823a1.25 1.25 0 0 1 0 1.768l-4.823 4.823a1 1 0 0 1-1.414-1.414L9.586 8 5.293 3.707a1 1 0 0 1 0-1.414z",clipRule:"evenodd"})),tk=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),a.createElement("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},a.createElement("path",{d:"M10 1.75h4.25m0 0V6m0-4.25L9 7M6 14.25H1.75m0 0V10m0 4.25L7 9"}))),tS=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),a.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M4 6.104V4a4 4 0 1 1 8 0v2.104c1.154.326 2 1.387 2 2.646v4.5A2.75 2.75 0 0 1 11.25 16h-6.5A2.75 2.75 0 0 1 2 13.25v-4.5c0-1.259.846-2.32 2-2.646ZM5.5 4a2.5 2.5 0 0 1 5 0v2h-5V4Z",clipRule:"evenodd"})),tT=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},e),a.createElement("path",{d:"M12.227 11.52a5.477 5.477 0 0 0 1.246-2.97.5.5 0 0 0-.995-.1 4.478 4.478 0 0 1-.962 2.359l-1.07-1.07C10.794 9.247 11 8.647 11 8V3a3 3 0 0 0-6 0v1.293L1.354.646a.5.5 0 1 0-.708.708l14 14a.5.5 0 0 0 .708-.708zM8 12.5c.683 0 1.33-.152 1.911-.425l.743.743c-.649.359-1.378.59-2.154.66V15h2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1h2v-1.522a5.502 5.502 0 0 1-4.973-4.929.5.5 0 0 1 .995-.098A4.5 4.5 0 0 0 8 12.5z"}),a.createElement("path",{d:"M8.743 10.907 5 7.164V8a3 3 0 0 0 3.743 2.907z"})),tC=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},e),a.createElement("path",{fillRule:"evenodd",d:"M2.975 8.002a.5.5 0 0 1 .547.449 4.5 4.5 0 0 0 8.956 0 .5.5 0 1 1 .995.098A5.502 5.502 0 0 1 8.5 13.478V15h2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1h2v-1.522a5.502 5.502 0 0 1-4.973-4.929.5.5 0 0 1 .448-.547z",clipRule:"evenodd"}),a.createElement("path",{d:"M5 3a3 3 0 1 1 6 0v5a3 3 0 0 1-6 0z"})),tx=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentcolor"},e),a.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),a.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"})),t_=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentcolor"},e),a.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),a.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),a.createElement("g",{opacity:.25},a.createElement("path",{d:"M12 .5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),a.createElement("path",{d:"M12 .5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}
1))),tP=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentcolor"},e),a.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),a.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),a.createElement("g",{opacity:.25},a.createElement("path",{d:"M6 6.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),a.createElement("path",{d:"M6 6.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),a.createElement("path",{d:"M12 .5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}))),tM=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},e),a.createElement("g",{opacity:.25},a.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-4Zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-9Zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5V.5Z"}),a.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-4Zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-9Zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5V.5Z"}))),tA=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:20,height:16,fill:"none"},e),a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M0 2.75A2.75 2.75 0 0 1 2.75 0h14.5A2.75 2.75 0 0 1 20 2.75v10.5A2.75 2.75 0 0 1 17.25 16H2.75A2.75 2.75 0 0 1 0 13.25V2.75ZM2.75 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h14.5c.69 0 1.25-.56 1.25-1.25V2.75c0-.69-.56-1.25-1.25-1.25H2.75Z",clipRule:"evenodd"}),a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.47 4.22a.75.75 0 0 1 1.06 0l2.25 2.25a.75.75 0 0 1-1.06 1.06l-.97-.97v4.69a.75.75 0 0 1-1.5 0V6.56l-.97.97a.75.75 0 0 1-1.06-1.06l2.25-2.25Z",clipRule:"evenodd"})),tR=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:20,height:16,fill:"none"},e),a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"M7.28 4.22a.75.75 0 0 0-1.06 1.06L8.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L10 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L11.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L10 6.94z"}),a.createElement("path",{fillRule:"evenodd",d:"M2.75 0A2.75 2.75 0 0 0 0 2.75v10.5A2.75 2.75 0 0 0 2.75 16h14.5A2.75 2.75 0 0 0 20 13.25V2.75A2.75 2.75 0 0 0 17.25 0zM1.5 2.75c0-.69.56-1.25 1.25-1.25h14.5c.69 0 1.25.56 1.25 1.25v10.5c0 .69-.56 1.25-1.25 1.25H2.75c-.69 0-1.25-.56-1.25-1.25z",clipRule:"evenodd"}))),tL=e=>a.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),a.createElement("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},a.createElement("path",{d:"M13.25 7H9m0 0V2.75M9 7l5.25-5.25M2.75 9H7m0 0v4.25M7 9l-5.25 5.25"}))),tQ=a.forwardRef(function(e,t){var{trackRef:n}=e,r=e3(e,["trackRef"]);let i=tn(),{mergedProps:o,inFocus:c}=function({trackRef:e,props:t}){let n=tr(e),r=te(),{className:i}=a.useMemo(()=>({className:[ez("button"),ez("focus-toggle-button")].join(" ")}),[]),o=a.useMemo(()=>eT(n,null==r?void 0:r.pin.state),[n,null==r?void 0:r.pin.state]);return{mergedProps:a.useMemo(()=>td(t,{className:i,onClick:e=>{var i,a,c,u,l;null==(i=t.onClick)||i.call(t,e),o?null==(c=null==r?void 0:(a=r.pin).dispatch)||c.call(a,{msg:"clear_pin"}):null==(l=null==r?void 0:(u=r.pin).dispatch)||l.call(u,{msg:"set_pin",trackReference:n})}}),[t,i,n,o,null==r?void 0:r.pin]),inFocus:o}}({trackRef:null!=n?n:i,props:r});return a.createElement(e8.Consumer,null,e=>void 0!==e&&a.createElement("button",e1({ref:t},o),r.children?r.children:c?a.createElement(tL,null):a.createElement(tk,null)))});function tO(e){return void 0!==e}function tI(...e){return td(...e.filter(tO))}var tN=a.forwardRef(function(e,t){var n;let{className:r,quality:i}=function(e={}){let t=to(e.participant),{className:n,connectionQualityObserver:r}=a.useMemo(()=>{var e;return e=t,{className:ez("connection-quality"),connectionQualityObserver:ej(e,c.dd.ConnectionQualityChanged).pipe(F(([e])=>e),ei(e.connectionQuality))}},[t]);return{className:n,quality:e9(r,c.ZV.Unknown)}}(e),o=a.useMemo(()=>e2(e1({},tI(e,{className:r})),{"data-lk-quality":i}),[i,e,r]);return a.createElement("div",e1({ref:t},o),null!=(n=e.children)?n:function(e){switch(e){case c.ZV.Excellent:return a.createElement(tx,null);case c.ZV.Good:return a.createElement(t_,null);case c.ZV.Poor:return a.createElement(tP,null);default:return a.createElement(tM,null)}}(i))}),tz=a.forwardRef(function(e,t){var{participant:n}=e,r=e3(e,["participant"]);let i=to(n),{className:o,infoObserver:u}=a.useMemo(()=>({className:"lk-participant-name",infoObserver:eV(i,c.dd.ParticipantMetadataChanged,c.dd.ParticipantNameChanged).pipe(F(({name:e,identity:t,metadata:n})=>({name:e,identity:t,metadata:n})),ei({name:i.name,identity:i.identity,metadata:i.metadata}))}),[i]),{identity:l,name:s}=e9(u,{name:i.name,identity:i.identity,metadata:i.metadata}),d=a.useMemo(()=>tI(r,{className:o,"data-lk-participant-name":s}),[r,o,s]);return a.createElement("span",e1({ref:t},d),""!==s?s:l,r.children)}),tU=a.forwardRef(function(e,t){var n,{trackRef:r,show:i="always"}
1=e,o=e3(e,["trackRef","show"]);let{className:u,isMuted:l}=function(e){var t,n;let r=tr(e),{className:i,mediaMutedObserver:o}=a.useMemo(()=>(function(e){let t="track-muted-indicator-camera";switch(e.source){case c.fQ.Source.Camera:t="track-muted-indicator-camera";break;case c.fQ.Source.Microphone:t="track-muted-indicator-microphone"}return{className:ez(t),mediaMutedObserver:eH(e)}})(r),[eS(r)]);return{isMuted:e9(o,!!((null==(t=r.publication)?void 0:t.isMuted)||(null==(n=r.participant.getTrackPublication(r.source))?void 0:n.isMuted))),className:i}}(r),s="always"===i||"muted"===i&&l||"unmuted"===i&&!l,d=a.useMemo(()=>tI(o,{className:u}),[u,o]);return s?a.createElement("div",e2(e1({ref:t},d),{"data-lk-muted":l}),null!=(n=o.children)?n:function(e,t){switch(e){case c.fQ.Source.Microphone:return t?a.createElement(tC,null):a.createElement(tT,null);case c.fQ.Source.Camera:return t?a.createElement(tw,null):a.createElement(ty,null);case c.fQ.Source.ScreenShare:return t?a.createElement(tR,null):a.createElement(tA,null);default:return}}(r.source,!l)):null}),tF=e=>a.createElement("svg",e1({width:320,height:320,viewBox:"0 0 320 320",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a.createElement("path",{d:"M160 180C204.182 180 240 144.183 240 100C240 55.8172 204.182 20 160 20C115.817 20 79.9997 55.8172 79.9997 100C79.9997 144.183 115.817 180 160 180Z",fill:"white",fillOpacity:.25}
1),a.createElement("path",{d:"M97.6542 194.614C103.267 191.818 109.841 192.481 115.519 195.141C129.025 201.466 144.1 205 159.999 205C175.899 205 190.973 201.466 204.48 195.141C210.158 192.481 216.732 191.818 222.345 194.614C262.703 214.719 291.985 253.736 298.591 300.062C300.15 310.997 291.045 320 280 320H39.9997C28.954 320 19.8495 310.997 21.4087 300.062C28.014 253.736 57.2966 214.72 97.6542 194.614Z",fill:"white",fillOpacity:.25}));function t$(e,t={}){var n;let[r,i]=a.useState(eU(e)),[o,u]=a.useState(null==r?void 0:r.isMuted),[l,s]=a.useState(null==r?void 0:r.isSubscribed),[d,f]=a.useState(null==r?void 0:r.track),[p,h]=a.useState("landscape"),v=a.useRef(),{className:m,trackObserver:b}=a.useMemo(()=>(function(e){let t=eU(e),n=eD(e.participant).pipe(F(()=>eU(e)),ei(t));return{className:ez(e.source===c.fQ.Source.Camera||e.source===c.fQ.Source.ScreenShare?"participant-media-video":"participant-media-audio"),trackObserver:n}})(e),[null!=(n=e.participant.sid)?n:e.participant.identity,e.source,eE(e)&&e.publication.trackSid]);return a.useEffect(()=>{let e=b.subscribe(e=>{e_.debug("update track",e),i(e),u(null==e?void 0:e.isMuted),s(null==e?void 0:e.isSubscribed),f(null==e?void 0:e.track)});return()=>null==e?void 0:e.unsubscribe()},[b]),a.useEffect(()=>{var n,r;return d&&(v.current&&d.detach(v.current),(null==(n=t.element)?void 0:n.current)&&!(e.participant instanceof c.Ix&&(null==d?void 0:d.kind)==="audio")&&d.attach(t.element.current)),v.current=null==(r=t.element)?void 0:r.current,()=>{v.current&&(null==d||d.detach(v.current))}},[d,t.element]),a.useEffect(()=>{var e,t;"number"==typeof(null==(e=null==r?void 0:r.dimensions)?void 0:e.width)&&"number"==typeof(null==(t=null==r?void 0:r.dimensions)?void 0:t.height)&&h(r.dimensions.width>r.dimensions.height?"landscape":"portrait")},[r]),{publication:r,isMuted:o,isSubscribed:l,track:d,elementProps:tI(t.props,e1({className:m,"data-lk-local-participant":e.participant.isLocal,"data-lk-source":null==r?void 0:r.source},(null==r?void 0:r.kind)==="video"&&{"data-lk-orientation":p}))}}var tV=a.forwardRef(function(e,t){var{onTrackClick:n,onClick:r,onSubscriptionStatusChanged:i,trackRef:o,manageSubscription:u}=e,l=e3(e,["onTrackClick","onClick","onSubscriptionStatusChanged","trackRef","manageSubscription"]);let s=tr(o),d=a.useRef(null);a.useImperativeHandle(t,()=>d.current);let f=function({threshold:e=0,root:t=null,rootMargin:n="0%",freezeOnceVisible:r=!1,initialIsIntersecting:i=!1,onChange:o}={}){var c;let[u,l]=(0,a.useState)(null),[s,d]=(0,a.useState)(()=>({isIntersecting:i,entry:void 0})),f=(0,a.useRef)();f.current=o;let p=(null==(c=s.entry)?void 0:c.isIntersecting)&&r;(0,a.useEffect)(()=>{let i;if(!u||!("IntersectionObserver"in window)||p)return;let a=new IntersectionObserver(e=>{let t=Array.isArray(a.thresholds)?a.thresholds:[a.thresholds];e.forEach(e=>{let n=e.isIntersecting&&t.some(t=>e.intersectionRatio>=t);d({isIntersecting:n,entry:e}),f.current&&f.current(n,e),n&&r&&i&&(i(),i=void 0)})},{threshold:e,root:t,rootMargin:n});return a.observe(u),()=>{a.disconnect()}},[u,JSON.stringify(e),t,n,p,r]);let h=(0,a.useRef)(null);(0,a.useEffect)(()=>{var e;u||null==(e=s.entry)||!e.target||r||p||h.current===s.entry.target||(h.current=s.entry.target,d({isIntersecting:i,entry:void 0}))},[u,s.entry,r,p,i]);let v=[l,!!s.isIntersecting,s.entry];return v.ref=v[0],v.isIntersecting=v[1],v.entry=v[2],v}({root:d.current}),[p]=function(e,t,n){let r=e instanceof Function?e():e,[i,o]=(0,a.useState)(r),c=(0,a.useRef)(r),u=function(e,t=500,n){let r=(0,a.useRef)();!function(e){let t=(0,a.useRef)(e);t.current=e,(0,a.useEffect)(()=>()=>{t.current()},[])}(()=>{r.current&&r.current.cancel()});let i=(0,a.useMemo)(()=>{let i=eB(e,t,n),a=(...e)=>i(...e);return a.cancel=()=>{i.cancel()},a.isPending=()=>!!r.current,a.flush=()=>i.flush(),a},[e,t,n]);return(0,a.useEffect)(()=>{r.current=eB(e,t,n)},[e,t,n]),i}(o,3e3,void 0);return((void 0)??((e,t)=>e===t))(c.current,r)||(u(r),c.current=r),[i,u]}(f,0);a.useEffect(()=>{u&&s.publication instanceof c.E8&&(null==p?void 0:p.isIntersecting)===!1&&(null==f?void 0:f.isIntersecting)===!1&&s.publication.setSubscribed(!1)},[p,s,u]),a.useEffect(()=>{u&&s.publication instanceof c.E8&&(null==f?void 0:f.isIntersecting)===!0&&s.publication.setSubscribed(!0)},[f,s,u]);let{elementProps:h,publication:v,isSubscribed:m}=t$(s,{element:d,props:l});return a.useEffect(()=>{null==i||i(!!m)},[m,i]),a.createElement("video",e2(e1({ref:d},h),{muted:!0,onClick:e=>{null==r||r(e),null==n||n({participant:null==s?void 0:s.participant,track:v})}}))}),tD=a.forwardRef(function(e,t){var{trackRef:n,onSubscriptionStatusChanged:r,volume:i,muted:o}=e,u=e3(e,["trackRef","onSubscriptionStatusChanged","volume","muted"]);let l=tr(n),s=a.useRef(null);a.useImperativeHandle(t,()=>s.current);let{elementProps:d,isSubscribed:f,track:p,publication:h}=t$(l,{element:s,props:u});return a.useEffect(()=>{null==r||r(!!f)},[f,r]),a.useEffect(()=>{void 0!==p&&void 0!==i&&(p instanceof c.rl?p.setVolume(i):e_.warn("Volume can only be set on remote audio tracks."))},[i,p]),a.useEffect(()=>{void 0!==h&&void 0!==o&&(h instanceof c.E8?h.setEnabled(!o):e_.warn("Can only call setEnabled on remote track publications."))},[o,h,p]),a.createElement("audio",e1({ref:s},d))});function tj(e){let t=!!ta();return e.participant&&!t?a.createElement(ti.Provider,{value:e.participant},e.children):a.createElement(a.Fragment,null,e.children)}function tH(e){let t=!!tn();return e.trackRef&&!t?a.createElement(tt.Provider,{value:e.trackRef},e.children):a.createElement(a.Fragment,null,e.children)}var tZ=a.forwardRef(function(e,t){var n,r,i,{trackRef:o,children:u,onParticipantClick:l,disableSpeakingIndicator:s}=e,d=e3(e,["trackRef","children","onParticipantClick","disableSpeakingIndicator"]);let f=tr(o),{elementProps:p}=function({trackRef:e,onParticipantClick:t,disableSpeakingIndicator:n,htmlProps:r}){let i=tr(e),o=a.useMemo(()=>{let{className:e}={className:ez("participant-tile")};return td(r,{className:e,onClick:e=>{var n,a;if(null==(n=r.onClick)||n.call(r,e),"function"==typeof t){let e=null!=(a=i.publication)?a:i.participant.getTrackPublication(i.source);t({participant:i.participant,track:e})}}})},[r,t,i.publication,i.source,i.participant]),u=i.participant.getTrackPublication(c.fQ.Source.Microphone),l=a.useMemo(()=>({participant:i.participant,source:c.fQ.Source.Microphone,publication:u}),[u,i.participant]),s=tp(i),d=tp(l),f=function(e){let t=to(e);return e9(a.useMemo(()=>ej(t,c.dd.IsSpeakingChanged).pipe(F(([e])=>e)),[t]),t.isSpeaking)}(i.participant),p=function(e){if(e.publication instanceof c.Zr){let t=e.publication.track;if(t){let{facingMode:e}=(0,c.ul)(t);return e}}return"undefined"}(i);return{elementProps:e1({"data-lk-audio-muted":d,"data-lk-video-muted":s,"data-lk-speaking":!0!==n&&f,"data-lk-local-participant":i.participant.isLocal,"data-lk-source":i.source,"data-lk-facing-mode":p},o)}}({htmlProps:d,disableSpeakingIndicator:s,onParticipantClick:l,trackRef:f}),h=function(e,t={}){let n=to(e),r=tl(t.room);return e9(a.useMemo(()=>{var e;return e$(r,c.TQ.ParticipantEncryptionStatusChanged).pipe((e=([,e])=>n.identity===(null==e?void 0:e.identity)||!e&&n.identity===r.localParticipant.identity,N(function(t,n){var r=0;t.subscribe(z(n,function(t){return e.call(void 0,t,r++)&&n.next(t)}))}
1)),F(([e])=>e),ei(n instanceof c.Ix?n.isE2EEEnabled:n.isEncrypted))},[r,n]),n instanceof c.Ix?n.isE2EEEnabled:n.isEncrypted)}(f.participant),v=te(),m=null==(r=a.useContext(ts))?void 0:r.autoSubscription,b=a.useCallback(e=>{f.source&&!e&&v&&v.pin.dispatch&&eT(f,v.pin.state)&&v.pin.dispatch({msg:"clear_pin"})},[f,v]);return a.createElement("div",e1({ref:t,style:{position:"relative"}},p),a.createElement(tH,{trackRef:f},a.createElement(tj,{participant:f.participant},null!=u?u:a.createElement(a.Fragment,null,eE(f)&&((null==(i=f.publication)?void 0:i.kind)==="video"||f.source===c.fQ.Source.Camera||f.source===c.fQ.Source.ScreenShare)?a.createElement(tV,{trackRef:f,onSubscriptionStatusChanged:b,manageSubscription:m}):eE(f)&&a.createElement(tD,{trackRef:f,onSubscriptionStatusChanged:b}),a.createElement("div",{className:"lk-participant-placeholder"},a.createElement(tF,null)),a.createElement("div",{className:"lk-participant-metadata"},a.createElement("div",{className:"lk-participant-metadata-item"},f.source===c.fQ.Source.Camera?a.createElement(a.Fragment,null,h&&a.createElement(tS,{style:{marginRight:"0.25rem"}}),a.createElement(tU,{trackRef:{participant:f.participant,source:c.fQ.Source.Microphone},show:"muted"}),a.createElement(tz,null)):a.createElement(a.Fragment,null,a.createElement(tA,{style:{marginRight:"0.25rem"}}),a.createElement(tz,null,"'s screen"))),a.createElement(tN,{className:"lk-participant-metadata-item"}))),a.createElement(tQ,{trackRef:f}))))});function tW(e){var{tracks:t}=e,n=e3(e,["tracks"]);return a.createElement(a.Fragment,null,t.map(e=>{var t;return a.createElement(tt.Provider,{value:e,key:eS(e)},(t=n.children,a.Children.map(t,e=>a.isValidElement(e)&&a.Children.only(t)?a.cloneElement(e,e2(e1({},void 0),{key:void 0})):e)))}))}function tJ({totalPageCount:e,nextPage:t,prevPage:n,currentPage:r,pagesContainer:i}){let[o,c]=a.useState(!1);return a.useEffect(()=>{let e;return i&&(e=(function(e,t=1e3){var n,r;if(null===e)return eo(!1);let i=(function e(t,n,r,i){if(s(r)&&(i=r,r=void 0),i)return e(t,n,r).pipe((a=i,F(function(e){return ec(e)?a.apply(void 0,(0,l.__spreadArray)([],(0,l.__read)(e))):a(e)})));var a,o=(0,l.__read)(s(t.addEventListener)&&s(t.removeEventListener)?el.map(function(e){return function(i){return t[e](n,i,r)}}):s(t.addListener)&&s(t.removeListener)?eu.map(ed(t,n)):s(t.on)&&s(t.off)?es.map(ed(t,n)):[],2),c=o[0],u=o[1];if(!c&&$(t))return G(function(t){return e(t,n,r)})(B(t));if(!c)throw TypeError("Invalid event target");return new O(function(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1<t.length?t:t[0])};return c(t),function(){return u(t)}})})(e,"mousemove",{passive:!0}).pipe(F(()=>!0)),a=i.pipe(function(e,t){var n=e instanceof Date&&!isNaN(e)?{first:e}:"number"==typeof e?{each:e}:e,r=n.first,i=n.each,a=n.with,o=void 0===a?ey:a,c=n.scheduler,u=void 0===c?eb:c,l=n.meta,s=void 0===l?null:l;if(null==r&&null==i)throw TypeError("No timeout provided.");return N(function(e,t){var n,a,c=null,l=0,d=function(e){a=Y(t,u,function(){try{n.unsubscribe(),B(o({meta:s,lastValue:c,seen:l})).subscribe(t)}catch(e){t.error(e)}},e)};n=e.subscribe(z(t,function(e){null==a||a.unsubscribe(),l++,t.next(c=e),i>0&&d(i)},void 0,void 0,function(){(null==a?void 0:a.closed)||null==a||a.unsubscribe(),c=null})),l||d(null!=r?"number"==typeof r?r:+r-u.now():i)})}({each:t,with:()=>er(eo(!1),a.pipe(N(function(e,t){var n=!1,r=z(t,function(){null==r||r.unsubscribe(),n=!0},w);B(i).subscribe(r),e.subscribe(z(t,function(e){return n&&t.next(e)}))})))}),(void 0===r&&(r=Q),n=null!=n?n:ew,N(function(e,t){var i,a=!0;e.subscribe(z(t,function(e){var o=r(e);(a||!n(i,o))&&(a=!1,i=o,t.next(e))}))})));return a})(i.current,2e3).subscribe(c)),()=>{e&&e.unsubscribe()}},[i]),a.createElement("div",{className:"lk-pagination-control","data-lk-user-interaction":o},a.createElement("button",{className:"lk-button",onClick:n},a.createElement(tE,null)),a.createElement("span",{className:"lk-pagination-count"},`${r} of ${e}`),a.createElement("button",{className:"lk-button",onClick:t},a.createElement(tE,null)))}var tB=a.forwardRef(function({totalPageCount:e,currentPage:t},n){let r=Array(e).fill("").map((e,n)=>n+1===t?a.createElement("span",{"data-lk-active":!0,key:n}):a.createElement("span",{key:n}));return a.createElement("div",{ref:n,className:"lk-pagination-indicator"},r)});function tq(e){var{tracks:t}=e,n=e3(e,["tracks"]);let r=a.createRef(),i=a.useMemo(()=>
1tI(n,{className:"lk-grid-layout"}),[n]),{layout:o}=function(e,t){let{width:n,height:r}=e6(e),i=n>0&&r>0?function e(t,n,r,i){let a=0,o=t.find((e,t,r)=>{a=t;let i=-1!==r.findIndex((n,r)=>{let i=n.maxTiles===e.maxTiles;return r>t&&i});return e.maxTiles>=n&&!i});if(void 0===o){if(o=t[t.length-1])e_.warn(`No layout found for: participantCount: ${n}, width/height: ${r}/${i} fallback to biggest available layout (${o.name}).`);else throw Error("No layout or fallback layout found.")}if((r<o.minWidth||i<o.minHeight)&&a>0){let n=t[a-1];o=e(t.slice(0,a),n.maxTiles,r,i)}return o}(eP,t,n,r):eP[0];return a.useEffect(()=>{e.current&&i&&(e.current.style.setProperty("--lk-col-count",null==i?void 0:i.columns.toString()),e.current.style.setProperty("--lk-row-count",null==i?void 0:i.rows.toString()))},[e,i]),{layout:i}}(r,t.length),u=function(e,t){let[n,r]=a.useState(1),i=Math.max(Math.ceil(t.length/e),1);n>i&&r(i);let o=n*e,u=o-e,l=e=>{r(t=>"next"===e?t===i?t:t+1:1===t?t:t-1)},s=(function(e,t,n={}){let r=a.useRef([]),i=a.useRef(-1),o=t!==i.current,u="function"==typeof n.customSortFunction?n.customSortFunction(e):function(e){let t=[],n=[],r=[],i=[];return e.forEach(e=>{e.participant.isLocal&&e.source===c.fQ.Source.Camera?t.push(e):e.source===c.fQ.Source.ScreenShare?n.push(e):e.source===c.fQ.Source.Camera?r.push(e):i.push(e)}),[...t,...function(e){let t=[],n=[];return e.forEach(e=>{e.participant.isLocal?t.push(e):n.push(e)}),t.sort((e,t)=>eR(e.participant,t.participant)),n.sort((e,t)=>eR(e.participant,t.participant)),[...n,...t]}(n),...function(e){let t=[],n=[];return e.forEach(e=>{e.participant.isLocal?t.push(e):n.push(e)}),n.sort((e,t)=>{var n,r,i,a,o,c,u,l,s;return e.participant.isSpeaking&&t.participant.isSpeaking?(n=e.participant,t.participant.audioLevel-n.audioLevel):e.participant.isSpeaking!==t.participant.isSpeaking?(r=e.participant,i=t.participant,r.isSpeaking===i.isSpeaking?0:r.isSpeaking?-1:1):e.participant.lastSpokeAt!==t.participant.lastSpokeAt?(a=e.participant,o=t.participant,void 0!==a.lastSpokeAt||void 0!==o.lastSpokeAt?(null!=(u=null==(c=o.lastSpokeAt)?void 0:c.getTime())?u:0)-(null!=(s=null==(l=a.lastSpokeAt)?void 0:l.getTime())?s:0):0):eE(e)!==eE(t)?eE(e)?eE(t)?0:-1:eE(t)?1:0:e.participant.isCameraEnabled!==t.participant.isCameraEnabled?function(e,t){let n=e.participant.isCameraEnabled;return n===t.participant.isCameraEnabled?0:n?-1:1}(e,t):eR(e.participant,t.participant)}),[...t,...n]}(r),...i]}(e),l=[...u];if(!1===o)try{l=function(e,t,n){let r=e.map(e=>{let n=t.find(t=>eS(e)===eS(t)||"number"!=typeof e&&ek(e)&&eE(t)&&ek(e)&&eE(t)&&t.participant.identity===e.participant.identity&&t.source===e.source);return null!=n?n:e});if(r.length<t.length){let e=eQ(t,r,eS);r=[...r,...e]}let i=eN(r,n);if(eL(i,eN(t,n)).forEach(([e,t],i)=>{if(e&&t){var a;let o={dropped:eQ(a=eN(r,n)[i],t,eS),added:eQ(t,a,eS)};(0!==o.added.length||0!==o.dropped.length)&&(e_.debug(`Detected visual changes on page: ${i}, current: ${eO(e)}, next: ${eO(t)}`,{changes:o}),o.added.length===o.dropped.length&&eL(o.added,o.dropped).forEac
1h(([e,t])=>{if(e&&t)r=function(e,t,n){let r=eI(e,n),i=eI(t,n);return n.splice(r,1,t),n.splice(i,1,e),n}(e,t,r);else throw Error(`For a swap action we need a addition and a removal one is missing: ${e}, ${t}`)}),0===o.added.length&&o.dropped.length>0&&o.dropped.forEach(e=>{r=function(e,t){let n=eI(e,t);return t.splice(n,1),t}(e,r)}),o.added.length>0&&0===o.dropped.length&&o.added.forEach(e=>{r=[...r,e]}))}}),r.length>t.length){let e=eQ(r,t,eS);r=r.filter(t=>!e.map(eS).includes(eS(t)))}return r}(r.current,u,t)}catch(e){e_.error("Error while running updatePages(): ",e)}return o?r.current=u:r.current=l,i.current=t,l})(t,e).slice(u,o);return{totalPageCount:i,nextPage:()=>l("next"),prevPage:()=>l("previous"),setPage:e=>{e>i?r(i):e<1?r(1):r(e)},firstItemIndex:u,lastItemIndex:o,tracks:s,currentPage:n}}(o.maxTiles,t);return!function(e,t={}){var n;let r=a.useRef(null),i=a.useRef(null),o=null!=(n=t.minSwipeDistance)?n:50,c=e=>{i.current=null,r.current=e.targetTouches[0].clientX},u=e=>{i.current=e.targetTouches[0].clientX},l=a.useCallback(()=>{if(!r.current||!i.current)return;let e=r.current-i.current,n=e>o,a=e<-o;n&&t.onLeftSwipe&&t.onLeftSwipe(),a&&t.onRightSwipe&&t.onRightSwipe()},[o,t]);a.useEffect(()=>{let t=e.current;return t&&(t.addEventListener("touchstart",c,{passive:!0}),t.addEventListener("touchmove",u,{passive:!0}),t.addEventListener("touchend",l,{passive:!0})),()=>{t&&(t.removeEventListener("touchstart",c),t.removeEventListener("touchmove",u),t.removeEventListener("touchend",l))}},[e,l])}(r,{onLeftSwipe:u.nextPage,onRightSwipe:u.prevPage}),a.createElement("div",e1({ref:r,"data-lk-pagination":u.totalPageCount>1},i),a.createElement(tW,{tracks:u.tracks},n.children),t.length>o.maxTiles&&a.createElement(a.Fragment,null,a.createElement(tB,{totalPageCount:u.totalPageCount,currentPage:u.currentPage}),a.createElement(tJ,e1({pagesContainer:r},u))))}var tY=a.forwardRef(function(e,t){let{room:n,htmlProps:r}=function(e){let t=e1(e1({},th),e),{token:n,serverUrl:r,options:i,room:o,connectOptions:u,connect:l,audio:s,video:d,screen:f,onConnected:p,onDisconnected:h,onError:v,onMediaDeviceFailure:m,onEncryptionError:b,simulateParticipants:g}=t,y=e3(t,["token","serverUrl","options","room","connectOptions","connect","audio","video","screen","onConnected","onDisconnected","onError","onMediaDeviceFailure","onEncryptionError","simulateParticipants"]);i&&o&&e_.warn("when using a manually created room, the options object will be ignored. set the desired options directly when creating the room instead.");let[w,E]=a.useState();a.useEffect(()=>{E(null!=o?o:new c.du(i))},[o]);let k=a.useMemo(()=>{let{className:e}={className:"lk-room-container"};return td(y,{className:e})},[y]);return a.useEffect(()=>{if(!w)return;let e=()=>{let e=w.localParticipant;e_.debug("trying to publish local tracks"),Promise.all([e.setMicrophoneEnabled(!!s,"boolean"!=typeof s?s:void 0),e.setCameraEnabled(!!d,"boolean"!=typeof d?d:void 0),e.setScreenShareEnabled(!!f,"boolean"!=typeof f?f:void 0)]).catch(e=>{e_.warn(e),null==v||v(e)})},t=e=>{let t=c.CB.getFailure(e);null==m||m(t)},n=e=>{null==b||b(e)};return w.on(c.TQ.SignalConnected,e).on(c.TQ.MediaDevicesError,t).on(c.TQ.EncryptionError,n),()=>{w.off(c.TQ.SignalConnected,e).off(c.TQ.MediaDevicesError,t).off(c.TQ.EncryptionError,n)}},[w,s,d,f,v,b,m]),a.useEffect(()=>{if(w){if(g){w.simulateParticipants({participants:{count:g},publish:{audio:!0,useRealTracks:!0}});return}if(!n){e_.debug("no token yet");return}if(!r){e_.warn("no livekit url provided"),null==v||v(Error("no livekit url provided"));return}l?(e_.debug("connecting"),w.connect(r,n,u).catch(e=>{e_.warn(e),null==v||v(e)})):(e_.debug("disconnecting because connect is false"),w.disconnect())}},[l,n,JSON.stringify(u),w,v,r,g]),a.useEffect(()=>{if(!w)return;let e=e=>{switch(e){case c.em.Disconnected:h&&h();break;case c.em.Connected:p&&p()}};return w.on(c.TQ.ConnectionStateChanged,e),()=>{w.off(c.TQ.ConnectionStateChanged,e)}},[n,p,h,w]),a.useEffect(()=>{if(w)return()=>{e_.info("disconnecting on onmount"),w.disconnect()}},[w]),{room:w,htmlProps:k}}(e);return a.createElement("div",e1({ref:t},r),n&&a.createElement(tc.Provider,{value:n},a.createElement(ts.Provider,{value:e.featureFlags},e.children)))});function tG(e){let t=a.useMemo(()=>tI(e,{className:"lk-toast"}),[e]);return a.createElement("div",e1({},t),e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.