PageSourceSearch

https://fertilityspace.io/npm--opentok/client-2.22.1/dist/js/opentok.js

js fertilityspace.io collected 2026-09-28 09:10:25 UTC 1,168,502 bytes, 8,633 lines download raw bytes

1var _global3="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:global;var exports={};
2/**
3 * @license OpenTok.js 2.22.1 aec2e16be
4 *
5 * Copyright (c) 2010-2022 TokBox, Inc.
6 * Subject to the applicable Software Development Kit (SDK) License Agreement:
7 * https://www.vonage.com/legal/communications-apis/terms-of-use/
8 *
9 * Date: Tue, 22 Mar 2022 22:23:24 GMT
10 */(function webpackUniversalModuleDefinition(e,t){exports=t()})(window,(function(){return function(e){var t={};function __webpack_require__(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:false,exports:{}};e[n].call(r.exports,r,r.exports,__webpack_require__);r.l=true;return r.exports}__webpack_require__.m=e;__webpack_require__.c=t;__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:true,get:n})};__webpack_require__.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:true})};__webpack_require__.t=function(e,t){1&t&&(e=__webpack_require__(e));if(8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);__webpack_require__.r(n);Object.defineProperty(n,"default",{enumerable:true,value:e});if(2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n};__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};__webpack_require__.d(t,"a",t);return t};__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=323)}([function(e,t,n){(function(t){
11/*!
12        * @overview es6-promise - a tiny implementation of Promises/A+.
13        * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
14        * @license   Licensed under MIT license
15        *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
16        * @version   v4.2.8+1e68dce6
17        */
18(function(t,n){e.exports=n()})(0,(function(){function objectOrFunction(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function isFunction(e){return"function"===typeof e}var e=void 0;e=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var n=e;var r=0;var o=void 0;var i=void 0;var a=function asap(e,t){f[r]=e;f[r+1]=t;r+=2;2===r&&(i?i(flush):p())};function setScheduler(e){i=e}function setAsap(e){a=e}var s="undefined"!==typeof window?window:void 0;var c=s||{};var l=c.MutationObserver||c.WebKitMutationObserver;var u="undefined"===typeof self&&"undefined"!==typeof t&&"[object process]"==={}.toString.call(t);var d="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel;function useNextTick(){return function(){return t.nextTick(flush)}}function useVertxTimer(){return"undefined"!==typeof o?function(){o(flush)}:useSetTimeout()}function useMutationObserver(){var e=0;var t=new l(flush);var n=document.createTextNode("");t.observe(n,{characterData:true});return function(){n.data=e=++e%2}}function useMessageChannel(){var e=new MessageChannel;e.port1.onmessage=flush;return function(){return e.port2.postMessage(0)}}function useSetTimeout(){var e=setTimeout;return function(){return e(flush,1)}}var f=new Array(1e3);function flush(){for(var e=0;e<r;e+=2){var t=f[e];var n=f[e+1];t(n);f[e]=void 0;f[e+1]=void 0}r=0}function attemptVertx(){try{var e=Function("return this")().require("vertx");o=e.runOnLoop||e.runOnContext;return useVertxTimer()}catch(e){return useSetTimeout()}}var p=void 0;p=u?useNextTick():l?useMutationObserver():d?useMessageChannel():void 0===s&&true?attemptVertx():useSetTimeout();function then(e,t){var n=this||_global3;var r=new(this||_global3).constructor(noop);void 0===r[g]&&makePromise(r);var o=n._state;if(o){var i=arguments[o-1];a((function(){return invokeCallback(o,r,i,n._result)}))}else subscribe(n,r,e,t);return r}
19/**
20            `Promise.resolve` returns a promise that will become resolved with the
21            passed `value`. It is shorthand for the following:
22          
23            ```javascript
24            let promise = new Promise(function(resolve, reject){
25              resolve(1);
26            });
27          
28            promise.then(function(value){
29              // value === 1
30            });
31            ```
32          
33            Instead of writing the above, your code now simply becomes the following:
34          
35            ```javascript
36            let promise = Promise.resolve(1);
37          
38            promise.then(function(value){
39              // value === 1
40            });
41            ```
42          
43            @method resolve
44            @static
45            @param {Any} value value that the returned promise will be resolved with
46            Useful for tooling.
47            @return {Promise} a promise that will become fulfilled with the given
48            `value`
49          */function resolve$1(e){var t=this||_global3;if(e&&"object"===typeof e&&e.constructor===t)return e;var n=new t(noop);resolve(n,e);return n}var g=Math.random().toString(36).substring(2);function noop(){}var h=void 0;var b=1;var v=2;function selfFulfillment(){return new TypeError("You cannot resolve a promise with itself")}function cannotReturnOwn(){return new TypeError("A promises callback cannot return that same promise.")}function tryThen(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function handleForeignThenable(e,t,n){a((function(e){var r=false;var o=tryThen(n,t,(function(n){if(!r){r=true;t!==n?resolve(e,n):fulfill(e,n)}}),(function(t){if(!r){r=true;reject(e,t)}}),"Settle: "+(e._label||" unknown promise"));if(!r&&o){r=true;reject(e,o)}}),e)}function handleOwnThenable(e,t){t._state===b?fulfill(e,t._result):t._state===v?reject(e,t._result):subscribe(t,void 0,(function(t){return resolve(e,t)}),(function(t){return reject(e,t)}))}function handleMaybeThenable(e,t,n){t.constructor===e.constructor&&n===then&&t.constructor.resolve===resolve$1?handleOwnThenable(e,t):void 0===n?fulfill(e,t):isFunction(n)?handleForeignThenable(e,t,n):fulfill(e,t)}function resolve(e,t){if(e===t)reject(e,selfFulfillment());else if(objectOrFunction(t)){var n=void 0;try{n=t.then}catch(t){reject(e,t);return}handleMaybeThenable(e,t,n)}else fulfill(e,t)}function publishRejection(e){e._onerror&&e._onerror(e._result);publish(e)}function fulfill(e,t){if(e._state===h){e._result=t;e._state=b;0!==e._subscribers.length&&a(publish,e)}}function reject(e,t){if(e._state===h){e._state=v;e._result=t;a(publishRejection,e)}}function subscribe(e,t,n,r){var o=e._subscribers;var i=o.length;e._onerror=null;o[i]=t;o[i+b]=n;o[i+v]=r;0===i&&e._state&&a(publish,e)}function publish(e){var t=e._subscribers;var n=e._state;if(0!==t.length){var r=void 0,o=void 0,i=e._result;for(var a=0;a<t.length;a+=3){r=t[a];o=t[a+n];r?invokeCallback(n,r,o,i):o(i)}e._subscribers.length=0}}function invokeCallback(e,t,n,r){var o=isFunction(n),i=void 0,a=void 0,s=true;if(o){try{i=n(r)}catch(e){s=false;a=e}if(t===i){reject(t,cannotReturnOwn());return}}else i=r;t._state!==h||(o&&s?resolve(t,i):false===s?reject(t,a):e===b?fulfill(t,i):e===v&&reject(t,i))}function initializePromise(e,t){try{t((function resolvePromise(t){resolve(e,t)}),(function rejectPromise(t){reject(e,t)}))}catch(t){reject(e,t)}}var m=0;function nextId(){return m++}function makePromise(e){e[g]=m++;e._state=void 0;e._result=void 0;e._subscribers=[]}function validationError(){return new Error("Array Methods must be provided an Array")}var _=function(){function Enumerator(e,t){(this||_global3)._instanceConstructor=e;(this||_global3).promise=new e(noop);(this||_global3).promise[g]||makePromise((this||_global3).promise);if(n(t)){(this||_global3).length=t.length;(this||_global3)._remaining=t.length;(this||_global3)._result=new Array((this||_global3).length);if(0===(this||_global3).length)fulfill((this||_global3).promise,(this||_global3)._result);else{(this||_global3).length=(this||_global3).length||0;this._enumerate(t);0===(this||_global3)._remaining&&fulfill((this||_global3).promise,(this||_global3)._result)}}else reject((this||_global3).promise,validationError())}Enumerator.prototype._enumerate=function _enumerate(e){for(var t=0;(this||_global3)._state===h&&t<e.length;t++)this._eachEntry(e[t],t)};Enumerator.prototype._eachEntry=function _eachEntry(e,t){var n=(this||_global3)._instanceConstructor;var r=n.resolve;if(r===resolve$1){var o=void 0;var i=void 0;var a=false;try{o=e.then}catch(e){a=true;i=e}if(o===then&&e._state!==h)this._settledAt(e._state,t,e._result);else if("function"!==typeof o){(this||_global3)._remaining--;(this||_global3)._result[t]=e}else if(n===y){var s=new n(noop);
49a?reject(s,i):handleMaybeThenable(s,e,o);this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)};Enumerator.prototype._settledAt=function _settledAt(e,t,n){var r=(this||_global3).promise;if(r._state===h){(this||_global3)._remaining--;e===v?reject(r,n):(this||_global3)._result[t]=n}0===(this||_global3)._remaining&&fulfill(r,(this||_global3)._result)};Enumerator.prototype._willSettleAt=function _willSettleAt(e,t){var n=this||_global3;subscribe(e,void 0,(function(e){return n._settledAt(b,t,e)}),(function(e){return n._settledAt(v,t,e)}))};return Enumerator}();
50/**
51            `Promise.all` accepts an array of promises, and returns a new promise which
52            is fulfilled with an array of fulfillment values for the passed promises, or
53            rejected with the reason of the first passed promise to be rejected. It casts all
54            elements of the passed iterable to promises as it runs this algorithm.
55          
56            Example:
57          
58            ```javascript
59            let promise1 = resolve(1);
60            let promise2 = resolve(2);
61            let promise3 = resolve(3);
62            let promises = [ promise1, promise2, promise3 ];
63          
64            Promise.all(promises).then(function(array){
65              // The array here would be [ 1, 2, 3 ];
66            });
67            ```
68          
69            If any of the `promises` given to `all` are rejected, the first promise
70            that is rejected will be given as an argument to the returned promises's
71            rejection handler. For example:
72          
73            Example:
74          
75            ```javascript
76            let promise1 = resolve(1);
77            let promise2 = reject(new Error("2"));
78            let promise3 = reject(new Error("3"));
79            let promises = [ promise1, promise2, promise3 ];
80          
81            Promise.all(promises).then(function(array){
82              // Code here never runs because there are rejected promises!
83            }, function(error) {
84              // error.message === "2"
85            });
86            ```
87          
88            @method all
89            @static
90            @param {Array} entries array of promises
91            @param {String} label optional string for labeling the promise.
92            Useful for tooling.
93            @return {Promise} promise that is fulfilled when all `promises` have been
94            fulfilled, or rejected if any of them become rejected.
95            @static
96          */function all(e){return new _(this||_global3,e).promise}
97/**
98            `Promise.race` returns a new promise which is settled in the same way as the
99            first passed promise to settle.
100          
101            Example:
102          
103            ```javascript
104            let promise1 = new Promise(function(resolve, reject){
105              setTimeout(function(){
106                resolve('promise 1');
107              }, 200);
108            });
109          
110            let promise2 = new Promise(function(resolve, reject){
111              setTimeout(function(){
112                resolve('promise 2');
113              }, 100);
114            });
115          
116            Promise.race([promise1, promise2]).then(function(result){
117              // result === 'promise 2' because it was resolved before promise1
118              // was resolved.
119            });
120            ```
121          
122            `Promise.race` is deterministic in that only the state of the first
123            settled promise matters. For example, even if other promises given to the
124            `promises` array argument are resolved, but the first settled promise has
125            become rejected before the other promises became fulfilled, the returned
126            promise will become rejected:
127          
128            ```javascript
129            let promise1 = new Promise(function(resolve, reject){
130              setTimeout(function(){
131                resolve('promise 1');
132              }, 200);
133            });
134          
135            let promise2 = new Promise(function(resolve, reject){
136              setTimeout(function(){
137                reject(new Error('promise 2'));
138              }, 100);
139            });
140          
141            Promise.race([promise1, promise2]).then(function(result){
142              // Code here never runs
143            }, function(reason){
144              // reason.message === 'promise 2' because promise 2 be
144came rejected before
145              // promise 1 became fulfilled
146            });
147            ```
148          
149            An example real-world use case is implementing timeouts:
150          
151            ```javascript
152            Promise.race([ajax('foo.json'), timeout(5000)])
153            ```
154          
155            @method race
156            @static
157            @param {Array} promises array of promises to observe
158            Useful for tooling.
159            @return {Promise} a promise which settles in the same way as the first passed
160            promise to settle.
161          */function race(e){var t=this||_global3;return n(e)?new t((function(n,r){var o=e.length;for(var i=0;i<o;i++)t.resolve(e[i]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))}
162/**
163            `Promise.reject` returns a promise rejected with the passed `reason`.
164            It is shorthand for the following:
165          
166            ```javascript
167            let promise = new Promise(function(resolve, reject){
168              reject(new Error('WHOOPS'));
169            });
170          
171            promise.then(function(value){
172              // Code here doesn't run because the promise is rejected!
173            }, function(reason){
174              // reason.message === 'WHOOPS'
175            });
176            ```
177          
178            Instead of writing the above, your code now simply becomes the following:
179          
180            ```javascript
181            let promise = Promise.reject(new Error('WHOOPS'));
182          
183            promise.then(function(value){
184              // Code here doesn't run because the promise is rejected!
185            }, function(reason){
186              // reason.message === 'WHOOPS'
187            });
188            ```
189          
190            @method reject
191            @static
192            @param {Any} reason value that the returned promise will be rejected with.
193            Useful for tooling.
194            @return {Promise} a promise rejected with the given `reason`.
195          */function reject$1(e){var t=this||_global3;var n=new t(noop);reject(n,e);return n}function needsResolver(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function needsNew(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
195onstructor cannot be called as a function.")}
196/**
197            Promise objects represent the eventual result of an asynchronous operation. The
198            primary way of interacting with a promise is through its `then` method, which
199            registers callbacks to receive either a promise's eventual value or the reason
200            why the promise cannot be fulfilled.
201          
202            Terminology
203            -----------
204          
205            - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
206            - `thenable` is an object or function that defines a `then` method.
207            - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
208            - `exception` is a value that is thrown using the throw statement.
209            - `reason` is a value that indicates why a promise was rejected.
210            - `settled` the final resting state of a promise, fulfilled or rejected.
211          
212            A promise can be in one of three states: pending, fulfilled, or rejected.
213          
214            Promises that are fulfilled have a fulfillment value and are in the fulfilled
215            state.  Promises that are rejected have a rejection reason and are in the
216            rejected state.  A fulfillment value is never a thenable.
217          
218            Promises can also be said to *resolve* a value.  If this value is also a
219            promise, then the original promise's settled state will match the value's
220            settled state.  So a promise that *resolves* a promise that rejects will
221            itself reject, and a promise that *resolves* a promise that fulfills will
222            itself fulfill.
223          
224          
225            Basic Usage:
226            ------------
227          
228            ```js
229            let promise = new Promise(function(resolve, reject) {
230              // on success
231              resolve(value);
232          
233              // on failure
234              reject(reason);
235            });
236          
237            promise.then(function(value) {
238              // on fulfillment
239            }, function(reason) {
240              // on rejection
241            });
242            ```
243          
244            Advanced Usage:
245            ---------------
246          
247            Promises shine when abstracting away asynchronous interactions such as
248            `XMLHttpRequest`s.
249          
250            ```js
251            function getJSON(url) {
252              return new Promise(function(resolve, reject){
253                let xhr = new XMLHttpRequest();
254          
255                xhr.open('GET', url);
256                xhr.onreadystatechange = handler;
257                xhr.responseType = 'json';
258                xhr.setRequestHeader('Accept', 'application/json');
259                xhr.send();
260          
261                function handler() {
262                  if (this.readyState === this.DONE) {
263                    if (this.status === 200) {
264                      resolve(this.response);
265                    } else {
266                      reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
267                    }
268                  }
269                };
270              });
271            }
272          
273            getJSON('/posts.json').then(function(json) {
274              // on fulfillment
275            }, function(reason) {
276              // on rejection
277            });
278            ```
279          
280            Unlike callbacks, promises are great composable primitives.
281          
282            ```js
283            Promise.all([
284              getJSON('/posts'),
285              getJSON('/comments')
286            ]).then(function(values){
287              values[0] // => postsJSON
288              values[1] // => commentsJSON
289          
290              return values;
291            });
292            ```
293          
294            @class Promise
295            @param {Function} resolver
296            Useful for tooling.
297            @constructor
298          */var y=function(){function Promise(e){(this||_global3)[g]=nextId();(this||_global3)._result=(this||_global3)._state=void 0;(this||_global3)._subscribers=[];if(noop!==e){"function"!==typeof e&&needsResolver();(this||_global3)instanceof Promise?initializePromise(this||_global3,e):needsNew()}}
299/**
300            The primary way of interacting with a promise is through its `then` method,
301            which registers callbacks to receive either a promise's eventual value or the
302            reason why the promise cannot be fulfilled.
303             ```js
304            findUser().then(function(user){
305              // user is available
306            }, function(reason){
307              // user is unavailable, and you are given the reason why
308            });
309            ```
310             Chaining
311            --------
312             The return value of `then` is itself a promise.  This second, 'downstream'
313            promise is resolved with the return value of the first promise's fulfillment
314            or rejection handler, or rejected if the handler throws an exception.
315             ```js
316            findUser().then(function (user) {
317              return user.name;
318            }, function (reason) {
319              return 'default name';
320            }).then(function (userName) {
321              // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
322              // will be `'default name'`
323            });
324             findUser().then(function (user) {
325              throw new Error('Found user, but still unhappy');
326            }, function (reason) {
327              throw new Error('`findUser` rejected and we're unhappy');
328            }).then(function (value) {
329              // never reached
330            }, function (reason) {
331              // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
332              // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
333            });
334            ```
335            If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
336             ```js
337            findUser().then(function (user) {
338              throw new PedagogicalException('Upstream error');
339            }).then(function (value) {
340              // never reached
341            }).then(function (value) {
342              // never reached
343            }, function (reason) {
344              // The `PedgagocialException` is propagated all the way down to here
345            });
346            ```
347             Assimilation
348            ------------
349             Sometimes the value you want to propagate to a downstream promise can only be
350            retrieved asynchronously. This can be achieved by returning a promise in the
351            fulfillment or rejection handler. The downstream promise will then be pending
352            until the returned promise is settled. This is called *assimilation*.
353             ```js
354            findUser().then(function (user) {
355              return findCommentsByAuthor(user);
356            }).then(function (comments) {
357              // The user's comments are now available
358            });
359            ```
360             If the assimliated promise rejects, then the downstream promise will also reject.
361             ```js
362            findUser().then(function (user) {
363              return findCommentsByAuthor(user);
364            }).then(function (comments) {
365              // If `findCommentsByAuthor` fulfills, we'll have the value here
366            }, function (reason) {
367              // If `findCommentsByAuthor` rejects, we'll have the reason here
368            });
369            ```
370             Simple Example
371            --------------
372             Synchronous Example
373             ```javascript
374            let result;
375             try {
376              result = findResult();
377              // success
378            } catch(reason) {
379              // failure
380            }
381            ```
382             Errback Example
383             ```js
384            findResult(function(result, err){
385              if (err) {
386                // failure
387              } else {
388                // success
389              }
390            });
391            ```
392             Promise Example;
393             ```javascript
394            findResult().then(function(result){
395              // success
396            }, function(reason){
397              // failure
398            });
399            ```
400             Advanced Example
401            --------------
402             Synchronous Example
403             ```javascript
404            let author, books;
405             try {
406              author = findAuthor();
407              books  = findBooksByAuthor(author);
408              // success
409            } catch(reason) {
410              // failure
411            }
412            ```
413             Errback Example
414             ```js
415             function foundBooks(books) {
416             }
417             function failure(reason) {
418             }
419             findAuthor(function(author, err){
420              if (err) {
421                failure(err);
422                // failure
423              } else {
424                try {
425                  findBoooksByAuthor(author, function(books, err) {
426                    if (err) {
427                      failure(err);
428                    } else {
429                      try {
430                        foundBooks(books);
431                      } catch(reason) {
432                        failure(reason);
433                      }
434                    }
435                  });
436                } catch(error) {
437                  failure(err);
438                }
439                // success
440              }
441            });
442            ```
443             Promise Example;
444             ```javascript
445            findAuthor().
446              then(findBooksByAuthor).
447              then(function(books){
448                // found books
449            }).catch(function(reason){
450              // something went wrong
451            });
452            ```
453             @method then
454            @param {Function} onFulfilled
455            @param {Function} onRejected
456            Useful for tooling.
457            @return {Promise}
458            */
459/**
460            `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
461            as the catch block of a try/catch statement.
462            ```js
463            function findAuthor(){
464            throw new Error('couldn't find that author');
465            }
466            // synchronous
467            try {
468            findAuthor();
469            } catch(reason) {
470            // something went wrong
471            }
472            // async with promises
473            findAuthor().catch(function(reason){
474            // something went wrong
475            });
476            ```
477            @method catch
478            @param {Function} onRejection
479            Useful for tooling.
480            @return {Promise}
481            */Promise.prototype.catch=function _catch(e){return this.then(null,e)};
482/**
483              `finally` will be invoked regardless of the promise's fate just as native
484              try/catch/finally behaves
485            
486              Synchronous example:
487            
488              ```js
489              findAuthor() {
490                if (Math.random() > 0.5) {
491                  throw new Error();
492                }
493                return new Author();
494              }
495            
496              try {
497                return findAuthor(); // succeed or fail
498              } catch(error) {
499                return findOtherAuther();
500              } finally {
501                // always runs
502                // doesn't affect the return value
503              }
504              ```
505            
506              Asynchronous example:
507            
508              ```js
509              findAuthor().catch(function(reason){
510                return findOtherAuther();
511              }).finally(function(){
512                // author was either found, or not
513              });
514              ```
515            
516              @method finally
517              @param {Function} callback
518              @return {Promise}
519            */Promise.prototype.finally=function _finally(e){var t=this||_global3;var n=t.constructor;return isFunction(e)?t.then((function(t){return n.resolve(e()).then((function(){return t}))}),(function(t){return n.resolve(e()).then((function(){throw t}))})):t.then(e,e)};return Promise}();y.prototype.then=then;y.all=all;y.race=race;y.resolve=resolve$1;y.reject=reject$1;
519y._setScheduler=setScheduler;y._setAsap=setAsap;y._asap=a;function polyfill(){var e=void 0;if("undefined"!==typeof(void 0!==typeof window?window:_global3))e=void 0!==typeof window?window:_global3;else if("undefined"!==typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=y}y.polyfill=polyfill;y.Promise=y;return y}))}).call(this||_global3,n(69))},function(e,t,n){const r=n(391);const o=n(190);const i=n(119);
520/**
521       * @typedef {Object} Logger
522       * @property {Function} error
523       * @property {Function} warn
524       * @property {Function} info
525       * @property {Function} log
526       * @property {Function} debug
527       * @property {Function} spam
528       */const a=o((e=>{
529/** @type Logger */
530const t={};const setMethods=()=>{Object.keys(i).forEach((n=>{const o=i[n].method;const a=r(`OpenTok:${e}:${n.toLowerCase()}`);a.log=console[o].bind(console);t[n.toLowerCase()]=a}))};setMethods();return t}));a.setLogLevel=e=>{let t;try{t=(void 0!==typeof window?window:_global3).localStorage.debug}catch(e){t=""}const n=Object.keys(i).map((t=>`${e>=i[t].priority?"":"-"}(autogen)?OpenTok:*:${t.toLowerCase()}`));const o=[...n,...(t||"").split(/[\s,]/).filter((e=>-1===e.indexOf("(autogen)?")))].filter((e=>e)).join(",");r.enable(o)};e.exports=a},function(e,t,n){(function(t){var r,o,i,a,s;const c={version:-1,name:"unknown"};const l=n(530);const u=n(531);const d=n(532);const f=(null==(r=void 0!==typeof window?window:_global3)||null==(o=r.navigator)?void 0:o.userAgent.toLowerCase().indexOf("electron"))>=0;if("string"!==typeof(null==(i=void 0!==typeof window?window:_global3)||null==(a=i.process)||null==(s=a.versions)?void 0:s.node)||f){c.userAgent=(void 0!==typeof window?window:_global3).navigator.userAgent.toLowerCase();c.name="unknown";if(c.userAgent.indexOf("opera")>-1||c.userAgent.indexOf("opr/")>-1){c.name="Opera";c.isOpera=true;null!==/opr\/([0-9]{1,}[.0-9]{0,})/.exec(c.userAgent)&&(c.version=parseFloat(RegExp.$1))}else if(c.userAgent.indexOf("firefox")>-1){c.name="Firefox";c.isFirefox=true;null!==/firefox\/([0-9]{1,}[.0-9]{0,})/.exec(c.userAgent)&&(c.version=parseFloat(RegExp.$1))}else if(c.userAgent.match(/edge?\/(\d+)(?:\.\d+)+$/)){c.name="Edge";c.isEdge=true;const e=RegExp.$1;c.version=parseInt(e,10)}else if(c.userAgent.indexOf("chrome")>-1){c.name="Chrome";c.isElectron=f;c.isElectron?c.electronVersion=d((void 0!==typeof window?window:_global3).navigator.userAgent):c.isChrome=true;null!==/chrome\/([0-9]{1,}[.0-9]{0,})/.exec(c.userAgent)&&(c.version=parseFloat(RegExp.$1))}else if((void 0!==typeof window?window:_global3).navigator.vendor&&(void 0!==typeof window?window:_global3).navigator.vendor.toLowerCase().indexOf("apple")>-1){c.name="Safari";c.isSafari=true;c.isiOS=l();c.isiOS&&(c.iOSVersion=parseFloat(u()));(null!==/version\/([0-9]{1,}[.0-9]{0,})/.exec(c.userAgent)||null!==/fxios\/([0-9]{1,}[.0-9]{0,})/.exec(c.userAgent)||null!==/crios\/([0-9]{1,}[.0-9]{0,})/.exec(c.userAgent))&&(c.version=parseFloat(RegExp.$1))}else c.userAgent.indexOf("applewebkit")>-1&&-1===c.userAgent.indexOf("version")&&(c.isIosWebView=true);c.isChromiumEdge="Edge"===c.name&&c.version>=79;c.isLegacyEdge="Edge"===c.name&&c.version<79;c.isLegacyElectron=c.isElectron&&c.electronVersion<2;c.isLegacyChrome=c.isChrome&&c.version<50;c.isAndroid=c.userAgent.indexOf("android")>-1;c.userAgent=(void 0!==typeof window?window:_global3).navigator.userAgent;c.protocol=(void 0!==typeof window?window:_global3).location.protocol;c.hostName=(void 0!==typeof window?window:_global3).location.hostName;(-1===c.version||"unknown"===c.name||c.isiOS&&!c.iOSVersion)&&(c.error=true)}else{c.name="Node";c.isNode=true;c.version=parseInt(t.versions.node,10);c.userAgent=`${c.name} ${c.version}`}e.exports=c}).call(this||_global3,n(69))},function(e,t){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.exports=_interopRequireDefault},function(e,t,n){e.exports={AUTHENTICATION_ERROR:"OT_AUTHENTICATION_ERROR",BADLY_FORMED_RESPONSE:"OT_BADLY_FORMED_RESPONSE",CHROME_MICROPHONE_ACQUISITION_ERROR:"OT_CHROME_MICROPHONE_ACQUISITION_ERROR",CONNECT_FAILED:"OT_CONNECT_FAILED",CONNECTION_LIMIT_EXCEEDED:"OT_CONNECTION_LIMIT_EXCEEDED",CONSTRAINTS_NOT_SATISFIED:"OT_CONSTRAINTS_NOT_SATISFIED",CREATE_PEER_CONNECTION_FAILED:"OT_CREATE_PEER_CONNECTION_FAILED",DISCONNECTED:"OT_DISCONNECTED",EMPTY_RESPONSE_BODY:"OT_EMPTY_RESPONSE_BODY",GET_RTC_STATS_REPORT_NOT_SUPPORTED:"OT_GET_RTC_STATS_REPORT_NOT_SUPPORTED",HARDWARE_UNAVAILABLE:"OT_HARDWARE_UNAVAILABLE",ICE_WORKFLOW_FAILED:"OT_ICE_WORKFLOW_FAILED",INVALID_HTTP_STATUS:"OT_INVALID_HTTP_STATUS",INVALID_PARAMETER:"OT_INVALID_PARAMETER",INVALID_SESSION_ID:"OT_INVALID_SESSION_ID",MEDIA_ERR_ABORTED:"OT_MEDIA_ERR_ABORTED",MEDIA_ERR_DECODE:"OT_MEDIA_ERR_DECODE",MEDIA_ERR_NETWORK:"OT_MEDIA_ERR_NETWORK",MEDIA_ERR_SRC_NOT_SUPPORTED:"OT_MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ENDED:"OT_MEDIA_ENDED",NO_DEVICES_FOUND:"OT_NO_DEVICES_FOUND",NO_VALID_CONSTRAINTS:"OT_NO_VALID_CONSTRAINTS",NOT_CONNECTED:"OT_NOT_CONNECTED",NOT_FOUND:"OT_NOT_FOUND",NOT_SUPPORTED:"OT_NOT_SUPPORTED",PEER_CONNECTION_NOT_CONNECTED:"OT_PEER_CONNECTION_NOT_CONNECTED",PERMISSION_DENIED:"OT_PERMISSION_DENIED",RATE_LIMIT_EXCEEDED:"OT_RATE_LIMIT_EXCEEDED",REPORT_ISSUE_FAILED:"OT_REPORT_ISSUE_FAILED",SCREEN_SHARING_EXTENSION_NOT_INSTALLED:"OT_SCREEN_SHARING_EXTENSION_NOT_INSTALLED",SCREEN_SHARING_EXTENSION_NOT_REGISTERED:"OT_SCREEN_SHARING_EXTENSION_NOT_REGISTERED",SCREEN_SHARING_NOT_SUPPORTED:"OT_SCREEN_SHARING_NOT_SUPPORTED",SET_REMOTE_DESCRIPTION_FAILED:"OT_SET_REMOTE_DESCRIPTION_FAILED",SOCKET_ALREADY_CONNECTED_CONNECTING:"OT_SOCKET_ALREADY_CONNECTED_CONNECTING",SOCKET_CLOSE_ABNORMAL:"OT_SOCKET_CLOSE_ABNORMAL",SOCKET_CLOSE_CONNECT_EXCEPTION:"OT_SOCKET_CLOSE_CONNECT_EXCEPTION",SOCKET_CLOSE_CONNECTIVITY_LOSS:"OT_SOCKET_CLOSE_CONNECTIVITY_LOSS",SOCKET_CLOSE_FA
530LLBACK_CODE:"OT_SOCKET_CLOSE_FALLBACK_CODE",SOCKET_CLOSE_INCONSISTENT_DATA:"OT_SOCKET_CLOSE_INCONSISTENT_DATA",SOCKET_CLOSE_NO_STATUS:"OT_SOCKET_CLOSE_NO_STATUS",SOCKET_CLOSE_POLICY_VIOLATION:"OT_SOCKET_CLOSE_POLICY_VIOLATION",SOCKET_CLOSE_GOING_AWAY:"OT_SOCKET_CLOSE_GOING_AWAY",SOCKET_CLOSE_PROTOCOL_ERROR:"OT_SOCKET_CLOSE_PROTOCOL_ERROR",SOCKET_CLOSE_TIMEOUT:"OT_SOCKET_CLOSE_TIMEOUT",SOCKET_CLOSE_TOO_LARGE:"OT_SOCKET_CLOSE_TOO_LARGE",SOCKET_CLOSE_UNEXPECTED_CONDITION:"OT_SOCKET_CLOSE_UNEXPECTED_CONDITION",SOCKET_CLOSE_UNSUPPORTED:"OT_SOCKET_CLOSE_UNSUPPORTED",STREAM_CREATE_FAILED:"OT_STREAM_CREATE_FAILED",STREAM_DESTROYED:"OT_STREAM_DESTROYED",STREAM_LIMIT_EXCEEDED:"OT_STREAM_LIMIT_EXCEEDED",STREAM_NOT_FOUND:"OT_STREAM_NOT_FOUND",UNABLE_TO_SUBSCRIBE:"OT_UNABLE_TO_SUBSCRIBE",TERMS_OF_SERVICE_FAILURE:"OT_TERMS_OF_SERVICE_FAILURE",TIMEOUT:"OT_TIMEOUT",CANCEL:"OT_CANCEL",UNABLE_TO_CAPTURE_MEDIA:"OT_UNABLE_TO_CAPTURE_MEDIA",UNABLE_TO_CAPTURE_SCREEN:"OT_UNABLE_TO_CAPTURE_SCREEN",UNEXPECTED_ERROR_CODE:"OT_UNEXPECTED_ERROR_CODE",UNEXPECTED_HTTP_STATUS:"OT_UNEXPECTED_HTTP_STATUS",UNEXPECTED_SERVER_RESPONSE:"OT_UNEXPECTED_SERVER_RESPONSE",UNKNOWN_HTTP_ERROR:"OT_UNKNOWN_HTTP_ERROR",UNSUPPORTED_BROWSER:"OT_UNSUPPORTED_BROWSER",USER_MEDIA_ACCESS_DENIED:"OT_USER_MEDIA_ACCESS_DENIED",XDOMAIN_OR_PARSING_ERROR:"OT_XDOMAIN_OR_PARSING_ERROR",API_KEY_DISABLED:"OT_API_KEY_DISABLED",UNABLE_TO_ACCESS_MEDIA_ENGINE:"OT_UNABLE_TO_ACCESS_MEDIA_ENGINE",SET_PROXY_URL_TIMING_ERROR:"OT_SET_PROXY_URL_TIMING_ERROR",PROXY_URL_ALREADY_SET_ERROR:"OT_PROXY_URL_ALREADY_SET_ERROR",SET_VIDEO_SOURCE_FAILURE:"OT_SET_VIDEO_SOURCE_FAILURE",INVALID_VIDEO_SOURCE:"OT_INVALID_VIDEO_SOURCE",REQUESTED_DEVICE_PERMISSION_DENIED:"OT_REQUESTED_DEVICE_PERMISSION_DENIED",INVALID_AUDIO_OUTPUT_SOURCE:"OT_INVALID_AUDIO_OUTPUT_SOURCE"}},function(e,t,n){const r=n(245);const o=n(249);const i=n(6);const a=n(1);r.logging=a("OT.$");r.ElementCollection=n(246);r.env=n(2);r.ajax=n(244);r.statable=n(538);r.Analytics=n(243);r.Collection=n(248);r.domExtras=n(539);r.Error=n(250);o(r,"useLogHelpers",{value(e){const t=a("useLogHelpersDeprecatedMixin");Object.keys(t).forEach((n=>{e[n]=t[n]}));return e},name:"OT.useLogHelpers",getWarning:"Please use an external library for your debugging needs"});r.defaults=n(140);o(r,"eventing",{value:i,name:"OT.$.eventing",getWarning:"Please use an external library to create an event emitter."});Object.keys(r).forEach((e=>{const t=r[e];const n=t._attachToOTHelpers||{};Object.keys(n).forEach((t=>{!Object.hasOwnProperty.call(r,t)||"util"===e&&"bind"===t||console.warn(`More than one module is trying to define ${t} on OTHelpers.`);r[t]=n[t]}))}));e.exports=r},function(e,t,n){const r=n(41);const o=n(15);const i=n(1)("Events");const a=n(7);const s=n(396);e.exports=function eventing(e){const t=new r;t.on("newListener",(e=>{t.emit(`${e}:added`)}));t.on("removeListener",(e=>{t.emit(`${e}:removed`)}));const n={
531/**
532           * Adds an event handler function for one or more events.
533           *
534           * <p>
535           * The following code adds an event handler for one event:
536           * </p>
537           *
538           * <pre>
539           * obj.on("eventName", function (event) {
540           *     // This is the event handler.
541           * });
542           * </pre>
543           *
544           * <p>If you pass in multiple event names and a handler method, the handler is
545           * registered for each of those events:</p>
546           *
547           * <pre>
548           * obj.on("eventName1 eventName2",
549           *        function (event) {
550           *            // This is the event handler.
551           *        });
552           * </pre>
553           *
554           * <p>You can also pass in a third <code>context</code> parameter (which is optional) to
555           * define the value of <code>this</code> in the handler method:</p>
556           *
557           * <pre>obj.on("eventName",
558           *        function (event) {
559           *            // This is the event handler.
560           *        },
561           *        obj);
562           * </pre>
563           *
564           * <p>
565           * The method also supports an alternate syntax, in which the first parameter is an object
566           * that is a hash map of event names and handler functions and the second parameter (optional)
567           * is the context for this in each handler:
568           * </p>
569           * <pre>
570           * obj.on(
571           *    {
572           *       eventName1: function (event) {
573           *               // This is the handler for eventName1.
574           *           },
575           *       eventName2:  function (event) {
576           *               // This is the handler for eventName2.
577           *           }
578           *    },
579           *    obj);
580           * </pre>
581           *
582           * <p>
583           * If you do not add a handler for an event, the event is ignored locally.
584           * </p>
585           *
586           * @param {String} type The string identifying the type of event. You can specify multiple event
587           * names in this string, separating them with a space. The event handler will process each of
588           * the events.
589           * @param {Function} handler The handler function to process the event. This function takes
590           * the event object as a parameter.
591           * @param {Object} context (Optional) Defines the value of <code>this</code> in the event
592           * handler function.
593           *
594           * @returns {EventDispatcher} The EventDispatcher object.
595           *
596           * @memberOf EventDispatcher
597           * @method #on
598           * @see <a href="#off">off()</a>
599           * @see <a href="#once">once()</a>
600           * @see <a href="#events">Events</a>
601           */
602on(e,n,r){"string"===typeof e&&n?e.split(" ").forEach((e=>{t.on(e,s(n,r))})):Object.keys(e).forEach((r=>{t.on(r,s(e[r],n))}));return this||_global3},
603/**
604           * Removes an event handler or handlers.
605           *
606           * <p>If you pass in one event name and a handler method, the handler is removed for that
607           * event:</p>
608           *
609           * <pre>obj.off("eventName", eventHandler);</pre>
610           *
611           * <p>If you pass in multiple event names and a handler method, the handler is removed for
612           * those events:</p>
613           *
614           * <pre>obj.off("eventName1 eventName2", eventHandler);</pre>
615           *
616           * <p>If you pass in an event name (or names) and <i>no</i> handler method, all handlers are
617           * removed for those events:</p>
618           *
619           * <pre>obj.off("event1Name event2Name");</pre>
620           *
621           * <p>If you pass in no arguments, <i>all</i> event handlers are removed for all events
622           * dispatched by the object:</p>
623           *
624           * <pre>obj.off();</pre>
625           *
626           * <p>
627           * The method also supports an alternate syntax, in which the first parameter is an object that
628           * is a hash map of event names and handler functions and the second parameter (optional) is
629           * the context for this in each handler:
630           * </p>
631           * <pre>
632           * obj.off(
633           *    {
634           *       eventName1: event1Handler,
635           *       eventName2: event2Handler
636           *    });
637           * </pre>
638           *
639           * @param {String} type (Optional) The string identifying the type of event. You can
640           * use a space to specify multiple events, as in "accessAllowed accessDenied
641           * accessDialogClosed". If you pass in no <code>type</code> value (or other arguments),
642           * all event handlers are removed for the object.
643           * @param {Function} handler (Optional) The event handler function to remove. The handler
644           * must be the same function object as was passed into <code>on()</code>. Be careful with
645           * helpers like <code>bind()</code> that return a new function when called. If you pass in
646           * no <code>handler</code>, all event handlers are removed for the specified event
647           * <code>type</code>.
648           * @param {Object} context (Optional) If you specify a <code>context</code>, the event handler
649           * is removed for all specified events and handlers that use the specified context. (The
650           * context must match the context passed into <code>on()</code>.)
651           *
652           * @returns {Object} The object that dispatched the event.
653           *
654           * @memberOf EventDispatcher
655           * @method #off
656           * @see <a href="#on">on()</a>
657           * @see <a href="#once">once()</a>
658           * @see <a href="#events">Events</a>
659           */
660off(e,n,r){"string"===typeof e?this.off(e.split(" "),n,r):Array.isArray(e)?e.forEach((e=>{n&&o(n)?t.removeListener(e,s(n,r)):t.removeAllListeners(e)})):e?Object.keys(e).forEach((r=>{t.removeListener(r,s(e[r],n))})):t.removeAllListeners();return this||_global3},
661/**
662           * Adds an event handler function for one or more events. Once the handler is called,
663           * the specified handler method is removed as a handler for this event. (When you use
664           * the <code>on()</code> method to add an event handler, the handler is <i>not</i>
665           * removed when it is called.) The <code>once()</code> method is the equivilent of
666           * calling the <code>on()</code>
667           * method and calling <code>off()</code> the first time the handler is invoked.
668           *
669           * <p>
670           * The following code adds a one-time event handler for one event:
671           * </p>
672           *
673           * <pre>
674           * obj.once("eventName", function (event) {
675           *    // This is the event handler.
676           * });
677           * </pre>
678           *
679           * <p>If you pass in multiple event names and a handler method, the handler is registered
680           * for each of those events:</p>
681           *
682           * <pre>obj.once("eventName1 eventName2"
683           *          function (event) {
684           *              // This is the event handler.
685           *          });
686           * </pre>
687           *
688           * <p>You can also pass in a third <code>context</code> parameter (which is optional) to define
689           * the value of
690           * <code>this</code> in the handler method:</p>
691           *
692           * <pre>obj.once("eventName",
693           *          function (event) {
694           *              // This is the event handler.
695           *          },
696           *          obj);
697           * </pre>
698           *
699           * <p>
700           * The method also supports an alternate syntax, in which the first parameter is an object that
701           * is a hash map of event names and handler functions and the second parameter (optional) is the
702           * context for this in each handler:
703           * </p>
704           * <pre>
705           * obj.once(
706           *    {
707           *       eventName1: function (event) {
708           *                  // This is the event handler for eventName1.
709           *           },
710           *       eventName2:  function (event) {
711           *                  // This is the event handler for eventName1.
712           *           }
713           *    },
714           *    obj);
715           * </pre>
716           *
717           * @param {String} type The string identifying the type of event. You can specify multiple
718           * event names in this string, separating them with a space. The event handler will process
719           * the first occurence of the events. After the first event, the handler is removed (for
720           * all specified events).
721           * @param {Function} handler The handler function to process the event. This function takes
722           * the event object as a parameter.
723           * @param {Object} context (Optional) Defines the value of <code>this</code> in the event
724           * handler function.
725           *
726           * @returns {Object} The object that dispatched the event.
727           *
728           * @memberOf EventDispatcher
729           * @method #once
730           * @see <a href="#on">on()</a>
731           * @see <a href="#off">off()</a>
732           * @see <a href="#events">Events</a>
733           */
734once(e,n,r){"string"===typeof e&&n?e.split(" ").forEach((e=>{t.once(e,s(n,r))})):Object.keys(e).forEach((r=>{t.once(r,s(e[r],n))}));return this||_global3},
735/**
736           * Execute any listeners bound to the +event+ Event.
737           *
738           * Each handler will be executed.
739           *
740           * @param [Event] event An Event object.
741           * @return this
742          */
743dispatchEvent(e){if(!e.type)throw new Error("dispatchEvent: Event has no type");e.target||(e.target=this||_global3);this.trigger(e.type,e);return this||_global3},
744/**
745           * Execute each handler for the event called +name+.
746           *
747           * Each handler will be executed, and any exceptions that they throw will
748           * be caught and logged
749           *
750           * @example
751           * foo.on('bar', function(name, message) {
752           *   alert("Hello " + name + ": " + message);
753           * });
754           *
755           * foo.trigger('OpenTok', 'asdf'); // -> Hello OpenTok: asdf
756           *
757           * @param {String} eventName The name of this event.
758           * @param {Array} arguments The arguments handlers will be called with
759           *
760           * @return this
761           */
762trigger(e){try{for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit(e,...r)}catch(e){i.error("An error occurred in an event handler",e)}return this||_global3},emit(){return e.trigger(...arguments)},
763/**
764           * @deprecated use <a href="#on">on()</a> or <a href="#once">once()</a> instead.
765           * <p>
766           * This method registers a method as an event listener for a specific event.
767           * <p>
768           *
769           * <p>
770           *   If a handler is not registered for an event, the event is ignored locally. If the
771           *   event listener function does not exist, the event is ignored locally.
772           * </p>
773           * <p>
774           *   Throws an exception if the <code>listener</code>
774 name is invalid.
775           * </p>
776           *
777           * @param {String} type The string identifying the type of event.
778           *
779           * @param {Function} listener The function to be invoked when the object dispatches the event.
780           *
781           * @param {Object} context (Optional) Defines the value of <code>this</code> in the event
782           * handler function.
783           *
784           * @memberOf EventDispatcher
785           * @method #addEventListener
786           * @see <a href="#on">on()</a>
787           * @see <a href="#once">once()</a>
788           * @see <a href="#events">Events</a>
789          */
790addEventListener(t,n,r){i.warn("The addEventListener() method is deprecated. Use on() or once() instead.");return e.on(t,n,r)},
791/**
792           * @deprecated use <a href="#off">off()</a> instead.
793           * <p>
794           * Removes an event listener for a specific event.
795           * <p>
796           *
797           * <p>
798           *   Throws an exception if the <code>listener</code> name is invalid.
799           * </p>
800           *
801           * @param {String} type The string identifying the type of event.
802           *
803           * @param {Function} listener The event listener function to remove.
804           *
805           * @param {Object} context (Optional) If you specify a <code>context</code>, the event
806           * handler is removed for all specified events and event listeners that use the specified
807           context. (The context must match the context passed into
808           * <code>addEventListener()</code>.)
809           *
810           * @memberOf EventDispatcher
811           * @method #removeEventListener
812           * @see <a href="#off">off()</a>
813           * @see <a href="#events">Events</a>
814           */
815removeEventListener(t,n,r){i.warn("The removeEventListener() method is deprecated. Use off() instead.");return e.off(t,n,r)},listenerCount(e){return t.listenerCount(e)}};return a(e,n)}},function(e,t,n){var r=n(83),o=n(39),i=n(191),a=n(24),s=n(68),c=n(30);var l=Object.prototype;var u=l.hasOwnProperty;
816/**
817       * Assigns own enumerable string keyed properties of source objects to the
818       * destination object. Source objects are applied from left to right.
819       * Subsequent sources overwrite property assignments of previous sources.
820       *
821       * **Note:** This method mutates `object` and is loosely based on
822       * [`Object.assign`](https://mdn.io/Object/assign).
823       *
824       * @static
825       * @memberOf _
826       * @since 0.10.0
827       * @category Object
828       * @param {Object} object The destination object.
829       * @param {...Object} [sources] The source objects.
830       * @returns {Object} Returns `object`.
831       * @see _.assignIn
832       * @example
833       *
834       * function Foo() {
835       *   this.a = 1;
836       * }
837       *
838       * function Bar() {
839       *   this.c = 3;
840       * }
841       *
842       * Foo.prototype.b = 2;
843       * Bar.prototype.d = 4;
844       *
845       * _.assign({ 'a': 0 }, new Foo, new Bar);
846       * // => { 'a': 1, 'c': 3 }
847       */var d=i((function(e,t){if(s(t)||a(t))o(t,c(t),e);else for(var n in t)u.call(t,n)&&r(e,n,t[n])}));e.exports=d},function(e,t,n){e.exports={JS_EXCEPTION:2e3,AUTHENTICATION_ERROR:1004,INVALID_SESSION_ID:1005,CONNECT_FAILED:1006,CONNECT_REJECTED:1007,CONNECTION_TIMEOUT:1008,NOT_CONNECTED:1010,INVALID_PARAMETER:1011,P2P_CONNECTION_FAILED:1013,API_RESPONSE_FAILURE:1014,PEER_CONNECTION_NOT_CONNECTED:1015,TERMS_OF_SERVICE_FAILURE:1026,CONNECTION_LIMIT_EXCEEDED:1027,UNABLE_TO_PUBLISH:1500,UNABLE_TO_SUBSCRIBE:1501,UNSUPPORTED_VIDEO_CODEC:1502,UNABLE_TO_FORCE_DISCONNECT:1520,UNABLE_TO_FORCE_UNPUBLISH:1530,UNABLE_TO_FORCE_MUTE:1540,PUBLISHER_ICE_WORKFLOW_FAILED:1553,SUBSCRIBER_ICE_WORKFLOW_FAILED:1554,STREAM_LIMIT_EXCEEDED:1605,UNEXPECTED_SERVER_RESPONSE:2001,REPORT_ISSUE_ERROR:2011,SET_PROXY_URL_TIMING_ERROR:2021,PROXY_URL_ALREADY_SET_ERROR:2022,GET_RTC_STATS_REPORT_NOT_SUPPORTED:2031,ANVIL_BADLY_FORMED_RESPONSE:3001,ANVIL_INVALID_HTTP_STATUS:3002,ANVIL_XDOMAIN_OR_PARSING_ERROR:3003,ANVIL_UNKNOWN_HTTP_ERROR:3004,ANVIL_UNEXPECTED_ERROR_CODE:3005,ANVIL_EMPTY_RESPONSE_BODY:3006,ANVIL_CONNECT_FAILED:3007,UNABLE_TO_ACCESS_MEDIA_ENGINE:5001}},function(e,t){
848/**
849       * Checks if `value` is the
850       * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
851       * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
852       *
853       * @static
854       * @memberOf _
855       * @since 0.1.0
856       * @category Lang
857       * @param {*} value The value to check.
858       * @returns {boolean} Returns `true` if `value` is an object, else `false`.
859       * @example
860       *
861       * _.isObject({});
862       * // => true
863       *
864       * _.isObject([1, 2, 3]);
865       * // => true
866       *
867       * _.isObject(_.noop);
868       * // => true
869       *
870       * _.isObject(null);
871       * // => false
872       */
873function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=isObject},function(e,t){
874/**
875       * Checks if `value` is classified as an `Array` object.
876       *
877       * @static
878       * @memberOf _
879       * @since 0.1.0
880       * @category Lang
881       * @param {*} value The value to check.
882       * @returns {boolean} Returns `true` if `value` is an array, else `false`.
883       * @example
884       *
885       * _.isArray([1, 2, 3]);
886       * // => true
887       *
888       * _.isArray(document.body.children);
889       * // => false
890       *
891       * _.isArray('abc');
892       * // => false
893       *
894       * _.isArray(_.noop);
895       * // => false
896       */
897var n=Array.isArray;e.exports=n},function(e,t,n){e.exports=function otErrorFactory(e){void 0===e&&(e={});const t=e.Errors||n(4);const r=e.OTErrorClass||n(21);const o=Object.keys(t).map((e=>t[e]));return function otError(e,t,n){if(-1===o.indexOf(e))return new Error(`Attempt to use invalid error name (${e}). Original message: ${t.message}`);if(!(t instanceof Error||/^\[object .*Error\]$/.test(Object.prototype.toString.call(t))))return new Error(`Did not pass Error as second argument: ${t}`);const i=new r(void 0,t.message);i.name=e;if(!t.stack)try{throw t}catch(e){}i.stack=t.stack;n&&(i.code=n);return i}}},function(e,t,n){e.exports=n(601)},function(e,t,n){(function(t){function asyncGeneratorStep(e,n,r,o,i,a,s){try{var c=e[a](s);var l=c.value}catch(e){r(e);return}c.done?n(l):t.resolve(l).then(o,i)}function _asyncToGenerator(e){return function(){var n=this||_global3,r=arguments;return new t((function(t,o){var i=e.apply(n,r);function _next(e){asyncGeneratorStep(i,t,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,t,o,_next,_throw,"throw",e)}_next(void 0)}))}}e.exports=_asyncToGenerator}).call(this||_global3,n(0))},function(e,t,n){var r=n(173);var o="object"==typeof self&&self&&self.Object===Object&&self;var i=r||o||Function("return this")();e.exports=i},function(e,t,n){var r=n(29),o=n(9);var i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",c="[object Proxy]";
898/**
899       * Checks if `value` is classified as a `Function` object.
900       *
901       * @static
902       * @memberOf _
903       * @since 0.1.0
904       * @category Lang
905       * @param {*} value The value to check.
906       * @returns {boolean} Returns `true` if `value` is a function, else `false`.
907       * @example
908       *
909       * _.isFunction(_);
910       * // => true
911       *
912       * _.isFunction(/abc/);
913       * // => false
914       */function isFunction(e){if(!o(e))return false;var t=r(e);return t==a||t==s||t==i||t==c}e.exports=isFunction},function(e,t){
915/**
916       * Checks if `value` is object-like. A value is object-like if it's not `null`
917       * and has a `typeof` result of "object".
918       *
919       * @static
920       * @memberOf _
921       * @since 4.0.0
922       * @category Lang
923       * @param {*} value The value to check.
924       * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
925       * @example
926       *
927       * _.isObjectLike({});
928       * // => true
929       *
930       * _.isObjectLike([1, 2, 3]);
931       * // => true
932       *
933       * _.isObjectLike(_.noop);
934       * // => false
935       *
936       * _.isObjectLike(null);
937       * // => false
938       */
939function isObjectLike(e){return null!=e&&"object"==typeof e}e.exports=isObjectLike},function(e,t,n){var r=n(207);var o=Object.prototype.toString;
940/**
941       * Determine if a value is an Array
942       *
943       * @param {Object} val The value to test
944       * @returns {boolean} True if value is an Array, otherwise false
945       */function isArray(e){return"[object Array]"===o.call(e)}
946/**
947       * Determine if a value is undefined
948       *
949       * @param {Object} val The value to test
950       * @returns {boolean} True if the value is undefined, otherwise false
951       */function isUndefined(e){return"undefined"===typeof e}
952/**
953       * Determine if a value is a Buffer
954       *
955       * @param {Object} val The value to test
956       * @returns {boolean} True if value is a Buffer, otherwise false
957       */function isBuffer(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
958/**
959       * Determine if a value is an ArrayBuffer
960       *
961       * @param {Object} val The value to test
962       * @returns {boolean} True if value is an ArrayBuffer, otherwise false
963       */function isArrayBuffer(e){return"[object ArrayBuffer]"===o.call(e)}
964/**
965       * Determine if a value is a FormData
966       *
967       * @param {Object} val The value to test
968       * @returns {boolean} True if value is an FormData, otherwise false
969       */function isFormData(e){return"undefined"!==typeof FormData&&e instanceof FormData}
970/**
971       * Determine if a value is a view on an ArrayBuffer
972       *
973       * @param {Object} val The value to test
974       * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
975       */function isArrayBufferView(e){var t;t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer;return t}
976/**
977       * Determine if a value is a String
978       *
979       * @param {Object} val The value to test
980       * @returns {boolean} True if value is a String, otherwise false
981       */function isString(e){return"string"===typeof e}
982/**
983       * Determine if a value is a Number
984       *
985       * @param {Object} val The value to test
986       * @returns {boolean} True if value is a Number, otherwise false
987       */function isNumber(e){return"number"===typeof e}
988/**
989       * Determine if a value is an Object
990       *
991       * @param {Object} val The value to test
992       * @returns {boolean} True if value is an Object, otherwise false
993       */function isObject(e){return null!==e&&"object"===typeof e}
994/**
995       * Determine if a value is a plain Object
996       *
997       * @param {Object} val The value to test
998       * @return {boolean} True if value is a plain Object, otherwise false
999       */function isPlainObject(e){if("[object Object]"!==o.call(e))return false;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}
1000/**
1001       * Determine if a value is a Date
1002       *
1003       * @param {Object} val The value to test
1004       * @returns {boolean} True if value is a Date, otherwise false
1005       */function isDate(e){return"[object Date]"===o.call(e)}
1006/**
1007       * Determine if a value is a File
1008       *
1009       * @param {Object} val The value to test
1010       * @returns {boolean} True if value is a File, otherwise false
1011       */function isFile(e){return"[object File]"===o.call(e)}
1012/**
1013       * Determine if a value is a Blob
1014       *
1015       * @param {Object} val The value to test
1016       * @returns {boolean} True if value is a Blob, otherwise false
1017       */function isBlob(e){return"[object Blob]"===o.call(e)}
1018/**
1019       * Determine if a value is a Function
1020       *
1021       * @param {Object} val The value to test
1022       * @returns {boolean} True if value is a Function, otherwise false
1023       */function isFunction(e){return"[object Function]"===o.call(e)}
1024/**
1025       * Determine if a value is a Stream
1026       *
1027       * @param {Object} val The value to test
1028       * @returns {boolean} True if value is a Stream, otherwise false
1029       */function isStream(e){return isObject(e)&&isFunction(e.pipe)}
1030/**
1031       * Determine if a value is a URLSearchParams object
1032       *
1033       * @param {Object} val The value to test
1034       * @returns {boolean} True if value is a URLSearchParams object, otherwise false
1035       */function isURLSearchParams(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams}
1036/**
1037       * Trim excess whitespace off the beginning and end of a string
1038       *
1039       * @param {String} str The String to trim
1040       * @returns {String} The String freed of excess whitespace
1041       */function trim(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function isStandardBrowserEnv(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}
1042/**
1043       * Iterate over an Array or an Object invoking a function for each item.
1044       *
1045       * If `obj` is an Array callback will be called passing
1046       * the value, index, and complete array for each item.
1047       *
1048       * If 'obj' is an Object callback will be called passing
1049       * the value, key, and complete object for each property.
1050       *
1051       * @param {Object|Array} obj The object to iterate
1052       * @param {Function} fn The callback to invoke for each item
1053       */function forEach(e,t){if(null!==e&&"undefined"!==typeof e){"object"!==typeof e&&(e=[e]);if(isArray(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}}
1054/**
1055       * Accepts varargs expecting each argument to be an object, then
1056       * immutably merges the properties of each object and returns result.
1057       *
1058       * When multiple objects contain the same key the later object in
1059       * the arguments list will take precedence.
1060       *
1061       * Example:
1062       *
1063       * ```js
1064       * var result = merge({foo: 123}, {foo: 456});
1065       * console.log(result.foo); // outputs 456
1066       * ```
1067       *
1068       * @param {Object} obj1 Object to merge
1069       * @returns {Object} Result of all merge properties
1070       */function merge(){var e={};function assignValue(t,n){isPlainObject(e[n])&&isPlainObject(t)?e[n]=merge(e[n],t):isPlainObject(t)?e[n]=merge({},t):isArray(t)?e[n]=t.slice():e[n]=t}for(var t=0,n=arguments.length;t<n;t++)forEach(arguments[t],assignValue);return e}
1071/**
1072       * Extends object a by mutably adding to it the properties of object b.
1073       *
1074       * @param {Object} a The object to be extended
1075       * @param {Object} b The object to copy properties from
1076       * @param {Object} thisArg The object to bind function to
1077       * @return {Object} The resulting value of object a
1078       */function extend(e,t,n){forEach(t,(function assignValue(t,o){e[o]=n&&"function"===typeof t?r(t,n):t}));return e}
1079/**
1080       * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
1081       *
1082       * @param {string} content with BOM
1083       * @return {string} content value without BOM
1084       */function stripBOM(e){65279===e.charCodeAt(0)&&(e=e.slice(1));return e}e.exports={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isStandardBrowserEnv:isStandardBrowserEnv,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM}},function(e,t){function _defineProperty(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n;return e}e.exports=_defineProperty},function(e,t,n){var r=n(525);var o=n(526);var i=o;i.v1=r;i.v4=o;e.exports=i},function(e,t,n){const r=n(248);const o={publishers:new r("guid"),subscribers:new r("widgetId"),sessions:new r};e.exports=o},function(e,t,n){const r=n(1)("GlobalExceptionHandler");const o=n(6);const i=n(26);const a=n(537);const s=n(22)();const c=function OTErrorClass(e,t){Error.call(this||_global3);(this||_global3).code=e;(this||_global3).message=t};c.prototype=Object.create(Error.prototype);c.prototype.constructor=c;e.exports=c;o(c);c.getTitleByCode=function(e){return a[+e]};c.handleJsException=e=>
1084{let t=e.error,n=e.errorMsg,o=e.code,a=e.target,l=e.analytics;if(!a)throw new Error("handleJsException requires target");const getCode=()=>void 0!==o?o:t&&t.code;const getMessage=()=>void 0!==n?n:t&&t.message;const u=c.getTitleByCode(getCode());r.error(`OT.exception :: title: ${u} (${getCode()}) msg: ${getMessage()}`);try{const e={partnerId:a.session?a.session.apiKey:a.apiKey,sessionId:a.session?a.session.sessionId:a.sessionId};l.logError(getCode(),"tb.exception",u,{details:getMessage()},e);const n=new s.ExceptionEvent(i.EXCEPTION,getMessage(),u,getCode(),a,a,t);if(t)n.stack=t.stack;else try{throw new Error}catch(e){n.stack=e.stack}c.dispatchEvent(n)}catch(e){r.error(`OT.exception :: Failed to dispatch exception - ${e.toString()}`)}}},function(e,t,n){var r=n(3);var o=r(n(45));var i=r(n(59));const a=n(126);const s=n(26);e.exports=function EventsFactory(e){void 0===e&&(e={});const t=e.logging||n(1)("Events");const r={};r.ExceptionEvent=function ExceptionEvent(e,t,n,r,o,i,s){return new a(e,false,{error:s,message:t,title:n,code:r,component:o,target:i})};r.IssueReportedEvent=function IssueReportedEvent(e,t){return new a(e,false,{issueId:t})};r.EnvLoadedEvent=function EnvLoadedEvent(e){return new a(e,false)};let c=false;r.ConnectionEvent=function(e){(0,i.default)(ConnectionEvent,e);function ConnectionEvent(t,n,r){return e.call(this||_global3,t,false,{connection:n,reason:r})||this||_global3}(0,o.default)(ConnectionEvent,[{key:"connections",get:function get(){if(!c){t.warn("OT.ConnectionEvent connections property is deprecated, use connection instead.");c=true}return[(this||_global3).connection]}}]);return ConnectionEvent}(a);let l=false;r.StreamEvent=function(e){(0,i.default)(StreamEvent,e);function StreamEvent(t,n,r,o){return e.call(this||_global3,t,o,{stream:n,reason:r})||this||_global3}(0,o.default)(StreamEvent,[{key:"streams",get:function get(){if(!l){t.warn("OT.StreamEvent streams property is deprecated, use stream instead.");l=true}return[(this||_global3).stream]}}]);return StreamEvent}(a);let u=false;let d=false;let f=false;r.SessionConnectEvent=function(e){(0,i.default)(SessionConnectEvent,e);function SessionConnectEvent(t){return e.call(this||_global3,t,false)||this||_global3}(0,o.default)(SessionConnectEvent,[{key:"connections",get:function get(){if(!u){t.warn("OT.SessionConnectedEvent no longer includes connections. Listen for connectionCreated events instead.");u=true}return[]}},{key:"streams",get:function get(){if(!d){t.warn("OT.SessionConnectedEvent no longer includes streams. Listen for streamCreated events instead.");d=true}return[]}},{key:"archives",get:function get(){if(!f){t.warn("OT.SessionConnectedEvent no longer includes archives. Listen for archiveStarted events instead.");f=true}return[]}}]);return SessionConnectEvent}(a);r.SessionReconnectingEvent=function SessionReconnectedEvent(){return new a(s.SESSION_RECONNECTING,false)};r.SessionReconnectedEvent=function SessionReconnectedEvent(){return new a(s.SESSION_RECONNECTED)};r.SessionDisconnectEvent=function SessionDisconnectEvent(e,t,n){return new a(e,n,{reason:t})};r.StreamPropertyChangedEvent=function StreamPropertyChangedEvent(e,t,n,r,o){return new a(e,false,{stream:t,changedProperty:n,oldValue:r,newValue:o})};r.VideoDimensionsChangedEvent=function VideoDimensionsChangedEvent(e,t,n){return new a("videoDimensionsChanged",false,{target:e,oldValue:t,newValue:n})};r.ArchiveEvent=function ArchiveEvent(e,t){return new a(e,false,{id:t.id,name:t.name,status:t.status,archive:t})};r.ArchiveUpdatedEvent=function ArchiveUpdatedEvent(e,t,n,r){return new a("updated",false,{target:e,changedProperty:t,oldValue:n,newValue:r})};r.SignalEvent=function SignalEvent(e,t,n){return new a(e?`signal:${e}`:s.SIGNAL,false,{data:t,from:n})};r.StreamUpdatedEvent=function StreamUpdatedEvent(e,t,n,r){return new a("updated",false,{target:e,changedProperty:t,oldValue:n,newValue:r})};r.DestroyedEvent=function DestroyedEvent(e,t,n){return new a(e,false,{target:t,reason:n})};r.ConnectionStateChangedEvent=function ConnectionStateChangedEvent(e,t){return new a(e,false,{target:t})};r.VideoEnabledChangedEvent=function VideoEnabledChangedEvent(e,t){return new a(e,false,{reason:t.reason})};r.VideoDisableWarningEvent=function VideoDisableWarningEvent(e){return new a(e,false)};r.AudioLevelUpdatedEvent=function AudioLevelUpdatedEvent(e){return new a(s.AUDIO_LEVEL_UPDATED,false,{audioLevel:e})};r.MediaStoppedEvent=function MediaStoppedEvent(e,t){return new a(s.MEDIA_STOPPED,true,{target:e,track:t})};r.MuteForcedEvent=function MuteForcedEvent(e){return new a(s.MUT
1084E_FORCED,false,e)};r.VideoElementCreatedEvent=function VideoElementCreatedEvent(e){return new a(s.VIDEO_ELEMENT_CREATED,false,{element:e})};return r}},function(e,t,n){(function(t){var r=n(3);var o=r(n(12));var i=r(n(13));e.exports=function(e){void 0===e&&(e={});const r=e.getNativeEnumerateDevices||n(286)();const a=e.getNativeMediaDevices||n(625)();const s=e.currentAudioOutputDevice||n(105),c=s.getCurrentAudioOutputDeviceId;const l=e.env||n(2);const u=e.global||(void 0!==typeof window?window:_global3);const d={};const f={audio:"audioInput",video:"videoInput",audioinput:"audioInput",videoinput:"videoInput",audiooutput:"audioOutput",audioInput:"audioInput",videoInput:"videoInput",audioOutput:"audioOutput"};const enumerateDevices=()=>{const e=r();return e()};d.getNativeMediaDevices=()=>a();d.hasEnumerateDevicesCapability=()=>"function"===typeof r();d.hasDeviceChangeCapability=()=>{const e=a();return!!(e&&"ondevicechange"in e)};d.hasSetSinkIdCapability=()=>"setSinkId"in(null==u?void 0:u.HTMLMediaElement.prototype);d.hasAudioOutputApiSupport=()=>d.hasSetSinkIdCapability()&&d.hasDeviceChangeCapability();d.hasEnumerateDevicesBug=()=>l.isSafari&&13.1===l.version;d.getMediaDevices=()=>d.hasEnumerateDevicesCapability()?enumerateDevices().then((e=>e.map((e=>({deviceId:e.deviceId||e.id,label:e.label,kind:f[e.kind]}))))):t.reject(new Error("This browser does not support enumerateDevices APIs"));d.getInputMediaDevices=()=>d.getMediaDevices().then((e=>e.filter((e=>/^(audio|video)Input$/.test(e.kind)))));d.getAudioOutputMediaDevices=()=>d.getMediaDevices().then((e=>e.filter((e=>"audioOutput"===e.kind)).map((e=>{let t=e.deviceId,n=e.label;return{deviceId:t,label:n}}))));d.shouldAskForDevices=()=>d.hasEnumerateDevicesCapability()?d.getInputMediaDevices().then((e=>{if(0===e.length)return{video:true,audio:true};const t=e.filter((e=>"audioInput"===e.kind));const n=e.filter((e=>"videoInput"===e.kind));return d.hasEnumerateDevicesBug()&&0===n.length?{audio:true,video:true}:{video:n.length>0,audio:t.length>0,videoDevices:n,audioDevices:t}})).catch((()=>({video:true,audio:true}))):t.resolve({video:true,audio:true});d.getDefaultAudioOutputDeviceId=e=>{if(!Array.isArray(e)||0===e.length)return"";const t=e.find((e=>"default"===e.deviceId))||e[0],n=t.deviceId;return n};d.hasDevice=(e,t)=>{let n=e;Array.isArray(n)||(n=[]);return n.some((e=>e.deviceId===t))};d.getActiveAudioOutputDevice=(0,i.default)(o.default.mark((function _callee(){var e,t,n;return o.default.wrap((function _callee$(r){while(1)switch(r.prev=r.next){case 0:r.prev=0;r.next=3;return d.getAudioOutputMediaDevices();case 3:e=r.sent;r.next=9;break;case 6:r.prev=6;r.t0=r.catch(0);throw r.t0;case 9:if(!(0===e.length)){r.next=11;break}return r.abrupt("return",{deviceId:null,label:null});case 11:t=e.find((e=>e.deviceId===c()));if(!t){n=d.getDefaultAudioOutputDeviceId(e);t=e.find((e=>e.deviceId===n))}return r.abrupt("return",t);case 14:case"end":return r.stop()}}),_callee,null,[[0,6]])})));return d}}).call(this||_global3,n(0))},function(e,t,n){var r=n(15),o=n(112);
1085/**
1086       * Checks if `value` is array-like. A value is considered array-like if it's
1087       * not a function and has a `value.length` that's an integer greater than or
1088       * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1089       *
1090       * @static
1091       * @memberOf _
1092       * @since 4.0.0
1093       * @category Lang
1094       * @param {*} value The value to check.
1095       * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1096       * @example
1097       *
1098       * _.isArrayLike([1, 2, 3]);
1099       * // => true
1100       *
1101       * _.isArrayLike(document.body.children);
1102       * // => true
1103       *
1104       * _.isArrayLike('abc');
1105       * // => true
1106       *
1107       * _.isArrayLike(_.noop);
1108       * // => false
1109       */function isArrayLike(e){return null!=e&&o(e.length)&&!r(e)}e.exports=isArrayLike},function(e,t){function _extends(){e.exports=_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return _extends.apply(this||_global3,arguments)}
1109e.exports=_extends},function(e,t,n){e.exports={ACTIVE:"active",INACTIVE:"inactive",UNKNOWN:"unknown",PER_SESSION:"perSession",PER_STREAM:"perStream",EXCEPTION:"exception",ISSUE_REPORTED:"issueReported",SESSION_CONNECTED:"sessionConnected",SESSION_RECONNECTING:"sessionReconnecting",SESSION_RECONNECTED:"sessionReconnected",SESSION_DISCONNECTED:"sessionDisconnected",STREAM_CREATED:"streamCreated",STREAM_DESTROYED:"streamDestroyed",CONNECTION_CREATED:"connectionCreated",CONNECTION_DESTROYED:"connectionDestroyed",SIGNAL:"signal",STREAM_PROPERTY_CHANGED:"streamPropertyChanged",MICROPHONE_LEVEL_CHANGED:"microphoneLevelChanged",RESIZE:"resize",SETTINGS_BUTTON_CLICK:"settingsButtonClick",DEVICE_INACTIVE:"deviceInactive",INVALID_DEVICE_NAME:"invalidDeviceName",ACCESS_ALLOWED:"accessAllowed",ACCESS_DENIED:"accessDenied",ACCESS_DIALOG_OPENED:"accessDialogOpened",ACCESS_DIALOG_CLOSED:"accessDialogClosed",ECHO_CANCELLATION_MODE_CHANGED:"echoCancellationModeChanged",MEDIA_STOPPED:"mediaStopped",PUBLISHER_DESTROYED:"destroyed",MUTE_FORCED:"muteForced",SUBSCRIBER_DESTROYED:"destroyed",SUBSCRIBER_CONNECTED:"connected",SUBSCRIBER_DISCONNECTED:"disconnected",DEVICES_DETECTED:"devicesDetected",DEVICES_SELECTED:"devicesSelected",CLOSE_BUTTON_CLICK:"closeButtonClick",MICLEVEL:"microphoneActivityLevel",MICGAINCHANGED:"microphoneGainChanged",ENV_LOADED:"envLoaded",ENV_UNLOADED:"envUnloaded",AUDIO_LEVEL_UPDATED:"audioLevelUpdated",VIDEO_ELEMENT_CREATED:"videoElementCreated"}},function(e,t,n){var r=n(3);var o=r(n(25));var i=r(n(45));var a=r(n(18));const s=n(240);const c=n(243);const l=n(141);const u=n(44)();const d=n(6);const f=n(540);const p="2";let g=function(){function AnalyticsHelper(e){let t=void 0===e?{}:e,n=t.staticConfig,r=void 0===n?u.onlyLocal():n,o=t.sessionInfo,i=void 0===o?new l:o,s=t.ajax,c=t.queue;(0,a.default)(this||_global3,"getTurnServerName",(e=>{let t;let n;if(!e||"object"!==typeof e)return t;const r=Array.isArray(e)?e:[e];r.forEach((e=>{const r=e.urls||e.url;const o=Array.isArray(r)?r:[r];o.forEach((e=>{const r=e.indexOf(":")+1;const o=e.lastIndexOf(":");e.includes("turns")?n=e.substring(r,o):t=e.substring(r,o)}))}));return n||t}));(this||_global3).ajax=s;(this||_global3).queue=c;(this||_global3).sessionInfo=i;(this||_global3).staticConfig=r}var e=AnalyticsHelper.prototype;e._getCommon=function _getCommon(){return{clientVersion:(this||_global3).staticConfig.clientVersion,buildHash:(this||_global3).staticConfig.buildHash,source:(void 0!==typeof window?window:_global3).location&&(void 0!==typeof window?window:_global3).location.href,logVersion:p,apiServer:(this||_global3).staticConfig.apiUrl,clientSystemTime:(new Date).getTime(),sessionId:(this||_global3).sessionInfo.sessionId,mediaServerName:(this||_global3).sessionInfo.mediaServerName,relayServer:this.getTurnServerName((this||_global3).sessionInfo.iceServers),p2p:(this||_global3).sessionInfo.p2pEnabled,messagingServer:(this||_global3).sessionInfo.messagingServer,messagingUrl:(this||_global3).sessionInfo.messagingURL,version:(this||_global3).staticConfig.version,partnerId:(this||_global3).sessionInfo.partnerId}};e.logError=function logError(e,t,n,r,i){void 0===i&&(i={});s.get(((a,s)=>{if(a)return;const c=[e,t,n,r,(0,o.default)({guid:s},this.combineWithCommon(i))];AnalyticsHelper.emit("logError",...c);(this||_global3)._analytics.logError(...c)}))};e.combineWithCommon=function combineWithCommon(e){return(0,o.default)({},this._getCommon(),e)};e.logEvent=function logEvent(e,t,n){void 0===e&&(e={});s.get(((r,i)=>{if(r)return;const a=(0,o.default)({guid:i},this.combineWithCommon(e));AnalyticsHelper.emit("logEvent",a);(this||_global3)._analytics.logEvent(a,false,t,n)}))};e.logQOS=function logQOS(e){void 0===e&&(e={});s.get(((t,n)=>{if(t)return;const r=(0,o.default)({guid:n,duration:0},this.combineWithCommon(e));f(r);AnalyticsHelper.emit("logQOS",r);(this||_global3)._analytics.logQOS(r)}))};(0,i.default)(AnalyticsHelper,[{key:"staticConfig",get:function get(){return(this||_global3)._staticConfig},set:function set(e){(this||_global3)._staticConfig=e;(this||_global3)._analytics=new c({loggingUrl:(this||_global3).staticConfig.loggingUrl,ajax:(this||_global3).ajax,queue:(this||_global3).queue})}}]);return AnalyticsHelper}();d(g);e.exports=g},function(e,t,n){var r=true;var o=true;
1110/**
1111       * Extract browser version out of the provided user agent string.
1112       *
1113       * @param {!string} uastring userAgent string.
1114       * @param {!string} expr Regular expression used as match criteria.
1115       * @param {!number} pos position in the version string to be returned.
1116       * @return {!number} browser version.
1117       */function extractVersion(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function wrapPeerConnectionEvent(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype;var o=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return o.apply(this||_global3,arguments);var wrappedCallback=function(e){var t=n(e);t&&r(t)};(this||_global3)._eventMap=(this||_global3)._eventMap||{};(this||_global3)._eventMap[r]=wrappedCallback;return o.apply(this||_global3,[e,wrappedCallback])};var i=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!(this||_global3)._eventMap||!(this||_global3)._eventMap[n])return i.apply(this||_global3,arguments);var r=(this||_global3)._eventMap[n];delete(this||_global3)._eventMap[n];return i.apply(this||_global3,[e,r])};Object.defineProperty(r,"on"+t,{get:function(){return(this||_global3)["_on"+t]}
1117,set:function(e){if((this||_global3)["_on"+t]){this.removeEventListener(t,(this||_global3)["_on"+t]);delete(this||_global3)["_on"+t]}e&&this.addEventListener(t,(this||_global3)["_on"+t]=e)},enumerable:true,configurable:true})}}e.exports={extractVersion:extractVersion,wrapPeerConnectionEvent:wrapPeerConnectionEvent,disableLog:function(e){if("boolean"!==typeof e)return new Error("Argument type: "+typeof e+". Please use a boolean.");r=e;return e?"adapter.js logging disabled":"adapter.js logging enabled"},
1118/**
1119         * Disable or enable deprecation warnings
1120         * @param {!boolean} bool set to true to disable warnings.
1121         */
1122disableWarnings:function(e){if("boolean"!==typeof e)return new Error("Argument type: "+typeof e+". Please use a boolean.");o=!e;return"adapter.js deprecation warnings "+(e?"disabled":"enabled")},log:function(){if("object"===typeof window){if(r)return;"undefined"!==typeof console&&"function"===typeof console.log&&console.log.apply(console,arguments)}},deprecated:function(e,t){o&&console.warn(e+" is deprecated, please use "+t+" instead.")},detectBrowser:function(e){var t=e&&e.navigator;var n={};n.browser=null;n.version=null;if("undefined"===typeof e||!e.navigator){n.browser="Not a browser.";return n}if(t.mozGetUserMedia){n.browser="firefox";n.version=extractVersion(t.userAgent,/Firefox\/(\d+)\./,1)}else if(t.webkitGetUserMedia){n.browser="chrome";n.version=extractVersion(t.userAgent,/Chrom(e|ium)\/(\d+)\./,2)}else if(t.mediaDevices&&t.userAgent.match(/Edge\/(\d+).(\d+)$/)){n.browser="edge";n.version=extractVersion(t.userAgent,/Edge\/(\d+).(\d+)$/,2)}else{if(!e.RTCPeerConnection||!t.userAgent.match(/AppleWebKit\/(\d+)\./)){n.browser="Not a supported browser.";return n}n.browser="safari";n.version=extractVersion(t.userAgent,/AppleWebKit\/(\d+)\./,1)}return n}}},function(e,t,n){var r=n(38),o=n(352),i=n(353);var a="[object Null]",s="[object Undefined]";var c=r?r.toStringTag:void 0;
1123/**
1124       * The base implementation of `getTag` without fallbacks for buggy environments.
1125       *
1126       * @private
1127       * @param {*} value The value to query.
1128       * @returns {string} Returns the `toStringTag`.
1129       */function baseGetTag(e){return null==e?void 0===e?s:a:c&&c in Object(e)?o(e):i(e)}e.exports=baseGetTag},function(e,t,n){var r=n(177),o=n(114),i=n(24);
1130/**
1131       * Creates an array of the own enumerable property names of `object`.
1132       *
1133       * **Note:** Non-object values are coerced to objects. See the
1134       * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1135       * for more details.
1136       *
1137       * @static
1138       * @since 0.1.0
1139       * @memberOf _
1140       * @category Object
1141       * @param {Object} object The object to query.
1142       * @returns {Array} Returns the array of property names.
1143       * @example
1144       *
1145       * function Foo() {
1146       *   this.a = 1;
1147       *   this.b = 2;
1148       * }
1149       *
1150       * Foo.prototype.c = 3;
1151       *
1152       * _.keys(new Foo);
1153       * // => ['a', 'b'] (iteration order is not guaranteed)
1154       *
1155       * _.keys('hi');
1156       * // => ['0', '1']
1157       */function keys(e){return i(e)?r(e):o(e)}e.exports=keys},function(e,t,n){var r=n(42);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){var r=n(54),o=n(198),i=n(125),a=n(199),s=n(200);var c=e.exports=function(e,t){var n,o,c,l,u;if(arguments.length<2||"string"!==typeof e){l=t;t=e;e=null}else l=arguments[2];if(r(e)){n=s.call(e,"c");o=s.call(e,"e");c=s.call(e,"w")}else{n=c=true;o=false}u={value:t,configurable:n,enumerable:o,writable:c};return l?i(a(l),u):u};c.gs=function(e,t,n){var c,l,u,d;if("string"!==typeof e){u=n;n=t;t=e;e=null}else u=arguments[3];if(r(t))if(o(t))if(r(n)){if(!o(n)){u=n;n=void 0}}else n=void 0;else{u=t;t=n=void 0}else t=void 0;if(r(e)){c=s.call(e,"c");l=s.call(e,"e")}else{c=true;l=false}d={get:t,set:n,configurable:c,enumerable:l};return u?i(a(u),d):d}},function(e,t){
1158/**
1159       * A specialized version of `_.map` for arrays without support for iteratee
1160       * shorthands.
1161       *
1162       * @private
1163       * @param {Array} [array] The array to iterate over.
1164       * @param {Function} iteratee The function invoked per iteration.
1165       * @returns {Array} Returns the new mapped array.
1166       */
1167function arrayMap(e,t){var n=-1,r=null==e?0:e.length,o=Array(r);while(++n<r)o[n]=t(e[n],n,e);return o}e.exports=arrayMap},function(e,t,n){var r=n(496),o=n(502),i=n(88),a=n(10),s=n(507);
1168/**
1169       * The base implementation of `_.iteratee`.
1170       *
1171       * @private
1172       * @param {*} [value=_.identity] The value to convert to an iteratee.
1173       * @returns {Function} Returns the iteratee.
1174       */function baseIteratee(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}e.exports=baseIteratee},function(e,t,n){const r=n(5);e.exports=function Widget(e,t){let n;const o=t||{};e.setDisplayMode=function(e){const t=e||"auto";if(n!==t){r.removeClass((this||_global3).domElement,`OT_mode-${n}`);r.addClass((this||_global3).domElement,`OT_mode-${t}`);n=t}};e.getDisplayMode=function(){return n};e.showAfterLoading=function(){r.removeClass((this||_global3).domElement,"OT_hide-forced")};e.hideWhileLoading=function(){r.addClass((this||_global3).domElement,"OT_hide-forced")};e.destroy=function(){o.onDestroy&&o.onDestroy((this||_global3).domElement);(this||_global3).domElement&&r.removeElement((this||_global3).domElement);return e};e.appendTo=function(t){(this||_global3).domElement=r.createElement(o.nodeName||"div",o.htmlAttributes,o.htmlContent);o.onCreate&&o.onCreate((this||_global3).domElement);e.setDisplayMode(o.mode);if("auto"===o.mode){r.addClass(e.domElement,"OT_mode-on-hold");setTimeout((()=>{r.removeClass(e.domElement,"OT_mode-on-hold")}),2e3)}t.appendChild((this||_global3).domElement);return e}}},function(e,t,n){var r=n(77);var o=4;
1175/**
1176       * Creates a shallow clone of `value`.
1177       *
1178       * **Note:** This method is loosely based on the
1179       * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
1180       * and supports cloning arrays, array buffers, booleans, date objects, maps,
1181       * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
1182       * arrays. The own enumerable properties of `arguments` objects are cloned
1183       * as plain objects. An empty object is returned for uncloneable values such
1184       * as error objects, functions, DOM nodes, and WeakMaps.
1185       *
1186       * @static
1187       * @memberOf _
1188       * @since 0.1.0
1189       * @category Lang
1190       * @param {*} value The value to clone.
1191       * @returns {*} Returns the cloned value.
1192       * @see _.cloneDeep
1193       * @example
1194       *
1195       * var objects = [{ 'a': 1 }, { 'b': 2 }];
1196       *
1197       * var shallow = _.clone(objects);
1198       * console.log(shallow[0] === objects[0]);
1199       * // => true
1200       */function clone(e){return r(e,o)}e.exports=clone},function(e,t,n){var r=n(351),o=n(356);
1201/**
1202       * Gets the native function at `key` of `object`.
1203       *
1204       * @private
1205       * @param {Object} object The object to query.
1206       * @param {string} key The key of the method to get.
1207       * @returns {*} Returns the function if it's native, else `undefined`.
1208       */function getNative(e,t){var n=o(e,t);return r(n)?n:void 0}e.exports=getNative},function(e,t,n){var r=n(14);var o=r.Symbol;e.exports=o},function(e,t,n){var r=n(83),o=n(63);
1209/**
1210       * Copies properties of `source` to `object`.
1211       *
1212       * @private
1213       * @param {Object} source The object to copy properties from.
1214       * @param {Array} props The property identifiers to copy.
1215       * @param {Object} [object={}] The object to copy properties to.
1216       * @param {Function} [customizer] The function to customize copied values.
1217       * @returns {Object} Returns `object`.
1218       */function copyObject(e,t,n,i){var a=!n;n||(n={});var s=-1,c=t.length;while(++s<c){var l=t[s];var u=i?i(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]);a?o(n,l,u):r(n,l,u)}return n}e.exports=copyObject},function(e,t,n){var r=n(380),o=n(109),i=n(381),a=n(185),s=n(186),c=n(29),l=n(174);var u="[object Map]",d="[object Object]",f="[object Promise]",p="[object Set]",g="[object WeakMap]";var h="[object DataView]";var b=l(r),v=l(o),m=l(i),_=l(a),y=l(s);
1219/**
1220       * Gets the `toStringTag` of `value`.
1221       *
1222       * @private
1223       * @param {*} value The value to query.
1224       * @returns {string} Returns the `toStringTag`.
1225       */var E=c;(r&&E(new r(new ArrayBuffer(1)))!=h||o&&E(new o)!=u||i&&E(i.resolve())!=f||a&&E(new a)!=p||s&&E(new s)!=g)&&(E=function(e){var t=c(e),n=t==d?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case b:return h;case v:return u;case m:return f;case _:return p;case y:return g}return t});e.exports=E},function(e,t,n){(function(t){var n="object"===typeof Reflect?Reflect:null;var r=n&&"function"===typeof n.apply?n.apply:function ReflectApply(e,t,n){return Function.prototype.apply.call(e,t,n)};var o;o=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function ReflectOwnKeys(e){return Object.getOwnPropertyNames(e)};function ProcessEmitWarning(e){console&&console.warn&&console.warn(e)}var i=Number.isNaN||function NumberIsNaN(e){return e!==e};function EventEmitter(){EventEmitter.init.call(this||_global3)}e.exports=EventEmitter;e.exports.once=once;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=void 0;EventEmitter.prototype._eventsCount=0;EventEmitter.prototype._maxListeners=void 0;var a=10;function checkListener(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:true,get:function(){return a}
1225,set:function(e){if("number"!==typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}});EventEmitter.init=function(){if(void 0===(this||_global3)._events||(this||_global3)._events===Object.getPrototypeOf(this||_global3)._events){(this||_global3)._events=Object.create(null);(this||_global3)._eventsCount=0}(this||_global3)._maxListeners=(this||_global3)._maxListeners||void 0};EventEmitter.prototype.setMaxListeners=function setMaxListeners(e){if("number"!==typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");(this||_global3)._maxListeners=e;return this||_global3};function _getMaxListeners(e){return void 0===e._maxListeners?EventEmitter.defaultMaxListeners:e._maxListeners}EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this||_global3)};EventEmitter.prototype.emit=function emit(e){var t=[];for(var n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e;var i=(this||_global3)._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return false;if(o){var a;t.length>0&&(a=t[0]);if(a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));s.context=a;throw s}var c=i[e];if(void 0===c)return false;if("function"===typeof c)r(c,this||_global3,t);else{var l=c.length;var u=arrayClone(c,l);for(n=0;n<l;++n)r(u[n],this||_global3,t)}return true};function _addListener(e,t,n,r){var o;var i;var a;checkListener(n);i=e._events;if(void 0===i){i=e._events=Object.create(null);e._eventsCount=0}else{if(void 0!==i.newListener){e.emit("newListener",t,n.listener?n.listener:n);i=e._events}a=i[t]}if(void 0===a){a=i[t]=n;++e._eventsCount}else{"function"===typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n);o=_getMaxListeners(e);if(o>0&&a.length>o&&!a.warned){a.warned=true;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning";s.emitter=e;s.type=t;s.count=a.length;ProcessEmitWarning(s)}}return e}EventEmitter.prototype.addListener=function addListener(e,t){return _addListener(this||_global3,e,t,false)};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.prependListener=function prependListener(e,t){return _addListener(this||_global3,e,t,true)};function onceWrapper(){if(!(this||_global3).fired){(this||_global3).target.removeListener((this||_global3).type,(this||_global3).wrapFn);(this||_global3).fired=true;return 0===arguments.length?(this||_global3).listener.call((this||_global3).target):(this||_global3).listener.apply((this||_global3).target,arguments)}}function _onceWrap(e,t,n){var r={fired:false,wrapFn:void 0,target:e,type:t,listener:n};var o=onceWrapper.bind(r);o.listener=n;r.wrapFn=o;return o}EventEmitter.prototype.once=function once(e,t){checkListener(t);this.on(e,_onceWrap(this||_global3,e,t));return this||_global3};EventEmitter.prototype.prependOnceListener=function prependOnceListener(e,t){checkListener(t);this.prependListener(e,_onceWrap(this||_global3,e,t));return this||_global3};EventEmitter.prototype.removeListener=function removeListener(e,t){var n,r,o,i,a;checkListener(t);r=(this||_global3)._events;if(void 0===r)return this||_global3;n=r[e];if(void 0===n)return this||_global3;if(n===t||n.listener===t)if(0===--(this||_global3)._eventsCount)(this||_global3)._events=Object.create(null);else{delete r[e];r.removeListener&&this.emit("removeListener",e,n.listener||t)}else if("function"!==typeof n){o=-1;for(i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener;o=i;break}if(o<0)return this||_global3;0===o?n.shift():spliceOne(n,o);1===n.length&&(r[e]=n[0]);void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this||_global3};EventEmitter.prototype.off=EventEmitter.prototype.removeListener;EventEmitter.prototype.removeAllListeners=function removeAllListeners(e){var t,n,r;n=(this||_global3)._events;if(void 0===n)return this||_global3;if(void 0===n.removeListener){if(0===arguments.length){(this||_global3)._events=Object.create(null);(this||_global3)._eventsCount=0}else void 0!==n[e]&&(0===--(this||_global3)._eventsCount?(this||_global3)._events=Object.create(null):delete n[e]);return this||_global3}if(0===arguments.length){var o=Object.keys(n);var i;for(r=0;r<o.length;++r){i=o[r];"removeListener"!==i&&this.removeAllListeners(i)}this.removeAllListeners("removeListener");(this||_global3)._events=Object.create(null);(this||_global3)._eventsCount=0;return this||_global3}t=n[e];if("function"===typeof t)this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this||_global3};function _listeners(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"===typeof o?n?[o.listener||o]:[o]:n?unwrapListeners(o):arrayClone(o,o.length)}EventEmitter.prototype.listeners=function listeners(e){return _listeners(this||_global3,e,true)};EventEmitter.prototype.rawListeners=function rawListeners(e){return _listeners(this||_global3,e,false)};EventEmitter.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):listenerCount.call(e,t)};EventEmitter.prototype.listenerCount=listenerCount;function listenerCount(e){var t=(this||_global3)._events;if(void 0!==t){var n=t[e];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}EventEmitter.prototype.eventNames=function eventNames(){return(this||_global3)._eventsCount>0?o((this||_global3)._events):[]};function arrayClone(e,t){var n=new Array(t);for(var r=0;r<t;++r)n[r]=e[r];return n}function spliceOne(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function unwrapListeners(e){var t=new Array(e.length);for(var n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function once(e,n){return new t((function(t,r){function eventListener(){void 0!==o&&e.removeListener("error",o);t([].slice.call(arguments))}var o;if("error"!==n){o=function errorListener(t){e.removeListener(n,eventListener);r(t)};e.once("error",o)}e.once(n,eventListener)}))}}).call(this||_global3,n(0))},function(e,t,n){var r=n(399)();e.exports=function(e){return e!==r&&null!==e}},function(e,t,n){e.exports=n(413)()?n(91).Symbol:n(416)},function(e,t,n){(function(t){var r=n(3);var o=r(n(25));var i=r(n(45));const a=n(206);const s=n(55);const c=n(470);const l=n(517);const u=n(1)("StaticConfig");const d=n(138),f=d.prependProxyToUrlIfNeeded;
1226/**
1227         * @typedef {Object} builtInConfig properties that are baked in and are injected through webpack
1228         * @property {String} version Build version (comes from package.json)
1229         * @property {String} buildHash Commit hash this build was built from
1230         * @property {Object} minimumVersion
1231         * @property {String} minimumVersion.firefox Minimum version of Firefox needed to support OpenTok
1232         * @property {String} minimumVersion.chrome Minimum version of Chrome needed to support OpenTok
1233         * @property {Boolean} debug If true sets logging level to DEBUG else sets it to WARN
1234         * @property {String} websiteURL Used to construct urls to the TokBox website
1235         * @property {String} loggingURL Where to send analytical events
1236         * @property {String} apiURL The API to talk to (Anvil)
1237        */
1238/** @type builtInConfig */const p=s({version:"v2.22.1",buildHash:"aec2e16be",minimumVersion:{firefox:52,chrome:49},debug:"false",websiteURL:"http://www.tokbox.com",configURL:"https://config.opentok.com",ipWhitelistConfigURL:"",cdnURL:"https://static.opentok.com",loggingURL:"https://hlg.tokbox.com/prod",apiURL:"https://anvil.opentok.com"});const g=c(["apiURL","assetURL","cdnURL","sessionInfoOverrides","loggingURL"]);const h={apiUrl:"apiURL",loggingUrl:"loggingURL"};const b=l((e=>h[e]));function staticConfigFactory(e){let n=void 0===e?{}:e,r=n.axios,c=void 0===r?a:r;let l=function(){StaticConfig.onlyLocal=function onlyLocal(){const e=s((void 0!==typeof window?window:_global3).OTProperties);return new StaticConfig((0,o.default)({},p,g(e)))}
1239/**
1240             * Construct a StaticConfig instance with baked in, runtime, and live configuration
1241             *
1242             * @static
1243             * @param {any} { sessionId, token, useIpWhitelistConfigUrl }
1244             * @memberof StaticConfig
1245             * @return {Promise<StaticConfig>} A promise to an instance of StaticConfig
1246             */;StaticConfig.get=function get(e){let n=e.partnerId,r=e.token,i=e.useIpWhitelistConfigUrl,a=e.proxyUrl;const getLiveConfig=()=>{const e=this.onlyLocal();if(!e.configUrl)return t.resolve({});if(true===i&&!e.ipWhitelistConfigUrl)return t.resolve({});let o=true===i?e.ipWhitelistConfigUrl:e.configUrl;o=f(o,a);return c.get(`${o}/project/${n}/config.json`,{headers:{"X-TB-TOKEN-AUTH":r}}).then((e=>{let t=e.data;return t}))};
1246return getLiveConfig().catch((e=>{u.error("could not reach live config service",e);return{}})).then((e=>{const t=s((void 0!==typeof window?window:_global3).OTProperties);const n=(0,o.default)({},p,g(t),b(e));return new StaticConfig(n)}))};function StaticConfig(e){Object.defineProperty(this||_global3,"config",{value:Object.freeze(s(e))})}(0,i.default)(StaticConfig,[{key:"configUrl",get:function get(){return(this||_global3).config.configURL}},{key:"ipWhitelistConfigUrl",get:function get(){return(this||_global3).config.ipWhitelistConfigURL}},{key:"apiUrl",get:function get(){return(this||_global3).config.apiURL}},{key:"loggingUrl",get:function get(){return(this||_global3).config.loggingURL}},{key:"apiEnabled",get:function get(){return"undefined"===typeof(this||_global3).config.apiEnabled||(this||_global3).config.apiEnabled}},{key:"version",get:function get(){return(this||_global3).config.version}},{key:"clientVersion",get:function get(){return`js-${((this||_global3).version||"unknown").replace("v","")}`}},{key:"buildHash",get:function get(){return(this||_global3).config.buildHash}},{key:"minimumVersion",get:function get(){return(this||_global3).config.minimumVersion}},{key:"websiteUrl",get:function get(){return(this||_global3).config.websiteURL}},{key:"debug",get:function get(){return"true"===(this||_global3).config.debug||true===(this||_global3).config.debug}},{key:"sessionInfoOverrides",get:function get(){return(this||_global3).config.sessionInfoOverrides}},{key:"cdnUrl",get:function get(){return(this||_global3).config.cdnURL||`${(void 0!==typeof window?window:_global3).location.protocol}//${(void 0!==typeof window?window:_global3).location.host}`}},{key:"assetUrl",get:function get(){return(this||_global3).config.assetURL||`${(this||_global3).cdnUrl}/webrtc/${(this||_global3).version}`}}]);return StaticConfig}();return l}e.exports=staticConfigFactory}).call(this||_global3,n(0))},function(e,t){function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;"value"in r&&(r.writable=true);Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){t&&_defineProperties(e.prototype,t);n&&_defineProperties(e,n);return e}e.exports=_createClass},function(e,t,n){var r=n(71);var o=1/0;
1247/**
1248       * Converts `value` to a string key if it's not a string or symbol.
1249       *
1250       * @private
1251       * @param {*} value The value to inspect.
1252       * @returns {string|symbol} Returns the key.
1253       */function toKey(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}e.exports=toKey},function(e,t,n){var r=n(514),o=n(137);
1254/**
1255       * Creates an object composed of the picked `object` properties.
1256       *
1257       * @static
1258       * @since 0.1.0
1259       * @memberOf _
1260       * @category Object
1261       * @param {Object} object The source object.
1262       * @param {...(string|string[])} [paths] The property paths to pick.
1263       * @returns {Object} Returns the new object.
1264       * @example
1265       *
1266       * var object = { 'a': 1, 'b': '2', 'c': 3 };
1267       *
1268       * _.pick(object, ['a', 'c']);
1269       * // => { 'a': 1, 'c': 3 }
1270       */var i=o((function(e,t){return null==e?{}:r(e,t)}));e.exports=i},function(e,t,n){const r=(void 0!==typeof window?window:_global3).performance||{};
1271/**
1272       * Returns the number of milliseconds since the the UNIX epoch
1273       *
1274       * When available (performance api exists), this function will not be skewed
1275       * by clock adjustments. Only use if you require this functionality, otherwise
1276       * use Date.now().
1277       *
1278       * @returns {number} Number of milliseconds since UNIX epoch
1279       */e.exports=function highResolutionNow(){return r.now?r.timing.navigationStart+r.now():Date.now()}},function(e,t,n){var r=n(573);
1280/**
1281       * Creates a function that is restricted to invoking `func` once. Repeat calls
1282       * to the function return the value of the first invocation. The `func` is
1283       * invoked with the `this` binding and arguments of the created function.
1284       *
1285       * @static
1286       * @memberOf _
1287       * @since 0.1.0
1288       * @category Function
1289       * @param {Function} func The function to restrict.
1290       * @returns {Function} Returns the new restricted function.
1291       * @example
1292       *
1293       * var initialize = _.once(createApplication);
1294       * initialize();
1295       * initialize();
1296       * // => `createApplication` is invoked once
1297       */function once(e){return r(2,e)}e.exports=once},function(e,t,n){const r=n(7);const o=n(61);const i=n(272);const a=n(127);const s=n(273);const c=n(1)("SDPHelpers");const l=1e4;const u=2e4;const d={getSections(e){return e.split(/\r\n|\r|\n/).reduce(((e,t)=>{const n=t.match(/^m=(\w+) \d+/);n&&(e.sections[e.section=n[1]]=[]);e.sections[e.section].push(t);return e}),{sections:{header:[]},section:"header"}).sections},getCodecsAndCodecMap(e,t){const n=d.getSections(e)[t];if(!n)throw new Error(`no mediaType ${t}`);const o=n[0].match(/m=\w+ \d+ [A-Z/]+ ([\d ]+)$/)[1].split(" ");const i=r(...n.filter((e=>e.match(/^a=rtpmap:\d+/))).map((e=>e.match(/^a=rtpmap:(\d+) ([\w-]+)/).splice(1))).map((e=>{let t=e[0],n=e[1];return{[t]:n}})));return{codecs:o,codecMap:i}},getCodecs(e,t){const n=d.getCodecsAndCodecMap(e,t);return n.codecs.map((e=>n.codecMap[e]||"Unknown codec"))},mediaDirections:{INACTIVE:"inactive",RECVONLY:"recvonly"}};e.exports=d;d.getMLineIndex=function getMLineIndex(e,t){const n=`m=${t}`;return i(e,(e=>-1!==e.indexOf(n)))};d.getMLine=function getMLine(e,t){const n=d.getMLineIndex(e,t);return n>-1?e[n]:void 0};d.hasMediaType=(e,t)=>{const n=new RegExp(`^m=${t}`);const r=e.split("\r\n");return i(r,(e=>n.test(e)))>=0};d.hasMLinePayloadType=function hasMLinePayloadType(e,t,n){const r=d.getMLine(e,t);const o=d.getMLinePayloadTypes(r,t);return o.indexOf(n)>-1};d.getMLinePayloadTypes=function getMLinePayloadTypes(e,t){const n=new RegExp(`^m=${t} \\d+(/\\d+)? [a-zA-Z0-9/]+(( [a-zA-Z0-9/]+)+)$`,"i");const r=e.match(n);return!r||r.length<2?[]:r[2].trim().split(" ")};d.splitSections=function splitSections(e){const t=e.split("\nm=");return t.map(((e,t)=>(t>0?"m="+e:e).trim()+"\r\n"))};d.changeMediaDirection=function changeMediaDirection(e,t){const replaceDirection=e=>{const n=t===d.mediaDirections.RECVONLY?"a=inactive":"a=recvonly";const r=new RegExp(n,"g");return e.replace(r,`a=${t}`)};const n=d.splitSections(e);const r=n.shift();const o=n.join("");const i=replaceDirection(o);return r+i};d.removeTypesFromMLine=function removeTypesFromMLine(e,t){const n=/[0-9 ]*$/.exec(e)[0];const r=n.split(" ").filter((e=>""!==e&&-1===t.indexOf(e)));return e.replace(n,` ${r.join(" ")}`)};d.removeMediaEncoding=function removeMediaEncoding(e,t,n){let r,o,i,a;let s=e.split("\r\n");const c=d.getMLineIndex(s,t);const l=c>-1?s[c]:void 0;const u=[];
1297if(-1===c)return s.join("\r\n");r=d.getMLinePayloadTypes(l,t);if(0===r.length)return s.join("\r\n");for(o=c;o<s.length;o++){const e=new RegExp(n,"i");if(0===s[o].indexOf("a=rtpmap:")){a=s[o].split(" ");2===a.length&&e.test(a[1])&&u.push(a[0].substr(9))}}if(!u.length)return s.join("\r\n");for(o=c;o<s.length;o++)if(0===s[o].indexOf("a=fmtp:")){a=s[o].split(" ");for(i=0;i<u.length;i++)2===a.length&&a[1]===`apt=${u[i]}`&&u.push(a[0].substr(7))}s=s.filter((e=>{for(let t=0;t<u.length;t++)if(0===e.indexOf(`a=rtpmap:${u[t]} `)||0===e.indexOf(`a=fmtp:${u[t]} `)||0===e.indexOf(`a=rtcp-fb:${u[t]} `))return false;return true}));u.length>0&&c>-1&&(s[c]=d.removeTypesFromMLine(l,u));return s.join("\r\n")};d.disableMediaType=function disableMediaType(e,t){const n=e.split("\r\n");const r=[];let o;n.forEach((e=>{let t=e;/^m=/.test(t)&&(o=void 0);if(!o){o=[];r.push(o)}o.push(t)}));const i=new RegExp(`^m=${t} \\d+ ([^ ]+) [0-9 ]+$`);const a=r.map((e=>{const n=e[0].match(i);return n?[`m=${t} 0 ${n[1]} 0`,"a=inactive",...e.filter((e=>/^c=/.test(e)||/^a=mid:/.test(e)||""===e))]:e}));return[].concat(...a).join("\r\n")};d.removeVideoCodec=function removeVideoCodec(e,t){return d.removeMediaEncoding(e,"video",t)};const f=function isUsingRTX(e,t){let n=t.filterByName("ssrc-group:FID");const r=0===n.length;n=r?[]:n[0].value.split(" ");switch(n.length){case 0:case 1:var o=t.find((e=>0===e.name.indexOf("rtpmap:")&&e.value.indexOf("rtx/90000")>-1));if(!o)return false;var i=o.name.split(":")[1];i.indexOf("/")>-1&&(i=i.split("/")[0]);return d.hasMLinePayloadType(e,"video",i);default:c.debug("SDP Helpers: There are more than two FIDs, RTX is definitely enabled");return true}};d.getAttributesForMediaType=function getAttributesForMediaType(e,t){let n,r,i,a,s,c,l,u,p,g;const h=d.getMLineIndex(e,t);const b=new RegExp(`m=(?!${t}).+ `,"i");const v=new RegExp("a=ssrc:\\d+ .*","i");const m=new RegExp("a=ssrc-group:(SIM|FID) (\\d+).*?","i");const _=new RegExp("a=([a-z0-9:/-]+) (.*)","i");const y=[];for(let t=h+1;t<e.length;t++){if(b.test(e[t])){void 0!==n&&(r=t-1);break}s=e[t].match(m);c=e[t].match(v);if(void 0===n&&(s||c)){n=t;s&&(a=/^(FID|SIM)$/.test(s[1])?s[2]:s[1])}l=e[t].match(`a=ssrc:${a} msid:(.+)`);l&&(u=l[1]);const o=v.test(e[t]);const d=m.test(e[t]);void 0!==n&&(void 0!==r||o||d?t===e.length-1&&(r=t):r=t-1);const f=e[t].match(/a=mid:(.+)/);if(f){p=f[1];g=t}i=_.exec(e[t]);i&&3===i.length&&y.push({lineIndex:t,name:i[1],value:i[2]})}y.ssrcStartIndex=n;y.ssrcEndIndex=r;y.msid=u;y.mid=p;y.midIndex=g;y.isUsingRTX=f.bind(null,e,y);y.filterByName=function filterByName(e){return this.filter((t=>t.name===e))};y.getRtpNumber=e=>{const t=new RegExp("rtpmap:(.+)");return o(y.map((n=>{const r=n.name.match(t);return r&&n.value.indexOf(e)>=0?r[1]:null})),(e=>null!==e))};return y};d.modifyDtx=(e,t)=>{const n=e.split("\r\n");if(!d.getMLine(n,"audio")){c.debug("No audio m-line, not enabling dtx.");return e}const r=d.getAttributesForMediaType(n,"audio");const o=r.getRtpNumber("opus");if(!o){c.debug("Could not find rtp number for opus, not enabling dtx.");return e}const i=r.find((e=>e.name===`fmtp:${o}`));if(!i){c.debug("Could not find a=fmtp line for opus, not enabling dtx.");return e}let a=n[i.lineIndex];const s=/usedtx=\d+([\s;]*)/;s.test(i.value)?a=a.replace(s,t?"usedtx=1$1":""):t&&(a+="; usedtx=1");a=a.replace(/[;\s]*$/,"");n[i.lineIndex]=a;return n.join("\r\n")};const modifyStereo=(e,t,n)=>{const r=t.split("\r\n");if(!d.getMLine(r,"audio")){c.debug("No audio m-line, not enabling stereo.");return t}const o=d.getAttributesForMediaType(r,"audio");const i=o.getRtpNumber("opus");if(!i){c.debug("Could not find rtp number for opus, not enabling stereo.");return t}const a=o.find((e=>e.name===`fmtp:${i}`));if(!a){c.debug("Could not find a=fmtp line for opus, not enabling stereo.");return t}let s=r[a.lineIndex];let l;switch(e){case"send":l=/sprop-stereo=\d+([\s;]*)/;l.test(a.value)?s=s.replace(l,n?"sprop-stereo=1$1":""):n&&(s+="; sprop-stereo=1");break;case"receive":l=/([^-])stereo=\d+([\s;]*)/;l.test(a.value)?s=s.replace(l,n?"$1stereo=1$2":"$1"):n&&(s+="; stereo=1");break;default:throw new Error(`Invalid type ${e} passed into enableStereo`)}s=s.replace(/[;\s]*$/,"");r[a.lineIndex]=s;return r.join("\r\n")};d.modifySendStereo=modifyStereo.bind(null,"send");d.modifyReceiveStereo=modifyStereo.bind(null,"receive");d.setAudioBitrate=(e,t)=>
1297{const n=d.getAudioBitrate(e);if(void 0!==n){c.debug(`Audio bitrate already set to ${n}, not setting audio bitrate`);return e}const r=e.split("\r\n");if(!d.getMLine(r,"audio")){c.debug("No audio m-line, not setting audio bitrate");return e}const o=d.getAttributesForMediaType(r,"audio");const i=o.getRtpNumber("opus");if(!i){c.debug("Could not find rtp number for opus, not setting audio bitrate.");return e}const a=o.find((e=>e.name===`fmtp:${i}`));if(!a){c.debug("Could not find a=fmtp line for opus, not setting audio bitrate.");return e}let s=r[a.lineIndex];s+=`; maxaveragebitrate=${t}`;s=s.replace(/[;\s]*$/,"");r[a.lineIndex]=s;return r.join("\r\n")};d.hasSendStereo=e=>/[\s;]sprop-stereo=1/.test(e);d.hasSendDtx=e=>/[\s;]usedtx=1/.test(e);d.getAudioBitrate=e=>{const t=e.match(/[\s;]maxaveragebitrate=(\d+)/);if(t)return Number(t[1])};d.MAX_SSRCS=10;d.getSSRCGroupType=e=>{const t=["SIM","FID"];return t.find((t=>{const n=e.filterByName(`ssrc-group:${t}`),r=n[0];return r}))};d.getSSRCGroup=e=>{const t=d.getSSRCGroupType(e);const n=e.filterByName(`ssrc-group:${t}`),r=n[0];return r};d.getSSRCGroupSSRCs=e=>{const t=d.getSSRCGroup(e);return t?t.value.split(" ").slice(0,d.MAX_SSRCS):[]};d.getAllowedSSRCs=(e,t)=>{const n=t.slice();e.filterByName("ssrc-group:FID").forEach((e=>{const t=e.value.split(" ");const r=a(n,t).length;r&&Array.prototype.push.apply(n,t)}));return s(n)};d.filterExcessSSRCs=e=>{const t=e.split("\r\n");const n=d.getAttributesForMediaType(t,"video");const r=d.getSSRCGroupType(n);const o=n.ssrcStartIndex;if(void 0===o)return e;let i;const getSSRCid=e=>{let t=null;e.match(/^a=ssrc:(\d+)/)&&(t=RegExp.$1);return t};if(r){const e=d.getSSRCGroupSSRCs(n);const o=[`a=ssrc-group:${r}`,...e].join(" ");const a=n.find((e=>e.name.startsWith("ssrc-group:"))).lineIndex;t[a]=o;i=d.getAllowedSSRCs(n,e)}else{i=[];const e=n.ssrcStartIndex;e&&i.push(getSSRCid(t[n.ssrcStartIndex]))}const a=t.filter(((e,t)=>{if(t<o||t>n.ssrcEndIndex)return true;if(t===o){if(!r){const t=getSSRCid(e);return t?i.includes(t):!/^a=ssrc:(\d+)/.test(e)}return true}const a=getSSRCid(e);if(a)return i.includes(a);if(e.match(/^a=ssrc-group:FID (\d+)/)){const e=RegExp.$1;return i.includes(e)}return!e.match(/^a=ssrc-group:SIM /)}));return a.join("\r\n")};d.enableSimulcast=function enableSimulcast(e,t){let n,r;const o=e.split("\r\n");if(!d.getMLine(o,"video")){c.debug("No video m-line, not enabling simulcast.");return e}const i=d.getAttributesForMediaType(o,"video");if(i.filterByName("ssrc-group:SIM").length>0){c.debug("Simulcast is already enabled in this SDP, not attempting to enable again.");return d.filterExcessSSRCs(e)}if(!i.msid){c.debug("No local stream attached, not enabling simulcast.");return e}const a=i.isUsingRTX();const s=[];const f=[];for(r=0;r<t;++r){s.push(l+r);a&&f.push(u+r)}n=[`a=ssrc-group:SIM ${s.join(" ")}`];if(a)for(r=0;r<t;++r)n.push(`a=ssrc-group:FID ${s[r]} ${f[r]}`);for(r=0;r<t;++r)n.push(`a=ssrc:${s[r]} cname:localCname`,`a=ssrc:${s[r]} msid:${i.msid}`);if(a)for(r=0;r<t;++r)n.push(`a=ssrc:${f[r]} cname:localCname`,`a=ssrc:${f[r]} msid:${i.msid}`);n.unshift(i.ssrcStartIndex,i.ssrcEndIndex-i.ssrcStartIndex+1);o.splice(...n);return o.join("\r\n")};d.reprioritizeVideoCodec=function reprioritizeVideoCodec(e,t,n){const r=e.split("\r\n");const o=d.getMLineIndex(r,"video");if(-1===o)return e;const i=d.getMLinePayloadTypes(r[o],"video");const a=new RegExp(`^a=rtpmap:(\\d+).* ${t}`,"i");const s=r.map((e=>e.match(a))).filter((e=>null!==e));if(0===s.length)return e;const l=s.map((e=>e[1]));let u=i.filter((e=>-1===l.indexOf(e)));if("top"===n)u.unshift(...l);else if("bottom"===n)u.push(...l);else{c.error(`Unexpected location param: ${n}; not changing ${t} priority`);u=i}const f=r[o].replace(i.join(" "),u.join(" "));r[o]=f;return r.join("\r\n")}},function(e,t){
1298/**
1299       * Performs a
1300       * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1301       * comparison between two values to determine if they are equivalent.
1302       *
1303       * @static
1304       * @memberOf _
1305       * @since 4.0.0
1306       * @category Lang
1307       * @param {*} value The value to compare.
1308       * @param {*} other The other value to compare.
1309       * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1310       * @example
1311       *
1312       * var object = { 'a': 1 };
1313       * var other = { 'a': 1 };
1314       *
1315       * _.eq(object, object);
1316       * // => true
1317       *
1318       * _.eq(object, other);
1319       * // => false
1320       *
1321       * _.eq('a', 'a');
1322       * // => true
1323       *
1324       * _.eq('a', Object('a'));
1325       * // => false
1326       *
1327       * _.eq(NaN, NaN);
1328       * // => true
1329       */
1330function eq(e,t){return e===t||e!==e&&t!==t}e.exports=eq},function(e,t,n){var r=n(177),o=n(375),i=n(24);
1331/**
1332       * Creates an array of the own and inherited enumerable property names of `object`.
1333       *
1334       * **Note:** Non-object values are coerced to objects.
1335       *
1336       * @static
1337       * @memberOf _
1338       * @since 3.0.0
1339       * @category Object
1340       * @param {Object} object The object to query.
1341       * @returns {Array} Returns the array of property names.
1342       * @example
1343       *
1344       * function Foo() {
1345       *   this.a = 1;
1346       *   this.b = 2;
1347       * }
1348       *
1349       * Foo.prototype.c = 3;
1350       *
1351       * _.keysIn(new Foo);
1352       * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
1353       */function keysIn(e){return i(e)?r(e,true):o(e)}e.exports=keysIn},function(e,t){
1354/**
1355       * Copies the values of `source` to `array`.
1356       *
1357       * @private
1358       * @param {Array} source The array to copy values from.
1359       * @param {Array} [array=[]] The array to copy values to.
1360       * @returns {Array} Returns `array`.
1361       */
1362function copyArray(e,t){var n=-1,r=e.length;t||(t=Array(r));while(++n<r)t[n]=e[n];return t}e.exports=copyArray},function(e,t,n){var r=void 0;e.exports=function(e){return e!==r&&null!==e}},function(e,t,n){var r=n(77);var o=1,i=4;
1363/**
1364       * This method is like `_.clone` except that it recursively clones `value`.
1365       *
1366       * @static
1367       * @memberOf _
1368       * @since 1.0.0
1369       * @category Lang
1370       * @param {*}
1370 value The value to recursively clone.
1371       * @returns {*} Returns the deep cloned value.
1372       * @see _.clone
1373       * @example
1374       *
1375       * var objects = [{ 'a': 1 }, { 'b': 2 }];
1376       *
1377       * var deep = _.cloneDeep(objects);
1378       * console.log(deep[0] === objects[0]);
1379       * // => false
1380       */function cloneDeep(e){return r(e,o|i)}e.exports=cloneDeep},function(e,t,n){var r=n(98);
1381/**
1382       * Gets the value at `path` of `object`. If the resolved value is
1383       * `undefined`, the `defaultValue` is returned in its place.
1384       *
1385       * @static
1386       * @memberOf _
1387       * @since 3.7.0
1388       * @category Object
1389       * @param {Object} object The object to query.
1390       * @param {Array|string} path The path of the property to get.
1391       * @param {*} [defaultValue] The value returned for `undefined` resolved values.
1392       * @returns {*} Returns the resolved value.
1393       * @example
1394       *
1395       * var object = { 'a': [{ 'b': { 'c': 3 } }] };
1396       *
1397       * _.get(object, 'a[0].b.c');
1398       * // => 3
1399       *
1400       * _.get(object, ['a', '0', 'b', 'c']);
1401       * // => 3
1402       *
1403       * _.get(object, 'a.b.c', 'default');
1404       * // => 'default'
1405       */function get(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}e.exports=get},function(e,t,n){var r=n(10),o=n(136),i=n(235),a=n(58);
1406/**
1407       * Casts `value` to a path array if it's not one.
1408       *
1409       * @private
1410       * @param {*} value The value to inspect.
1411       * @param {Object} [object] The object to query keys on.
1412       * @returns {Array} Returns the cast property path array.
1413       */function castPath(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}e.exports=castPath},function(e,t,n){var r=n(504);
1414/**
1415       * Converts `value` to a string. An empty string is returned for `null`
1416       * and `undefined` values. The sign of `-0` is preserved.
1417       *
1418       * @static
1419       * @memberOf _
1420       * @since 4.0.0
1421       * @category Lang
1422       * @param {*} value The value to convert.
1423       * @returns {string} Returns the converted string.
1424       * @example
1425       *
1426       * _.toString(null);
1427       * // => ''
1428       *
1429       * _.toString(-0);
1430       * // => '-0'
1431       *
1432       * _.toString([1, 2, 3]);
1433       * // => '1,2,3'
1434       */function toString(e){return null==e?"":r(e)}e.exports=toString},function(e,t){function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}e.exports=_inheritsLoose},function(e,t,n){const r=n(49);const o=n(44)();t.check=function(e){void 0===e&&(e={});const t=e.env||n(2);const r=e.hasGetUserMediaCapability||n(582);const i=e.hasPeerConnectionCapability||n(583);const a=e.logging||n(1)("hasOpenTokSupport");
1435/** @type StaticConfig */const s=e.staticConfig||o.onlyLocal();const c=s.minimumVersion||{};const l=c[t.name.toLowerCase()];if(l&&l>t.version){a.debug("Support for",t.name,"is disabled because we require",l,"but this is",t.version);return false}return"Node"===t.name||r()&&i()};t.once=r((()=>t.check()))},function(e,t,n){var r=n(597),o=n(272);
1436/**
1437       * Iterates over elements of `collection`, returning the first element
1438       * `predicate` returns truthy for. The predicate is invoked with three
1439       * arguments: (value, index|key, collection).
1440       *
1441       * @static
1442       * @memberOf _
1443       * @since 0.1.0
1444       * @category Collection
1445       * @param {Array|Object} collection The collection to inspect.
1446       * @param {Function} [predicate=_.identity] The function invoked per iteration.
1447       * @param {number} [fromIndex=0] The index to search from.
1448       * @returns {*} Returns the matched element, else `undefined`.
1449       * @example
1450       *
1451       * var users = [
1452       *   { 'user': 'barney',  'age': 36, 'active': true },
1453       *   { 'user': 'fred',    'age': 40, 'active': false },
1454       *   { 'user': 'pebbles', 'age': 1,  'active': true }
1455       * ];
1456       *
1457       * _.find(users, function(o) { return o.age < 40; });
1458       * // => object for 'barney'
1459       *
1460       * // The `_.matches` iteratee shorthand.
1461       * _.find(users, { 'age': 1, 'active': true });
1462       * // => object for 'pebbles'
1463       *
1464       * // The `_.matchesProperty` iteratee shorthand.
1465       * _.find(users, ['active', false]);
1466       * // => object for 'fred'
1467       *
1468       * // The `_.property` iteratee shorthand.
1469       * _.find(users, 'active');
1470       * // => object for 'barney'
1471       */var i=r(o);e.exports=i},function(e,t,n){e.exports=function eventHelper(e){const t=[];return{on(n,r){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];t.push({eventName:n,handler:r,args:i});if(e.on)e.on(n,r);else{if(!e.addEventListener)throw new Error("Object does not support events",e);e.addEventListener(n,r,...i)}},off(t,n){if(e.off)e.off(t,n);else{if(!e.removeEventListener)throw new Error("Object does not support events",e);for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];e.removeEventListener(t,n,...o)}},once(n,r){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];t.push({eventName:n,handler:r,args:i});e.once(n,r)},removeAll(){t.forEach((e=>{let t=e.eventName,n=e.handler,r=e.args;this.off(t,n,...r)}));t.splice(0,t.length)}}}},function(e,t,n){var r=n(175);
1472/**
1473       * The base implementation of `assignValue` and `assignMergeValue` without
1474       * value checks.
1475       *
1476       * @private
1477       * @param {Object} object The object to modify.
1478       * @param {string} key The key of the property to assign.
1479       * @param {*} value The value to assign.
1480       */function baseAssignValue(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:true,enumerable:true,value:n,writable:true}):e[t]=n}e.exports=baseAssignValue},function(e,t,n){var r=n(370),o=n(16);var i=Object.prototype;var a=i.hasOwnProperty;var s=i.propertyIsEnumerable;
1481/**
1482       * Checks if `value` is likely an `arguments` object.
1483       *
1484       * @static
1485       * @memberOf _
1486       * @since 0.1.0
1487       * @category Lang
1488       * @param {*} value The value to check.
1489       * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1490       *  else `false`.
1491       * @example
1492       *
1493       * _.isArguments(function() { return arguments; }());
1494       * // => true
1495       *
1496       * _.isArguments([1, 2, 3]);
1497       * // => false
1498       */var c=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},function(e,t,n){(function(e){var r=n(14),o=n(371);var i=(true,t)&&!t.nodeType&&t;var a=i&&"object"==typeof e&&e&&!e.nodeType&&e;var s=a&&a.exports===i;var c=s?r.Buffer:void 0;var l=c?c.isBuffer:void 0;
1499/**
1500         * Checks if `value` is a buffer.
1501         *
1502         * @static
1503         * @memberOf _
1504         * @since 4.3.0
1505         * @category Lang
1506         * @param {*} value The value to check.
1507         * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1508         * @example
1509         *
1510         * _.isBuffer(new Buffer(2));
1511         * // => true
1512         *
1513         * _.isBuffer(new Uint8Array(2));
1514         * // => false
1515         */var u=l||o;e.exports=u}).call(this||_global3,n(84)(e))},function(e,t){var n=9007199254740991;var r=/^(?:0|[1-9]\d*)$/;
1516/**
1517       * Checks if `value` is a valid array-like index.
1518       *
1519       * @private
1520       * @param {*} value The value to check.
1521       * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1522       * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1523       */function isIndex(e,t){var o=typeof e;t=null==t?n:t;return!!t&&("number"==o||"symbol"!=o&&r.test(e))&&e>-1&&e%1==0&&e<t}e.exports=isIndex},function(e,t){
1524/**
1525       * The base implementation of `_.unary` without support for storing metadata.
1526       *
1527       * @private
1528       * @param {Function} func The function to cap arguments for.
1529       * @returns {Function} Returns the new capped function.
1530       */
1531function baseUnary(e){return function(t){return e(t)}}
1531e.exports=baseUnary},function(e,t){var n=Object.prototype;
1532/**
1533       * Checks if `value` is likely a prototype object.
1534       *
1535       * @private
1536       * @param {*} value The value to check.
1537       * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1538       */function isPrototype(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||n;return e===r}e.exports=isPrototype},function(e,t){var n=e.exports={};var r;var o;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{r="function"===typeof setTimeout?setTimeout:defaultSetTimout}catch(e){r=defaultSetTimout}try{o="function"===typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){o=defaultClearTimeout}})();function runTimeout(e){if(r===setTimeout)return setTimeout(e,0);if((r===defaultSetTimout||!r)&&setTimeout){r=setTimeout;return setTimeout(e,0)}try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this||_global3,e,0)}}}function runClearTimeout(e){if(o===clearTimeout)return clearTimeout(e);if((o===defaultClearTimeout||!o)&&clearTimeout){o=clearTimeout;return clearTimeout(e)}try{return o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this||_global3,e)}}}var i=[];var a=false;var s;var c=-1;function cleanUpNextTick(){if(a&&s){a=false;s.length?i=s.concat(i):c=-1;i.length&&drainQueue()}}function drainQueue(){if(!a){var e=runTimeout(cleanUpNextTick);a=true;var t=i.length;while(t){s=i;i=[];while(++c<t)s&&s[c].run();c=-1;t=i.length}s=null;a=false;runClearTimeout(e)}}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];i.push(new Item(e,t));1!==i.length||a||runTimeout(drainQueue)};function Item(e,t){(this||_global3).fun=e;(this||_global3).array=t}Item.prototype.run=function(){(this||_global3).fun.apply(null,(this||_global3).array)};n.title="browser";n.browser=true;n.env={};n.argv=[];n.version="";n.versions={};function noop(){}n.on=noop;n.addListener=noop;n.once=noop;n.off=noop;n.removeListener=noop;n.removeAllListeners=noop;n.emit=noop;n.prependListener=noop;n.prependOnceListener=noop;n.listeners=function(e){return[]};n.binding=function(e){throw new Error("process.binding is not supported")};n.cwd=function(){return"/"};n.chdir=function(e){throw new Error("process.chdir is not supported")};n.umask=function(){return 0}},function(e,t,n){e.exports=function(e){if("function"!==typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){var r=n(29),o=n(16);var i="[object Symbol]";
1539/**
1540       * Checks if `value` is classified as a `Symbol` primitive or object.
1541       *
1542       * @static
1543       * @memberOf _
1544       * @since 4.0.0
1545       * @category Lang
1546       * @param {*} value The value to check.
1547       * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
1548       * @example
1549       *
1550       * _.isSymbol(Symbol.iterator);
1551       * // => true
1552       *
1553       * _.isSymbol('abc');
1554       * // => false
1555       */function isSymbol(e){return"symbol"==typeof e||o(e)&&r(e)==i}e.exports=isSymbol},function(e,t,n){const r=n(5);if("Node"===r.env.name)e.exports={value:""};else{var o,i;const t=null==(o=Array.prototype.slice.call(document.getElementsByTagName("script")))||null==(i=o.pop())?void 0:i.getAttribute("src");const n=t&&t.match(/[?&]apikey=([^&]+)/i)||[],r=n[1];e.exports={value:r||""}}},function(e,t,n){const r=n(2);const enforcesUnifiedPlan=()=>(r.isChrome||r.isElectron)&&r.version>=90||r.isOpera&&r.version>=76;e.exports=()=>!enforcesUnifiedPlan()&&(r.isChrome&&r.version>71||r.isChromiumEdge&&r.version<90||r.isOpera&&r.version>58)},function(e,t,n){
1556/*
1557        * Executes the provided callback thanks to <code>global.setTimeout</code>.
1558        *
1559        * @param {function()} callback
1560        * @param {number} frequency how many times per second we want to execute the callback
1561        * @param {number} maxIterations the maximum amount of iterations for this runner
1562        * @constructor
1563        */
1564function IntervalRunner(e,t,n){void 0===n&&(n=Infinity);let r=null;let o=false;let i=1;const a=1e3/t;const loop=()=>
1564{if(o&&!(i>n)){i+=1;e();r=setTimeout(loop,a)}};(this||_global3).start=()=>{if(!o){o=true;setTimeout(loop,a)}};(this||_global3).stop=()=>{(void 0!==typeof window?window:_global3).clearTimeout(r);o=false}}e.exports=IntervalRunner},function(e,t,n){const r=n(47);const o=n(640);const i=n(9);const a=n(157);const s={};function getFrameRate(e){return Number(e.framerateMean||e.googFrameRateSent||e.googFrameRateReceived||e.googFrameRateInput||e.googFrameRateOutput||0)}function getFrames(e){return Number(e.framesEncoded||e.framesDecoded)}function calcFrameRate(e,t){if(getFrameRate(e))return getFrameRate(e);if(!getFrames(e))return;let n=0;const r=s[e.id]?s[e.id].frames:0;const o=s[e.id]?s[e.id].timestamp:t;n=a({currentStatFrames:getFrames(e),currentTimestamp:e.timestamp,prevStatFrames:r,prevTimestamp:o});s[e.id]={frames:getFrames(e),timestamp:e.timestamp};return n}function getLinkedTrack(e,t){if(!t)return{};const n=t.filter((t=>t.id===e.mediaTrackId));return n.length?n[0]:{}}function totalPacketsLostReducer(e,t){return"packetsLost"in t?e+t.packetsLost:e}const c={isVideoStat(e,t){const n=getLinkedTrack(e,t);const r="video"===e.kind&&["outbound-rtp","inbound-rtp"].includes(e.type);return r||"video"===e.mediaType||"googFrameWidthReceived"in e||"googFrameWidthInput"in e||"inbound-rtp"===e.type&&-1!==e.id.indexOf("Video")||"inboundrtp"===e.type&&0!==n.frameWidth},isAudioStat(e,t){const n=getLinkedTrack(e,t);const r="audio"===e.kind&&["outbound-rtp","inbound-rtp"].includes(e.type);return r||"audio"===e.mediaType||"audioInputLevel"in e||"audioOutputLevel"in e||"inbound-rtp"===e.type&&-1!==e.id.indexOf("Audio")||"inboundrtp"===e.type&&0===n.frameWidth},isInboundStat(e){return"bytesReceived"in e||"packetsReceived"in e},isOutboundStat(e){return"bytesSent"in e||"packetsSent"in e},isVideoTrackStat(e){return"track"===e.type&&(e.frameHeight>0||e.frameWidth>0||e.framesCorrupted>0||e.framesDecoded>0||e.framesPerSecond>0||e.framesSent>0||e.framesReceived>0)},isVideoRemoteInboundRtpStat(e){return"remote-inbound-rtp"===e.type&&"video"===e.kind},isAudioRemoteInboundRtpStat(e){return"remote-inbound-rtp"===e.type&&"audio"===e.kind},isVideoInboundRtpStat(e){return"inbound-rtp"===e.type&&"video"===e.kind},parseStatCategory(e){const t={packetsLost:0,packetsReceived:0,bytesReceived:0};"packetsReceived"in e&&(t.packetsReceived=parseInt(e.packetsReceived,10));"packetsLost"in e&&(t.packetsLost=parseInt(e.packetsLost,10));"bytesReceived"in e&&(t.bytesReceived=parseInt(e.bytesReceived,10));this.isVideoStat(e)&&("framerateMean"in e?t.frameRate=Number(e.framerateMean):"googFrameRateOutput"in e?t.frameRate=Number(e.googFrameRateOutput):"googFrameRateInput"in e&&(t.frameRate=Number(e.googFrameRateInput)));return t},getVideoPacketsLost(e){return e.filter((t=>this.isVideoRemoteInboundRtpStat(t,e))).reduce(totalPacketsLostReducer,0)},getAudioPacketsLost(e){return e.filter((t=>this.isAudioRemoteInboundRtpStat(t,e))).reduce(totalPacketsLostReducer,0)},normalizeTimestamp(e,t){void 0===t&&(t=Date.now());return i(e)&&"getTime"in e?e.getTime():Math.abs(e/(1e3*t)-1)<.05?e/1e3:e},normalizeStats(e,t,n){void 0===t&&(t=true);const i=e.filter((t=>c.isVideoStat(t,e))).filter((e=>c.isInboundStat(e)===t));const a=e.filter((t=>this.isAudioStat(t,e))).filter((e=>this.isInboundStat(e)===t))[0];const s=i[0];if(!a&&!s)throw new Error("could not find stats for either audio or video");const l=c.normalizeTimestamp(s?s.timestamp:a.timestamp);const u={timestamp:l};s&&!t&&void 0===s.packetsLost&&(s.packetsLost=this.getVideoPacketsLost(e));a&&!t&&void 0===a.packetsLost&&(a.packetsLost=this.getAudioPacketsLost(e));const d=["packetsSent","packetsLost","bytesSent"];const getOutboundStats=e=>r(e,d);const getInboundStats=e=>r(e,["packetsReceived","packetsLost","bytesReceived"]);const f=t?getInboundStats:getOutboundStats;const accumulateVideoStats=e=>{const t=["framerateMean","googFrameRateSent","googFrameRateReceived","googFrameRateInput","googFrameRateOutput","framesEncoded","framesDecoded"];const n=d.concat(t);const r={timestamp:l,id:s.id};n.forEach((t=>{r[t]=e.map((e=>Number(e[t]||0))).reduce(((e,t)=>e+t),0)}));return r};if(i&&i.length>0){const e=accumulateVideoStats(i);u.video=Object.assign({frameRate:calcFrameRate(e,n)},o(f(e),Number))}a&&(u.audio=o(f(a),Number));return u}};e.exports=c},function(e,t,n){t.__esModule=true;t.codes=t.messages=void 0;const r={1001:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.",1002:"The endpoint is terminating the connection due to a protocol error. (CLOSE_PROTOCOL_ERROR)",1003:"The connection is being terminated because the endpoint has indicated that reconnections are not available. (CLOSE_UNSUPPORTED)",1005:"Indicates that no status code was provided even though one was expected. (CLOSE_NO_STATUS)",1006:"Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected. (CLOSE_ABNORMAL)",1007:"Indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message)",1008:"Indicates that an endpoint is terminating the connection because it has received a message that violates its policy.  This is a generic status code that can be returned when there is no other more suitable status code (e.g., 1003 or 1009) or if there is a need to hide specific details about the policy",1009:"Indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process (CLOSE_TOO_LARGE)",1011:"Indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request",4001:"Connectivity loss was detected as it was too long since the socket received the last PONG message",4010:"Timed out while waiting for the Rumor socket to connect.",4020:"Error code unavailable.",4030:"Exception was thrown during Rumor connection, possibly because of a blocked port."};t.messages=r;const o={CLOSE_NORMAL:1e3,CLOSE_GOING_AWAY:1001,CLOSE_PROTOCOL_ERROR:1002,CLOSE_UNSUPPORTED:1003,CLOSE_NO_STATUS:1005,CLOSE_ABNORMAL:1006,CLOSE_INCONSISTENT_DATA:1007,CLOSE_POLICY_VIOLATION:1008,CLOSE_TOO_LARGE:1009,CLOSE_UNEXPECTED_CONDITION:1011,CLOSE_CONNECTIVITY_LOSS:4001,CLOSE_TIMEOUT:4010,CLOSE_FA
1564LLBACK_CODE:4020,CLOSE_CONNECT_EXCEPTION:4030,ALREADY_CONNECTED_CONNECTING:null};t.codes=o},function(e,t,n){var r=n(78),o=n(111),i=n(83),a=n(176),s=n(374),c=n(179),l=n(53),u=n(377),d=n(379),f=n(182),p=n(184),g=n(40),h=n(382),b=n(383),v=n(189),m=n(10),_=n(65),y=n(387),E=n(9),S=n(389),T=n(30),C=n(52);var w=1,O=2,x=4;var I="[object Arguments]",A="[object Array]",R="[object Boolean]",k="[object Date]",D="[object Error]",N="[object Function]",P="[object GeneratorFunction]",M="[object Map]",L="[object Number]",j="[object Object]",U="[object RegExp]",F="[object Set]",V="[object String]",B="[object Symbol]",W="[object WeakMap]";var H="[object ArrayBuffer]",z="[object DataView]",$="[object Float32Array]",G="[object Float64Array]",q="[object Int8Array]",Y="[object Int16Array]",K="[object Int32Array]",J="[object Uint8Array]",Z="[object Uint8ClampedArray]",X="[object Uint16Array]",Q="[object Uint32Array]";var ee={};ee[I]=ee[A]=ee[H]=ee[z]=ee[R]=ee[k]=ee[$]=ee[G]=ee[q]=ee[Y]=ee[K]=ee[M]=ee[L]=ee[j]=ee[U]=ee[F]=ee[V]=ee[B]=ee[J]=ee[Z]=ee[X]=ee[Q]=true;ee[D]=ee[N]=ee[W]=false;
1565/**
1566       * The base implementation of `_.clone` and `_.cloneDeep` which tracks
1567       * traversed objects.
1568       *
1569       * @private
1570       * @param {*} value The value to clone.
1571       * @param {boolean} bitmask The bitmask flags.
1572       *  1 - Deep clone
1573       *  2 - Flatten inherited properties
1574       *  4 - Clone symbols
1575       * @param {Function} [customizer] The function to customize cloning.
1576       * @param {string} [key] The key of `value`.
1577       * @param {Object} [object] The parent object of `value`.
1578       * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
1579       * @returns {*} Returns the cloned value.
1580       */function baseClone(e,t,n,A,R,k){var D,M=t&w,L=t&O,U=t&x;n&&(D=R?n(e,A,R,k):n(e));if(void 0!==D)return D;if(!E(e))return e;var F=m(e);if(F){D=h(e);if(!M)return l(e,D)}else{var V=g(e),B=V==N||V==P;if(_(e))return c(e,M);if(V==j||V==I||B&&!R){D=L||B?{}:v(e);if(!M)return L?d(e,s(D,e)):u(e,a(D,e))}else{if(!ee[V])return R?e:{};D=b(e,V,M)}}k||(k=new r);var W=k.get(e);if(W)return W;k.set(e,D);S(e)?e.forEach((function(r){D.add(baseClone(r,t,n,r,e,k))})):y(e)&&e.forEach((function(r,o){D.set(o,baseClone(r,t,n,o,e,k))}));var H=U?L?p:f:L?C:T;var z=F?void 0:H(e);o(z||e,(function(r,o){if(z){o=r;r=e[o]}i(D,o,baseClone(r,t,n,o,e,k))}));return D}e.exports=baseClone},function(e,t,n){var r=n(79),o=n(346),i=n(347),a=n(348),s=n(349),c=n(350);
1581/**
1582       * Creates a stack cache object to store key-value pairs.
1583       *
1584       * @private
1585       * @constructor
1586       * @param {Array} [entries] The key-value pairs to cache.
1587       */function Stack(e){var t=(this||_global3).__data__=new r(e);(this||_global3).size=t.size}Stack.prototype.clear=o;Stack.prototype.delete=i;Stack.prototype.get=a;Stack.prototype.has=s;Stack.prototype.set=c;e.exports=Stack},function(e,t,n){var r=n(341),o=n(342),i=n(343),a=n(344),s=n(345);
1588/**
1589       * Creates an list cache object.
1590       *
1591       * @private
1592       * @constructor
1593       * @param {Array} [entries] The key-value pairs to cache.
1594       */function ListCache(e){var t=-1,n=null==e?0:e.length;this.clear();while(++t<n){var r=e[t];this.set(r[0],r[1])}}ListCache.prototype.clear=r;ListCache.prototype.delete=o;ListCache.prototype.get=i;ListCache.prototype.has=a;ListCache.prototype.set=s;e.exports=ListCache},function(e,t,n){var r=n(51);
1595/**
1596       * Gets the index at which the `key` is found in `array` of key-value pairs.
1597       *
1598       * @private
1599       * @param {Array} array The array to inspect.
1600       * @param {*} key The key to search for.
1601       * @returns {number} Returns the index of the matched value, else `-1`.
1602       */function assocIndexOf(e,t){var n=e.length;while(n--)if(r(e[n][0],t))return n;return-1}e.exports=assocIndexOf},function(e,t,n){var r=n(37);var o=r(Object,"create");e.exports=o},function(e,t,n){var r=n(365);
1603/**
1604       * Gets the data for `map`.
1605       *
1606       * @private
1607       * @param {Object} map The map to query.
1608       * @param {string} key The reference key.
1609       * @returns {*} Returns the map data.
1610       */function getMapData(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}
1610e.exports=getMapData},function(e,t,n){var r=n(63),o=n(51);var i=Object.prototype;var a=i.hasOwnProperty;
1611/**
1612       * Assigns `value` to `key` of `object` if the existing value is not equivalent
1613       * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1614       * for equality comparisons.
1615       *
1616       * @private
1617       * @param {Object} object The object to modify.
1618       * @param {string} key The key of the property to assign.
1619       * @param {*} value The value to assign.
1620       */function assignValue(e,t,n){var i=e[t];a.call(e,t)&&o(i,n)&&(void 0!==n||t in e)||r(e,t,n)}e.exports=assignValue},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){e.deprecate=function(){};e.paths=[];e.children||(e.children=[]);Object.defineProperty(e,"loaded",{enumerable:true,get:function(){return e.l}});Object.defineProperty(e,"id",{enumerable:true,get:function(){return e.i}});e.webpackPolyfill=1}return e}},function(e,t,n){var r=n(372),o=n(67),i=n(113);var a=i&&i.isTypedArray;
1621/**
1622       * Checks if `value` is classified as a typed array.
1623       *
1624       * @static
1625       * @memberOf _
1626       * @since 3.0.0
1627       * @category Lang
1628       * @param {*} value The value to check.
1629       * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1630       * @example
1631       *
1632       * _.isTypedArray(new Uint8Array);
1633       * // => true
1634       *
1635       * _.isTypedArray([]);
1636       * // => false
1637       */var s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(9);var o=Object.create;
1638/**
1639       * The base implementation of `_.create` without support for assigning
1640       * properties to the created object.
1641       *
1642       * @private
1643       * @param {Object} proto The object to inherit from.
1644       * @returns {Object} Returns the new object.
1645       */var i=function(){function object(){}return function(e){if(!r(e))return{};if(o)return o(e);object.prototype=e;var t=new object;object.prototype=void 0;return t}}();e.exports=i},function(e,t,n){var r=n(88),o=n(192),i=n(121);
1646/**
1647       * The base implementation of `_.rest` which doesn't validate or coerce arguments.
1648       *
1649       * @private
1650       * @param {Function} func The function to apply a rest parameter to.
1651       * @param {number} [start=func.length-1] The start position of the rest parameter.
1652       * @returns {Function} Returns the new function.
1653       */function baseRest(e,t){return i(o(e,t,r),e+"")}e.exports=baseRest},function(e,t){
1654/**
1655       * This method returns the first argument it receives.
1656       *
1657       * @static
1658       * @since 0.1.0
1659       * @memberOf _
1660       * @category Util
1661       * @param {*} value Any value.
1662       * @returns {*} Returns `value`.
1663       * @example
1664       *
1665       * var object = { 'a': 1 };
1666       *
1667       * console.log(_.identity(object) === object);
1668       * // => true
1669       */
1670function identity(e){return e}e.exports=identity},function(e,t,n){var r=Object.prototype.toString,o=r.call(function(){return arguments}());e.exports=function(e){return r.call(e)===o}},function(e,t,n){var r=Object.prototype.toString,o=r.call("");e.exports=function(e){return"string"===typeof e||e&&"object"===typeof e&&(e instanceof String||r.call(e)===o)||false}},function(e,t,n){e.exports=n(414)()?globalThis:n(415)},function(e,t,n){var r=n(110),o=n(447),i=n(448);
1671/**
1672       *
1673       * Creates an array cache object to store unique values.
1674       *
1675       * @private
1676       * @constructor
1677       * @param {Array} [values] The values to cache.
1678       */function SetCache(e){var t=-1,n=null==e?0:e.length;(this||_global3).__data__=new r;while(++t<n)this.add(e[t])}SetCache.prototype.add=SetCache.prototype.push=o;SetCache.prototype.has=i;e.exports=SetCache},function(e,t,n){var r=n(449);
1679/**
1680       * A specialized version of `_.includes` for arrays without support for
1681       * specifying an index to search from.
1682       *
1683       * @private
1684       * @param {Array} [array] The array to inspect.
1685       * @param {*} target The value to search for.
1686       * @returns {boolean} Returns `true` if `target` is found, else `false`.
1687       */function arrayIncludes(e,t){var n=null==e?0:e.length;return!!n&&r(e,t,0)>-1}e.exports=arrayIncludes},function(e,t){
1688/**
1689       * Checks if a `cache` value for `key` exists.
1690       *
1691       * @private
1692       * @param {Object} cache The cache to query.
1693       * @param {string} key The key of the entry to check.
1694       * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1695       */
1696function cacheHas(e,t){return e.has(t)}e.exports=cacheHas},function(e,t,n){var r=n(86),o=n(9);
1697/**
1698       * Creates a function that produces an instance of `Ctor` regardless of
1699       * whether it was invoked as part of a `new` expression or by `call` or `apply`.
1700       *
1701       * @private
1702       * @param {Function} Ctor The constructor to wrap.
1703       * @returns {Function} Returns the new wrapped function.
1704       */function createCtor(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=r(e.prototype),i=e.apply(n,t);return o(i)?i:n}}
1704e.exports=createCtor},function(e,t,n){var r=n(489);
1705/**
1706       * Converts `value` to an integer.
1707       *
1708       * **Note:** This method is loosely based on
1709       * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
1710       *
1711       * @static
1712       * @memberOf _
1713       * @since 4.0.0
1714       * @category Lang
1715       * @param {*} value The value to convert.
1716       * @returns {number} Returns the converted integer.
1717       * @example
1718       *
1719       * _.toInteger(3.2);
1720       * // => 3
1721       *
1722       * _.toInteger(Number.MIN_VALUE);
1723       * // => 0
1724       *
1725       * _.toInteger(Infinity);
1726       * // => 1.7976931348623157e+308
1727       *
1728       * _.toInteger('3.2');
1729       * // => 3
1730       */function toInteger(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}e.exports=toInteger},function(e,t){
1731/**
1732       * Converts `set` to an array of its values.
1733       *
1734       * @private
1735       * @param {Object} set The set to convert.
1736       * @returns {Array} Returns the values.
1737       */
1738function setToArray(e){var t=-1,n=Array(e.size);e.forEach((function(e){n[++t]=e}));return n}e.exports=setToArray},function(e,t,n){var r=n(57),o=n(46);
1739/**
1740       * The base implementation of `_.get` without support for default values.
1741       *
1742       * @private
1743       * @param {Object} object The object to query.
1744       * @param {Array|string} path The path of the property to get.
1745       * @returns {*} Returns the resolved value.
1746       */function baseGet(e,t){t=r(t,e);var n=0,i=t.length;while(null!=e&&n<i)e=e[o(t[n++])];return n&&n==i?e:void 0}e.exports=baseGet},function(e,t,n){var r=n(238),o=n(30);
1747/**
1748       * The base implementation of `_.forOwn` without support for iteratee shorthands.
1749       *
1750       * @private
1751       * @param {Object} object The object to iterate over.
1752       * @param {Function} iteratee The function invoked per iteration.
1753       * @returns {Object} Returns `object`.
1754       */function baseForOwn(e,t){return e&&r(e,t,o)}e.exports=baseForOwn},function(e,t,n){t.adaptIceServers=function adaptIceServers(e){return e.map((e=>({url:e.url,urls:e.urls||[e.url],username:e.username,credential:e.credential})))};t.parseIceServers=function parseIceServers(e){let n;try{n=JSON.parse(e.data).content.iceServers}catch(e){return[]}return t.adaptIceServers(n)}},function(e,t,n){(function(t){const r=n(153);const o=n(48);const i=n(7);const a=n(55);const s=n(127);const c=n(147);const l=n(271);const u=n(19);const d=n(6);const f=n(250);const p=n(154);const g=n(50);const h=n(73);e.exports=function PeerConnectionFactory(e){void 0===e&&(e={});const b=e.hasValidPeerConnection||n(600);const v=e.applySdpTransform||n(155);const m=e.createPeerConnection||n(603);const _=e.env||n(2);const y=e.sdpTransformDefaults||n(605);const E=e.getStatsAdapter||n(274);const S=e.getRtcStatsReportAdapter||n(277);const T=e.getSynchronizationSources||n(609);const C=e.IceCandidateProcessor||n(610);const w=e.logging||n(1);const O=e.offerProcessor||n(612);const x=e.PeerConnectionChannels||n(614);const I=e.subscribeProcessor||n(616);const A=e.changeMediaDirection||n(617),R=A.changeMediaDirectionToInactive,k=A.changeMediaDirectionToRecvOnly;const D=e.Qos||n(278).default;const N=e.global||(void 0!==typeof window?window:_global3);const P=e.debounce||n(621);const M=e.needsToSwapH264Profiles||n(623).once;const futureIsPeerConnectionValid=()=>b(N.RTCPeerConnection);const L=e.NativeRTCIceCandidate||N.RTCIceCandidate;const j=e.NativeRTCSessionDescription||N.RTCSessionDescription;const U=e.Errors||n(4);const F=e.OTErrorClass||n(21);const V=e.ExceptionCodes||n(8);const B=1e4;const iceCandidateForwarder=e=>{let t=e.sendMessage,n=e.logging;const r={};return e=>{if(e.candidate){r[e.candidate.sdpMid]=e.candidate.sdpMLineIndex;t("candidate",{candidate:e.candidate.candidate,sdpMid:e.candidate.sdpMid||"",sdpMLineIndex:e.candidate.sdpMLineIndex||0})}else n.debug("IceCandidateForwarder: No more ICE candidates.")}};const noop=()=>{};return function PeerConnection(e){void 0===e&&(e={});let n=false;const b=e,A=b.iceConfig,W=void 0===A?{servers:[]}:A,H=b.isPublisher,z=b.logAnalyticsEvent,$=void 0===z?noop:z,G=b.offerOverrides,q=b.answerOverrides,Y=b.sdpTransformOptions,K=b.sendMessage,J=b.p2p,Z=b.codecFlags,X=b.sourceStreamId;let Q=false;let ee=false;let te=false;let ne;const re=M();let oe=0;let ie=false;const ae=p();function sendMessage(e,t){if(!n){const r=["candidate","offer","answer","pranswer"].indexOf(e)>-1;if(r){const r="candidate"===e?t.candidate:t.sdp;n=-1!==r.indexOf("typ relay")}}K(e,t)}const se=o();$("createPeerConnection","Attempt");const ce={};ce.id=u();const le=w(`PeerConnection:${ce.id}`);le.debug("construct",{id:ce.id,options:e});const ue=c({},y,Y);const shouldFilterCandidate=e=>"relay"===W.transportPolicy&&null!=e&&-1===e.candidate.indexOf("typ relay");const de=l(e,["isPublisher","logAnalyticsEvent","offerOverrides","answerOverrides","sendMessage","sdpTransformOptions"]);let fe,pe,ge,he,be;let ve=[];const me=(()=>{let e=de.overrideSimulcastEnabled||false;return{get(){return e},set(t){const n=Boolean(t)&&de.capableSimulcastStreams>1;
1754if(n!==e&&void 0===de.overrideSimulcastEnabled){e=n;ce.generateOffer()}}}})();const _e=(()=>{let e=false;return{get(){return e},set(t){const n=Boolean(t);if(n!==e){e=n;e&&!ce.iceConnectionStateIsConnected()?ce.generateOffer():le.debug("iceRestart is going to wait until we disconnect and then restart ice")}}}})();const ye={clean(){delete(this||_global3).promise;delete(this||_global3).resolve;delete(this||_global3).reject}};ye.promise=new t(((e,t)=>{ye.resolve=e;ye.reject=t}));let Ee=new C;let Se="new";Object.defineProperty(ce,"signalingState",{get(){return fe.signalingState},set(e){fe.signalingState=e;return e}});d(ce);ce.once("iceConnected",(()=>{const e="";const t={pcc:parseInt(o()-se,10),hasRelayCandidates:n,proxyInfo:e};fe&&fe.proxyInfo&&(t.proxyInfo=fe.proxyInfo);$("createPeerConnection","Success",t)}));ye.resolve();const internalCreatePeerConnection=e=>{le.debug("internalCreatePeerConnection: called");if(fe){le.debug("internalCreatePeerConnection: resolving synchronously");e.call(null,null,fe);return}ve.push(e);if(ve.length>1)return;const t={optional:[{DtlsSrtpKeyAgreement:true}]};le.debug(`Creating peer connection config "${JSON.stringify(de)}".`);if(0===W.servers.length){le.error("No ice servers present");$("Error","noIceServers")}if("relay"===W.transportPolicy){const isTurnUrl=e=>e&&0===e.indexOf("turn");W.servers=W.servers.map((e=>{const t=a(e);Array.isArray(t.urls)||(t.urls=[t.urls]);t.urls=t.urls.filter(isTurnUrl);return 0===t.urls.length?void 0:t})).filter((e=>void 0!==e))}de.iceTransportPolicy=W.transportPolicy;de.iceServers=W.servers;futureIsPeerConnectionValid().then((e=>{if(!e){le.error("createPeerConnection: Invalid RTCPeerConnection object");throw new Error("Failed to create valid RTCPeerConnection object")}return m({window:N,config:de,constraints:t})})).then((e=>attachEventsToPeerConnection(null,e)),(e=>attachEventsToPeerConnection(e)))};const attachEventsToPeerConnection=(e,t)=>{if(e){triggerError({reason:`Failed to create PeerConnection, exception: ${e}`,prefix:"NewPeerConnection"});ve=[];return}le.debug("OT attachEventsToPeerConnection");fe=t;Ee&&Ee.setPeerConnection(t);pe=new x(fe);de.channels&&pe.addMany(de.channels);const n=iceCandidateForwarder({sendMessage:sendMessage,logging:le});const onIceCandidate=e=>{ye.resolve();shouldFilterCandidate(e.candidate)?le.debug("Ignore candidate",e.candidate.candidate):n(e)};let r=fe.iceConnectionState;const onIceConnectionStateChanged=e=>{if(fe){le.debug("iceconnectionstatechange",fe.iceConnectionState);if("connected"===fe.iceConnectionState){"disconnected"===r&&ce.clearFailedTimeout();ce.emit("iceConnected");_e.set(false)}else"completed"===fe.iceConnectionState&&_.isLegacyEdge&&setTimeout((()=>Ce.startCollecting(fe)),1e3)}else le.debug("iceconnectionstatechange on peerConnection that no longer exists",ce);const t=e.target.iceConnectionState;ce.trigger("iceConnectionStateChange",t);$("attachEventsToPeerConnection","iceconnectionstatechange",t);if("disconnected"===t)if(_e.get()){le.debug("Restarting ice!");ce.generateOffer()}else h()||(be=setTimeout((()=>{const e="failed";$("attachEventsToPeerConnection","iceconnectionstatechange",e);r=e;ce.trigger("iceConnectionStateChange",e)}),B));"disconnected"!==r&&"failed"===t&&triggerError({reason:"The stream was unable to connect due to a network error. Make sure your connection isn't blocked by a firewall.",prefix:"ICEWorkflow"});r=t};const onNegotiationNeeded=()=>{$("peerConnection:negotiationNeeded","Event");H&&ce.generateOffer()};fe.onaddstream=noop;fe.addEventListener("icecandidate",onIceCandidate);fe.addEventListener("addstream",onRemoteStreamAdded);fe.addEventListener("removestream",onRemoteStreamRemoved);fe.addEventListener("signalingstatechange",routeStateChanged);fe.addEventListener("negotiationneeded",onNegotiationNeeded);fe.addEventListener("iceconnectionstatechange",onIceConnectionStateChanged);ae.add((()=>{if(fe){fe.onaddstream=null;fe.removeEventListener("icecandidate",onIceCandidate);fe.removeEventListener("addstream",onRemoteStreamAdded);fe.removeEventListener("removestream",onRemoteStreamRemoved);fe.removeEventListener("signalingstatechange",routeStateChanged);fe.removeEventListener("negotiationneeded",onNegotiationNeeded);fe.removeEventListener("iceconnectionstatechange",onIceConnectionStateChanged)}}));triggerPeerConnectionCompletion(null)};const triggerPeerConnectionCompletion=()=>{while(ve.length)ve.shift().call(null)};const tearDownPeerConnection=()=>
1754{if(Ee){Ee.destroy();Ee=null}ve=[];Ce.stopCollecting();ae.releaseAll();ye.clean();if(null!==fe){fe.destroy&&fe.destroy();fe=null;ce.trigger("close")}ce.off()};const routeStateChanged=e=>{const t=e.target.signalingState;ce.emit("signalingStateChange",t);"stable"===t&&ce.emit("signalingStateStable");if(t&&t!==Se){Se=t;le.debug(`stateChange: ${Se}`);switch(Se){case"closed":tearDownPeerConnection();break;default:}}};const qosCallback=e=>{e.dataChannels=pe.sampleQos();ce.trigger("qos",{parsedStats:e,simulcastEnabled:me.get()})};const getRemoteStreams=()=>{let e;if(fe.getRemoteStreams)e=fe.getRemoteStreams();else{if(!fe.remoteStreams)throw new Error("Invalid Peer Connection object implements no method for retrieving remote streams");e=fe.remoteStreams}return Array.prototype.slice.call(e)};const onRemoteStreamAdded=e=>{$("createPeerConnection","StreamAdded");ce.trigger("streamAdded",e.stream)};const onRemoteStreamRemoved=e=>{$("peerConnection:streamRemoved","Event");ce.trigger("streamRemoved",e.stream)};const reportError=(e,t,n)=>{te=false;triggerError({reason:`PeerConnection.offerProcessor ${e}: ${t}`,prefix:n})};const processOffer=e=>{if(te){ne=e;return}te=true;$("peerConnection:processOffer","Event");const t=new j({type:"offer",sdp:e.content.sdp});const relayAnswer=e=>{te=false;Ee&&Ee.process();sendMessage("answer",e);_.isLegacyEdge||Ce.startCollecting(fe,H);if(ne){processOffer(ne);ne=null}};const onRemoteVideoSupported=e=>ce.trigger("remoteVideoSupported",e);internalCreatePeerConnection((()=>{O(fe,N.RTCPeerConnection,N.RTCSessionDescription,j,ue,t,Z,J,relayAnswer,reportError,onRemoteVideoSupported,re)}))};const processAnswer=e=>{$("peerConnection:processAnswer","Event");const failure=e=>{triggerError({reason:`Error while setting RemoteDescription ${e}`,prefix:"SetRemoteDescription"})};if(e.content.sdp){he=new j({type:"answer",sdp:v(ue,"remote","answer",i({replaceBaselineProfile:re},q),e.content.sdp).local});(()=>{const success=()=>{le.debug("processAnswer: setRemoteDescription Success");Ee&&Ee.process()};fe.setRemoteDescription(he).then(success).catch(failure);Q=false;if(ee){ee=false;ce.generateOffer()}})();_.isLegacyEdge||Ce.startCollecting(fe,H)}else failure("Weird answer message, no SDP.")};const processSubscribe=()=>{var e,t;if("closed"===(null==(e=fe)||null==(t=e.signalingState)?void 0:t.toLowerCase()))return;Q=true;$("peerConnection:processSubscribe","Event");le.debug("processSubscribe: Sending offer to subscriber.");let n=me.get()?de.capableSimulcastStreams:1;const r="P2P"===X&&!J;r&&(n=1);internalCreatePeerConnection((()=>{I({peerConnection:fe,NativeRTCSessionDescription:j,sdpTransforms:ue,numSimulcastStreams:n,offerOverrides:G,offerConstraints:{iceRestart:_e.get()},replaceBaselineProfile:re}).then((e=>{le.debug("processSubscribe: got offer, waiting for _readyToSendOffer");ge=e;ye.promise.then((()=>{le.debug("processSubscribe: sending offer");sendMessage("offer",ge)}))}),(e=>{triggerError({reason:`subscribeProcessor ${e.message}: ${e.reason}`,prefix:e.prefix})}));_e.set(false)}))};ce.generateOffer=P((()=>{Q?ee=true:processSubscribe()}),100);const triggerError=e=>{let t=e.reason,n=e.prefix;le.error(t,"in state",fe?{connectionState:fe.connectionState,iceConnectionState:fe.iceConnectionState,iceGatheringState:fe.iceGatheringState,signalingState:fe.signalingState}:"(none)");ce.trigger("error",{reason:t,prefix:n})};
1755/*
1756            * Add a track to the underlying PeerConnection
1757            *
1758            * @param {object} track - the track to add
1759            * @param {object} stream - the stream to add it to
1760            * @return {RTCRtpSender}
1761            */ce.addTrack=(e,n)=>{const o=new t(((e,t)=>{internalCreatePeerConnection((n=>{if(n)return t(n);e()}))})).then((()=>
1761{if(fe.addTrack)return fe.addTrack(e,n);const t=fe.getLocalStreams()[0];if(void 0===t)throw new Error("PeerConnection has no existing streams, cannot addTrack");t.addTrack(e);ce.generateOffer()})).then((()=>new t((e=>{ce.once("signalingStateStable",(()=>{e()}))}))));return r(o,15e3,"Renegotiation timed out")};function FakeRTCRtpSender(e){(this||_global3).track=e}
1762/**
1763             * Remove a track from the underlying PeerConnection
1764             *
1765             * @param {RTCRtpSender} RTCRtpSender - the RTCRtpSender to remove
1766             */ce.removeTrack=e=>{const n=t.resolve().then((()=>{if(!(e instanceof FakeRTCRtpSender))return fe.removeTrack(e);fe.getLocalStreams()[0].removeTrack(e.track);ce.generateOffer()})).then((()=>new t((e=>{ce.once("signalingStateStable",(()=>{e()}))}))));return r(n,15e3,"Renegotiation timed out")};ce.addLocalStream=e=>new t(((t,n)=>{internalCreatePeerConnection((r=>{if(r)n(r);else{try{fe.addStream(e)}catch(e){n(e);return}t()}}),e)}));ce.getLocalStreams=()=>fe.getLocalStreams();ce.getSenders=()=>fe.getSenders?fe.getSenders():fe.getLocalStreams()[0].getTracks().map((e=>new FakeRTCRtpSender(e)));ce.disconnect=()=>{var e;if(Ee){Ee.destroy();Ee=null}if((null==(e=fe)?void 0:e.signalingState)&&"closed"!==fe.signalingState.toLowerCase()){fe.close();setTimeout(tearDownPeerConnection)}};ce.iceRestart=()=>_e.set(true);ce.clearFailedTimeout=()=>clearTimeout(be);ce.changeMediaDirectionToRecvOnly=()=>k(fe);ce.changeMediaDirectionToInactive=()=>R(fe);ce.processMessage=(e,t)=>{le.debug(`processMessage: Received ${e} from ${t.fromAddress}`,t);le.debug(t);switch(e){case"generateoffer":t.content&&void 0!==t.content.simulcastEnabled&&me.set(t.content.simulcastEnabled);ce.generateOffer();trackRenegotiationAttempts();break;case"offer":processOffer(t);trackRenegotiationAttempts();break;case"answer":case"pranswer":processAnswer(t);break;case"candidate":var n=new L(t.content);if(shouldFilterCandidate(n)){le.debug("Ignore candidate",n.candidate);return ce}Ee&&Ee.addIceCandidate(n).catch((e=>{le.warn(`Error while adding ICE candidate: ${JSON.stringify(n)}: ${e.toString()}`)}));break;default:le.debug(`processMessage: Received an unexpected message of type ${e} from ${t.fromAddress}: ${JSON.stringify(t)}`)}function trackRenegotiationAttempts(){oe+=1;Ce.handleOfferMessageReceived();if(oe>1){$("Renegotiation","Attempt");ie=true}}return ce};ce.remoteStreams=()=>fe?getRemoteStreams():[];ce.remoteTracks=()=>fe?fe.getReceivers?Array.prototype.slice.apply(fe.getReceivers()).map((e=>e.track)):Array.prototype.concat.apply([],getRemoteStreams().map((e=>e.getTracks()))):[];ce.remoteDescription=()=>fe.remoteDescription
1767/**
1768             * @param {function(DOMError, Array<RTCStats>)} callback
1769             */;ce.getStats=e=>{if(fe)E(fe,e);else{const t=V.PEER_CONNECTION_NOT_CONNECTED;e(new f(F.getTitleByCode(t),U.PEER_CONNECTION_NOT_CONNECTED,{code:t}))}};
1770/**
1771             * @param {function(DOMError, RTCStatsReport)} callback
1772             */ce.getRtcStatsReport=e=>{if(fe)S(fe,e);else{const t=V.PEER_CONNECTION_NOT_CONNECTED;e(new f(F.getTitleByCode(t),U.PEER_CONNECTION_NOT_CONNECTED,{code:t}))}};ce.getSynchronizationSources=e=>{if(!H){if(!fe){const t=V.PEER_CONNECTION_NOT_CONNECTED;e(new f(F.getTitleByCode(t),U.PEER_CONNECTION_NOT_CONNECTED,{code:t}));return}T(fe,e)}};const Te=function waitForChannel(e,t,n,r){let o;const i=pe.get(t,n);if(!i){if(e>0){setTimeout(waitForChannel.bind(null,e-1,t,n,r),200);return}o=new f(`A channel with that label and options could not be found. Label:${t}. Options: ${JSON.stringify(n)}`)}r(o,i)};ce.getDataChannel=(e,t,n)=>{fe?Te(100,e,t,n):n(new f("Cannot create a DataChannel before there is a connection."))};ce.getSourceStreamId=()=>X;ce.iceConnectionStateIsConnected=()=>fe&&["connected","completed"].indexOf(fe.iceConnectionState)>-1;ce.findAndReplaceTrack=(e,n)=>t.resolve().then((()=>{const r=fe.getSenders().filter((t=>t.track===e))[0];if(!r)return t.resolve();if("function"!==typeof r.replaceTrack)throw new Error("Sender does not support replaceTrack");return r.replaceTrack(n)}));ce.hasRelayCandidates=()=>n;ce.getNegotiatedCodecs=()=>
1772{if(!fe.localDescription||!fe.remoteDescription)return null;const getForMediaType=e=>s(g.getCodecs(fe.localDescription.sdp,e),g.getCodecs(fe.remoteDescription.sdp,e));return{audio:getForMediaType("audio"),video:getForMediaType("video")}};ce.on("signalingStateStable",(()=>{if(ie){ie=false;$("Renegotiation","Success",ce.getNegotiatedCodecs())}}));ce.on("error",(e=>{let t=e.prefix;if(ie&&-1!==["CreateOffer","SetRemoteDescription"].indexOf(t)){ie=false;$("Renegotiation","Failure")}}));ce.on("close",(()=>{if(ie){ie=false;$("Renegotiation","Cancel")}}));const Ce=new D;Ce.on("stats",qosCallback);return ce}}}).call(this||_global3,n(0))},function(e,t,n){const r=n(2);e.exports=()=>"Chrome"===r.name&&r.version>=58||-1!==["Firefox","Edge","Safari","Opera"].indexOf(r.name)},function(e,t,n){
1773/*
1774        * Executes the provided callback before each paint (frequency is usually the monitors refresh
1775        * rate which is typically 60 times per second)
1776        *
1777        * @param {function()} callback
1778        * @constructor
1779        */
1780e.exports=function RafRunner(e){let t=null;let n=false;const loop=()=>{if(n){e();t=window.requestAnimationFrame(loop)}};(this||_global3).start=()=>{if(!n){n=true;window.requestAnimationFrame(loop)}};(this||_global3).stop=()=>{window.cancelAnimationFrame(t);n=false}}},function(e,t,n){const r=n(7);const generatePropertyFunction=(e,t,n)=>t&&!n?()=>t.call(e):t&&n?r=>{void 0!==r&&n.call(e,r);return t.call(e)}:t=>{void 0!==t&&n.call(e,t)};
1781/**
1782       * @typedef getterSetterDefinition
1783       * @property {function(): any} get the function called when accessing the value
1784       * @property {function(any): void} set the function called when setting the value
1785       */
1786/**
1787       * Creates primitive getters/ setters on objects
1788       *
1789       * For every key in gettersSetters, a method will be added to object.
1790       *
1791       * When the method is called with no value, it will call the getter
1792       * When the method is called with a value, it will call the setter with the value
1793       *
1794       * @deprecated Prefer using real getters and setters
1795       *
1796       * @param {any} object
1797       * @param {Object.<string, getterSetterDefinition>} getterSetters
1798       */e.exports=(e,t)=>{const n={};Object.keys(t).forEach((r=>{n[r]=generatePropertyFunction(e,t[r].get,t[r].set)}));r(e,n)}},function(e,t,n){let r="";const setCurrentAudioOutputDeviceId=e=>{r=e};const getCurrentAudioOutputDeviceId=()=>r;e.exports={getCurrentAudioOutputDeviceId:getCurrentAudioOutputDeviceId,setCurrentAudioOutputDeviceId:setCurrentAudioOutputDeviceId}},function(e,t,n){(function(t){e.exports=function promiseDelay(e){return new t((t=>setTimeout(t,e)))}}).call(this||_global3,n(0))},function(e,t,n){const r=n(293);
1799/**
1800       * VideoElementFacadeFactory DI Container for VideoElementFacade
1801       *
1802       * @package
1803       * @param {Object} [dependencies]
1804       * @param {typeof NativeVideoElementWrapper} [dependencies.NativeVideoElementWrapper]
1805       * @return {typeof VideoElementFacade}
1806       */function VideoElementFacadeFactory(e){let t=void 0===e?{}:e,n=t.NativeVideoElementWrapper,o=void 0===n?r():n;const i=o;const a=50;
1807/**
1808         * Create a new VideoElementFacade
1809         *
1810         * Was used to simplify the strategy between Plugin and Native.
1811         *
1812         * @todo This needs to go.
1813         *
1814         * Note: Could VideoElementFacade not exist? Could it just be an expected interface
1815         * for VideoElementWrapper which could be either PluginVideoElementWrapper or
1816         * NativeVideoElementWrapper
1817         *
1818         * @package
1819         * @class
1820         * @param {Object} [config]
1821         * @param {String} [config.fallbackText] displayed when WebRTC is not supported
1822         * @param {Boolean} [config.muted] initial mute setting
1823         * @param {String} [config.fitMode] fitMode a parameter passed to VideoElementWrapper
1824         * @param {Object} [config._inject] @todo use the DI system
1825         * @param {Function} [errorHandler=() => {}] error callback function
1826         */function VideoElementFacade(e){let t=void 0===e?{}:e,n=t.fallbackText,r=void 0===n?"Sorry, Web RTC is not available in your browser":n,o=t.fitMode,s=t.muted,c=t._inject,l=t.widgetType;return new i({fallbackText:r,fitMode:o,muted:s,defaultAudioVolume:a,_inject:c,widgetType:l})}return VideoElementFacade}e.exports=VideoElementFacadeFactory},function(e,t){function _interopRequireWildcard(e){if(e&&e.__esMo
1826dule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e;return t}e.exports=_interopRequireWildcard},function(e,t,n){var r=n(37),o=n(14);var i=r(o,"Map");e.exports=i},function(e,t,n){var r=n(357),o=n(364),i=n(366),a=n(367),s=n(368);
1827/**
1828       * Creates a map cache object to store key-value pairs.
1829       *
1830       * @private
1831       * @constructor
1832       * @param {Array} [entries] The key-value pairs to cache.
1833       */function MapCache(e){var t=-1,n=null==e?0:e.length;this.clear();while(++t<n){var r=e[t];this.set(r[0],r[1])}}MapCache.prototype.clear=r;MapCache.prototype.delete=o;MapCache.prototype.get=i;MapCache.prototype.has=a;MapCache.prototype.set=s;e.exports=MapCache},function(e,t){
1834/**
1835       * A specialized version of `_.forEach` for arrays without support for
1836       * iteratee shorthands.
1837       *
1838       * @private
1839       * @param {Array} [array] The array to iterate over.
1840       * @param {Function} iteratee The function invoked per iteration.
1841       * @returns {Array} Returns `array`.
1842       */
1843function arrayEach(e,t){var n=-1,r=null==e?0:e.length;while(++n<r)if(false===t(e[n],n,e))break;return e}e.exports=arrayEach},function(e,t){var n=9007199254740991;
1844/**
1845       * Checks if `value` is a valid array-like length.
1846       *
1847       * **Note:** This method is loosely based on
1848       * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1849       *
1850       * @static
1851       * @memberOf _
1852       * @since 4.0.0
1853       * @category Lang
1854       * @param {*} value The value to check.
1855       * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1856       * @example
1857       *
1858       * _.isLength(3);
1859       * // => true
1860       *
1861       * _.isLength(Number.MIN_VALUE);
1862       * // => false
1863       *
1864       * _.isLength(Infinity);
1865       * // => false
1866       *
1867       * _.isLength('3');
1868       * // => false
1869       */function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}e.exports=isLength},function(e,t,n){(function(e){var r=n(173);var o=(true,t)&&!t.nodeType&&t;var i=o&&"object"==typeof e&&e&&!e.nodeType&&e;var a=i&&i.exports===o;var s=a&&r.process;var c=function(){try{var e=i&&i.require&&i.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=c}).call(this||_global3,n(84)(e))},function(e,t,n){var r=n(68),o=n(373);var i=Object.prototype;var a=i.hasOwnProperty;
1870/**
1871       * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1872       *
1873       * @private
1874       * @param {Object} object The object to query.
1875       * @returns {Array} Returns the array of property names.
1876       */function baseKeys(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}e.exports=baseKeys},function(e,t,n){var r=n(378),o=n(180);var i=Object.prototype;var a=i.propertyIsEnumerable;var s=Object.getOwnPropertySymbols;
1877/**
1878       * Creates an array of the own enumerable symbols of `object`.
1879       *
1880       * @private
1881       * @param {Object} object The object to query.
1882       * @returns {Array} Returns the array of symbols.
1883       */var c=s?function(e){if(null==e)return[];e=Object(e);return r(s(e),(function(t){return a.call(e,t)}))}:o;e.exports=c},function(e,t){
1884/**
1885       * Appends the elements of `values` to `array`.
1886       *
1887       * @private
1888       * @param {Array} array The array to modify.
1889       * @param {Array} values The values to append.
1890       * @returns {Array} Returns `array`.
1891       */
1892function arrayPush(e,t){var n=-1,r=t.length,o=e.length;while(++n<r)e[o+n]=t[n];return e}e.exports=arrayPush},function(e,t,n){var r=n(178);var o=r(Object.getPrototypeOf,Object);e.exports=o},function(e,t,n){var r=n(187);
1893/**
1894       * Creates a clone of `arrayBuffer`.
1895       *
1896       * @private
1897       * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
1898       * @returns {ArrayBuffer} Returns the cloned array buffer.
1899       */function cloneArrayBuffer(e){var t=new e.constructor(e.byteLength);new r(t).set(new r(e));return t}e.exports=cloneArrayBuffer},function(e,t,n){e.exports={error:{priority:1,method:"error"},warn:{priority:2,method:"warn"},info:{priority:3,method:"info"},log:{priority:4,method:"log"},debug:{priority:5,method:"debug"},spam:{priority:6,method:"log"}}},function(e,t){
1900/**
1901       * A faster alternative to `Function#apply`, this function invokes `func`
1902       * with the `this` binding of `thisArg` and the arguments of `args`.
1903       *
1904       * @private
1905       * @param {Function} func The function to invoke.
1906       * @param {*} thisArg The `this` binding of `func`.
1907       * @param {Array} args The arguments to invoke `func` with.
1908       * @returns {*} Returns the result of `func`.
1909       */
1910function apply(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}
1910e.exports=apply},function(e,t,n){var r=n(394),o=n(193);
1911/**
1912       * Sets the `toString` method of `func` to return `string`.
1913       *
1914       * @private
1915       * @param {Function} func The function to modify.
1916       * @param {Function} string The `toString` result.
1917       * @returns {Function} Returns `func`.
1918       */var i=o(r);e.exports=i},function(e,t,n){var r=n(51),o=n(24),i=n(66),a=n(9);
1919/**
1920       * Checks if the given arguments are from an iteratee call.
1921       *
1922       * @private
1923       * @param {*} value The potential iteratee value argument.
1924       * @param {*} index The potential iteratee index or key argument.
1925       * @param {*} object The potential iteratee object argument.
1926       * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
1927       *  else `false`.
1928       */function isIterateeCall(e,t,n){if(!a(n))return false;var s=typeof t;return!!("number"==s?o(n)&&i(t,n.length):"string"==s&&t in n)&&r(n[t],e)}e.exports=isIterateeCall},function(e,t,n){e.exports=n(195)()?Object.setPrototypeOf:n(196)},function(e,t,n){var r=n(54);var o={object:true,function:true,undefined:true};e.exports=function(e){return!!r(e)&&hasOwnProperty.call(o,typeof e)}},function(e,t,n){e.exports=n(405)()?Object.assign:n(406)},function(e,t,n){const r=n(1)("Event");const o=n(7);const i=n(127);e.exports=function(){function Event(e,t,n){void 0===t&&(t=true);void 0===n&&(n={});(this||_global3).type=e;(this||_global3).cancelable=t;(this||_global3)._defaultPrevented=false;const r=i(Object.keys(this||_global3),Object.keys(n));if(r.length>0)throw new Error(`Cannot used reserved property names: ${r.join(",")}`);o(this||_global3,n)}var e=Event.prototype;e.preventDefault=function preventDefault(){(this||_global3).cancelable?(this||_global3)._defaultPrevented=true:r.warn("Event.preventDefault :: Trying to preventDefault on an event that isn't cancelable")};e.isDefaultPrevented=function isDefaultPrevented(){return(this||_global3)._defaultPrevented};return Event}()},function(e,t,n){var r=n(33),o=n(446),i=n(87),a=n(452);
1929/**
1930       * Creates an array of unique values that are included in all given arrays
1931       * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1932       * for equality comparisons. The order and references of result values are
1933       * determined by the first array.
1934       *
1935       * @static
1936       * @memberOf _
1937       * @since 0.1.0
1938       * @category Array
1939       * @param {...Array} [arrays] The arrays to inspect.
1940       * @returns {Array} Returns the new array of intersecting values.
1941       * @example
1942       *
1943       * _.intersection([2, 1], [2, 3]);
1944       * // => [2]
1945       */var s=i((function(e){var t=r(e,a);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=s},function(e,t){
1946/**
1947       * This function is like `arrayIncludes` except that it accepts a comparator.
1948       *
1949       * @private
1950       * @param {Array} [array] The array to inspect.
1951       * @param {*} target The value to search for.
1952       * @param {Function} comparator The comparator invoked per element.
1953       * @returns {boolean} Returns `true` if `target` is found, else `false`.
1954       */
1955function arrayIncludesWith(e,t,n){var r=-1,o=null==e?0:e.length;while(++r<o)if(n(t,e[r]))return true;return false}e.exports=arrayIncludesWith},function(e,t,n){var r=n(24),o=n(16);
1956/**
1957       * This method is like `_.isArrayLike` except that it also checks if `value`
1958       * is an object.
1959       *
1960       * @static
1961       * @memberOf _
1962       * @since 4.0.0
1963       * @category Lang
1964       * @param {*} value The value to check.
1965       * @returns {boolean} Returns `true` if `value` is an array-like object,
1966       *  else `false`.
1967       * @example
1968       *
1969       * _.isArrayLikeObject([1, 2, 3]);
1970       * // => true
1971       *
1972       * _.isArrayLikeObject(document.body.children);
1973       * // => true
1974       *
1975       * _.isArrayLikeObject('abc');
1976       * // => false
1977       *
1978       * _.isArrayLikeObject(_.noop);
1979       * // => false
1980       */function isArrayLikeObject(e){return o(e)&&r(e)}e.exports=isArrayLikeObject},function(e,t){
1981/**
1982       * The default argument placeholder value for methods.
1983       *
1984       * @type {Object}
1985       */
1986e.exports={}},function(e,t,n){var r=n(216),o=n(475),i=n(476),a=n(218),s=n(487),c=n(222),l=n(488),u=n(225),d=n(226),f=n(96);var p="Expected a function";var g=1,h=2,b=8,v=16,m=32,_=64;var y=Math.max;
1987/**
1988       * Creates a function that either curries or invokes `func` with optional
1989       * `this` binding and partially applied arguments.
1990       *
1991       * @private
1992       * @param {Function|string}
1992 func The function or method name to wrap.
1993       * @param {number} bitmask The bitmask flags.
1994       *    1 - `_.bind`
1995       *    2 - `_.bindKey`
1996       *    4 - `_.curry` or `_.curryRight` of a bound function
1997       *    8 - `_.curry`
1998       *   16 - `_.curryRight`
1999       *   32 - `_.partial`
2000       *   64 - `_.partialRight`
2001       *  128 - `_.rearg`
2002       *  256 - `_.ary`
2003       *  512 - `_.flip`
2004       * @param {*} [thisArg] The `this` binding of `func`.
2005       * @param {Array} [partials] The arguments to be partially applied.
2006       * @param {Array} [holders] The `partials` placeholder indexes.
2007       * @param {Array} [argPos] The argument positions of the new function.
2008       * @param {number} [ary] The arity cap of `func`.
2009       * @param {number} [arity] The arity of `func`.
2010       * @returns {Function} Returns the new wrapped function.
2011       */function createWrap(e,t,n,E,S,T,C,w){var O=t&h;if(!O&&"function"!=typeof e)throw new TypeError(p);var x=E?E.length:0;if(!x){t&=~(m|_);E=S=void 0}C=void 0===C?C:y(f(C),0);w=void 0===w?w:f(w);x-=S?S.length:0;if(t&_){var I=E,A=S;E=S=void 0}var R=O?void 0:c(e);var k=[e,t,n,E,S,I,A,T,C,w];R&&l(k,R);e=k[0];t=k[1];n=k[2];E=k[3];S=k[4];w=k[9]=void 0===k[9]?O?0:e.length:y(k[9]-x,0);!w&&t&(b|v)&&(t&=~(b|v));if(t&&t!=g)D=t==b||t==v?i(e,t,w):t!=m&&t!=(g|m)||S.length?a.apply(void 0,k):s(e,t,n,E);else var D=o(e,t,n);var N=R?r:u;return d(N(D,k),e,t)}e.exports=createWrap},function(e,t,n){var r=n(86),o=n(133);var i=4294967295;
2012/**
2013       * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
2014       *
2015       * @private
2016       * @constructor
2017       * @param {*} value The value to wrap.
2018       */function LazyWrapper(e){(this||_global3).__wrapped__=e;(this||_global3).__actions__=[];(this||_global3).__dir__=1;(this||_global3).__filtered__=false;(this||_global3).__iteratees__=[];(this||_global3).__takeCount__=i;(this||_global3).__views__=[]}LazyWrapper.prototype=r(o.prototype);LazyWrapper.prototype.constructor=LazyWrapper;e.exports=LazyWrapper},function(e,t){function baseLodash(){}e.exports=baseLodash},function(e,t){var n="__lodash_placeholder__";
2019/**
2020       * Replaces all `placeholder` elements in `array` with an internal placeholder
2021       * and returns an array of their indexes.
2022       *
2023       * @private
2024       * @param {Array} array The array to modify.
2025       * @param {*} placeholder The placeholder to replace.
2026       * @returns {Array} Returns the new array of placeholder indexes.
2027       */function replaceHolders(e,t){var r=-1,o=e.length,i=0,a=[];while(++r<o){var s=e[r];if(s===t||s===n){e[r]=n;a[i++]=r}}return a}e.exports=replaceHolders},function(e,t,n){var r=n(29),o=n(117),i=n(16);var a="[object Object]";var s=Function.prototype,c=Object.prototype;var l=s.toString;var u=c.hasOwnProperty;var d=l.call(Object);
2028/**
2029       * Checks if `value` is a plain object, that is, an object created by the
2030       * `Object` constructor or one with a `[[Prototype]]` of `null`.
2031       *
2032       * @static
2033       * @memberOf _
2034       * @since 0.8.0
2035       * @category Lang
2036       * @param {*} value The value to check.
2037       * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
2038       * @example
2039       *
2040       * function Foo() {
2041       *   this.a = 1;
2042       * }
2043       *
2044       * _.isPlainObject(new Foo);
2045       * // => false
2046       *
2047       * _.isPlainObject([1, 2, 3]);
2048       * // => false
2049       *
2050       * _.isPlainObject({ 'x': 0, 'y': 0 });
2051       * // => true
2052       *
2053       * _.isPlainObject(Object.create(null));
2054       * // => true
2055       */function isPlainObject(e){if(!i(e)||r(e)!=a)return false;var t=o(e);if(null===t)return true;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==d}e.exports=isPlainObject},function(e,t,n){var r=n(10),o=n(71);var i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;
2056/**
2057       * Checks if `value` is a property name and not a property path.
2058       *
2059       * @private
2060       * @param {*} value The value to check.
2061       * @param {Object} [object] The object to query keys on.
2062       * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2063       */function isKey(e,t){if(r(e))return false;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}e.exports=isKey},function(e,t,n){var r=n(511),o=n(192),i=n(121);
2064/**
2065       * A specialized version of `baseRest` which flattens the rest array.
2066       *
2067       * @private
2068       * @param {Function} func The function to apply a rest parameter to.
2069       * @returns {Function} Returns the new function.
2070       */function flatRest(e){return i(o(e,void 0,r),e+"")}e.exports=flatRest},function(e,t,n){const r=n(239);const stripTrailingSlash=e=>e.replace(/\/$/,"");const prependProxyToUrlIfNeeded=(e,t)=>{if(!t)return e;const n=r.parse(t);const o=r.parse(e);if(!n.protocol||!o.protocol)return e;const i=n.protocol.match(/^https/);const a=o.protocol.match(/^ws/i);const s=(a?"ws":"http")+(i?"s":"");const c=stripTrailingSlash(`${s}://${n.host}${n.pathname}`);const l=stripTrailingSlash(`${o.host}${o.pathname}${o.search||""}`);return`${c}/${l}`};e.exports={prependProxyToUrlIfNeeded:prependProxyToUrlIfNeeded}},function(e,t,n){const r=n(20);const o=n(11);const i=n(4);const a=n(8);const s=n(21);let c;const l={SET_PROXY_URL_TIMING_ERROR:"The proxyUrl was set after a session or publisher was created.",PROXY_URL_ALREADY_SET_ERROR:"The proxyUrl has already been set. Setting it again will not have any effect."};e.exports={errorMessages:l,setProxyUrl:e=>{const t=n(27);const u=n(72);const d=new t;const f=r.sessions.length()>0;const p=r.publishers.length()>0;let g;if(f){const e=r.sessions.find((e=>"connected"===e.currentState));g=e?e.sessionId:r.sessions.find().sessionId}else g="";const h={sessionId:g,apiKey:u.value};if(p||f){const e=o()(i.SET_PROXY_URL_TIMING_ERROR,new Error(l.SET_PROXY_URL_TIMING_ERROR),a.SET_PROXY_URL_TIMING_ERROR);s.handleJsException({error:e,target:h,analytics:d})}else if(c){const e=o()(i.PROXY_URL_ALREADY_SET_ERROR,new Error(l.PROXY_URL_ALREADY_SET_ERROR),a.PROXY_URL_ALREADY_SET_ERROR);s.handleJsException({error:e,target:h,analytics:d})}else c=e},getProxyUrl:()=>c,clearProxyUrl:()=>{c=null}}},function(e,t,n){var r=n(87),o=n(51),i=n(122),a=n(52);var s=Object.prototype;var c=s.hasOwnProperty;
2071/**
2072       * Assigns own and inherited enumerable string keyed properties of source
2073       * objects to the destination object for all destination properties that
2074       * resolve to `undefined`. Source objects are applied from left to right.
2075       * Once a property is set, additional values of the same property are ignored.
2076       *
2077       * **Note:** This method mutates `object`.
2078       *
2079       * @static
2080       * @since 0.1.0
2081       * @memberOf _
2082       * @category Object
2083       * @param {Object} object The destination object.
2084       * @param {...Object} [sources] The source objects.
2085       * @returns {Object} Returns `object`.
2086       * @see _.defaultsDeep
2087       * @example
2088       *
2089       * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
2090       * // => { 'a': 1, 'b': 2 }
2091       */var l=r((function(e,t){e=Object(e);var n=-1;var r=t.length;var l=r>2?t[2]:void 0;l&&i(t[0],t[1],l)&&(r=1);while(++n<r){var u=t[n];var d=a(u);var f=-1;var p=d.length;while(++f<p){var g=d[f];var h=e[g];(void 0===h||o(h,s[g])&&!c.call(e,g))&&(e[g]=u[g])}}return e}));e.exports=l},function(e,t,n){var r=n(3);var o=r(n(45));const i=n(56);const a=n(55);
2092/**
2093       * Provides an interface around the raw session info from Anvil
2094       *
2095       * @class SessionInfo
2096       * @param {Object} rawSessionInfo The raw session info from Anvil
2097       *
2098       */let s=function(){function SessionInfo(e){void 0===e&&(e={});Object.defineProperty(this||_global3,"_rawSessionInfo",{value:a(e)})}
2099/**
2100         * @type {String}
2101         * @readonly
2102         */(0,o.default)(SessionInfo,[{key:"sessionId",get:function get(){return(this||_global3)._rawSessionInfo.session_id}
2103/**
2104           * @type {String}
2105           * @readonly
2106           */},{key:"partnerId",get:function get(){return(this||_global3)._rawSessionInfo.partner_id}
2107/**
2108           * @type {String}
2109           * @readonly
2110           */},{key:"messagingServer",get:function get(){return(this||_global3)._rawSessionInfo.messaging_server_url}
2111/**
2112           * @type {String}
2113           * @readonly
2114           */},{key:"mediaServerName",get:function get(){return(this||_global3)._rawSessionInfo.media_server_hostname}
2115/**
2116           * @type {String}
2117           * @readonly
2118           */},{key:"messagingURL",get:function get(){return(this||_global3)._rawSessionInfo.messaging_url}
2119/**
2120           * @type {String}
2121           * @readonly
2122           */},{key:"symphonyAddress",get:function get(){return(this||_global3)._rawSessionInfo.symphony_address}
2123/**
2124           * @type {Array}
2125           * @readonly
2126           */},{key:"iceServers",get:function get(){return(this||_global3)._rawSessionInfo.ice_servers}
2127/**
2128           * Simulcast is tri-state:
2129           * * true - simulcast is on for this session
2130           * * false - simulcast is off for this session
2131           * * undefined - the developer can choose
2132           * @type {Boolean|Undefined}
2133           * @readonly
2134           */},{key:"simulcast",get:function get(){return i((this||_global3)._rawSessionInfo,"properties.simulcast")}
2135/**
2136           * @type {Boolean}
2137           * @readonly
2138           */},{key:"reconnection",get:function get(){return i((this||_global3)._rawSessionInfo,"properties.reconnection",false)}
2139/**
2140           * @type {Boolean}
2141           * @readonly
2142           */},{key:"renegotiation",get:function get(){return i((this||_global3)._rawSessionInfo,"properties.renegotiation",false)}
2143/**
2144           * @type {Boolean}
2145           * @readonly
2146           */},{key:"p2pEnabled",get:function get(){return"enabled"===i((this||_global3)._rawSessionInfo,"properties.p2p.preference.value")}
2147/**
2148           * @type {Boolean}
2149           * @readonly
2150           */},{key:"hybridSession",get:function get(){return i((this||_global3)._rawSessionInfo,"properties.hybridSession",false)}
2151/**
2152           * @type {Boolean}
2153           * @readonly
2154           */},{key:"isAdaptiveEnabled",get:function get(){return"adaptive"===i((this||_global3)._rawSessionInfo,"properties.p2p.preference.value")}
2155/**
2156           * If this contains a valid codec, it will be prioritized
2157           *
2158           * @type {String}
2159           * @readonly
2160           */},{key:"priorityVideoCodec",get:function get(){return i((this||_global3)._rawSessionInfo,"properties.priorityVideoCodec","")}
2161/**
2162           * Is true if H264 codec is enabled
2163           *
2164           * @type {Boolean}
2165           * @readonly
2166           */},{key:"h264",get:function get(){return i((this||_global3)._rawSessionInfo,"properties.h264",true)}
2167/**
2168           * Is true if VP8 codec is enabled
2169           *
2170           * @type {Boolean}
2171           * @readonly
2172           */},{key:"vp8",get:function get(){return i((this||_global3)._rawSessionInfo,"properties.vp8",true)}
2173/**
2174           * Is true if VP9 codec is enabled
2175           *
2176           * @type {Boolean}
2177           * @readonly
2178           */},{key:"vp9",get:function get(){return i((this||_global3)._rawSessionInfo,"properties.vp9",true)}
2179/**
2180           * clientCandidates can be "relay". Other values are unknown.
2181           *
2182           * @type {String|Undefined}
2183           * @readonly
2184           */},{key:"clientCandidates",get:function get(){const e=i((this||_global3)._rawSessionInfo,"properties.clientCandidates");return"relayed"===e?"relay":e}}]);return SessionInfo}();e.exports=s},function(module,exports,__webpack_require__){const extendES5Native=__webpack_require__(546);const webrtcAdapter=__webpack_require__(547);const logging=__webpack_require__(1)("createWindowMock");const env=__webpack_require__(2);const windowKeys=[{key:"location",type:"object"},{key:"setTimeout",type:"function"},{key:"requestAnimationFrame",type:"function"},{key:"URL",type:"function"},{key:"MediaStream",type:"class"},{key:"webkitMediaStream",type:"class"},{key:"RTCIceCandidate",type:"class"},{key:"mozRTCIceCandidate",type:"class"},{key:"RTCSessionDescription",type:"class"},{key:"mozRTCSessionDescription",type:"class"},{key:"RTCIceGatherer",type:"class"},{key:"RTCIceTransport",type:"class"},{key:"RTCDtlsTransport",type:"class"},{key:"RTCSctpTransport",type:"class"},{key:"RTCRtpReceiver",type:"class"},{key:"HTMLMediaElement",type:"class"},{key:"RTCPeerConnection",type:"class"},{key:"webkitRTCPeerConnection",type:"class"},{key:"mozRTCPeerConnection",type:"class"},{key:"MediaStreamTrack",type:"class"},{key:"RTCRtpSender",type:"class"},{key:"RTCTrackEvent",type:"class"},{key:"RTCTransceiver",type:"class"},{key:"RTCDtmfSender",type:"class"},{key:"RTCDTMFSender",type:"class"},{key:"MediaStreamTrackEvent",type:"class"}];const navigatorKeys=[{key:"userAgent",type:"string"},{key:"getUserMedia",type:"function"},{key:"getDisplayMedia",type:"function"},{key:"webkitGetUserMedia",type:"function"},{key:"mozGetUserMedia",type:"function"}];const mediaDevicesKeys=[{key:"getUserMedia",type:"function"},{key:"getDisplayMedia",type:"function"},{key:"enumerateDevices",type:"function"},{key:"getSupportedConstraints",type:"function"},{key:"addEventListener",type:"function"},{key:"removeEventListener",type:"function"}];const bindWithStaticProperties=(e,t)=>{if("function"!==typeof t){logging.warn("Non-function passed into bindWithStaticProperties()");return t}const n=t.bind(e);Object.keys(t).forEach((e=>{n[e]=t[e]}));return n};const extendParentClass=ParentClass=>{try{const ChildClass=eval('\n      "use strict"; // Chrome<49 requires strict mode\n\n      const getOwnProperties = (target) => {\n        const properties = {};\n        Object.getOwnPropertyNames(target).forEach((key) => {\n          properties[key] = Object.getOwnPropertyDescriptor(target, key);\n        });\n        return properties;\n      };\n\n      class ChildClass extends ParentClass {\n        constructor(...args) {\n          super(...args);\n          try {\n            this.__proto__ = ChildClass.prototype;\n          } catch (e) {}\n        }\n      };\n\n      Object.defineProperties(ChildClass.prototype, getOwnProperties(ParentClass.prototype));\n      Object.keys(ParentClass)\n        .forEach((staticKey) => {\n          ChildClass[staticKey] = ParentClass[staticKey];\n        });\n\n      ChildClass; // Ensure the final statement is returned in FF\n    ');if(ChildClass&&ChildClass.prototype instanceof ParentClass)return ChildClass}catch(e){}return null};const canUseES6Class=e=>{const t=e.RTCPeerConnection||e.webkitRTCPeerConnection||e.mozRTCPeerConnection;const n=extendParentClass(t);if(n)try{n.prototype.foo="bar";const e=new n({iceServers:[]});const t="bar"===e.foo;try{e.close()}catch(e){}return t}catch(e){}return false};const extendClass=(e,t,n)=>{if("function"!==typeof e){logging.warn("Non-function passed into extendClass()");return e}let r=n&&extendParentClass(e);r||(r=extendES5Native(e));return r};const getCopyProperties=e=>(t,n,r)=>{r.forEach((r=>{let o=r.key,i=r.type;let a=n[o];if(void 0!==a){switch(i){case"function":a=bindWithStaticProperties(n,a);break;case"class":a=extendClass(a,o,e);break;case"string":case"object":break;default:throw new Error(`Invalid type of window key: ${i}`)}t[o]=a}}))};const cloneWindow=e=>{const t={};const n=getCopyProperties(canUseES6Class(e));n(t,e,windowKeys);if(void 0!==e.navigator){t.navigator={};n(t.navigator,e.navigator,navigatorKeys);if(void 0!==e.navigator.mediaDevices){t.navigator.mediaDevices={};n(t.navigator.mediaDevices,e.navigator.mediaDevices,mediaDevicesKeys)}}return t};module.exports=function createWindowMock(e){if(void 0!==e.adapter||env.isLegacyEdge)return e;const t=cloneWindow(e);webrtcAdapter({window:t});return t}},function(e,t,n){e.exports=function AudioLevelTransformer(){let e=null;
2185/*
2186         *
2187         * @param {number} audioLevel a level in the [0,1] range
2188         * @returns {number} a level in the [0,1] range transformed
2189         */(this||_global3).transform=t=>{e=null===e||t>=e?t:.3*t+.7*e;const n=Math.log(e)/Math.LN10/1.5+1;return Math.min(Math.max(n,0),1)}}},function(e,t,n){const r=n(6);const values=e=>Object.keys(e).map((t=>e[t]));const o=n(7);e.exports=function Chrome(e){const t={};
2189const _set=(n,r)=>{o(r,{parent:this||_global3});r.appendTo(e.parent);t[n]=r;(this||_global3)[n]=r};if(e.parent){r(this||_global3);(this||_global3).destroy=()=>{this.off();this.hideWhileLoading();values(t).forEach((e=>e.destroy()))};(this||_global3).showAfterLoading=()=>{values(t).forEach((e=>e.showAfterLoading()))};(this||_global3).hideWhileLoading=()=>{values(t).forEach((e=>e.hideWhileLoading()))};(this||_global3).set=(e,t)=>{"string"===typeof e&&t?_set(e,t):Object.keys(e).forEach((t=>{_set(t,e[t])}));return this||_global3}}}},function(e,t,n){var r=n(3);var o=r(n(18));var i;
2190/*
2191       * An <code>AudioContext</code> based audio level sampler. It returns the maximum value in the
2192       * last 1024 samples.
2193       *
2194       * It is worth noting that the remote <code>MediaStream</code> audio analysis is currently only
2195       * available in FF.
2196       *
2197       * This implementation gracefully handles the case where the <code>MediaStream</code> has not
2198       * been set yet by returning a <code>null</code> value until the stream is set. It is up to the
2199       * call site to decide what to do with this value (most likely ignore it and retry later).
2200       *
2201       * @constructor
2202       * @param {AudioContext} audioContext an audio context instance to get an analyser node
2203       */e.exports=(i=function(){function WebAudioAudioLevelSampler(e){(0,o.default)(this||_global3,"_analyser",null);(0,o.default)(this||_global3,"_timeDomainData",null);(0,o.default)(this||_global3,"_sourceNode",null);(this||_global3)._audioContext=e}var e=WebAudioAudioLevelSampler.prototype;e._initAudioAnalyser=function _initAudioAnalyser(e){(this||_global3)._analyser=(this||_global3)._audioContext.createAnalyser();(this||_global3)._sourceNode=(this||_global3)._audioContext.createMediaStreamSource(e);(this||_global3)._sourceNode.connect((this||_global3)._analyser);(this||_global3)._timeDomainData=new Uint8Array((this||_global3)._analyser.frequencyBinCount)};e.webRTCStream=function webRTCStream(e){(this||_global3)._sourceNode&&(this||_global3)._sourceNode.disconnect((this||_global3)._analyser);"suspended"===(this||_global3)._audioContext.state&&(this||_global3)._audioContext.resume();this._initAudioAnalyser(e)};e.destroy=function destroy(){(this||_global3)._sourceNode&&(this||_global3)._sourceNode.disconnect((this||_global3)._analyser);(this||_global3)._timeDomainData=null};e.sample=function sample(e){if("function"===typeof e)throw new Error("sample no longer takes a callback");if((this||_global3)._analyser&&(this||_global3)._timeDomainData){(this||_global3)._analyser.getByteTimeDomainData((this||_global3)._timeDomainData);let e=0;for(let t=(this||_global3)._timeDomainData.length-1;t>=0;t-=1)e=Math.max(e,Math.abs((this||_global3)._timeDomainData[t]-128));return e/128}return null};return WebAudioAudioLevelSampler}(),i)},function(e,t,n){const r=n(558);const o=n(26);const i=n(6);const a=n(22)();function EnvironmentLoader(){const e=this||_global3;i(e);function isReady(){return r.isDomLoaded()&&!r.isDomUnloaded()}function onLoaded(){isReady()&&e.dispatchEvent(new a.EnvLoadedEvent(o.ENV_LOADED))}function onDomReady(){r.whenUnloaded.then(onDomUnload);onLoaded()}function onDomUnload(){e.dispatchEvent(new a.EnvLoadedEvent(o.ENV_UNLOADED))}r.whenLoaded.then(onDomReady);(this||_global3).onLoad=function(t,n){isReady()?t.call(n):e.on(o.ENV_LOADED,t,n)};(this||_global3).onUnload=function(t,n){this.isUnloaded()?t.call(n):e.on(o.ENV_UNLOADED,t,n)};(this||_global3).isUnloaded=function(){return r.isDomUnloaded()}}e.exports=new EnvironmentLoader},function(e,t,n){var r=n(559),o=n(191);
2204/**
2205       * This method is like `_.assign` except that it recursively merges own and
2206       * inherited enumerable string keyed properties of source objects into the
2207       * destination object. Source properties that resolve to `undefined` are
2208       * skipped if a destination value exists. Array and plain object properties
2209       * are merged recursively. Other objects and value types are overridden by
2210       * assignment. Source objects are applied from left to right. Subsequent
2211       * sources overwrite property assignments of previous sources.
2212       *
2213       * **Note:** This method mutates `object`.
2214       *
2215       * @static
2216       * @memberOf _
2217       * @since 0.5.0
2218       * @category Object
2219       * @param {Object} object The destination object.
2220       * @param {...Object} [sources] The source objects.
2221       * @returns {Object} Returns `object`.
2222       * @example
2223       *
2224       * var object = {
2225       *   'a': [{ 'b': 2 }, { 'd': 4 }]
2226       * };
2227       *
2228       * var other = {
2229       *   'a': [{ 'c': 3 }, { 'e': 5 }]
2230       * };
2231       *
2232       * _.merge(object, other);
2233       * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
2234       */var i=o((function(e,t,n){r(e,t,n)}));e.exports=i},function(e,t,n){var r=n(563);
2235/*!
2236       * The buffer module from node.js, for the browser.
2237       *
2238       * @author   Feross Aboukhadijeh <[email protected]> <http://feross.org>
2239       * @license  MIT
2240       */function compare(e,t){if(e===t)return 0;var n=e.length;var r=t.length;for(var o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o];r=t[o];break}return n<r?-1:r<n?1:0}function isBuffer(e){return(void 0!==typeof window?window:_global3).Buffer&&"function"===typeof(void 0!==typeof window?window:_global3).Buffer.isBuffer?(void 0!==typeof window?window:_global3).Buffer.isBuffer(e):!!(null!=e&&e._isBuffer)}var o=n(564);var i=Object.prototype.hasOwnProperty;var a=Array.prototype.slice;var s=function(){return"foo"===function foo(){}.name}();function pToString(e){return Object.prototype.toString.call(e)}function isView(e){return!isBuffer(e)&&("function"===typeof(void 0!==typeof window?window:_global3).ArrayBuffer&&("function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var c=e.exports=ok;var l=/\s*function\s+([^\(\s]*)\s*/;function getName(e){if(o.isFunction(e)){if(s)return e.name;var t=e.toString();var n=t.match(l);return n&&n[1]}}c.AssertionError=function AssertionError(e){(this||_global3).name="AssertionError";(this||_global3).actual=e.actual;(this||_global3).expected=e.expected;(this||_global3).operator=e.operator;if(e.message){(this||_global3).message=e.message;(this||_global3).generatedMessage=false}else{(this||_global3).message=getMessage(this||_global3);(this||_global3).generatedMessage=true}var t=e.stackStartFunction||fail;if(Error.captureStackTrace)Error.captureStackTrace(this||_global3,t);else{var n=new Error;if(n.stack){var r=n.stack;var o=getName(t);var i=r.indexOf("\n"+o);if(i>=0){var a=r.indexOf("\n",i+1);r=r.substring(a+1)}(this||_global3).stack=r}}};o.inherits(c.AssertionError,Error);function truncate(e,t){return"string"===typeof e?e.length<t?e:e.slice(0,t):e}function inspect(e){if(s||!o.isFunction(e))return o.inspect(e);var t=getName(e);var n=t?": "+t:"";return"[Function"+n+"]"}
2240function getMessage(e){return truncate(inspect(e.actual),128)+" "+e.operator+" "+truncate(inspect(e.expected),128)}function fail(e,t,n,r,o){throw new c.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:o})}c.fail=fail;function ok(e,t){e||fail(e,true,t,"==",c.ok)}c.ok=ok;c.equal=function equal(e,t,n){e!=t&&fail(e,t,n,"==",c.equal)};c.notEqual=function notEqual(e,t,n){e==t&&fail(e,t,n,"!=",c.notEqual)};c.deepEqual=function deepEqual(e,t,n){_deepEqual(e,t,false)||fail(e,t,n,"deepEqual",c.deepEqual)};c.deepStrictEqual=function deepStrictEqual(e,t,n){_deepEqual(e,t,true)||fail(e,t,n,"deepStrictEqual",c.deepStrictEqual)};function _deepEqual(e,t,n,r){if(e===t)return true;if(isBuffer(e)&&isBuffer(t))return 0===compare(e,t);if(o.isDate(e)&&o.isDate(t))return e.getTime()===t.getTime();if(o.isRegExp(e)&&o.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"===typeof e||null!==t&&"object"===typeof t){if(isView(e)&&isView(t)&&pToString(e)===pToString(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===compare(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(isBuffer(e)!==isBuffer(t))return false;r=r||{actual:[],expected:[]};var i=r.actual.indexOf(e);if(-1!==i&&i===r.expected.indexOf(t))return true;r.actual.push(e);r.expected.push(t);return objEquiv(e,t,n,r)}return n?e===t:e==t}function isArguments(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function objEquiv(e,t,n,r){if(null===e||void 0===e||null===t||void 0===t)return false;if(o.isPrimitive(e)||o.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return false;var i=isArguments(e);var s=isArguments(t);if(i&&!s||!i&&s)return false;if(i){e=a.call(e);t=a.call(t);return _deepEqual(e,t,n)}var c=u(e);var l=u(t);var d,f;if(c.length!==l.length)return false;c.sort();l.sort();for(f=c.length-1;f>=0;f--)if(c[f]!==l[f])return false;for(f=c.length-1;f>=0;f--){d=c[f];if(!_deepEqual(e[d],t[d],n,r))return false}return true}c.notDeepEqual=function notDeepEqual(e,t,n){_deepEqual(e,t,false)&&fail(e,t,n,"notDeepEqual",c.notDeepEqual)};c.notDeepStrictEqual=notDeepStrictEqual;function notDeepStrictEqual(e,t,n){_deepEqual(e,t,true)&&fail(e,t,n,"notDeepStrictEqual",notDeepStrictEqual)}c.strictEqual=function strictEqual(e,t,n){e!==t&&fail(e,t,n,"===",c.strictEqual)};c.notStrictEqual=function notStrictEqual(e,t,n){e===t&&fail(e,t,n,"!==",c.notStrictEqual)};function expectedException(e,t){if(!e||!t)return false;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return true}catch(e){}return!Error.isPrototypeOf(t)&&true===t.call({},e)}function _tryBlock(e){var t;try{e()}catch(e){t=e}return t}function _throws(e,t,n,r){var i;if("function"!==typeof t)throw new TypeError('"block" argument must be a function');if("string"===typeof n){r=n;n=null}i=_tryBlock(t);r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:".");e&&!i&&fail(i,n,"Missing expected exception"+r);var a="string"===typeof r;var s=!e&&o.isError(i);var c=!e&&i&&!n;(s&&a&&expectedException(i,n)||c)&&fail(i,n,"Got unwanted exception"+r);if(e&&i&&n&&!expectedException(i,n)||!e&&i)throw i}c.throws=function(e,t,n){_throws(true,e,t,n)};c.doesNotThrow=function(e,t,n){_throws(false,e,t,n)};c.ifError=function(e){if(e)throw e};function strict(e,t){e||fail(e,true,t,"==",strict)}c.strict=r(strict,c,{equal:c.strictEqual,deepEqual:c.deepStrictEqual,notEqual:c.notStrictEqual,notDeepEqual:c.notDeepStrictEqual});c.strict.strict=c.strict;var u=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}},function(e,t,n){const r=n(268);const o=n(6);const i=n(1)("StreamChannel");const a=n(150)();e.exports=function StreamChannel(e){(this||_global3).id=e.id;(this||_global3).type=e.type;(this||_global3).active=r(e.active);(this||_global3).orientation=e.orientation||a.ROTATED_NORMAL;e.frameRate&&((this||_global3).frameRate=parseFloat(e.frameRate));e.preferredFrameRate&&((this||_global3).preferredFrameRate=parseFloat(e.preferredFrameRate));e.preferredWidth&&((this||_global3).preferredWidth=parseInt(e.preferredWidth,10));e.preferredHeight&&((this||_global3).preferredHeight=parseInt(e.preferredHeight,10));(this||_global3).width=parseInt(e.width,10);(this||_global3).height=parseInt(e.height,10);(this||_global3).source=e.source||"camera";(this||_global3).fitMode=e.fitMode||"cover";o(this||_global3);(this||_global3).update=function(e){const t={};const n={};for(const o in e){if(!e.hasOwnProperty(o))continue;const a=(this||_global3)[o];switch(o){case"active":(this||_global3).active=r(e[o]);break;case"disableWarning":(this||_global3).disableWarning=r(e[o]);break;case"frameRate":(this||_global3).frameRate=parseFloat(e[o],10);break;case"width":case"height":(this||_global3)[o]=parseInt(e[o],10);t[o]=(this||_global3)[o];n[o]=a;break;case"orientation":(this||_global3)[o]=e[o];t[o]=(this||_global3)[o];n[o]=a;break;case"fitMode":(this||_global3)[o]=e[o];break;case"source":(this||_global3)[o]=e[o];break;default:i.warn(`Tried to update unknown key ${o} on ${(this||_global3).type} channel ${(this||_global3).id}`);return false}this.trigger("update",this||_global3,o,a,(this||_global3)[o])}Object.keys(t).length&&this.trigger("update",this||_global3,"videoDimensions",n,t);return true}}},function(e,t,n){e.exports=function videoOrientationFactory(){return{ROTATED_NORMAL:0,ROTATED_LEFT:270,ROTATED_RIGHT:90,ROTATED_UPSIDE_DOWN:180}}},function(e,t,n){const r=n(579);const o=n(1)("StylableComponent");const i=n(580);const a=n(581);e.exports=function StylableComponent(e,t,n,s){if(!e.trigger)throw new Error("OT.StylableComponent is dependent on the eventing mixin. Ensure that this is included in the object before StylableComponent.");
2240s=s||function(){};let c=false;const l=function onStyleChange(t,n,r){r?e.trigger("styleValueChanged",t,n,r):e.trigger("styleValueChanged",t,n)};if(false===n){t={buttonDisplayMode:"off",nameDisplayMode:"off",audioLevelDisplayMode:"off",videoDisabledDisplayMode:"off",audioBlockedDisplayMode:"off"};c=true;s({showControls:false})}const u=new i(t,l);e.getStyle=function(e){return u.get(e)};
2241/**
2242         * Sets properties that define the appearance of some user interface controls of the Publisher.
2243         *
2244         * <p>You can either pass one parameter or two parameters to this method.</p>
2245         *
2246         * <p>If you pass one parameter, <code>style</code>, it is an object that has the following
2247         * properties:
2248         *
2249         *     <ul>
2250         *       <li><code>audioLevelDisplayMode</code> (String) &mdash; How to display the audio level
2251         *       indicator. Possible values are: <code>"auto"</code> (the indicator is displayed when the
2252         *       video is disabled), <code>"off"</code> (the indicator is not displayed), and
2253         *       <code>"on"</code> (the indicator is always displayed).</li>
2254         *
2255         *       <li><code>archiveStatusDisplayMode</code> (String) &mdash; How to display the archive
2256         *       status indicator. Possible values are: <code>"auto"</code> (the indicator is displayed
2257         *       when the session is being recorded), <code>"off"</code> (the indicator is not displayed).
2258         *       If you disable the archive status display indicator, you can display your own user
2259         *       interface notifications based on the <code>archiveStarted</code> and
2260         *       <code>archiveStopped</code> events dispatched by the Session object.</li>
2261         *
2262         *       <li><code>backgroundImageURI</code> (String) &mdash; A URI for an image to display as
2263         *       the background image when a video is not displayed. (A video may not be displayed if
2264         *       you call <code>publishVideo(false)</code> on the Publisher object). You can pass an http
2265         *       or https URI to a PNG, JPEG, or non-animated GIF file location. You can also use the
2266         *       <code>data</code> URI scheme (instead of http or https) and pass in base-64-encrypted
2267         *       PNG data, such as that obtained from the <a href="Publisher.html#getImgData">
2268         *       Publisher.getImgData()</a> method (for example, you could call
2269         *       <code>myPublisher.setStyle("backgroundImageURI", myPublisher.getImgData())</code>).
2270         *       If the URL or the image data is invalid, the property is ignored (the attempt to set
2271         *       the image fails silently).</li>
2272         *
2273         *       <li><code>buttonDisplayMode</code> (String) &mdash; How to display the microphone
2274         *       controls. Possible values are: <code>"auto"</code> (controls are displayed when the
2275         *       stream is first displayed and when the user mouses over the display), <code>"off"</code>
2276         *       (controls are not displayed), and <code>"on"</code> (controls are always displayed).</li>
2277         *
2278         *       <li><code>nameDisplayMode</code> (String) &#151; Whether to display the stream name.
2279         *       Possible values are: <code>"auto"</code> (the name is displayed when the stream is first
2280         *       displayed and when the user mouses over the display), <code>"off"</code> (the name is not
2281         *       displayed), and <code>"on"</code> (the name is always displayed).</li>
2282         *   </ul>
2283         * </p>
2284         *
2285         * <p>For example, the following code passes one parameter to the method:</p>
2286         *
2287         * <pre>myPublisher.setStyle({nameDisplayMode: "off"});</pre>
2288         *
2289         * <p>If you pass two parameters, <code>style</code> and <code>value</code>, they are
2290         * key-value pair that define one property of the display style. For example, the following
2291         * code passes two parameter values to the method:</p>
2292         *
2293         * <pre>myPublisher.setStyle("nameDisplayMode", "off");</pre>
2294         *
2295         * <p>You can set the initial settings when you call the <code>Session.publish()</code>
2296         * or <code>OT.initPublisher()</code> method. Pass a <code>style</code> property as part of the
2297         * <code>properties</code> parameter of the method.</p>
2298         *
2299         * <p>The OT object dispatches an <code>exception</code> event if you pass in an invalid style
2300         * to the method. The <code>code</code> property of the ExceptionEvent object is set to 1011.</p>
2301         *
2302         * @param {Object} style Either an object containing properties that define the style, or a
2303         * String defining this single style property to set.
2304         * @param {String} value The value to set for the <code>style</code> passed in. Pass a value
2305         * for this parameter only if the value of the <code>style</code> parameter is a String.</p>
2306         *
2307         * @see <a href="#getStyle">getStyle()</a>
2308         * @return {Publisher} The Publisher object
2309         * @see <a href="#setStyle">setStyle()</a>
2310         *
2311         * @see <a href="Session.html#subscribe">Session.publish()</a>
2312         * @see <a href="OT.html#initPublisher">OT.initPublisher()</a>
2313         * @method #setStyle
2314         * @memberOf Publisher
2315         */
2316/**
2317         * Sets properties that define the appearance of some user interface controls of the Subscriber.
2318         *
2319         * <p>You can either pass one parameter or two parameters to this method.</p>
2320         *
2321         * <p>If you pass one parameter, <code>style</code>, it is an object that has the following
2322         * properties:
2323         *
2324         *     <ul>
2325         *       <li><code>audioBlockedDisplayMode</code> (String) &mdash; Whether to display
2326         *       the default audio blocked icon in Subscribers (in browsers where audio
2327         *       autoplay is blocked). Possible values are: <code>"auto"</code> (the default,
2328         *       icon is displayed when the audio is disabled) and <code>"off"</code> (the icon
2329         *       is not displayed). Set this to <code>"off"</code> if you want to display
2330         *       your own UI element showing that the audio is blocked. In response to an
2331         *       HTML element dispatching a <code>click</code> event, you can call the
2332         *       <a href="OT.html#unblockAudio">OT.unblockAudio()</a> method to start audio
2333         *       playback in this and all other blocked subscribers.</li>
2334         *
2335         *       <li><code>audioLevelDisplayMode</code> (String) &mdash; How to display the audio level
2336         *       indicator. Possible values are: <code>"auto"</code> (the indicator is displayed when the
2337         *       video is disabled), <code>"off"</code> (the indicator is not displayed), and
2338         *       <code>"on"</code> (the indicator is always displayed).</li>
2339         *
2340         *       <li><code>backgroundImageURI</code> (String) &mdash; A URI for an image to display as
2341         *       the background image when a video is not displayed. (A video may not be displayed if
2342         *       you call <code>subscribeToVideo(false)</code> on the Publisher object). You can pass an
2343         *       http or https URI to a PNG, JPEG, or non-animated GIF file location. You can also use the
2344         *       <code>data</code> URI scheme (instead of http or https) and pass in base-64-encrypted
2345         *       PNG data, such as that obtained from the <a href="Subscriber.html#getImgData">
2346         *       Subscriber.getImgData()</a> method (for example, you could call
2347         *       <code>mySubscriber.setStyle("backgroundImageURI", mySubscriber.getImgData())</code>).
2348         *       If the URL or the image data is invalid, the property is ignored (the attempt to set
2349         *       the image fails silently).</li>
2350         *
2351         *       <li><code>buttonDisplayMode</code> (String) &mdash; How to display the speaker
2352         *       controls. Possible values are: <code>"auto"</code> (controls are displayed when the
2353         *       stream is first displayed and when the user mouses over the display), <code>"off"</code>
2354         *       (controls are not displayed), and <code>"on"</code> (controls are always displayed).</li>
2355         *
2356         *       <li><code>nameDisplayMode</code> (String) &#151; Whether to display the stream name.
2357         *       Possible values are: <code>"auto"</code> (the name is displayed when the stream is first
2358         *       displayed and when the user mouses over the display), <code>"off"</code> (the name is not
2359         *       displayed), and <code>"on"</code> (the name is always displayed).</li>
2360         *
2361         *       <li><code>videoDisabledDisplayMode</code> (String) &#151; Whether to display the video
2362         *       disabled indicator and video disabled warning icons for a Subscriber. These icons
2363         *       indicate that the video has been disabled (or is in risk of being disabled for
2364         *       the warning icon) due to poor stream quality. Possible values are: <code>"auto"</code>
2365         *       (the icons are automatically when the displayed video is disabled or in risk of being
2366         *       disabled due to poor stream quality), <code>"off"</code> (do not display the icons), and
2367         *       <code>"on"</code> (display the icons).</li>
2368         *   </ul>
2369         * </p>
2370         *
2371         * <p>For example, the following code passes one parameter to the method:</p>
2372         *
2373         * <pre>mySubscriber.setStyle({nameDisplayMode: "off"});</pre>
2374         *
2375         * <p>If you pass two parameters, <code>style</code> and <code>value</code>, they are key-value
2376         * pair that define one property of the display style. For example, the following code passes
2377         * two parameter values to the method:</p>
2378         *
2379         * <pre>mySubscriber.setStyle("nameDisplayMode", "off");</pre>
2380         *
2381         * <p>You can set the initial settings when you call the <code>Session.subscribe()</code> method.
2382         * Pass a <code>style</code> property as part of the <code>properties</code> parameter of the
2383         * method.</p>
2384         *
2385         * <p>The OT object dispatches an <code>exception</code> event if you pass in an invalid style
2386         * to the method. The <code>code</code> property of the ExceptionEvent object is set to 1011.</p>
2387         *
2388         * @param {Object} style Either an object containing properties that define the style, or a
2389         * String defining this single style property to set.
2390         * @param {String} value The value to set for the <code>style</code> passed in. Pass a value
2391         * for this parameter only if the value of the <code>style</code> parameter is a String.</p>
2392         *
2393         * @returns {Subscriber} The Subscriber object.
2394         *
2395         * @see <a href="#getStyle">getStyle()</a>
2396         * @see <a href="#setStyle">setStyle()</a>
2397         *
2398         * @see <a href="Session.html#subscribe">Session.subscribe()</a>
2399         * @method #setStyle
2400         * @memberOf Subscriber
2401         */e.setStyle=function(e,t,n){if(c){o.warn("Calling setStyle() has no effect because theshowControls option was set to false");return this||_global3}let i;if("string"!==typeof e)i=e;else{i={};i[e]=t}i.backgroundImageURI&&(i.backgroundImageURI=r(i.backgroundImageURI));u.setAll(i,n);s(a(i));return this||_global3}}},function(e,t,n){const r=n(49);const o=n(44)();const i=n(27);const a=n(72);const s=n(146);const c=n(60).once;const l=n(584);const u=n(5);const d=n(1)("systemRequirements");const f=n(585);const p=n(586);const g=o.onlyLocal();const h=new i;const b=r((()=>{h.logEvent({action:"checkSystemRequirements",variation:"notHasRequirements",partnerId:a.value,payload:{userAgent:u.env.userAgent}})}));const v=r((()=>{n(587)()}));let m=false;e.exports={check(){d.debug("OT.checkSystemRequirements()");const e=Number(l&&c());v();e||b();return e},upgrade(e){let t=void 0===e?{}
2401:e,n=t.isSupportedButOld,r=void 0===n?u.env.name.toLowerCase()in g.minimumVersion:n,o=t.userAgent,i=void 0===o?navigator.userAgent:o;s.onLoad((()=>{if(m)return;const e=new p(f);m=true;e.on("close",(()=>{m=false}));e.open();let t;t=i.match(/(iPad|iPhone|iPod|android|webOS)/i)?(r?"supported-":"")+"mobile-browser":(r?"upgrade":"normal")+"-install";e.el(`#section-${t}`).style.display="block"}))}}},function(e,t,n){(function(t){var r=n(3);var o=r(n(59));var i=r(n(588));const a=n(592);let s=function(e){(0,o.default)(TimeoutError,e);function TimeoutError(t){var n;n=e.call(this||_global3,t)||this||_global3;n.name="TimeoutError";return n}return TimeoutError}((0,i.default)(Error));e.exports=(e,n,r)=>new t(((t,o)=>{if("number"!==typeof n||n<0)throw new TypeError("Expected `ms` to be a positive number");const i=setTimeout((()=>{if("function"===typeof r){try{t(r())}catch(a){o(a)}return}const i="string"===typeof r?r:`Promise timed out after ${n} milliseconds`;const a=r instanceof Error?r:new s(i);"function"===typeof e.cancel&&e.cancel();o(a)}),n);a(e.then(t,o),(()=>{clearTimeout(i)}))}));e.exports.TimeoutError=s}).call(this||_global3,n(0))},function(e,t,n){function createCleanupJobs(){const e=[];return{add(t){e.push(t)},remove(t){const n=e.indexOf(t);n>=0&&e.splice(n,1)},releaseAll(){const t=[];while(e.length>0){const n=e.pop();try{n()}catch(e){t.push(e)}}const n=t.length;if(n>0)throw new Error(`Failed to complete ${n} cleanup job${1===n?"":"s"}: ${t.map((e=>`<${e}>`)).join(", ")}`)}}}e.exports=createCleanupJobs},function(e,t,n){const r=n(1)("applySdpTransform");e.exports=(e,t,n,o,i)=>{const a=e[t][n];const s=`${t} ${n}`;const c="local offer"===s||"remote answer"===s?"publisher":"subscriber";const l=`sdpTransforms (${c}): ${t} ${n}`;const u="local"===t?"created":"received";r.debug(`${l}: ${u}:\n${i}`);const d=a(o,i);d.local===i?r.debug(`${l}: not modified`):r.debug(`${l}: modified to:\n${d.local}`);return d}},function(e,t){function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}e.exports=_assertThisInitialized},function(e,t,n){
2402/**
2403       * Calculates the video framerate based on current and last frames,
2404       * and current and last stat timestamp.
2405       *
2406       * @typedef {Object} videoFrameStatValues
2407       * @property {Number} currentStatFrames Frames taken from current stats.
2408       * @property {Number} currentTimestamp Timestamp taken from current stats.
2409       * @property {Number} prevStatFrames Frames taken from previous stats.
2410       * @property {Number} prevTimestamp Timestamp taken from previous stats.
2411       *
2412       * @param {Stats} frameStatValues
2413       * @returns {Number} Video frameRate
2414       */
2415const r=function calculateFrameRate(e){void 0===e&&(e={});if(!e)return 0;const t=e,n=t.currentStatFrames,r=void 0===n?0:n,o=t.prevStatFrames,i=void 0===o?0:o,a=t.currentTimestamp,s=void 0===a?0:a,c=t.prevTimestamp,l=void 0===c?0:c;if(r>=i&&s>l){const e=(r-i)/((s-l)/1e3);return Math.round(100*e)/100}return 0};e.exports=r},function(e,t,n){let r;e.exports=function audioContextFactory(e){void 0===e&&(e={});const t=e.AudioContext||(void 0!==typeof window?window:_global3).AudioContext||(void 0!==typeof window?window:_global3).webkitAudioContext;
2416/*
2417         * Lazy instantiates an audio context and always return the same instance on following calls
2418         *
2419         * @returns {AudioContext}
2420         */return function audioContext(){r=r||t&&new t;if(null==r)throw new Error("AudioContext could not be created, hardware limit reached.");return r}}},function(e,t,n){var r=n(3);t.__esModule=true;t.default=void 0;var o=r(n(56));const i=(0,o.default)(void 0!==typeof window?window:_global3,"navigator.getDisplayMedia",(0,o.default)(void 0!==typeof window?window:_global3,"navigator.mediaDevices.getDisplayMedia"));var a="function"===typeof i;t.default=a},function(e,t,n){const r=n(36);e.exports=function generateSimpleStateMachineFactory(){return function generateSimpleStateMachine(e,t,n){const o=t.slice();const i=r(n);const a=function isValidState(e){return-1!==o.indexOf(e)};const s=function isValidTransition(e,t){return i[e]&&-1!==i[e].indexOf(t)};return function(t){let n=e;let r=null;(this||_global3).current=n;function signalChangeFailed(e,o){t({message:e,newState:o,currentState:n,previousState:r})}function handleInvalidStateChanges(e){if(!a(e)){signalChangeFailed(`'${e}' is not a valid state`,e);return false}if(!s(n,e)){signalChangeFailed(`'${n}' cannot transition to '${e}'`,e);return false}return true}(this||_global3).set=function(e){if(handleInvalidStateChanges(e)){r=n;(this||_global3).current=e;n=e}}}}}},function(e,t,n){(function(t){const r=n(61);e.exports=function screenSharingFactory(e){void 0===e&&(e={});const o=e.chromeExtensionHelper||n(280)();const i=e.electronExtensionHelper||n(628)();const a=e.Errors||n(4);const s=e.firefoxExtensionHelper||n(630);const c=e.getDisplayMediaExtensionHelper||n(287);const l=e.otError||n(11)();const u=e.OTHelpers||n(5);const d={};d.extensionByKind={};d.extensionClasses={};d.registerExtensionHelper=(e,t)=>{d.extensionClasses[e]=t;t.autoRegisters&&t.isSupportedInThisBrowser&&d.registerExtension(e)};
2421/**
2422           * Register an extension for screen-sharing support in an older version of Chrome or Opera.
2423           * <p>
2424           * <b>Note:</b> A screen-sharing extension is not required in Chrome 72+ or Opera 59+.
2425           * The end user is prompted to grant access to the screen, just as they would be when granting
2426           * access to a camera. You only need a screen-sharing extension for older versions
2427           * of Opera and Chrome.
2428           * <p>
2429           * Use the <code>OT.checkScreenSharingCapability()</code> method to check if an extension is
2430           * required, registered, and installed.
2431           * <p>
2432           * The OpenTok
2433           * <a href="https://github.com/opentok/screensharing-extensions">screensharing-extensions</a>
2434           * repo includes code for creating an extension for screen-sharing support.
2435           *
2436           * @param {String} kind Set this parameter to <code>"chrome"</code>. Currently, you can only
2437           * register a screen-sharing extension for older versions of Chrome and Opera.
2438           *
2439           * @param {String} id The ID for your screen-sharing extension. You can find this ID at
2440           * chrome://extensions.
2441           *
2442           * @param {Number} version The version of the screen-sharing extension from the
2443           * <a href="https://github.com/opentok/screensharing-extensions">screensharing-extensions</a> repo.
2444           * Set this if you are using version 2 or later. For example, if you are using version 2, set this
2445           * to 2. With version 2, the client can use the extension immediately after installing it, without
2446           * reloading the page.
2447           *
2448           * @see <a href="OT.html#initPublisher">OT.initPublisher()</a>
2449           * @see <a href="OT.html#checkScreenSharingCapability">OT.checkScreenSharingCapability()</a>
2450           * @method OT.registerScreenSharingExtension
2451           * @memberof OT
2452           */d.registerExtension=function(e){if(null==d.extensionClasses[e])throw new Error("Unsupported kind passed to OT.registerScreenSharingExtension");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const o=d.extensionClasses[e].register(...n);d.extensionByKind[e]=o};const screenSharingPickHelper=()=>{const e=r(Object.keys(d.extensionClasses).sort((e=>"electron"===e?-1:1)),(e=>d.extensionClasses[e].isSupportedInThisBrowser));return void 0===e?{}:{name:e,proto:d.extensionClasses[e],instance:d.extensionByKind[e]}};d.pickHelper=()=>screenSharingPickHelper()
2453/**
2454           * Checks for support for publishing screen-sharing streams on the client browser. The object
2455           * passed to the callback function defines whether screen sharing is supported, as well as
2456           * which screen-sharing sources (application, screen, or window) are supported. It also indicates
2457           * whether an extension is required, installed, and registered (if needed).
2458           * <p>
2459           * <pre>
2460           * OT.checkScreenSharingCapability(function(response) {
2461           *   if (!response.supported || response.extensionRegistered === false) {
2462           *     // This browser does not support screen sharing
2463           *   } else if (response.extensionInstalled === false) {
2464           *     // Prompt to install the extension
2465           *   } else {
2466           *     // Screen sharing is available.
2467           *   }
2468           * });
2469           * </pre>
2470           * <p>
2471           * Chrome 72+, Firefox 52+, Safari 13+, Edge 79+, and Opera 59+ have screen-sharing
2472           * support built-in, with no extension required. (Note that support for the OpenTok
2473           * plugin for Internet Explorer is removed in OpenTok 2.17.) Screen sharing is
2474           * <i>not</i> supported in mobile browsers. In Electron, screen sharing is supported if
2475           * the <code>webPreferences.contextIsolation</code> option of the Electron BrowserWindow is
2476           * set to <code>false</code> or if the app uses a preload script to access the desktop capturer.
2477           * (The default value of <code>webPreferences.contextIsolation</code> option is <code>true</code>
2478           * in Electron 12 and <code>false</code> in previous versions). To publish a screen-sharing video
2479           * in older versions of Chrome or Opera, the client adds an extension that enables publishing a
2480           * screen-sharing video stream on your domain. The OpenTok
2481           * <a href="https://github.com/opentok/screensharing-extensions">screensharing-extensions</a>
2482           * sample includes code for creating an extension for screen-sharing support in
2483           * older versions of Chrome and Opera.
2484           * <p>
2485           * For more information, see the <a href="https://tokbox.com/developer/guides/screen-sharing/js/">
2486           * OpenTok Screen Sharing</a> developer guide.
2487           *
2488           * @param {function} callback The callback invoked with the support options object passed as
2489           * the parameter. This object has the following properties that indicate support for publishing
2490           * screen-sharing streams in the client:
2491           * <p>
2492           * <ul>
2493           *   <li>
2494           *     <code>extensionInstalled</code> (Boolean) &mdash;  In older versions of Chrome and Opera,
2495           *     this is set to <code>true</code> if the extension is installed and registered.
2496           *     In Chrome 72+, Firefox 52+, Safari 13+, Opera 59+, Edge 79+, and Internet Explorer,
2497           *     this property is undefined.
2498           *   </li>
2499           *   <li>
2500           *     <code>supported</code> (Boolean) &mdash; Set to <code>true</code> if screen sharing
2501           *     is supported in the browser. Check the <code>extensionRequired</code> property
2502           *     to see if the browser requires an extension for screen sharing.
2503           *   </li>
2504           *   <li>
2505           *     <code>supportedSources</code> (Object) &mdash; Deprecated. In older
2506           *     browser versions, you could select a type of screen-sharing source
2507           *     (such as <code>"application"</code>, <code>"browser"</code>, <code>"screen"</code>,
2508           *     or <code>"window"</code> by setting the <code>videoSource</code> property
2509           *     of the options passed into the <code>OT.initPublisher()</code> method.
2510           *     However, in current browsers that support screen sharing, passing in
2511           *     any of these values results in the same behavior &mdash; the browser
2512           *     displays a dialog box in which the end user selects the screen-sharing
2513           *     source (which can be the entire screen or a specific window). In Electron,
2514           *     screen sharing captures the entire screen, without prompting the user for permission.
2515           *   </li>
2516           * </ul>
2517           * <p> The options parameter also includes the following properties, which apply to screen-sharing
2518           * support in older versions of Chrome and Opera (in all other browsers these properties are
2519           * undefined):
2520           * <ul>
2521           *   <li>
2522           *     <code>extensionRequired</code> (String) &mdash; Set to <code>"chrome"</code>
2523           *     in older versions of Chrome and Opera, which require a screen-sharing extension
2524           *     to be installed. This property is undefined in other browsers.
2525           *   </li>
2526           *   <li>
2527           *     <code>extensionRegistered</code> (Boolean) &mdash; In older versions of Chrome and Opera,
2528           *     this property is set to <code>true</code> if a screen-sharing extension is registered;
2529           *     otherwise it is set to <code>false</code>. In other browsers (which do not require
2530           *     an extension), this property is undefined. Use the
2531           *     <code>OT.registerScreenSharingExtension()</code> method to register a screen-sharing
2532           *     extension in older versions of Chrome or Opera.
2533           *   </li>
2534           * </ul>
2535           *
2536           * @see <a href="OT.html#initPublisher">OT.initPublisher()</a>
2537           * @see <a href="OT.html#registerScreenSharingExtension">OT.registerScreenSharingExtension()</a>
2538           * @method OT.checkScreenSharingCapability
2539           * @memberof OT
2540           */;d.checkCapability=e=>
2540{const t={supported:false,extensionRequired:void 0,extensionRegistered:void 0,extensionInstalled:void 0,supportedSources:{}};const n=screenSharingPickHelper();if(void 0!==n.name){t.supported=true;t.extensionRequired=n.proto.extensionRequired?n.name:void 0;t.supportedSources={screen:n.proto.sources.screen,application:n.proto.sources.application,window:n.proto.sources.window,browser:n.proto.sources.browser};if(n.instance){t.extensionRegistered=!!t.extensionRequired||void 0;n.instance.isInstalled((n=>{t.extensionInstalled=t.extensionRequired||"Firefox"===u.env.name?n:void 0;e(t)}))}else{t.extensionRegistered=false;t.extensionRequired&&(t.extensionInstalled=false);setTimeout(e.bind(null,t))}}else setTimeout(e.bind(null,t))};d.registerExtensionHelper("electron",i);d.registerExtensionHelper("getDisplayMedia",c);d.registerExtensionHelper("chrome",o);d.registerExtensionHelper("firefox",s);const noop=()=>{};d.getConstraints=e=>{const n=e.onAccessDialogOpened,r=void 0===n?noop:n,o=e.onAccessDialogClosed,i=void 0===o?noop:o,s=e.videoSource,c=e.constraints;return new t(((e,t)=>{d.checkCapability((n=>{if(n.supported)if(false===n.extensionRegistered)t(l(a.SCREEN_SHARING_EXTENSION_NOT_REGISTERED,new Error("Screen Sharing support in this browser requires an extension, but one has not been registered.")));else if(n.extensionRequired&&false===n.extensionInstalled)t(l(a.SCREEN_SHARING_EXTENSION_NOT_INSTALLED,new Error("Screen Sharing support in this browser requires an extension, but the extension is not installed.")));else{const n=d.pickHelper();n.proto.getConstraintsShowsPermissionUI&&r();n.instance.getConstraints(s,c,((r,o)=>{n.proto.getConstraintsShowsPermissionUI&&i();r?t(r):e(o)}))}else{let e="Screen Sharing is not supported in this browser";u.env.isElectron?e="Set the webPreferences.contextIsolation option of the Electron BrowserWindow to false or use a preload script to access the desktop capturer. For more information, see https://tokbox.com/developer/guides/screen-sharing/js/.":"Chrome"===u.env.name&&u.env.version>73&&"https:"!==(void 0!==typeof window?window:_global3).location.protocol&&(e="https:// is required for screen sharing");t(l(a.SCREEN_SHARING_NOT_SUPPORTED,new Error(e)))}}))}))};return d}}).call(this||_global3,n(0))},function(e,t,n){e.exports=function interpretPeerConnectionErrorFactory(e){void 0===e&&(e={});const t=e.Errors||n(4);const r=e.ExceptionCodes||n(8);const o=e.otError||n(11)();const i={ICEWorkflow:t.ICE_WORKFLOW_FAILED,NewPeerConnection:t.CREATE_PEER_CONNECTION_FAILED,SetRemoteDescription:t.SET_REMOTE_DESCRIPTION_FAILED,Subscribe:{404:t.STREAM_NOT_FOUND,[r.STREAM_LIMIT_EXCEEDED]:t.STREAM_LIMIT_EXCEEDED}};return function interpretPeerConnectionError(e,n,a,s,c){const l=`${(a?`${a}: `:"")+c} PeerConnection with connection ${s} failed: ${n}`;const u=i[a]||{};const d="string"===typeof u?u:u[e];const f="Publisher"===c?r.UNABLE_TO_PUBLISH:r.UNABLE_TO_SUBSCRIBE;if(!d){const e=new Error(l);e.code=f;return e}const p=(()=>"ICEWorkflow"===a?"Publisher"===c?r.PUBLISHER_ICE_WORKFLOW_FAILED:r.SUBSCRIBER_ICE_WORKFLOW_FAILED:d===t.STREAM_LIMIT_EXCEEDED?r.STREAM_LIMIT_EXCEEDED:f)();return o(d,new Error(l),p)}}},function(e,t,n){e.exports=function setCertificatesFactory(e){void 0===e&&(e={});const t=e.OTHelpers||n(5);const r=e.global||(void 0!==typeof window?window:_global3);const o=r.RTCPeerConnection;return function setCertificates(e,n){"Firefox"===t.env.name&&o&&o.generateCertificate?o.generateCertificate({name:"RSASSA-PKCS1-v1_5",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])}).catch((e=>{n(e)})).then((t=>{e.certificates=[t];n(void 0,e)})):setTimeout((()=>{n(void 0,e)}))}}},function(e,t,n){var r=n(3);var o=r(n(12));var i=r(n(13));var a=r(n(45));var s=r(n(18));const c=n(6);const l=n(644);const u=n(1)("WidgetView");const d=n(5);const f=n(645);const p=n(2);const g=n(165),h=g.default,b=g.CancellationError;const v=n(166);const m=n(647);const _=n(648);const y=n(649);const E=n(650);const S=n(651);const T=n(62);const C=n(107);C();
2541/**
2542       * WidgetViewFactory - DI factory for WidgetView
2543       *
2544       * @package
2545       * @param {Object} deps
2546       * @param {DefaultVideoElementFacadeFactory} deps.VideoElementFacade
2547       * @return WidgetView
2548       */function WidgetViewFactory(e){let t=void 0===e?{}:e,n=t.logging,r=void 0===n?u:n,g=t.OTHelpers,w=void 0===g?d:g,O=t.versionGreaterThan,x=void 0===O?f:O,I=t.waitForVideoToBePlaying,A=void 0===I?_:I,R=t.VideoElementFacade,k=void 0===R?C():R,D=t.env,N=void 0===D?p:D;const P=l({window:void 0!==typeof window?window:_global3});const throwIfBindCancelled=e=>{if(e.isCanceled()){r.debug("bindVideo bailing due to cancellation");throw new b("CANCEL")}};
2549/**
2550         * WidgetView - A standard abstraction used by Subscriber and Publisher for
2551         * displaying the video and it's UI.
2552         *
2553         * @package
2554         * @class
2555         * @param {Element} targetElement the element to attach this WidgetView to
2556         * @param {Object} properties
2557         */let M=function(){
2558/** @type {typeVideoElementFacade} */
2559/** @type {HTMLElement} */
2560function WidgetView(
2561/** @type {HTMLElement} */
2562e,t){let n=void 0===t?{}:t,o=n.insertDefaultUI,i=void 0===o||o,a=n.width,l=void 0===a?264:a,u=n.height,d=void 0===u?198:u,f=n.fitMode,p=void 0===f?"cover":f,g=n.mirror,h=void 0!==g&&g,b=n.insertMode,v=n.classNames,m=n.style,_=n.widgetType;(0,s.default)(this||_global3,"_videoElementFacade",void 0);(0,s.default)(this||_global3,"_container",void 0);(0,s.default)(this||_global3,"_posterContainer",document.createElement("div"));(0,s.default)(this||_global3,"_widgetContainer",document.createElement("div"));(0,s.default)(this||_global3,"_loading",true);(0,s.default)(this||_global3,"_audioOnly",false);(0,s.default)(this||_global3,"_showPoster",void 0);(0,s.default)(this||_global3,"_poster",void 0);(0,s.default)(this||_global3,"_cancelBind",void 0);c(this||_global3);false===/^(contain|cover)$/.test(p)&&r.warn(`Invalid fit value "${p}" passed. Only "contain" and "cover" can be used.`);(this||_global3)._widgetType=_;(this||_global3)._fitMode=p;(this||_global3)._insertDefaultUI=i;const C=T((this||_global3)._widgetContainer);C.on("click",(this||_global3).userGesture.bind(this||_global3));C.on("touchstart",(this||_global3).userGesture.bind(this||_global3),!!P&&{passive:true});this.once("destroy",(()=>C.removeAll()));(this||_global3)._widgetContainer.classList.add("OT_widget-container");(this||_global3)._widgetContainer.style.width="100%";(this||_global3)._widgetContainer.style.height="100%";
2562if(false!==i){(this||_global3)._container=E(e,b);N.isSafari&&N.isiOS&&N.iOSVersion&&x("11.2",N.iOSVersion)&&(this||_global3)._container.classList.add("OT_ForceContain");(this||_global3)._container.style.width=S(l);(this||_global3)._container.style.height=S(d);(this||_global3)._container.style.overflow="hidden";y((this||_global3)._container);h&&w.addClass((this||_global3)._container,"OT_mirrored");v&&v.trim().split(/\s+/).forEach((e=>(this||_global3)._container.classList.add(e)));(this||_global3)._container.classList.add("OT_loading");(this||_global3)._container.classList.add(`OT_fit-mode-${p}`);(this||_global3)._container.appendChild((this||_global3)._widgetContainer);const t=w((this||_global3)._container).observeSize((()=>y((this||_global3)._container))),n=t[0];const o=w.observeNodeOrChildNodeRemoval((this||_global3)._container,(e=>{if(!(this||_global3)._videoElementFacade)return;const t=e.some((e=>e===(this||_global3)._widgetContainer||e===(this||_global3)._videoElementFacade.domElement()));t&&this.destroyVideo()}));this.once("destroy",(()=>{r.debug("disconnecting observers");n.disconnect();o.disconnect()}))}(this||_global3)._posterContainer.classList.add("OT_video-poster");(this||_global3)._widgetContainer.appendChild((this||_global3)._posterContainer);const O=document.createElement("div");O.classList.add("OT_video-loading");const I=document.createElement("div");I.classList.add("OT_video-loading-spinner");O.appendChild(I);(this||_global3)._widgetContainer.appendChild(O);m&&m.backgroundImageURI&&this.setBackgroundImageURI(m.backgroundImageURI)}var e=WidgetView.prototype;e.addError=function addError(e,t,n){if((this||_global3)._container){(this||_global3)._container.innerHTML=`<p>${e}${t?` <span class="ot-help-message">${t}</span>`:""}</p>`;w.addClass((this||_global3)._container,n||"OT_subscriber_error");(this||_global3)._container.querySelector("p").offsetHeight>(this||_global3)._container.offsetHeight&&((this||_global3)._container.querySelector("span").style.display="none")}};e.destroy=function destroy(){this.emit("destroy");this.destroyVideo();if((this||_global3)._container){w.removeElement((this||_global3)._container);(this||_global3)._container=null}};e.setBackgroundImageURI=function setBackgroundImageURI(e){w.css((this||_global3)._posterContainer,"backgroundImage",`url(${e})`);w.css((this||_global3)._posterContainer,"backgroundSize","contain");w.css((this||_global3)._posterContainer,"opacity","1.0")};e.isAudioBlocked=function isAudioBlocked(){return Boolean((this||_global3)._videoElementFacade&&(this||_global3)._videoElementFacade.isAudioBlocked())};e.unblockAudio=function unblockAudio(){return(this||_global3)._videoElementFacade.unblockAudio()};e.userGesture=function userGesture(){this.isAudioBlocked()&&v().then((()=>r.debug("Successfully unblocked audio")),(e=>r.error("Error retrying audio on user interaction:",e)))};e.setAudioBlockedUi=function setAudioBlockedUi(e){(this||_global3)._container&&(e?(this||_global3)._container.classList.add("OT_container-audio-blocked"):(this||_global3)._container.classList.remove("OT_container-audio-blocked"))};e.rebindSrcObject=function rebindSrcObject(){(this||_global3)._videoElementFacade&&(this||_global3)._videoElementFacade._rebindSrcObject()};e.pauseAndPlayVideoElement=function pauseAndPlayVideoElement(){(this||_global3)._videoElementFacade&&(this||_global3)._videoElementFacade._pauseAndPlay()};e._createVideoElementFacade=function _createVideoElementFacade(e){let t=e._inject,n=e.audioVolume,o=e.fallbackText,i=e.muted;(this||_global3)._videoElementFacade=new k({defaultAudioVolume:parseFloat(n),fallbackText:o,fitMode:(this||_global3)._fitMode,_inject:t,muted:i,widgetType:(this||_global3)._widgetType});const a=T((this||_global3)._videoElementFacade);(this||_global3)._videoFacadeEvents=a;a.on("error",(()=>{this.trigger("error")}));a.on("videoDimensionsChanged",((e,t)=>{this.trigger("videoDimensionsChanged",e,t)}));a.on("mediaStopped",(e=>{this.trigger("mediaStopped",e)}));a.on("audioBlocked",(()=>this.trigger("audioBlocked")));a.on("audioUnblocked",(()=>this.trigger("audioUnblocked")));(this||_global3)._videoElementFacade.audioChannelType("telephony");r.debug("Appending the video facade");(this||_global3)._videoElementFacade.appendTo((this||_global3)._widgetContainer);if("undefined"!==typeof n)try{(this||_global3)._videoElementFacade.setAudioVolume(n)}catch(e){r.warn(`bindVideo ${e}`)}};
2562e._bindToStream=function(){var e=(0,i.default)(o.default.mark((function _callee(e,t){return o.default.wrap((function _callee$(n){while(1)switch(n.prev=n.next){case 0:n.prev=0;n.next=3;return(this||_global3)._videoElementFacade.bindToStream(e);case 3:n.next=14;break;case 5:n.prev=5;n.t0=n.catch(0);if(!t.isCanceled()){n.next=12;break}r.debug("Refusing to destroyVideo as bindVideo was cancelled");throw new b("CANCEL");case 12:this.destroyVideo();throw n.t0;case 14:case"end":return n.stop()}}),_callee,this||_global3,[[0,5]])})));function _bindToStream(t,n){return e.apply(this||_global3,arguments)}return _bindToStream}();e._getNewBindCancellation=function _getNewBindCancellation(){if((this||_global3)._cancelBind){r.debug("Cancelling last bindVideo request");(this||_global3)._cancelBind.cancel()}const e=new h;(this||_global3)._cancelBind=e;this.once("destroy",(()=>e.cancel()));return e};e._triggerVideoElementCreated=function _triggerVideoElementCreated(){const triggerVideoElementCreated=e=>{this.trigger("videoElementCreated",e);(this||_global3)._insertDefaultUI&&w.addClass(e,"OT_video-element")};(this||_global3)._videoElementFacade.domElement()?triggerVideoElementCreated((this||_global3)._videoElementFacade.domElement()):(this||_global3)._videoFacadeEvents.on("videoElementCreated",(e=>{triggerVideoElementCreated(e)}))};e._waitForVideoResolution=function(){var e=(0,i.default)(o.default.mark((function _callee2(e){var t;return o.default.wrap((function _callee2$(n){while(1)switch(n.prev=n.next){case 0:t=this.audioOnly()&&"subscriber"===(this||_global3)._widgetType;if(!(!t&&e.getVideoTracks().length>0)){n.next=6;break}r.debug("Waiting for correct resolution");n.next=5;return m((this||_global3)._videoElementFacade,5e3);case 5:r.debug(`Resolution: ${(this||_global3)._videoElementFacade.videoWidth()}x${(this||_global3)._videoElementFacade.videoHeight()}`);case 6:case"end":return n.stop()}}),_callee2,this||_global3)})));function _waitForVideoResolution(t){return e.apply(this||_global3,arguments)}return _waitForVideoResolution}()
2563/**
2564           * Bind a video to a VideoElementFacade
2565           *
2566           * @param {MediaStream} webRTCStream the MediaStream to bind
2567           * @param {Object} options
2568           * @param {Function} options.error Error callback
2569           * @param {Float} options.audioVolume The initial audioVolume
2570           * @param {Boolean} options.muted The initial mute state
2571           * @param {String} [options.fallbackText] The default fallbackText
2572           *
2573           * @return {Promise<undefined>}
2574           */;e.bindVideo=function(){var e=(0,i.default)(o.default.mark((function _callee3(e,t){var n,i,a,s,c,l,u;return o.default.wrap((function _callee3$(o){while(1)switch(o.prev=o.next){case 0:n=t.audioVolume,i=t.muted,a=t.fallbackText,s=t._inject;r.debug("bindVideo ",{webRTCStream:e});c=!!(this||_global3)._videoElementFacade;l=this._getNewBindCancellation();c||this._createVideoElementFacade({_inject:s,audioVolume:n,fallbackText:a,muted:i});o.next=7;return this._bindToStream(e,l);case 7:c||this._triggerVideoElementCreated();throwIfBindCancelled(l);u=A((this||_global3)._videoElementFacade,5e3);o.next=12;return this._waitForVideoResolution(e);case 12:r.debug("Waiting for video to be playing");o.next=15;return u;case 15:r.debug("Video is playing");throwIfBindCancelled(l);case 17:case"end":return o.stop()}}),_callee3,this||_global3)})));function bindVideo(t,n){return e.apply(this||_global3,arguments)}return bindVideo}();e.bindAudioTrackOnly=function bindAudioTrackOnly(){(this||_global3)._videoElementFacade&&(this||_global3)._videoElementFacade.bindAudioTrackOnly()};e.destroyVideo=function destroyVideo(){if((this||_global3)._videoElementFacade){(this||_global3)._videoElementFacade.destroy();(this||_global3)._videoElementFacade=null}};e.video=function video(){return(this||_global3)._videoElementFacade};e.showPoster=function showPoster(e){if(void 0===e)return!w.isDisplayNone((this||_global3)._posterContainer);(this||_global3)._showPoster=e;w[e?"show":"hide"]((this||_global3)._posterContainer);return this.showPoster()};e.poster=function poster(e){if(void 0===e)return w.css((this||_global3)._posterContainer,"backgroundImage");(this||_global3)._poster=e;w.css((this||_global3)._posterContainer,"backgroundImage",`url(${e})`);return this.poster()};e.loading=function loading(e){if(void 0===e)return(this||_global3)._loading;(this||_global3)._loading=Boolean(e);
2574(this||_global3)._container&&(this||_global3)._container.classList[e?"add":"remove"]("OT_loading");return this.loading()};e.audioOnly=function audioOnly(e){if(void 0===e)return(this||_global3)._audioOnly;(this||_global3)._audioOnly=e;(this||_global3)._container&&(this||_global3)._container.classList[e?"add":"remove"]("OT_audio-only");return this.audioOnly()};e.domId=function domId(){return(this||_global3)._container&&(this||_global3)._container.getAttribute("id")};e.setSinkId=function setSinkId(e){if((this||_global3)._videoElementFacade)return(this||_global3)._videoElementFacade.setSinkId(e)};(0,a.default)(WidgetView,[{key:"domElement",get:function get(){return(this||_global3)._container}},{key:"videoElement",get:function get(){return(this||_global3)._videoElementFacade&&(this||_global3)._videoElementFacade.domElement()||void 0}},{key:"width",get:function get(){return(this||_global3).videoElement&&(this||_global3).videoElement.offsetWidth}},{key:"height",get:function get(){return(this||_global3).videoElement&&(this||_global3).videoElement.offsetHeight}}]);return WidgetView}();return M}e.exports=WidgetViewFactory},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});t.CancellationError=t.default=void 0;var r=n(646);var o=_interopRequireDefault(r);var i=n(298);var a=_interopRequireDefault(i);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t.default=o.default;t.CancellationError=a.default},function(e,t,n){(function(t){const r=n(20);e.exports=()=>t.all(r.subscribers.where().map((e=>{if(e.isAudioBlocked())
2575/**
2576           * Causes subscribers' audio to play back in browsers where audio is blocked.
2577           * You must call this method in response to an HTML element dispaching
2578           * a <code>click</code> event.
2579           * <p>
2580           * You only need to call this method if you disable display of
2581           * the Subscriber's default audio playback icon (by setting the
2582           * <code>style.audioBlockedDisplayMode</code> property of the
2583           * <code>options</code> parameter of the
2584           * <a href="Session.html#subscribe">Session.subscribe()</a> method).
2585           * You may call this method in response to the user clicking an HTML element
2586           * that you display on the page.
2587           * <p>
2588           * The Subscriber dispatches an
2589           * <a href="Subscriber.html#event:audioBlocked">audioBlocked</a> event
2590           * if audio is blocked. In response to that event, you can display a UI
2591           * element to notify the end user to respond to playback subscriber audio.
2592           * Call the <code>OT.unblockAudio()</code> method in response to the user
2593           * clicking a DOM element.
2594           * <p>
2595           * <i>Note:</i> Subscriber audio is also unblocked automatically if
2596           * the local client gains access to the camera or microphone (for instance,
2597           * in response to a successful call to <code>OT.initPublisher()</code>).
2598           *
2599           * @returns Promise The promise resolves if audio playback succeeds
2600           * on all blocked subscribers. The promise is rejected if playback fails.
2601           * See <a href="Error.html">Error</a> for details.
2602           *
2603           * @see <a href="Subscriber.html#isAudioBlocked">Subscriber.isAudioBlocked()</a>
2604           * @see The <a href="Subscriber.html#event:audioBlocked">audioBlocked</a>
2605           * and <a href="Subscriber.html#event:audioUnblocked">audioUnblocked</a>
2606           * Subscriber events
2607           *
2608           * @method OT.unblockAudio
2609           * @memberof OT
2610           */
2611return e._.unblockAudio()})))}).call(this||_global3,n(0))},function(e,t,n){e.exports=e=>"P2P"===e?"RELAYED":"ROUTED"},function(e,t,n){(function(t){var r=n(3);var o=r(n(12));var i=r(n(13));var a=r(n(25));const s=n(56);const c=n(148);const l=n(7);const u=n(55);const d=n(61);const f=n(275);const p=n(47);const g=n(49);const h=n(665);const b=n(19);const v=n(258);const m=n(194);const _=n(165),y=_.CancellationError,E=_.default;const S=n(2);const T=n(675);const C=n(307);const w=n(75);const O=n(26);const x=n(6);const I=n(106);const A=n(126);const R=n(27);const k=n(74);const D=n(154);const N=n(676);const P=n(164)();const M=n(677);const L=n(678);const j=n(166);const U=n(23)(),F=U.getInputMediaDevices;const V=n(679);const B=n(269);const W=n(306);const H=n(680);const z=n(681);const $=n(290),G=$.setVideoContentHint,q=$.getVideoContentHint;const Y=n(167);const K=3e3;const J=3e4;e.exports=function PublisherFactory(e){void 0===e&&(e={});let r=e,_=(0,a.default)({},r);["processPubOptions"].forEach((e=>{c(_[e],`${e} dependency must be injected into Publisher`)}));const U=_.AnalyticsHelper||R;const $=_.calculateCapableSimulcastStreams||n(252);const Z=_.createChromeMixin||n(281)();const X=_.deviceHelpers||n(23)();const Q=_.EnvironmentLoader||n(146);const ee=_.Errors||n(4);const te=_.Events||n(22)();const ne=_.ExceptionCodes||n(8);const re=_.interpretPeerConnectionError||n(162)();const oe=_.IntervalRunner||k;const ie=_.logging||n(1)("Publisher");const ae=_.Microphone||n(291)();const se=_.otError||n(11)();const ce=_.OTErrorClass||n(21);const le=_.OTHelpers||n(5);const ue=_.parseIceServers||n(100).parseIceServers;const de=_.PUBLISH_MAX_DELAY||n(267);const fe=_.PublisherPeerConnection||n(295)();const pe=_.PublishingState||n(297)();const ge=_.StreamChannel||n(149);const he=_.systemRequirements||n(152);const be=_.VideoOrientation||n(150)();const ve=_.WidgetView||P;const me=_.global||(void 0!==typeof window?window:_global3);const _e=_.createSendMethod||n(304);const ye=_.setEncodersActiveState||T;const Ee=_.processPubOptions;const Se=function Publisher(e){var n=this||_global3;void 0===e&&(e={});let r=x({});const c=new m;
2612/**
2613             * @typedef {Object} peerConnectionMeta
2614             * @property {String} remoteConnectionId The connection id of the remote side
2615             * @property {String} remoteSubscriberId The subscriber id of the remote side
2616             * @property {String} peerId The peerId of this peer connection
2617             * @property {String} peerConnectionId Our local identifier for this peer connection
2618             */
2619/**
2620             * Retrieve meta information for this peer connection
2621             * @param {PublisherPeerConnection} peerConnection
2622             * @returns {peerConnectionMeta} meta data regarding this peer connection
2623             */const getPeerConnectionMeta=e=>c.get(e);const setPeerConnectionMeta=(e,t)=>c.set(e,t);x(this||_global3);const _=D();
2624/** @type AnalyticsHelperDefault */let T=new U;he.check()||he.upgrade()
2625/** @type {WidgetView|null} */;let R;let k;let P;let Se;let Te;let Ce;let we;let Oe;let xe;let Ie;let Ae;let Re;let ke=false;let De;let Ne;let Pe;const Me={};const Le={};let je;const Ue=5e3;
2626/** @type IntervalRunnerDefault | undefined */let Fe;let Ve;const getLastSession=()=>(this||_global3).session||Ve||{isConnected(){return false}};const Be=[];this.once("publishComplete",(e=>{if(!e){var t;ke=true;De=(null==(t=(this||_global3).session)?void 0:t.sessionInfo.p2pEnabled)?"P2P":"MANTIS"}}));this.on("sourceStreamIdChanged",(e=>{De=e}));this.on("audioAcquisitionProblem",(e=>{let t=e.method;tt("publisher:audioAcquisitionProblem","Event",{didPublishComplete:ke,method:t})}));function getCommonAnalyticsFields(){return{connectionId:getLastSession().isConnected()?getLastSession().connection.connectionId:null,
2626streamId:k,widgetType:"Publisher"}}const onStreamAvailableError=e=>{const t=Object.keys(ee).map((e=>ee[e]));const n=se(t.indexOf(e.name)>-1?e.name:ee.MEDIA_ERR_ABORTED,e,ne.UNABLE_TO_PUBLISH);ie.error(`onStreamAvailableError ${n.name}: ${n.message}`);Ce.set("Failed");if(R){R.destroy();R=null}const r={failureReason:"GetUserMedia",failureCode:ne.UNABLE_TO_PUBLISH,failureMessage:`OT.Publisher failed to access camera/mic: ${n.message}`};nt("Failure",{},r);ce.handleJsException({error:n,errorMsg:r.failureReason,code:r.failureCode,target:this||_global3,analytics:T});this.trigger("publishComplete",n)};const onScreenSharingError=e=>{const t=u(e);t.code=ne.UNABLE_TO_PUBLISH;ie.error(`OT.Publisher.onScreenSharingError ${t.message}`);Ce.set("Failed");t.message=`Screensharing: ${t.message}`;this.trigger("publishComplete",t);nt("Failure",{},{failureReason:"ScreenSharing",failureMessage:t.message});if(R){R.destroy();R=null}};const onAccessDenied=e=>{const t=u(e);let n;try{n=window.self!==window.top}catch(e){}"https:"!==(void 0!==typeof window?window:_global3).location.protocol&&(Ke?t.message+=" Note: https:// is required for screen sharing.":B()&&"localhost"!==le.env.hostName&&(t.message+=` Note: ${le.env.name} requires HTTPS for camera and microphone access.`));n&&!Ke&&(t.message+=" Note: Check that the iframe has the allow attribute for camera and microphone");ie.error(t.message);Ce.set("Failed");t.message=`OT.Publisher Access Denied: Permission Denied: ${t.message}`;t.code=ne.UNABLE_TO_PUBLISH;if(R){R.destroy();R=null}nt("Cancel",{reason:"AccessDenied"});this.trigger("publishComplete",t);this.dispatchEvent(new A(O.ACCESS_DENIED))};const userMediaError=e=>{const t=e.name===ee.USER_MEDIA_ACCESS_DENIED||e.name===ee.NOT_SUPPORTED&&e.originalMessage.match(/Only secure origins/);t?onAccessDenied(e):Ee.isScreenSharing?onScreenSharingError(e):onStreamAvailableError(e);throw e};const onAccessDialogOpened=()=>{tt("accessDialog","Opened");this.dispatchEvent(new A(O.ACCESS_DIALOG_OPENED,true))};const onAccessDialogClosed=()=>{tt("accessDialog","Closed");this.dispatchEvent(new A(O.ACCESS_DIALOG_CLOSED,false))};const We=b();const He={};let ze=false;let $e={};let Ge=false;let qe=Ee(e,"OT.Publisher",(()=>Ce&&Ce.isDestroyed()));qe.on({accessDialogOpened:onAccessDialogOpened,accessDialogClosed:onAccessDialogClosed});const Ye=qe,Ke=Ye.isScreenSharing,Je=Ye.isCustomAudioTrack,Ze=Ye.isCustomVideoTrack,Xe=Ye.shouldAllowAudio,Qe=Ye.properties,et=Ye.getUserMedia;Object.defineProperty(this||_global3,"loudness",{writable:false,value:void 0,configurable:true});function removeTrackListeners(e){e.forEach((e=>e()))}const listenWithOff=(e,t,n)=>{if(!e.addEventListener)return()=>{};e.addEventListener(t,n);return()=>e.removeEventListener(t,n)};(function handleAudioEnded(){const e=[];r.on("streamDestroy",(()=>removeTrackListeners(e)));r.on("streamChange",(()=>{removeTrackListeners(e);const t=P.getAudioTracks().map((e=>listenWithOff(e,"ended",(()=>{Ge=true;this.trigger("audioAcquisitionProblem",{method:"trackEndedEvent"})}))));e.splice(0,e.length,...t)}))}).call(this||_global3);(function handleMuteTrack(){const e=[];r.on("streamDestroy",(()=>removeTrackListeners(e)));r.on("streamChange",(()=>{removeTrackListeners(e);
2626shouldSkipMuteEventsFromTrack()||P.getTracks().forEach((t=>{if(t.addEventListener){e.push(listenWithOff(t,"mute",(()=>{refreshAudioVideoUI()})));e.push(listenWithOff(t,"unmute",(()=>{refreshAudioVideoUI()})))}}))}))})();const shouldSkipMuteEventsFromTrack=()=>{if(Ke)return true;const e=["text","detail"];const t=e.includes(Qe.videoContentHint);return Ze&&t};const tt=e.logAnalyticsEvent||((e,t,n,r,o)=>{let i=l({action:e,variation:t,payload:n},getCommonAnalyticsFields(),r);"Failure"===t&&(i=l($e,i));$e=p(i,"sessionId","connectionId","partnerId");T.logEvent(i,o)});const nt=function logConnectivityEvent(e,t,n){void 0===t&&(t={});void 0===n&&(n={});if("Non-fatal"!==n.failureReason){if("Attempt"===e){Oe=(new Date).getTime();if(Fe){Fe.stop();ie.error("_connectivityAttemptPinger should have been cleaned up")}Fe=new oe((()=>{tt("Publish","Attempting",t,(0,a.default)({},getCommonAnalyticsFields(),n))}),.2,6)}if("Failure"===e||"Success"===e||"Cancel"===e){if(Fe){Fe.stop();Fe=void 0}else ie.warn(`Received connectivity event: "${e}" without "Attempt"`);tt("Publish",e,(0,a.default)({videoInputDevices:Ie,audioInputDevices:xe,videoInputDeviceCount:Ie?Ie.length:void 0,audioInputDeviceCount:xe?xe.length:void 0,selectedVideoInputDeviceId:Ae,selectedAudioInputDeviceId:Re},t),(0,a.default)({attemptDuration:(new Date).getTime()-Oe},n))}else tt("Publish",e,t,n)}};const logRepublish=(e,t)=>{tt("ICERestart",e,t)};const logHybridSessionTransition=(e,t,n)=>{if("Attempt"===t){Me[e]=(new Date).getTime();tt(e,t,n)}else"Failure"!==t&&"Success"!==t||tt(e,t,n,{attemptDuration:(new Date).getTime()-Me[e]})};const rt=function logRoutedToRelayedTransition(e,t){void 0===t&&(t={});logHybridSessionTransition("RoutedToRelayedTransition",e,t)};const ot=function logRelayedToRoutedTransition(e,t){void 0===t&&(t={});logHybridSessionTransition("RelayedToRoutedTransition",e,t)};const it=g((()=>{tt("GetStats","Called")}));const at=g((()=>{tt("GetRtcStatsReport","Called")}));const recordQOS=t=>{let n=t.parsedStats,r=t.simulcastEnabled,o=t.remoteConnectionId,i=t.peerId,a=t.sourceStreamId;const s={peerId:i,widgetType:"Publisher",connectionId:(this||_global3).session&&(this||_global3).session.isConnected()?(this||_global3).session.connection.connectionId:null,streamId:k,width:R.width,height:R.height,audioTrack:P&&P.getAudioTracks().length>0,hasAudio:hasAudio(),publishAudio:Qe.publishAudio,videoTrack:P&&P.getVideoTracks().length>0,hasVideo:hasVideo(),publishVideo:Qe.publishVideo,audioSource:Je?"Custom":void 0,duration:Se?Math.round(((new Date).getTime()-Se.getTime())/1e3):0,remoteConnectionId:o,scalableVideo:r,sourceStreamId:Y(a)};let c=(Ke&&Ze?"Screen":Ke&&e.videoSource)||Ze&&"Custom"||Qe.constraints.video&&"Camera"||null;f(c)&&(c=h(c));s.videoSource=c;const u={videoWidth:this.videoWidth(),videoHeight:this.videoHeight()};const d=l({},s,n,u);T.logQOS(d);this.trigger("qos",d)};const getVideoDimensions=()=>{let e;let t;const n=R&&R.video();if(Qe.videoDimensions){e=Math.min(Qe.videoDimensions.width,n&&n.videoWidth()||640);t=Math.min(Qe.videoDimensions.height,n&&n.videoHeight()||480)}else{e=n&&n.videoWidth()||640;t=n&&n.videoHeight()||480}return{width:e,height:t}};const stateChangeFailed=e=>{ie.error("OT.Publisher State Change Failed: ",e.message);ie.debug(e)};const onLoaded=()=>{if(Ce.isDestroyed())R&&R.destroyVideo();else{ie.debug("OT.Publisher.onLoaded; resolution:",`${this.videoWidth()}x${this.videoHeight()}`);Ce.set("MediaBound");j().catch(ie.error);R.loading(!!(this||_global3).session&&!(this||_global3).stream);ze=true}};const onLoadFailure=e=>{const t=se(ee.CONNECT_FAILED,e,ne.P2P_CONNECTION_FAILED);t.message=`OT.Publisher PeerConnection Error: ${t.message}`;nt("Failure",{},{failureReason:"PeerConnectionError",failureCode:t.code,failureMessage:t.message});Ce.set("Failed");this.trigger("publishComplete",t);ce.handleJsException({error:t,target:this||_global3,analytics:T})};const cleanupLocalStream=()=>{if(P){r.emit("streamDestroy");me.MediaStreamTrack&&me.MediaStreamTrack.prototype.stop?P.getTracks().forEach((e=>e.stop())):P.stop()}};const iOSRotatedVideoFeedBugHandler=()=>{const e=S.isiOS&&S.iOSVersion>=15;const t=P.getVideoTracks()[0];if(!e||!t)return;const visibilityHandler=()=>{!document.hidden&&R&&R.rebindSrcObject()};document.addEventListener("visibilitychange",visibilityHandler)};const iOSBuggedLocalAudioTrackHandler=()=>{const e=S.isiOS&&S.iOSVersion>=13.3;const t=P.getAudioTracks()[0];if(e&&t){t.onmute=()=>handleBuggedMutedLocalAudioTrack(t);t.onunmute=()=>handleBuggedUnMutedLocalAudioTrack(t)}};const st=function(){var e=(0,i.default)(o.default.mark((function _callee(){var e;return o.default.wrap((function _callee$(t){while(1)switch(t.prev=t.next){case 0:e={muted:true};if(R){t.next=3;break}throw new Error("Cannot bind video after widget view has been destroyed");case 3:return t.abrupt("return",R.bindVideo(P,e));case 4:case"end":return t.stop()}}),_callee)})));return function bindVideo(){return e.apply(this||_global3,arguments)}}();const onStreamAvailable=e=>{ie.debug("OT.Publisher.onStreamAvailable");Ce.set("BindingMedia");void 0!==Qe.videoContentHint&&G(e,Qe.videoContentHint);cleanupLocalStream();
2626P=e;r.emit("streamChange");iOSBuggedLocalAudioTrackHandler();iOSRotatedVideoFeedBugHandler();const findSelectedDeviceId=(e,t)=>{let n;e.forEach((e=>{if(e.deviceId)n=e.deviceId.toString();else if(e.label&&t){const r=d(t,(t=>t.label===e.label));r&&(n=r.deviceId)}}));return n};Ae=findSelectedDeviceId(P.getVideoTracks(),Ie);Re=findSelectedDeviceId(P.getAudioTracks(),xe);Te=new ae(P,!Qe.publishAudio);updateVideo();updateAudio();(this||_global3).accessAllowed=true;this.dispatchEvent(new A(O.ACCESS_ALLOWED,false))};const onPublishingTimeout=e=>{ie.error("OT.Publisher.onPublishingTimeout");let t;let n;if(Ge){t=ee.CHROME_MICROPHONE_ACQUISITION_ERROR;n="Unable to publish because your browser failed to get access to your microphone. You may need to fully quit and restart your browser to get it to work. See https://bugs.chromium.org/p/webrtc/issues/detail?id=4799 for more details."}else{t=ee.TIMEOUT;n="Could not publish in a reasonable amount of time"}const r={failureReason:"ICEWorkflow",failureCode:ne.UNABLE_TO_PUBLISH,failureMessage:"OT.Publisher failed to publish in a reasonable amount of time (timeout)"};nt("Failure",{},r);ce.handleJsException({errorMsg:r.failureReason,code:r.failureCode,target:this||_global3,analytics:T});e.isConnected()&&(this||_global3).streamId&&e._.streamDestroy((this||_global3).streamId);this.disconnect();(this||_global3).session=null;Ce.isDestroyed()||Ce.set("MediaBound");this.trigger("publishComplete",se(t,new Error(n),ne.UNABLE_TO_PUBLISH))};const onVideoError=e=>{const t=se(ee.MEDIA_ERR_DECODE,e,ne.UNABLE_TO_PUBLISH);t.message=`OT.Publisher while playing stream: ${t.message}`;ie.error("OT.Publisher.onVideoError:",t);tt("stream",null,{reason:t.message});const n=Ce.isAttemptingToPublish();Ce.set("Failed");n?this.trigger("publishComplete",t):this.trigger("error",t.message);ce.handleJsException({error:t,target:this||_global3,analytics:T})};(this||_global3)._removePeerConnection=e=>{const t=getPeerConnectionMeta(e),n=t.peerConnectionId;delete He[n];e.destroy()};(this||_global3)._removeSubscriber=e=>{const t=(this||_global3).session.sessionInfo.isAdaptiveEnabled;t&&"P2P"===De&&(this||_global3)._.startRelayedToRoutedTransition();getPeerConnectionsBySubscriber(e).then((e=>{e.forEach((e=>this._removePeerConnection(e)))}))};const onPeerDisconnected=e=>{const t=getPeerConnectionMeta(e),n=t.remoteSubscriberId,r=t.peerConnectionId;ie.debug("Subscriber has been disconnected from the Publisher's PeerConnection");tt("disconnect","PeerConnection",{subscriberConnection:r});this._removeSubscriber(n)};const ct=function(){var e=(0,i.default)(o.default.mark((function _callee2(e,t){var r,i,a,s,c,l,u,d,f,p,g;return o.default.wrap((function _callee2$(o){while(1)switch(o.prev=o.next){case 0:r=t.reason,i=t.prefix;a=n.session&&n.session.sessionInfo;if(!("ICEWorkflow"===i&&a&&a.reconnection&&ze)){o.next=5;break}ie.debug("Ignoring peer connection failure due to possibility of reconnection.");return o.abrupt("return");case 5:s=getPeerConnectionMeta(e)||{},c=s.remoteConnectionId,l=void 0===c?"(not found)":c,u=s.peerConnectionId;d=re(void 0,r,i,l,"Publisher");f={hasRelayCandidates:e&&e.hasRelayCandidates()};p={failureReason:i||"PeerConnectionError",failureCode:d.code,failureMessage:d.message};Ce.isPublishing()?p.reason="Non-fatal":n.trigger("publishComplete",d);nt("Failure",f,p);ce.handleJsException({errorMsg:`OT.Publisher PeerConnection Error: ${r}`,code:d.code,target:n,analytics:T});o.next=14;return He[u];case 14:g=o.sent;g.destroy();delete He[u];case 17:case"end":return o.stop()}}),_callee2)})));return function onPeerConnectionFailure(t,n){return e.apply(this||_global3,arguments)}}();const isRoutedToRelayedTransitionComplete=e=>{const t=(this||_global3).session.sessionInfo.isAdaptiveEnabled;return t&&"P2P"===e.getSourceStreamId()};const onIceRestartSuccess=e=>{const t=getPeerConnectionMeta(e),n=t.remoteConnectionId;logRepublish("Success",{remoteConnectionId:n})};const onIceRestartFailure=e=>{const t=getPeerConnectionMeta(e),n=t.remoteConnectionId;logRepublish("Failure",{reason:"ICEWorkflow",message:"OT.Publisher PeerConnection Error: The stream was unable to connect due to a network error. Make sure your connection isn't blocked by a firewall.",remoteConnectionId:n})};const lt=function(){var e=(0,i.default)(o.default.mark((function _callee3(e,t){var r,i,a,s,c,l,u;return o.default.wrap((function _callee3$(o){while(1)switch(o.prev=o.next){case 0:r=n.session.sessionInfo.isAdaptiveEnabled;i=t.getSourceStreamId();Le[i]=e;"disconnected"===e&&setTimeout((()=>{const e=n.session._.isSocketReconnecting;const r=n.session._.getSocket();const o=r.is("connected")&&!e();if("disconnected"===Le[i]&&o){const e=getPeerConnectionMeta(t),n=e.remoteConnectionId;logRepublish("Attempt",{remoteConnectionId:n});t.iceRestart()}}),2e3);if(!("connected"===e)){o.next=14;break}clearTimeout(je);if(!r){o.next=14;break}o.next=9;return getMantisPeerConnection();case 9:a=o.sent.iceConnectionStateIsConnected();o.next=12;return getP2pPeerConnection();case 12:s=o.sent.iceConnectionStateIsConnected();a&&s&&dt();case 14:if(!("failed"===e)){o.next=21;break}c=n.session._.isSocketReconnecting;l=n.session._.getSocket();u=l.is("connected")&&!c();if(u){o.next=20;break}return o.abrupt("return");case 20:r&&i===De&&"P2P"===i?n._.startRelayedToRoutedTransition():je=setTimeout((()=>{n.session._.streamDestroy(n.streamId,i)}),Ue);case 21:case"end":return o.stop()}}),_callee3)})));return function onIceConnectionStateChange(t,n){return e.apply(this||_global3,arguments)}}();const onPeerConnected=e=>{isRoutedToRelayedTransitionComplete(e)&&rt("Success")};const assignStream=e=>{if("PublishingToSession"!==Ce.current)throw new Error("assignStream called when publisher is not successfully publishing");_.releaseAll();(this||_global3).stream=e;(this||_global3).stream.on("destroyed",(this||_global3).disconnect,this||_global3);_.add((()=>{(this||_global3).stream&&(this||_global3).stream.off("destroyed",(this||_global3).disconnect,this||_global3)}));Ce.set("Publishing");R.loading(!ze);Se=new Date;this.dispatchEvent(new te.StreamEvent("streamCreated",e,null,fal
2626se));nt("Success");this.trigger("publishComplete",null,this||_global3)};
2627/**
2628             * Provides the peer connection associated to the given peerConnectionId.
2629             *
2630             * It there is no PC associated it creates a new one and stores it so that the next call returns
2631             * the same instance.
2632             *
2633             * @param {Object} configuration
2634             * @param {string} configuration.peerConnectionId
2635             * @returns {Promise<Error, PublisherPeerConnection>}
2636             */const createPeerConnection=n=>{let r=n.peerConnectionId,o=n.send,i=n.log,a=n.logQoS,s=n.sourceStreamId;if(getPeerConnectionById(r))return t.reject(new Error("PeerConnection already exists"));const c=$({isChromiumEdge:le.env.isChromiumEdge,browserName:le.env.name,isScreenSharing:Ke,isCustomVideoTrack:Ze,sessionInfo:(this||_global3).session.sessionInfo,constraints:Qe.constraints,videoDimensions:getVideoDimensions()});He[r]=t.all([(this||_global3).session._.getIceConfig(),(this||_global3).session._.getVideoCodecsCompatible(P)]).then((n=>{let r=n[0],l=n[1];let u=P;if(!l){u=P.clone();const e=u.getVideoTracks(),t=e[0];if(t){t.stop();u.removeTrack(t)}}const d=new fe({iceConfig:r,sendMessage:(e,t)=>{"offer"===e&&this.trigger("connected");o(e,t)},webRTCStream:u,channels:Qe.channels,capableSimulcastStreams:c,overrideSimulcastEnabled:e._enableSimulcast,logAnalyticsEvent:i,offerOverrides:{enableDtx:Qe.enableDtx,enableStereo:Qe.enableStereo,audioBitrate:Qe.audioBitrate,priorityVideoCodec:Qe._priorityVideoCodec||(this||_global3).session.sessionInfo.priorityVideoCodec,codecFlags:Qe._codecFlags||(this||_global3).session._.getCodecFlags()},answerOverrides:(this||_global3).session.sessionInfo.p2pEnabled?void 0:{audioBitrate:Qe.audioBitrate},sourceStreamId:s,isP2pEnabled:(this||_global3).session.sessionInfo.p2pEnabled});d.on({disconnected:()=>onPeerDisconnected(d),error:e=>{let t=e.reason,n=e.prefix;return ct(d,{reason:t,prefix:n})}
2636,qos:a,iceRestartSuccess:()=>onIceRestartSuccess(d),iceRestartFailure:()=>onIceRestartFailure(d),iceConnectionStateChange:e=>lt(e,d),audioAcquisitionProblem:()=>{Ge=true;this.trigger("audioAcquisitionProblem",{method:"getStats"})}});d.once("connected",(()=>onPeerConnected(d)));return new t(((e,t)=>{const rejectOnError=e=>{t(e)};d.once("error",rejectOnError);d.init(we,(n=>{if(n)return t(n);d.off("error",rejectOnError);e(d)}))}))}));return getPeerConnectionById(r)};const getAllPeerConnections=()=>t.all(Object.keys(He).map(getPeerConnectionById));const getPeerConnectionsBySubscriber=e=>getAllPeerConnections().then((t=>t.filter((t=>getPeerConnectionMeta(t).remoteSubscriberId===e))));const getPeerConnectionById=e=>He[e];const getPeerConnectionBySourceStreamId=e=>{const t=Object.keys(He).find((t=>t.endsWith(`~${e}`)));return He[t]};const getMantisPeerConnection=()=>getPeerConnectionBySourceStreamId("MANTIS");const getP2pPeerConnection=()=>getPeerConnectionBySourceStreamId("P2P");let ut=Z(this||_global3,{name:Qe.name,publishAudio:Qe.publishAudio,publishVideo:Qe.publishVideo,audioSource:Qe.audioSource,showControls:Qe.showControls,shouldAllowAudio:Xe,logAnalyticsEvent:tt});const reset=()=>{this.off("publishComplete",refreshAudioVideoUI);ut&&ut.reset();_.releaseAll();this.disconnect();Te=null;cleanupLocalStream();P=null;if(R){R.destroy();R=null}(this||_global3).session&&(this||_global3)._.unpublishFromSession((this||_global3).session,"reset");(this||_global3).id=null;(this||_global3).stream=null;ze=false;(this||_global3).session=null;Ce.isDestroyed()||Ce.set("NotPublishing")};const hasVideo=()=>{if(!P||0===P.getVideoTracks().length)return false;const e=["text","detail"];const t=e.includes(Qe.videoContentHint);const n=Ze&&t;const r=le.env.isChrome&&(Ke||n);return P.getVideoTracks().reduce(((e,t)=>e&&(!t.muted||!!r)&&t.enabled&&"ended"!==t.readyState),Qe.publishVideo)};const hasAudio=()=>!(!P||0===P.getAudioTracks().length)&&(P.getAudioTracks().length>0&&P.getAudioTracks().reduce(((e,t)=>e&&!t.muted&&t.enabled&&"ended"!==t.readyState),Qe.publishAudio));const refreshAudioVideoUI=e=>{if(R){R.audioOnly(!hasVideo());R.showPoster(!hasVideo())}ut&&ut.setAudioOnly(!hasVideo()&&hasAudio());if((this||_global3).stream){(this||_global3).stream.setChannelActiveState("audio",hasAudio(),e);(this||_global3).stream.setChannelActiveState("video",hasVideo(),e)}else this.once("publishComplete",refreshAudioVideoUI)};const _getStatsWrapper=(e,n)=>{let r=false;"function"===typeof e?n=e:r="rtcStatsReport"===e;r?at():it();if(!r||W)getAllPeerConnections().then((e=>{if(0===e.length){const e=ne.PEER_CONNECTION_NOT_CONNECTED;throw se(ee.PEER_CONNECTION_NOT_CONNECTED,new Error(ce.getTitleByCode(e)),e)}return e})).then((e=>{const t=(this||_global3).session.sessionInfo.isAdaptiveEnabled;return t?e.filter((e=>e.getSourceStreamId()===De)):e})).then((e=>t.all(e.map((e=>C(r?e.getRtcStatsReport.bind(e):e.getStats.bind(e))().then((t=>({pc:e,stats:t})))))))).then((e=>{const t=Se?Se.getTime():Date.now();const o=e.map((e=>{let n=e.pc,o=e.stats;const i=getPeerConnectionMeta(n),a=i.remoteConnectionId,s=i.remoteSubscriberId;return l(a.match(/^symphony\./)?{}:{subscriberId:s,connectionId:a},r?{rtcStatsReport:o}:{stats:w.normalizeStats(o,false,t)})}));n(null,o)})).catch(n);else{const e=ne.GET_RTC_STATS_REPORT_NOT_SUPPORTED;n(se(ee.GET_RTC_STATS_REPORT_NOT_SUPPORTED,new Error(ce.getTitleByCode(e)),e))}};const _getStats=e=>_getStatsWrapper(e);const _getRtcStatsReport=e=>_getStatsWrapper("rtcStatsReport",e);const _createStream=(e,t)=>{(this||_global3).session._.streamCreate(Qe.name||"",(this||_global3).streamId,Qe.audioFallbackEnabled,Be,Qe.minVideoBitrate,e,t)};const dt=function(){var e=(0,i.default)(o.default.mark((function _callee4(){var e;return o.default.wrap((function _callee4$(t){while(1)switch(t.prev=t.next){case 0:Pe=false;t.next=3;return getMantisPeerConnection();case 3:e=t.sent;if(!e){t.next=16;break}n.trigger("sourceStreamIdChanged","P2P");t.next=8;return I(K);case 8:if(!Pe){t.next=11;break}ie.debug("Cancelling stop sending RTP to MANTIS.");return t.abrupt("return");case 11:t.next=13;return e.changeMediaDirectionToInactive();case 13:if(!(le.env.isFirefox&&le.env.version<96)){t.next=16;break}t.next=16;return pt();case 16:case"end":return t.stop()}}),_callee4)})));return function _stopSendingRtpToMantis(){return e.apply(this||_global3,arguments)}}();
2636const ft=function(){var e=(0,i.default)(o.default.mark((function _callee5(){var e;return o.default.wrap((function _callee5$(t){while(1)switch(t.prev=t.next){case 0:Pe=true;t.next=3;return getMantisPeerConnection();case 3:e=t.sent;if(!e){t.next=9;break}t.next=7;return e.changeMediaDirectionToRecvOnly();case 7:Ne&&clearTimeout(Ne);n.trigger("sourceStreamIdChanged","MANTIS");case 9:case"end":return t.stop()}}),_callee5)})));return function _restartSendingRtpToMantis(){return e.apply(this||_global3,arguments)}}();const pt=function(){var e=(0,i.default)(o.default.mark((function _callee7(){var e;return o.default.wrap((function _callee7$(t){while(1)switch(t.prev=t.next){case 0:t.next=2;return getMantisPeerConnection();case 2:e=t.sent;e&&(Ne=setTimeout((0,i.default)(o.default.mark((function _callee6(){return o.default.wrap((function _callee6$(t){while(1)switch(t.prev=t.next){case 0:if(!("P2P"===De)){t.next=9;break}t.next=3;return e.changeMediaDirectionToRecvOnly();case 3:t.next=5;return I(K);case 5:t.next=7;return e.changeMediaDirectionToInactive();case 7:t.next=9;return pt();case 9:case"end":return t.stop()}}),_callee6)}))),J));case 4:case"end":return t.stop()}}),_callee7)})));return function _keepSendingRtcpToMantis(){return e.apply(this||_global3,arguments)}}();(this||_global3).publish=e=>{ie.debug("OT.Publisher: publish");(Ce.isAttemptingToPublish()||Ce.isPublishing())&&reset();Ce.set("GetUserMedia");Qe.style&&this.setStyle(Qe.style,null,true);Qe.classNames="OT_root OT_publisher";Q.onLoad((()=>{ie.debug("OT.Publisher: publish: environment loaded");R=new ve(e,(0,a.default)({},Qe,{widgetType:"publisher"}));Xe&&M({publisher:this||_global3,widgetView:R});R.on("error",onVideoError);(this||_global3).id=R.domId();(this||_global3).element=R.domElement;(this||_global3).element&&ut&&ut.init(R);R.on("videoDimensionsChanged",((e,t)=>{(this||_global3).stream&&(this||_global3).stream.setVideoDimensions(t.width,t.height);this.dispatchEvent(new te.VideoDimensionsChangedEvent(this||_global3,e,t))}));R.on("mediaStopped",(e=>{const t=new te.MediaStoppedEvent(this||_global3,e);this.dispatchEvent(t);if(!t.isDefaultPrevented())if(e){const t=String(e.kind).toLowerCase();"audio"===t?updateAudio():"video"===t?updateVideo():ie.warn(`Track with invalid kind has ended: ${e.kind}`)}else(this||_global3).session?(this||_global3)._.unpublishFromSession((this||_global3).session,"mediaStopped"):this.destroy("mediaStopped")}));R.on("videoElementCreated",(e=>{const t=new te.VideoElementCreatedEvent(e);this.dispatchEvent(t)}));et().catch(userMediaError).then((e=>{xe=qe.audioDevices;Ie=qe.videoDevices;onStreamAvailable(e);Qe.publishVideo||this._toggleVideo(Qe.publishVideo);Ke||Ze||(bt=H(e,Ie));return st().catch((e=>{if(!(e instanceof y))throw e})).then((()=>{onLoaded();if(!Ce.isDestroyed()){this.trigger("initSuccess");this.trigger("loaded",this||_global3)}}),(e=>{ie.error(`OT.Publisher.publish failed to bind video: ${e}`);onLoadFailure(e)}))}))}));return this||_global3};(this||_global3)._setScalableValues=function(){var e=(0,i.default)(o.default.mark((function _callee8(e,t){var n,r,i;return o.default.wrap((function _callee8$(o){while(1)switch(o.prev=o.next){case 0:o.next=2;return getAllPeerConnections().then((e=>e[0].getSenders().filter((e=>{let t=e.track.kind;return"video"===t}))));case 2:n=o.sent;r=n[0];i=r.getParameters();
2636i.encodings.forEach(((n,r)=>{n[e]=t[r]}));o.next=8;return r.setParameters(i);case 8:case"end":return o.stop()}}),_callee8)})));return function(t,n){return e.apply(this||_global3,arguments)}}();(this||_global3)._setScalableFramerates=function(){var e=(0,i.default)(o.default.mark((function _callee9(e){var t;return o.default.wrap((function _callee9$(r){while(1)switch(r.prev=r.next){case 0:t=normalizeScalableValues(e);if(!(t&&areValidFramerates(t))){r.next=4;break}r.next=4;return n._setScalableValues("maxFramerate",t);case 4:case"end":return r.stop()}}),_callee9)})));return function(t){return e.apply(this||_global3,arguments)}}();(this||_global3)._setScalableVideoLayers=function(){var e=(0,i.default)(o.default.mark((function _callee10(e){var t;return o.default.wrap((function _callee10$(r){while(1)switch(r.prev=r.next){case 0:t=normalizeScalableValues(e);if(!(t&&areValidResolutionScales(t))){r.next=4;break}r.next=4;return n._setScalableValues("scaleResolutionDownBy",t);case 4:case"end":return r.stop()}}),_callee10)})));return function(t){return e.apply(this||_global3,arguments)}}();const areValidFramerates=e=>{let t=0;return e.every((e=>{if(15!==e&&30!==e||e<t)return false;t=e;return true}))};const areValidResolutionScales=e=>{let t=17;return e.every((e=>{if(e<1||e>=t)return false;t=e;return true}))};const normalizeScalableValues=e=>{let t;if("string"!==typeof e)return t;const n=e.split(":");if(0===n.length||n.length>3)return t;if(!n.every((e=>!isNaN(e))))return t;t=n.map((e=>parseInt(e,10))).reverse();return t};const haveWorkingTracks=e=>P&&P[`get${v(e)}Tracks`]().length>0&&P[`get${v(e)}Tracks`]().every((e=>"ended"!==e.readyState));const updateAudio=e=>{const t=haveWorkingTracks("audio")&&Qe.publishAudio;ut&&ut.setMuted(!t);Te&&Te.muted(!t);refreshAudioVideoUI(e)};
2637/**
2638            * Starts publishing audio (if it is currently not being published)
2639            * when the <code>value</code> is <code>true</code>; stops publishing audio
2640            * (if it is currently being published) when the <code>value</code> is <code>false</code>.
2641            *
2642            * @param {Boolean} value Whether to start publishing audio (<code>true</code>)
2643            * or not (<code>false</code>).
2644            *
2645            * @see <a href="OT.html#initPublisher">OT.initPublisher()</a>
2646            * @see <a href="Stream.html#hasAudio">Stream.hasAudio</a>
2647            * @see StreamPropertyChangedEvent
2648            * @method #publishAudio
2649            * @memberOf Publisher
2650            */(this||_global3).publishAudio=e=>{tt("publishAudio","Attempt",{publishAudio:e});Qe.publishAudio=e;try{updateAudio();tt("publishAudio","Success",{publishAudio:e})}catch(e){tt("publishAudio","Failure",{message:e.message})}return this||_global3};let gt;let ht=false;const updateVideo=()=>{const e=haveWorkingTracks("video")&&Qe.publishVideo;"Chrome"===S.name&&S.version>=69&&(0,i.default)(o.default.mark((function _callee11(){var t,n;return o.default.wrap((function _callee11$(r){while(1)switch(r.prev=r.next){case 0:gt&&gt.cancel();gt=new E;t=gt;r.next=5;return getAllPeerConnections();case 5:n=r.sent;t.isCanceled()||n.forEach((t=>{ye(t,e)}));case 7:case"end":return r.stop()}}),_callee11)})))();P&&P.getVideoTracks().forEach((t=>{t.enabled=e;t.isCreatedCanvas&&(t.enabled=false)}));refreshAudioVideoUI()};let bt;(this||_global3)._toggleVideo=L(function(){var e=(0,i.default)(o.default.mark((function _callee12(e){var t,n,i,a,s,c;return o.default.wrap((function _callee12$(o){while(1)switch(o.prev=o.next){case 0:if(!(Ke||Ze||ht)){o.next=2;break}return o.abrupt("return");case 2:t=getCurrentTrack();if(t){o.next=5;break}throw se(ee.NOT_SUPPORTED,new Error("Publisher._toggleVideo cannot toggleVideo when you have no video source."));case 5:if(!("ended"===t.readyState)){o.next=8;break}ht=true;return o.abrupt("return");case 8:n=Qe.videoDimensions,i=void 0===n?getVideoDimensions():n;o.prev=9;a=V(i);o.next=16;break;case 13:o.prev=13;o.t0=o.catch(9);return o.abrupt("return");case 16:o.next=18;return yt();case 18:s=o.sent;e&&le.env.isAndroid&&le.env.isChrome&&t&&t.stop&&t.stop();e||(bt=s.find((e=>e.label===t.label)).deviceId);if(!(bt&&-1===s.findIndex((e=>e.deviceId===bt)))){o.next=23;break}throw se(ee.NO_DEVICES_FOUND,new Error("Previous device no longer available - deviceId n
2650ot found"));case 23:r.emit("streamDestroy");if(!e){o.next=30;break}o.next=27;return _t(bt);case 27:o.t1=o.sent;o.next=31;break;case 30:o.t1=a;case 31:c=o.t1;o.next=34;return mt(t,c);case 34:case"end":return o.stop()}}),_callee12,null,[[9,13]])})));return function(t){return e.apply(this||_global3,arguments)}}());
2651/**
2652            * Starts publishing video (if it is currently not being published)
2653            * when the <code>value</code> is <code>true</code>; stops publishing video
2654            * (if it is currently being published) when the <code>value</code> is <code>false</code>.
2655            *
2656            * @param {Boolean} value Whether to start publishing video (<code>true</code>)
2657            * or not (<code>false</code>).
2658            *
2659            * @see <a href="OT.html#initPublisher">OT.initPublisher()</a>
2660            * @see <a href="Stream.html#hasVideo">Stream.hasVideo</a>
2661            * @see StreamPropertyChangedEvent
2662            * @method #publishVideo
2663            * @memberOf Publisher
2664            */(this||_global3).publishVideo=e=>{tt("publishVideo","Attempt",{publishVideo:e});Qe.publishVideo=e;try{this._toggleVideo(Qe.publishVideo);updateVideo();tt("publishVideo","Success",{publishVideo:e})}catch(e){tt("publishVideo","Failure",{message:e.message})}return this||_global3};
2665/**
2666            * Sets the content hint for the video track of the publisher's stream. This allows browsers
2667            * to use encoding or processing methods more appropriate to the type of content.
2668            * <p>
2669            * Use this method to change the video content hit dynamically. Set the initial video content
2670            * hit by setting the <code>videoContentHint</code> property of the options passed into the
2671            * <a href="OT.html#initPublisher">OT.initPublisher()</a> method.
2672            * <p>
2673            * Chrome 60+, Safari 12.1+, Edge 79+, and Opera 47+ support video content hints.
2674            *
2675            * @param {String} videoContentHint You can set this to one of the following values:
2676            *    <p>
2677            *    <ul>
2678            *      <li>
2679            *        <code>""</code> &mdash; No hint is provided.
2680            *      </li>
2681            *      <li>
2682            *        <code>"motion"</code> &mdash; The track should be treated as if it contains video
2683            *        where motion is important.
2684            *      </li>
2685            *      <li>
2686            *        <code>"detail"</code> &mdash; The track should be treated as if video details
2687            *        are extra important.
2688            *      </li>
2689            *      <li>
2690            *        <code>"text"</code> &mdash; The track should be treated as if text details are
2691            *        extra important.
2692            *      </li>
2693            *    </ul>
2694            *
2695            * @see <a href="#getVideoContentHint">Publisher.getVideoContentHint()</a>
2696            * @see <a href="OT.html#initPublisher">OT.initPublisher()</a>
2697            * @method #setVideoContentHint
2698            * @memberOf Publisher
2699            */(this||_global3).setVideoContentHint=e=>G(P,e);(this||_global3).getVideoContentHint=()=>q(P);(this||_global3).destroy=function(e,t){Ce.isAttemptingToPublish()&&(this||_global3).session&&nt("Cancel",{reason:"destroy"});if(Ce.isDestroyed())return this||_global3;Ce.set("Destroyed");reset();if(qe){qe.off();qe=null}if(ut){ut.destroy();ut=null}if(r){r.off();r=null}true!==t&&this.dispatchEvent(new te.DestroyedEvent(O.PUBLISHER_DESTROYED,this||_global3,e));this.off();return this||_global3};(this||_global3).disconnect=()=>{Object.keys(He).forEach((e=>{const t=getPeerConnectionById(e);delete He[e];t.then((e=>this._removePeerConnection(e)))}))};(this||_global3).processMessage=(e,t,n)=>{const r=s(n,"params.subscriber",t).replace(/^INVALID-STREAM$/,t);const o=s(n,"content.peerId");const i=s(n,"content.sourceStreamId","MANTIS");const c=`${r}~${o}~${i}`;ie.debug(`OT.Publisher.processMessage: Received ${e} from ${t} for ${c}`);ie.debug(n);const l=getPeerConnectionById(c);const addPeerConnection=()=>{const s=_e({socket:(this||_global3).session._.getSocket(),uri:n.uri,content:{peerId:o,sourceStreamId:i}});
2699const l=function log(e,t,n,r,s){void 0===r&&(r={});const c=(0,a.default)({peerId:o,sourceStreamId:Y(i)},r);return tt(e,t,n,c,s)};const logQoS=e=>{i===De&&recordQOS((0,a.default)({},e,{peerId:o,remoteConnectionId:t,sourceStreamId:i}))};createPeerConnection({peerConnectionId:c,send:s,log:l,logQoS:logQoS,sourceStreamId:i}).then((a=>{setPeerConnectionMeta(a,{remoteConnectionId:t,remoteSubscriberId:r,peerId:o,sourceStreamId:i,peerConnectionId:c});a.processMessage(e,n);return null})).catch((e=>{ie.error("OT.Publisher failed to create a peerConnection",e)}))};const u=(this||_global3).session.sessionInfo.isAdaptiveEnabled;switch(e){case"unsubscribe":this._removeSubscriber(r);break;default:if(l)l.then((t=>t.processMessage(e,n)));else{if(u&&getP2pPeerConnection())return;addPeerConnection()}break}};(this||_global3).getImgData=function(){if(!ze){ie.error("OT.Publisher.getImgData: Cannot getImgData before the Publisher is publishing.");return null}const e=R&&R.video();return e?e.imgData():null};const setNewStream=e=>{cleanupLocalStream();P=e;r.emit("streamChange");Te=new ae(P,!Qe.publishAudio)};const defaultReplaceTrackLogic=e=>{e.getSenders().forEach((e=>"audio"===e.track.kind&&P.getAudioTracks().length?e.replaceTrack(P.getAudioTracks()[0]):"video"===e.track.kind&&P.getVideoTracks().length?e.replaceTrack(P.getVideoTracks()[0]):void 0))};const vt=function replaceTracks(e){void 0===e&&(e=defaultReplaceTrackLogic);return getAllPeerConnections().then((n=>{const r=[];n.map(e);return t.all(r)}))};{let e=0;(this||_global3).cycleVideo=L((0,i.default)(o.default.mark((function _callee13(){var t,n,i,a,s;return o.default.wrap((function _callee13$(o){while(1)switch(o.prev=o.next){case 0:if(!(le.env.isLegacyEdge||!me.RTCRtpSender||"function"!==typeof me.RTCRtpSender.prototype.replaceTrack)){o.next=2;break}throw se(ee.UNSUPPORTED_BROWSER,new Error("Publisher#cycleVideo is not supported in your browser."),ne.UNABLE_TO_PUBLISH);case 2:if(!(Ze||Ke)){o.next=4;break}throw se(ee.NOT_SUPPORTED,new Error("Publisher#cycleVideo: The publisher is not using a camera video source"));case 4:t=getCurrentTrack();if(t){o.next=7;break}throw se(ee.NOT_SUPPORTED,new Error("Publisher#cycleVideo cannot cycleVideo when you have no video source."));case 7:e+=1;o.next=10;return yt();case 10:n=o.sent;i=n.filter((e=>e.label!==t.label)).length>0;if(i)while(n[e%n.length].label===t.label)e+=1;r.emit("streamDestroy");a=n[e%n.length];s=a.deviceId;o.next=18;return wt(s);case 18:return o.abrupt("return",{deviceId:bt});case 19:case"end":return o.stop()}}),_callee13)}))))}const mt=function(){var e=(0,i.default)(o.default.mark((function _callee14(e,i){var a,s;return o.default.wrap((function _callee14$(o){while(1)switch(o.prev=o.next){case 0:o.next=2;return getAllPeerConnections();case 2:a=o.sent;o.next=5;return t.all(a.map((t=>t.findAndReplaceTrack(e,i))));case 5:P.addTrack(i);P.removeTrack(e);e&&e.stop&&e.stop();if("Firefox"===le.env.name||"Safari"===le.env.name){n.videoElement().srcObject=null;n.videoElement().srcObject=P}s=R&&R.video();s&&s.refreshTracks();r.emit("streamChange");updateVideo();case 13:case"end":return o.stop()}}),_callee14)})));return function replaceTrackAndUpdate(t,n){return e.apply(this||_global3,arguments)}}();const _t=function(){var t=(0,i.default)(o.default.mark((function _callee15(t){var n,r,i,a;return o.default.wrap((function _callee15$(o){while(1)switch(o.prev=o.next){case 0:n=u(e);n.audioSource=null;n.videoSource=t;qe=Ee(n,"OT.Publisher.getTrackFromDeviceId",(()=>Ce&&Ce.isDestroyed()));qe.on({accessDialogOpened:onAccessDialogOpened,accessDialogClosed:onAccessDialogClosed});r=qe,i=r.getUserMedia;o.prev=6;o.next=9;return i();case 9:a=o.sent;o.next=15;break;case 12:o.prev=12;o.t0=o.catch(6);ie.error(o.t0);case 15:return o.abrupt("return",a&&a.getVideoTracks()[0]);case 16:case"end":return o.stop()}}),_callee15,null,[[6,12]])})));return function getTrackFromDeviceId(e){return t.apply(this||_global3,arguments)}}();const getCurrentTrack=()=>{const e=P.getVideoTracks(),t=e[0];return t};const yt=function(){var e=(0,i.default)(o.default.mark((function _callee16(){var e,t;return o.default.wrap((function _callee16$(n){while(1)switch(n.prev=n.next){case 0:n.next=2;return X.shouldAskForDevices();case 2:e=n.sent;t=e.videoDevices;if(!(!e.video||!t||!t.length)){n.next=6;break}throw se(ee.NO_DEVICES_FOUND,new Error("No video devices available"),ne.UNABLE_TO_PUBLISH);case 6:return n.abrupt("return",t);case 7:case"end":return n.stop()}}),_callee16)})));return function getVideoDevices(){return e.apply(this||_global3,arguments)}}();const replaceAudioTrack=(e,t)=>{t&&P.addTrack(t);e&&P.removeTrack(e);const n=R&&R.video();n&&n.refreshTracks();if(ut){t&&!e&&ut.addAudioTrack();e&&!t&&ut.removeAudioTrack()}e&&e.stop&&e.stop();if(t){updateAudio();Te=new ae(P,!Qe.publishAudio)}r.emit("streamChange");refreshAudioVideoUI()};const Et=function(){var e=(0,i.default)(o.default.mark((function _callee17(e){var t,r;return o.default.wrap((function _callee17$(o){while(1)switch(o.prev=o.next){case 0:t=e.getSettings().deviceId;o.prev=1;o.next=4;return n.setAudioSource(t);case 4:r=P.getAudioTracks()[0];if(r){r.onmute=()=>handleBuggedMutedLocalAudioTrack(r);r.onunmute=()=>handleBuggedUnMutedLocalAudioTrack(r)}o.next=11;break;case 8:o.prev=8;o.t0=o.catch(1);ie.error(o.t0);case 11:case"end":return o.stop()}}),_callee17,null,[[1,8]])})));return function resetAudioSource(t){return e.apply(this||_global3,arguments)}}();const handleBuggedMutedLocalAudioTrack=e=>{let t=false;if(Qe.publishVideo&&document.hidden){t=true;this.publishVideo(false)}const r=function(){var a=(0,i.default)(o.default.mark((function _callee18(){return o.default.wrap((function _callee18$(o){while(1)switch(o.prev=o.next){case 0:if(document.hidden){o.next=5;break}o.next=3;return Et(e);case 3:t&&n.publishVideo(true);document.removeEventListener("visibilitychange",r);case 5:case"end":return o.stop()}}),_callee18)})));return function visibilityHandler(){return a.apply(this||_global3,arguments)}}();document.addEventListener("visibilitychange",r)};const handleBuggedUnMutedLocalAudioTrack=e=>{hasAudio()&&(hasVideo()?this.videoElement().pause():Et(e));(this||_global3).session.trigger("gsmCallEnded")};
2700/**
2701            * Switches the audio input source used by the publisher. You can set the
2702            * <code>audioSource</code> to a device ID (string) or audio MediaStreamTrack object.
2703            * <p>
2704            * This will result in an error (the Promise returned by the method is rejected) in the
2705            * following conditions:
2706            * <ul>
2707            *   <li>
2708            *     The browser does not support this method. This method is not supported in
2709            *     Internet Explorer or non-Chromium versions of Edge (older than version 79).
2710            *   </li>
2711            *   <li>
2712            *     The publisher was not initiated with an audio source. (The <code>audioSource</code>
2713            *     option of the <a href="OT.html#initPublisher">OT.initPublisher()</a> method was
2714            *     set to <code>null</code> or <code>false</code>).
2715            *   </li>
2716            *   <li>
2717            *     The user denied access to the audio input device.
2718            *   </li>
2719            *   <li>
2720            *     There was an error acquiring audio from the audio input device or MediaStreamTrack
2721            *     object.
2722            *   </li>
2723            *   <li>
2724            *     The <code>audioSource</code> value is not a string or MediaStreamTrack object.
2725            *   </li>
2726            *   <li>
2727            *     The <code>audioSource</code> string is not a valid audio input device available
2728            *     to the browser.
2729            *   </li>
2730            *  </ul>
2731            * </p>
2732            *
2733            * @param {Object} audioSource The device ID (string) of an audio input device, or an audio
2734            * MediaStreamTrack object.
2735            *
2736            * @method #setAudioSource
2737            * @memberOf Publisher
2738            *
2739            * @see <a href="#getAudioSource">Publisher.getAudioSource()</a>
2740            *
2741            * @return {Promise} A promise that resolves when the operation completes successfully.
2742            * If there is an error, the promise is rejected.
2743            */let St;const Tt=function(){var r=(0,i.default)(o.default.mark((function _callee19(r){var i,a,s,c,l,d,f,p,g,h,b,v,m;return o.default.wrap((function _callee19$(o){while(1)switch(o.prev=o.next){case 0:i="Operation did not succeed due to a new request.";St&&St.cancel();St=new E;a=St;s=e=>{if(a.isCanceled()){e.getTracks((e=>e.stop()));throw se(ee.CANCEL,new Error(i))}return Tt(e.getAudioTracks()[0])};if(!(le.env.isLegacyEdge||!me.RTCRtpSender||"function"!==typeof me.RTCRtpSender.prototype.replaceTrack)){o.next=7;break}throw se(ee.UNSUPPORTED_BROWSER,new Error("Publisher#setAudioSource is not supported in your browser."));case 7:c=n.getAudioSource();if(c){o.next=10;break}throw se(ee.NOT_SUPPORTED,new Error("Publisher#setAudioSource cannot add an audio source when you started without one."));case 10:if(!(r instanceof MediaStreamTrack)){o.next=21;break}o.next=13;return getAllPeerConnections();case 13:l=o.sent;if(!a.isCanceled()){o.next=16;break}throw se(ee.CANCEL,new Error(i));case 16:o.next=18;return t.all(l.map((e=>e.findAndReplaceTrack(c,r))));case 18:return o.abrupt("return",replaceAudioTrack(c,r));case 21:if(!("string"===typeof r)){o.next=68;break}d=u(e);d.audioSource=r;d.videoSource=null;qe=Ee(d,"OT.Publisher.setAudioSource",(()=>a.isCanceled()||Ce&&Ce.isDestroyed()));qe.on({accessDialogOpened:onAccessDialogOpened,accessDialogClosed:onAccessDialogClosed});f=c.label;p=c.getConstraints&&c.getSettings().deviceId||void 0;c&&c.stop();g=qe,h=g.getUserMedia;o.prev=31;o.t0=s;o.next=35;return h();case 35:o.t1=o.sent;o.next=38;return(0,o.t0)(o.t1);case 38:return o.abrupt("return",o.sent);case 41:o.prev=41;o.t2=o.catch(31);if(!a.isCanceled()){o.next=45;break}throw se(ee.CANCEL,new Error(i));case 45:b=u(e);b.videoSource=null;b.audioSource=p;if(!(!b.audioSource&&f)){o.next=55;break}o.next=51;return F();case 51:v=o.sent.find((e=>e.label===f));if(!a.isCanceled()){o.next=54;break}throw se(ee.CANCEL,new Error(i));case 54:v&&(b.audioSource=v.deviceId);case 55:if(b.audioSource){o.next=58;break}o.t2.message+=" (could not determine previous audio device)";throw se(ee.NOT_FOUND,o.t2);case 58:qe=Ee(b,"OT.Publisher.setAudioSource",(()=>a.isCanceled()||Ce&&Ce.isDestroyed()));o.next=61;return qe.getUserMedia().catch((e=>{e.message+=" (could not obtain previous audio device)";throw e}));case 61:m=o.sent;o.next=64;return s(m);case 64:o.t2.message+=" (reverted to previous audio device)";throw o.t2;case 66:o.next=69;break;case 68:throw se(ee.INVALID_PARAMETER,new Error("Invalid parameter passed to OT.Publisher.setAudioSource(). Expected string or MediaStreamTrack."));case 69:case"end":return o.stop()}}),_callee19,null,[[31,41]])})));return function setAudioSource(e){return r.apply(this||_global3,arguments)}}();(this||_global3).setAudioSource=Tt;(this||_global3).getAudioSource=()=>P&&P.getAudioTracks().length>0?P.getAudioTracks()[0]:null;
2744/**
2745             * This method sets the video source for a publisher that is using a camera.
2746             * Pass in the device ID of the new video source.
2747             *
2748             * <p>
2749             * The following will result in errors:
2750             *
2751             * <ul>
2752             * <li>If the <code>videoSourceId</code> parameter is not a string
2753             * or the device ID for a valid video input device, the promise
2754             * will reject with an error with the <code>name</code> property
2755             * set to <code>'OT_INVALID_VIDEO_SOURCE'</code>.
2756             * </li>
2757             *
2758             * <li>If the publisher does not currently use a camera input, the promise
2759             * will reject with an error with the <code>name</code> property
2760             * set to <code>'OT_SET_VIDEO_SOURCE_FAILURE'</code>.
2761             * </li>
2762             * </ul>
2763             *
2764             * @param {String} videoSourceId The device ID of a video input (camera) device.
2765             * @method #setVideoSource
2766             * @memberOf Publisher
2767             *
2768             * @see <a href="OT.html#getDevices">OT.getDevices()</a>
2769             * @see <a href="#getVideoSource">Publisher.getVideoSource()</a>
2770             * @see <a href="#cycleVideo">Publisher.cycleVideo()</a>
2771             *
2772             * @return {Promise} A promise that resolves with no value when the operation
2773             * completes successfully. If there is an error, the promise is rejected.
2774             */const Ct=function(){var e=(0,i.default)(o.default.mark((function _callee20(e){var t,n,r,i,a;return o.default.wrap((function _callee20$(o){while(1)switch(o.prev=o.next){case 0:t=se(ee.INVALID_VIDEO_SOURCE,new Error("Invalid video source. Video source must be a valid video input deviceId"),1041);n=se(ee.SET_VIDEO_SOURCE_FAILURE,new Error("You cannot reset the video source on a publisher that does not currently use a camera source."),1040);if(!(le.env.isLegacyEdge||!me.RTCRtpSender||"function"!==typeof me.RTCRtpSender.prototype.replaceTrack)){o.next=4;break}throw se(ee.UNSUPPORTED_BROWSER,new Error("setVideoSource is not supported in your browser."),ne.UNABLE_TO_PUBLISH);case 4:if(!("string"!==typeof e)){o.next=6;break}throw t;case 6:r=!P||0===P.getVideoTracks().length;if(!(Ze||Ke||r)){o.next=9;break}throw n;case 9:o.next=11;return F();case 11:i=o.sent;a=i.find((t=>"videoInput"===t.kind&&t.deviceId===e));if(a){o.next=15;break}throw t;case 15:o.next=17;return wt(e);case 17:case"end":return o.stop()}}),_callee20)})));function setVideoSource(t){return e.apply(this||_global3,arguments)}return setVideoSource}();(this||_global3).setVideoSource=Ct;const wt=function(){var e=(0,i.default)(o.default.mark((function _callee21(e){var t,n,r;return o.default.wrap((function _callee21$(o){while(1)switch(o.prev=o.next){case 0:t=bt;bt=e;if(Qe.publishVideo){o.next=4;break}return o.abrupt("return");case 4:n=getCurrentTrack();Qe.publishVideo&&le.env.isAndroid&&(le.env.isChrome||le.env.isFirefox)&&n&&n.stop&&n.stop();o.prev=6;o.next=9;return _t(e);case 9:r=o.sent;o.next=17;break;case 12:o.prev=12;o.t0=o.catch(6);bt=t;ie.error(o.t0);return o.abrupt("return");case 17:o.next=19;return mt(n,r);case 19:Qe.publishVideo&&(ht=false);case 20:case"end":return o.stop()}}),_callee21,null,[[6,12]])})));return function attemptToSetVideoTrack(t){return e.apply(this||_global3,arguments)}}();(this||_global3).getVideoSource=()=>{const e={};const t=!P||0===P.getVideoTracks().length;e.track=P&&Qe.publishVideo&&P.getVideoTracks()[0]||null;e.deviceId=Ke||Ze||!bt?null:bt;
2774e.type=Ze?"custom":Ke?"screen":t?null:"camera";return e};(this||_global3)._={publishToSession:(e,n)=>{n&&(T=n);Ve=e;(this||_global3).session=e;const r=b();k=r;(this||_global3).streamId=r;nt("Attempt",{dataChannels:Qe.channels,properties:N(Qe)});const o=new t(((e,t)=>{if(ze)e();else{this.once("initSuccess",e);this.once("destroyed",(e=>{let n=e.reason;let r="";n&&(r=` Reason: ${n}`);t(new Error(`Publisher destroyed before it finished loading.${r}`))}))}}));ie.debug("publishToSession: waiting for publishComplete, which is triggered by stream#created from rumor");const i=new t(((e,t)=>{this.once("publishComplete",(n=>{if(n)t(n);else{this._setScalableFramerates(Qe.scalableFramerates);this._setScalableVideoLayers(Qe.scalableVideoLayers);ie.debug("publishToSession: got publishComplete");e()}}))}));const processMessagingError=e=>{const t=z(e);nt("Failure",{},{failureReason:"Publish",failureCode:t.code,failureMessage:t.message});Ce.isAttemptingToPublish()&&this.trigger("publishComplete",t);ce.handleJsException({errorMsg:e.message,code:t.code,target:this||_global3,error:e,analytics:T});throw t};ie.debug("publishToSession: waiting for loaded");const a=o.then((()=>e._.getVideoCodecsCompatible(P))).then((n=>{ie.debug("publishToSession: loaded");if(!(this||_global3).session)return;const r=setTimeout((()=>{onPublishingTimeout(e)}),de);this.once("publishComplete",(()=>{clearTimeout(r)}));Ce.set("PublishingToSession");const o=n&&R&&R.video();const i=P.getVideoTracks().length>0;const a=null!==Qe.videoSource&&false!==Qe.videoSource;o&&i&&a&&Be.push(new ge({id:"video1",type:"video",active:Qe.publishVideo,orientation:be.ROTATED_NORMAL,frameRate:Qe.frameRate,width:o.videoWidth(),height:o.videoHeight(),source:(()=>Ke?"screen":Ze?"custom":"camera")(),fitMode:Qe.fitMode}));const s=P.getAudioTracks().length>0;const c=null!==Qe.audioSource&&false!==Qe.audioSource;c&&s&&Be.push(new ge({id:"audio1",type:"audio",active:Qe.publishAudio}));ie.debug("publishToSession: creating rumor stream id");return new t(((e,t)=>{_createStream(null,((n,r,o)=>{n?t(processMessagingError(n)):e({streamId:r,message:o})}))}))})).then((e=>{if(void 0===e)return;const t=e.streamId,n=e.message;ie.debug("publishToSession: rumor stream id created:",t,"(this is different from stream#created, which requires media to actually be flowing for mantis sessions)");if(t!==r)throw new Error("streamId response does not match request");(this||_global3).streamId=t;we=ue(n)})).catch((e=>{this.trigger("publishComplete",e);throw e}));return t.all([a,i])},unpublishFromSession:(e,t)=>{if(!(this||_global3).session||e.id!==(this||_global3).session.id){if("unpublished"===t){const t=(this||_global3).session&&(this||_global3).session.id||"no session";ie.warn(`The publisher ${We} is trying to unpublish from a session ${e.id} it is not attached to (it is attached to ${t})`)}return this||_global3}e.isConnected()&&((this||_global3).stream||Ce.isAttemptingToPublish())&&e._.streamDestroy((this||_global3).streamId);_.releaseAll();this.disconnect();if(Ce.isAttemptingToPublish()){nt("Cancel",{reason:"unpublish"});const createErrorFromReason=()=>{switch(t){case"mediaStopped":return"The video element fired the ended event, indicating there is an issue with the media";case"unpublished":return"The publisher was unpublished before it could be published";case"reset":return"The publisher was reset";default:return`The publisher was destroyed due to ${t}`}};const e=new Error(createErrorFromReason());this.trigger("publishComplete",se("mediaStopped"===t?ee.MEDIA_ENDED:ee.CANCEL,e))}(this||_global3).session=null;tt("unpublish","Success");(this||_global3)._.streamDestroyed(t);return this||_global3},unpublishStreamFromSession:(e,t,n)=>{if(!k||e.id!==k){ie.warn(`The publisher ${We} is trying to destroy a stream ${e.id} that is not attached to it (it has ${k||"no stream"} attached to it)`);return this||_global3}return(this||_global3)._.unpublishFromSession(t,n)},streamDestroyed:e=>{["reset"].indexOf(e)<0&&(Ce.isDestroyed()||Ce.set("MediaBound"));const t=new te.StreamEvent("streamDestroyed",(this||_global3).stream,e,true);this.dispatchEvent(t);t.isDefaultPrevented()||this.destroy()},archivingStatus(e){ut&&ut.setArchivingStatus(e);return e},webRtcStream(){return P},switchTracks(){return(0,i.default)(o.default.mark((function _callee22(){var e;return o.default.wrap((function _callee22$(t){while(1)switch(t.prev=t.next){case 0:t.prev=0;t.next=3;return et().catch(userMediaError);case 3:e=t.sent;t.next=10;break;case 6:t.prev=6;t.t0=t.catch(0);ie.error(`OT.Publisher.switchTracks failed to getUserMedia: ${t.t0}`);throw t.t0;case 10:setNewStream(e);t.prev=11;st();t.next=21;break;case 15:t.prev=15;t.t1=t.catch(11);if(!(t.t1 instanceof y)){t.next=19;break}return t.abrupt("return");case 19:ie.error("Error while binding video",t.t1);throw t.t1;case 21:t.prev=21;vt();t.next=29;break;case 25:t.prev=25;t.t2=t.catch(21);ie.error("Error replacing tracks",t.t2);throw t.t2;case 29:case"end":return t.stop()}}),_callee22,null,[[0,6],[11,15],[21,25]])})))()}
2774,getDataChannel(e,t,n){const r=getPeerConnectionById(Object.keys(He)[0]);r?r.then((r=>{r.getDataChannel(e,t,n)})):n(new le.Error("Cannot create a DataChannel before there is a subscriber."))},iceRestart(){getAllPeerConnections().then((e=>{e.forEach((e=>{const t=getPeerConnectionMeta(e),n=t.remoteConnectionId;logRepublish("Attempt",{remoteConnectionId:n});ie.debug("Publisher: ice restart attempt");e.iceRestart()}))}))},getState(){return Ce},demoOnlyCycleVideo:(this||_global3).cycleVideo,testOnlyGetFramesEncoded(){return(0,i.default)(o.default.mark((function _callee23(){var e;return o.default.wrap((function _callee23$(t){while(1)switch(t.prev=t.next){case 0:t.next=2;return getAllPeerConnections();case 2:e=t.sent;if(e.length){t.next=5;break}throw new Error("No established PeerConnections yet");case 5:return t.abrupt("return",e[0]._testOnlyGetFramesEncoded());case 6:case"end":return t.stop()}}),_callee23)})))()},onStreamAvailable:onStreamAvailable,startRoutedToRelayedTransition:()=>{rt("Attempt");const processMessagingError=e=>{const t=z(e);this.trigger("streamCreateForP2PComplete",t);rt("Failure",{reason:t.message})};if(!(this||_global3).session){rt("Failure",{reason:"Not connected to the session."});return}const e=setTimeout((()=>{rt("Failure",{reason:"Timeout"})}),de);this.once("streamCreateForP2PComplete",(()=>{clearTimeout(e)}));ie.debug(`streamCreateWithSource: send a message to RUMOR for creating the stream with the sourceStreaId P2P and stream ${(this||_global3).streamId}`);_createStream("P2P",(e=>{e?processMessagingError(e):this.trigger("streamCreateForP2PComplete")}))},startRelayedToRoutedTransition:function(){var e=(0,i.default)(o.default.mark((function _callee24(){return o.default.wrap((function _callee24$(e){while(1)switch(e.prev=e.next){case 0:ot("Attempt");if(n.session){e.next=4;break}ot("Failure",{reason:"Not connected to the session."});return e.abrupt("return");case 4:if(n.streamId){e.next=7;break}ot("Failure",{reason:"No streamId available"});return e.abrupt("return");case 7:if(getP2pPeerConnection()){e.next=10;break}ot("Failure",{reason:"There is no Relayed Peer connection created."});return e.abrupt("return");case 10:n.session._.streamDestroy(n.streamId,"P2P");e.t0=n;e.next=14;return getP2pPeerConnection();case 14:e.t1=e.sent;e.t0._removePeerConnection.call(e.t0,e.t1);e.next=18;return ft();case 18:ot("Success");n.trigger("streamDestroyForP2PComplete");case 20:case"end":return e.stop()}}),_callee24)})));function startRelayedToRoutedTransition(){return e.apply(this||_global3,arguments)}return startRelayedToRoutedTransition}(),forceMuteAudio:function(){tt("publishAudio","Attempt",{publishAudio:false});Qe.publishAudio=false;try{updateAudio("auto");this.dispatchEvent(new te.MuteForcedEvent);tt("publishAudio","Success",{publishAudio:false})}catch(e){tt("publishAudio","Failure",{message:e.message})}}.bind(this||_global3)};(this||_global3).detectDevices=function(){ie.warn("Publisher.detectDevices() is not implemented.")};(this||_global3).detectMicActivity=function(){ie.warn("Publisher.detectMicActivity() is not implemented.")};(this||_global3).getEchoCancellationMode=function(){ie.warn("Publisher.getEchoCancellationMode() is not implemented.");return"fullDuplex"};(this||_global3).setMicrophoneGain=function(){ie.warn("Publisher.setMicrophoneGain() is not implemented.")};(this||_global3).getMicrophoneGain=function(){ie.warn("Publisher.getMicrophoneGain() is not implemented.");return.5};(this||_global3).setCamera=function(){ie.warn("Publisher.setCamera() is not implemented.")};(this||_global3).setMicrophone=function(){ie.warn("Publisher.setMicrophone() is not implemented.")};(this||_global3).guid=function(){return We};(this||_global3).videoElement=function(){const e=R&&R.video();return e?e.domElement():null};(this||_global3).setStream=assignStream;(this||_global3).isWebRTC=true;(this||_global3).isLoading=function(){return R&&R.loading()};(this||_global3).videoWidth=function(){const e=R&&R.video();return e?e.videoWidth():void 0};(this||_global3).videoHeight=function(){const e=R&&R.video();return e?e.videoHeight():void 0};
2775/**
2776            *  Returns the details on the publisher's stream quality, including the following:
2777            *
2778            * <ul>
2779            *
2780            *   <li>The total number of audio and video packets lost</li>
2781            *   <li>The total number of audio and video packets sent</li>
2782            *   <li>The total number of audio and video bytes sent</li>
2783            *   <li>The current video frame rate</li>
2784            *
2785            * </ul>
2786            *
2787            * You can use these stats to assess the quality of the publisher's audio-video stream.
2788            *
2789            * @param {Function} completionHandler A function that takes the following
2790            * parameters:
2791            *
2792            * <ul>
2793            *
2794            *   <li><code>error</code> (<a href="Error.html">Error</a>) &mdash; Upon successful completion
2795            *   the method, this is undefined. An error results if the publisher is not connected to a
2796            *   session or if it is not publishing audio or video.</li>
2797            *
2798            *   <li><code>statsArray</code> (Array) &mdash; An array of objects defining the current
2799            *   audio-video statistics for the publisher. For a publisher in a routed session (one that
2800            *   uses the <a href="http://tokbox.com/opentok/tutorials/create-session/#media-mode">OpenTok
2801            *   Media Router</a>), this array includes one object, defining the statistics for the single
2802            *   audio-media stream that is sent to the OpenTok Media Router. In a relayed session, the
2803            *   array includes an object for each subscriber to the published stream. Each object in the
2804            *   array contains a <code>stats</code> property that includes the following properties:
2805            *
2806            *     <p>
2807            *     <ul>
2808            *       <li><code>audio.bytesSent</code> (Number) &mdash; The total number of audio bytes
2809            *         sent to the subscriber (or to the OpenTok Media Router)</li>
2810            *
2811            *       <li><code>audio.packetsLost</code> (Number) &mdash; The total number audio packets
2812            *        that did not reach the subscriber (or to the OpenTok Media Router)</li>
2813            *
2814            *       <li><code>audio.packetsSent</code> (Number) &mdash; The total number of audio
2815            *        packets sent to the subscriber (or to the OpenTok Media Router)</li>
2816            *
2817            *       <li><code>timestamp</code> (Number) &mdash; The timestamp, in milliseconds since
2818            *         the Unix epoch, for when these stats were gathered</li>
2819            *
2820            *       <li><code>video.bytesSent</code> (Number) &mdash; The total video bytes sent to
2821            *         the subscriber (or to the OpenTok Media Router)</li>
2822            *
2823            *       <li><code>video.packetsLost</code> (Number) &mdash; The total number of video packets
2824            *         that did not reach the subscriber (or to the OpenTok Media Router)</li>
2825            *
2826            *       <li><code>video.packetsSent</code> (Number) &mdash; The total number of video
2827            *         packets sent to the subscriber</li>
2828            *
2829            *       <li><code>video.frameRate</code> (Number) &mdash; The current video frame rate</li>
2830            *     </ul>
2831            *
2832            *     <p>Additionally, for a publisher in a relayed session, each object in the array contains
2833            *     the following two properties:
2834            *
2835            *     <ul>
2836            *       <li><code>connectionId</code> (String) &mdash; The unique ID of the client's
2837            *       connection, which matches the <code>id</code> property of the <code>connection</code>
2838            *       property of the <a href="Session.html#.event:connectionCreated">connectionCreated</a>
2839            *       event that the Session object dispatched for the remote client.</li>
2840            *
2841            *       <li><code>subscriberId</code> (String) &mdash; The unique ID of the subscriber, which
2842            *       matches the <code>id</code> property of the Subscriber object in the subscribing
2843            *       client's app.</li>
2844            *     </ul>
2845            *
2846            *     <p>These two properties are undefined for a publisher in a routed session.
2847            *
2848            *   </li>
2849            * </ul>
2850            *
2851            * @see <a href="Subscriber.html#getStats">Subscriber.getStats()</a>
2852            * @see <a href="#getRtcStatsReport">Publisher.getRtcStatsReport()</a>
2853            *
2854            * @method #getStats
2855            * @memberOf Publisher
2856            */(this||_global3).getStats=function getStats(e){_get
2856Stats(((t,n)=>{t?e(t):e(null,n)}))};(this||_global3).getRtcStatsReport=()=>new t(((e,t)=>{_getRtcStatsReport(((n,r)=>{n?t(n):e(r)}))}));Ce=new pe(stateChangeFailed);(this||_global3).accessAllowed=false};return Se}}).call(this||_global3,n(0))},function(e,t,n){const r=n(60).once;e.exports=function Capabilities(e){(this||_global3).publish=-1!==e.indexOf("publish")?1:0;(this||_global3).subscribe=-1!==e.indexOf("subscribe")?1:0;(this||_global3).forceUnpublish=-1!==e.indexOf("forceunpublish")?1:0;(this||_global3).forceDisconnect=-1!==e.indexOf("forcedisconnect")?1:0;(this||_global3).forceMute=-1!==e.indexOf("forcemute")?1:0;(this||_global3).supportsWebRTC=r()?1:0;(this||_global3).permittedTo=e=>Object.prototype.hasOwnProperty.call(this||_global3,e)&&1===(this||_global3)[e]}},function(e,t,n){const r=n(1)("Stream");const o=n(5);const i=n(20);const a=n(6);const s=n(22)();const c=["name","archiving"];e.exports=function Stream(e,t,n,l,u,d){const f=this||_global3;let p;(this||_global3).id=e;(this||_global3).streamId=e;(this||_global3).name=t;(this||_global3).creationTime=Number(n);(this||_global3).connection=l;(this||_global3).channel=d;(this||_global3).publisher=i.publishers.find({streamId:(this||_global3).id});a(this||_global3);const g=function onChannelUpdate(e,t,n,r){let o=t;switch(o){case"active":o="audio"===e.type?"hasAudio":"hasVideo";f[o]=r;break;case"disableWarning":o="audio"===e.type?"audioDisableWarning":"videoDisableWarning";f[o]=r;if(!f["audio"===e.type?"hasAudio":"hasVideo"])return;break;case"fitMode":o="defaultFitMode";f[o]=r;break;case"source":o="audio"===e.type?"audioType":"videoType";f[o]=r;break;case"videoDimensions":f.videoDimensions=r;break;case"orientation":case"width":case"height":return;default:}"screen"===f.videoType&&"hasVideo"===o&&false===r||f.dispatchEvent(new s.StreamUpdatedEvent(f,o,n,r))};const h=function associatedWidget(){return f.publisher?f.publisher:i.subscribers.find((e=>e.stream&&e.stream.id===f.id&&e.session.id===u.id))};const b=function isBeingSubscribedTo(){return!f.publisher};(this||_global3).getChannelsOfType=function getChannelsOfType(e){return f.channel.filter((t=>t.type===e))};(this||_global3).getChannel=function getChannel(e){for(let t=0;t<f.channel.length;++t)if(f.channel[t].id===e)return f.channel[t];return null};const v=this.getChannelsOfType("audio")[0];const m=this.getChannelsOfType("video")[0];(this||_global3).hasAudio=null!=v&&v.active;(this||_global3).hasVideo=null!=m&&m.active;(this||_global3).videoType=m&&m.source;(this||_global3).defaultFitMode=m&&m.fitMode;(this||_global3).videoDimensions={};if(m){(this||_global3).videoDimensions.width=m.width;(this||_global3).videoDimensions.height=m.height;(this||_global3).videoDimensions.orientation=m.orientation;m.on("update",g);(this||_global3).frameRate=m.frameRate}v&&v.on("update",g);(this||_global3).setChannelActiveState=function setChannelActiveState(e,t,n){const r={active:t};n&&(r.activeReason=n);_(e,r)};(this||_global3).setVideoDimensions=function setVideoDimensions(e,t){_("video",{width:e,height:t,orientation:0})};(this||_global3).setRestrictFrameRate=function setRestrictFrameRate(e){_("video",{restrictFrameRate:e})};(this||_global3).setPreferredResolution=function setPreferredResolution(e){if(!b()){r.warn("setPreferredResolution has no affect when called by a publisher");return}if(u.sessionInfo.p2pEnabled){r.warn("Stream.setPreferredResolution will not work in a P2P Session");return}if(e&&void 0===e.width&&void 0===e.height)return;const t=f.getChannelsOfType("video")[0];if(t){if(e&&e.width){if(isNaN(parseInt(e.width,10)))throw new o.Error("stream preferred width must be an integer","Subscriber");t.preferredWidth=parseInt(e.width,10)}else t.preferredWidth=void 0;if(e&&e.height){if(isNaN(parseInt(e.height,10)))throw new o.Error("stream preferred height must be an integer","Subscriber");t.preferredHeight=parseInt(e.height,10)}else t.preferredHeight=void 0;u._.subscriberChannelUpdate(f,h(),t,{preferredWidth:t.preferredWidth||0,preferredHeight:t.preferredHeight||0})}};(this||_global3).getPreferredResolution=function getPreferredResolution(){const e=f.getChannelsOfType("video")[0];if(e&&(e.preferredWidth||e.preferredHeight))return{width:e.preferredWidth,height:e.preferredHeight}};(this||_global3).setPreferredFrameRate=function setPreferredFrameRate(e){if(!b()){r.warn("setPreferredFrameRate has no affect when called by a publisher");return}if(u.sessionInfo.p2pEnabled){r.warn("Stream.setPreferredFrameRate will not work in a P2P Session");return}if(e&&isNaN(parseFloat(e)))throw new o.Error("stream preferred frameRate must be a number","Subscriber");const t=f.getChannelsOfType("video")[0];if(t){t.preferredFrameRate=e?parseFloat(e):null;u._.subscriberChannelUpdate(f,h(),t,{preferredFrameRate:t.preferredFrameRate||0})}};(this||_global3).getPreferredFrameRate=function getPreferredFrameRate(){const e=f.getChannelsOfType("video")[0];return e?e.preferredFrameRate:null};let _=function updateChannelsOfType(e,t){let n;if(f.publisher)n=e=>u._.streamChannelUpdate(f,e,t);else{const e=h();n=n=>u._.subscriberChannelUpdate(f,e,n,t)}f.getChannelsOfType(e).forEach(n)};(this||_global3).destroyed=false;(this||_global3).destroyedReason=void 0;(this||_global3).destroy=function destroy(e,t){void 0===e&&(e="clientDisconnected");p=e;f.destroyed=true;f.destroyedReason=p;true!==t&&f.dispatchEvent(new s.DestroyedEvent("destroyed",f,p))};(this||_global3)._={};(this||_global3)._.updateProperty=function privateUpdateProperty(e,t){if(-1===c.indexOf(e)){r.warn(`Unknown stream property "${e}" was modified to "${t}".`);return}const n=f[e];const o=t;switch(e){case"name":f[e]=o;break;case"archiving":var i=h();f.publisher&&i&&i._.archivingStatus(o);f[e]=o;break;default:}const a=new s.StreamUpdatedEvent(f,e,n,o);f.dispatchEvent(a)};(this||_global3)._.update=function privateUpdate(e){for(const t in e)e.hasOwnProperty(t)&&f._.updateProperty(t,e[t])};(this||_global3)._.forceMute=function forceMute(e){e.hasOwnProperty("channels")&&e.channels.includes("audio")&&f.publisher&&f.publisher._.forceMuteAudio()};(this||_global3)._.updateChannel=function privateUpdateChannel(e,t){const n=f.getChannel(e);n&&n.update(t)}}},function(e,t,n){t.__esModule=true;t.STATUS=t.PONG=t.PING=t.DISCONNECT=t.CONNECT=t.MESSAGE=t.UNSUBSCRIBE=t.SUBSCRIBE=void 0;const r=0;t.SUBSCRIBE=r;const o=1;t.UNSUBSCRIBE=o;const i=2;t.MESSAGE=i;const a=3;t.CONNECT=a;const s=4;t.DISCONNECT=s;const c=7;t.PING=c;const l=8;t.PONG=l;const u=9;t.STATUS=u},function(e,t,n){const r=n(7);const o=n(169);const i=n(6);const a=n(22)();const s=n(711);function Connection(e,t,n,r,c){let l;(this||_global3).id=e;(this||_global3).connectionId=e;(this||_global3).creationTime=t?Number(t):null;(this||_global3).data=n;(this||_global3).capabilities=s(r);(this||_global3).permissions=new o(c);(this||_global3).quality=null;i(this||_global3);(this||_global3).destroy=(e,t)=>{l=e||"clientDisconnected";true!==t&&this.dispatchEvent(new a.DestroyedEvent("destroyed",this||_global3,l))};(this||_global3).destroyed=()=>void 0!==l;(this||_global3).destroyedReason=()=>l}Connection.fromHash=e=>{let t=e.id,n=e.creationTime,o=e.data,i=e.capablities,a=e.permissions;return new Connection(t,n,o,r(i||{},{supportsWebRTC:true}),a||[])};e.exports=Connection},function(e,t){var n="object"==typeof(void 0!==typeof window?window:_global3)&&(void 0!==typeof window?window:_global3)&&(void 0!==typeof window?window:_global3).Object===Object&&(void 0!==typeof window?window:_global3);e.exports=n},function(e,t){var n=Function.prototype;var r=n.toString;
2857/**
2858       * Converts `func` to its source code.
2859       *
2860       * @private
2861       * @param {Function} func The function to convert.
2862       * @returns {string} Returns the source code.
2863       */function toSource(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}e.exports=toSource},function(e,t,n){var r=n(37);var o=function(){try{var e=r(Object,"defineProperty");e({},"",{});return e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(39),o=n(30);
2864/**
2865       * The base implementation of `_.assign` without support for multiple sources
2866       * or `customizer` functions.
2867       *
2868       * @private
2869       * @param {Object} object The destination object.
2870       * @param {Object} source The source object.
2871       * @returns {Object} Returns `object`.
2872       */function baseAssign(e,t){return e&&r(t,o(t),e)}e.exports=baseAssign},function(e,t,n){var r=n(369),o=n(64),i=n(10),a=n(65),s=n(66),c=n(85);var l=Object.prototype;var u=l.hasOwnProperty;
2873/**
2874       * Creates an array of the enumerable property names of the array-like `value`.
2875       *
2876       * @private
2877       * @param {*} value The value to query.
2878       * @param {boolean} inherited Specify returning inherited property names.
2879       * @returns {Array} Returns the array of property names.
2880       */function arrayLikeKeys(e,t){var n=i(e),l=!n&&o(e),d=!n&&!l&&a(e),f=!n&&!l&&!d&&c(e),p=n||l||d||f,g=p?r(e.length,String):[],h=g.length;for(var b in e)!t&&!u.call(e,b)||p&&("length"==b||d&&("offset"==b||"parent"==b)||f&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||s(b,h))||g.push(b);return g}e.exports=arrayLikeKeys},function(e,t){
2881/**
2882       * Creates a unary function that invokes `func` with its argument transformed.
2883       *
2884       * @private
2885       * @param {Function} func The function to wrap.
2886       * @param {Function} transform The argument transform.
2887       * @returns {Function} Returns the new function.
2888       */
2889function overArg(e,t){return function(n){return e(t(n))}}e.exports=overArg},function(e,t,n){(function(e){var r=n(14);var o=(true,t)&&!t.nodeType&&t;var i=o&&"object"==typeof e&&e&&!e.nodeType&&e;var a=i&&i.exports===o;var s=a?r.Buffer:void 0,c=s?s.allocUnsafe:void 0;
2890/**
2891         * Creates a clone of  `buffer`.
2892         *
2893         * @private
2894         * @param {Buffer} buffer The buffer to clone.
2895         * @param {boolean} [isDeep] Specify a deep clone.
2896         * @returns {Buffer} Returns the cloned buffer.
2897         */function cloneBuffer(e,t){if(t)return e.slice();var n=e.length,r=c?c(n):new e.constructor(n);e.copy(r);return r}e.exports=cloneBuffer}).call(this||_global3,n(84)(e))},function(e,t){
2898/**
2899       * This method returns a new empty array.
2900       *
2901       * @static
2902       * @memberOf _
2903       * @since 4.13.0
2904       * @category Util
2905       * @returns {Array} Returns the new empty array.
2906       * @example
2907       *
2908       * var arrays = _.times(2, _.stubArray);
2909       *
2910       * console.log(arrays);
2911       * // => [[], []]
2912       *
2913       * console.log(arrays[0] === arrays[1]);
2914       * // => false
2915       */
2916function stubArray(){return[]}e.exports=stubArray},function(e,t,n){var r=n(116),o=n(117),i=n(115),a=n(180);var s=Object.getOwnPropertySymbols;
2917/**
2918       * Creates an array of the own and inherited enumerable symbols of `object`.
2919       *
2920       * @private
2921       * @param {Object} object The object to query.
2922       * @returns {Array} Returns the array of symbols.
2923       */var c=s?function(e){var t=[];while(e){r(t,i(e));e=o(e)}return t}:a;e.exports=c},function(e,t,n){var r=n(183),o=n(115),i=n(30);
2924/**
2925       * Creates an array of own enumerable property names and symbols of `object`.
2926       *
2927       * @private
2928       * @param {Object} object The object to query.
2929       * @returns {Array} Returns the array of property names and symbols.
2930       */function getAllKeys(e){return r(e,i,o)}e.exports=getAllKeys},function(e,t,n){var r=n(116),o=n(10);
2931/**
2932       * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2933       * `keysFunc` and `symbolsFunc` to get the enumerable property names and
2934       * symbols of `object`.
2935       *
2936       * @private
2937       * @param {Object} object The object to query.
2938       * @param {Function} keysFunc The function to get the keys of `object`.
2939       * @param {Function} symbolsFunc The function to get the symbols of `object`.
2940       * @returns {Array} Returns the array of property names and symbols.
2941       */function baseGetAllKeys(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}e.exports=baseGetAllKeys},function(e,t,n){var r=n(183),o=n(181),i=n(52);
2942/**
2943       * Creates an array of own and inherited enumerable property names and
2944       * symbols of `object`.
2945       *
2946       * @private
2947       * @param {Object} object The object to query.
2948       * @returns {Array} Returns the array of property names and symbols.
2949       */function getAllKeysIn(e){return r(e,i,o)}e.exports=getAllKeysIn},function(e,t,n){var r=n(37),o=n(14);var i=r(o,"Set");e.exports=i},function(e,t,n){var r=n(37),o=n(14);var i=r(o,"WeakMap");e.exports=i},function(e,t,n){var r=n(14);var o=r.Uint8Array;e.exports=o},function(e,t,n){var r=n(118);
2950/**
2951       * Creates a clone of `typedArray`.
2952       *
2953       * @private
2954       * @param {Object} typedArray The typed array to clone.
2955       * @param {boolean} [isDeep] Specify a deep clone.
2956       * @returns {Object} Returns the cloned typed array.
2957       */function cloneTypedArray(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}e.exports=cloneTypedArray},function(e,t,n){var r=n(86),o=n(117),i=n(68);
2958/**
2959       * Initializes an object clone.
2960       *
2961       * @private
2962       * @param {Object} object The object to clone.
2963       * @returns {Object} Returns the initialized clone.
2964       */function initCloneObject(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}e.exports=initCloneObject},function(e,t,n){var r=n(110);var o="Expected a function";
2965/**
2966       * Creates a function that memoizes the result of `func`. If `resolver` is
2967       * provided, it determines the cache key for storing the result based on the
2968       * arguments provided to the memoized function. By default, the first argument
2969       * provided to the memoized function is used as the map cache key. The `func`
2970       * is invoked with the `this` binding of the memoized function.
2971       *
2972       * **Note:** The cache is exposed as the `cache` property on the memoized
2973       * function. Its creation may be customized by replacing the `_.memoize.Cache`
2974       * constructor with one whose instances implement the
2975       * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
2976       * method interface of `clear`, `delete`, `get`, `has`, and `set`.
2977       *
2978       * @static
2979       * @memberOf _
2980       * @since 0.1.0
2981       * @category Function
2982       * @param {Function} func The function to have its output memoized.
2983       * @param {Function} [resolver] The function to resolve the cache key.
2984       * @returns {Function} Returns the new memoized function.
2985       * @example
2986       *
2987       * var object = { 'a': 1, 'b': 2 };
2988       * var other = { 'c': 3, 'd': 4 };
2989       *
2990       * var values = _.memoize(_.values);
2991       * values(object);
2992       * // => [1, 2]
2993       *
2994       * values(other);
2995       * // => [3, 4]
2996       *
2997       * object.a = 2;
2998       * values(object);
2999       * // => [1, 2]
3000       *
3001       * // Modify the result cache.
3002       * values.cache.set(object, ['a', 'b']);
3003       * values(object);
3004       * // => ['a', 'b']
3005       *
3006       * // Replace `_.memoize.Cache`.
3007       * _.memoize.Cache = WeakMap;
3008       */function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var memoized=function(){var n=arguments,r=t?t.apply(this||_global3,n):n[0],o=memoized.cache;if(o.has(r))return o.get(r);var i=e.apply(this||_global3,n);memoized.cache=o.set(r,i)||o;return i};memoized.cache=new(memoize.Cache||r);return memoized}memoize.Cache=r;e.exports=memoize},function(e,t,n){var r=n(87),o=n(122);
3009/**
3010       * Creates a function like `_.assign`.
3011       *
3012       * @private
3013       * @param {Function} assigner The function to assign values.
3014       * @returns {Function} Returns the new assigner function.
3015       */function createAssigner(e){return r((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;a=e.length>3&&"function"==typeof a?(i--,a):void 0;if(s&&o(n[0],n[1],s)){a=i<3?void 0:a;i=1}t=Object(t);while(++r<i){var c=n[r];c&&e(t,c,r,a)}return t}))}e.exports=createAssigner},function(e,t,n){var r=n(120);var o=Math.max;
3016/**
3017       * A specialized version of `baseRest` which transforms the rest array.
3018       *
3019       * @private
3020       * @param {Function} func The function to apply a rest parameter to.
3021       * @param {number} [start=func.length-1] The start position of the rest parameter.
3022       * @param {Function} transform The rest array transform.
3023       * @returns {Function} Returns the new function.
3024       */function overRest(e,t,n){t=o(void 0===t?e.length-1:t,0);return function(){var i=arguments,a=-1,s=o(i.length-t,0),c=Array(s);while(++a<s)c[a]=i[t+a];a=-1;var l=Array(t+1);while(++a<t)l[a]=i[a];l[t]=n(c);return r(e,this||_global3,l)}}e.exports=overRest},function(e,t){var n=800,r=16;var o=Date.now;
3025/**
3026       * Creates a function that'll short out and invoke `identity` instead
3027       * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
3028       * milliseconds.
3029       *
3030       * @private
3031       * @param {Function} func The function to restrict.
3032       * @returns {Function} Returns the new shortable function.
3033       */function shortOut(e){var t=0,i=0;return function(){var a=o(),s=r-(a-i);i=a;if(s>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}e.exports=shortOut},function(e,t,n){e.exports=n(397)()?WeakMap:n(398)},function(e,t,n){var r=Object.create,o=Object.getPrototypeOf,i={};e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||r;return"function"===typeof e&&o(e(t(null),i))===i}},function(e,t,n){var r,o=n(197),i=n(31),a=Object.prototype.isPrototypeOf,s=Object.defineProperty,c={configurable:true,enumerable:false,writable:true,value:void 0};r=function(e,t){i(e);if(null===t||o(t))return e;throw new TypeError("Prototype must be null or an object")};e.exports=function(e){var t,n;if(!e)return null;if(2===e.level)if(e.set){n=e.set;t=function(e,t){n.call(r(e,t),t);return e}}else t=function(e,t){r(e,t).__proto__=t;return e};else t=function self(e,t){var n;r(e,t);n=a.call(self.nullPolyfill,e);n&&delete self.nullPolyfill.__proto__;null===t&&(t=self.nullPolyfill);e.__proto__=t;n&&s(self.nullPolyfill,"__proto__",c);return e};return Object.defineProperty(t,"level",{configurable:false,enumerable:false,writable:false,value:e.level})}(function(){var e,t=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");
3033if(r){try{e=r.set;e.call(t,n)}catch(e){}if(Object.getPrototypeOf(t)===n)return{set:e,level:2}}t.__proto__=n;if(Object.getPrototypeOf(t)===n)return{level:2};t={};t.__proto__=n;return Object.getPrototypeOf(t)===n&&{level:1}}());n(400)},function(e,t,n){var r=n(42);var o={function:true,object:true};e.exports=function(e){return r(e)&&o[typeof e]||false}},function(e,t,n){var r=n(403);var o=/^\s*class[\s{/}]/,i=Function.prototype.toString;e.exports=function(e){return!!r(e)&&!o.test(i.call(e))}},function(e,t,n){var r=n(42);var o=Array.prototype.forEach,i=Object.create;var process=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=i(null);o.call(arguments,(function(e){r(e)&&process(Object(e),t)}));return t}},function(e,t,n){e.exports=n(410)()?String.prototype.contains:n(411)},function(e,t,n){var r=n(89),o=n(90),i=n(412),a=n(441),s=n(442),c=n(43).iterator;e.exports=function(e){return"function"===typeof s(e)[c]?e[c]():r(e)?new i(e):o(e)?new a(e):new i(e)}},function(e,t,n){var r=n(417);e.exports=function(e){if(!r(e))throw new TypeError(e+" is not a symbol");return e}},function(e,t,n){var r=n(421),o=n(125),i=n(70),a=n(31),s=n(32),c=n(422),l=n(43);var u,d=Object.defineProperty,f=Object.defineProperties;e.exports=u=function(e,t){if(!((this||_global3)instanceof u))throw new TypeError("Constructor requires 'new'");f(this||_global3,{__list__:s("w",a(e)),__context__:s("w",t),__nextIndex__:s("w",0)});if(t){i(t.on);t.on("_add",(this||_global3)._onAdd);t.on("_delete",(this||_global3)._onDelete);t.on("_clear",(this||_global3)._onClear)}};delete u.prototype.constructor;f(u.prototype,o({_next:s((function(){var e;if((this||_global3).__list__){if((this||_global3).__redo__){e=(this||_global3).__redo__.shift();if(void 0!==e)return e}if((this||_global3).__nextIndex__<(this||_global3).__list__.length)return(this||_global3).__nextIndex__++;this._unBind()}})),next:s((function(){return this._createResult(this._next())})),_createResult:s((function(e){return void 0===e?{done:true,value:void 0}:{done:false,value:this._resolve(e)}})),_resolve:s((function(e){return(this||_global3).__list__[e]})),_unBind:s((function(){(this||_global3).__list__=null;delete(this||_global3).__redo__;if((this||_global3).__context__){(this||_global3).__context__.off("_add",(this||_global3)._onAdd);(this||_global3).__context__.off("_delete",(this||_global3)._onDelete);(this||_global3).__context__.off("_clear",(this||_global3)._onClear);(this||_global3).__context__=null}})),toString:s((function(){return"[object "+((this||_global3)[l.toStringTag]||"Object")+"]"}))},c({_onAdd:s((function(e){if(!(e>=(this||_global3).__nextIndex__)){++(this||_global3).__nextIndex__;if((this||_global3).__redo__){(this||_global3).__redo__.forEach((function(t,n){t>=e&&((this||_global3).__redo__[n]=++t)}),this||_global3);(this||_global3).__redo__.push(e)}else d(this||_global3,"__redo__",s("c",[e]))}})),_onDelete:s((function(e){var t;if(!(e>=(this||_global3).__nextIndex__)){--(this||_global3).__nextIndex__;if((this||_global3).__redo__){t=(this||_global3).__redo__.indexOf(e);-1!==t&&(this||_global3).__redo__.splice(t,1);(this||_global3).__redo__.forEach((function(t,n){t>e&&((this||_global3).__redo__[n]=--t)}),this||_global3)}}})),_onClear:s((function(){(this||_global3).__redo__&&r.call((this||_global3).__redo__);(this||_global3).__nextIndex__=0}))})));d(u.prototype,l.iterator,s((function(){return this||_global3})))},function(e,t,n){var r=n(54),o=n(124),i=n(424),a=n(425);var resolveMessage=function(e,t){return e.replace("%v",a(t))};e.exports=function(e,t,n){if(!o(n))throw new TypeError(resolveMessage(t,e));if(!r(e)){if("default"in n)return n.default;if(n.isOptional)return null}var a=i(n.errorMessage);r(a)||(a=t);throw new TypeError(resolveMessage(a,e))}},function(e,t){
3034/**
3035       * The base implementation of `_.findIndex` and `_.findLastIndex` without
3036       * support for iteratee shorthands.
3037       *
3038       * @private
3039       * @param {Array} array The array to inspect.
3040       * @param {Function} predicate The function invoked per iteration.
3041       * @param {number} fromIndex The index to search from.
3042       * @param {boolean} [fromRight] Specify iterating from right to left.
3043       * @returns {number} Returns the index of the matched value, else `-1`.
3044       */
3045function baseFindIndex(e,t,n,r){var o=e.length,i=n+(r?1:-1);while(r?i--:++i<o)if(t(e[i],i,e))return i;return-1}e.exports=baseFindIndex},function(e,t,n){e.exports=n(453)},function(e,t,n){e.exports=function bind(e,t){return function wrap(){var n=new Array(arguments.length);for(var r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){var r=n(17);function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}
3046/**
3047       * Build a URL by appending params to the end
3048       *
3049       * @param {string} url The base of the url (e.g., http://www.google.com)
3050       * @param {object} [params] The params to be appended
3051       * @returns {string} The formatted url
3052       */e.exports=function buildURL(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var i=[];r.forEach(t,(function serialize(e,t){if(null!==e&&"undefined"!==typeof e){r.isArray(e)?t+="[]":e=[e];r.forEach(e,(function parseValue(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e));i.push(encode(t)+"="+encode(e))}))}}));o=i.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a));e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){e.exports=function isCancel(e){return!!(e&&e.__CANCEL__)}},function(e,t,n){(function(t){var r=n(17);var o=n(458);var i={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function getDefaultAdapter(){var e;("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=n(211));return e}var a={adapter:getDefaultAdapter(),transformRequest:[function transformRequest(e,t){o(t,"Accept");o(t,"Content-Type");if(r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e)){setContentTypeIfUnset(t,"application/x-www-form-urlencoded;charset=utf-8");return e.toString()}if(r.isObject(e)){setContentTypeIfUnset(t,"application/json;charset=utf-8");return JSON.stringify(e)}return e}],transformResponse:[function transformResponse(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function validateStatus(e){return e>=200&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}};r.forEach(["delete","get","head"],(function forEachMethodNoData(e){a.headers[e]={}}));r.forEach(["post","put","patch"],(function forEachMethodWithData(e){a.headers[e]=r.merge(i)}));e.exports=a}).call(this||_global3,n(69))},function(e,t,n){(function(t){var r=n(17);var o=n(459);var i=n(461);var a=n(208);var s=n(462);var c=n(465);var l=n(466);var u=n(212);e.exports=function xhrAdapter(e){return new t((function dispatchXhrRequest(t,n){var d=e.data;var f=e.headers;r.isFormData(d)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"";var h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(g+":"+h)}var b=s(e.baseURL,e.url);p.open(e.method.toUpperCase(),a(b,e.params,e.paramsSerializer),true);p.timeout=e.timeout;p.onreadystatechange=function handleLoad(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in p?c(p.getAllResponseHeaders()):null;var i=e.responseType&&"text"!==e.responseType?p.response:p.responseText;var a={data:i,status:p.status,statusText:p.statusText,headers:r,config:e,request:p};o(t,n,a);p=null}};
3052p.onabort=function handleAbort(){if(p){n(u("Request aborted",e,"ECONNABORTED",p));p=null}};p.onerror=function handleError(){n(u("Network Error",e,null,p));p=null};p.ontimeout=function handleTimeout(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage);n(u(t,e,"ECONNABORTED",p));p=null};if(r.isStandardBrowserEnv()){var v=(e.withCredentials||l(b))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;v&&(f[e.xsrfHeaderName]=v)}"setRequestHeader"in p&&r.forEach(f,(function setRequestHeader(e,t){"undefined"===typeof d&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)}));r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials);if(e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"===typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress);"function"===typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress);e.cancelToken&&e.cancelToken.promise.then((function onCanceled(e){if(p){p.abort();n(e);p=null}}));d||(d=null);p.send(d)}))}}).call(this||_global3,n(0))},function(e,t,n){var r=n(460);
3053/**
3054       * Create an Error with the specified message, config, error code, request and response.
3055       *
3056       * @param {string} message The error message.
3057       * @param {Object} config The config.
3058       * @param {string} [code] The error code (for example, 'ECONNABORTED').
3059       * @param {Object} [request] The request.
3060       * @param {Object} [response] The response.
3061       * @returns {Error} The created error.
3062       */e.exports=function createError(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},function(e,t,n){var r=n(17);
3063/**
3064       * Config-specific merge-function which creates a new config-object
3065       * by merging two configuration objects together.
3066       *
3067       * @param {Object} config1
3068       * @param {Object} config2
3069       * @returns {Object} New object resulting from merging config2 to config1
3070       */e.exports=function mergeConfig(e,t){t=t||{};var n={};var o=["url","method","data"];var i=["headers","auth","proxy","params"];var a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"];var s=["validateStatus"];function getMergedValue(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function mergeDeepProperties(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=getMergedValue(void 0,e[o])):n[o]=getMergedValue(e[o],t[o])}r.forEach(o,(function valueFromConfig2(e){r.isUndefined(t[e])||(n[e]=getMergedValue(void 0,t[e]))}));r.forEach(i,mergeDeepProperties);r.forEach(a,(function defaultToConfig2(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=getMergedValue(void 0,e[o])):n[o]=getMergedValue(void 0,t[o])}));r.forEach(s,(function merge(r){r in t?n[r]=getMergedValue(e[r],t[r]):r in e&&(n[r]=getMergedValue(void 0,e[r]))}));var c=o.concat(i).concat(a).concat(s);var l=Object.keys(e).concat(Object.keys(t)).filter((function filterAxiosKeys(e){return-1===c.indexOf(e)}));r.forEach(l,mergeDeepProperties);return n}},function(e,t,n){
3071/**
3072       * A `Cancel` is an object that is thrown when an operation is canceled.
3073       *
3074       * @class
3075       * @param {string=} message The message.
3076       */
3077function Cancel(e){(this||_global3).message=e}Cancel.prototype.toString=function toString(){return"Cancel"+((this||_global3).message?": "+(this||_global3).message:"")};Cancel.prototype.__CANCEL__=true;e.exports=Cancel},function(e,t,n){var r=n(471),o=n(473);
3078/**
3079       * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last
3080       * version with conversion `options` applied. If `name` is an object its methods
3081       * will be converted.
3082       *
3083       * @param {string} name The name of the function to wrap.
3084       * @param {Function} [func] The function to wrap.
3085       * @param {Object} [options] The options object. See `baseConvert` for more details.
3086       * @returns {Function|Object} Returns the converted function or object.
3087       */function convert(e,t,n){return r(o,e,t,n)}
3087e.exports=convert},function(e,t,n){var r=n(88),o=n(217);
3088/**
3089       * The base implementation of `setData` without support for hot loop shorting.
3090       *
3091       * @private
3092       * @param {Function} func The function to associate metadata with.
3093       * @param {*} data The metadata.
3094       * @returns {Function} Returns `func`.
3095       */var i=o?function(e,t){o.set(e,t);return e}:r;e.exports=i},function(e,t,n){var r=n(186);var o=r&&new r;e.exports=o},function(e,t,n){var r=n(219),o=n(220),i=n(477),a=n(95),s=n(221),c=n(227),l=n(486),u=n(134),d=n(14);var f=1,p=2,g=8,h=16,b=128,v=512;
3096/**
3097       * Creates a function that wraps `func` to invoke it with optional `this`
3098       * binding of `thisArg`, partial application, and currying.
3099       *
3100       * @private
3101       * @param {Function|string} func The function or method name to wrap.
3102       * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
3103       * @param {*} [thisArg] The `this` binding of `func`.
3104       * @param {Array} [partials] The arguments to prepend to those provided to
3105       *  the new function.
3106       * @param {Array} [holders] The `partials` placeholder indexes.
3107       * @param {Array} [partialsRight] The arguments to append to those provided
3108       *  to the new function.
3109       * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
3110       * @param {Array} [argPos] The argument positions of the new function.
3111       * @param {number} [ary] The arity cap of `func`.
3112       * @param {number} [arity] The arity of `func`.
3113       * @returns {Function} Returns the new wrapped function.
3114       */function createHybrid(e,t,n,m,_,y,E,S,T,C){var w=t&b,O=t&f,x=t&p,I=t&(g|h),A=t&v,R=x?void 0:a(e);function wrapper(){var f=arguments.length,p=Array(f),g=f;while(g--)p[g]=arguments[g];if(I)var h=c(wrapper),b=i(p,h);m&&(p=r(p,m,_,I));y&&(p=o(p,y,E,I));f-=b;if(I&&f<C){var v=u(p,h);return s(e,t,createHybrid,wrapper.placeholder,n,p,v,S,T,C-f)}var k=O?n:this||_global3,D=x?k[e]:e;f=p.length;S?p=l(p,S):A&&f>1&&p.reverse();w&&T<f&&(p.length=T);(this||_global3)&&(this||_global3)!==d&&(this||_global3)instanceof wrapper&&(D=R||a(D));return D.apply(k,p)}return wrapper}e.exports=createHybrid},function(e,t){var n=Math.max;
3115/**
3116       * Creates an array that is the composition of partially applied arguments,
3117       * placeholders, and provided arguments into a single array of arguments.
3118       *
3119       * @private
3120       * @param {Array} args The provided arguments.
3121       * @param {Array} partials The arguments to prepend to those provided.
3122       * @param {Array} holders The `partials` placeholder indexes.
3123       * @params {boolean} [isCurried] Specify composing for a curried function.
3124       * @returns {Array} Returns the new array of composed arguments.
3125       */function composeArgs(e,t,r,o){var i=-1,a=e.length,s=r.length,c=-1,l=t.length,u=n(a-s,0),d=Array(l+u),f=!o;while(++c<l)d[c]=t[c];while(++i<s)(f||i<a)&&(d[r[i]]=e[i]);while(u--)d[c++]=e[i++];return d}e.exports=composeArgs},function(e,t){var n=Math.max;
3126/**
3127       * This function is like `composeArgs` except that the arguments composition
3128       * is tailored for `_.partialRight`.
3129       *
3130       * @private
3131       * @param {Array} args The provided arguments.
3132       * @param {Array} partials The arguments to append to those provided.
3133       * @param {Array} holders The `partials` placeholder indexes.
3134       * @params {boolean} [isCurried] Specify composing for a curried function.
3135       * @returns {Array} Returns the new array of composed arguments.
3136       */function composeArgsRight(e,t,r,o){var i=-1,a=e.length,s=-1,c=r.length,l=-1,u=t.length,d=n(a-c,0),f=Array(d+u),p=!o;while(++i<d)f[i]=e[i];var g=i;while(++l<u)f[g+l]=t[l];while(++s<c)(p||i<a)&&(f[g+r[s]]=e[i++]);return f}e.exports=composeArgsRight},function(e,t,n){var r=n(478),o=n(225),i=n(226);var a=1,s=2,c=4,l=8,u=32,d=64;
3137/**
3138       * Creates a function that wraps `func` to continue currying.
3139       *
3140       * @private
3141       * @param {Function} func The function to wrap.
3142       * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
3143       * @param {Function} wrapFunc The function to create the `func` wrapper.
3144       * @param {*} placeholder The placeholder value.
3145       * @param {*} [thisArg] The `this` binding of `func`.
3146       * @param {Array}
3146 [partials] The arguments to prepend to those provided to
3147       *  the new function.
3148       * @param {Array} [holders] The `partials` placeholder indexes.
3149       * @param {Array} [argPos] The argument positions of the new function.
3150       * @param {number} [ary] The arity cap of `func`.
3151       * @param {number} [arity] The arity of `func`.
3152       * @returns {Function} Returns the new wrapped function.
3153       */function createRecurry(e,t,n,f,p,g,h,b,v,m){var _=t&l,y=_?h:void 0,E=_?void 0:h,S=_?g:void 0,T=_?void 0:g;t|=_?u:d;t&=~(_?d:u);t&c||(t&=~(a|s));var C=[e,t,p,S,y,T,E,b,v,m];var w=n.apply(void 0,C);r(e)&&o(w,C);w.placeholder=f;return i(w,e,t)}e.exports=createRecurry},function(e,t,n){var r=n(217),o=n(223);
3154/**
3155       * Gets metadata for `func`.
3156       *
3157       * @private
3158       * @param {Function} func The function to query.
3159       * @returns {*} Returns the metadata for `func`.
3160       */var i=r?function(e){return r.get(e)}:o;e.exports=i},function(e,t){function noop(){}e.exports=noop},function(e,t,n){var r=n(86),o=n(133);
3161/**
3162       * The base constructor for creating `lodash` wrapper objects.
3163       *
3164       * @private
3165       * @param {*} value The value to wrap.
3166       * @param {boolean} [chainAll] Enable explicit method chain sequences.
3167       */function LodashWrapper(e,t){(this||_global3).__wrapped__=e;(this||_global3).__actions__=[];(this||_global3).__chain__=!!t;(this||_global3).__index__=0;(this||_global3).__values__=void 0}LodashWrapper.prototype=r(o.prototype);LodashWrapper.prototype.constructor=LodashWrapper;e.exports=LodashWrapper},function(e,t,n){var r=n(216),o=n(193);
3168/**
3169       * Sets metadata for `func`.
3170       *
3171       * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
3172       * period of time, it will trip its breaker and transition to an identity
3173       * function to avoid garbage collection pauses in V8. See
3174       * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
3175       * for more details.
3176       *
3177       * @private
3178       * @param {Function} func The function to associate metadata with.
3179       * @param {*} data The metadata.
3180       * @returns {Function} Returns `func`.
3181       */var i=o(r);e.exports=i},function(e,t,n){var r=n(483),o=n(484),i=n(121),a=n(485);
3182/**
3183       * Sets the `toString` method of `wrapper` to mimic the source of `reference`
3184       * with wrapper details in a comment at the top of the source body.
3185       *
3186       * @private
3187       * @param {Function} wrapper The function to modify.
3188       * @param {Function} reference The reference function.
3189       * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
3190       * @returns {Function} Returns `wrapper`.
3191       */function setWrapToString(e,t,n){var s=t+"";return i(e,o(s,a(r(s),n)))}
3191e.exports=setWrapToString},function(e,t){
3192/**
3193       * Gets the argument placeholder value for `func`.
3194       *
3195       * @private
3196       * @param {Function} func The function to inspect.
3197       * @returns {*} Returns the placeholder value.
3198       */
3199function getHolder(e){var t=e;return t.placeholder}e.exports=getHolder},function(e,t,n){var r=n(490),o=n(9),i=n(71);var a=NaN;var s=/^[-+]0x[0-9a-f]+$/i;var c=/^0b[01]+$/i;var l=/^0o[0-7]+$/i;var u=parseInt;
3200/**
3201       * Converts `value` to a number.
3202       *
3203       * @static
3204       * @memberOf _
3205       * @since 4.0.0
3206       * @category Lang
3207       * @param {*} value The value to process.
3208       * @returns {number} Returns the number.
3209       * @example
3210       *
3211       * _.toNumber(3.2);
3212       * // => 3.2
3213       *
3214       * _.toNumber(Number.MIN_VALUE);
3215       * // => 5e-324
3216       *
3217       * _.toNumber(Infinity);
3218       * // => Infinity
3219       *
3220       * _.toNumber('3.2');
3221       * // => 3.2
3222       */function toNumber(e){if("number"==typeof e)return e;if(i(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=c.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):s.test(e)?a:+e}e.exports=toNumber},function(e,t,n){var r=n(498),o=n(16);
3223/**
3224       * The base implementation of `_.isEqual` which supports partial comparisons
3225       * and tracks traversed objects.
3226       *
3227       * @private
3228       * @param {*} value The value to compare.
3229       * @param {*} other The other value to compare.
3230       * @param {boolean} bitmask The bitmask flags.
3231       *  1 - Unordered comparison
3232       *  2 - Partial comparison
3233       * @param {Function} [customizer] The function to customize comparisons.
3234       * @param {Object} [stack] Tracks traversed `value` and `other` objects.
3235       * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
3236       */function baseIsEqual(e,t,n,i,a){return e===t||(null==e||null==t||!o(e)&&!o(t)?e!==e&&t!==t:r(e,t,n,i,baseIsEqual,a))}e.exports=baseIsEqual},function(e,t,n){var r=n(92),o=n(231),i=n(94);var a=1,s=2;
3237/**
3238       * A specialized version of `baseIsEqualDeep` for arrays with support for
3239       * partial deep comparisons.
3240       *
3241       * @private
3242       * @param {Array} array The array to compare.
3243       * @param {Array} other The other array to compare.
3244       * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
3245       * @param {Function} customizer The function to customize comparisons.
3246       * @param {Function} equalFunc The function to determine equivalents of values.
3247       * @param {Object} stack Tracks traversed `array` and `other` objects.
3248       * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
3249       */function equalArrays(e,t,n,c,l,u){var d=n&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return false;var g=u.get(e);var h=u.get(t);if(g&&h)return g==t&&h==e;var b=-1,v=true,m=n&s?new r:void 0;u.set(e,t);u.set(t,e);while(++b<f){var _=e[b],y=t[b];if(c)var E=d?c(y,_,b,t,e,u):c(_,y,b,e,t,u);if(void 0!==E){if(E)continue;v=false;break}if(m){if(!o(t,(function(e,t){if(!i(m,t)&&(_===e||l(_,e,n,c,u)))return m.push(t)}))){v=false;break}}else if(!(_===y||l(_,y,n,c,u))){v=false;break}}u.delete(e);u.delete(t);return v}e.exports=equalArrays},function(e,t){
3250/**
3251       * A specialized version of `_.some` for arrays without support for iteratee
3252       * shorthands.
3253       *
3254       * @private
3255       * @param {Array} [array] The array to iterate over.
3256       * @param {Function} predicate The function invoked per iteration.
3257       * @returns {boolean} Returns `true` if any element passes the predicate check,
3258       *  else `false`.
3259       */
3260function arraySome(e,t){var n=-1,r=null==e?0:e.length;while(++n<r)if(t(e[n],n,e))return true;return false}e.exports=arraySome},function(e,t){
3261/**
3262       * Converts `map` to its key-value pairs.
3263       *
3264       * @private
3265       * @param {Object} map The map to convert.
3266       * @returns {Array} Returns the key-value pairs.
3267       */
3268function mapToArray(e){var t=-1,n=Array(e.size);e.forEach((function(e,r){n[++t]=[r,e]}));return n}
3268e.exports=mapToArray},function(e,t,n){var r=n(9);
3269/**
3270       * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
3271       *
3272       * @private
3273       * @param {*} value The value to check.
3274       * @returns {boolean} Returns `true` if `value` if suitable for strict
3275       *  equality comparisons, else `false`.
3276       */function isStrictComparable(e){return e===e&&!r(e)}e.exports=isStrictComparable},function(e,t){
3277/**
3278       * A specialized version of `matchesProperty` for source values suitable
3279       * for strict equality comparisons, i.e. `===`.
3280       *
3281       * @private
3282       * @param {string} key The key of the property to get.
3283       * @param {*} srcValue The value to match.
3284       * @returns {Function} Returns the new spec function.
3285       */
3286function matchesStrictComparable(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}e.exports=matchesStrictComparable},function(e,t,n){var r=n(503);var o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var i=/\\(\\)?/g;
3287/**
3288       * Converts `string` to a property path array.
3289       *
3290       * @private
3291       * @param {string} string The string to convert.
3292       * @returns {Array} Returns the property path array.
3293       */var a=r((function(e){var t=[];46===e.charCodeAt(0)&&t.push("");e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)}));return t}));e.exports=a},function(e,t,n){var r=n(505),o=n(506);
3294/**
3295       * Checks if `path` is a direct or inherited property of `object`.
3296       *
3297       * @static
3298       * @memberOf _
3299       * @since 4.0.0
3300       * @category Object
3301       * @param {Object} object The object to query.
3302       * @param {Array|string} path The path to check.
3303       * @returns {boolean} Returns `true` if `path` exists, else `false`.
3304       * @example
3305       *
3306       * var object = _.create({ 'a': _.create({ 'b': 2 }) });
3307       *
3308       * _.hasIn(object, 'a');
3309       * // => true
3310       *
3311       * _.hasIn(object, 'a.b');
3312       * // => true
3313       *
3314       * _.hasIn(object, ['a', 'b']);
3315       * // => true
3316       *
3317       * _.hasIn(object, 'b');
3318       * // => false
3319       */function hasIn(e,t){return null!=e&&o(e,t,r)}e.exports=hasIn},function(e,t,n){var r=n(116),o=n(512);
3320/**
3321       * The base implementation of `_.flatten` with support for restricting flattening.
3322       *
3323       * @private
3324       * @param {Array} array The array to flatten.
3325       * @param {number} depth The maximum recursion depth.
3326       * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
3327       * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
3328       * @param {Array} [result=[]] The initial result value.
3329       * @returns {Array} Returns the new flattened array.
3330       */function baseFlatten(e,t,n,i,a){var s=-1,c=e.length;n||(n=o);a||(a=[]);while(++s<c){var l=e[s];t>0&&n(l)?t>1?baseFlatten(l,t-1,n,i,a):r(a,l):i||(a[a.length]=l)}return a}e.exports=baseFlatten},function(e,t,n){var r=n(519);
3331/**
3332       * The base implementation of `baseForOwn` which iterates over `object`
3333       * properties returned by `keysFunc` and invokes `iteratee` for each property.
3334       * Iteratee functions may exit iteration early by explicitly returning `false`.
3335       *
3336       * @private
3337       * @param {Object} object The object to iterate over.
3338       * @param {Function} iteratee The function invoked per iteration.
3339       * @param {Function} keysFunc The function to get the keys of `object`.
3340       * @returns {Object} Returns `object`.
3341       */var o=r();e.exports=o},function(e,t,n){var r=n(520);var o=n(521);t.parse=urlParse;t.resolve=urlResolve;t.resolveObject=urlResolveObject;t.format=urlFormat;t.Url=Url;function Url(){(this||_global3).protocol=null;(this||_global3).slashes=null;(this||_global3).auth=null;(this||_global3).host=null;(this||_global3).port=null;(this||_global3).hostname=null;(this||_global3).hash=null;(this||_global3).search=null;(this||_global3).query=null;(this||_global3).pathname=null;(this||_global3).path=null;(this||_global3).href=null}
3341var i=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n","\t"],l=["{","}","|","\\","^","`"].concat(c),u=["'"].concat(l),d=["%","/","?",";","#"].concat(u),f=["/","?","#"],p=255,g=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:true,"javascript:":true},v={javascript:true,"javascript:":true},m={http:true,https:true,ftp:true,gopher:true,file:true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true},_=n(522);function urlParse(e,t,n){if(e&&o.isObject(e)&&e instanceof Url)return e;var r=new Url;r.parse(e,t,n);return r}Url.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),c=-1!==a&&a<e.indexOf("#")?"?":"#",l=e.split(c),y=/\\/g;l[0]=l[0].replace(y,"/");e=l.join(c);var E=e;E=E.trim();if(!n&&1===e.split("#").length){var S=s.exec(E);if(S){(this||_global3).path=E;(this||_global3).href=E;(this||_global3).pathname=S[1];if(S[2]){(this||_global3).search=S[2];(this||_global3).query=t?_.parse((this||_global3).search.substr(1)):(this||_global3).search.substr(1)}else if(t){(this||_global3).search="";(this||_global3).query={}}return this||_global3}}var T=i.exec(E);if(T){T=T[0];var C=T.toLowerCase();(this||_global3).protocol=C;E=E.substr(T.length)}if(n||T||E.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===E.substr(0,2);if(w&&!(T&&v[T])){E=E.substr(2);(this||_global3).slashes=true}}if(!v[T]&&(w||T&&!m[T])){var O=-1;for(var x=0;x<f.length;x++){var I=E.indexOf(f[x]);-1!==I&&(-1===O||I<O)&&(O=I)}var A,R;R=-1===O?E.lastIndexOf("@"):E.lastIndexOf("@",O);if(-1!==R){A=E.slice(0,R);E=E.slice(R+1);(this||_global3).auth=decodeURIComponent(A)}O=-1;for(x=0;x<d.length;x++){I=E.indexOf(d[x]);-1!==I&&(-1===O||I<O)&&(O=I)}-1===O&&(O=E.length);(this||_global3).host=E.slice(0,O);E=E.slice(O);this.parseHost();(this||_global3).hostname=(this||_global3).hostname||"";var k="["===(this||_global3).hostname[0]&&"]"===(this||_global3).hostname[(this||_global3).hostname.length-1];if(!k){var D=(this||_global3).hostname.split(/\./);x=0;for(var N=D.length;x<N;x++){var P=D[x];if(P&&!P.match(g)){var M="";for(var L=0,j=P.length;L<j;L++)P.charCodeAt(L)>127?M+="x":M+=P[L];if(!M.match(g)){var U=D.slice(0,x);var F=D.slice(x+1);var V=P.match(h);if(V){U.push(V[1]);F.unshift(V[2])}F.length&&(E="/"+F.join(".")+E);(this||_global3).hostname=U.join(".");break}}}}(this||_global3).hostname.length>p?(this||_global3).hostname="":(this||_global3).hostname=(this||_global3).hostname.toLowerCase();k||((this||_global3).hostname=r.toASCII((this||_global3).hostname));var B=(this||_global3).port?":"+(this||_global3).port:"";var W=(this||_global3).hostname||"";(this||_global3).host=W+B;(this||_global3).href+=(this||_global3).host;if(k){(this||_global3).hostname=(this||_global3).hostname.substr(1,(this||_global3).hostname.length-2);"/"!==E[0]&&(E="/"+E)}}if(!b[C])for(x=0,N=u.length;x<N;x++){var H=u[x];if(-1!==E.indexOf(H)){var z=encodeURIComponent(H);z===H&&(z=escape(H));E=E.split(H).join(z)}}var $=E.indexOf("#");if(-1!==$){(this||_global3).hash=E.substr($);E=E.slice(0,$)}var G=E.indexOf("?");if(-1!==G){(this||_global3).search=E.substr(G);(this||_global3).query=E.substr(G+1);t&&((this||_global3).query=_.parse((this||_global3).query));E=E.slice(0,G)}else if(t){(this||_global3).search="";(this||_global3).query={}}E&&((this||_global3).pathname=E);m[C]&&(this||_global3).hostname&&!(this||_global3).pathname&&((this||_global3).pathname="/");if((this||_global3).pathname||(this||_global3).search){B=(this||_global3).pathname||"";var q=(this||_global3).search||"";(this||_global3).path=B+q}(this||_global3).href=this.format();return this||_global3};function urlFormat(e){o.isString(e)&&(e=urlParse(e));return e instanceof Url?e.format():Url.prototype.format.call(e)}Url.prototype.format=function(){var e=(this||_global3).auth||"";if(e){e=encodeURIComponent(e);e=e.replace(/%3A/i,":");e+="@"}var t=(this||_global3).protocol||"",n=(this||_global3).pathname||"",r=(this||_global3).hash||"",i=false,a="";if((this||_global3).host)i=e+(this||_global3).host;else if((this||_global3).hostname){i=e+(-1===(this||_global3).hostname.indexOf(":")?(this||_global3).hostname:"["+(this||_global3).hostname+"]");(this||_global3).port&&(i+=":"+(this||_global3).port)}(this||_global3).query&&o.isObject((this||_global3).query)&&Object.keys((this||_global3).query).length&&(a=_.stringify((this||_global3).query));var s=(this||_global3).search||a&&"?"+a||"";t&&":"!==t.substr(-1)&&(t+=":");if((this||_global3).slashes||(!t||m[t])&&false!==i){i="//"+(i||"");n&&"/"!==n.charAt(0)&&(n="/"+n)}else i||(i="");r&&"#"!==r.charAt(0)&&(r="#"+r);s&&"?"!==s.charAt(0)&&(s="?"+s);n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)}));s=s.replace("#","%23");return t+i+n+s+r};function urlResolve(e,t){return urlParse(e,false,true).resolve(t)}Url.prototype.resolve=function(e){return this.resolveObject(urlParse(e,false,true)).format()};function urlResolveObject(e,t){return e?urlParse(e,false,true).resolveObject(t):t}Url.prototype.resolveObject=function(e){if(o.isString(e)){var t=new Url;t.parse(e,false,true);e=t}var n=new Url;var r=Object.keys(this||_global3);for(var i=0;i<r.length;i++){var a=r[i];n[a]=(this||_global3)[a]}n.hash=e.hash;if(""===e.href){n.href=n.format();return n}if(e.slashes&&!e.protocol){var s=Object.keys(e);for(var c=0;c<s.length;c++){var l=s[c];"protocol"!==l&&(n[l]=e[l])}m[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/");n.href=n.format();return n}if(e.protocol&&e.protocol!==n.protocol){if(!m[e.protocol]){var u=Object.keys(e);for(var d=0;d<u.length;d++){var f=u[d];n[f]=e[f]}n.href=n.format();return n}n.protocol=e.protocol;if(e.host||v[e.protocol])n.pathname=e.pathname;else{var p=(e.pathname||"").split("/");while(p.length&&!(e.host=p.shift()));e.host||(e.host="");e.hostname||(e.hostname="");""!==p[0]&&p.unshift("");p.length<2&&p.unshift("");n.pathname=p.join("/")}n.search=e.search;n.query=e.query;n.host=e.host||"";n.auth=e.auth;n.hostname=e.hostname||e.host;n.port=e.port;if(n.pathname||n.search){var g=n.pathname||"";var h=n.search||"";n.path=g+h}n.slashes=n.slashes||e.slashes;n.href=n.format();return n}var b=n.pathname&&"/"===n.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=_||b||n.host&&e.pathname,E=y,S=n.pathname&&n.pathname.split("/")||[],T=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!m[n.protocol]);if(T){n.hostname="";n.port=null;n.host&&(""===S[0]?S[0]=n.host:S.unshift(n.host));n.host="";if(e.protocol){e.hostname=null;e.port=null;e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host));e.host=null}y=y&&(""===p[0]||""===S[0])}if(_){n.host=e.host||""===e.host?e.host:n.host;n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname;n.search=e.search;n.query=e.query;S=p}
3341else if(p.length){S||(S=[]);S.pop();S=S.concat(p);n.search=e.search;n.query=e.query}else if(!o.isNullOrUndefined(e.search)){if(T){n.hostname=n.host=S.shift();var C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");if(C){n.auth=C.shift();n.host=n.hostname=C.shift()}}n.search=e.search;n.query=e.query;o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:""));n.href=n.format();return n}if(!S.length){n.pathname=null;n.search?n.path="/"+n.search:n.path=null;n.href=n.format();return n}var w=S.slice(-1)[0];var O=(n.host||e.host||S.length>1)&&("."===w||".."===w)||""===w;var x=0;for(var I=S.length;I>=0;I--){w=S[I];if("."===w)S.splice(I,1);else if(".."===w){S.splice(I,1);x++}else if(x){S.splice(I,1);x--}}if(!y&&!E)for(;x--;x)S.unshift("..");!y||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift("");O&&"/"!==S.join("/").substr(-1)&&S.push("");var A=""===S[0]||S[0]&&"/"===S[0].charAt(0);if(T){n.hostname=n.host=A?"":S.length?S.shift():"";C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");if(C){n.auth=C.shift();n.host=n.hostname=C.shift()}}y=y||n.host&&S.length;y&&!A&&S.unshift("");if(S.length)n.pathname=S.join("/");else{n.pathname=null;n.path=null}o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:""));n.auth=e.auth||n.auth;n.slashes=n.slashes||e.slashes;n.href=n.format();return n};Url.prototype.parseHost=function(){var e=(this||_global3).host;var t=a.exec(e);if(t){t=t[0];":"!==t&&((this||_global3).port=t.substr(1));e=e.substr(0,e.length-t.length)}e&&((this||_global3).hostname=e)}},function(e,t,n){const r=n(15);const o=n(19);const i=n(1)("guidStorage");const a={};e.exports=a;let s;let c;const l=function isInvalidStorage(e){return!(r(e.get)&&r(e.set))};const u=function getClientGuid(e){c?e(null,c):s.get(e)};a.override=e=>{if(l(e))throw new Error("The storageInterface argument does not seem to be valid, it must implement get and set methods");if(s!==e){s=e;c&&s.set(c,(e=>{e&&i.error(`Failed to send initial Guid value (${c}) to the newly assigned Guid Storage. The error was: ${e}`)}))}};a.get=e=>{u(((t,n)=>{if(t)e(t);else{if(n)c||(c=n);else{n=o();s.set(n,(t=>{t?e(t):c=n}))}e(null,c)}}))};a.override({get(e){let t;try{t=(void 0!==typeof window?window:_global3).localStorage.getItem("opentok_client_id")}catch(e){t||(t=o())}e(null,t)},set(e,t){try{(void 0!==typeof window?window:_global3).localStorage.setItem("opentok_client_id",e)}catch(e){}t(null)}});a.set=e=>{c=e}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function whatwgRNG(){n(r);return r}}else{var o=new Array(16);e.exports=function mathRNG(){for(var e,t=0;t<16;t++){0===(3&t)&&(e=4294967296*Math.random());o[t]=e>>>((3&t)<<3)&255}return o}}},function(e,t){var n=[];for(var r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);function bytesToUuid(e,t){var r=t||0;var o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}e.exports=bytesToUuid},function(e,t,n){const r=n(7);const o=n(1)("analytics");const i=n(527);const a=n(19);const s=n(244);const c=n(138),l=c.prependProxyToUrlIfNeeded;const u=n(139),d=u.getProxyUrl;const f=a();const p=new i;e.exports=function Analytics(e){var t=this||_global3;let n=e.loggingUrl,i=e.queue,a=void 0===i?p:i,c=e.ajax,u=void 0===c?s:c;(this||_global3).loggingUrl=n;(this||_global3).updateEndPoints=()=>{if(!(this||_global3).proxyUrl){(this||_global3).proxyUrl=d();const e=l((this||_global3).loggingUrl,(this||_global3).proxyUrl);(this||_global3).loggingUrl=e}(this||_global3).endPoint=`${(this||_global3).loggingUrl}/logging/ClientEvent`;(this||_global3).endPointQos=`${(this||_global3).loggingUrl}/logging/ClientQos`};this.updateEndPoints();const g={};const h=function post(e,n,r){void 0===n&&(n=()=>{});a.add((i=>{o.debug("sending analytics:",t.loggingUrl,e);u.post(r?t.endPointQos:t.endPoint,{body:e,overrideMimeType:"text/plain",headers:{Accept:"text/plain","Content-Type":"application/json"}},(e=>{e&&o.debug("Failed to send ClientEvent, moving on to the next item.");n(e||void 0);i()}))}))};
3341const shouldThrottleError=(e,t,n)=>{if(!n)return false;const r=[n,t,e].join("_");const o=100;return(g[r]||0)>=o};(this||_global3).logError=function(e,n,o,i,a){void 0===i&&(i=null);void 0===a&&(a={});const s=a,c=s.partnerId;if(shouldThrottleError(e,n,c))return;const l=[c,n,e].join("_");const u=i;g[l]="undefined"!==typeof g[l]?g[l]+1:1;t.logEvent(r(a,{action:`${n}.${e}`,payload:u}),false)};(this||_global3).logEvent=function(e,n,r,i){void 0===n&&(n=false);void 0===i&&(i=()=>{});t.updateEndPoints();e.clientInstanceId=f;if(r&&!isNaN(r)&&Math.random()>r){o.debug("skipping sending analytics due to throttle:",e);return}o.debug("queueing analytics:",t.loggingUrl,e);let a;try{a=JSON.stringify(e)}catch(e){i(e);return}h(a,i,n)};(this||_global3).logQOS=e=>this.logEvent(e,true)}},function(e,t,n){const r=n(245);const o=n(2);const i=n(247);const a=n(7);const s={};e.exports=s;function formatPostData(e){if("string"===typeof e)return e;const t=[];Object.keys(e).forEach((n=>{t.push(`${encodeURIComponent(n)}=${encodeURIComponent(e[n])}`)}));return t.join("&").replace(/\+/g,"%20")}if("Node"!==o.name){s.request=function(e,t,n){const o=new(void 0!==typeof window?window:_global3).XMLHttpRequest;const i=t||{};const a=i.method;if(a){if(t.overrideMimeType){o.overrideMimeType&&o.overrideMimeType(t.overrideMimeType);delete t.overrideMimeType}if(n){r(o).on("load",(e=>{const t=e.target.status;t>=200&&(t<300||304===t)?n(null,e):n(e)}));r(o).on("error",n)}o.open(t.method,e,true);i.headers||(i.headers={});for(const e in i.headers)Object.prototype.hasOwnProperty.call(i.headers,e)&&o.setRequestHeader(e,i.headers[e]);o.send(t.body&&formatPostData(t.body))}else n(new Error("No HTTP method specified in options"))};s.get=function(e,t,n){const r=a(t||{},{method:"GET"});s.request(e,r,n)};s.post=function(e,t,n){const r=a(t||{},{method:"POST"});s.request(e,r,n)};s.getJSON=function(e,t,n){t=t||{};const r=function done(e,t){if(e)n(e,t&&t.target&&t.target.responseText);else{let e;try{e=JSON.parse(t.target.responseText)}catch(e){n(e,t&&t.target&&t.target.responseText);return}n(null,e,t)}};const o=a({Accept:"application/json"},t.headers||{});s.get(e,a(t||{},{headers:o}),r)};i(s)}},function(e,t,n){const r=n(246);e.exports=function(e,t){return new r(e,t)}},function(e,t,n){const r=n(15);const o={attributes:n(528),css:n(529),classNames:n(533),observers:n(535)};const i=/^#([\w-]*)$/;const a=function nodeListToArray(e){return Array.prototype.slice.call(e)};const s=function selectorToElementArray(e,t){let n;if("undefined"===typeof e)return[];if("string"===typeof e){n=[];const r=i.exec(e);t=t||document;if(r&&r[1]){const e=t.getElementById(r[1]);e&&n.push(e)}else n=t.querySelectorAll(e)}else if(e&&(e.nodeType||(void 0!==typeof window?window:_global3).XMLHttpRequest&&e instanceof(void 0!==typeof window?window:_global3).XMLHttpRequest||e===(void 0!==typeof window?window:_global3))){n=[e];t=e}else if(Array.isArray(e)){n=e.slice();t=null}else n=a(n);return n};const c=function ElementCollection(e,t){const n=s(e,t);(this||_global3).context=t;(this||_global3).toArray=function(){return n};(this||_global3).length=n.length;(this||_global3).first=n[0];(this||_global3).last=n[n.length-1];(this||_global3).get=function(e){return void 0===e?n:n[e]}};e.exports=c;c._attachToOTHelpers={};c._attachToOTHelpers.removeElement=function(e){return new c(e).remove()};c.prototype.getAsArray=function(){let e=this.get();r(e.forEach)||(e=a(e));return e};c.prototype.some=function(e,t){return this.getAsArray().some(e,t)};c.prototype.forEach=function(e,t){this.getAsArray().forEach(e,t);return this||_global3};c.prototype.map=function(e,t){return new c(this.getAsArray().map(e,t),(this||_global3).context)};c.prototype.filter=function(e,t){return new c(this.getAsArray().filter(e,t),(this||_global3).context)};c.prototype.find=function(e){return new c(e,(this||_global3).first)};c.prototype.on=function(e,t){return this.forEach((n=>{n.addEventListener(e,t,false)}))};c.prototype.off=function(e,t){return this.forEach((n=>{n.removeEventListener(e,t,false)}))};c.prototype.once=function(e,t){const n=function(){this.off(e,n);t(...arguments)}.bind(this||_global3);return this.on(e,n)};c.prototype.appendTo=function(e){if(!e)throw new Error("appendTo requires a DOMElement to append to.");return this.forEach((t=>{e.appendChild(t)}))};c.prototype.append=function(){const e=(this||_global3).first;if(!e)return this||_global3;Array.prototype.forEach.call(arguments,(t=>{e.appendChild(t)}));return this||_global3};c.prototype.prepend=function(){if(0===arguments.length)return this||_global3;const e=(this||_global3).first;let t;if(!e)return this||_global3;t=Array.prototype.slice.call(arguments);e.firstElementChild||e.appendChild(t.shift());t.forEach((t=>{e.insertBefore(t,e.firstElementChild)}));return this||_global3};c.prototype.after=function(e){if(!e)throw new Error("after requires a DOMElement to insert after");return this.forEach((t=>{t.parentElement&&(e!==t.parentNode.lastChild?t.parentElement.insertBefore(t,e):t.parentElement.appendChild(t))}))};c.prototype.before=function(e){if(!e)throw new Error("before requires a DOMElement to insert before");return this.forEach((t=>{t.parentElement&&t.parentElement.insertBefore(t,e)}))};c.prototype.remove=function(){return this.forEach((e=>{e.parentNode&&e.parentNode.removeChild(e)}))};c.prototype.empty=function(){return this.forEach((e=>{while(e.firstChild)e.removeChild(e.firstChild)}))};c.prototype.isDisplayNone=function(){return this.some((e=>(0===e.offsetWidth||0===e.offsetHeight)&&"none"===new c(e).css("display")||!(!e.parentNode||!e.parentNode.style)&&new c(e.parentNode).isDisplayNone()))};const l=function findElementWithDisplayNone(e){return 0!==e.offsetWidth&&0!==e.offsetHeight||"none"!==new c(e).css("display")?e.parentNode&&e.parentNode.style?findElementWithDisplayNone(e.parentNode):null:e};c._attachToOTHelpers.emptyElement=function(e){return new c(e).empty()};c._attachToOTHelpers._findElementWithDisplayNone=l;o.css(c,l);o.attributes(c);o.classNames(c);o.observers(c);["on","off","isDisplayNone","show","hide","css","makeVisibleAndYield","addClass","removeClass"].forEach((e=>{c._attachToOTHelpers[e]=function(){const t=Array.prototype.slice.apply(arguments);const n=t.shift();const r=new c(n);return c.prototype[e].apply(r,t)}}))},function(e,t,n){e.exports=function(e){const t={};Object.keys(e).forEach((n=>{t[n]=e[n]}));e._attachToOTHelpers=t}},function(e,t,n){const r=n(15);const o=n(6);const i=n(1)("Collection");e.exports=function Collection(e){let t=[];let n={};const a=e||"id";o(this||_global3);const s=function modelProperty(e,t){return r(e[t])?e[t]():e[t]};const c=function onModelUpdate(e){this.trigger("update",e);this.trigger(`update:${e.target.id}`,e)}.bind(this||_global3);const l=function onModelDestroyed(e){this.remove(e.target,e.reason)}.bind(this||_global3);(this||_global3).reset=function(){t.forEach((function(e){e.off("updated",c,this||_global3);e.off("destroyed",l,this||_global3)}),this||_global3);t=[];n={}};(this||_global3).destroy=function(e){t.forEach((t=>{t&&"function"===typeof t.destroy&&t.destroy(e,true)}));this.reset();this.off()};(this||_global3).get=function(e){return e&&void 0!==n[e]?t[n[e]]:void 0};(this||_global3).has=function(e){return e&&void 0!==n[e]};(this||_global3).toString=function(){return t.toString()};
3341(this||_global3).where=function(e,n){return r(e)?t.filter(e,n):t.filter((t=>{for(const n in e)if(e.hasOwnProperty(n)&&s(t,n)!==e[n])return false;return true}))};(this||_global3).find=function(e,n){let o;o=r(e)?e:function filterFn(t){for(const n in e)if(e.hasOwnProperty(n)&&s(t,n)!==e[n])return false;return true};o=o.bind(n);for(let e=0;e<t.length;++e)if(true===o(t[e]))return t[e];return null};(this||_global3).forEach=function(e,n){t.forEach(e,n);return this||_global3};(this||_global3).map=function(e){return t.map(e)};(this||_global3).add=function(e){const r=s(e,a);if(this.has(r)){i.warn(`Model ${r} is already in the collection`,t);return this||_global3}n[r]=t.push(e)-1;e.on("updated",c,this||_global3);e.on("destroyed",l,this||_global3);this.trigger("add",e);this.trigger(`add:${r}`,e);return this||_global3};(this||_global3).remove=function(e,r){const o=s(e,a);t.splice(n[o],1);for(let e=n[o];e<t.length;++e)n[s(t[e],a)]=e;delete n[o];e.off("updated",c,this||_global3);e.off("destroyed",l,this||_global3);this.trigger("remove",e,r);this.trigger(`remove:${o}`,e,r);return this||_global3};(this||_global3)._triggerAddEvents=function(){(this||_global3).where.apply(this||_global3,arguments).forEach((function(e){this.trigger("add",e);this.trigger(`add:${s(e,a)}`,e)}),this||_global3)};(this||_global3).length=function(){return t.length}}},function(e,t,n){const r=n(1)("deprecation");e.exports=function setDeprecatedProperty(e,t,n){let o=void 0===n?{}:n,i=o.value,a=o.name,s=void 0===a?`${t}`:a,c=o.getWarning,l=void 0===c?"":c,u=o.setWarning,d=void 0===u?"":u,f=o.canSet,p=void 0!==f&&f,g=o.warnOnSet,h=void 0!==g&&g;let b=i;let v=false;let m=!h;const _={get(){if(!v){v=true;r.warn(`${s} is deprecated, and will be removed in the future. ${l}`.trim())}return b},set(e){p&&(b=e);if(!m){m=true;p?r.warn(`${s} is deprecated. ${d}`.trim()):r.warn(`${s} is deprecated, and will be removed in the future. ${d}`.trim())}}};Object.defineProperty(e,t,_)}},function(e,t,n){const r=n(2);const o=n(9);let i;const a=["description","fileName","lineNumber","message","name","number","stack"];const s=function Error_(e,t,n){switch(arguments.length){case 1:if(o(e)){n=e;t=void 0;e=void 0}break;case 2:if(o(t)){n=t;t=void 0}break;default:}if(n instanceof Error)for(let e=0,t=a.length;e<t;++e)(this||_global3)[a[e]]=n[a[e]];else if(o(n))for(const e in n)n.hasOwnProperty(e)&&((this||_global3)[e]=n[e]);if(!((this||_global3).fileName&&(this||_global3).lineNumber&&(this||_global3).columnNumber&&(this||_global3).stack)){const e=i();!(this||_global3).fileName&&e.fileName&&((this||_global3).fileName=e.fileName);!(this||_global3).lineNumber&&e.lineNumber&&((this||_global3).lineNumber=e.lineNumber);!(this||_global3).columnNumber&&e.columnNumber&&((this||_global3).columnNumber=e.columnNumber);!(this||_global3).stack&&e.stack&&((this||_global3).stack=e.stack)}!(this||_global3).message&&e&&((this||_global3).message=e);(this||_global3).name&&"Error"!==(this||_global3).name||!t||((this||_global3).name=t)};e.exports=s;s.prototype=Object.create(Error.prototype);s.prototype.toString=function(){let e="";(this||_global3).fileName&&(e+=` ${(this||_global3).fileName}`);if((this||_global3).lineNumber){e+=` ${(this||_global3).lineNumber}`;(this||_global3).columnNumber&&(e+=`:${(this||_global3).columnNumber}`)}return`<${(this||_global3).name?`${(this||_global3).name} `:""}${(this||_global3).message}${e}>`};s.prototype.valueOf=s.prototype.toString;const c=function prepareStackTrace(e,t){return t.slice(2).map((e=>{const t={fileName:e.getFileName(),linenumber:e.getLineNumber(),columnNumber:e.getColumnNumber()};e.getFunctionName()&&(t.functionName=e.getFunctionName());e.getMethodName()&&(t.methodName=e.getMethodName());e.getThis()&&(t.self=e.getThis());return t}))};i=function getErrorLocation(){const e={};let t,n,o;switch(r.name){case"Firefox":case"Safari":try{(void 0!==typeof window?window:_global3).call.js.is.explody()}catch(e){o=e}t=(o.stack||"").split("\n");t.shift();t.shift();e.stack=t;n=/@(.+?):([0-9]+)(:([0-9]+))?$/.exec(t[0]);if(n){e.fileName=n[1];e.lineNumber=parseInt(n[2],10);n.length>3&&(e.columnNumber=parseInt(n[4],10))}break;case"Chrome":case"Node":case"Opera":var i=Error.prepareStackTrace;Error.prepareStackTrace=c;o=new Error;e.stack=o.stack;Error.prepareStackTrace=i;var a=e.stack[0];e.lineNumber=a.lineNumber;e.columnNumber=a.columnNumber;e.fileName=a.fileName;a.functionName&&(e.functionName=a.functionName);a.methodName&&(e.methodName=a.methodName);a.self&&(e.self=a.self);break;default:o=new Error;o.stack&&(e.stack=o.stack.split("\n"));break}o.message&&(e.message=o.message);return e}},function(e,t,n){var r={};r.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)};r.localCName=r.generateIdentifier();r.splitLines=function(e){return e.trim().split("\n").map((function(e){return e.trim()}))};r.splitSections=function(e){var t=e.split("\nm=");return t.map((function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"}))};r.getDescription=function(e){var t=r.splitSections(e);return t&&t[0]};r.getMediaSections=function(e){var t=r.splitSections(e);t.shift();return t};r.matchPrefix=function(e,t){return r.splitLines(e).filter((function(e){return 0===e.indexOf(t)}))};r.parseCandidate=function(e){var t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");var n={foundation:t[0],component:parseInt(t[1],10),protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(var r=8;r<t.length;r+=2)switch(t[r]){case"raddr":n.relatedAddress=t[r+1];break;case"rport":n.relatedPort=parseInt(t[r+1],10);break;case"tcptype":n.tcpType=t[r+1];break;case"ufrag":n.ufrag=t[r+1];n.usernameFragment=t[r+1];break;default:n[t[r]]=t[r+1];break}return n};r.writeCandidate=function(e){var t=[];t.push(e.foundation);t.push(e.component);t.push(e.protocol.toUpperCase());t.push(e.priority);t.push(e.address||e.ip);t.push(e.port);var n=e.type;t.push("typ");t.push(n);if("host"!==n&&e.relatedAddress&&e.relatedPort){t.push("raddr");t.push(e.relatedAddress);t.push("rport");t.push(e.relatedPort)}if(e.tcpType&&"tcp"===e.protocol.toLowerCase()){t.push("tcptype");t.push(e.tcpType)}if(e.usernameFragment||e.ufrag){t.push("ufrag");t.push(e.usernameFragment||e.ufrag)}return"candidate:"+t.join(" ")};r.parseIceOptions=function(e){return e.substr(14).split(" ")};r.parseRtpMap=function(e){var t=e.substr(9).split(" ");var n={payloadType:parseInt(t.shift(),10)};t=t[0].split("/");n.name=t[0];n.clockRate=parseInt(t[1],10);n.channels=3===t.length?parseInt(t[2],10):1;n.numChannels=n.channels;return n};r.writeRtpMap=function(e){var t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);var n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"};r.parseExtmap=function(e){var t=e.substr(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1]}};r.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"};r.parseFmtp=function(e){var t={};var n;var r=e.substr(e.indexOf(" ")+1).split(";");for(var o=0;o<r.length;o++){n=r[o].trim().split("=");t[n[0].trim()]=n[1]}return t};r.writeFmtp=function(e){var t="";var n=e.payloadType;void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType);if(e.parameters&&Object.keys(e.parameters).length){var r=[];
3341Object.keys(e.parameters).forEach((function(t){e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}));t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t};r.parseRtcpFb=function(e){var t=e.substr(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}};r.writeRtcpFb=function(e){var t="";var n=e.payloadType;void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType);e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach((function(e){t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}));return t};r.parseSsrcMedia=function(e){var t=e.indexOf(" ");var n={ssrc:parseInt(e.substr(7,t-7),10)};var r=e.indexOf(":",t);if(r>-1){n.attribute=e.substr(t+1,r-t-1);n.value=e.substr(r+1)}else n.attribute=e.substr(t+1);return n};r.parseSsrcGroup=function(e){var t=e.substr(13).split(" ");return{semantics:t.shift(),ssrcs:t.map((function(e){return parseInt(e,10)}))}};r.getMid=function(e){var t=r.matchPrefix(e,"a=mid:")[0];if(t)return t.substr(6)};r.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}};r.getDtlsParameters=function(e,t){var n=r.matchPrefix(e+t,"a=fingerprint:");return{role:"auto",fingerprints:n.map(r.parseFingerprint)}};r.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";e.fingerprints.forEach((function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}));return n};r.parseCryptoLine=function(e){var t=e.substr(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}};r.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"===typeof e.keyParams?r.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"};r.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;var t=e.substr(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}};r.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")};r.getCryptoParameters=function(e,t){var n=r.matchPrefix(e+t,"a=crypto:");return n.map(r.parseCryptoLine)};r.getIceParameters=function(e,t){var n=r.matchPrefix(e+t,"a=ice-ufrag:")[0];var o=r.matchPrefix(e+t,"a=ice-pwd:")[0];return n&&o?{usernameFragment:n.substr(12),password:o.substr(10)}:null};r.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"};r.parseRtpParameters=function(e){var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]};var n=r.splitLines(e);var o=n[0].split(" ");for(var i=3;i<o.length;i++){var a=o[i];var s=r.matchPrefix(e,"a=rtpmap:"+a+" ")[0];if(s){var c=r.parseRtpMap(s);var l=r.matchPrefix(e,"a=fmtp:"+a+" ");c.parameters=l.length?r.parseFmtp(l[0]):{};c.rtcpFeedback=r.matchPrefix(e,"a=rtcp-fb:"+a+" ").map(r.parseRtcpFb);t.codecs.push(c);switch(c.name.toUpperCase()){case"RED":case"ULPFEC":t.fecMechanisms.push(c.name.toUpperCase());break;default:break}}}r.matchPrefix(e,"a=extmap:").forEach((function(e){t.headerExtensions.push(r.parseExtmap(e))}));return t};r.writeRtpDescription=function(e,t){var n="";n+="m="+e+" ";n+=t.codecs.length>0?"9":"0";n+=" UDP/TLS/RTP/SAVPF ";n+=t.codecs.map((function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType})).join(" ")+"\r\n";n+="c=IN IP4 0.0.0.0\r\n";n+="a=rtcp:9 IN IP4 0.0.0.0\r\n";t.codecs.forEach((function(e){n+=r.writeRtpMap(e);n+=r.writeFmtp(e);n+=r.writeRtcpFb(e)}));var o=0;t.codecs.forEach((function(e){e.maxptime>o&&(o=e.maxptime)}));o>0&&(n+="a=maxptime:"+o+"\r\n");n+="a=rtcp-mux\r\n";t.headerExtensions&&t.headerExtensions.forEach((function(e){n+=r.writeExtmap(e)}));return n};r.parseRtpEncodingParameters=function(e){var t=[];var n=r.parseRtpParameters(e);var o=-1!==n.fecMechanisms.indexOf("RED");var i=-1!==n.fecMechanisms.indexOf("ULPFEC");var a=r.matchPrefix(e,"a=ssrc:").map((function(e){return r.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute}));var s=a.length>0&&a[0].ssrc;var c;var l=r.matchPrefix(e,"a=ssrc-group:FID").map((function(e){var t=e.substr(17).split(" ");return t.map((function(e){return parseInt(e,10)}))}));l.length>0&&l[0].length>1&&l[0][0]===s&&(c=l[0][1]);n.codecs.forEach((function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var n={ssrc:s,codecPayloadType:parseInt(e.parameters.apt,10)};s&&c&&(n.rtx={ssrc:c});t.push(n);if(o){n=JSON.parse(JSON.stringify(n));n.fec={ssrc:s,mechanism:i?"red+ulpfec":"red"};t.push(n)}}}));0===t.length&&s&&t.push({ssrc:s});var u=r.matchPrefix(e,"b=");if(u.length){u=0===u[0].indexOf("b=TIAS:")?parseInt(u[0].substr(7),10):0===u[0].indexOf("b=AS:")?1e3*parseInt(u[0].substr(5),10)*.95-16e3:void 0;t.forEach((function(e){e.maxBitrate=u}))}return t};r.parseRtcpParameters=function(e){var t={};var n=r.matchPrefix(e,"a=ssrc:").map((function(e){return r.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute}))[0];if(n){t.cname=n.value;t.ssrc=n.ssrc}var o=r.matchPrefix(e,"a=rtcp-rsize");t.reducedSize=o.length>0;t.compound=0===o.length;var i=r.matchPrefix(e,"a=rtcp-mux");t.mux=i.length>0;return t};r.parseMsid=function(e){var t;var n=r.matchPrefix(e,"a=msid:");if(1===n.length){t=n[0].substr(7).split(" ");
3341return{stream:t[0],track:t[1]}}var o=r.matchPrefix(e,"a=ssrc:").map((function(e){return r.parseSsrcMedia(e)})).filter((function(e){return"msid"===e.attribute}));if(o.length>0){t=o[0].value.split(" ");return{stream:t[0],track:t[1]}}};r.parseSctpDescription=function(e){var t=r.parseMLine(e);var n=r.matchPrefix(e,"a=max-message-size:");var o;n.length>0&&(o=parseInt(n[0].substr(19),10));isNaN(o)&&(o=65536);var i=r.matchPrefix(e,"a=sctp-port:");if(i.length>0)return{port:parseInt(i[0].substr(12),10),protocol:t.fmt,maxMessageSize:o};var a=r.matchPrefix(e,"a=sctpmap:");if(a.length>0){var s=r.matchPrefix(e,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(s[0],10),protocol:s[1],maxMessageSize:o}}};r.writeSctpDescription=function(e,t){var n=[];n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"];void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n");return n.join("")};r.generateSessionId=function(){return Math.random().toString().substr(2,21)};r.writeSessionBoilerplate=function(e,t,n){var o;var i=void 0!==t?t:2;o=e||r.generateSessionId();var a=n||"thisisadapterortc";return"v=0\r\no="+a+" "+o+" "+i+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"};r.writeMediaSection=function(e,t,n,o){var i=r.writeRtpDescription(e.kind,t);i+=r.writeIceParameters(e.iceGatherer.getLocalParameters());i+=r.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active");i+="a=mid:"+e.mid+"\r\n";e.direction?i+="a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?i+="a=sendrecv\r\n":e.rtpSender?i+="a=sendonly\r\n":e.rtpReceiver?i+="a=recvonly\r\n":i+="a=inactive\r\n";if(e.rtpSender){var a="msid:"+o.id+" "+e.rtpSender.track.id+"\r\n";i+="a="+a;i+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+a;if(e.sendEncodingParameters[0].rtx){i+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+a;i+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n"}}i+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n";e.rtpSender&&e.sendEncodingParameters[0].rtx&&(i+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n");return i};r.getDirection=function(e,t){var n=r.splitLines(e);for(var o=0;o<n.length;o++)switch(n[o]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return n[o].substr(2);default:}return t?r.getDirection(t):"sendrecv"};r.getKind=function(e){var t=r.splitLines(e);var n=t[0].split(" ");return n[0].substr(2)};r.isRejected=function(e){return"0"===e.split(" ",2)[1]};r.parseMLine=function(e){var t=r.splitLines(e);var n=t[0].substr(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}};r.parseOLine=function(e){var t=r.matchPrefix(e,"o=")[0];var n=t.substr(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}};r.isValidSDP=function(e){if("string"!==typeof e||0===e.length)return false;var t=r.splitLines(e);for(var n=0;n<t.length;n++)if(t[n].length<2||"="!==t[n].charAt(1))return false;return true};true;e.exports=r},function(e,t,n){
3342/**
3343       * Returns the number of streams allowed for simulcast
3344       * @param {Boolean} isChromiumEdge
3345       * @param {String} browserName
3346       * @param {Boolean} isScreenSharing
3347       * @param {Boolean} isCustomVideoTrack
3348       * @param {Object} sessionInfo
3349       * @param {Object} constraints
3350       * @param {Object} videoDimensions
3351       * @return {Number}
3352      */
3353e.exports=function calculateCapableSimulcastStreams(e){const t=["Chrome","Safari","Edge","Opera"];return-1===t.indexOf(e.browserName)||"Edge"===e.browserName&&!e.isChromiumEdge||e.isScreenSharing||e.sessionInfo.p2pEnabled||!e.constraints.video&&!e.isCustomVideoTrack?1:e.videoDimensions.width>640&&e.videoDimensions.height>480?3:2}},function(e,t,n){var r=n(3);var o=r(n(18));var i;const a=n(48);
3354/*
3355       * A <code>RTCPeerConnection.getStats</code> based audio level sampler.
3356       *
3357       * It uses the <code>getStats</code> method to get the <code>audioOutputLevel</code>.
3358       * This implementation expects the single parameter version of the <code>getStats</code> method.
3359       *
3360       * Currently the <code>audioOutputLevel</code> stats is only supported in Chrome.
3361       *
3362       * @param {function} "getStats" function or "getSynchronizationSources" function
3363       * @constructor
3364       */e.exports=(i=function(){function GetAudioLevelSampler(e,t){var n;let r=void 0===t?{}:t,i=r.requestAnimationFrame,s=void 0===i?(n=window).requestAnimationFrame.bind(n):i;(0,o.default)(this||_global3,"_lastCalled",a());(0,o.default)(this||_global3,"_audioLevel",void 0);(0,o.default)(this||_global3,"_running",false);(this||_global3)._requestAnimationFrame=s;(this||_global3)._getAudioLevel=e;this._startLoop()}var e=GetAudioLevelSampler.prototype;e._startLoop=function _startLoop(){if(!(this||_global3)._running){(this||_global3)._running=true;this._requestAnimationFrame((this||_global3)._loop.bind(this||_global3))}};e._loop=function _loop(){this._getAudioLevel(((e,t)=>{let n=null;if(!e){for(let e=0;e<t.length;e+=1){const r=t[e];let o=null;if(void 0!==r.audioOutputLevel){const e=parseFloat(r.audioOutputLevel)/32768;isNaN(e)||(o=e)}else void 0!==r.audioLevel&&(o=r.audioLevel);null!==o&&(null===n||o>n)&&(n=o)}(this||_global3)._audioLevel=n;(this||_global3)._running&&a()-(this||_global3)._lastCalled<1e4?this._requestAnimationFrame((this||_global3)._loop.bind(this||_global3)):(this||_global3)._running=false}}))};e.destroy=function destroy(){(this||_global3)._running=false};e.sample=function sample(e){if("function"===typeof e)throw new Error("sample no longer takes a callback");this._startLoop();(this||_global3)._lastCalled=a();return(this||_global3)._audioLevel};return GetAudioLevelSampler}(),i)},function(e,t,n){const r=n(147);const o=n(562);const i=n(264);function createSourceConstraint(e,t,n){return!(!e.publish&&t)&&("boolean"===typeof e.source?e.source:n?{mandatory:{sourceId:e.source}}:i(e.source)?{}:{deviceId:{exact:e.source}})}function generateAudioConstraints(e){let t=createSourceConstraint(e.audio,e.enableRenegotiation,e.usingOptionalMandatoryStyle);if(false===t)return false;const n=e.usingOptionalMandatoryStyle,o=e.enableStereo,i=e.echoCancellation,a=e.noiseSuppression,s=e.autoGainControl,c=e.disableAudioProcessing;const addConstraint=e=>{if("object"===typeof t)if(n){r(t,{optional:[]});
3364t.optional.push(e)}else r(t,e)};!o&&!c&&i&&a&&s||true!==t||(t={});o&&addConstraint({channelCount:2});["echoCancellation","autoGainControl","noiseSuppression"].forEach((t=>{const n=!c&&e[t];addConstraint({[t]:n})}));return t}function generateVideoConstraints(e){let t=createSourceConstraint(e.video,e.enableRenegotiation,e.usingOptionalMandatoryStyle);if(false===t)return false;const n=e.videoDimensions,o=e.frameRate,i=e.maxResolution,a=e.facingMode,s=e.usingOptionalMandatoryStyle;(n||o||i||a)&&true===t&&(t={});if(n){const e=n.width;const o=n.height;if(s){r(t,{optional:[]});t.optional.push({minWidth:e},{maxWidth:e},{minHeight:o},{maxHeight:o})}else r(t,{width:{ideal:e},height:{ideal:o}})}if(o)if(s){r(t,{optional:[]});t.optional.push({minFrameRate:o},{maxFrameRate:o})}else r(t,{frameRate:{ideal:o}});i&&r(t,s?{mandatory:{maxWidth:i.width,maxHeight:i.height}}:{width:{max:i.width},height:{max:i.height}});if(a)if(s){r(t,{optional:[]});t.optional.push({facingMode:a})}else r(t,{facingMode:{ideal:a}});return t}function generateConstraints(e){return{audio:generateAudioConstraints(e),video:generateVideoConstraints(e)}}e.exports=function generateConstraintInfo(e){const t=o(e);const n=generateConstraints(t);return{constraints:n,publishAudio:t.audio.publish,publishVideo:t.video.publish,frameRate:t.frameRate,videoDimensions:t.videoDimensions,audioDeviceId:"string"===typeof t.audio.source?t.audio.source:void 0,videoDeviceId:"string"===typeof t.video.source?t.video.source:void 0}}},function(e,t,n){var r=n(63),o=n(51);
3365/**
3366       * This function is like `assignValue` except that it doesn't assign
3367       * `undefined` values.
3368       *
3369       * @private
3370       * @param {Object} object The object to modify.
3371       * @param {string} key The key of the property to assign.
3372       * @param {*} value The value to assign.
3373       */function assignMergeValue(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}e.exports=assignMergeValue},function(e,t){
3374/**
3375       * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
3376       *
3377       * @private
3378       * @param {Object} object The object to query.
3379       * @param {string} key The key of the property to get.
3380       * @returns {*} Returns the property value.
3381       */
3382function safeGet(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}e.exports=safeGet},function(e,t,n){const r=n(2),o=r.name,i=r.version,a=r.isChromiumEdge;e.exports=a||"Chrome"===o&&i>=72||"Firefox"===o&&i>=66||"Opera"===o&&i>=60||"Safari"===o},function(e,t,n){var r=n(58),o=n(259);
3383/**
3384       * Converts the first character of `string` to upper case and the remaining
3385       * to lower case.
3386       *
3387       * @static
3388       * @memberOf _
3389       * @since 3.0.0
3390       * @category String
3391       * @param {string} [string=''] The string to capitalize.
3392       * @returns {string} Returns the capitalized string.
3393       * @example
3394       *
3395       * _.capitalize('FRED');
3396       * // => 'Fred'
3397       */function capitalize(e){return o(r(e).toLowerCase())}e.exports=capitalize},function(e,t,n){var r=n(567);
3398/**
3399       * Converts the first character of `string` to upper case.
3400       *
3401       * @static
3402       * @memberOf _
3403       * @since 4.0.0
3404       * @category String
3405       * @param {string} [string=''] The string to convert.
3406       * @returns {string} Returns the converted string.
3407       * @example
3408       *
3409       * _.upperFirst('fred');
3410       * // => 'Fred'
3411       *
3412       * _.upperFirst('FRED');
3413       * // => 'FRED'
3414       */var o=r("toUpperCase");e.exports=o},function(e,t){
3415/**
3416       * The base implementation of `_.slice` without an iteratee call guard.
3417       *
3418       * @private
3419       * @param {Array} array The array to slice.
3420       * @param {number} [start=0] The start position.
3421       * @param {number} [end=array.length] The end position.
3422       * @returns {Array} Returns the slice of `array`.
3423       */
3424function baseSlice(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t);n=n>o?o:n;n<0&&(n+=o);o=t>n?0:n-t>>>0;t>>>=0;var i=Array(o);while(++r<o)i[r]=e[r+t];return i}e.exports=baseSlice},function(e,t){var n="\\ud800-\\udfff",r="\\u0300-\\u036f",o="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",a=r+o+i,s="\\ufe0e\\ufe0f";var c="\\u200d";var l=RegExp("["+c+n+a+s+"]");
3425/**
3426       * Checks if `string` contains Unicode symbols.
3427       *
3428       * @private
3429       * @param {string} string The string to inspect.
3430       * @returns {boolean} Returns `true` if a symbol is found, else `false`.
3431       */function hasUnicode(e){return l.test(e)}e.exports=hasUnicode},function(e,t,n){var r=n(569),o=n(261),i=n(570);
3432/**
3433       * Converts `string` to an array.
3434       *
3435       * @private
3436       * @param {string} string The string to convert.
3437       * @returns {Array} Returns the converted array.
3438       */function stringToArray(e){return o(e)?i(e):r(e)}e.exports=stringToArray},function(e,t,n){const r=n(2);e.exports=Boolean(r.isChrome&&r.version>=74||r.isEdge&&r.version>=79)},function(e,t,n){const r=n(571);const o=n(265);const i=n(2);e.exports=e=>i.isElectron?"screen"===e||o(e):r.indexOf(e)>-1},function(e,t,n){const r=n(2);e.exports=e=>!!r.isElectron&&(e instanceof MediaStreamTrack&&"Screen"===e.label)},function(e,t,n){var r=n(99),o=n(576);
3439/**
3440       * The base implementation of `_.forEach` without support for iteratee shorthands.
3441       *
3442       * @private
3443       * @param {Array|Object} collection The collection to iterate over.
3444       * @param {Function} iteratee The function invoked per iteration.
3445       * @returns {Array|Object} Returns `collection`.
3446       */var i=o(r);e.exports=i},function(e,t,n){e.exports=15e3},function(e,t,n){
3447/**
3448       * castToBoolean
3449       *
3450       * @param {any} The value to cast
3451       * @returns {Boolean} True if value === 'true' or value === true, otherwise false.
3452       */
3453e.exports=function(e,t){void 0===t&&(t=false);return void 0===e?t:"true"===e||true===e}},function(e,t,n){const r=n(2);e.exports=()=>{const e=!r.isNode&&!r.isElectron;if(!e)return false;const t=(r.isChrome||r.isOpera||r.isChromiumEdge)&&r.version>=74||r.isFirefox&&r.version>=68||r.isSafari&&r.version>=11;return t}},function(e,t){function _setPrototypeOf(t,n){e.exports=_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e};return _setPrototypeOf(t,n)}e.exports=_setPrototypeOf},function(e,t,n){var r=n(33),o=n(77),i=n(593),a=n(57),s=n(39),c=n(596),l=n(137),u=n(184);var d=1,f=2,p=4;
3454/**
3455       * The opposite of `_.pick`;
3455 this method creates an object composed of the
3456       * own and inherited enumerable property paths of `object` that are not omitted.
3457       *
3458       * **Note:** This method is considerably slower than `_.pick`.
3459       *
3460       * @static
3461       * @since 0.1.0
3462       * @memberOf _
3463       * @category Object
3464       * @param {Object} object The source object.
3465       * @param {...(string|string[])} [paths] The property paths to omit.
3466       * @returns {Object} Returns the new object.
3467       * @example
3468       *
3469       * var object = { 'a': 1, 'b': '2', 'c': 3 };
3470       *
3471       * _.omit(object, ['a', 'c']);
3472       * // => { 'b': '2' }
3473       */var g=l((function(e,t){var n={};if(null==e)return n;var l=false;t=r(t,(function(t){t=a(t,e);l||(l=t.length>1);return t}));s(e,u(e),n);l&&(n=o(n,d|f|p,c));var g=t.length;while(g--)i(n,t[g]);return n}));e.exports=g},function(e,t,n){var r=n(205),o=n(34),i=n(96);var a=Math.max;
3474/**
3475       * This method is like `_.find` except that it returns the index of the first
3476       * element `predicate` returns truthy for instead of the element itself.
3477       *
3478       * @static
3479       * @memberOf _
3480       * @since 1.1.0
3481       * @category Array
3482       * @param {Array} array The array to inspect.
3483       * @param {Function} [predicate=_.identity] The function invoked per iteration.
3484       * @param {number} [fromIndex=0] The index to search from.
3485       * @returns {number} Returns the index of the found element, else `-1`.
3486       * @example
3487       *
3488       * var users = [
3489       *   { 'user': 'barney',  'active': false },
3490       *   { 'user': 'fred',    'active': false },
3491       *   { 'user': 'pebbles', 'active': true }
3492       * ];
3493       *
3494       * _.findIndex(users, function(o) { return o.user == 'barney'; });
3495       * // => 0
3496       *
3497       * // The `_.matches` iteratee shorthand.
3498       * _.findIndex(users, { 'user': 'fred', 'active': false });
3499       * // => 1
3500       *
3501       * // The `_.matchesProperty` iteratee shorthand.
3502       * _.findIndex(users, ['active', false]);
3503       * // => 0
3504       *
3505       * // The `_.property` iteratee shorthand.
3506       * _.findIndex(users, 'active');
3507       * // => 2
3508       */function findIndex(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var c=null==n?0:i(n);c<0&&(c=a(s+c,0));return r(e,o(t,3),c)}e.exports=findIndex},function(e,t,n){var r=n(598);
3509/**
3510       * Creates a duplicate-free version of an array, using
3511       * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
3512       * for equality comparisons, in which only the first occurrence of each element
3513       * is kept. The order of result values is determined by the order they occur
3514       * in the array.
3515       *
3516       * @static
3517       * @memberOf _
3518       * @since 0.1.0
3519       * @category Array
3520       * @param {Array} array The array to inspect.
3521       * @returns {Array} Returns the new duplicate free array.
3522       * @example
3523       *
3524       * _.uniq([2, 1, 2]);
3525       * // => [2, 1]
3526       */function uniq(e){return e&&e.length?r(e):[]}e.exports=uniq},function(e,t,n){const r=n(606);const o=n(277);const i=n(102)();e.exports=(e,t)=>{o(e,((e,n)=>{let o=[];i?"function"===typeof n.values?o=r(n.values()):"function"!==typeof n.forEach?o=Object.keys(n).map((e=>n[e])):n.forEach((e=>{o.push(e)})):n.result().forEach((e=>{const t={};e.names().forEach((n=>{t[n]=e.stat(n)}));t.id=e.id;t.type=e.type;t.timestamp=e.timestamp;o.push(t)}));t(null,o)}))}},function(e,t,n){var r=n(29),o=n(10),i=n(16);var a="[object String]";
3527/**
3528       * Checks if `value` is classified as a `String` primitive or object.
3529       *
3530       * @static
3531       * @since 0.1.0
3532       * @memberOf _
3533       * @category Lang
3534       * @param {*} value The value to check.
3535       * @returns {boolean} Returns `true` if `value` is a string, else `false`.
3536       * @example
3537       *
3538       * _.isString('abc');
3539       * // => true
3540       *
3541       * _.isString(1);
3542       * // => false
3543       */function isString(e){return"string"==typeof e||!o(e)&&i(e)&&r(e)==a}e.exports=isString},function(e,t,n){var r=n(608),o=n(30);
3544/**
3545       * Creates an array of the own enumerable string keyed property values of `object`.
3546       *
3547       * **Note:** Non-object values are coerced to objects.
3548       *
3549       * @static
3550       * @since 0.1.0
3551       * @memberOf _
3552       * @category Object
3553       * @param {Object} object The object to query.
3554       * @returns {Array} Returns the array of property values.
3555       * @example
3556       *
3557       * function Foo() {
3558       *   this.a = 1;
3559       *   this.b = 2;
3560       * }
3561       *
3562       * Foo.prototype.c = 3;
3563       *
3564       * _.values(new Foo);
3565       * // => [1, 2] (iteration order is not guaranteed)
3566       *
3567       * _.values('hi');
3568       * // => ['h', 'i']
3569       */function values(e){return null==e?[]:r(e,o(e))}e.exports=values},function(e,t,n){const r=n(102)();const getRtcStats=(e,t)=>{e.getStats(null).then((e=>t(null,e))).catch(t)};const getRtcStatsLegacy=(e,t)=>{e.getStats((e=>{t(null,e)}),t)};const getRtcStatsReportAdapter=(e,t)=>{const n=r?getRtcStats:getRtcStatsLegacy;n(e,t)};e.exports=getRtcStatsReportAdapter},function(e,t,n){var r=n(3);t.__esModule=true;t.default=void 0;var o=r(n(156));var i=r(n(59));var a=r(n(18));var s=n(41);var c=r(n(36));var l=r(n(618));var u=r(n(620));var d=r(n(48));var f=r(n(1));const p=(0,f.default)("QoS");let g=function(e){(0,i.default)(Qos,e);function Qos(){var t;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t=e.call(this||_global3,...r)||this||_global3;(0,a.default)((0,o.default)(t),"_peerConnection",void 0);(0,a.default)((0,o.default)(t),"_isPublisher",void 0);(0,a.default)((0,o.default)(t),"timeoutId",void 0);(0,a.default)((0,o.default)(t),"_creationTime",(0,d.default)());(0,a.default)((0,o.default)(t),"offerMessagesReceived",0);(0,a.default)((0,o.default)(t),"prevStats",{timeStamp:(0,d.default)()});(0,a.default)((0,o.default)(t),"changeCounters",{videoCodec:new u.default,audioCodec:new u.default});return t}var t=Qos.prototype;t.startCollecting=function startCollecting(e,t){if(!e||!e.getStats)return;(this||_global3)._isPublisher=t;const n=Boolean((this||_global3)._peerConnection);(this||_global3)._peerConnection=e;if(n)return;const collectionLoop=e=>{const t=(0,d.default)();const n={timeStamp:t,duration:Math.round((t-(this||_global3)._creationTime)/1e3),period:Math.round((t-(this||_global3).prevStats.timeStamp)/1e3)};(0,l.default)((this||_global3)._peerConnection,(this||_global3).prevStats,n,(this||_global3)._isPublisher,((t,n)=>{if(t)p.error("Failed to Parse QOS Stats:",t);else{this.handleParsedStats(n);clearTimeout((this||_global3).timeoutId);(this||_global3).timeoutId=setTimeout((()=>collectionLoop(Qos.INTERVAL)),e)}}))};(this||_global3).timeoutId=setTimeout((()=>collectionLoop(Qos.INTERVAL-Qos.INITIAL_INTERVAL)),Qos.INITIAL_INTERVAL)};t.stopCollecting=function stopCollecting(){if((this||_global3).timeoutId){clearTimeout((this||_global3).timeoutId);(this||_global3).timeoutId=null}(this||_global3)._peerConnection=null};t.handleOfferMessageReceived=function handleOfferMessageReceived(){(this||_global3).offerMessagesReceived+=1};t.handleParsedStats=function handleParsedStats(e){Object.keys((this||_global3).changeCounters).forEach((t=>{(this||_global3).changeCounters[t].onValue(e[t]);e[`${t}ChangeCount`]=(this||_global3).changeCounters[t].changeCount}));e.offerMessagesReceived=(this||_global3).offerMessagesReceived;const t=(0,c.default)(e);const n=["audioSentBytes","audioSentPackets","audioSentPacketsLost","videoSentBytes","videoSentPackets","videoSentPacketsLost","audioRecvBytes","audioRecvPackets","audioRecvPacketsLost","videoRecvBytes","videoRecvPackets","videoRecvPacketsLost"];n.forEach((n=>{t[n]=(this||_global3).prevStats&&(this||_global3).prevStats[n]?e[n]-(this||_global3).prevStats[n]:e[n]}));if((this||_global3).prevStats&&(this||_global3).prevStats.videoFramesReceived){const n=e.videoFramesReceived-(this||_global3).prevStats.videoFramesReceived;const r=e.period;t.videoFrameRateReceived=Math.round(n/r)}(this||_global3).prevStats=e;delete t.framesDecoded;delete t.framesEncoded;this.emit("stats",t)};return Qos}(s.EventEmitter);g.INITIAL_INTERVAL=1e3;g.INTERVAL=3e4;var h=g;t.default=h},function(e,t,n){e.exports=e=>{switch(e>>24){case 0:return"TURN/TLS";case 1:return"TURN/TCP";case 2:return"TURN/UDP";default:return""}}},function(e,t,n){const r=n(19);const o=n(159),i=o.default;const a=n(4);const s=n(11);e.exports=function chromeExtensionHelperFactory(e){let t=void 0===e?{}:e,n=t.haveGetDisplayMedia,o=void 0===n?i:n,c=t.global,l=void 0===c?void 0!==typeof window?window:_global3:c,u=t.Errors,d=void 0===u?a:u,f=t.otError,p=void 0===f?s():f;const g=!o&&!!l.navigator.webkitGetUserMedia&&!l.navigator.userAgent.match(/android/i)&&"undefined"!==typeof l.chrome;return{isSupportedInThisBrowser:g,autoRegisters:false,extensionRequired:true,getConstraintsShowsPermissionUI:true,sources:{screen:true,application:false,window:true,browser:true},register(e,t){return 2===t?this.registerVersion2(e):this.registerVersion1(e)},registerVersion1(e){if(!e)throw new Error("initChromeScreenSharingExtensionHelper: extensionID is required.");const t=g;const n={};let o;const i=`com.tokbox.screenSharing.${e}`;const a=function request(e,t){const n={payload:t,from:"jsapi"};n[i]=e;return n};const s=function addCallback(e,t){let o;const i=r();n[i]=function(){clearTimeout(o);o=null;e(...arguments)};t&&(o=setTimeout((()=>{delete n[i];e(p(d.TIMEOUT,new Error("Timeout waiting for response to screensharing request.")))}),t));return i};const c=function isAvailable(e){if(!e)throw new Error("isAvailable: callback is required.");
3569if(t)if(void 0!==o)setTimeout(e.bind(null,o));else{const t=s((t=>{true!==o&&(o="extensionLoaded"===t);e(o)}),2e3);const n=a("isExtensionInstalled",{requestId:t});l.postMessage(n,"*")}else setTimeout(e.bind(null,false))};const u=function getConstraints(e,t,n){if(!n)throw new Error("getSourceId: callback is required");c((r=>{if(!r)return n(p(d.SCREEN_SHARING_EXTENSION_NOT_INSTALLED,new Error("Extension is not installed")));const o=s(((e,r)=>{if("object"===typeof e&&e.name&&e.stack){const t=e;n(t)}else if("permissionDenied"===e)n(p(d.USER_MEDIA_ACCESS_DENIED,new Error("User denied access to screensharing")));else{t.video||(t.video={});t.video.mandatory||(t.video.mandatory={});t.video.mandatory.chromeMediaSource="desktop";t.video.mandatory.chromeMediaSourceId=r.sourceId;n(void 0,t)}}));l.postMessage(a("getSourceId",{requestId:o,source:e}),"*")}))};l.addEventListener("message",(e=>{if(e.origin!==l.location.origin)return;if(!(null!=e.data&&"object"===typeof e.data))return;if("extension"!==e.data.from)return;const t=e.data[i];const r=e.data.payload;if(r&&r.requestId){const e=n[r.requestId];delete n[r.requestId];e&&e(t,r)}"extensionLoaded"===t&&(o=true)}));return{extensionAPIVersion:1,extensionID:e,isInstalled:c,getConstraints:u}},registerVersion2(e){const t=g&&"undefined"!==typeof l.chrome.runtime;const n=function isInstalled(n){if(!n)throw new Error("isAvailable: callback is required.");t?l.chrome.runtime.sendMessage(e,{type:"isInstalled"},null,(e=>{setTimeout(n.bind(null,!!e))})):setTimeout(n.bind(null,false))};const r=function getConstraints(t,r,o){if(!o)throw new Error("getSourceId: callback is required");n((n=>{if(!n)return o(p(d.SCREEN_SHARING_EXTENSION_NOT_INSTALLED,new Error("Extension is not installed")));l.chrome.runtime.sendMessage(e,{type:"getSourceId",source:t},null,(e=>{if("permissionDenied"===e.error)o(p(d.USER_MEDIA_ACCESS_DENIED,new Error("User denied access to screensharing")));else if(e.error)o(new Error(`UnexpectError: ${e.error}`));else{r.video||(r.video={});r.video.mandatory||(r.video.mandatory={});r.video.mandatory.chromeMediaSource="desktop";r.video.mandatory.chromeMediaSourceId=e.sourceId;o(void 0,r)}}))}))};return{extensionAPIVersion:2,extensionID:e,isInstalled:n,getConstraints:r}}}}},function(e,t,n){(function(t){const r=n(154);const o=n(103);e.exports=function createChromeMixinFactory(e){void 0===e&&(e={});const i=e.Archiving||n(624);const a=e.AudioLevelMeter||n(282);const s=e.AudioLevelTransformer||n(143);const c=e.BackingBar||n(283);const l=e.Chrome||n(144);const u=e.MuteButton||n(284)();const d=e.NamePanel||n(285);const f=e.StylableComponent||n(151);const p=e.logging||n(1)("createChromeMixin");return function createChromeMixin(e,n){let g=void 0===n?{}:n,h=g.name,b=g.publishAudio,v=g.publishVideo,m=g.audioSource,_=g.showControls,y=g.shouldAllowAudio,E=g.logAnalyticsEvent;let S;let T;let C;const w={};
3569const O=r();const chromeButtonMode=t=>{if(false===t)return"off";const n=e.getStyle("buttonDisplayMode");return false===n?"on":n};let x=new t(((t,n)=>{w.init=n=>{e.getStyle("showArchiveStatus")||E("showArchiveStatus","createChrome",{mode:"off"});const r={backingBar:new c({nameMode:h?e.getStyle("nameDisplayMode"):"off",muteMode:chromeButtonMode(e.getStyle("buttonDisplayMode"))}),name:new d({name:h,mode:e.getStyle("nameDisplayMode")}),archive:new i({show:Boolean(e.getStyle("showArchiveStatus"))&&"off"!==e.getStyle("archiveStatusDisplayMode"),archiving:false}),muteButton:new u({muted:false===b,mode:chromeButtonMode.call(null,e.getStyle("buttonDisplayMode"))})};S=new a({mode:e.getStyle("audioLevelDisplayMode")});const f=new s;const p=new o((()=>{const t=b?f.transform(e.loudness):0;S.setValue(t)}));S.watchVisibilityChanged((e=>{e?p.start():p.stop()}));S.audioOnly(!v&&b);r.audioLevel=S;if(n&&n.domElement){C=n;T=new l({parent:C.domElement}).set(r).on({muted:()=>e.publishAudio(false),unmuted:()=>e.publishAudio(true)});null!==m&&false!==m||w.removeAudioTrack();t()}};w.reset=()=>{n(new Error("Chrome still being created"));if(T){T.destroy();T=null}};w.destroy=()=>{w.reset();O.releaseAll();x=null}}));x.catch((e=>{e&&"Chrome still being created"===e.message||p.error("createChromeMixin failed to setup UI",e)}));w.setAudioOnly=e=>{S&&S.audioOnly(e)};w.setArchivingStatus=e=>{T&&T.archive.setArchiving(e)};w.setMuted=e=>{T&&T.muteButton&&T.muteButton.muted(e)};w.removeAudioTrack=()=>{T&&T.muteButton&&T.muteButton.remove()};w.addAudioTrack=()=>{T&&T.muteButton&&T.muteButton.add()};f(e,{showArchiveStatus:true,nameDisplayMode:"auto",buttonDisplayMode:"auto",audioLevelDisplayMode:y?"auto":"off",archiveStatusDisplayMode:"auto",backgroundImageURI:null},_,(e=>{E("SetStyle","Publisher",e,null,.1)}));const onStyleValueChanged=(e,t)=>{x.then((()=>{switch(e){case"nameDisplayMode":T.name.setDisplayMode(t);T.backingBar.setNameMode(t);break;case"showArchiveStatus":E("showArchiveStatus","styleChange",{mode:t?"on":"off"});T.archive.setShowArchiveStatus(Boolean(t));break;case"archiveStatusDisplayMode":T.archive.setShowArchiveStatus("off"!==t);break;case"buttonDisplayMode":T.muteButton.setDisplayMode(t);T.backingBar.setMuteMode(t);break;case"audioLevelDisplayMode":T.audioLevel.setDisplayMode(t);break;case"backgroundImageURI":C.setBackgroundImageURI(t);break;default:}}))};e.on("styleValueChanged",onStyleValueChanged);O.add((()=>e.off("styleValueChanged",onStyleValueChanged)));return w}}}).call(this||_global3,n(0))},function(e,t,n){(function(t){const r=n(104);const o=n(35);const i=n(5);const a=n(41);e.exports=function AudioLevelMeter(e){const n=this||_global3;const s=new a;let c;let l;let u;let d;let f=true;let p=false;let g="auto";const h=e.maxValue||1;const b=e.minValue||0;function onCreate(){l=i.createElement("div",{className:"OT_audio-level-meter__value"},"");c=i.createElement("div",{className:"OT_audio-level-meter__audio-only-img"},"");const e=n.domElement;e.appendChild(c);e.appendChild(l);n.watchVisibilityChanged((e=>{e?i.removeClass(n.domElement,"OT_hide-forced"):i.addClass(n.domElement,"OT_hide-forced")}))}function onDestroy(){s.removeAllListeners("visibilityChanged")}function updateView(){const e=(u-b)/(h-b);l.style.transform=`scale(${Math.sqrt(e)})`}function computeVisibility(){const e=(p&&"auto"===g||"on"===g)&&f;if(d!==e){d=e;s.emit("visibilityChanged",e)}}r(n,{audioOnly:{get(){return p},set(e){p=e;computeVisibility()}}});n.setValue=function(e){u=e;updateView()};
3570/**
3571           * Registers an callback to be executed when the visibility of the audio level meter changes.
3572           * "true" means the widget is shown.
3573           * The contracts is that the handlers should not try to change the visibility of the widget by
3574           * changing the value of visibility "inputs" (setting "audioOnly", "displayMode" or calling
3575           * "hideWhileLoading" and "showAfterLoading")
3576           *
3577           * @param {function(boolean)} cb the callback to be executed when the display value changes.
3578           * The callback is also executed with the last computed value when registered.
3579           * @returns {function} a callback to unregister the handler
3580           */n.watchVisibilityChanged=function(e){s.on("visibilityChanged",e);t.resolve().then((()=>{e(d)}));return function stopWatching(){s.removeListener("visibilityChanged",e)}};const v={mode:e?e.mode:"auto",nodeName:"div",htmlAttributes:{className:"OT_audio-level-meter"},onCreate:onCreate,onDestroy:onDestroy};o(this||_global3,v);n.setDisplayMode=function(e){g=e;computeVisibility()};n.getDisplayMode=function(){return g};n.showAfterLoading=function(){f=true;computeVisibility()};n.hideWhileLoading=function(){f=false;computeVisibility()};computeVisibility()}}).call(this||_global3,n(0))},function(e,t,n){const r=n(35);e.exports=function BackingBar(e){let t=e.nameMode;let n=e.muteMode;function getDisplayMode(){return"on"===t||"on"===n?"on":"mini"===t||"mini"===n?"mini":"mini-auto"===t||"mini-auto"===n?"mini-auto":"auto"===t||"auto"===n?"auto":"off"}r(this||_global3,{mode:getDisplayMode(),nodeName:"div",htmlContent:"",htmlAttributes:{className:"OT_bar OT_edge-bar-item"}});(this||_global3).setNameMode=function(e){t=e;this.setDisplayMode(getDisplayMode())};(this||_global3).setMuteMode=function(e){n=e;this.setDisplayMode(getDisplayMode())}}},function(e,t,n){const r=n(5);const o=n(35);const i=n(104);e.exports=function MuteButtonFactory(e){void 0===e&&(e={});const t=e.OTHelpers||r;
3580const n=e.Widget||o;return function MuteButton(e){let r=e.muted||false;const updateClasses=()=>{r?t.addClass((this||_global3).domElement,"OT_active"):t.removeClass((this||_global3).domElement,"OT_active ")};const onClick=()=>{r=!r;updateClasses();r?(this||_global3).parent.trigger("muted",this||_global3):(this||_global3).parent.trigger("unmuted",this||_global3);return false};const attachEvents=e=>{t.on(e,"click",onClick)};const detachEvents=e=>{t.off(e,"click",onClick)};i(this||_global3,{muted:{get(){return r},set(e){r=e;updateClasses()}}});const o=r?"OT_edge-bar-item OT_mute OT_active":"OT_edge-bar-item OT_mute";n(this||_global3,{mode:e.mode,nodeName:"button",htmlContent:"Mute",htmlAttributes:{className:o,type:"button"},onCreate:attachEvents,onDestroy:detachEvents});let a;(this||_global3).remove=()=>{if((this||_global3).domElement&&(this||_global3).domElement.parentNode){a=(this||_global3).domElement.parentNode;(this||_global3).domElement.parentNode.removeChild((this||_global3).domElement)}};(this||_global3).add=()=>{a&&(this||_global3).domElement&&!(this||_global3).domElement.parentNode&&a.appendChild((this||_global3).domElement)}}}},function(e,t,n){const r=n(35);const sanitizeName=e=>{const t=document.createElement("div");t.textContent=e;return t.innerHTML};e.exports=function NamePanel(e){let t=e.name;if(!t||""===t.trim().length){t=null;e.mode="off"}(this||_global3).setName=function(e){t||this.setDisplayMode("auto");t=sanitizeName(e);(this||_global3).domElement.innerHTML=t}.bind(this||_global3);t=sanitizeName(t);r(this||_global3,{mode:e.mode,nodeName:"h1",htmlContent:t,htmlAttributes:{className:"OT_name OT_edge-bar-item"}})}},function(e,t,n){e.exports=function getNativeEnumerateDevicesFactory(e){void 0===e&&(e={});const t=e.global||(void 0!==typeof window?window:_global3);return function getNativeEnumerateDevices(){if(t.navigator.mediaDevices){const e=t.navigator.mediaDevices;return e.enumerateDevices&&e.enumerateDevices.bind(e)}}}},function(e,t,n){const r=n(2);const o=n(159).default;const isSupportedInThisBrowser=()=>!r.isLegacyEdge&&!r.isElectron&&o&&!r.isAndroid;e.exports={isSupportedInThisBrowser:isSupportedInThisBrowser(),autoRegisters:true,extensionRequired:false,getConstraintsShowsPermissionUI:false,sources:{screen:true,application:false,window:"Safari"!==r.name,browser:"Safari"!==r.name},register(){return{isInstalled(e){e(void 0)},getConstraints(e,t,n){n(void 0,{video:t.video,audio:t.audio})}}}}},function(e,t,n){const isMediaStreamTrack=e=>e&&"object"===typeof e&&"string"===typeof e.kind&&"function"===typeof e.stop&&"boolean"===typeof e.enabled;t.isMediaStreamTrack=isMediaStreamTrack},function(e,t,n){n.r(t);(function(e){var n=(void 0,function(t,n,r,o){return new(r||(r=e))((function(e,i){function fulfilled(e){try{step(o.next(e))}catch(e){i(e)}}function rejected(e){try{step(o.throw(e))}catch(e){i(e)}}function step(t){t.done?e(t.value):new r((function(e){e(t.value)})).then(fulfilled,rejected)}step((o=o.apply(t,n||[])).next())}))});var r=(void 0,function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:verb(0),throw:verb(1),return:verb(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this||_global3}),i;function verb(e){return function(t){return step([e,t])}}function step(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=r[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[0,o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:false};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:true}}});function getGlobal(){return"undefined"!==typeof window||void 0!==typeof window?window:_global3}var o="onFailure must return boolean, or delay in ms";
3581/**
3582         * Retry a promise
3583         *
3584         * Uses promiseFactory to construct promises and calls onFailure when the
3585         * promise rejects.
3586         *
3587         * onFailure is called with error and attempt.
3588         *
3589         * You may inspect error to decide whether to retry or not. You may use attempt
3590         * to control the delay/ decide how many times to retry.
3591         *
3592         * To retry: A numeric delay in milliseconds can be returned to control how long
3593         * between retries.
3594         *
3595         * To stop retrying: Return false/ undefined/ null.
3596         *
3597         * The returned promise will be the final promise from promiseFactory once
3598         * fulfilled or in the case of errors, once no longer retrying.
3599         *
3600         * @example
3601         *
3602         * const promiseEndeavour = require('../dist/promiseEndeavour.js');
3603         * const fetch = require('node-fetch');
3604         *
3605         * async function getDogs() {
3606         *   const response = await fetch('https://dog.ceo/api/breeds/list/all');
3607         *   return response.json();
3608         * }
3609         *
3610         * const retries = [100, 500, 1000];
3611         *
3612         * function retry(error, attempt) {
3613         *   return retries[attempt - 1] || false;
3614         * }
3615         *
3616         * promiseEndeavour(getDogs, retry)()
3617         *   .then(dogs => console.log(dogs));
3618         *
3619         * @param promiseFactory A promise returning function
3620         * @param onFailure A function to be called when the promise returned by promiseFactory is rejected
3621         * @param maxAttempts Maximum number of attempts regardless of onFailure
3622         * @return A function with the same interface to promiseFactory
3623         */function promiseEndeavour(t,i,a){void 0===a&&(a=10);return function(){var s=[];for(var c=0;c<arguments.length;c++)s[c]=arguments[c];return n(this||_global3,void 0,void 0,(function(){var n,c,l;return r(this||_global3,(function(u){switch(u.label){case 0:n=0;c=function(){var c,l,u;return r(this||_global3,(function(r){switch(r.label){case 0:r.trys.push([0,2,,6]);c={};return[4,t.apply(void 0,s)];case 1:return[2,(c.value=r.sent(),c)];case 2:l=r.sent();u=i(l,n);if(false===u||null==u||n>=a)throw l;return"number"===typeof u?[4,new e((function(e){return getGlobal().setTimeout(e,u)}))]:[3,4];case 3:r.sent();return[3,5];case 4:if(true!==u)throw new Error(o);r.label=5;case 5:return[3,6];case 6:return[2]}}
3623))};u.label=1;case 1:return(n+=1)?[5,c()]:[3,3];case 2:l=u.sent();return"object"===typeof l?[2,l.value]:[3,1];case 3:return[2]}}))}))}}t.default=promiseEndeavour}).call(this||_global3,n(0))},function(e,t,n){const r=n(1)("videoContentHint");const o=["","text","motion","detail"];const isValidVideoContentHint=e=>o.includes(e);const getVideoTrackForStream=e=>{var t;return null==e||null==(t=e.getVideoTracks())?void 0:t[0]};
3624/**
3625       * Sets contentHint for videoTrack of MediaStream
3626       * @param {MediaStream} mediaStream
3627       * @param {String} contentHint, one of "", "motion", "detail" or "text"
3628       */const setVideoContentHint=(e,t)=>{if(!isValidVideoContentHint(t)){r.warn('Invalid content hint. Valid content hints are "text", "detail", "motion", or ""');return}const n=getVideoTrackForStream(e);n?void 0!==n.contentHint?n.contentHint=t:r.warn("contentHint not supported by this browser"):r.warn("Tried to set contentHint but no video track is present")};
3629/**
3630       * Returns contentHint for videoTrack of MediaStream
3631       * @param {MediaStream} mediaStream
3632       * @returns {String} contentHint, one of "", "motion", "detail" or "text"
3633      
3634       */const getVideoContentHint=e=>{const t=getVideoTrackForStream(e);return(null==t?void 0:t.contentHint)||""};e.exports={isValidVideoContentHint:isValidVideoContentHint,setVideoContentHint:setVideoContentHint,getVideoContentHint:getVideoContentHint}},function(e,t,n){const r=n(104);e.exports=function MicrophoneFactory(){return function Microphone(e,t){let n;r(this||_global3,{muted:{get(){return n},set(t){if(n===t)return;n=t;const r=e.getAudioTracks();for(let e=0,t=r.length;e<t;++e)r[e].enabled=!n}}});void 0!==t?this.muted(true===t):e.getAudioTracks().length?this.muted(!e.getAudioTracks()[0].enabled):this.muted(false)}}},function(e,t,n){e.exports=function videoElementErrorMapFactory(e){void 0===e&&(e={});const t=e.Errors||n(4);const r=e.otError||n(11)();const o={};if((void 0!==typeof window?window:_global3).MediaError){o[(void 0!==typeof window?window:_global3).MediaError.MEDIA_ERR_ABORTED]={name:t.MEDIA_ERR_ABORTED,message:"The fetching process for the media resource was aborted by the user agent at the user's request."};o[(void 0!==typeof window?window:_global3).MediaError.MEDIA_ERR_NETWORK]={name:t.MEDIA_ERR_NETWORK,message:"A network error of some description caused the user agent to stop fetching the media resource, after the resource was established to be usable."};o[(void 0!==typeof window?window:_global3).MediaError.MEDIA_ERR_DECODE]={name:t.MEDIA_ERR_DECODE,message:"An error of some description occurred while decoding the media resource, after the resource was established to be usable."};o[(void 0!==typeof window?window:_global3).MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED]={name:t.MEDIA_ERR_SRC_NOT_SUPPORTED,message:"The media resource indicated by the src attribute was not suitable."}}return function videoElementErrorMap(e){const t=o[e.code];return t?r(t.name,new Error(`There was an unexpected problem with the Video Stream: ${t.message}`)):new Error("An unknown error occurred"+(e.message?`: ${e.message}`:"."))}}},function(e,t,n){(function(t){var r=n(3);var o=r(n(25));var i=r(n(12));var a=r(n(13));var s=r(n(18));const c=n(6);const l=n(62);const u=n(635);const d=n(636);const f=n(637);const p=n(106);const g=n(2);const h=n(23)(),b=h.hasAudioOutputApiSupport;const v=n(294);const m=n(105),_=m.getCurrentAudioOutputDeviceId;function createDomVideoElement(e,t){const n=document.createElement("video");d(n);n.autoplay=true;n.playsinline=true;n.innerHTML=e;n.setAttribute("autoplay","");n.setAttribute("playsinline","");true===t&&(n.muted="true");return n}function createDomAudioOnlyVideoElement(){const e=createDomVideoElement("");e.setAttribute("style","display:none");return e}
3635/**
3636         * NativeVideoElementWrapperFactory DI container
3637         *
3638         * @package
3639         * @param {any} [deps={}]
3640         */function NativeVideoElementWrapperFactory(e){void 0===e&&(e={});const r=e.audioContext||n(158)();const d=e.canBeOrientatedMixin||n(638);
3641/** @type {Document} */const h=e.document||(void 0!==typeof window?window:_global3).document;const m=e.listenForTracksEnded||n(639)();const y=e.logging||n(1);const E=e.OTHelpers||n(5);const S=e.videoElementErrorMap||n(292)();const T=e.WebaudioAudioLevelSampler||n(145);const C=e.global||(void 0!==typeof window?window:_global3);let w=1;
3642/**
3643           * NativeVideoElementWrapper
3644           *
3645           * @package
3646           * @class
3647           * @param {Object} options
3648           * @param {Object} [options._inject] injected variables @todo move to DI
3649           * @param {Function} [options._inject.createVideoElement] function used to create video element
3650           * @param {Function} [options._inject.createAudioOnlyVideoElement] function used to create audio only video element
3651           * @param {Boolean} [options.muted] initial mute state
3652           * @param {String} [options.fallbackText] text to display when not supported
3653           * @param {Function} errorHandler callback for when there are errors
3654           * @param {Number} defaultAudioVolume the initial audio volume
3655           */let O=function(){
3656/** @type {HTMLVideoElement|undefined} */
3657/** @type {number|undefined} */
3658function NativeVideoElementWrapper(e,t){var n=this||_global3;let r=e._inject,o=void 0===r?{}:r,u=o.createVideoElement,f=void 0===u?createDomVideoElement:u,p=o.createAudioOnlyVideoElement,h=void 0===p?createDomAudioOnlyVideoElement:p,b=e.muted,m=e.fallbackText,_=e.widgetType;(0,s.default)(this||_global3,"_domElement",void 0);(0,s.default)(this||_global3,"_domAudioOnlyVideoElement",void 0);(0,s.default)(this||_global3,"_blockedVolume",void 0);(0,s.default)(this||_global3,"_mediaStoppedListener",void 0);(0,s.default)(this||_global3,"_audioLevelSampler",void 0);(0,s.default)(this||_global3,"_playInterrupts",0);(0,s.default)(this||_global3,"_isVideoLoadedMetaData",false);(0,s.default)(this||_global3,"_audioOnlyVideoElementWatcher",void 0);(this||_global3).logging=y(`NativeVideoElementWrapper:${w}`);w+=1;c(this||_global3);(this||_global3)._defaultAudioVolume=t;(this||_global3)._widgetType=_;let E=false;const _playVideoOnPause=()=>{if(!E){(this||_global3).logging.warn("Video element paused, auto-resuming. If you intended to do this, use publishVideo(false) or subscribeToVideo(false) instead.");E=true}this.play()};(this||_global3)._domElement=f(m,b);this.trigger("videoElementCreated",(this||_global3)._domElement);(this||_global3)._domElementEvents=l((this||_global3)._domElement);(this||_global3)._domElementEvents.on("loadstart",(()=>this._onDomElementLoadStart()));(this||_global3)._domElementEvents.on("timeupdate",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.trigger("timeupdate",...t)}));(this||_global3)._domElementEvents.on("loadedmetadata",(0,a.default)(i.default.mark((function _callee(){var e,t,r,o,a=arguments;return i.default.wrap((function _callee$(i){while(1)switch(i.prev=i.next){case 0:n._isVideoLoadedMetaData=true;for(e=a.length,t=new Array(e),r=0;r<e;r++)t[r]=a[r];n.trigger("loadedmetadata",...t);if(!n._domAudioOnlyVideoElement){i.next=10;break}o=n._domAudioOnlyVideoElement.srcObject;n._removeAudioOnlyVideoElement();if(!o){i.next=10;break}i.next=9;return v();case 9:n.play();case 10:case"end":return i.stop()}}),_callee)}))));const onError=e=>{this.trigger("error",S(e.target.error))};(this||_global3)._domElementEvents.on("error",onError,false);(this||_global3)._domElementEvents.on("pause",_playVideoOnPause);this.on("destroyed",(()=>{(this||_global3)._domElementEvents.removeAll();(this||_global3)._domAudioOnlyVideoElementEvents&&(this||_global3)._domAudioOnlyVideoElementEvents.removeAll()}));d(this||_global3,(()=>(this||_global3)._domElement));if("Safari"===g.name&&"subscriber"===(this||_global3)._widgetType){(this||_global3)._domAudioOnlyVideoElement=h();this._bindAudioOnlyVideoElementEvents()}}var e=NativeVideoElementWrapper.prototype;e._onDomElementLoadStart=function(){var e=(0,a.default)(i.default.mark((function _callee2(){return i.default.wrap((function _callee2$(e){while(1)switch(e.prev=e.next){case 0:if(!("subscriber"===(this||_global3)._widgetType&&b())){e.next=3;break}e.next=3;return this._setActiveAudioOutputDevice();case 3:case"end":return e.stop()}}),_callee2,this||_global3)})));function _onDomElementLoadStart(){return e.apply(this||_global3,arguments)}return _onDomElementLoadStart}();e._setActiveAudioOutputDevice=function(){var e=(0,a.default)(i.default.mark((function _callee3(){var e;return i.default.wrap((function _callee3$(t){while(1)switch(t.prev=t.next){case 0:e=_();if(!(""===e||"default"===e)){t.next=3;break}return t.abrupt("return");case 3:t.next=5;return this.setSinkId(e);case 5:case"end":return t.stop()}}),_callee3,this||_global3)})));function _setActiveAudioOutputDevice(){return e.apply(this||_global3,arguments)}return _setActiveAudioOutputDevice}();e._rebindSrcObject=function _rebindSrcObject(){(this||_global3)._domElement&&((this||_global3)._domElement.srcObject=(this||_global3)._domElement.srcObject)};e._pauseAndPlay=function _pauseAndPlay(){if((this||_global3)._domElement){(this||_global3)._domElement.pause();(this||_global3)._domElement.play()}};e._startAudioOnlyVideoElementWatcher=function(){var e=(0,a.default)(i.default.mark((function _callee4(){var e,t;return i.default.wrap((function _callee4$(n){while(1)switch(n.prev=n.next){case 0:e=1e3;t=g.isiOS;(this||_global3)._audioOnlyVideoElementWatcher=setInterval((()=>
3658{if((this||_global3)._domAudioOnlyVideoElement&&(this||_global3)._domAudioOnlyVideoElement.paused){(this||_global3)._domAudioOnlyVideoElement.srcObject=(this||_global3)._domAudioOnlyVideoElement.srcObject;t&&(this||_global3)._domAudioOnlyVideoElement.play()}}),100);n.next=5;return p(e);case 5:clearInterval((this||_global3)._audioOnlyVideoElementWatcher);(this||_global3)._audioOnlyVideoElementWatcher=null;case 7:case"end":return n.stop()}}),_callee4,this||_global3)})));function _startAudioOnlyVideoElementWatcher(){return e.apply(this||_global3,arguments)}return _startAudioOnlyVideoElementWatcher}();e._removeAudioOnlyVideoElement=function(){var e=(0,a.default)(i.default.mark((function _callee5(){return i.default.wrap((function _callee5$(e){while(1)switch(e.prev=e.next){case 0:(this||_global3)._domAudioOnlyVideoElement.srcObject=null;(this||_global3)._domAudioOnlyVideoElement.parentNode.removeChild((this||_global3)._domAudioOnlyVideoElement);(this||_global3)._domAudioOnlyVideoElementEvents&&(this||_global3)._domAudioOnlyVideoElementEvents.removeAll();(this||_global3)._domAudioOnlyVideoElement=null;case 4:case"end":return e.stop()}}),_callee5,this||_global3)})));function _removeAudioOnlyVideoElement(){return e.apply(this||_global3,arguments)}return _removeAudioOnlyVideoElement}();e.bindAudioTrackOnly=function(){var e=(0,a.default)(i.default.mark((function _callee6(){var e,t,n,r,o,a,s;return i.default.wrap((function _callee6$(i){while(1)switch(i.prev=i.next){case 0:e=(this||_global3)._stream.getVideoTracks();t=(this||_global3)._stream.getAudioTracks();n=e[0],r=void 0===n?{}:n;o=t[0],a=void 0===o?{}:o;i.next=6;return v();case 6:s=!r.enabled&&a.enabled;if(!(this||_global3)._isVideoLoadedMetaData&&s&&(this||_global3)._domAudioOnlyVideoElement){(this||_global3)._domAudioOnlyVideoElement.srcObject=new C.MediaStream(t);this._startAudioOnlyVideoElementWatcher()}case 8:case"end":return i.stop()}}),_callee6,this||_global3)})));function bindAudioTrackOnly(){return e.apply(this||_global3,arguments)}return bindAudioTrackOnly}();e._bindAudioOnlyVideoElementEvents=function _bindAudioOnlyVideoElementEvents(){var e=this||_global3;(this||_global3)._domAudioOnlyVideoElementEvents=l((this||_global3)._domAudioOnlyVideoElement);(this||_global3)._domAudioOnlyVideoElementEvents.on("pause",(()=>this.play()));(this||_global3)._domAudioOnlyVideoElementEvents.on("timeupdate",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.trigger("timeupdate",...n)}));(this||_global3)._domAudioOnlyVideoElementEvents.on("loadedmetadata",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.trigger("loadedmetadata",...n)}))};e.whenTimeIncrements=function whenTimeIncrements(e,t){this.once("timeupdate",(()=>{e.call(t,this||_global3)}))};e.domElement=function domElement(){return(this||_global3)._domElement};e.videoWidth=function videoWidth(){return(this||_global3)._domElement?Number((this||_global3)._domElement["video"+(this.isRotated()?"Height":"Width")]):0};e.videoHeight=function videoHeight(){return(this||_global3)._domElement?Number((this||_global3)._domElement["video"+(this.isRotated()?"Width":"Height")]):0};e.aspectRatio=function aspectRatio(){return this.videoWidth()/this.videoHeight()};e.imgData=function imgData(){const e=E.createElement("canvas",{width:this.videoWidth(),height:this.videoHeight(),style:{display:"none"}});h.body.appendChild(e);let imgData=null;try{e.getContext("2d").drawImage((this||_global3)._domElement,0,0,e.width,e.height);imgData=e.toDataURL("image/png")}catch(e){}E.removeElement(e);if(null===imgData||"data:,"===imgData){(this||_global3).logging.warn("Cannot get image data yet");return null}return imgData.replace("data:image/png;base64,","").trim()};e.appendTo=function appendTo(e){e.appendChild((this||_global3)._domElement);(this||_global3)._domAudioOnlyVideoElement&&e.appendChild((this||_global3)._domAudioOnlyVideoElement);return this||_global3};e.isAudioBlocked=function isAudioBlocked(){return void 0!==(this||_global3)._blockedVolume};e.unblockAudio=function(){var e=(0,a.default)(i.default.mark((function _callee7(){var e;return i.default.wrap((function _callee7$(t){while(1)switch(t.prev=t.next){case 0:if(this.isAudioBlocked()){t.next=3;break}(this||_global3).logging.warn("Unexpected call to unblockAudio() without blocked audio");return t.abrupt("return");case 3:e=(this||_global3)._blockedVolume;(this||_global3)._blockedVolume=void 0;this.setAudioVolume(e);t.prev=6;t.next=9;return this.play();case 9:t.next=16;break;case 11:t.prev=11;t.t0=t.catch(6);(this||_global3)._blockedVolume=e;(this||_global3)._domElement.muted=true;throw t.t0;case 16:this.trigger("audioUnblocked");case 17:case"end":return t.stop()}}),_callee7,this||_global3,[[6,11]])})));function unblockAudio(){return e.apply(this||_global3,arguments)}return unblockAudio}();e.rebind=function(){var e=(0,a.default)(i.default.mark((function _callee8(){return i.default.wrap((function _callee8$(e){while(1)switch(e.prev=e.next){case 0:if((this||_global3)._domElement){e.next=2;break}throw new Error("Can't rebind because _domElement no longer exists");case 2:(this||_global3)._playInterrupts++;(this||_global3)._domElement.srcObject=(this||_global3)._domElement.srcObject;
3658this._hasAudioOnlyVideoElement()&&((this||_global3)._domAudioOnlyVideoElement.srcObject=(this||_global3)._domAudioOnlyVideoElement.srcObject);case 5:case"end":return e.stop()}}),_callee8,this||_global3)})));function rebind(){return e.apply(this||_global3,arguments)}return rebind}();e._createAudioLevelSampler=function _createAudioLevelSampler(){this._removeAudioLevelSampler();if((this||_global3)._stream.getAudioTracks().length>0){try{(this||_global3)._audioContext=r()}catch(e){(this||_global3).logging.warn("Failed to get AudioContext(), audio level visualisation will not work",e)}if((this||_global3)._audioContext){(this||_global3)._audioLevelSampler=new T((this||_global3)._audioContext);(this||_global3)._audioLevelSampler.webRTCStream((this||_global3)._stream)}}};e._removeAudioLevelSampler=function _removeAudioLevelSampler(){if((this||_global3)._audioContext){delete(this||_global3)._audioContext;delete(this||_global3)._audioLevelSampler}};e._toggleVideoTracks=function(){var e=(0,a.default)(i.default.mark((function _callee9(){var e,t,n;return i.default.wrap((function _callee9$(r){while(1)switch(r.prev=r.next){case 0:e=(this||_global3)._domElement.srcObject.getTracks().filter((e=>e.enabled));t=e.length>1;if(!t){r.next=8;break}n=e.filter((e=>"video"===e.kind));n.forEach((e=>{e.enabled=false}));r.next=7;return v();case 7:n.forEach((e=>{e.enabled=true}));case 8:case"end":return r.stop()}}),_callee9,this||_global3)})));function _toggleVideoTracks(){return e.apply(this||_global3,arguments)}return _toggleVideoTracks}();e._hasAudioOnlyVideoElement=function _hasAudioOnlyVideoElement(){return(this||_global3)._domAudioOnlyVideoElement&&(this||_global3)._domAudioOnlyVideoElement.srcObject};e.play=function(){var e=(0,a.default)(i.default.mark((function _callee10(){var e,t,n,r,o,a,s,c,l,u,d,p,h;return i.default.wrap((function _callee10$(i){while(1)switch(i.prev=i.next){case 0:e=(this||_global3)._playInterrupts;t="Safari"===g.name;n=this._hasAudioOnlyVideoElement()?(this||_global3)._domAudioOnlyVideoElement:(this||_global3)._domElement;if(!t){i.next=6;break}i.next=6;return v();case 6:if(!(g.isiOS&&g.isSafari)){i.next=16;break}if(!("publisher"===(this||_global3)._widgetType)){i.next=15;break}r=g.iOSVersion>=14&&g.iOSVersion<=14.2;o=(this||_global3)._stream.getVideoTracks(),a=o[0],s=void 0===a?{}:a;c=(this||_global3)._stream.getAudioTracks(),l=c[0],u=void 0===l?{}:l;if(!(r&&!f(n)&&s.enabled)){i.next=13;break}return i.abrupt("return");case 13:if(!u.muted){i.next=15;break}return i.abrupt("return");case 15:this._toggleVideoTracks();case 16:i.prev=16;i.next=19;return n.play();case 19:return i.abrupt("return");case 22:i.prev=22;i.t0=i.catch(16);d=i.t0||{},p=d.name;h="AbortError"===p;h&&(this||_global3)._playInterrupts++;if(!((this||_global3)._playInterrupts>e)){i.next=31;break}i.next=30;return this.play();case 30:return i.abrupt("return");case 31:throw i.t0;case 32:case"end":return i.stop()}}),_callee10,this||_global3,[[16,22]])})));function play(){return e.apply(this||_global3,arguments)}return play}();e._bindToStream=function _bindToStream(e){(this||_global3)._stream=e;(this||_global3)._domElement.srcObject=e;(this||_global3)._domAudioOnlyVideoElement&&this.bindAudioTrackOnly()};e.bindToStream=function(){var e=(0,a.default)(i.default.mark((function _callee12(e){var t=this||_global3;var n,r,s;return i.default.wrap((function _callee12$(c){while(1)switch(c.prev=c.next){case 0:if((this||_global3)._domElement){c.next=2;break}throw new Error("Can't bind because _domElement no longer exists");case 2:this._bindToStream(e);(0,a.default)(i.default.mark((function _callee11(){var n;return i.default.wrap((function _callee11$(r){while(1)switch(r.prev=r.next){case 0:r.prev=0;r.next=3;return t.play();case 3:r.next=26;break;case 5:r.prev=5;r.t0=r.catch(0);n=!!e.getAudioTracks().length;if(!(t._hasAudioOnlyVideoElement()&&"NotAllowedError"===r.t0.name)){r.next=15;break}t._domAudioOnlyVideoElement.muted=true;r.next=12;return t.play();case 12:t._domAudioOnlyVideoElement.muted=false;r.next=26;break;case 15:if(!n){r.next=23;break}t._blockedVolume=t.getAudioVolume();t._domElement.muted=true;r.next=20;return t.play();case 20:t.trigger("audioBlocked");r.next=26;break;case 23:t._domElement.muted=true;r.next=26;return t.play();case 26:case"end":return r.stop()}}),_callee11,null,[[0,5]])})))().catch((e=>{(this||_global3).logging.debug(".play() failed: ",e)}));n={width:(this||_global3)._domElement.videoWidth,height:(this||_global3)._domElement.videoHeight};this.trigger("videoDimensionsChanged",(0,o.default)({},n),(0,o.default)({},n));(this||_global3)._domElementEvents.on("resize",(()=>{const e=(this||_global3)._domElement,t=e.videoWidth,r=e.videoHeight;const i=t!==n.width;const a=r!==n.height;if(i||a){this.trigger("videoDimensionsChanged",(0,o.default)({},n),{width:t,height:r});n.width=t;n.height=r}}));r=()=>{(this||_global3)._mediaStoppedListener.stop();(this||_global3)._domElement&&((this||_global3)._domElement.onended=null);this.trigger("mediaStopped")};s=e=>{this.trigger("mediaStopped",e)};(this||_global3)._domElement.onended=()=>r();(this||_global3)._mediaStoppedListener=m(e,r,s);this._createAudioLevelSampler();return c.abrupt("return",void 0);case 13:case"end":return c.stop()}}),_callee12,this||_global3)})));function bindToStream(t){return e.apply(this||_global3,arguments)}return bindToStream}();e.unbindStream=function unbindStream(){(this||_global3)._domElement&&((this||_global3)._domElement.srcObject=null);(this||_global3)._domAudioOnlyVideoElement&&((this||_global3)._domAudioOnlyVideoElement.srcObject=null);this._removeAudioLevelSampler();return this||_global3};e.setAudioVolume=function setAudioVolume(e){if(this.isAudioBlocked()){(this||_global3)._blockedVolume=e;return}const t=parseFloat(e)/100;const n=[this.domElement()];(this||_global3)._domAudioOnlyVideoElement&&n.push((this||_global3)._domAudioOnlyVideoElement);
3658n.forEach((e=>{if(e){e.volume=t;e.muted=0===t}}))};e.getAudioVolume=function getAudioVolume(){if(this.isAudioBlocked())return(this||_global3)._blockedVolume;const e=this.domElement();return e?e.muted?0:100*e.volume:(this||_global3)._defaultAudioVolume};e.audioChannelType=function audioChannelType(e){const t=this.domElement();void 0!==e&&(t.mozAudioChannelType=e);return"mozAudioChannelType"in(this||_global3)._domElement?t.mozAudioChannelType:"unknown"};e.getAudioInputLevel=function getAudioInputLevel(){return(this||_global3)._audioLevelSampler.sample()};e.refreshTracks=function refreshTracks(){(this||_global3)._mediaStoppedListener&&(this||_global3)._mediaStoppedListener.refresh();this._createAudioLevelSampler()};e.destroy=function destroy(){(this||_global3)._mediaStoppedListener&&(this||_global3)._mediaStoppedListener.stop();(this||_global3).logging.debug("removing domElementEvents");(this||_global3)._domElementEvents.removeAll();(this||_global3)._domAudioOnlyVideoElementEvents&&(this||_global3)._domAudioOnlyVideoElementEvents.removeAll();(this||_global3)._audioOnlyVideoElementWatcher&&clearInterval((this||_global3)._audioOnlyVideoElementWatcher);this.unbindStream();if((this||_global3)._domElement){E.removeElement((this||_global3)._domElement);(this||_global3)._domElement=null}if((this||_global3)._domAudioOnlyVideoElement){E.removeElement((this||_global3)._domAudioOnlyVideoElement);(this||_global3)._domAudioOnlyVideoElement=null}this.trigger("destroyed");u("NativeVideoElementWrapper",this||_global3)};e.setSinkId=function setSinkId(e){const n=[(this||_global3)._domElement,(this||_global3)._domAudioOnlyVideoElement];const r=n.map((t=>{if(t)return t.setSinkId(e)}));return t.all(r)};return NativeVideoElementWrapper}();return O}e.exports=NativeVideoElementWrapperFactory}).call(this||_global3,n(0))},function(e,t,n){(function(t){e.exports=()=>new t((e=>setTimeout(e)))}).call(this||_global3,n(0))},function(e,t,n){(function(t){const r=n(7);const o=n(47);const i=n(61);const a=n(6);e.exports=function PublisherPeerConnectionFactory(e){void 0===e&&(e={});const s=e.getStatsHelpers||n(75);const c=e.OTHelpers||n(5);const l=e.PeerConnection||n(101)();const u=e.setCertificates||n(163)();const d=e.watchAudioAcquisition||n(641);
3659/**
3660           * @typedef {object} PublisherPeerConnectionConfig
3661           * @property {function(string, string=, object=, object=, boolean=)} logAnalyticsEvent
3662           * @property {Connection} remoteConnection
3663           * @property {boolean} reconnection
3664           * @property {MediaStream} webRTCStream
3665           * @property {object<string, object>} channels
3666           * @property {boolean} capableSimulcastStreams
3667           * @property {boolean} overrideSimulcastEnabled
3668           * @property {string} subscriberUri
3669           * @property {object<string, object>} offerOverrides
3670           * @property {object<string, object>} answerOverrides
3671           * @property {string} sourceStreamId
3672           * @property {string} isP2pEnabled
3673           */
3674/**
3675           * Abstracts PeerConnection related stuff away from Publisher.
3676           *
3677           * Responsible for:
3678           * * setting up the underlying PeerConnection (delegates to PeerConnections)
3679           * * triggering a connected event when the Peer connection is opened
3680           * * triggering a disconnected event when the Peer connection is closed
3681           * * providing a destroy method
3682           * * providing a processMessage method
3683           *
3684           * Once the PeerConnection is connected and the video element playing it triggers
3685           * the connected event
3686           *
3687           * Triggers the following events
3688           * * connected
3689           * * disconnected
3690           *
3691           * @class PublisherPeerConnection
3692           * @constructor
3693           *
3694           * @param {PublisherPeerConnectionConfig} config
3695           */return function PublisherPeerConnection(e){let n=e.iceConfig,f=e.webRTCStream,p=e.channels,g=e.sendMessage,h=e.capableSimulcastStreams,b=e.overrideSimulcastEnabled,v=e.logAnalyticsEvent,m=e.offerOverrides,_=e.answerOverrides,y=e.sourceStreamId,E=e.isP2pEnabled;let S;let T=false;let C;const w=function _onPeerClosed(){this.destroy();if(T){T=false;this.trigger("iceRestartFailure")}this.trigger("disconnected")};const O=function _onPeerError(e){let t=e.reason,n=e.prefix;this.trigger("error",{reason:t,prefix:n})};const x=function _onIceConnectionStateChange(e){if(T&&S.iceConnectionStateIsConnected()){T=false;this.trigger("iceRestartSuccess")}if("connected"===e){if("Chrome"===c.env.name){C&&C();C=d(S.getStats.bind(S),(()=>this.trigger("audioAcquisitionProblem")))}this.trigger("connected")}this.trigger("iceConnectionStateChange",e)};a(this||_global3);(this||_global3).changeMediaDirectionToInactive=()=>{S&&S.changeMediaDirectionToInactive()};(this||_global3).changeMediaDirectionToRecvOnly=()=>{S&&S.changeMediaDirectionToRecvOnly()};(this||_global3).getDataChannel=function(e,t,n){S.getDataChannel
3695(e,t,n)};(this||_global3).getSourceStreamId=()=>S.getSourceStreamId();(this||_global3).destroy=function(){if(C){C();C=null}if(S){S.disconnect();S=null}this.off()};(this||_global3).processMessage=function(e,t){S.processMessage(e,t)};(this||_global3).addTrack=function(e,t,n){return S.addTrack(e,t,n)};(this||_global3).removeTrack=function(e){return S.removeTrack(e)};(this||_global3).getLocalStreams=function(){return S.getLocalStreams()};(this||_global3).init=function(e,t){const o={iceConfig:n.needRumorIceServersFallback?r(n,{servers:[...e,...n.servers]}):n,channels:p,capableSimulcastStreams:h,overrideSimulcastEnabled:b};u(o,((e,n)=>{if(e){t(e);return}const o=r({logAnalyticsEvent:v,isPublisher:true,offerOverrides:m,answerOverrides:_,sourceStreamId:y,p2p:E},n);S=new l(r({sendMessage:g},o));S.on({close:w,error:O,qos:e=>this.trigger("qos",e),iceConnectionStateChange:x},this||_global3);S.addLocalStream(f).then((()=>{t(void 0)})).catch(t)}))};(this||_global3).getSenders=function(){return S.getSenders()};(this||_global3).iceRestart=function(){if(S){T=true;S.iceRestart()}};(this||_global3).hasRelayCandidates=()=>S.hasRelayCandidates();(this||_global3).iceConnectionStateIsConnected=function(){return S.iceConnectionStateIsConnected()};(this||_global3).findAndReplaceTrack=(e,t)=>S.findAndReplaceTrack(e,t);(this||_global3)._testOnlyGetFramesEncoded=()=>new t(((e,t)=>{S.getStats(((n,r)=>{if(n){t(n);return}const a=i(r,(e=>s.isVideoStat(e,r)&&s.isOutboundStat(e)));a?e(o(a,["timestamp","framesEncoded"])):t(new Error("Could not find framesEncoded in getStats report"))}))}));(this||_global3).getStats=e=>S.getStats(e);(this||_global3).getRtcStatsReport=e=>S.getRtcStatsReport(e)}}}).call(this||_global3,n(0))},function(e,t,n){const r=n(7);const o=n(6);e.exports=function SubscriberPeerConnectionFactory(e){void 0===e&&(e={});const t=e.OTHelpers||n(5);const i=e.PeerConnection||n(101)();const a=e.setCertificates||n(163)();const s=e.Errors||n(4);const c=e.ExceptionCodes||n(8);const l=e.OTErrorClass||n(21);const u=e.watchSubscriberAudio||n(642);return function SubscriberPeerConnection(e){let n=e.clientCandidates,d=e.iceConfig,f=e.send,p=e.logAnalyticsEvent,g=e.p2p,h=e.codecFlags,b=e.sourceStreamId;const v=this||_global3;let m;let _=false;let y=false;let E=null;const S=function _onPeerClosed(){this.destroy();y&&this.trigger("iceRestartFailure",this||_global3);this.trigger("disconnected",this||_global3)};const T=function _onRemoteStreamAdded(e){this.trigger("remoteStreamAdded",e,this||_global3)};const C=function _onRemoteStreamRemoved(e){this.trigger("remoteStreamRemoved",e,this||_global3)};const _onRemoteVideoSupported=e=>{this.trigger("remoteVideoSupported",e)};const w=function _onPeerError(e){let t=e.reason,n=e.prefix;this.trigger("error",null,t,this||_global3,n)};const O=function _onIceConnectionStateChange(e){if(y&&("connected"===e||"completed"===e)){y=false;this.trigger("iceRestartSuccess")}"connected"===e&&this.trigger("connected");this.trigger("iceConnectionStateChange",e)};const x=function _onsignalingStateChange(e){this.trigger("signalingStateChange",e)};const I=function _onsignalingStateStable(e){this.trigger("signalingStateStable",e)};const _relayMessageToPeer=(e,t)=>{"answer"!==e&&"pranswer"!==e||this.trigger("connected");f(e,t)};o(this||_global3);(this||_global3).close=function(){if(!_){_=true;if(m){m.disconnect();m=null}this.off()}};(this||_global3).destroy=function(){this.stopAudioStatsWatcher();_||this.close()};(this||_global3).getDataChannel=function(e,t,n){m.getDataChannel(e,t,n)};(this||_global3).getSourceStreamId=()=>m.getSourceStreamId();(this||_global3).processMessage=function(e,t){m.processMessage(e,t)};(this||_global3).remoteDescription=function(){return m.remoteDescription()};(this||_global3).getStats=function(e){if(m)m.getStats(e);else{const n=c.PEER_CONNECTION_NOT_CONNECTED;e(new t.Error(l.getTitleByCode(n),s.PEER_CONNECTION_NOT_CONNECTED,{code:n}))}};(this||_global3).getSynchronizationSources=function(e){if(m)m.getSynchronizationSources(e);else{const n=c.PEER_CONNECTION_NOT_CONNECTED;e(new t.Error(l.getTitleByCode(n),s.PEER_CONNECTION_NOT_CONNECTED,{code:n}))}};(this||_global3).getRtcStatsReport=function(e){if(m)m.getRtcStatsReport(e);else{const n=c.PEER_CONNECTION_NOT_CONNECTED;e(new t.Error(l.getTitleByCode(n),s.PEER_CONNECTION_NOT_CONNECTED,{code:n}))}};(this||_global3).startAudioStatsWatcher=function(e){E||(E=u(m.getStats.bind(m),(e=>{this.stopAudioStatsWatcher();this.trigger("audioLevelStuckWarning",e)}),e))};(this||_global3).stopAudioStatsWatcher=function(){E&&E.stop();E=null};const A=function _createSetEnabledForTracks(e){return function(t){m&&m.remoteTracks().forEac
3695h((n=>{n.kind===e&&n.enabled!==t&&(n.enabled=t)}))}};(this||_global3).subscribeToAudio=A("audio");(this||_global3).subscribeToVideo=A("video");(this||_global3).hasRelayCandidates=function(){return m.hasRelayCandidates()};(this||_global3).iceRestart=function(){y=true;return m.iceRestart()};(this||_global3).iceConnectionStateIsConnected=function(){return m.iceConnectionStateIsConnected()};(this||_global3).init=function(e){const t={iceConfig:d};a(t,((t,o)=>{if(t){e(t);return}const a=r({logAnalyticsEvent:p,clientCandidates:n,codecFlags:h,sourceStreamId:b},o);m=new i(r({sendMessage:_relayMessageToPeer,p2p:g},a));m.on({iceConnected:()=>v.emit("iceConnected"),close:S,streamAdded:T,streamRemoved:C,signalingStateChange:x,signalingStateStable:I,error:w,qos:e=>this.trigger("qos",e),iceConnectionStateChange:O,remoteVideoSupported:_onRemoteVideoSupported},v);m.remoteTracks().length>0?m.remoteStreams().forEach(T,v):e(void 0,v)}))}}}},function(e,t,n){e.exports=function PublishingStateFactory(e){void 0===e&&(e={});const t=e.generateSimpleStateMachine||n(160)();const r=["NotPublishing","GetUserMedia","BindingMedia","MediaBound","PublishingToSession","Publishing","Failed","Destroyed"];const o={NotPublishing:["NotPublishing","GetUserMedia","Destroyed"],GetUserMedia:["BindingMedia","Failed","NotPublishing","Destroyed"],BindingMedia:["MediaBound","Failed","NotPublishing","Destroyed"],MediaBound:["NotPublishing","PublishingToSession","Failed","Destroyed"],PublishingToSession:["NotPublishing","Publishing","Failed","Destroyed","MediaBound"],Publishing:["NotPublishing","MediaBound","Failed","Destroyed"],Failed:["Destroyed"],Destroyed:[]};const i="NotPublishing";const a=t(i,r,o);a.prototype.isDestroyed=function(){return"Destroyed"===(this||_global3).current};a.prototype.isAttemptingToPublish=function(){return-1!==["GetUserMedia","BindingMedia","MediaBound","PublishingToSession"].indexOf((this||_global3).current)};a.prototype.isPublishing=function(){return"Publishing"===(this||_global3).current};return a}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});t.default=CancellationError;
3696/**
3697       * The error that is thrown when an operation is canceled.
3698       *
3699       * @class
3700       * @param {string=} message The error message.
3701       * @extends Error
3702       */function CancellationError(e){(this||_global3).message=e||"Operation has been canceled.";(this||_global3).name="CancellationError";Error.captureStackTrace&&Error.captureStackTrace(this||_global3,(this||_global3).constructor)}CancellationError.prototype=Object.create(Error.prototype);CancellationError.prototype.constructor=CancellationError},function(e,t,n){var r=n(0);"use strict";Object.defineProperty(t,"__esModule",{value:true});function promiseFinally(e,t){return r.resolve(e).then((e=>r.resolve(t()).then((()=>e))),(e=>r.resolve(t()).then((()=>r.reject(e)))))}t.default=promiseFinally},function(e,t,n){(function(t){var r=n(3);var o=r(n(25));var i=r(n(12));var a=r(n(13));const s=n(140);const c=n(147);const l=n(7);const u=n(276);const d=n(56);const f=n(49);const p=n(165),g=p.CancellationError;const h=n(19);const b=n(41);const v=n(48);const m=n(268);const _=n(26);const y=n(6);const E=n(652);const S=n(103);const T=n(62);const C=n(653);const w=n(4);const O=n(164)();const x=n(654);const I=n(282);const A=n(143);const R=n(283);const k=n(144);const D=n(2);const N=n(4);const P=n(22)();const M=n(8);const L=n(75);const j=n(301);const U=n(302);const F=n(655);const V=n(162)();const B=n(1)("Subscriber");const W=n(284)();const H=n(285);const z=n(11)();const $=n(21);const G=n(5);const q=n(151);const Y=n(142)(void 0!==typeof window?window:_global3);const K=n(101)({global:Y});const J=n(296)({PeerConnection:K});const Z=n(303);const X=n(658);const Q=n(659);const ee=n(660);const te=n(661);const ne=n(304);const re=n(100).parseIceServers;const oe=n(662);const ie=n(663);const ae=n(664);const se=n(306);const ce=n(167);const le=100;const isLocalStream=(e,t)=>e.connection.id===t.connection.id;const constructSubscriberUri=e=>{let t=e.apiKey,n=e.sessionId,r=e.streamId,o=e.subscriberId;return["/v2/partner",t,"session",n,"stream",r,"subscriber",o].join("/")};function hasExpectedTracks(e,t){const n=t&&t.hasVideo&&e&&0===e.getVideoTracks().length;const r=t&&t.hasAudio&&e&&0===e.getAudioTracks().length;return!(n||r)}function normalizeAudioVolume(e){return Math.max(0,Math.min(100,parseInt(e,10)))}function determineAudioVolume(e){return void 0!==e.audioVolume?e.audioVolume:false===e.subscribeToAudio?0:le}e.exports=function SubscriberFactory(e){let n=void 0===e?{}:e,r=n.AudioLevelMeter,p=void 0===r?I:r,Y=n.AudioLevelTransformer,K=void 0===Y?A:Y,ue=n.BackingBar,de=void 0===ue?R:ue,fe=n.Chrome,pe=void 0===fe?k:fe,ge=n.env,he=void 0===ge?D:ge,be=n.Errors,ve=void 0===be?N:be,me=n.Events,_e=void 0===me?P:me,ye=n.ExceptionCodes,Ee=void 0===ye?M:ye,Se=n.audioLevelSampler,Te=void 0===Se?F:Se,Ce=n.getStatsHelpers,we=void 0===Ce?L:Ce,Oe=n.hasAudioOutputLevelStatCapability,xe=void 0===Oe?j:Oe,Ie=n.hasRemoteStreamsWithWebAudio,Ae=void 0===Ie?U:Ie,Re=n.interpretPeerConnectionError,ke=void 0===Re?V:Re,De=n.logging,Ne=void 0===De?B:De,Pe=n.MuteButton,Me=void 0===Pe?W:Pe,Le=n.NamePanel,je=void 0===Le?H:Le,Ue=n.otError,Fe=void 0===Ue?z:Ue,Ve=n.OTErrorClass,Be=void 0===Ve?$:Ve,We=n.OTHelpers,He=void 0===We?G:We,ze=n.StylableComponent,$e=void 0===ze?q:ze,Ge=n.SubscriberPeerConnection,qe=void 0===Ge?J:Ge,Ye=n.SubscribingState,Ke=void 0===Ye?Z:Ye,Je=n.VideoDisabledIndicator,Ze=void 0===Je?X:Je,Xe=n.AudioBlockedIndicator,Qe=void 0===Xe?Q:Xe,et=n.VideoUnsupportedIndicator,tt=void 0===et?ee:et,nt=n.watchFrameRate,rt=void 0===nt?te:nt,ot=n.createSendMethod,it=void 0===ot?ne:ot,at=n.parseIceServers,st=void 0===at?re:at,ct=n.document,lt=void 0===ct?(void 0!==typeof window?window:_global3).document:ct,ut=n.WidgetView,dt=void 0===ut?O:ut;
3702const ft=3e4;const pt=15e3;const gt=function Subscriber(e,n,r){var O=this||_global3;void 0===n&&(n={});void 0===r&&(r=()=>{});if(void 0===n.analytics)throw new Error("Subscriber requires an instance of analytics");
3703/** @type AnalyticsHelperDefault */const I=n.analytics;const A=h();const R=Subscriber.hasAudioOutputLevelStatCapability()||Ae();const k=this||_global3;const D={};const N={};const P={};const M={};const L={};
3704/** @type {defaultWidgetView|null} */let j;let U;let F;let V;let B;let W;let H;let z;let $;let G;let q;let Y;
3705/** @type IntervalRunnerDefault | undefined */let J;let Z;let X=false;let Q=e||A;let ee=n.session;let te=n.stream;let ne;let re;let ue=false;let fe;let ge={};let be=null;let me=false;let ye=true;let Se=[];let Ce=s({},n,{showControls:true,testNetwork:false,fitMode:te.defaultFitMode||"cover",insertDefaultUI:true});let Oe;const xe={P2P:_.SUBSCRIBER_DISCONNECTED,MANTIS:_.SUBSCRIBER_DISCONNECTED};const Ie="Chrome"===he.name&&he.version>=58||he.isChromiumEdge||he.isOpera;const Re=ee._.getSocket();const getAllPeerConnections=()=>u(N);const getPeerConnectionBySourceStreamId=e=>N[e];const getCurrentPeerConnection=()=>N[Oe];const De=function(){var e=(0,a.default)(i.default.mark((function _callee(e){var t;return i.default.wrap((function _callee$(n){while(1)switch(n.prev=n.next){case 0:n.next=2;return N[e];case 2:t=n.sent;t.close();delete N[e];case 5:case"end":return n.stop()}}),_callee)})));return function removePeerConnectionBySourceStreamId(t){return e.apply(this||_global3,arguments)}}();const removeWebRTCStream=e=>{delete P[e]};const Pe=function(){var e=(0,a.default)(i.default.mark((function _callee2(e){var t;return i.default.wrap((function _callee2$(n){while(1)switch(n.prev=n.next){case 0:if(e){n.next=2;break}return n.abrupt("return");case 2:t={error:onVideoError,audioVolume:ne};n.prev=3;n.next=6;return j.bindVideo(e,t);case 6:n.next=14;break;case 8:n.prev=8;n.t0=n.catch(3);if(!(n.t0 instanceof g||W.isDestroyed())){n.next=12;break}return n.abrupt("return");case 12:onVideoError(n.t0);throw n.t0;case 14:case"end":return n.stop()}}),_callee2,null,[[3,8]])})));return function bindWebRTCStream(t){return e.apply(this||_global3,arguments)}}();const Le=function(){var e=(0,a.default)(i.default.mark((function _callee3(e,t){var n,r,o,a;return i.default.wrap((function _callee3$(i){while(1)switch(i.prev=i.next){case 0:n=false;"function"===typeof e?t=e:n="rtcStatsReport"===e;n?Je():Ye();if(!(n&&!se)){i.next=7;break}r=Ee.GET_RTC_STATS_REPORT_NOT_SUPPORTED;t(Fe(w.GET_RTC_STATS_REPORT_NOT_SUPPORTED,new Error(Be.getTitleByCode(r)),r));return i.abrupt("return");case 7:if(getCurrentPeerConnection()){i.next=11;break}r=Ee.PEER_CONNECTION_NOT_CONNECTED;t(Fe(ve.PEER_CONNECTION_NOT_CONNECTED,new Error(Be.getTitleByCode(r)),r));return i.abrupt("return");case 11:i.next=13;return getCurrentPeerConnection();case 13:o=i.sent;a=n?o.getRtcStatsReport:o.getStats;a(((e,n)=>{if(e){e.code===Ee.PEER_CONNECTION_NOT_CONNECTED&&(e=Fe(ve.PEER_CONNECTION_NOT_CONNECTED,e,Ee.PEER_CONNECTION_NOT_CONNECTED));t(e)}else t(null,n)}));case 16:case"end":return i.stop()}}),_callee3)})));return function _getStatsWrapper(t,n){return e.apply(this||_global3,arguments)}}();const _getStats=e=>Le(e);const _getRtcStatsReport=e=>Le("rtcStatsReport",e);const logAnalyticsEvent=(e,t,n,r,o)=>{let i=l({action:e,variation:t,payload:n,streamId:te?te.id:null,sessionId:ee?ee.sessionId:null,connectionId:ee&&ee.isConnected()?ee.connection.connectionId:null,partnerId:ee&&ee.sessionInfo?ee.sessionInfo.partnerId:null,subscriberId:A,widgetType:"Subscriber"},r);("Failure"===t||"iceconnectionstatechange"===t&&"closed"===n)&&(i=l(i,ge));const a=[i];o&&a.push(o);I.logEvent(...a)};const logHybridSessionTransition=(e,t,n)=>{if("Attempt"===t){M[e]=(new Date).getTime();logAnalyticsEvent(e,t,n)}else"Failure"!==t&&"Success"!==t||logAnalyticsEvent(e,t,n,{attemptDuration:(new Date).getTime()-M[e]})};const Ue=function logRoutedToRelayedTransition(e,t){void 0===t&&(t={});logHybridSessionTransition("RoutedToRelayedTransition",e,t)};const Ve=function logRelayedToRoutedTransition(e,t){void 0===t&&(t={});logHybridSessionTransition("RelayedToRoutedTransition",e,t)};const We=ie({onInvalidTransition(e,t){const n=`Invalid state transition: Event '${e}' not possible in state '${t}'`;Ne.error(n);logAnalyticsEvent("Subscriber:InvalidStateTransition","Event",{details:n})}});{const e="Unable to subscribe to stream in a reasonable amount of time";oe({connectivityState:We,onWarning(){logConnectivityEvent("Warning",{})},onTimeout:()=>{j&&j.addError(e);
3705if(W.isAttemptingToSubscribe()){W.set("Failed");this._disconnect({noStateTransition:true});const t=Fe(w.TIMEOUT,new Error(e),Ee.UNABLE_TO_SUBSCRIBE);We.fail({options:{failureReason:"Subscribe",failureMessage:e,failureCode:Ee.UNABLE_TO_SUBSCRIBE},error:t})}},warningMs:pt,timeoutMs:ft})}D.promise=new t(((e,t)=>{D.resolve=e;D.reject=t}));Ce.testNetwork&&ee.sessionInfo.p2pEnabled&&Ne.warn("You cannot test your network with a relayed session. Use a routed session.");(this||_global3).id=Q;(this||_global3).widgetId=A;(this||_global3).session=ee;(this||_global3).stream=Ce.stream;te=Ce.stream;(this||_global3).streamId=te.id;if(!ee){Be.handleJsException({errorMsg:"OT.Subscriber must be passed a session option",code:2e3,target:this||_global3,analytics:I});return null}y(this||_global3);k.once("subscribeComplete",(function(){try{r(...arguments)}catch(e){Ne.error("Completion handler threw an exception",e)}}));const getVariationFromState=e=>{let t=e.transition,n=e.from;return"fail"===t?"connected"===n?"Disconnect":"Failure":"disconnect"===t&&"connected"===n?"Disconnect":"Cancel"};We.observe({onEnterConnecting(){logConnectivityEvent("Attempt",null,{})},onEnterConnected(){logConnectivityEvent("Success",null,{})},onEnterDisconnected(e,t){let n=void 0===t?{}:t,r=n.options,o=void 0===r?{}:r,i=n.payload,a=void 0===i?null:i;logConnectivityEvent(getVariationFromState(e),a,o)}});We.observe({onEnterConnected:()=>{this.trigger("subscribeComplete",void 0,this||_global3)},onEnterDisconnected:function onEnterDisconnected(e,t){let n=e.from;let r=void 0===t?{}:t,o=r.error;"connecting"===n&&O.trigger("subscribeComplete",o||new Error("An unknown error occurred"),O)}});ae({connectivityState:We,logAttempt(){logAnalyticsEvent("Subscribe","Attempting",null,{connectionId:ee&&ee.isConnected()?ee.connection.connectionId:null})}});
3705const logConnectivityEvent=(e,t,n)=>{"Attempt"===e&&(Y=(new Date).getTime());logAnalyticsEvent("Subscribe",e,t,"Failure"===e||"Success"===e||"Cancel"===e?(0,o.default)({},n,{attemptDuration:(new Date).getTime()-Y}):n)};const logResubscribe=(e,t)=>{logAnalyticsEvent("ICERestart",e,t)};const recordQOS=e=>{var t,n;let r=e.parsedStats,o=e.remoteConnectionId,i=e.peerId,a=e.sourceStreamId;const s={widgetType:"Subscriber",width:j.width,height:j.height,audioTrack:$&&$.getAudioTracks().length>0,hasAudio:te&&te.hasAudio,subscribeToAudio:Z,audioVolume:this.getAudioVolume(),videoTrack:$&&$.getVideoTracks().length>0,connectionId:ee?ee.connection.connectionId:null,hasVideo:te&&te.hasVideo,subscribeToVideo:Ce.subscribeToVideo,congestionLevel:be,streamId:te.id,subscriberId:A,duration:Math.round((v()-B)/1e3),remoteConnectionId:o,peerId:i,sourceStreamId:ce(a),preferredResolutionHeight:null==(t=Ce.preferredResolution)?void 0:t.height,preferredResolutionWidth:null==(n=Ce.preferredResolution)?void 0:n.width,preferredFrameRate:Ce.preferredFrameRate,audioFallback:!G&&"auto"===q};const c=l(s,r);I.logQOS(c);this.trigger("qos",I.combineWithCommon(c))};const stateChangeFailed=e=>{Ne.error("OT.Subscriber State Change Failed: ",e.message);Ne.debug(e)};const onLoaded=()=>{if(!W.isSubscribing()&&j&&j.video()){X=true;if(!me){We.connect();me=true}Ne.debug("OT.Subscriber.onLoaded");W.set("Subscribing");B=v();j.loading(false);U&&U.showAfterLoading();ue&&te.setRestrictFrameRate(true);V&&V.audioOnly(j.audioOnly());this.setAudioVolume(ne);this.trigger("loaded",this||_global3)}};const isAudioOn=()=>te&&te.hasAudio&&Z&&this.getAudioVolume()>0&&!this.isAudioBlocked();const isVideoOn=()=>te&&te.hasVideo;const onAudioLevelStuckWarning=e=>{const t="audioLevelStuckAt0"===e&&(!isAudioOn()||isVideoOn());let n=false;if(!t){logAnalyticsEvent("subscriber:onAudioWarning","Event",{reason:e});if(j){j.rebindSrcObject();logAnalyticsEvent("subscriber:rebindSrcObject","Called");if("audioLevelStuck"===e)return;n=true}}ze(n)};const ze=function(){var e=(0,a.default)(i.default.mark((function _callee4(e){var t;return i.default.wrap((function _callee4$(n){while(1)switch(n.prev=n.next){case 0:void 0===e&&(e=false);if(!Ie){n.next=6;break}n.next=4;return getCurrentPeerConnection();case 4:t=n.sent;t.startAudioStatsWatcher(e);case 6:case"end":return n.stop()}}),_callee4)})));return function startAudioStatsWatcher(t){return e.apply(this||_global3,arguments)}}();const onPeerConnected=e=>{const t=ee.sessionInfo.isAdaptiveEnabled;const n=t&&"P2P"===e.getSourceStreamId();n&&Ue("Success")};const onPeerDisconnected=()=>{Ne.debug("OT.Subscriber has been disconnected from the Publisher's PeerConnection");We.fail({options:{failureReason:"PeerConnectionError",failureCode:Ee.UNABLE_TO_PUBLISH,failureMessage:"PeerConnection disconnected"},error:Fe(ve.DISCONNECTED,new Error("ClientDisconnected"))});this._disconnect({noStateTransition:true});(W.isAttemptingToSubscribe()||W.isSubscribing())&&W.set("Failed")};const onVideoError=e=>{const t=Fe(ve.MEDIA_ERR_DECODE,e,e.code||Ee.P2P_CONNECTION_FAILED);t.message=`OT.Subscriber while playing stream: ${t.message}`;Ne.error("OT.Subscriber.onVideoError");We.fail({options:{failureReason:"VideoElement",failureMessage:t.message,failureCode:t.code||Ee.P2P_CONNECTION_FAILED},error:t});const n=W.isAttemptingToSubscribe();W.set("Failed");n||k.trigger("error",t.message);Be.handleJsException({error:t,code:Ee.UNABLE_TO_SUBSCRIBE,target:k,analytics:I})};const onSubscriberCreateError=e=>{const t=C(e);Be.handleJsException({error:t,code:t.code,target:k,analytics:I});this._disconnect({noStateTransition:true});const n={failureReason:"Subscribe",failureMessage:`OT.Subscriber PeerConnection Error: ${t.message}`,failureCode:Ee.P2P_CONNECTION_FAILED};_showError(t.code);We.fail({options:n,error:Fe(t.name,new Error(`Subscribe: Subscriber PeerConnection with connection (not found) failed: ${t.message}`),t.code)});t.name===w.STREAM_NOT_FOUND&&this._destroy({reason:"streamNotFound",noStateTransition:true})};const onPeerConnectionFailure=(e,t,n,r)=>{if("SetRemoteDescription"===r&&!ye&&t.match(/Unsupported video without audio for fallback/)){j&&j.addError("The stream is unable to be played.","Your browser does not support the video format.");let e;e="Safari"===He.env.name?new Error("VP8 is not supported in this version of Safari. You might want to consider switching to an H264 project. See https://tokbox.com/safari for more information."):new Error("Video format not supported in this browser.");e.code=Ee.UNSUPPORTED_VIDEO_CODEC;onVideoError(e);return}if("ICEWorkflow"===r&&ee.sessionInfo.reconnection&&X){Ne.debug("Ignoring peer connection failure due to possibility of reconnection.");return}let o;o="ICEWorkflow"===r?Ee.SUBSCRIBER_ICE_WORKFLOW_FAILED:e===Ee.STREAM_LIMIT_EXCEEDED?e:Ee.P2P_CONNECTION_FAILED;const i={failureReason:r||"PeerConnectionError",failureMessage:`OT.Subscriber PeerConnection 
3705Error: ${t}`,failureCode:o};const a=ke(e,t,r,"(not found)","Subscriber");We.fail({options:i,error:a});if(W.isAttemptingToSubscribe()){const e={hasRelayCandidates:n&&n.hasRelayCandidates()};logAnalyticsEvent("createPeerConnection","Failure",e,i);W.set("Failed")}else if(W.isSubscribing()){W.set("Failed");this.trigger("error",t)}this._disconnect({noStateTransition:true});404===Number(e)&&this._destroy({noStateTransition:true});Be.handleJsException({errorMsg:`OT.Subscriber PeerConnection Error: ${t}`,errorCode:o,target:this||_global3,analytics:I});_showError(e)};const Ge=function(){var e=(0,a.default)(i.default.mark((function _callee5(e,n){var r,o,a,s,c,l,u,d;return i.default.wrap((function _callee5$(i){while(1)switch(i.prev=i.next){case 0:r=1===Object.keys(P).length;o=null==n?void 0:n.getSourceStreamId();a=ee,s=a.sessionInfo;$=e;o&&(P[o]=e);Ne.debug("OT.Subscriber.onRemoteStreamAdded with sourceStreamId",o);i.prev=6;i.next=9;return E((()=>hasExpectedTracks($,te)));case 9:i.next=18;break;case 11:i.prev=11;i.t0=i.catch(6);if(!("TIMEOUT"===i.t0.message)){i.next=17;break}Ne.error("The expected tracks never arrived");i.next=18;break;case 17:throw i.t0;case 18:W.set("BindingRemoteStream");O.subscribeToAudio(Z);q="loading";O.subscribeToVideo(Ce.subscribeToVideo,"loading");if(!s.p2pEnabled&&"P2P"!==o){O.setPreferredResolution(Ce.preferredResolution);O.setPreferredFrameRate(Ce.preferredFrameRate)}e.getVideoTracks().forEach((e=>{(void 0!==typeof window?window:_global3).webkitMediaStream?e.enabled=false:e.enabled=te.hasVideo&&Ce.subscribeToVideo}));i.next=26;return Pe(e);case 26:ze();if(!W.isDestroyed()){i.next=29;break}throw new Error("Subscriber destroyed");case 29:(void 0!==typeof window?window:_global3).webkitMediaStream&&e.getVideoTracks().forEach((e=>{e.enabled=te.hasVideo&&Ce.subscribeToVideo}));c=j&&j.video();c&&c.orientation({width:te.videoDimensions.width,height:te.videoDimensions.height,videoOrientation:te.videoDimensions.orientation});l=U&&U.videoUnsupportedIndicator;l&&l.setVideoUnsupported(!ye);u=new t(((e,t)=>{const n=j&&j.video();if(n&&n.domElement())e();else{j.once("videoElementCreated",e);k.once("destroyed",t)}}));i.next=37;return u;case 37:i.next=39;return D.promise;case 39:r?W.set("Subscribing"):onLoaded();H&&"webRTCStream"in H&&e.getAudioTracks().length>0&&H.webRTCStream(e);d=He.env;if(!(d.isSafari||d.isChromiumEdge||d.isOpera||"Chrome"===d.name&&d.version>=58||d.isFirefox&&d.version>=96)){i.next=48;break}if(fe){fe.destroy();fe=null}i.next=46;return getCurrentPeerConnection();case 46:n=i.sent;n&&(fe=rt(n.getStats.bind(n)));case 48:r||O.trigger("streamAdded",O);case 49:case"end":return i.stop()}}),_callee5,null,[[6,11]])})));return function onRemoteStreamAdded(t,n){return e.apply(this||_global3,arguments)}}();const onRemoteStreamRemoved=e=>{$=null;Ne.debug("OT.Subscriber.onStreamRemoved");const t=j&&j.video();t&&t.stream===e&&j.destroyVideo();removeWebRTCStream(Oe);this.trigger("streamRemoved",this||_global3)};const onRemoteVideoSupported=e=>{ye!==e&&this.dispatchEvent(new _e.VideoEnabledChangedEvent(e?"videoEnabled":"videoDisabled",{reason:e?"codecChanged":"codecNotSupported"}));ye=e};const audioBlockedStateChange=e=>{j.setAudioBlockedUi(e);const t=U&&U.audioBlockedIndicator;t&&t.setAudioBlocked(e);const n=U&&U.videoUnsupportedIndicator;n&&n.setVideoUnsupported(!e&&!ye)};this.on("audioBlocked",(()=>{audioBlockedStateChange(true)}));this.on("audioUnblocked",(()=>{audioBlockedStateChange(false)}));const qe={new:_.SUBSCRIBER_DISCONNECTED,checking:_.SUBSCRIBER_DISCONNECTED,connected:_.SUBSCRIBER_CONNECTED,completed:_.SUBSCRIBER_CONNECTED,disconnected:_.SUBSCRIBER_DISCONNECTED};const onIceConnectionStateChange=(e,t)=>
3705{const n=qe[e];const r=t.getSourceStreamId();const o=xe[r];const s=n&&n!==o;if(s){xe[r]=n;"disconnected"===e&&"P2P"!==r&&setTimeout((0,a.default)(i.default.mark((function _callee6(){var e;return i.default.wrap((function _callee6$(t){while(1)switch(t.prev=t.next){case 0:e=ee._.isSocketReconnecting;if(!("disconnected"===xe[r]&&Re.is("connected")&&!e())){t.next=4;break}t.next=4;return O._.iceRestart("peer connection disconnected");case 4:case"end":return t.stop()}}),_callee6)}))),2e3);j&&j.loading(n!==_.SUBSCRIBER_CONNECTED);Ne.debug(`OT.Subscriber.connectionStateChanged to ${e}`);this.dispatchEvent(new _e.ConnectionStateChangedEvent(n,this||_global3))}};const onIceRestartSuccess=()=>{logResubscribe("Success")};const onIceRestartFailure=()=>{logResubscribe("Failure",{reason:"ICEWorkflow",message:"OT.Subscriber PeerConnection Error: The stream was unable to connect due to a network error. Make sure your connection isn't blocked by a firewall."})};const streamUpdated=e=>{const t=j&&j.video();switch(e.changedProperty){case"videoDimensions":if(!t)break;t.orientation({width:e.newValue.width,height:e.newValue.height,videoOrientation:e.newValue.orientation});this.dispatchEvent(new _e.VideoDimensionsChangedEvent(this||_global3,e.oldValue,e.newValue));break;case"videoDisableWarning":U&&U.videoDisabledIndicator.setWarning(e.newValue);this.dispatchEvent(new _e.VideoDisableWarningEvent(e.newValue?"videoDisableWarning":"videoDisableWarningLifted"));be="videoDisableWarning"===e.newValue?1:null;break;case"hasVideo":setAudioOnly(!te.hasVideo||!Ce.subscribeToVideo);"Safari"===he.name&&!te.hasVideo&&j&&j.bindAudioTrackOnly();this.dispatchEvent(new _e.VideoEnabledChangedEvent(te.hasVideo?"videoEnabled":"videoDisabled",{reason:"publishVideo"}));break;case"hasAudio":F.update();break;default:}};const _hasAudioTracks=()=>te.getChannelsOfType("audio").length>0;F={get(){return _hasAudioTracks()?k.getStyle("buttonDisplayMode"):"off"},update(){const e=F.get();if(U){U.muteButton.setDisplayMode(e);U.backingBar.setMuteMode(e)}}};const updateChromeForStyleChange=(e,t)=>
3705{if(U)switch(e){case"nameDisplayMode":U.name.setDisplayMode(t);U.backingBar.setNameMode(t);break;case"videoUnsupportedDisplayMode":U.videoUnsupportedIndicator.setDisplayMode(t);break;case"videoDisabledDisplayMode":U.videoDisabledIndicator.setDisplayMode(t);break;case"audioBlockedDisplayMode":U.audioBlockedIndicator.setDisplayMode(t);break;case"showArchiveStatus":U.archive.setShowArchiveStatus(t);break;case"buttonDisplayMode":F.update();break;case"audioLevelDisplayMode":U.audioLevel.setDisplayMode(t);break;case"bugDisplayMode":break;case"backgroundImageURI":j.setBackgroundImageURI(t);break;default:}};const _createChrome=()=>{const e={backingBar:new de({nameMode:Ce.name?this.getStyle("nameDisplayMode"):"off",muteMode:F.get()}),name:new je({name:Ce.name,mode:this.getStyle("nameDisplayMode")}),muteButton:new Me({muted:0===ne,mode:F.get()})};if(R){const t=new K;V=new p({mode:k.getStyle("audioLevelDisplayMode")});const n=new S((()=>{V.setValue(t.transform((this||_global3).loudness))}));V.watchVisibilityChanged((e=>{e?n.start():n.stop()}));V.setDisplayMode(this.getStyle("audioLevelDisplayMode"));V.audioOnly(false);e.audioLevel=V}e.videoDisabledIndicator=new Ze({mode:this.getStyle("videoDisabledDisplayMode")});e.audioBlockedIndicator=new Qe({mode:this.getStyle("audioBlockedDisplayMode")});e.videoUnsupportedIndicator=new tt({mode:this.getStyle("videoUnsupportedDisplayMode")});if(j&&j.domElement){U=new pe({parent:j.domElement}).set(e).on({muted(){k.setAudioVolume(0)},unmuted(){k.setAudioVolume(re)}},this||_global3);U.hideWhileLoading()}};const _showError=e=>{let t;let n;if(j){if(e===Ee.STREAM_LIMIT_EXCEEDED){t="The stream was unable to connect.";n="The limit for the number of media streams has been reached."}else{t="The stream was unable to connect due to a network error.";n=me?"Ensure you have a stable connection and try again.":"Make sure you have a stable network connection and that it isn't blocked by a firewall."}j.addError(t,n)}};$e(this||_global3,{nameDisplayMode:"auto",buttonDisplayMode:"auto",audioLevelDisplayMode:"auto",videoDisabledDisplayMode:"auto",audioBlockedDisplayMode:"auto",backgroundImageURI:null,showArchiveStatus:true,showMicButton:true},Ce.showControls,(e=>{logAnalyticsEvent("SetStyle","Subscriber",e,null,.1)}));function setAudioOnly(e){getAllPeerConnections().forEach(function(){var t=(0,a.default)(i.default.mark((function _callee7(t){return i.default.wrap((function _callee7$(n){while(1)switch(n.prev=n.next){case 0:n.next=2;return t;case 2:n.sent.subscribeToVideo(!e);case 3:case"end":return n.stop()}}),_callee7)})));return function(e){return t.apply(this||_global3,arguments)}}());if(j){j.audioOnly(e);j.showPoster(e)}V&&V.audioOnly(e)}const Ye=f((()=>{logAnalyticsEvent("GetStats","Called")}));const Je=f((()=>{logAnalyticsEvent("GetRtcStatsReport","Called")}));const createAudioLevelSampler=e=>{if(z){z.destroy();z=void 0}if($.getAudioTracks().length){H=Te(e);if(H)z=x({subscriber:this||_global3,audioLevelSampler:H});else if(!Object.prototype.hasOwnProperty.call(this||_global3,"loudness")){Object.defineProperty(this||_global3,"loudness",{value:void 0,configurable:true,writable:false});Ne.error("No suitable audio level samplers found, audio level visualisation will not work")}}};const setPeerConnectionEvents=(e,t)=>{if(L[t]){L[t].removeAll();const onDisconnected=()=>{e.off("error",onDisconnected);e.off("disconnected",onDisconnected)};e.on("error",onDisconnected);e.on("disconnected",onDisconnected)}const n=T(e);n.once("connected",(()=>onPeerConnected(e)));n.on("disconnected",onPeerDisconnected);n.on("error",onPeerConnectionFailure);n.on("remoteStreamAdded",(0,a.default)(i.default.mark((function _callee8(){var e=arguments;return i.default.wrap((function _callee8$(t){while(1)switch(t.prev=t.next){case 0:t.prev=0;t.next=3;return Ge(...e);case 3:t.next=8;break;case 5:t.prev=5;t.t0=t.catch(0);Ne.error(t.t0);case 8:case"end":return t.stop()}}),_callee8,null,[[0,5]])}))));n.on("audioLevelStuckWarning",onAudioLevelStuckWarning);n.on("remoteStreamRemoved",onRemoteStreamRemoved);n.on("signalingStateStable",(0,a.default)(i.default.mark((function _callee9(){var e;return i.default.wrap((function _callee9$(t){while(1)switch(t.prev=t.next){case 0:k.trigger("signalingStateStable");e=j&&j.video();e&&$&&H&&"webRTCStream"in H&&$.getAudioTracks().length>0&&H.webRTCStream($);case 3:case"end":return t.stop()}}),_callee9)}))));n.on("iceConnectionStateChange",(t=>onIceConnectionStateChange(t,e)));n.on("iceRestartSuccess",onIceRestartSuccess);n.on("iceRestartFailure",onIceRestartFailure);n.on("remoteVideoSupported",onRemoteVideoSupported);
3705n.once("remoteStreamAdded",createAudioLevelSampler.bind(this||_global3,e));L[t]=L};(this||_global3)._destroy=e=>{let t=e.reason,n=void 0===t?"Unknown":t,r=e.quiet,o=e.noStateTransition,i=void 0!==o&&o;if(W.isDestroyed())return this||_global3;W.set("Destroyed");if(fe){fe.destroy();fe=null}ge={sessionId:ee.sessionId,connectionId:ee&&ee.isConnected()?ee.connection.connectionId:null,partnerId:ee&&ee.sessionInfo?ee.sessionInfo.partnerId:null,streamId:te&&!te.destroyed?te.id:null};this._disconnect({reason:n,noStateTransition:i});if(U){U.destroy();U=null}if(j){j.destroy();j.off();j=null;(this||_global3).element=null}te&&!te.destroyed&&logAnalyticsEvent("unsubscribe",null,{streamId:te.id});te.off(J,this||_global3);(this||_global3).id=null;Q=null;(this||_global3).stream=null;te=null;(this||_global3).streamId=null;(this||_global3).session=null;ee=null;Ce=null;if(true!==r){this.dispatchEvent(new _e.DestroyedEvent(_.SUBSCRIBER_DESTROYED,this||_global3,n));this.off()}return this||_global3};(this||_global3).destroy=function(e,t){void 0===e&&(e="Unsubscribe");Ne.warn("Subscriber#destroy is deprecated and will be removed. Please use Session#unsubscribe instead");O._destroy({reason:e,quiet:t})};(this||_global3)._disconnect=function(e){let t=void 0===e?{}:e,n=t.reason,r=void 0===n?"Unknown":n,o=t.noStateTransition;if(!o&&!We.is("disconnected")){const e="Unsubscribe"===r?void 0:Fe(ve.STREAM_DESTROYED,new Error("Stream was destroyed before it could be subscribed to"));We.disconnect({payload:{reason:r},error:e})}W.isDestroyed()||W.isFailed()||W.set("NotSubscribing");j&&j.destroyVideo();getAllPeerConnections().forEach(function(){var e=(0,a.default)(i.default.mark((function _callee10(e){return i.default.wrap((function _callee10$(t){while(1)switch(t.prev=t.next){case 0:t.next=2;return e;
3705case 2:t.sent.destroy();case 3:case"end":return t.stop()}}),_callee10)})));return function(t){return e.apply(this||_global3,arguments)}}());Object.keys(N).forEach((e=>{delete N[e]}));Re.is("connected")&&te&&!te.destroyed&&Re.subscriberDestroy(te.id,O.widgetId)};(this||_global3).disconnect=()=>{Ne.warn("Subscriber#disconnect is deprecated and will be removed. Please use Session#unsubscribe instead");this._disconnect({reason:"Unsubscribe"})};const Xe=function(){var e=(0,a.default)(i.default.mark((function _callee11(e){var t,n,r,a,s,c,l;return i.default.wrap((function _callee11$(i){while(1)switch(i.prev=i.next){case 0:t=e.peerId,n=e.fromConnectionId,r=e.sourceStreamId;a=constructSubscriberUri({apiKey:ee.apiKey,sessionId:ee.sessionId,streamId:te.id,subscriberId:O.widgetId});s=it({socket:O.session._.getSocket(),uri:a,content:{peerId:t,sourceStreamId:r}});c=function log(e,n,i,a,s){void 0===a&&(a={});const c=(0,o.default)({peerId:t,sourceStreamId:ce(r)},a);return logAnalyticsEvent(e,n,i,c,s)};l=e=>{Oe===r&&recordQOS((0,o.default)({},e,{peerId:t,remoteConnectionId:n,sourceStreamId:r}))};return i.abrupt("return",O._setupPeerConnection({send:s,log:c,logQoS:l,sourceStreamId:r}));case 6:case"end":return i.stop()}}),_callee11)})));return function processOffer(t){return e.apply(this||_global3,arguments)}}();(this||_global3).processMessage=function(){var e=(0,a.default)(i.default.mark((function _callee12(e,t,n){var r,o,a;return i.default.wrap((function _callee12$(i){while(1)switch(i.prev=i.next){case 0:Ne.debug(`OT.Subscriber.processMessage: Received ${e} message from ${t}`);Ne.debug(n);r=d(n,"content.peerId");o=d(n,"content.sourceStreamId");i.next=6;return getPeerConnectionBySourceStreamId(o);case 6:a=i.sent;if(!a){i.next=11;break}a.processMessage(e,n);i.next=16;break;case 11:if(!("offer"===e)){i.next=16;break}i.next=14;return Xe({peerId:r,fromConnectionId:t,sourceStreamId:o});case 14:a=i.sent;O.session._.addSubscriberToPeerConnectionsQueue(a,n);case 16:case"end":return i.stop()}}),_callee12)})));return function(t,n,r){return e.apply(this||_global3,arguments)}}();(this||_global3).disableVideo=e=>{if(e){if("auto"!==q){Ne.info("Video was not re-enabled because it was manually disabled");return}Ne.info("Video has been re-enabled")}else Ne.warn("Due to high packet loss and low bandwidth, video has been disabled");this.subscribeToVideo(e,"auto");const t=e?{videoEnabled:true}:{videoDisabled:true};logAnalyticsEvent("updateQuality","video",t)};(this||_global3).getImgData=()=>{if(!this.isSubscribing()){Ne.error("OT.Subscriber.getImgData: Cannot getImgData before the Subscriber is subscribing.");return null}const e=j&&j.video();return e?e.imgData():null};
3706/**
3707            *  Returns the details on the subscriber stream quality, including the following:
3708            *
3709            * <ul>
3710            *
3711            *   <li>Total audio and video packets lost</li>
3712            *   <li>Total audio and video packets received</li>
3713            *   <li>Total audio and video bytes received</li>
3714            *   <li>Current video frame rate</li>
3715            *
3716            * </ul>
3717            *
3718            * You can publish a test stream, subscribe to it (on the publishing client), and use this method
3719            * to check its quality. Based on the stream's quality, you can determine what video resolution is
3720            * supported and whether conditions support video or audio. You can then publish an appropriate
3721            * stream, based on the results. When using this method to test a stream published by your
3722            * own client, set the <code>testNetwork</code> property to <code>true</code> in the options you
3723            * pass into the <a href="Session.html#subscribe">Session.subscribe()</a> method. For an example,
3724            * see the <a href="https://github.com/opentok/opentok-network-test">opentok-network-test</a>
3725            * project on GitHub.
3726            * <p>
3727            * You may also use these statistics to have a Subscriber subscribe to audio-only if the audio
3728            * packet loss reaches a certain threshold. If you choose to do this, you should set the
3729            * <code>audioFallbackEnabled</code> setting to <code>false</code> when you initialize Publisher
3730            * objects for the session. This prevents the OpenTok Media Router from using its own audio-only
3731            * toggling implementation. (See the documentation for the
3732            * <a href="OT.html#initPublisher">OT.initPublisher()</a> method.)
3733            *
3734            * @param {Function} completionHandler A function that takes the following
3735            * parameters:
3736            *
3737            * <ul>
3738            *
3739            *   <li><code>error</code> (<a href="Error.html">Error</a>) &mdash; The error property is
3740            *   set if the client is not connected. Upon completion of a successful c
3740all to the method,
3741            *   this property is undefined.</li>
3742            *
3743            *   <li><code>stats</code> (Object) &mdash; An object with the following properties:
3744            *     <p>
3745            *     <ul>
3746            *       <li><code>audio.bytesReceived</code> (Number) &mdash; The total number of audio bytes
3747            *         received by the subscriber</li>
3748            *       <li><code>audio.packetsLost</code> (Number) &mdash; Total audio packets that did not reach
3749            *         the subscriber</li>
3750            *       <li><code>audio.packetsReceived</code> (Number) &mdash; The total number of audio packets
3751            *         received by the subscriber</li>
3752            *       <li><code>timestamp</code> (Number) &mdash; The timestamp, in milliseconds since the Unix
3753            *         epoch, for when these stats were gathered</li>
3754            *       <li><code>video.bytesReceived</code> (Number) &mdash; The total video bytes received by
3755            *         the subscriber</li>
3756            *       <li><code>video.packetsLost</code> (Number) &mdash; The total number of video packets that
3757            *         did not reach the subscriber</li>
3758            *       <li><code>video.packetsReceived</code> (Number) &mdash; The total number of video packets
3759            *         received by the subscriber</li>
3760            *       <li><code>video.frameRate</code> (Number) &mdash; The current video frame rate</li>
3761            *     </ul>
3762            *   </li>
3763            * </ul>
3764            *
3765            * @see <a href="Publisher.html#getStats">Publisher.getStats()</a>
3766            * @see <a href="#getRtcStatsReport">Publisher.getRtcStatsReport()</a>
3767            *
3768            * @method #getStats
3769            * @memberOf Subscriber
3770            */(this||_global3).getStats=e=>{_getStats(((t,n)=>{if(t){e(t);return}const r={timestamp:0};n.forEach((e=>{if(we.isInboundStat(e)){const t=we.isVideoStat(e,n);const o=we.isAudioStat(e,n);(o||t)&&(r.timestamp=we.normalizeTimestamp(e.timestamp));if(t){c(r,{video:we.parseStatCategory(e)});fe&&c(r,{video:{frameRate:fe.getFrameRateFromStat(e)}})}else o&&c(r,{audio:we.parseStatCategory(e)})}}));e(null,r)}))};(this||_global3).getRtcStatsReport=()=>new t(((e,t)=>{_getRtcStatsReport(((n,r)=>{n?t(n):e(r)}))}));function setAudioVolume(e){const t=j&&j.video();if(t)try{t.setAudioVolume(e)}catch(e){Ne.warn(`setAudioVolume: ${e}`);if(0===ne){Ne.info("Using subscribeToAudio to mute Audio because setAudioVolume(0) failed");k.subscribeToAudio(false)}}U&&U.muteButton.muted(0===e)}
3771/**
3772             * Sets the audio volume, between 0 and 100, of the Subscriber.
3773             *
3774             * <p>You can set the initial volume when you call the <code>Session.subscribe()</code>
3775             * method. Pass a <code>audioVolume</code> property of the <code>properties</code> parameter
3776             * of the method.</p>
3777             *
3778             * @param {Number} value The audio volume, between 0 and 100.
3779             *
3780             * @return {Subscriber} The Subscriber object. This lets you chain method calls, as in the
3781             * following:
3782             *
3783             * <pre>mySubscriber.setAudioVolume(50).setStyle(newStyle);</pre>
3784             *
3785             * @see <a href="#getAudioVolume">getAudioVolume()</a>
3786             * @see <a href="Session.html#subscribe">Session.subscribe()</a>
3787             * @method #setAudioVolume
3788             * @memberOf Subscriber
3789             */(this||_global3).setAudioVolume=e=>{const t=normalizeAudioVolume(e);logAnalyticsEvent("setAudioVolume","Attempt",{audioVolume:t});if(isNaN(t)){Ne.error("OT.Subscriber.setAudioVolume: value should be an integer between 0 and 100");logAnalyticsEvent("setAudioVolume","Failure",{message:"value should be an integer between 0 and 100"});return this||_global3}t!==e&&Ne.warn("OT.Subscriber.setAudioVolume: value should be an integer between 0 and 100");if(t===ne){setAudioVolume(ne);logAnalyticsEvent("setAudioVolume","Success",{audioVolume:ne,message:"Requested volume is same as already set audioVolume"});return this||_global3}ne>0&&(re=ne);ne=t;setAudioVolume(ne);if(ne>0&&!Z){re=ne;this.subscribeToAudio(true)}logAnalyticsEvent("setAudioVolume","Success",{audioVolume:ne});return this||_global3};(this||_global3).getAudioVolume=()=>{const e=j&&j.video();if(e)try{return e.getAudioVolume()}catch(e){Ne.warn(`getAudioVolume ${e}`)}return ne};
3790/**
3791            * Toggles audio on and off. Starts subscribing to audio (if it is available and currently
3792            * not being subscribed to) when the <code>value</code> is <code>true</code>; stops
3793            * subscribing to audio (if it is currently being subscribed to) when the <code>value</code>
3794            * is <code>false</code>.
3795            * <p>
3796            * <i>Note:</i> This method only affects the local playback of audio. It has no impact on the
3797            * audio for other connections subscribing to the same stream. If the Publisher is not
3798            * publishing audio, enabling the Subscriber audio will have no practical effect.
3799            * </p>
3800            *
3801            * @param {Boolean} value Whether to start subscribing to audio (<code>true</code>) or not
3802            * (<code>false</code>).
3803            *
3804            * @return {Subscriber} The Subscriber object. This lets you chain method calls, as in the
3805            * following:
3806            *
3807            * <pre>mySubscriber.subscribeToAudio(true).subscribeToVideo(false);</pre>
3808            *
3809            * @see <a href="#subscribeToVideo">subscribeToVideo()</a>
3810            * @see <a href="Session.html#subscribe">Session.subscribe()</a>
3811            * @see <a href="StreamPropertyChangedEvent.html">StreamPropertyChangedEvent</a>
3812            *
3813            * @method #subscribeToAudio
3814            * @memberOf Subscriber
3815            */(this||_global3).subscribeToAudio=e=>{const t=m(e,true);
3815getAllPeerConnections().forEach(function(){var e=(0,a.default)(i.default.mark((function _callee13(e){return i.default.wrap((function _callee13$(n){while(1)switch(n.prev=n.next){case 0:n.next=2;return e;case 2:n.sent.subscribeToAudio(t);case 3:case"end":return n.stop()}}),_callee13)})));return function(t){return e.apply(this||_global3,arguments)}}());te&&0!==getAllPeerConnections().length&&te.setChannelActiveState("audio",t);const n=Z!==t;Z=t;n&&this.setAudioVolume(t?re:0);logAnalyticsEvent("subscribeToAudio","Event",{subscribeToAudio:t});return this||_global3};const et={auto:"quality",publishVideo:"publishVideo",subscribeToVideo:"subscribeToVideo"};if("Safari"===he.name){const onVisibilityChange=()=>{if(!lt.hidden&&Ce.subscribeToVideo){Ne.debug("document visibility restored in Safari - resubscribing to video");this.subscribeToVideo(false);this.subscribeToVideo(true)}};lt.addEventListener("visibilitychange",onVisibilityChange);this.once("destroyed",(()=>{lt.removeEventListener("visibilitychange",onVisibilityChange)}))}
3816/**
3817            * Toggles video on and off. Starts subscribing to video (if it is available and
3818            * currently not being subscribed to) when the <code>value</code> is <code>true</code>;
3819            * stops subscribing to video (if it is currently being subscribed to) when the
3820            * <code>value</code> is <code>false</code>.
3821            * <p>
3822            * <i>Note:</i> This method only affects the local playback of video. It has no impact on
3823            * the video for other connections subscribing to the same stream. If the Publisher is not
3824            * publishing video, enabling the Subscriber video will have no practical effect.
3825            * </p>
3826            *
3827            * @param {Boolean} value Whether to start subscribing to video (<code>true</code>) or not
3828            * (<code>false</code>).
3829            *
3830            * @return {Subscriber} The Subscriber object. This lets you chain method calls, as in the
3831            * following:
3832            *
3833            * <pre>mySubscriber.subscribeToVideo(true).subscribeToAudio(false);</pre>
3834            *
3835            * @see <a href="#subscribeToAudio">subscribeToAudio()</a>
3836            * @see <a href="Session.html#subscribe">Session.subscribe()</a>
3837            * @see <a href="StreamPropertyChangedEvent.html">StreamPropertyChangedEvent</a>
3838            *
3839            * @method #subscribeToVideo
3840            * @memberOf Subscriber
3841            */(this||_global3).subscribeToVideo=(e,t)=>{const n=m(e,true);logAnalyticsEvent("subscribeToVideo","Attempt",{subscribeToVideo:n,reason:t});setAudioOnly(!n||!te.hasVideo||!($&&$.getVideoTracks().length>0));if(te.hasVideo&&$&&0===$.getVideoTracks().length){n&&Ne.info("Subscriber is audio-only due to incompatibility, can't subscribeToVideo.");Ce.subscribeToVideo=false;logAnalyticsEvent("subscribeToVideo","Failure",{message:"No video tracks available"});return this||_global3}U&&U.videoDisabledIndicator&&U.videoDisabledIndicator.disableVideo("auto"===t&&!n);getAllPeerConnections().length>0&&ee&&te&&(n!==Ce.subscribeToVideo||t!==q)&&te.setChannelActiveState("video",n,t);Ce.subscribeToVideo=n;q=t;G=n;logAnalyticsEvent("subscribeToVideo","Success",{subscribeToVideo:n,reason:t});if("loading"!==t){this.dispatchEvent(new _e.VideoEnabledChangedEvent(n?"videoEnabled":"videoDisabled",{reason:et[t]||"subscribeToVideo"}));"videoDisabled"===n&&"auto"===t&&(be=2)}return this||_global3};
3842/**
3843            * Sets the preferred resolution of the subscriber's video.
3844            * <p>
3845            * Lowering the preferred resolution
3846            * lowers video quality on the subscribing client, but it also reduces network and CPU usage.
3847            * You may want to use a lower resolution based on the dimensions of subscriber's video on
3848            * the web page. You may want to use a resolution rate for a subscriber to a stream that is less
3849            * important (and smaller) than other streams.
3850            * <p>
3851            * <p>
3852            * This method only applies when subscribing to a stream that uses the
3853            * <a href="https://tokbox.com/developer/guides/scalable-video">
3854            * scalable video feature</a>. Scalable video is available:
3855            * <ul>
3856            *   <li>
3857            *     Only in sessions that use the OpenTok Media Router (sessions with the
3858            *     <a href="https://tokbox.com/developer/guides/create-session/#media-mode">media
3859            *     mode</a> set to routed).
3860            *   </li>
3861            *   <li>
3862            *     Only for streams published by clients that support scalable video:
3863            *     clients that use the OpenTok iOS SDK (on certain devices), the OpenTok
3864            *     Android SDK (on certain devices), or OpenTok.js 
3864in Chrome and Safari.
3865            *   </li>
3866            * </ul>
3867            * <p>
3868            * In streams that do not use scalable video, calling this method has no effect.
3869            * <p>
3870            * <b>Note:</b> The resolution for scalable video streams automatically adjusts for each
3871            * subscriber, based on network conditions and CPU usage, even if you do not call this method.
3872            * Call this method if you want to set a maximum resolution for this subscriber.
3873            * <p>
3874            * In streams that do not use scalable video, calling this method has no effect.
3875            * <p>
3876            * Not every frame rate is available to a subscriber. When you set the preferred resolution for
3877            * the subscriber, OpenTok.js picks the best resolution available that matches your setting.
3878            * The resolutions available are based on the value of the Subscriber object's
3879            * <code>stream.resolution</code> property, which represents the maximum resolution available for
3880            * the stream. The actual resolutions available depend, dynamically, on network and CPU resources
3881            * available to the publisher and subscriber.
3882            * <p>
3883            * You can set the initial preferred resolution used by setting the
3884            * <code>preferredResolution</code> property of the <code>options</code> object you pass into the
3885            * <code>Session.subscribe()</code> method.
3886            *
3887            * @param {Object} resolution Set this to an object with two properties: <code>width</code> and
3888            * <code>height</code> (both numbers), such as <code>{width: 320, height: 240}</code>. Set this to
3889            * <code>null</code> to remove the preferred resolution, and the client will use the highest
3890            * resolution available.
3891            *
3892            * @see <a href="#setPreferredFrameRate">Subscriber.setPreferredFrameRate()</a>
3893            * @see <a href="Session.html#subscribe">Session.subscribe()</a>
3894            *
3895            * @method #setPreferredResolution
3896            * @memberOf Subscriber
3897            */(this||_global3).setPreferredResolution=e=>{if(W.isDestroyed()||0===getAllPeerConnections().length&&"Connecting"===!W.current){Ne.warn("Cannot set the max Resolution when not subscribing to a publisher");return}Ce.preferredResolution=e;if(ee.sessionInfo.p2pEnabled){Ne.warn("OT.Subscriber.setPreferredResolution will not work in a P2P Session");return}if(!W.isStreamAdded())return;const t=te.getPreferredResolution();const n=t&&e&&t.width===e.width&&t.height===e.height||!t&&!e;n||te.setPreferredResolution(e)};
3898/**
3899            * Sets the preferred frame rate of the subscriber's video.
3900            * <p>
3901            * Lowering the preferred frame rate
3902            * lowers video quality on the subscribing client, but it also reduces network and CPU usage.
3903            * You may want to use a lower frame rate for a subscriber to a stream that is less important
3904            * than other streams.
3905            * <p>
3906            * <p>
3907            * This method only applies when subscribing to a stream that uses the
3908            * <a href="https://tokbox.com/developer/guides/scalable-video">
3909            * scalable video feature</a>. Scalable video is available:
3910            * <ul>
3911            *   <li>
3912            *     Only in sessions that use the OpenTok Media Router (sessions with the
3913            *     <a href="https://tokbox.com/developer/guides/create-session/#media-mode">media
3914            *     mode</a> set to routed).
3915            *   </li>
3916            *   <li>
3917            *     Only for streams published by clients that support scalable video:
3918            *     clients that use the OpenTok iOS SDK (on certain devices), the OpenTok
3919            *     Android SDK (on certain devices), or OpenTok.js in Chrome and Safari.
3920            *   </li>
3921            * </ul>
3922            * <p>
3923            * In streams that do not use scalable video, calling this method has no effect.
3924            * <p>
3925            * <b>Note:</b> The frame rate for scalable video streams automatically adjusts for each
3926            * subscriber, based on network conditions and CPU usage, even if you do not call this method.
3927            * Call this method if you want to set a maximum frame rate for this subscriber.
3928            * <p>
3929            * Not every frame rate is available to a subscriber. When you set the preferred frame rate for
3930            * the subscriber, OpenTok.js picks the best frame rate available that matches your setting.
3931            * The frame rates available are based on the value of the Subscriber object's
3932            * <code>stream.frameRate</code> property, which represents the maximum value available for the
3933            * stream. The actual frame rates available depend, dynamically, on network and CPU resources
3934            * available to the publisher and subscriber.
3935            * <p>
3936            * You can set the initial preferred frame rate used by setting the <code>preferredFrameRate</code>
3937            * property of the <code>options</code> object you pass into the <code>Session.subscribe()</code>
3938            * method.
3939            *
3940            * @param {Number} frameRate Set this to the desired frame rate (in frames per second). Set this to
3941            * <code>null</code> to remove the preferred frame rate, and the client will use the highest
3942            * frame rate available.
3943            *
3944            * @see <a href="#setPreferredResolution">Subscriber.setPreferredResolution()</a>
3945            * @see <a href="Session.html#subscribe">Session.subscribe()</a>
3946            *
3947            * @method #setPreferredFrameRate
3948            * @memberOf Subscriber
3949            */(this||_global3).setPreferredFrameRate=e=>{if(W.isDestroyed()||0===getAllPeerConnections().length&&"Connecting"===!W.current){Ne.warn("Cannot set the max frameRate when not subscribing to a publisher");return}Ce.preferredFrameRate=e;if(ee.sessionInfo.p2pEnabled){Ne.warn("OT.Subscriber.setPreferredFrameRate will not work in a P2P Session");return}const t=te.getPreferredFrameRate();const n=e&&t&&t===e||!t&&!e;n||te.setPreferredFrameRate(e)};(this||_global3).isSubscribing=()=>W.isSubscribing();(this||_global3).isWebRTC=true;(this||_global3).isLoading=()=>j&&j.loading();(this||_global3).isAudioBlocked=()=>Boolean(j&&j.isAudioBlocked());(this||_global3).videoElement=()=>{const e=j&&j.video();return e?e.domElement():null};(this||_global3).videoWidth=()=>{const e=j&&j.video();return e?e.videoWidth():void 0};(this||_global3).videoHeight=()=>{const e=j&&j.video();return e?e.videoHeight():void 0};(this||_global3)._subscribeToSelf=(0,a.default)(i.default.mark((function _callee14(){var e;return i.default.wrap((function _callee14$(t){while(1)switch(t.prev=t.next){case 0:e=ee.getPublisherForStream(te);if(e&&e._.webRtcStream()){t.next=5;break}We.fail({payload:{reason:"streamNotFound"},error:Fe(ve.STREAM_DESTROYED,new Error("Tried to subscribe to a local publisher, but its stream no longer exists"))});t.next=14;break;case 5:D.resolve();t.prev=6;t.next=9;return Ge(e._.webRtcStream());case 9:t.next=14;break;case 11:t.prev=11;t.t0=t.catch(6);Ne.error(t.t0);case 14:case"end":return t.stop()}}),_callee14,null,[[6,11]])})));(this||_global3)._setupPeerConnection=function(){var e=(0,a.default)(i.default.mark((function _callee15(e){var n,r,o,a;return i.default.wrap((function _callee15$(i){while(1)switch(i.prev=i.next){case 0:n=e.send,r=e.log,o=e.logQoS,a=e.sourceStreamId;Ce.testNetwork&&O.setAudioVolume(0);0===getAllPeerConnections().length&&W.set("Connecting");Oe=a;N[a]=new t(((e,t)=>{ee._.getIceConfig().then((i=>{i.needRumorIceServersFallback&&(i.servers=[...Se||[],...i.servers||[]]);const s={iceConfig:i,subscriberId:O.widgetId,send:n,logAnalyticsEvent:r,p2p:ee.sessionInfo.p2pEnabled,sourceStreamId:a};Object.prototype.hasOwnProperty.call(Ce,"codecFlags")&&(s.codecFlags=Ce.codecFlags);const c=new Subscriber.SubscriberPeerConnection(s);c.once("iceConnected",D.resolve);c.once("error",D.reject);c.on("qos",o);setPeerConnectionEvents(c,a);c.init((n=>{n?t(n):e(c)}))}))}));return i.abrupt("return",N[a]);case 6:case"end":return i.stop()}}),_callee15)})));return function(t){return e.apply(this||_global3,arguments)}}();
3950/**
3951            * Restricts the frame rate of the Subscriber's video stream, when you pass in
3952            * <code>true</code>. When you pass in <code>false</code>, the frame rate of the video stream
3953            * is not restricted.
3954            * <p>
3955            * When the frame rate is restricted, the Subscriber video frame will update once or less per
3956            * second.
3957            * <p>
3958            * This feature is only available in sessions that use the OpenTok Media Router (sessions with
3959            * the <a href="http://tokbox.com/opentok/tutorials/create-session/#media-mode">media mode</a>
3960            * set to routed), not in sessions with the media mode set to relayed. In relayed sessions,
3961            * calling this method has no effect.
3962            * <p>
3963            * Restricting the subscriber frame rate has the following benefits:
3964            * <ul>
3965            *    <li>It reduces CPU usage.</li>
3966            *    <li>It reduces the network bandwidth consumed.</li>
3967            *    <li>It lets you subscribe to more streams simultaneously.</li>
3968            * </ul>
3969            * <p>
3970            * Reducing a subscriber's frame rate has no effect on the frame rate of the video in
3971            * other clients.
3972            *
3973            * @param {Boolean} value Whether to restrict the Subscriber's video frame rate
3974            * (<code>true</code>) or not (<code>false</code>).
3975            *
3976            * @return {Subscriber} The Subscriber object. This lets you chain method calls, as in the
3977            * following:
3978            *
3979            * <pre>mySubscriber.restrictFrameRate(false).subscribeToAudio(true);</pre>
3980            *
3981            * @method #restrictFrameRate
3982            * @memberOf Subscriber
3983            */(this||_global3).restrictFrameRate=e=>{Ne.debug(`OT.Subscriber.restrictFrameRate(${e})`);logAnalyticsEvent("restrictFrameRate",e.toString(),{streamId:te.id});ee.sessionInfo.p2pEnabled&&Ne.warn("OT.Subscriber.restrictFrameRate: Cannot restrictFrameRate on a P2P session");if("boolean"!==typeof e)Ne.error("OT.Subscriber.restrictFrameRate: expected a boolean value got a "+typeof e);else{ue=e;
3983te.setRestrictFrameRate(e)}return this||_global3};this.on("styleValueChanged",updateChromeForStyleChange,this||_global3);(this||_global3)._={getDataChannel(e,t,n){return(0,a.default)(i.default.mark((function _callee16(){return i.default.wrap((function _callee16$(r){while(1)switch(r.prev=r.next){case 0:if(getCurrentPeerConnection()){r.next=3;break}n(new He.Error("Cannot create a DataChannel before there is a publisher connection."));return r.abrupt("return");case 3:r.next=5;return getCurrentPeerConnection();case 5:r.sent.getDataChannel(e,t,n);case 6:case"end":return r.stop()}}),_callee16)})))()},iceRestart(e){return(0,a.default)(i.default.mark((function _callee17(){var t;return i.default.wrap((function _callee17$(n){while(1)switch(n.prev=n.next){case 0:n.next=2;return getPeerConnectionBySourceStreamId("MANTIS");case 2:t=n.sent;if(t){logResubscribe("Attempt",{reason:e});Ne.debug("Subscriber: iceRestart attempt");t.iceRestart()}else Ne.debug("Subscriber: Skipping ice restart, we have no peer connection");case 4:case"end":return n.stop()}}),_callee17)})))()},unblockAudio:()=>j&&j.unblockAudio(),webRtcStream:()=>$,privateEvents:new b,startRoutedToRelayedTransition(){return(0,a.default)(i.default.mark((function _callee18(){var e;return i.default.wrap((function _callee18$(t){while(1)switch(t.prev=t.next){case 0:if(!(Ce.testNetwork||isLocalStream(te,ee))){t.next=2;break}return t.abrupt("return");case 2:Ue("Attempt");t.next=5;return getPeerConnectionBySourceStreamId("MANTIS");case 5:e=t.sent;if(null==e?void 0:e.iceConnectionStateIsConnected()){t.next=9;break}Ue("Failure",{reason:"Attempted to transition to Relayed without being connected in Routed mode."});return t.abrupt("return");case 9:Re.subscriberCreate(te.id,A,at,"P2P",((e,t)=>{e&&!We.is("disconnected")&&Ue("Failure",e);Ne.debug("message received when created a subscriber with source",t)}));case 10:case"end":return t.stop()}}),_callee18)})))()},startRelayedToRoutedTransition(){return(0,a.default)(i.default.mark((function _callee19(){var e,t;return i.default.wrap((function _callee19$(n){while(1)switch(n.prev=n.next){case 0:if(!(Ce.testNetwork||isLocalStream(te,ee))){n.next=2;break}return n.abrupt("return");case 2:Ve("Attempt");e=P.MANTIS;$=e;n.next=7;return Pe(e);case 7:j.loading(false);De("P2P");Oe="MANTIS";removeWebRTCStream("P2P");n.next=13;return getCurrentPeerConnection();case 13:t=n.sent;createAudioLevelSampler(t);Ve("Success");case 16:case"end":return n.stop()}}),_callee19)})))()},setSinkId(e){const t=j&&j.video();if(t)return j.setSinkId(e);Ne.debug("Called setAudioOutputDevice on a subscriber without a video element")},pauseAndPlayVideoElement(){j&&j.pauseAndPlayVideoElement()}};W=new Ke(stateChangeFailed);Ne.debug(`OT.Subscriber: subscribe to ${te.id}`);W.set("Init");if(!te){Ne.error("OT.Subscriber: No stream parameter.");return false}J={updated:streamUpdated};te.on(J,this||_global3);Ce.name=Ce.name||te.name;Ce.classNames="OT_root OT_subscriber";Ce.style&&this.setStyle(Ce.style,null,true);re=le;Ce.subscribeToVideo=m(Ce.subscribeToVideo,true);Ce.subscribeToAudio=m(Ce.subscribeToAudio,true);this.subscribeToAudio(Ce.subscribeToAudio);this.setAudioVolume(determineAudioVolume(Ce));j=new Subscriber.WidgetView(e,(0,o.default)({},Ce,{widgetType:"subscriber"}));j.on("error",onVideoError);j.on("audioBlocked",(()=>this.trigger("audioBlocked")));j.on("audioUnblocked",(()=>this.trigger("audioUnblocked")));(this||_global3).id=j.domId();Q=j.domId();(this||_global3).element=j.domElement;j.on("videoElementCreated",(e=>{const t=new _e.VideoElementCreatedEvent(e);const n=this||_global3;X?this.dispatchEvent(t):this.once("loaded",(()=>{n.dispatchEvent(t)}))}));(this||_global3).element&&_createChrome.call(this||_global3);const nt=te.getChannelsOfType("audio");const ot=te.getChannelsOfType("video");const at=nt.map((e=>({id:e.id,type:e.type,active:Ce.subscribeToAudio}))).concat(ot.map((e=>{const t={id:e.id,type:e.type,active:Ce.subscribeToVideo,restrictFrameRate:void 0!==Ce.restrictFrameRate&&Ce.restrictFrameRate};void 0!==Ce.preferredFrameRate&&(t.preferredFrameRate=parseFloat(Ce.preferredFrameRate));void 0!==Ce.preferredHeight&&(t.preferredHeight=parseInt(Ce.preferredHeight,10));void 0!==Ce.preferredWidth&&(t.preferredWidth=parseInt(Ce.preferredWidth,10));return t})));const ct=!Ce.testNetwork&&isLocalStream(te,ee);We.beginConnect();if(ct){this._subscribeToSelf();return this||_global3}Re.subscriberCreate(te.id,A,at,null,((e,t)=>
3983{e&&!We.is("disconnected")&&onSubscriberCreateError(e);Se=st(t)}));return this||_global3};gt.hasAudioOutputLevelStatCapability=xe;gt.WidgetView=dt;gt.SubscriberPeerConnection=qe;return gt}}).call(this||_global3,n(0))},function(e,t,n){const r=n(2);e.exports=()=>["Chrome","Opera","Safari"].indexOf(r.name)>-1},function(e,t,n){const r=n(2),o=r.name;e.exports=()=>["Firefox","Safari","Edge","Chrome","Opera"].indexOf(o)>-1},function(e,t,n){const r=n(160)();const o="NotSubscribing";const i=["NotSubscribing","Init","Connecting","BindingRemoteStream","Subscribing","Failed","Destroyed"];const a={NotSubscribing:["NotSubscribing","Init","Destroyed"],Init:["NotSubscribing","Connecting","BindingRemoteStream","Destroyed"],Connecting:["NotSubscribing","BindingRemoteStream","Failed","Destroyed"],BindingRemoteStream:["NotSubscribing","Subscribing","Failed","Destroyed","BindingRemoteStream"],Subscribing:["NotSubscribing","Failed","Destroyed","BindingRemoteStream"],Failed:["Destroyed"],Destroyed:[]};const s=r(o,i,a);s.prototype.isDestroyed=function(){return"Destroyed"===(this||_global3).current};s.prototype.isFailed=function(){return"Failed"===(this||_global3).current};s.prototype.isSubscribing=function(){return"Subscribing"===(this||_global3).current};s.prototype.isAttemptingToSubscribe=function(){return-1!==["Init","Connecting","BindingRemoteStream"].indexOf((this||_global3).current)};s.prototype.isStreamAdded=function(){return"BindingRemoteStream"===(this||_global3).current||this.isSubscribing()};e.exports=s},function(e,t,n){var r=n(3);var o=r(n(25));e.exports=e=>{let t=e.socket,n=e.uri,r=e.content;return(e,i)=>t.send({uri:n,method:e,content:(0,o.default)({},r,i)})}},function(e,t,n){(function webpackUniversalModuleDefinition(t,n){true;e.exports=n()})(0,(function(){return function(e){var t={};function __webpack_require__(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:false,exports:{}};e[n].call(r.exports,r,r.exports,__webpack_require__);r.l=true;return r.exports}__webpack_require__.m=e;__webpack_require__.c=t;__webpack_require__.i=function(e){return e};__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{configurable:false,enumerable:true,get:n})};__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};__webpack_require__.d(t,"a",t);return t};__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=5)}([function(e,t,n){e.exports=function(e,t){var n,r,o;for(n=1;n<arguments.length;n++){r=arguments[n];for(o in r)r.hasOwnProperty(o)&&(e[o]=r[o])}return e}},function(e,t,n){var r=n(0);e.exports={build:function(e,t){var n,o,i,a=t.plugins;for(n=0,o=a.length;n<o;n++){i=a[n];i.methods&&r(e,i.methods);i.properties&&Object.defineProperties(e,i.properties)}},hook:function(e,t,n){var r,o,i,a,s=e.config.plugins,c=[e.context];n&&(c=c.concat(n));for(r=0,o=s.length;r<o;r++){a=s[r];i=s[r][t];i&&i.apply(a,c)}}}},function(e,t,n){function camelize(e){if(0===e.length)return e;var t,n,r=e.split(/[_-]/);if(1===r.length&&r[0][0].toLowerCase()===r[0][0])return e;n=r[0].toLowerCase();for(t=1;t<r.length;t++)n=n+r[t].charAt(0).toUpperCase()+r[t].substring(1).toLowerCase();return n}camelize.prepended=function(e,t){t=camelize(t);return e+t[0].toUpperCase()+t.substring(1)};e.exports=camelize},function(e,t,n){var r=n(0),o=n(2);function Config(e,t){e=e||{};(this||_global3).options=e;(this||_global3).defaults=t.defaults;(this||_global3).states=[];(this||_global3).transitions=[];(this||_global3).map={};(this||_global3).lifecycle=this.configureLifecycle();(this||_global3).init=this.configureInitTransition(e.init);(this||_global3).data=this.configureData(e.data);(this||_global3).methods=this.configureMethods(e.methods);(this||_global3).map[(this||_global3).defaults.wildcard]={};this.configureTransitions(e.transitions||[]);(this||_global3).plugins=this.configurePlugins(e.plugins,t.plugin)}r(Config.prototype,{addState:function(e){if(!(this||_global3).map[e]){(this||_global3).states.push(e);this.addStateLifecycleNames(e);(this||_global3).map[e]={}}},addStateLifecycleNames:function(e){(this||_global3).lifecycle.onEnter[e]=o.prepended("onEnter",e);(this||_global3).lifecycle.onLeave[e]=o.prepended("onLeave",e);(this||_global3).lifecycle.on[e]=o.prepended("on",e)},addTransition:function(e){if((this||_global3).transitions.indexOf(e)<0){(this||_global3).transitions.push(e);this.addTransitionLifecycleNames(e)}},addTransitionLifecycleNames:function(e){(this||_global3).lifecycle.onBefore[e]=o.prepended("onBefore",e);(this||_global3).lifecycle.onAfter[e]=o.prepended("onAfter",e);(this||_global3).lifecycle.on[e]=o.prepended("on",e)},mapTransition:function(e){var t=e.name,n=e.from,r=e.to;this.addState(n);"function"!==typeof r&&this.addState(r);this.addTransition(t);(this||_global3).map[n][t]=e;return e},configureLifecycle:function(){return{onBefore:{transition:"onBeforeTransition"},onAfter:{transition:"onAfterTransition"},onEnter:{state:"onEnterState"},onLeave:{state:"onLeaveState"},on:{transition:"onTransition"}}},configureInitTransition:function(e){if("string"===typeof e)return this.mapTransition(r({},(this||_global3).defaults.init,{to:e,active:true}));if("object"===typeof e)return this.mapTransition(r({},(this||_global3).defaults.init,e,{active:true}));this.addState((this||_global3).defaults.init.from);return(this||_global3).defaults.init},configureData:function(e){return"function"===typeof e?e:"object"===typeof e?function(){return e}:function(){return{}}},configureMethods:function(e){return e||{}},configurePlugins:function(e,t){e=e||[];var n,r,o;for(n=0,r=e.length;n<r;n++){o=e[n];"function"===typeof o&&(e[n]=o=o());o.configure&&o.configure(this||_global3)}return e},configureTransitions:function(e){var t,n,r,o,i,a=(this||_global3).defaults.wildcard;for(n=0;n<e.length;n++){r=e[n];o=Array.isArray(r.from)?r.from:[r.from||a];i=r.to||a;for(t=0;t<o.length;t++)this.mapTransition({name:r.name,from:o[t],to:i})}},transitionFor:function(e,t){var n=(this||_global3).defaults.wildcard;return(this||_global3).map[e][t]||(this||_global3).map[n][t]},transitionsFor:function(e){var t=(this||_global3).defaults.wildcard;return Object.keys((this||_global3).map[e]).concat(Object.keys((this||_global3).map[t]))},allStates:function(){return(this||_global3).states},allTransitions:function(){return(this||_global3).transitions}});e.exports=Config},function(e,t,n){var r=n(0),o=n(6),i=n(1),a=[null,[]];function JSM(e,t){(this||_global3).context=e;(this||_global3).config=t;(this||_global3).state=t.init.from;(this||_global3).observers=[e]}r(JSM.prototype,{init:function(e){r((this||_global3).context,(this||_global3).config.data.apply((this||_global3).context,e));i.hook(this||_global3,"init");if((this||_global3).config.init.active)return this.fire((this||_global3).config.init.name,[])},is:function(e){return Array.isArray(e)?e.indexOf((this||_global3).state)>=0:(this||_global3).state===e},isPending:function(){return(this||_global3).pending},can:function(e){return!this.isPending()&&!!this.seek(e)},cannot:function(e){return!this.can(e)},allStates:function(){return(this||_global3).config.allStates()},allTransitions:function(){return(this||_global3).config.allTransitions()},transitions:function(){return(this||_global3).config.transitionsFor((this||_global3).state)},seek:function(e,t){var n=(this||_global3).config.defaults.wildcard,r=(this||_global3).config.transitionFor((this||_global3).state,e),o=r&&r.to;return"function"===typeof o?o.apply((this||_global3).context,t):o===n?(this||_global3).state:o},fire:function(e,t){return this.transit(e,(this||_global3).state,this.seek(e,t),t)},transit:function(e,t,n,r){var o=(this||_global3).config.lifecycle,i=(this||_global3).config.options.observeUnchangedState||t!==n;if(!n)return(this||_global3).context.onInvalidTransition(e,t,n);if(this.isPending())return(this||_global3).context.onPendingTransition(e,t,n);(this||_global3).config.addState(n);this.beginTransit();r.unshift({transition:e,from:t,to:n,fsm:(this||_global3).context});return this.observeEvents([this.observersForEvent(o.onBefore.transition),this.observersForEvent(o.onBefore[e]),i?this.observersForEvent(o.onLeave.state):a,i?this.observersForEvent(o.onLeave[t]):a,this.observersForEvent(o.on.transition),i?["doTransit",[this||_global3]]:a,i?this.observersForEvent(o.onEnter.state):a,i?this.observersForEvent(o.onEnter[n]):a,i?this.observersForEvent(o.on[n]):a,this.observersForEvent(o.onAfter.transition),this.observersForEvent(o.onAfter[e]),this.observersForEvent(o.on[e])],r)},beginTransit:function(){(this||_global3).pending=true},endTransit:function(e){(this||_global3).pending=false;return e},failTransit:function(e){(this||_global3).pending=false;throw e},doTransit:function(e){(this||_global3).state=e.to},observe:function(e){if(2===e.length){var t={};t[e[0]]=e[1];(this||_global3).observers.push(t)}else(this||_global3).observers.push(e[0])},observersForEvent:function(e){var t,n=0,r=(this||_global3).observers.length,o=[];for(;n<r;n++){t=(this||_global3).observers[n];t[e]&&o.push(t)}return[e,o,true]},observeEvents:function(e,t,n,r){if(0===e.length)return this.endTransit(void 0===r||r);var o=e[0][0],a=e[0][1],s=e[0][2];t[0].event=o;o&&s&&o!==n&&i.hook(this||_global3,"lifecycle",t);if(0===a.length){e.shift();return this.observeEvents(e,t,o,r)}var c=a.shift(),l=c[o].apply(c,t);return l&&"function"===typeof l.then?l.then((this||_global3).observeEvents.bind(this||_global3,e,t,o)).catch((this||_global3).failTransit.bind(this||_global3)):false===l?this.endTransit(false):this.observeEvents(e,t,o,l)},onInvalidTransition:function(e,t,n){throw new o("transition is invali
3983d in current state",e,t,n,(this||_global3).state)},onPendingTransition:function(e,t,n){throw new o("transition is invalid while previous transition is still in progress",e,t,n,(this||_global3).state)}});e.exports=JSM},function(e,t,n){var r=n(0),o=n(2),i=n(1),a=n(3),s=n(4);var c={is:function(e){return(this||_global3)._fsm.is(e)},can:function(e){return(this||_global3)._fsm.can(e)},cannot:function(e){return(this||_global3)._fsm.cannot(e)},observe:function(){return(this||_global3)._fsm.observe(arguments)},transitions:function(){return(this||_global3)._fsm.transitions()},allTransitions:function(){return(this||_global3)._fsm.allTransitions()},allStates:function(){return(this||_global3)._fsm.allStates()},onInvalidTransition:function(e,t,n){return(this||_global3)._fsm.onInvalidTransition(e,t,n)},onPendingTransition:function(e,t,n){return(this||_global3)._fsm.onPendingTransition(e,t,n)}};var l={state:{configurable:false,enumerable:true,get:function(){return(this||_global3)._fsm.state},set:function(e){throw Error("use transitions to change state")}}};function StateMachine(e){return apply(this||_global3||{},e)}function factory(){var e,t;if("function"===typeof arguments[0]){e=arguments[0];t=arguments[1]||{}}else{e=function(){(this||_global3)._fsm.apply(this||_global3,arguments)};t=arguments[0]||{}}var n=new a(t,StateMachine);build(e.prototype,n);e.prototype._fsm.config=n;return e}function apply(e,t){var n=new a(t,StateMachine);build(e,n);e._fsm();return e}function build(e,t){if("object"!==typeof e||Array.isArray(e))throw Error("StateMachine can only be applied to objects");i.build(e,t);Object.defineProperties(e,l);r(e,c);r(e,t.methods);t.allTransitions().forEach((function(t){e[o(t)]=function(){return(this||_global3)._fsm.fire(t,[].slice.call(arguments))}}));e._fsm=function(){(this||_global3)._fsm=new s(this||_global3,t);(this||_global3)._fsm.init(arguments)}}StateMachine.version="3.0.1";StateMachine.factory=factory;StateMachine.apply=apply;StateMachine.defaults={wildcard:"*",init:{name:"init",from:"none"}};e.exports=StateMachine},function(e,t,n){e.exports=function(e,t,n,r,o){(this||_global3).message=e;(this||_global3).transition=t;(this||_global3).from=n;(this||_global3).to=r;(this||_global3).current=o}}])}))},function(e,t,n){const r=n(102)();e.exports=r},function(e,t,n){(function(t){
3984/**
3985         * promisify - Promisify a node style callback function into a promise
3986         *
3987         * Returns a promisifed version of the function, if it's callback is called
3988         * with a truthy error parameter the promise will be rejected. If the callback
3989         * is called with one argument, it's value will be resolved. If the callback
3990         * is called with multiple arguments, the promise will resolve to an array
3991         * of those arguments.
3992         *
3993         * @param {function} fn Function to promisify
3994         * @returns {function} Promise returning function
3995         */
3996e.exports=function promisify(e){return function promisified(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return new t(((t,n)=>{e(...r,(function(e){if(e)n(e);else{for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];1!==o.length?t(o):t(o[0])}}))}))}}}).call(this||_global3,n(0))},function(e,t,n){const r=n(15);const o=n(9);const i=n(682);const a=n(683);e.exports=function initPublisherFactory(e){void 0===e&&(e={});const t=e.Errors||n(4);const s=e.ExceptionCodes||n(8);const c=e.logging||n(1)("publisherInit");const l=e.otError||n(11)();const u=e.OTHelpers||n(5);const d=e.Publisher||n(168)();const f=e.sessionObjects||n(20);
3997/**
3998        * <p class="mSummary">
3999        *   Initializes and returns a Publisher object. You can then pass this Publisher
4000        *   object to <code>Session.publish()</code> to publish a stream to a session.
4001        * </p>
4002        * <p>
4003        *   <i>Note:</i> If you intend to reuse a Publisher object created using
4004        *   <code>OT.initPublisher()</code> to publish to different sessions sequentially,
4005        *   call either <code>Session.disconnect()</code> or <code>Session.unpublish()</code>.
4006        *   Do not call both. Then call the <code>preventDefault()</code> method of the
4007        *   <code>streamDestroyed</code> or <code>sessionDisconnected</code> event object to prevent the
4008        *   Publisher object from being removed from the page.
4009        * </p>
4010        *
4011        * @param {Object} targetElement (Optional) The DOM element or the <code>id</code> attribute of the
4012        * existing DOM element used to determine the location of the Publisher video in the HTML DOM. See
4013        * the <code>insertMode</code> property of the <code>properties</code> parameter. If you do not
4014        * specify a <code>targetElement</code>, the application appends a new DOM element to the HTML
4015        * <code>body</code>.
4016        *
4017        * <p>
4018        *       The application throws an error if an element with an ID set to the
4019        *       <code>targetElement</code> value does not exist in the HTML DOM.
4020        * </p>
4021        *
4022        * @param {Object}
4022 properties (Optional) This object contains the following properties (each of which
4023        * are optional):
4024        * </p>
4025        * <ul>
4026        * <li>
4027        *   <strong>audioBitrate</strong> (Number) &#151; The desired bitrate for the published audio,
4028        *   in bits per second. The supported range of values is 6,000 - 510,000. (Invalid values are
4029        *   ignored.) Set this value to enable high-quality audio (or to reduce bandwidth usage with
4030        *   lower-quality audio).
4031        *   <p>
4032        *   The following are recommended settings:
4033        *   <ul>
4034        *     <li>8,000 - 12,000 for narrowband (NB) speech</li>
4035        *     <li>16,000 - 20,000 for wideband (WB) speech</li>
4036        *     <li>28,000 - 40,000 for full-band (FB) speech</li>
4037        *     <li>48,000 - 64,000 for full-band (FB) music</li>
4038        *   </ul>
4039        *   </p>
4040        *   <p>
4041        *   The default value is 40,000.
4042        *   </p>
4043        *   <p>
4044        *     Currently, this setting is not supported in streams published in Firefox.
4045        *   </p>
4046        * </li>
4047        * <li>
4048        *   <strong>audioFallbackEnabled</strong> (Boolean) &#151; Whether the stream will use the
4049        *   audio-fallback feature (<code>true</code>) or not (<code>false</code>). The audio-fallback
4050        *   feature is available in sessions that use the OpenTok Media Router. With the audio-fallback
4051        *   feature enabled (the default), when the server determines that a stream's quality has degraded
4052        *   significantly for a specific subscriber, it disables the video in that subscriber in order to
4053        *   preserve audio quality. For streams that use a camera as a video source, the default setting is
4054        *   <code>true</code> (the audio-fallback feature is enabled). The default setting is
4055        *   <code>false</code> (the audio-fallback feature is disabled) for screen-sharing streams, which
4056        *   have the <code>videoSource</code> property set to <code>"application"</code>,
4057        *   <code>"screen"</code>, or <code>"window"</code> in the <code>OT.initPublisher()</code>
4058        *   options. For more information, see the Subscriber
4059        *   <a href="Subscriber.html#event:videoDisabled">videoDisabled</a> event and
4060        *   <a href="http://tokbox.com/opentok/tutorials/create-session/#media-mode">the OpenTok Media
4061        *   Router and media modes</a>.
4062        * </li>
4063        * <li>
4064        *   <strong>audioSource</strong> (String, MediaStreamTrack, Boolean, or null) &#151;
4065        *    The ID of the audio input device (such as a
4066        *    microphone) to be used by the publisher. You can obtain a list of available devices, including
4067        *    audio input devices, by calling the <a href="#getDevices">OT.getDevices()</a> method. Each
4068        *    device listed by the method has a unique device ID. If you pass in a device ID that does not
4069        *    match an existing audio input device, the call to <code>OT.initPublisher()</code> fails with an
4070        *    error (error code 1500, "Unable to Publish") passed to the completion handler function.
4071        *    <p>
4072        *    If you set this property to <code>null</code> or <code>false</code>, the browser does not
4073        *    request access to the microphone, and no audio is published.
4074        *    </p>
4075        *    <p>
4076        *    You can also set this property to an audio
4077        *    <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack">
4078        *    MediaStreamTrack</a> object. This lets you use the object as the audio source for
4079        *    the published stream. For example, you can get an array of audio MediaStreamTrack objects
4080        *    from the <code>audioTracks</code> property of an HTMLMediaElement object. Or you can call
4081        *    the <code>getLocalStreams()</code> or <code>getRemoteStreams()</code> method of an
4082        *    RTCPeerConnection object to get an array of MediaStream objects, and then call the
4083        *    <code>getAudioTracks()</code> method of one of the MediaStream objects to get an audio
4084        *    MediaStreamTrack object.
4085        *    </p>
4086        * </li>
4087        * <li>
4088        *   <strong>autoGainControl</strong> (Boolean) &#151; Whether to enable automatic gain control
4089        *   for the published audio. You may want to set
4090        *   this to <code>false</code> when publishing high-quality audio (by setting the
4091        *   <code>audioBitrate</code> property of the <code>OT.initPublisher()</code> options). The
4092        *   default value is <code>true</code>. This setting is ignored if you set <code>disableAudioProcessing</code>
4093        *   to <code>false</code> (which disables echo cancellation, automatic gain control, and n
4093oise suppression for
4094        *   the published stream).
4095        * </li>
4096        * <li>
4097        *   <strong>disableAudioProcessing</strong> (Boolean) &#151; Whether to disable echo cancellation,
4098        *   automatic gain control, and noise suppression for the published audio. You may want to set
4099        *   this to <code>true</code> when publishing high-quality audio (by setting the
4100        *   <code>audioBitrate</code> property of the <code>OT.initPublisher()</code> options). The
4101        *   default value is <code>false</code>.
4102        * </li>
4103        * <li>
4104        *   <strong>echoCancellation</strong> (Boolean) &#151; Whether to enable echo cancellation
4105        *   for the published audio. You may want to set
4106        *   this to <code>false</code> when publishing high-quality audio (by setting the
4107        *   <code>audioBitrate</code> property of the <code>OT.initPublisher()</code> options). The
4108        *   default value is <code>true</code>. This setting is ignored if you set <code>disableAudioProcessing</code>
4109        *   to <code>false</code> (which disables echo cancellation, automatic gain control, and noise suppression for
4110        *   the published stream).
4111        * </li>
4112        * <li>
4113        *   <strong>enableStereo</strong> (Boolean) &#151; Whether to publish stereo audio. The default
4114        *   value is <code>false</code>.
4115        *   <p>
4116        *   <i>Note:</i> Some browsers (such as Chome 73+) do not support
4117        *   echo cancellation for stereo audio (see <a target="_blank"
4118        *   href="https://bugs.chromium.org/p/webrtc/issues/detail?id=10465">this
4119        *   Chrome issue report</a>).
4120        * </li>
4121        * <li>
4122        *   <strong>enableDtx</strong> (Boolean) &#151; Whether to enable
4123        *   <a target="_blank" href="https://datatracker.ietf.org/doc/html/rfc7587#section-3.1.3">Opus DTX</a>. The default
4124        *   value is <code>false</code>. Setting this to <code>true</code> can reduce bandwidth usage
4125        *   in streams that have long periods of silence.
4126        * </li>
4127        * <li>
4128        *   <strong>facingMode</strong> (String) &#151; The preferred camera position to use for the
4129        *   video source. Generally, this setting only applies to mobile devices. This can be set to
4130        *   one of the following values:
4131        *   <p>
4132        *     <ul>
4133        *       <li>
4134        *         <code>"user"</code> &mdash; The front-facing camera.
4135        *       </li>
4136        *       <li>
4137        *         <code>"environment"</code> &mdash; The back camera.
4138        *       </li>
4139        *       <li>
4140        *         <code>"left"</code> &mdash; The camera facing the user but to the left
4141        *         (uncommon).
4142        *       </li>
4143        *       <li>
4144        *         <code>"right"</code> &mdash; The camera facing the user but to the right
4145        *         (uncommon).
4146        *       </li>
4147        *     </ul>
4148        *   </p>
4149        * </li>
4150        * <li>
4151        *   <strong>fitMode</strong> (String) &#151; Determines how the video is displayed if the its
4152        *     dimensions do not match those of the DOM element. You can set this property to one of the
4153        *     following values:
4154        *     <p>
4155        *     <ul>
4156        *       <li>
4157        *         <code>"cover"</code> &mdash; The video is cropped if its dimensions do not match those of
4158        *         the DOM element. This is the default setting for videos publishing a camera feed.
4159        *       </li>
4160        *       <li>
4161        *         <code>"contain"</code> &mdash; The video is letterboxed if its dimensions do not match
4162        *         those of the DOM element. This is the default setting for screen-sharing videos.
4163        *       </li>
4164        *     </ul>
4165        * </li>
4166        * <li>
4167        *   <strong>frameRate</strong> (Number) &#151; The desired frame rate, in frames per second,
4168        *   of the video. Valid values are 30, 15, 7, and 1. The published stream will use the closest
4169        *   value supported on the publishing client. The frame rate can differ slightly from the value
4170        *   you set, depending on the browser of the client. And the video will only use the desired
4171        *   frame rate if the client configuration supports it.
4172        *   <br><br><p>If the publisher specifies a frame rate, the actual frame rate of the video stream
4173        *   is set as the <code>frameRate</code> property of the Stream object, though the actual frame rate
4174        *   will vary based on changing network and system conditions. If the developer does not specify a
4175        *   frame rate, this property is undefined. Also, if the video source is a video MediaStreamTrack
4176        *   object (see the <code>videoSource</code>), this value is ignored and the frame rate is
4177        *   defined by the MediaStreamTrack object, which you can get by calling the
4178        *   <code>getConstraints()</code> method of the MediaStreamTrack object.
4179        *   </p>
4180        *   <p>
4181        *   For sessions that use the OpenTok Media Router (sessions with
4182        *   the <a href="http://tokbox.com/opentok/tutorials/create-session/#media-mode">media mode</a>
4183        *   set to routed, lowering the frame rate proportionally reduces the maximum bandwidth the stream
4184        *   uses. However, in sessions with the media mode set to relayed, lowering the frame rate does not
4185        *   reduce the stream's bandwidth.
4186        *   </p>
4187        *   <p>
4188        *   You can also restrict the frame rate of a Subscriber's video stream. To restrict the frame rate
4189        *   a Subscriber, call the <code>restrictFrameRate()</code> method of the subscriber, passing in
4190        *   <code>true</code>.
4191        *   (See <a href="Subscriber.html#restrictFrameRate">Subscriber.restrictFrameRate()</a>.)
4192        *   </p>
4193        * </li>
4194        * <li>
4195        *   <strong>height</strong> (Number or String) &#151; The desired initial height of the displayed Publisher
4196        *   video in the HTML page (default: 198 pixels). You can specify the number of pixels as either
4197        *   a number (such as 300) or a string ending in "px" (such as "300px"). Or you can specify a
4198        *   percentage of the size of the parent element, with a string ending in "%" (such as "100%").
4199        *   <i>Note:</i>
4199 To resize the publisher video, adjust the CSS of the publisher's DOM element
4200        *   (the <code>element</code> property of the Publisher object) or (if the height is specified as
4201        *   a percentage) its parent DOM element (see
4202        *   <a href="https://tokbox.com/developer/guides/customize-ui/js/#video_resize_reposition">Resizing
4203        *   or repositioning a video</a>).
4204        * </li>
4205        * <li>
4206        *   <strong>insertDefaultUI</strong> (Boolean) &#151; Whether to use the default OpenTok UI
4207        *   (<code>true</code>, the default) or not (<code>false</code>). The default UI element contains
4208        *   user interface controls, a video loading indicator, and automatic video cropping or
4209        *   letterboxing, in addition to the video. (If you leave <code>insertDefaultUI</code> set to
4210        *   <code>true</code>, you can control individual UI settings using the <code>fitMode</code>,
4211        *   <code>showControls</code>, and <code>style</code> options.)
4212        *   <p>
4213        *   If you set this option to <code>false</code>, OpenTok.js does not insert a default UI element
4214        *   in the HTML DOM, and the <code>element</code> property of the Publisher object is undefined.
4215        *   Instead, the Publisher object dispatches a
4216        *   <a href="Publisher.html#event:videoElementCreated">videoElementCreated</a> event when
4217        *   the <code>video</code> element (or in Internet Explorer the <code>object</code> element
4218        *   containing the video) is created. The <code>element</code> property of the event object is a
4219        *   reference to the Publisher's <code>video</code> (or <code>object</code>) element. Add it to
4220        *   the HTML DOM to display the video.
4221        *   <p>
4222        *   Set this option to <code>false</code> if you want to move the Publisher's <code>video</code>
4223        *   (or <code>object</code>) element in the HTML DOM.
4224        *   <p>
4225        *   If you set this to <code>false</code>, do not set the <code>targetElement</code> parameter.
4226        *   (This results in an error passed into to the <code>OT.initPublisher()</code> callback
4227        *   function.) To add the video to the HTML DOM, add an event listener for the
4228        *   <code>videoElementCreated</code> event, and then add the <code>element</code> property of
4229        *   the event object into the HTML DOM.
4230        * </li>
4231        * <li>
4232        *   <strong>insertMode</strong> (String) &#151; Specifies how the Publisher object will be
4233        *   inserted in the HTML DOM. See the <code>targetElement</code> parameter. This string can
4234        *   have the following values:
4235        *   <p>
4236        *   <ul>
4237        *     <li><code>"replace"</code> &#151; The Publisher object replaces contents of the
4238        *       targetElement. This is the default.</li>
4239        *     <li><code>"after"</code> &#151; The Publisher object is a new element inserted after
4240        *       the targetElement in the HTML DOM. (Both the Publisher and targetElement have the
4241        *       same parent element.)</li>
4242        *     <li><code>"before"</code> &#151; The Publisher object is a new element inserted before
4243        *       the targetElement in the HTML DOM. (Both the Publisher and targetElement have the same
4244        *       parent element.)</li>
4245        *     <li><code>"append"</code> &#151; The Publisher object is a new element added as a child
4246        *       of the targetElement. If there are other child elements, the Publisher is appended as
4247        *       the last child element of the targetElement.</li>
4248        *   </ul></p>
4249        * <li>
4250        *   <strong>maxResolution</strong> (Object) &#151; Sets the maximum resolution to stream.
4251        *   This setting only applies to when the <code>videoSource</code> property is set to
4252        *   <code>"application"</code>, <code>"screen"</code>, or <code>"window"</code>
4253        *   (when the publisher is screen-sharing). The resolution of the
4254        *   stream will match the captured screen region unless the region is greater than the
4255        *   <code>maxResolution</code> setting. Set this to an object that has two properties:
4256        *   <code>width</code> and <code>height</code> (both numbers). The maximum value for each of
4257        *   the <code>width</code> and <code>height</code> properties is 1920, and the minimum value
4258        *   is 10.
4259        * </li>
4260        * <li>
4261        *   <strong>mirror</strong> (Boolean) &#151; Whether the publisher's video image
4262        *   is mirrored in the publisher's page. The default value is <code>true</code>
4263        *   (the video image is mirrored), except for a screen-sharing video (when the
4264        *   <code>videoSource</code> property is set to <code>"application"</code>,
4265        *   <code>"screen"</code>, or <code>"window"</code>
4266        *   (in which case the default is <code>false</code>). This property
4267        *   does not affect the display on subscribers' views of the video.
4268        * </li>
4269        * <li>
4270        *   <strong>name</strong> (String) &#151; The name for this stream. The name appears at
4271        *   the bottom of Subscriber videos. The default value is "" (an empty string). Setting
4272        *   this to a string longer than 1000 characters results in an runtime exception.
4273        * </li>
4274        * <li>
4275        *   <strong>noiseSuppression</strong> (Boolean) &#151; Whether to enable noise suppression
4276        *   for the published audio. You may want to set
4277        *   this to <code>false</code> when publishing high-quality audio (by setting the
4278        *   <code>audioBitrate</code> property of the <code>OT.initPublisher()</code> options). The
4279        *   default value is <code>true</code>. This setting is ignored if you set <code>disableAudioProcessing</code>
4280        *   to <code>false</code> (which disables echo cancellation, automatic gain control, and n
4280oise suppression for
4281        *   the published stream).
4282        * </li>
4283        * <li>
4284        *   <strong>publishAudio</strong> (Boolean) &#151; Whether to initially publish audio
4285        *   for the stream (default: <code>true</code>). This setting applies when you pass
4286        *   the Publisher object in a call to the <code>Session.publish()</code> method.
4287        * </li>
4288        * <li>
4289        *   <strong>publishVideo</strong> (Boolean) &#151; Whether to initially publish video
4290        *   for the stream (default: <code>true</code>). This setting applies when you pass
4291        *   the Publisher object in a call to the <code>Session.publish()</code> method.
4292        * </li>
4293        * <li>
4294        *   <strong>resolution</strong> (String) &#151; The desired resolution of the video. The format
4295        *   of the string is <code>"widthxheight"</code>, where the width and height are represented in
4296        *   pixels. Valid values are <code>"1280x720"</code>, <code>"640x480"</code>, and
4297        *   <code>"320x240"</code>. The published video will only use the desired resolution if the
4298        *   client configuration supports it. Some browsers and clients do not support each of these
4299        *   resolution settings.
4300        *   <br><br><p>
4301        *   The requested resolution of a video stream is set as the <code>videoDimensions.width</code> and
4302        *   <code>videoDimensions.height</code> properties of the Stream object.
4303        *   </p>
4304        *   <p>
4305        *   The default resolution for a stream (if you do not specify a resolution) is 640x480 pixels.
4306        *   If the client system cannot support the resolution you requested, the stream will use the
4307        *   next largest setting supported.
4308        *   </p>
4309        *   <p>
4310        *   The actual resolution used by the Publisher is returned by the <code>videoHeight()</code> and
4311        *   <code>videoWidth()</code> methods of the Publisher object. The actual resolution of a
4312        *   Subscriber video stream is returned by the <code>videoHeight()</code> and
4313        *   <code>videoWidth()</code> properties of the Subscriber object. These may differ from the values
4314        *   of the <code>resolution</code> property passed in as the <code>properties</code> property of the
4315        *   <code>OT.initPublisher()</code> method, if the browser does not support the requested
4316        *   resolution, this value is ignored. Also, if the video source is a video MediaStreamTrack
4317        *   object (see the <code>videoSource</code>), this value is ignored and the resolution
4318        *   is defined by the MediaStreamTrack object, which you can get by calling the
4319        *   <code>getConstraints()</code> method of the MediaStreamTrack object.
4320        *   </p>
4321        * </li>
4322        * <li>
4323        *   <strong>showControls</strong> (Boolean) &#151; Whether to display the built-in user interface
4324        *   controls (default: <code>true</code>) for the Publisher. These controls include the name
4325        *   display, the audio level indicator, and the microphone control button. You can turn off all user
4326        *   interface controls by setting this property to <code>false</code>. You can control the display
4327        *   of individual user interface controls by leaving this property set to <code>true</code> (the
4328        *   default) and setting individual properties of the <code>style</code> property.
4329        * </li>
4330        * <li>
4331        *   <strong>style</strong> (Object) &#151; An object containing properties that define the initial
4332        *   appearance of user interface controls of the Publisher. The <code>style</code> object includes
4333        *   the following properties:
4334        *     <ul>
4335        *       <li><code>audioLevelDisplayMode</code> (String) &mdash; How to display the audio level
4336        *       indicator. Possible values are: <code>"auto"</code> (the indicator is displayed when the
4337        *       video is disabled), <code>"off"</code> (the indicator is not displayed), and
4338        *       <code>"on"</code> (the indicator is always displayed).</li>
4339        *
4340        *       <li><code>archiveStatusDisplayMode</code> (String) &mdash; How to display the archive status
4341        *       indicator. Possible values are: <code>"auto"</code> (the indicator is displayed when the
4342        *       session is being recorded), <code>"off"</code> (the indicator is not displayed). If you
4343        *       disable the archive status display indicator, you can display your own user interface
4344        *       notifications based on the <code>archiveStarted</code> and <code>archiveStopped</code>
4345        *       events dispatched by the Session object.</li>
4346        *
4347        *       <li><code>backgroundImageURI</code> (String) &mdash; A URI for an image to display as
4348        *       the background image when a video is not displayed. (A video may not be displayed if
4349        *       you call <code>publishVideo(false)</code> on the Publisher object). You can pass an http
4350        *       or https URI to a PNG, JPEG, or non-animated GIF file location. You can also use the
4351        *       <code>data</code> URI scheme (instead of http or https) and pass in base-64-encrypted
4352        *       PNG data, such as that obtained from the
4353        *       <a href="Publisher.html#getImgData">Publisher.getImgData()</a> method. (For example,
4354        *       you could set the property to a value returned by calling <code>getImgData()</code> on
4355        *       a previous Publisher object.) If the URL or the image data is invali
4355d, the property
4356        *       is ignored (the attempt to set the image fails silently).</li>
4357        *
4358        *       <li><code>buttonDisplayMode</code> (String) &mdash; How to display the microphone controls
4359        *       Possible values are: <code>"auto"</code> (controls are displayed when the stream is first
4360        *       displayed and when the user mouses over the display), <code>"off"</code> (controls are not
4361        *       displayed), and <code>"on"</code> (controls are always displayed).</li>
4362        *
4363        *       <li><code>nameDisplayMode</code> (String) &#151; Whether to display the stream name.
4364        *       Possible values are: <code>"auto"</code> (the name is displayed when the stream is first
4365        *       displayed and when the user mouses over the display), <code>"off"</code> (the name is not
4366        *       displayed), and <code>"on"</code> (the name is always displayed).</li>
4367        *   </ul>
4368        * </li>
4369        * <li>
4370        *   <strong>videoContentHint</strong> (String) &#151; Sets the content hint of
4371        *    the the video track of the publisher's stream. This allows browsers to use encoding
4372        *    or processing methods more appropriate to the type of content. You can set this to one of
4373        *    the following values:
4374        *    <p>
4375        *    <ul>
4376        *      <li>
4377        *        <code>""</code> &mdash; No hint is provided (the default).
4378        *      </li>
4379        *      <li>
4380        *        <code>"motion"</code> &mdash; The track should be treated as if it contains video
4381        *        where motion is important.
4382        *      </li>
4383        *      <li>
4384        *        <code>"detail"</code> &mdash; The track should be treated as if video details
4385        *        are extra important.
4386        *      </li>
4387        *      <li>
4388        *        <code>"text"</code> &mdash; The track should be treated as if text details are
4389        *        extra important.
4390        *      </li>
4391        *    </ul>
4392        *    </p>
4393        *    <p>
4394        *    You can read more about these options in the
4395        *    <a href="https://www.w3.org/TR/mst-content-hint/#video-content-hints">W3C Working Draft</a>.
4396        *    You may want to set the video content hint to optimize performance for screen-sharing
4397        *    videos. For example, you can set it to <code>"text"</code> when sharing a screen that contains
4398        *    a lot of text (such as a slideshow).
4399        *    </p>
4400        *    <p>
4401        *    Chrome 60+, Safari 12.1+, Edge 79+, and Opera 47+ support video content hints.
4402        *    </p>
4403        *    <p>
4404        *    Also see the <a href="Publisher.html#setVideoContentHint">Publisher.setVideoContentHint()</a> method.
4405        * </li>
4406        * <li>
4407        *   <strong>videoSource</strong> (String, MediaStreamTrack, Boolean, or null) &#151;
4408        *    The ID of the video input device (such as a
4409        *    camera) to be used by the publisher. You can obtain a list of available devices, including
4410        *    video input devices, by calling the <a href="#getDevices">OT.getDevices()</a> method. Each
4411        *    device listed by the method has a unique device ID. If you pass in a device ID that does not
4412        *    match an existing video input device, the call to <code>OT.initPublisher()</code> fails with an
4413        *    error (error code 1500, "Unable to Publish") passed to the completion handler function.
4414        *    <p>
4415        *    If you set this property to <code>null</code> or <code>false</code>, the browser does not
4416        *    request access to the camera, and no video is published. In a voice-only call, set this
4417        *    property to <code>null</code> or <code>false</code> for each Publisher.
4418        *    </p>
4419        *   <p>
4420        *    To publish a screen-sharing stream, set this property to <code>"screen"</code>.
4421        *    In older browser versions, you could also pass in <code>"application"</code> or
4422        *    <code>"window"</code> to specify a type of screen-sharing source. However, in current
4423        *    browsers that support screen sharing, passing in any of these values results in
4424        *    the same behavior &mdash; the browser displays a dialog box in which the end user
4425        *    selects the screen-sharing source (which can be the entire screen or a specific window).
4426        *    In Electron, screen sharing captures the entire screen, without prompting
4427        *    the user for permission. For screen-sharing streams, the following are
4428        *    default values for other properties: <code>audioFallbackEnabled == false</code>,
4429        *    <code>maxResolution == {width: 1920, height: 1920}</code>, <code>mirror == false</code>,
4430        *    <code>scaleMode == "fit"</code>. Also, the default <code>scaleMode</code> setting for
4431        *    subscribers to the stream is <code>"fit"</code>.
4432        *   </p>
4433        *   <p>
4434        *    You can also set this property to a video
4435        *    <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack">
4436        *    MediaStreamTrack</a> object. This lets you use the MediaStreamTrack object as the
4437        *    video source for the published stream. For example, you can get a CanvasCaptureMediaStream
4438        *    object by calling the <code>captureStream()</code> method of a HTMLCanvasElement, and then
4439        *    you can call the <code>getVideoTracks()</code> method of the CanvasCaptureMediaStream object
4440        *    to get a video MediaStreamTrack object. Or you can get an array of video MediaStreamTrack
4441        *    object from the <code>videoTracks</code> property of an HTMLMediaElement object. Or you can
4442        *    call the <code>getLocalStreams()</code> or <code>getRemoteStreams()</code> method of an
4443        *    RTCPeerConnection object to get an array of MediaStream objects, and then call the
4444        *    <code>getVideoTracks()</code> method of one of the MediaStream objects to get an array
4445        *    of video MediaStreamTrack objects. Note that by default the publisher uses a microphone
4446        *    as the audio source, so be sure to set the <code>audioSource</code> option if you want
4447        *    to use a MediaStreamTrack as the audio source or if you do not want to publish an audio
4448        *    track. The default <code>mirror</code> setting for a Publisher with a MediaStreamTrack video
4449        *    source is <code>false</code>. You can also call
4450        *    <a href="OT.html#getUserMedia">OT.getUserMedia()</a> to get a MediaStream object that uses
4451        *    the microphone and camera as the audio and video sources.
4452        *   </p>
4453        * </li>
4454        * <li>
4455        *   <strong>width</strong> (Number or String) &#151; The desired initial width of the displayed Publisher
4456        *   video in the HTML page (default: 264 pixels). You can specify the number of pixels as either
4457        *   a number (such as 400) or a string ending in "px" (such as "400px"). Or you can specify a
4458        *   percentage of the size of the parent element, with a string ending in "%" (such as "100%").
4459        *   <i>Note:</i>
4459 To resize the publisher video, adjust the CSS of the publisher's DOM element
4460        *   (the <code>element</code> property of the Publisher object) or (if the width is specified as
4461        *   a percentage) its parent DOM element (see
4462        *   <a href="https://tokbox.com/developer/guides/customize-ui/js/#video_resize_reposition">Resizing
4463        *   or repositioning a video</a>).
4464        * </li>
4465        * </ul>
4466        * @param {Function} completionHandler (Optional) A function to be called when the method succeeds
4467        * or fails in initializing a Publisher object. This function takes one parameter &mdash;
4468        * <code>error</code>. On success, the <code>error</code> object is set to <code>null</code>. On
4469        * failure, the <code>error</code> object has two properties: <code>code</code> (an integer) and
4470        * <code>message</code> (a string), which identify the cause of the failure. The method succeeds
4471        * when the user grants access to the camera and microphone. The method fails if the user denies
4472        * access to the camera and microphone. The <code>completionHandler</code> function is called
4473        * before the Publisher dispatches an <code>accessAllowed</code> (success) event or an
4474        * <code>accessDenied</code> (failure) event.
4475        * <p>
4476        * The following code adds a <code>completionHandler</code> when calling the
4477        * <code>OT.initPublisher()</code> method:
4478        * </p>
4479        * <pre>
4480        * var publisher = OT.initPublisher('publisher', null, function (error) {
4481        *   if (error) {
4482        *     console.log(error);
4483        *   } else {
4484        *     console.log("Publisher initialized.");
4485        *   }
4486        * });
4487        * </pre>
4488        *
4489        * @returns {Publisher} The Publisher object.
4490        * @see <a href="Session.html#publish">Session.publish()</a>
4491        * @method OT.initPublisher
4492        * @memberof OT
4493        */return function initPublisher(e,n,p){c.debug(`OT.initPublisher(${e})`);if("string"===typeof e&&!document.getElementById(e)){e=n;n=p;p=arguments[3]}if("function"===typeof e){p=e;n=void 0;e=void 0}else if(o(e)&&!u.isElementNode(e)){p=n;n=e;e=void 0}if("function"===typeof n){p=n;n=void 0}let g;if(n)if(o(n))false===n.insertDefaultUI&&e?g="You cannot specify a target element if insertDefaultUI is false":i(n.audioSource)&&i(n.videoSource)&&(g="You cannot specify both audioSource and videoSource as null or false");else{g="properties argument to Publisher constructor, if provided, should be an object";n=void 0}a(n);const h=new d(n||{});f.publishers.add(h);const b=function triggerCallback(){if(p&&r(p)){p(...arguments);p=void 0}};if(void 0!==g){c.error(g);b(l(t.INVALID_PARAMETER,new Error(g),s.INVALID_PARAMETER))}const v=function removeInitSuccessAndCallComplete(e){h.off("publishComplete",m);b(e)};let m=function removeHandlersAndCallComplete(e){h.off("initSuccess",v);e&&b(e)};h.once("initSuccess",v);h.once("publishComplete",m);h.publish(e);return h}}},function(e,t,n){(function(t){var r=n(3);var o=r(n(25));const i=n(41);const a=n(684);const s=n(9);const c=n(15);const l=n(7);const u=n(26);const d=n(6);const f=n(27);const p=n(44)();const g=n(74);const h=n(307);const b=n(686);const v=n(687);const m=n(138),_=m.prependProxyToUrlIfNeeded;const y=n(139),E=y.getProxyUrl;e.exports=function SessionFactory(e){void 0===e&&(e={});const r=e.adaptIceServers||n(100).adaptIceServers;
4494/** @type {AnalyticsHelper} */const m=e.AnalyticsHelper||f;const y=e.APIKEY||n(72);const S=e.Capabilities||n(169);const T=e.convertAnvilErrorCode||n(688);const C=e.convertRumorError||n(310);const w=e.Errors||n(4);const O=e.Events||n(22)();const x=e.Stream||n(170);const I=e.ExceptionCodes||n(8);const A=e.hasIceRestartsCapability||n(311);const R=e.logging||n(1)("Session");const k=e.otError||n(11)();const D=e.OTErrorClass||n(21);const N=e.OTHelpers||n(5);const P=n(689);
4495/** @type {typeof StaticConfigDefault} */const M=e.StaticConfig||p;
4496/** @type {StaticConfigDefault} */const L=e.staticConfig||M.onlyLocal();const j=e.Publisher||n(168)();const U=e.RaptorSocket||n(690).default();const F=e.SessionDispatcher||n(318);const V=e.sessionObjects||n(20);const B=e.sessionTag||n(317);const W=e.socketCloseCodes||n(76);const H=e.Subscriber||n(300)();const z=e.systemRequirements||n(152);const $=e.uuid||n(19);const G=v({otError:k});const q=e.global||(void 0!==typeof window?window:_global3);const Y=e.getSessionInfo||n(714)();const K=n(141);const J=e.initPublisher||n(308)({Publisher:j});const Z=function Session(e,n,f){var p=this||_global3;let v=void 0===f?{}:f,Z=v.iceConfig,X=v.connectionEventsSuppressed,Q=v.ipWhitelist,ee=void 0!==Q&&Q;const te=E();
4497/** @type AnalyticsHelperDefault */const ne=new m;const getStream=e=>"string"===typeof e?(this||_global3).streams.get(e)||{id:e}:e;d(this||_global3);(this||_global3)._tag=B;z.check()||z.upgrade();if(null==n){n=e;e=null}G(Z);(this||_global3).id=n;(this||_global3).sessionId=n;let re;
4498/** @type IntervalRunner | undefined */let oe;let ie;let ae;let se;let ce;let le;let ue;let de=true;let fe=false;let pe=e;const ge=this||_global3;let he=n;let be=$();let ve=$();let me=R;let _e=false;const ye=[];let Ee=null;let Se;let Te;let Ce;let we;const Oe=N.statable(this||_global3,["disconnected","connecting","connected","disconnecting"],"disconnected");(this||_global3).connection=null;(this||_global3).connections=new N.Collection;(this||_global3).streams=new N.Collection;(this||_global3).archives=new N.Collection;
4499/*
4500             * The sessionConnectFailed event handler
4501             * @param {Error}
4502             */const xe=function sessionConnectFailed(e){Oe("disconnected");e.code||(e.code=I.CONNECT_FAILED);me.error(`${e.name||"Unknown Error"}: ${e.message}`);D.handleJsException({error:e,target:this||_global3,analytics:ne});this.trigger("sessionConnectFailed",e)};const Ie=function sessionDisconnectedHandler(e){fe=false;const t=e.reason;this.logEvent("Connect","Disconnected",{reason:e.reason});const n=new O.SessionDisconnectEvent("sessionDisconnected",t.replace("networkTimedout","networkDisconnected"));this.isConnected()&&this.disconnect();Te();Se.call(this||_global3,t);setTimeout((()=>{this.dispatchEvent(n);Ce.call(this||_global3,n.reason);n.isDefaultPrevented()||we.call(this||_global3,n.reason)}))};const Ae=function connectionCreatedHandler(e){X||e.id.match(/^symphony\./)||this.dispatchEvent(new O.ConnectionEvent(u.CONNECTION_CREATED,e))};const Re=function connectionDestroyedHandler(e,t){e.id.match(/^symphony\./)||re&&e.
4502id===re.id()||this.dispatchEvent(new O.ConnectionEvent(u.CONNECTION_DESTROYED,e,t))};const ke=function streamCreatedHandler(e){!e||!e.connection||(this||_global3).connection&&e.connection.id===(this||_global3).connection.id||this.dispatchEvent(new O.StreamEvent(u.STREAM_CREATED,e,null,false))};const De=function streamPropertyModifiedHandler(e){const t=e.target;const n=e.changedProperty;let r=e.newValue;if("videoDisableWarning"!==n&&"audioDisableWarning"!==n){"videoDimensions"===n&&(r={width:r.width,height:r.height});this.dispatchEvent(new O.StreamPropertyChangedEvent(u.STREAM_PROPERTY_CHANGED,t,n,e.oldValue,r))}};const Ne=function streamDestroyedHandler(e,t){void 0===t&&(t="clientDisconnected");const n=new O.StreamEvent("streamDestroyed",e,t,true);const disconnectAndDestroySubscribers=()=>{V.subscribers.where({streamId:e.id}).filter((e=>e.session.id===(this||_global3).id&&e.stream)).forEach((e=>{e._disconnect({reason:t});n.isDefaultPrevented()||e._destroy({reason:t,noStateTransition:true})}))};e.connection.id===(this||_global3).connection.id?V.publishers.where({streamId:e.id}).forEach((function(n){n._.unpublishStreamFromSession(e,this||_global3,t)}),this||_global3):this.dispatchEvent(n);disconnectAndDestroySubscribers()};const Pe=function archiveCreatedHandler(e){this.dispatchEvent(new O.ArchiveEvent("archiveStarted",e))};const Me=function archiveDestroyedHandler(e){this.dispatchEvent(new O.ArchiveEvent("archiveDestroyed",e))};const Le=function archiveUpdatedHandler(e){const t=e.target;const n=e.changedProperty;const r=e.newValue;"status"===n&&"stopped"===r?this.dispatchEvent(new O.ArchiveEvent("archiveStopped",t)):this.dispatchEvent(new O.ArchiveEvent("archiveUpdated",t))};const gsmCallEndedHandler=()=>V.subscribers.forEach((e=>e._.pauseAndPlayVideoElement()));const je=function init(){ge.token=null;ie=null;Oe("disconnected");re=null;if(oe){oe.stop();oe=null}ge.connection=null;ge.capabilities=new S([]);ge.connections.destroy();ge.streams.destroy();ge.archives.destroy()};Te=function reset(){ve=$();je()};Se=function disconnectComponents(e){V.publishers.where({session:this||_global3}).forEach((t=>{t.disconnect(e)}));V.subscribers.where({session:this||_global3}).forEach((e=>{e._disconnect()}))};Ce=function destroyPublishers(e){V.publishers.where({session:this||_global3}).forEach((t=>{t._.streamDestroyed(e)}))};we=function destroySubscribers(e){V.subscribers.where({session:this||_global3}).forEach((t=>{t._destroy({reason:e})}))};const Ue=function connectMessenger(){me.debug("OT.Session: connecting to Raptor");const e=_((this||_global3).sessionInfo.messagingURL,te);const t=["forceMute","adaptive"];re=new U(ve,be,e,(this||_global3).sessionInfo.symphonyAddress,F(this||_global3,{connectionEventsSuppressed:X}),ne,t);
4503/**
4504               * Maps an error from RaptorSocket.connect to its corresponding name
4505               * @param {string} reason - Failure reason
4506               * @param {number} code - Error code
4507               * @return {string|undefined} Error name
4508               */function getErrorNameFromCode(e,t){let n;switch(e){case"WebSocketConnection":n=a(W.codes,(e=>e===t));if(n)return w[`SOCKET_${n}`];break;case"ConnectToSession":case"GetSessionState":switch(t){case I.CONNECT_FAILED:return w.CONNECT_FAILED;case I.UNEXPECTED_SERVER_RESPONSE:return w.UNEXPECTED_SERVER_RESPONSE;case I.CONNECTION_LIMIT_EXCEEDED:return w.CONNECTION_LIMIT_EXCEEDED;default:break}break;default:break}}re.connect(ie,(this||_global3).sessionInfo,{connectionEventsSuppressed:X},((e,t)=>{if(e){const t={};let n;if("ConnectToSession"===e.reason||"GetSessionState"===e.reason){const n=C(e);l(t,{originalMessage:e.message,originalCode:e.code});e.code=n.code;e.message=n.message}(e.code||e.message||e.reason)&&(n={failureCode:e.code,failureMessage:e.message,failureReason:e.reason,socketId:re.socketId});re=null;this.logConnectivityEvent("Failure",t,n);const r=getErrorNameFromCode(e.reason,e.code);r&&(e=k(r,new Error(e.message),e.code));xe.call(this||_global3,e);return}me.debug("OT.Session: Received session state from Raptor",t);(this||_global3).connection=(this||_global3).connections.get(re.id());(this||_global3).connection&&((this||_global3).capabilities=(this||_global3).connection.permissions);Oe("connected");this.logConnectivityEvent("Success",{connectionId:(this||_global3).connection.id});(this||_global3).connection.on("destroyed",Ie,this||_global3);this.dispatchEvent(new O.SessionConnectEvent(u.SESSION_CONNECTED));(this||_global3).connections.on({add:Ae,remove:Re},this||_global3);(this||_global3).streams.on({add:ke,remove:Ne,update:De},this||_global3);(this||_global3).archives.on({add:Pe,remove:Me,update:Le},this||_global3);(this||_global3).connections._triggerAddEvents();(this||_global3).streams._triggerAddEvents();(this||_global3).archives._triggerAddEvents();const n=N.env.isiOS&&N.env.iOSVersion>=13.3;n&&this.on("gsmCallEnded",gsmCallEndedHandler)}))};const permittedTo=e=>(this||_global3).capabilities.permittedTo(e);const dispatchOTError=(e,t)=>
4508{R.error(`${e.name}: ${e.message}`);"function"===typeof t&&t(e);D.handleJsException({error:e,target:this||_global3,analytics:ne})};const dispatchMuteError=e=>{const t=k(e.code,new Error(e.message),e.exceptionCode);dispatchOTError(t);return t};const checkMuteCapabilities=()=>this.isNot("connected")?dispatchMuteError(P.NOT_CONNECTED):permittedTo("forceMute")?null:dispatchMuteError(P.PERMISSION_DENIED);const handleMuteServerError=e=>"404"===e.code?dispatchMuteError(P.NOT_FOUND):"403"===e.code?dispatchMuteError(P.PERMISSION_DENIED):dispatchMuteError(P.UNEXPECTED_SERVER_RESPONSE);(this||_global3).reportIssue=e=>{let t=e.id;return h(ne.logEvent.bind(ne))({action:"ReportIssue",variation:"Event",connectionId:ve,payload:{reportIssueId:t}},null)};(this||_global3).logEvent=function(e,t,n,r){let o={action:e,variation:t,payload:n,sessionId:he,messagingServer:se,p2p:ae,partnerId:pe,connectionId:ve};r&&(o=l(r,o));ne.logEvent(o)};(this||_global3).logConfigurationFileEvent=function(e,t,n){void 0===t&&(t=null);void 0===n&&(n={});if("Attempt"===e)le=(new Date).getTime();else if("Failure"===e||"Success"===e){const e=(new Date).getTime()-le;l(n,{attemptDuration:e})}te&&(n.proxyUrl=te);this.logEvent("ConfigurationFile",e,t,(0,o.default)({},n))};(this||_global3).logConnectivityEvent=function(e,t,n){void 0===t&&(t=null);void 0===n&&(n={});te&&(n.proxyUrl=te);if("Attempt"===e){if(oe){oe.stop();R.error("_connectivityAttemptPinger should have been cleaned up")}ce=(new Date).getTime();oe=new g((()=>{this.logEvent("Connect","Attempting",t,(0,o.default)({},n))}),.2,6);oe.start()}if("Failure"===e||"Success"===e||"Cancel"===e){const logConnect=r=>{if(oe){oe.stop();oe=void 0}this.logEvent("Connect",e,t,(0,o.default)({},n,{attemptDuration:(new Date).getTime()-ce,iceConfig:r,ipWhitelist:ee}))};"Success"===e?(this||_global3)._.getIceConfig().then((e=>{const t={includeServers:Z&&Z.includeServers||"all",transportPolicy:e.transportPolicy};t.servers=e.servers?e.servers.map((e=>({url:e.urls}))):[];logConnect(t)})):logConnect()}else this.logEvent("Connect",e,t,n)};
4509/**
4510            * Connects to an OpenTok session.
4511            * <p>
4512            *  Upon a successful connection, the completion handler (the second parameter of the method) is
4513            *  invoked without an error object passed in. (If there is an error connecting, the completion
4514            *  handler is invoked with an error object.) Make sure that you have successfully connected to the
4515            *  session before calling other methods of the Session object.
4516            * </p>
4517            *  <p>
4518            *    The Session object dispatches a <code>connectionCreated</code> event when any client
4519            *    (including your own) connects to the session.
4520            *  </p>
4521            *
4522            *  <h5>
4523            *  Example
4524            *  </h5>
4525            *  <p>
4526            *  The following code initializes a session and sets up an event listener for when the session
4527            *  connects:
4528            *  </p>
4529            *  <pre>
4530            *  var apiKey = ""; // Replace with your API key. See https://tokbox.com/account
4531            *  var sessionID = ""; // Replace with your own session ID.
4532            *                      // See https://tokbox.com/developer/guides/create-session/.
4533            *  var token = ""; // Replace with a generated token.
4534            *                  // See https://tokbox.com/developer/guides/create-token/.
4535            *
4536            *  var session = OT.initSession(apiKey, sessionID);
4537            *  session.connect(token, function(error) {
4538            *    if (error) {
4539            *      console.log(error.message);
4540            *    } else {
4541            *      // You have connected to the session. You could publish a stream now.
4542            *    }
4543            *  });
4544            *  </pre>
4545            *  <p>
4546            *
4547            *  <h5>
4548            *  Events dispatched:
4549            *  </h5>
4550            *
4551            *  <p>
4552            *    <code>exception</code> (<a href="ExceptionEvent.html">ExceptionEvent</a>) &#151; Dispatched
4553            *    by the OT class locally in the event of an error.
4554            *  </p>
4555            *  <p>
4556            *    <code>connectionCreated</code>
4556 (<a href="ConnectionEvent.html">ConnectionEvent</a>) &#151;
4557            *      Dispatched by the Session object on all clients connected to the session.
4558            *  </p>
4559            *  <p>
4560            *    <code>sessionConnected</code> (<a href="SessionConnectEvent.html">SessionConnectEvent</a>)
4561            *      &#151; Dispatched locally by the Session object when the connection is established. However,
4562            *      you can pass a completion handler function in as the second parameter of the
4563            *      <code>connect()</code> and use this function instead of a listener for the
4564            *      <code>sessionConnected</code> event.
4565            *  </p>
4566            *
4567            * @param {String} token The session token. You generate a session token using our
4568            * <a href="https://tokbox.com/opentok/libraries/server/">server-side libraries</a> or at your
4569            * <a href="https://tokbox.com/account">TokBox account</a> page. For more information, see
4570            * <a href="https://tokbox.com/opentok/tutorials/create-token/">Connection token creation</a>.
4571            *
4572            * @param {Function} completionHandler (Optional) A function to be called when the call to the
4573            * <code>connect()</code> method succeeds or fails. This function takes one parameter &mdash;
4574            * <code>error</code> (see the <a href="Error.html">Error</a> object).
4575            * On success, the <code>completionHandler</code> function is not passed any
4576            * arguments. On error, the function is passed an <code>error</code> object parameter
4577            * (see the <a href="Error.html">Error</a> object). The
4578            * <code>error</code> object has two properties: <code>code</code> (an integer) and
4579            * <code>message</code> (a string), which identify the cause of the failure. The following
4580            * code adds a <code>completionHandler</code> when calling the <code>connect()</code> method:
4581            * <pre>
4582            * session.connect(token, function (error) {
4583            *   if (error) {
4584            *       console.log(error.message);
4585            *   } else {
4586            *     console.log("Connected to session.");
4587            *   }
4588            * });
4589            * </pre>
4590            * <p>
4591            * Note that upon connecting to the session, the Session object dispatches a
4592            * <code>sessionConnected</code> event in addition to calling the <code>completionHandler</code>.
4593            * The SessionConnectEvent object, which defines the <code>sessionConnected</code> event,
4594            * includes <code>connections</code> and <code>streams</code> properties, which
4595            * list the connections and streams in the session when you connect.
4596            * </p>
4597            *
4598            * @see SessionConnectEvent
4599            * @method #connect
4600            * @memberOf Session
4601            */(this||_global3).connect=function(){let r;for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];if(i.length>1&&("string"===typeof i[0]||"number"===typeof i[0])&&"string"===typeof i[1]){null==e&&(pe=i[0].toString());r=i[1]}else r=i[0];const l=i[i.length-1];if(p.is("connecting","connected")){me.warn(`OT.Session: Cannot connect, the session is already ${p.state}`);return p}ne.sessionInfo=new K;je();Oe("connecting");const u=ve;function checkInterrupted(){const e=ve!==u;e&&R.debug("Connection was interrupted");return e}p.token=!c(r)&&r;ie=!c(r)&&r;de?de=false:be=$();if(l&&c(l)){let e;const t=function onCompleteSuccess(){e();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];l(void 0,...n)};const n=function onCompleteFailure(){e();l(...arguments)};e=()=>{p.off("sessionConnected",t);p.off("sessionConnectFailed",n)};p.once("sessionConnected",t);p.once("sessionConnectFailed",n)}if(null==pe||c(pe)){setTimeout(xe.bind(p,k(w.AUTHENTICATION_ERROR,new Error("API Key is undefined. You must pass an API Key to initSession."),I.AUTHENTICATION_ERROR)));return p}if(!he||s(he)||Array.isArray(he)){let e;if(he){e="SessionID is not a string. You must use string as the session ID passed into OT.initSession().";he=he.toString()}else e="SessionID is undefined. You must pass a sessionID to initSession.";setTimeout(xe.bind(p,k(w.INVALID_SESSION_ID,new Error(e),I.INVALID_SESSION_ID)));p.logConnectivityEvent("Attempt");p.logConnectivityEvent("Failure",null,{failureReason:"ConnectToSession",failureCode:I.INVALID_SESSION_ID,failureMessage:e});return p}p.apiKey=pe.toString();pe=pe.toString();0===y.value.length&&(y.value=pe);const d=Boolean(M.onlyLocal().configUrl);const f=true===ee&&Boolean(M.onlyLocal().ipWhitelistConfigUrl);d||f?p.logConfigurationFileEvent("Attempt"):p.logConfigurationFileEvent("Event",{message:"No configUrl, using local config only"});const g=d||f?M.get({partnerId:pe,token:r,useIpWhitelistConfigUrl:f,proxyUrl:te}):t.resolve(M.onlyLocal());g.then((e=>{(d||f)&&p.logConfigurationFileEvent("Success");return e}),(e=>{(d||f)&&p.logConfigurationFileEvent("Failure",{failureMessage:e.message,failureStack:e.stack});return M.onlyLocal()})).then((e=>{p.staticConfig=e;ne.staticConfig=e;if(false===e.apiEnabled)throw k(w.API_KEY_DISABLED,new Error("The API KEY has been disabled. Access to the service is currently being restricted. Please contact support."));if(checkInterrupted())return;p.logConnectivityEvent("Attempt");te?p.logEvent("SessionInfo","Attempt",null,{proxyUrl:te}):p.logEvent("SessionInfo","Attempt");const onSessionInfoError=e=>{e.code=T(e.code);p.logConnectivityEvent("Failure",null,{failureReason:"GetSessionInfo",failureCode:e.code||"No code",failureMessage:e.message,failureName:e.name});e.name&&(e=k(e.name,new Error(`${e.message}${e.code?` (${e.code})`:""}`),e.code));xe.call(p,e)};const onSessionInfoSuccess=t=>{if(checkInterrupted())return;
4601if(t.partnerId&&t.partnerId!==pe){const e="Authentication Error: The API key does not match the token or session.";onSessionInfoError(k(w.AUTHENTICATION_ERROR,new Error(e),I.AUTHENTICATION_ERROR));return}ne.sessionInfo=t;const n={features:{reconnection:t.reconnection,renegotiation:A()&&t.renegotiation,simulcast:void 0!==t.simulcast&&(t.simulcast&&"Chrome"===N.env.name)}};te&&(n.proxyUrl=te);if(p.is("connecting")){p.sessionInfo=t;p._.setIceServers(p.sessionInfo.iceServers);ae=t.p2pEnabled;se=t.messagingServer;p.logEvent("SessionInfo","Success",null,n,{messagingServer:t.messagingServer});const r=e.sessionInfoOverrides;null!=r&&"object"===typeof r&&Object.keys(r).forEach((e=>{Object.defineProperty(p.sessionInfo,e,{value:r[e]})}));Ue.call(p)}};const t=_(e.apiUrl,te);return Y({anvilUrl:t,sessionId:n,token:ie,connectionId:ve,clientVersion:e.clientVersion}).then(onSessionInfoSuccess,onSessionInfoError)})).catch((e=>{xe.call(p,e)}));return p};(this||_global3).disconnect=function(){if(re&&re.isNot("disconnected")){if(re.isNot("disconnecting")){re.isNot("connecting")||this.logConnectivityEvent("Cancel");Oe("disconnecting");re.disconnect();this.off("gsmCallEnded",gsmCallEndedHandler)}}else Te()};(this||_global3).destroy=function(){(this||_global3).streams.destroy();(this||_global3).connections.destroy();(this||_global3).archives.destroy();this.disconnect()};
4602/**
4603            * The <code>publish()</code> method starts publishing an audio-video stream to the session.
4604            * The audio-video stream is captured from a local microphone and webcam. Upon successful
4605            * publishing, the Session objects on all connected clients dispatch the
4606            * <code>streamCreated</code> event.
4607            * </p>
4608            *
4609            * <!--JS-ONLY-->
4610            * <p>You pass a Publisher object as the one parameter of the method. You can initialize a
4611            * Publisher object by calling the <a href="OT.html#initPublisher">OT.initPublisher()</a>
4612            * method. Before calling <code>Session.publish()</code>.
4613            * </p>
4614            *
4615            * <p>This method takes an alternate form: <code>publish(targetElement: String | HTMLElement,
4616            * properties: Object, completionHandler: Function): Publisher</code> &#151; In this form, you do
4617            <i>not</i> pass a Publisher object into the function. Instead, you pass in a <code>targetElement</code>
4618            (the target HTML element or the ID of the target HTML element for the Publisher), an optional
4619            <code>properties</code> object that defines options for the Publisher (see
4620            <a href="OT.html#initPublisher">OT.initPublisher()</a>), and an optional completion handler function.
4621            * The method returns a new Publisher object, which starts sending an audio-video stream to the
4622            * session. The remainder of this documentation describes the form that takes a single Publisher
4623            * object as a parameter.
4624            *
4625            * <p>
4626            *   A local display of the published stream is created on the web page by replacing
4627            *         the specified element in the DOM with a streaming video display. The video stream
4628            *         is automatically mirrored horizontally so that users see themselves and movement
4629            *         in their stream in a natural way. If the width and height of the display do not match
4630            *         the 4:3 aspect ratio of the video signal, the video stream is cropped to fit the
4631            *         display.
4632            * </p>
4633            *
4634            * <p>
4635            *   If calling this method creates a new Publisher object and the OpenTok library does not
4636            *   have access to the camera or microphone, the web page alerts the user to grant access
4637            *   to the camera and microphone.
4638            * </p>
4639            *
4640            * <p>
4641            * The OT object dispatches an <code>exception</code> event if the user's role does not
4642            * include permissions required to publish. For example, if the user's role is set to subscriber,
4643            * then they cannot publish. You define a user's role when you create the user token
4644            * (see <a href="https://tokbox.com/developer/guides/create-token/">Token creation overview</a>).
4645            * You pass the token string as a parameter of the <code>connect()</code> method of the Session
4646            * object. See <a href="ExceptionEvent.html">ExceptionEvent</a> and
4647            * <a href="OT.html#on">OT.on()</a>.
4648            * </p>
4649            *     <p>
4650            *     The application throws an error if the session is not connected.
4651            *     </p>
4652            *
4653            * <h5>Events dispatched:</h5>
4654            * <p>
4655            * <code>exception</code> (<a href="ExceptionEvent.html">ExceptionEvent</a>) &#151; Dispatched
4656            * by the OT object. This can occur when user's role does not allow publishing (the
4657            * <code>code</code> property of event object is set to 1500); it can also occur if the
4658            * connection fails to connect (the <code>code</code> property of event object is set to 1013).
4659            * WebRTC is a peer-to-peer protocol, and it is possible that connections will fail to connect.
4660            * The most common cause for failure is a firewall that the protocol cannot traverse.</li>
4661            * </p>
4662            * <p>
4663            * <code>streamCreated</code> (<a href="StreamEvent.html">StreamEvent</a>) &#151;
4664            * The stream has been published. The Session object dispatches this on all clients
4665            * subscribed to the stream, as well as on the publisher's client.
4666            * </p>
4667            *
4668            * <h5>Example</h5>
4669            *
4670            * <p>
4671            *   The following example publishes a video once the session connects:
4672            * </p>
4673            * <pre>
4674            * var apiKey = ""; // Replace with your API key. See https://tokbox.com/account
4675            * var sessionId = ""; // Replace with your own session ID.
4676            *                     // https://tokbox.com/developer/guides/create-session/.
4677            * var token = ""; // Replace with a generated token that has been assigned the publish role.
4678            *                 // See https://tokbox.com/developer/guides/create-token/.
4679            * var session = OT.initSession(apiKey, sessionID);
4680            * session.connect(token, function(error) {
4681            *   if (error) {
4682            *     console.log(error.message);
4683            *   } else {
4684            *     var publisherOptions = {width: 400, height:300, name:"Bob's stream"};
4685            *     // This assumes that there is a DOM element with the ID 'publisher':
4686            *     publisher = OT.initPublisher('publisher', publisherOptions);
4687            *     session.publish(publisher);
4688            *   }
4689            * });
4690            * </pre>
4691            *
4692            * @param {Publisher} publisher A Publisher object, which you initialize by calling the
4693            * <a href="OT.html#initPublisher">OT.initPublisher()</a> method.
4694            *
4695            * @param {Function} completionHandler (Optional) A function to be called when the call to the
4696            * <code>publish()</code> method succeeds or fails. This function takes one parameter &mdash;
4697            * <code>error</code>. On success, the <code>completionHandler</code> function is not passed any
4698            * arguments. On error, the function is passed an <code>error</code> object parameter
4699            * (see the <a href="Error.html">Error</a> object). The
4700            * <code>error</code> object has two properties: <code>code</code> (an integer) and
4701            * <code>message</code> (a string), which identify the cause of the failure. Calling
4702            * <code>publish()</code> fails if the role assigned to your token is not "publisher" or
4703            * "moderator"; in this case the <code>error.name</code> property is set to
4704            * <code>"OT_PERMISSION_DENIED"</code>. Calling <code>publish()</code> also fails if the
4705            * client fails to connect; in this case the <code>error.name</code> property is set to
4706            * <code>"OT_NOT_CONNECTED"</code>. The following code adds a completion handler when
4707            * calling the <code>publish()</code> method:
4708            * <pre>
4709            * session.publish(publisher, null, function (error) {
4710            *   if (error) {
4711            *     console.log(error.message);
4712            *   } else {
4713            *     console.log("Publishing a stream.");
4714            *   }
4715            * });
4716            * </pre>
4717            *
4718            * @returns The Publisher object for this stream.
4719            *
4720            * @method #publish
4721            * @memberOf Session
4722            */(this||_global3).publish=function(e,t,n){if("function"===typeof e){n=e;e=void 0}if("function"===typeof t){n=t;t=void 0}n=n||function(){};if(this.isNot("connected")){ne.logError(1010,"OT.exception","We need to be connected before you can publish",null,{action:"Publish",variation:"Failure",failureReason:"unconnected",failureCode:I.NOT_CONNECTED,failureMessage:"We need to be connected before you can publish",sessionId:he,streamId:e&&e.stream?e.stream.id:null,p2p:(this||_global3).sessionInfo?(this||_global3).sessionInfo.p2pEnabled:void 0,messagingServer:(this||_global3).sessionInfo?(this||_global3).sessionInfo.messagingServer:null,partnerId:pe});dispatchOTError(k(w.NOT_CONNECTED,new Error("We need to be connected before you can publish"),I.NOT_CONNECTED),n);return null}if(!permittedTo("publish")){const e="This token does not allow publishing. The role must be at least `publisher` to enable this functionality";const t={failureReason:"Permission",failureCode:I.UNABLE_TO_PUBLISH,failureMessage:e};this.logEvent("Publish","Failure",null,t);dispatchOTError(k(w.PERMISSION_DENIED,new Error(e),I.UNABLE_TO_PUBLISH),n);return null}if(!e||"string"===typeof e||N.isElementNode(e))e=J(e,t);else{if(!(e instanceof j)){dispatchOTError(k(w.INVALID_PARAMETER,new Error("Session.publish :: First parameter passed in is neither a string nor an instance of the Publisher"),I.UNABLE_TO_PUBLISH),n);return}"session"in e&&e.session&&"sessionId"in e.session&&(e.session.sessionId===(this||_global3).sessionId?me.warn(`Cannot publish ${e.guid()} again to ${(this||_global3).sessionId}. Please call session.unpublish(publisher) first.`):me.warn(`Cannot publish ${e.guid()} publisher already attached to ${e.session.sessionId}. Please call session.unpublish(publisher) first.`))}_e&&e._.forceMuteAudio();e._.publishToSession(this||_global3,ne).catch((e=>{e.message=`Session.publish :: ${e.message}`;me.error(e.code,e.message);throw e})).then((()=>e)).then((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n(null,...t)}),(e=>n(e)));return e};
4723/**
4724            * Ceases publishing the specified publisher's audio-video stream
4725            * to the session. By default, the local representation of the audio-video stream is
4726            * removed from the web page. Upon successful termination, the Session object on every
4727            * connected web page dispatches
4728            * a <code>streamDestroyed</code> event.
4729            * </p>
4730            *
4731            * <p>
4732            * To prevent the Publisher from being removed from the DOM, add an event listener for the
4733            * <code>streamDestroyed</code> event dispatched by the Publisher object and call the
4734            * <code>preventDefault()</code> method of the event object.
4735            * </p>
4736            *
4737            * <p>
4738            * <i>Note:</i> If you intend to reuse a Publisher object created using
4739            * <code>OT.initPublisher()</code> to publish to different sessions sequentially, call
4740            * either <code>Session.disconnect()</code> or <code>Session.unpublish()</code>. Do not call
4741            * both. Then call the <code>preventDefault()</code> method of the <code>streamDestroyed</code>
4742            * or <code>sessionDisconnected</code> event object to prevent the Publisher object from being
4743            * removed from the page. Be sure to call <code>preventDefault()</code> only if the
4744            * <code>connection.connectionId</code> property of the Stream object in the event matches the
4745            * <code>connection.connectionId</code> property of your Session object (to ensure that you are
4746            * preventing the default behavior for your published streams, not for other streams that you
4747            * subscribe to).
4748            * </p>
4749            *
4750            * <h5>Events dispatched:</h5>
4751            *
4752            * <p>
4753            * <code>streamDestroyed</code> (<a href="StreamEvent.html">StreamEvent</a>) &#151;
4754            * The stream associated with the Publisher has been destroyed. Dispatched on by the
4755            * Publisher on on the Publisher's browser. Dispatched by the Session object on
4756            * all other connections subscribing to the publisher's stream.
4757            * </p>
4758            *
4759            * <h5>Example</h5>
4760            *
4761            * The following example publishes a stream to a session and adds a Disconnect link to the
4762            * web page. Clicking this link causes the stream to stop being published.
4763            *
4764            * <pre>
4765            * &lt;script&gt;
4766            *   var apiKey = ""; // Replace with your API key. See https://tokbox.com/account
4767            *   var sessionID = ""; // Replace with your own session ID.
4768            *                    // See https://tokbox.com/developer/guides/create-session/.
4769            *   var token = ""; // Replace with a generated token.
4770            *                   // See https://tokbox.com/developer/guides/create-token/.
4771            *   var publisher;
4772            *   var session = OT.initSession(apiKey, sessionID);
4773            *   session.connect(token, function(error) {
4774            *     if (error) {
4775            *       console.log(error.message);
4776            *     } else {
4777            *       // This assumes that there is a DOM element with the ID 'publisher':
4778            *       publisher = OT.initPublisher('publisher');
4779            *       session.publish(publisher);
4780            *     }
4781            *   });
4782            *
4783            *   function unpublish() {
4784            *     session.unpublish(publisher);
4785            *   }
4786            * &lt;/script&gt;
4787            *
4788            * &lt;body&gt;
4789            *
4790            *     &lt;div id="publisherContainer/&gt;
4791            *     &lt;br/&gt;
4792            *
4793            *     &lt;a href="javascript:unpublish()"&gt;Stop Publishing&lt;/a&gt;
4794            *
4795            * &lt;/body&gt;
4796            *
4797            * </pre>
4798            *
4799            * @see <a href="#publish">publish()</a>
4800            *
4801            * @see <a href="StreamEvent.html">streamDestroyed event</a>
4802            *
4803            * @param {Publisher} publisher</span> The Publisher object to stop streaming.
4804            *
4805            * @method #unpublish
4806            * @memberOf Session
4807            */(this||_global3).unpublish=function(e){e?e._.unpublishFromSession(this||_global3,"unpublished"):me.error("OT.Session.unpublish: publisher parameter missing.")};
4808/**
4809            * Subscribes to a stream that is available to the session. You can get an array of
4810            * available streams from the <code>streams</code> property of the <code>sessionConnected</code>
4811            * and <code>streamCreated</code> events (see
4812            * <a href="SessionConnectEvent.html">SessionConnectEvent</a> and
4813            * <a href="StreamEvent.html">StreamEvent</a>).
4814            * </p>
4815            * <p>
4816            * The subscribed stream is displayed on the local web page b
4816y replacing the specified element
4817            * in the DOM with a streaming video display. If the width and height of the display do not
4818            * match the 4:3 aspect ratio of the video signal, the video stream is cropped to fit
4819            * the display. If the stream lacks a video component, a blank screen with an audio indicator
4820            * is displayed in place of the video stream.
4821            * </p>
4822            *
4823            * <p>
4824            * The application throws an error if the session is not connected<!--JS-ONLY--> or if the
4825            * <code>targetElement</code> does not exist in the HTML DOM<!--/JS-ONLY-->.
4826            * </p>
4827            *
4828            * <h5>Example</h5>
4829            *
4830            * The following code subscribes to other clients' streams:
4831            *
4832            * <pre>
4833            * var apiKey = ""; // Replace with your API key. See https://tokbox.com/account
4834            * var sessionID = ""; // Replace with your own session ID.
4835            *                     // See https://tokbox.com/developer/guides/create-session/.
4836            * var token = ""; // Replace with a generated token.
4837            *                 // See https://tokbox.com/developer/guides/create-token/.
4838            *
4839            * var session = OT.initSession(apiKey, sessionID);
4840            * session.on("streamCreated", function(event) {
4841            *   subscriber = session.subscribe(event.stream, targetElement);
4842            * });
4843            * session.connect(token);
4844            * </pre>
4845            *
4846            * @param {Stream} stream The Stream object representing the stream to which we are trying to
4847            * subscribe.
4848            *
4849            * @param {Object} targetElement (Optional) The DOM element or the <code>id</code> attribute of
4850            * the existing DOM element used to determine the location of the Subscriber video in the HTML
4851            * DOM. See the <code>insertMode</code> property of the <code>properties</code> parameter. If
4852            * you do not specify a <code>targetElement</code>, the application appends a new DOM element
4853            * to the HTML <code>body</code>.
4854            *
4855            * @param {Object} properties This is an object that contains the following properties:
4856            *    <ul>
4857            *       <li><code>audioVolume</code> (Number) &#151; The desired audio volume, between 0 and
4858            *       100, when the Subscriber is first opened (default: 50). After you subscribe to the
4859            *       stream, you can adjust the volume by calling the
4860            *       <a href="Subscriber.html#setAudioVolume"><code>setAudioVolume()</code> method</a> of the
4861            *       Subscriber object. This volume setting affects local playback only; it does not affect
4862            *       the stream's volume on other clients.</li>
4863            *
4864            *       <li>
4865            *         <code>fitMode</code> (String) &#151; Determines how the video is displayed if the its
4866            *           dimensions do not match those of the DOM element. You can set this property to one of
4867            *           the following values:
4868            *           <p>
4869            *           <ul>
4870            *             <li>
4871            *               <code>"cover"</code> &mdash; The video is cropped if its dimensions do not match
4872            *               those of the DOM element. This is the default setting for videos that have a
4873            *               camera as the source (for Stream objects with the <code>videoType</code> property
4874            *               set to <code>"camera"</code>).
4875            *             </li>
4876            *             <li>
4877            *               <code>"contain"</code> &mdash; The video is letterboxed if its dimensions do not
4878            *               match those of the DOM element. This is the default setting for screen-sharing
4879            *               videos (for Stream objects with the <code>videoType</code> property set to
4880            *               <code>"screen"</code>).
4881            *             </li>
4882            *           </ul>
4883            *       </li>
4884            *
4885            *       <li>
4886            *       <code>height</code> (Number or String) &#151; The desired initial height of the displayed
4887            *       video in the HTML page (default: 198 pixels). You can specify the number of pixels as
4888            *       either a number (such as 300) or a string ending in "px" (such as "300px"). Or you can
4889            *       specify a percentage of the size of the parent element, with a string ending in "%"
4890            *       (such as "100%"). <i>Note:</i>
4890 To resize the video, adjust the CSS of the subscriber's
4891            *       DOM element (the <code>element</code> property of the Subscriber object) or (if the
4892            *       height is specified as a percentage) its parent DOM element (see
4893            *       <a href="https://tokbox.com/developer/guides/customize-ui/js/#video_resize_reposition">
4894            *       Resizing or repositioning a video</a>).
4895            *       </li>
4896            *       <li>
4897            *       <strong>insertDefaultUI</strong> (Boolean) &#151; Whether to use the default OpenTok UI
4898            *       (<code>true</code>, the default) or not (<code>false</code>). The default UI element
4899            *       contains user interface controls, a video loading indicator, and automatic video cropping
4900            *       or letterboxing, in addition to the video. (If you leave <code>insertDefaultUI</code>
4901            *       set to <code>true</code>, you can control individual UI settings using the
4902            *       <code>fitMode</code>, <code>showControls</code>, and <code>style</code> options.)
4903            *       <p>
4904            *       If you set this option to <code>false</code>, OpenTok.js does not insert a default UI
4905            *       element in the HTML DOM, and the <code>element</code> property of the Subscriber object is
4906            *       undefined. The Subscriber object dispatches a
4907            *       <a href="Subscriber.html#event:videoElementCreated">videoElementCreated</a> event when
4908            *       the <code>video</code> element (or in Internet Explorer the <code>object</code> element
4909            *       containing the video) is created. The <code>element</code> property of the event object
4910            *       is a reference to the Subscriber's <code>video</code> (or <code>object</code>) element.
4911            *       Add it to the HTML DOM to display the video.
4912            *       <p>
4913            *       Set this option to <code>false</code> if you want to move the Publisher's
4914            *       <code>video</code> element (or its <code>object</code> element in Internet Explorer) in
4915            *       the HTML DOM.
4916            *       <p>
4917            *       If you set this to <code>false</code>, do not set the <code>targetElement</code>
4918            *       parameter. (This results in an error passed into to the <code>OT.initPublisher()</code>
4919            *       callback function.) To add the video to the HTML DOM, add an event listener for the
4920            *       <code>videoElementCreated</code> event, and then add the <code>element</code> property of
4921            *       the event object into the HTML DOM.
4922            *       </li>
4923            *       <li>
4924            *         <code>insertMode</code> (String) &#151; Specifies how the Subscriber object will
4925            *         be inserted in the HTML DOM. See the <code>targetElement</code> parameter. This
4926            *         string can have the following values:
4927            *         <p>
4928            *         <ul>
4929            *           <li><code>"replace"</code> &#151; The Subscriber object replaces contents of the
4930            *             targetElement. This is the default.</li>
4931            *           <li><code>"after"</code> &#151; The Subscriber object is a new element inserted
4932            *             after the targetElement in the HTML DOM. (Both the Subscriber and targetElement
4933            *             have the same parent element.)</li>
4934            *           <li><code>"before"</code> &#151; The Subscriber object is a new element inserted
4935            *             before the targetElement in the HTML DOM. (Both the Subscriber and targetElement
4936            *             have the same parent element.)</li>
4937            *           <li><code>"append"</code> &#151; The Subscriber object is a new element added as a
4938            *             child of the targetElement. If there are other child elements, the Subscriber is
4939            *             appended as the last child element of the targetElement.</li>
4940            *         </ul></p>
4941            *   <li>
4942            *   <code>preferredFrameRate</code> (Number) &#151; The preferred frame rate of the subscriber's
4943            *   video. Lowering the preferred frame rate lowers video quality on the subscribing client,
4944            *   but it also reduces network and CPU usage. You may want to use a lower frame rate for
4945            *   subscribers to a stream that is less important than other streams.
4946            *   <p>
4947            *   This property only applies when subscribing to a stream that uses the
4948            *   <a href="https://tokbox.com/developer/guides/scalable-video">
4949            *   scalable video feature</a>. Scalable video is available:
4950            *   <ul>
4951            *   <li>
4952            *     Only in sessions that use the OpenTok Media Router (sessions with the
4953            *     <a href="https://tokbox.com/developer/guides/create-session/#media-mode">media
4954            *     mode</a> set to routed).
4955            *   </li>
4956            *   <li>
4957            *     Only for streams published by clients that support scalable video:
4958            *     clients that use the OpenTok iOS SDK (on certain devices), the OpenTok
4959            *     Android SDK (on certain devices), or OpenTok.js in Chrome and Safari.
4960            *   </li>
4961            *   </ul>
4962            *   <p>
4963            *   In streams that do not use scalable video, setting this property has no effect.
4964            *   <p>
4965            *   <b>Note:</b> The frame rate for scalable video streams automatically adjusts for each
4966            *   subscriber, based on network conditions and CPU usage, even if you do not call this method.
4967            *   Call this method if you want to set a maximum frame rate for this subscriber.
4968            *   <p>
4969            *   <p>
4970            *   Not every frame rate is available to a subscriber. When you set the preferred frame rate for
4971            *   the subscriber, OpenTok.js picks the best frame rate available that matches your setting.
4972            *   The frame rates available are based on the value of the Subscriber object's
4973            *   <code>stream.frameRate</code> property, which represents the maximum value available for the
4974            *   stream. The actual frame rates available depend, dynamically, on network and CPU resources
4975            *   available to the publisher and subscriber.
4976            *   <p>
4977            *   You can dynamically change the preferred frame rate used by calling the
4978            *   <code>setPreferredFrameRate()</code> method of the Subscriber object.
4979            *   </li>
4980            *   <li>
4981            *   <code>preferredResolution</code> (Object) &#151; The preferred resolution of the subscriber's
4982            *   video. Set this to an object with two properties: <code>width</code> and <code>height</code>
4983            *   (both numbers), such as <code>{width: 320, height: 240}</code>. Lowering the preferred video
4984            *   resolution lowers video quality on the subscribing client, but it also reduces network and CPU
4985            *   usage. You may want to use a lower resolution based on the dimensions of subscriber's video on
4986            *   the web page. You may want to use a resolution for subscribers to a stream that is less
4987            *   important (and smaller) than other streams.
4988            *   <p>
4989            *   This property only applies when subscribing to a stream that uses the
4990            *   <a href="https://tokbox.com/developer/guides/scalable-video">
4991            *   scalable video feature</a>. Scalable video is available:
4992            *   <ul>
4993            *   <li>
4994            *     Only in sessions that use the OpenTok Media Router (sessions with the
4995            *     <a href="https://tokbox.com/developer/guides/create-session/#media-mode">media
4996            *     mode</a> set to routed).
4997            *   </li>
4998            *   <li>
4999            *     Only for streams published by clients that support scalable video:
5000            *     clients that use the OpenTok iOS SDK (on certain devices), the OpenTok
5001            *     Android SDK (on certain devices), or OpenTok.js in Chrome and Safari.
5002            *   </li>
5003            *   </ul>
5004            *   <p>
5005            *   In streams that do not use scalable video, setting this property has no effect.
5006            *   <p>
5007            *   Not every resolution is available to a subscriber. When you set the preferred resolution,
5008            *   OpenTok.js and the video encoder pick the best resolution available that matches your
5009            *   setting. The resolutions available depend on the resolution of the published stream.
5010            *   The Subscriber object's <code>stream.resolution</code> property  represents the highest
5011            *   resolution available for the stream. Each of the resolutions available for a stream will use
5012            *   the same aspect ratio. The actual resolutions available depend, dynamically, on network
5013            *   and CPU resources available to the publisher and subscriber.
5014            *   <p>
5015            *   You can dynamically change the preferred video resolution used by calling the
5016            *   <code>setPreferredResolution()</code> method of the Subscriber object.
5017            *   </li>
5018            *   <li>
5019            *   <code>showControls</code> (Boolean) &#151; Whether to display the built-in user interface
5020            *   controls for the Subscriber (default: <code>true</code>). These controls include the name
5021            *   display, the audio level indicator, the speaker control button, the video disabled indicator,
5022            *   and the video disabled warning icon. You can turn off all user interface controls by setting
5023            *   this property to <code>false</code>. You can control the display of individual user interface
5024            *   controls by leaving this property set to <code>true</code> (the default) and setting
5025            *   individual properties of the <code>style</code> property.
5026            *   </li>
5027            *   <li>
5028            *   <code>style</code> (Object) &#151; An object containing properties that define the initial
5029            *   appearance of user interface controls of the Subscriber. The <code>style</code> object
5030            *   includes the following properties:
5031            *     <ul>
5032            *       <li><code>audioBlockedDisplayMode</code> (String) &mdash; Whether to display
5033            *       the default audio blocked icon in Subscribers (in browsers where audio
5034            *       autoplay is blocked). Possible values are: <code>"auto"</code> (the default,
5035            *       icon is displayed when the audio is disabled) and <code>"off"</code> (the icon
5036            *       is not displayed). Set this to <code>"off"</code> if you want to display
5037            *       your own UI element showing that the audio is blocked. In response to an
5038            *       HTML element dispatching a <code>click</code> event, you can call the
5039            *       <a href="OT.html#unblockAudio">OT.unblockAudio()</a> method to start audio
5040            *       playback in this and all other blocked subscribers.</li>
5041            *
5042            *       <li><code>audioLevelDisplayMode</code> (String) &mdash; How to display the audio level
5043            *       indicator. Possible values are: <code>"auto"</code> (the indicator is displayed when the
5044            *       video is disabled), <code>"off"</code> (the indicator is not displayed), and
5045            *       <code>"on"</code> (the indicator is always displayed).</li>
5046            *
5047            *       <li><code>backgroundImageURI</code> (String) &mdash; A URI for an image to display as
5048            *       the background image when a video is not displayed. (A video may not be displayed if
5049            *       you call <code>subscribeToVideo(false)</code> on the Subscriber object). You can pass an
5050            *       http or https URI to a PNG, JPEG, or non-animated GIF file location. You can also use the
5051            *       <code>data</code> URI scheme (instead of http or https) and pass in base-64-encrypted
5052            *       PNG data, such as that obtained from the
5053            *       <a href="Subscriber.html#getImgData">Subscriber.getImgData()</a> method. (For example,
5054            *       you could set the property to a value returned by calling <code>getImgData()</code> on
5055            *       a previous Subscriber object.) If the URL or the image data is invalid, the
5056            *       property is ignored (the attempt to set the image fails silently).</li>
5057            *
5058            *       <li><code>buttonDisplayMode</code> (String) &mdash; How to display the speaker controls
5059            *       Possible values are: <code>"auto"</code> (controls are displayed when the stream is first
5060            *       displayed and when the user mouses over the display), <code>"off"</code> (controls are not
5061            *       displayed), and <code>"on"</code> (controls are always displayed).</li>
5062            *
5063            *       <li><code>nameDisplayMode</code> (String) &#151; Whether to display the stream name.
5064            *       Possible values are: <code>"auto"</code> (the name is displayed when the stream is first
5065            *       displayed and when the user mouses over the display), <code>"off"</code> (the name is not
5066            *       displayed), and <code>"on"</code> (the name is always displayed).</li>
5067            *
5068            *       <li><code>videoDisabledDisplayMode</code> (String) &#151; Whether to display the video
5069            *       disabled indicator and video disabled warning icons for a Subscriber. These icons
5070            *       indicate that the video has been disabled (or is in risk of being disabled for
5071            *       the warning icon) due to poor stream quality. This style only applies to the Subscriber
5072            *       object. Possible values are: <code>"auto"</code> (the icons are automatically when the
5073            *       displayed video is disabled or in risk of being disabled due to poor stream quality),
5074            *       <code>"off"</code>
5074 (do not display the icons), and <code>"on"</code> (display the
5075            *       icons). The default setting is <code>"auto"</code></li>
5076            *   </ul>
5077            *   </li>
5078            *
5079            *       <li><code>subscribeToAudio</code> (Boolean) &#151; Whether to initially subscribe to audio
5080            *       (if available) for the stream (default: <code>true</code>).</li>
5081            *
5082            *       <li><code>subscribeToVideo</code> (Boolean) &#151; Whether to initially subscribe to video
5083            *       (if available) for the stream (default: <code>true</code>).</li>
5084            *
5085            *       <li><code>testNetwork</code> (Boolean) &#151; Whether, when subscribing to a stream
5086            *       published by the local client, you want to have the stream come from the OpenTok Media
5087            *       Router (<code>true</code>) or if you want the DOM to simply to display the local camera's
5088            *       video (<code>false</code>). Set this to <code>true</code> when you want to use the
5089            *       <a href="Subscriber.html#getStats">Subscriber.getStats()</a> method to check statistics
5090            *       for a stream you publish. This setting only applies to streams published by the local
5091            *       client in a session that uses the OpenTok Media Router (sessions with the
5092            *       <a href="http://tokbox.com/opentok/tutorials/create-session/#media-mode">media mode</a>
5093            *       set to routed), not in sessions with the media mode set to relayed. The default value is
5094            *       <code>false</code>.</li>
5095            *
5096            *       <li>
5097            *       <code>width</code> (Number or String) &#151; The desired initial width of the displayed
5098            *       video in the HTML page (default: 264 pixels). You can specify the number of pixels as
5099            *       either a number (such as 400) or a string ending in "px" (such as "400px"). Or you can
5100            *       specify a percentage of the size of the parent element, with a string ending in "%"
5101            *       (such as "100%"). <i>Note:</i> To resize the video, adjust the CSS of the subscriber's
5102            *       DOM element (the <code>element</code> property of the Subscriber object) or (if the
5103            *       width is specified as a percentage) its parent DOM element (see
5104            *       <a href="https://tokbox.com/developer/guides/customize-ui/js/#video_resize_reposition">
5105            *       Resizing or repositioning a video</a>).
5106            *       </li>
5107            *
5108            *    </ul>
5109            *
5110            * @param {Function} completionHandler (Optional) A function to be called when the call to the
5111            * <code>subscribe()</code> method succeeds or fails. This function takes one parameter &mdash;
5112            * <code>error</code>. On success, the <code>completionHandler</code> function is not passed any
5113            * arguments. On error, the function is passed an <code>error</code> object, defined by the
5114            * <a href="Error.html">Error</a> class, has two properties: <code>code</code> (an integer) and
5115            * <code>message</code> (a string), which identify the cause of the failure. The following
5116            * code adds a <code>completionHandler</code> when calling the <code>subscribe()</code> method:
5117            * <pre>
5118            * session.subscribe(stream, "subscriber", null, function (error) {
5119            *   if (error) {
5120            *     console.log(error.message);
5121            *   } else {
5122            *     console.log("Subscribed to stream: " + stream.id);
5123            *   }
5124            * });
5125            * </pre>
5126            *
5127            * @signature subscribe(stream, targetElement, properties, completionHandler)
5128            * @returns {Subscriber} The Subscriber object for this stream. Stream control functions
5129            * are exposed through the Subscriber object.
5130            * @method #subscribe
5131            * @memberOf Session
5132            */(this||_global3).subscribe=function(e,t,n,r){if("function"===typeof t){r=t;t=void 0;n=void 0}if("function"===typeof n){r=n;n=void 0}r=r||function(){};if(!(this||_global3).connection||!(this||_global3).connection.connectionId){dispatchOTError(k(w.NOT_CONNECTED,new Error("Session.subscribe :: Connection required to subscribe"),I.UNABLE_TO_SUBSCRIBE),r);return}if(!e){dispatchOTError(k(w.INVALID_PARAMETER,new Error("Session.subscribe :: stream cannot be null"),I.UNABLE_TO_SUBSCRIBE),r);return}if(!Object.prototype.hasOwnProperty.call(e,"streamId")){dispatchOTError(k(w.INVALID_PARAMETER,new Error("Session.subscribe :: invali
5132d stream object"),I.UNABLE_TO_SUBSCRIBE),r);return}if(n&&false===n.insertDefaultUI&&t){dispatchOTError(k(w.INVALID_PARAMETER,new Error("You cannot specify a target element if insertDefaultUI is false"),I.INVALID_PARAMETER),r);return}if(t&&false===t.insertDefaultUI){n=t;t=void 0}const o=new H(t,l(n||{},{stream:e,session:this||_global3,analytics:ne}),(e=>{e?dispatchOTError(e,r):r(null,o)}));V.subscribers.add(o);return o};
5133/**
5134            * Stops subscribing to a stream in the session. the display of the audio-video stream is
5135            * removed from the local web page.
5136            *
5137            * <h5>Example</h5>
5138            * <p>
5139            * The following code subscribes to other clients' streams. For each stream, the code also
5140            * adds an Unsubscribe link.
5141            * </p>
5142            * <pre>
5143            * var apiKey = ""; // Replace with your API key. See See https://tokbox.com/account
5144            * var sessionID = ""; // Replace with your own session ID.
5145            *                     // See https://tokbox.com/developer/guides/create-session/.
5146            * var token = ""; // Replace with a generated token.
5147            *                 // See https://tokbox.com/developer/guides/create-token/.
5148            * var streams = [];
5149            *
5150            * var session = OT.initSession(apiKey, sessionID);
5151            * session.on("streamCreated", function(event) {
5152            *     var stream = event.stream;
5153            *     displayStream(stream);
5154            * });
5155            * session.connect(token);
5156            *
5157            * function displayStream(stream) {
5158            *     var div = document.createElement('div');
5159            *     div.setAttribute('id', 'stream' + stream.streamId);
5160            *
5161            *     var subscriber = session.subscribe(stream, div);
5162            *     subscribers.push(subscriber);
5163            *
5164            *     var aLink = document.createElement('a');
5165            *     aLink.setAttribute('href', 'javascript: unsubscribe("' + subscriber.id + '")');
5166            *     aLink.innerHTML = "Unsubscribe";
5167            *
5168            *     var streamsContainer = document.getElementById('streamsContainer');
5169            *     streamsContainer.appendChild(div);
5170            *     streamsContainer.appendChild(aLink);
5171            *
5172            *     streams = event.streams;
5173            * }
5174            *
5175            * function unsubscribe(subscriberId) {
5176            *     console.log("unsubscribe called");
5177            *     for (var i = 0; i &lt; subscribers.length; i++) {
5178            *         var subscriber = subscribers[i];
5179            *         if (subscriber.id == subscriberId) {
5180            *             session.unsubscribe(subscriber);
5181            *         }
5182            *     }
5183            * }
5184            * </pre>
5185            *
5186            * @param {Subscriber} subscriber The Subscriber object to unsubcribe.
5187            *
5188            * @see <a href="#subscribe">subscribe()</a>
5189            *
5190            * @method #unsubscribe
5191            * @memberOf Session
5192            */(this||_global3).unsubscribe=function(e){if(!e){const e="OT.Session.unsubscribe: subscriber cannot be null";me.error(e);throw new Error(e)}if(!e.stream){me.warn("OT.Session.unsubscribe:: tried to unsubscribe a subscriber that had no stream");return false}me.debug(`OT.Session.unsubscribe: subscriber ${e.id}`);e._destroy({reason:"Unsubscribe"});return true};
5193/**
5194            * Returns an array of local Subscriber objects for a given stream.
5195            *
5196            * @param {Stream} stream The stream for which you want to find subscribers.
5197            *
5198            * @returns {Array} An array of {@link Subscriber} objects for the specified stream.
5199            *
5200            * @see <a href="#unsubscribe">unsubscribe()</a>
5201            * @see <a href="Subscriber.html">Subscriber</a>
5202            * @see <a href="StreamEvent.html">StreamEvent</a>
5203            * @method #getSubscribersForStream
5204            * @memberOf Session
5205            */(this||_global3).getSubscribersForStream=function(e){return V.subscribers.where({streamId:e.id})};
5206/**
5207            * Returns the local Publisher object for a given stream.
5208            *
5209            * @param { Stream } stream The stream for which you want to find the Publisher.
5210            *
5211            * @returns { Publisher } A Publisher object for the specified stream. Returns
5212            * <code>null</code> if there is no local Publisher object
5213            * for the specified stream.
5214            *
5215            * @see <a href="#forceUnpublish">forceUnpublish()</a>
5216            * @see <a href="Subscriber.html">Subscriber</a>
5217            * @see <a href="StreamEvent.html">StreamEvent</a>
5218            *
5219            * @method #getPublisherForStream
5220            * @memberOf Session
5221            */(this||_global3).getPublisherForStream=function(e){let t;let n;if("string"===typeof e)t=e;else{if("object"!==typeof e||!e||!Object.hasOwnProperty.call(e,"id")){n="Session.getPublisherForStream :: Invalid stream type";me.error(n);throw new Error(n)}t=e.id}return V.publishers.where({streamId:t})[0]};(this||_global3)._={getProxyUrl(){return te},isSocketReconnecting(){return fe},getSocket(){return re},reconnecting:function(){fe=true;this.dispatchEvent(new O.SessionReconnectingEvent)}.bind(this||_global3),reconnected:function(){fe=false;this.dispatchEvent(new O.SessionReconnectedEvent);if((this||_global3).sessionInfo.reconnection){V.publishers.where({session:this||_global3}
5221).forEach((e=>{e._.iceRestart()}));(this||_global3).sessionInfo.p2pEnabled||V.subscribers.where({session:this||_global3}).forEach((e=>{e._.iceRestart("socket reconnected")}))}}.bind(this||_global3),dispatchSignal:function(e,t,n){const r=new O.SignalEvent(t,n,e);r.target=this||_global3;this.trigger(u.SIGNAL,r);t&&this.dispatchEvent(r)}.bind(this||_global3),subscriberChannelUpdate(e,t,n,r){if(!re){me.warn("You are disconnected, cannot update subscriber properties ",r);return null}return re.subscriberChannelUpdate(e.id,t.widgetId,n.id,r)},streamCreate(e,t,n,r,o,i,a){re?re.streamCreate(e,t,n,r,o,void 0,i,a):me.warn("You are disconnected, cannot create stream ",t)},streamDestroy(e,t){re?re.streamDestroy(e,t):me.warn("You are disconnected, cannot destroy stream ",e)},streamChannelUpdate(e,t,n){re?re.streamChannelUpdate(e.id,t.id,n):me.warn("You are disconnected, cannot update stream properties ",n)},setSocket(e){re=e},setLogging(e){me=e},setState:Oe,setIceServers(e){e&&(ue={iceServers:r(e),timestamp:Date.now()})},getOtIceServerInfo(){const e=ue?Date.now()-ue.timestamp:Infinity;const r=864e5;const o=r-e;const i=3e5;if(o>i)return t.resolve({transportPolicy:ge&&ge.sessionInfo&&ge.sessionInfo.clientCandidates,servers:ue&&ue.iceServers});if(!ie)return t.resolve({transportPolicy:ge&&ge.sessionInfo&&ge.sessionInfo.clientCandidates,servers:[],needRumorIceServersFallback:true});const a=L.clientVersion;return Y({anvilUrl:((this||_global3).staticConfig||L).apiUrl,sessionId:n,token:ie,connectionId:ve,clientVersion:a}).then((e=>{ge._.setIceServers(e.iceServers);return ue?{transportPolicy:ge&&ge.sessionInfo&&ge.sessionInfo.clientCandidates,servers:ue&&ue.iceServers}:{transportPolicy:ge.sessionInfo.clientCandidates,servers:[],needRumorIceServersFallback:true}}))},getCodecFlags:()=>({h264:ge.sessionInfo.h264,vp9:ge.sessionInfo.vp9,vp8:ge.sessionInfo.vp8}),getVideoCodecsCompatible:e=>b({RTCPeerConnection:q.RTCPeerConnection,env:N.env,stream:e,codecFlags:ge._.getCodecFlags()}),getIceConfig:()=>{if(!Z)return ge._.getOtIceServerInfo();const e=(()=>Z&&"relay"===Z.transportPolicy?"relay":ge.sessionInfo.clientCandidates)();const n="custom"===Z.includeServers?t.resolve({servers:[]}):ge._.getOtIceServerInfo();return n.then((t=>l(t,{transportPolicy:e,servers:[...t.servers,...Z.customServers]})))},forceMute:function(e){this.dispatchEvent(new O.MuteForcedEvent(e))}.bind(this||_global3),enableMuteOnEntry:()=>{_e=true},addSubscriberToPeerConnectionsQueue:(e,t)=>{ye.push({pc:e,message:t});Ee||(Ee=setInterval((()=>{const e=ye.pop();if(e)e.pc.processMessage("offer",e.message);else{clearInterval(Ee);Ee=null}}),100))},disableMuteOnEntry:()=>{_e=false},privateEvents:new i};
5222/**
5223            * Sends a signal to each client or a specified client in the session. Specify a
5224            * <code>to</code> property of the <code>signal</code> parameter to limit the signal to
5225            * be sent to a specific client; otherwise the signal is sent to each client connected to
5226            * the session.
5227            * <p>
5228            * The following example sends a signal of type "foo" with a specified data payload ("hello")
5229            * to all clients connected to the session:
5230            * <pre>
5231            * session.signal({
5232            *     type: "foo",
5233            *     data: "hello"
5234            *   },
5235            *   function(error) {
5236            *     if (error) {
5237            *       console.log("signal error: " + error.message);
5238            *     } else {
5239            *       console.log("signal sent");
5240            *     }
5241            *   }
5242            * );
5243            * </pre>
5244            * <p>
5245            * Calling this method without specifying a recipient client (by setting the <code>to</code>
5246            * property of the <code>signal</code> parameter) results in multiple signals sent (one to each
5247            * client in the session). For information on charges for signaling, see the
5248            * <a href="http://tokbox.com/pricing">OpenTok pricing</a> page.
5249            * <p>
5250            * The following example sends a signal of type "foo" with a data payload ("hello") to a
5251            * specific client connected to the session:
5252            * <pre>
5253            * session.signal({
5254            *     type: "foo",
5255            *     to: recipientConnection; // a Connection object
5256            *     data: "hello"
5257            *   },
5258            *   function(error) {
5259            *     if (error) {
5260            *       console.log("signal error: " + error.message);
5261            *     } else {
5262            *       console.log("signal sent");
5263            *     }
5264            *   }
5265            * );
5266            * </pre>
5267            * <p>
5268            * Add an event handler for the <code>signal</code> event to listen for all signals sent in
5269            * the session. Add an event handler for the <code>signal:type</code> event to listen for
5270            * signals of a specified type only (replace <code>type</code>, in <code>signal:type</code>,
5271            * with the type of signal to listen for). The Session object dispatches these events. (See
5272            * <a href="#events">events</a>.)
5273            *
5274            * @param {Object} signal An object that contains the following properties defining the signal:
5275            * <ul>
5276            *   <li><code>data</code> &mdash; (String) The data to send. The limit to the length of data
5277            *     string is 8kB. Do not set the data string to <code>null</code> or
5278            *     <code>undefined</code>.</li>
5279            *   <li><code>retryAfterReconnect</code>&mdash; (Boolean) Upon reconnecting to the session,
5280            *     whether to send any signals that were initiated while disconnected. If your client loses its
5281            *     connection to the OpenTok session, due to a drop in network connectivity, the client
5282            *     attempts to reconnect to the session, and the Session object dispatches a
5283            *     <code>reconnecting</code> event. By default, signals initiated while disconnected are
5284            *     sent when (and if) the client reconnects to the OpenTok session. You can prevent this by
5285            *     setting the <code>retryAfterReconnect</code> property to <code>false</code>. (The default
5286            *     value is <code>true</code>.)
5287            *   <li><code>to</code> &mdash;
5287 (Connection) A <a href="Connection.html">Connection</a>
5288            *      object corresponding to the client that the message is to be sent to. If you do not
5289            *      specify this property, the signal is sent to all clients connected to the session.</li>
5290            *   <li><code>type</code> &mdash; (String) The type of the signal. You can use the type to
5291            *     filter signals when setting an event handler for the <code>signal:type</code> event
5292            *     (where you replace <code>type</code> with the type string). The maximum length of the
5293            *     <code>type</code> string is 128 characters, and it must contain only letters (A-Z and a-z),
5294            *     numbers (0-9), '-', '_', and '~'.</li>
5295            *   </li>
5296            * </ul>
5297            *
5298            * <p>Each property is optional. If you set none of the properties, you will send a signal
5299            * with no data or type to each client connected to the session.</p>
5300            *
5301            * @param {Function} completionHandler (Optional) A function that is called when sending the signal
5302            * succeeds or fails. This function takes one parameter &mdash; <code>error</code>.
5303            * On success, the <code>completionHandler</code> function is not passed any
5304            * arguments. On error, the function is passed an <code>error</code> object, defined by the
5305            * <a href="Error.html">Error</a> class. The <code>error</code> object has the following
5306            * properties:
5307            *
5308            * <ul>
5309            *   <li><code>code</code> &mdash; (Number) An error code, which can be one of the following:
5310            *     <table class="docs_table">
5311            *         <tr>
5312            *           <td>400</td> <td>One of the signal properties is invalid.</td>
5313            *         </tr>
5314            *         <tr>
5315            *           <td>404</td> <td>The client specified by the <code>to</code> property is not connected
5316            *                        to the session.</td>
5317            *         </tr>
5318            *         <tr>
5319            *           <td>413</td> <td>The <code>type</code> string exceeds the maximum length (128 bytes),
5320            *                        or the <code>data</code> string exceeds the maximum size (8 kB).</td>
5321            *         </tr>
5322            *         <tr>
5323            *           <td>500</td> <td>You are not connected to the OpenTok session.</td>
5324            *         </tr>
5325            *      </table>
5326            *   </li>
5327            *   <li><code>message</code> &mdash; (String) A description of the error.</li>
5328            * </ul>
5329            *
5330            * <p>Note that the <code>completionHandler</code> success result (<code>error == null</code>)
5331            * indicates that the options passed into the <code>Session.signal()</code> method are valid
5332            * and the signal was sent. It does <i>not</i> indicate that the signal was successfully
5333            * received by any of the intended recipients.
5334            *
5335            * @method #signal
5336            * @memberOf Session
5337            * @see <a href="#event:signal">signal</a> and <a href="#event:signal:type">signal:type</a> events
5338            */(this||_global3).signal=function(e,t){let n=e;let r=t||function(){};if(c(n)){r=n;n=null}if(this.isNot("connected")){const e="Unable to send signal - you are not connected to the session.";dispatchOTError(k(w.NOT_CONNECTED,new Error(e),500),r)}else{re.signal(n,(function(e){if(e){const t=getErrorNameFromCode(e.code);t&&(e=k(t,new Error(e.message),e.code));r(e)}else{for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];r(e,...n)}}),(this||_global3).logEvent);e&&e.data&&"string"!==typeof e.data&&me.warn("Signaling of anything other than Strings is deprecated. Please update the data property to be a string.")}function getErrorNameFromCode(e){switch(e){case 400:case 413:return w.INVALID_PARAMETER;case 429:return w.RATE_LIMIT_EXCEEDED;case 404:return w.NOT_FOUND;case 500:return w.NOT_CONNECTED;case 403:return w.PERMISSION_DENIED;case 2001:return w.UNEXPECTED_SERVER_RESPONSE;default:return}}};
5339/**
5340            *   Forces a remote connection to leave the session.
5341            *
5342            * <p>
5343            *   The <code>
5343forceDisconnect()</code> method is normally used as a moderation tool
5344            *        to remove users from an ongoing session.
5345            * </p>
5346            * <p>
5347            *   When a connection is terminated using the <code>forceDisconnect()</code>,
5348            *        <code>sessionDisconnected</code>, <code>connectionDestroyed</code> and
5349            *        <code>streamDestroyed</code> events are dispatched in the same way as they
5350            *        would be if the connection had terminated itself using the <code>disconnect()</code>
5351            *        method. However, the <code>reason</code> property of a {@link ConnectionEvent} or
5352            *        {@link StreamEvent} object specifies <code>"forceDisconnected"</code> as the reason
5353            *        for the destruction of the connection and stream(s).
5354            * </p>
5355            * <p>
5356            *   While you can use the <code>forceDisconnect()</code> method to terminate your own connection,
5357            *        calling the <code>disconnect()</code> method is simpler.
5358            * </p>
5359            * <p>
5360            *   The OT object dispatches an <code>exception</code> event if the user's role
5361            *   does not include permissions required to force other users to disconnect.
5362            *   You define a user's role when you create the user token (see the
5363            *   <a href="https://tokbox.com/developer/guides/create-token/">Token creation overview</a>).
5364            *   See <a href="ExceptionEvent.html">ExceptionEvent</a> and <a href="OT.html#on">OT.on()</a>.
5365            * </p>
5366            * <p>
5367            *   The application throws an error if the session is not connected.
5368            * </p>
5369            *
5370            * <h5>Events dispatched:</h5>
5371            *
5372            * <p>
5373            *   <code>connectionDestroyed</code> (<a href="ConnectionEvent.html">ConnectionEvent</a>) &#151;
5374            *     On clients other than which had the connection terminated.
5375            * </p>
5376            * <p>
5377            *   <code>exception</code> (<a href="ExceptionEvent.html">ExceptionEvent</a>) &#151;
5378            *     The user's role does not allow forcing other user's to disconnect (<code>event.code =
5379            *     1530</code>),
5380            *   or the specified stream is not publishing to the session (<code>event.code = 1535</code>).
5381            * </p>
5382            * <p>
5383            *   <code>sessionDisconnected</code>
5384            *   (<a href="SessionDisconnectEvent.html">SessionDisconnectEvent</a>) &#151;
5385            *     On the client which has the connection terminated.
5386            * </p>
5387            * <p>
5388            *   <code>streamDestroyed</code> (<a href="StreamEvent.html">StreamEvent</a>) &#151;
5389            *     If streams are stopped as a result of the connection ending.
5390            * </p>
5391            *
5392            * @param {Connection} connection The connection to be disconnected from the session.
5393            * This value can either be a <a href="Connection.html">Connection</a> object or a connection
5394            * ID (which can be obtained from the <code>connectionId</code> property of the Connection object).
5395            *
5396            * @param {Function} completionHandler (Optional) A function to be called when the call to the
5397            * <code>forceDiscononnect()</code> method succeeds or fails. This function takes one parameter
5398            * &mdash; <code>error</code>. On success, the <code>completionHandler</code> function is
5399            * not passed any arguments. On error, the function is passed an <code>error</code> object
5400            * parameter. The <code>error</code> object, defined by the <a href="Error.html">Error</a>
5401            * class, has two properties: <code>code</code> (an integer)
5402            * and <code>message</code> (a string), which identify the cause of the failure.
5403            * Calling <code>forceDisconnect()</code> fails if the role assigned to your
5404            * token is not "moderator"; in this case the <code>error.name</code> property is set to
5405            * <code>"OT_PERMISSION_DENIED"</code>. The following code adds a <code>completionHandler</code>
5406            * when calling the <code>
5406forceDisconnect()</code> method:
5407            * <pre>
5408            * session.forceDisconnect(connection, function (error) {
5409            *   if (error) {
5410            *     console.log(error);
5411            *   } else {
5412            *     console.log("Connection forced to disconnect: " + connection.id);
5413            *   }
5414            * });
5415            * </pre>
5416            *
5417            * @method #forceDisconnect
5418            * @memberOf Session
5419            */(this||_global3).forceDisconnect=function(e,t){if(this.isNot("connected")){const e="Cannot call forceDisconnect(). You are not connected to the session.";dispatchOTError(k(w.NOT_CONNECTED,new Error(e),I.NOT_CONNECTED),t);return}const n="string"===typeof e?e:e.id;const r="Invalid Parameter. Check that you have passed valid parameter values into the method call.";if(!n){dispatchOTError(k(w.INVALID_PARAMETER,new Error(r),I.INVALID_PARAMETER),t);return}const o="This token does not allow forceDisconnect. The role must be at least `moderator` to enable this functionality";permittedTo("forceDisconnect")?re.forceDisconnect(n,(function(e){if(e)dispatchOTError(k(w.INVALID_PARAMETER,new Error(r),I.INVALID_PARAMETER),t);else if(t&&c(t)){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];t(e,...o)}})):dispatchOTError(k(w.PERMISSION_DENIED,new Error(o),I.UNABLE_TO_FORCE_DISCONNECT),t)};
5420/**
5421            * Forces the publisher of the specified stream to stop publishing the stream.
5422            *
5423            * <p>
5424            * Calling this method causes the Session object to dispatch a <code>streamDestroyed</code>
5425            * event on all clients that are subscribed to the stream (including the client that is
5426            * publishing the stream). The <code>reason</code> property of the StreamEvent object is
5427            * set to <code>"forceUnpublished"</code>.
5428            * </p>
5429            * <p>
5430            * The OT object dispatches an <code>exception</code> event if the user's role
5431            * does not include permissions required to force other users to unpublish.
5432            * You define a user's role when you create the user token (see the
5433            * <a href="https://tokbox.com/developer/guides/create-token/">Token creation overview</a>).
5434            * You pass the token string as a parameter of the <code>connect()</code> method of the Session
5435            * object. See <a href="ExceptionEvent.html">ExceptionEvent</a> and
5436            * <a href="OT.html#on">OT.on()</a>.
5437            * </p>
5438            *
5439            * <h5>Events dispatched:</h5>
5440            *
5441            * <p>
5442            *   <code>exception</code> (<a href="ExceptionEvent.html">ExceptionEvent</a>) &#151;
5443            *     The user's role does not allow forcing other users to unpublish.
5444            * </p>
5445            * <p>
5446            *   <code>streamDestroyed</code> (<a href="StreamEvent.html">StreamEvent</a>) &#151;
5447            *     The stream has been unpublished. The Session object dispatches this on all clients
5448            *     subscribed to the stream, as well as on the publisher's client.
5449            * </p>
5450            *
5451            * @param {Stream} stream The stream to be unpublished.
5452            *
5453            * @param {Function} completionHandler (Optional) A function to be called when the call to the
5454            * <code>forceUnpublish()</code> method succeeds or fails. This function takes one parameter
5455            * &mdash; <code>error</code>. On success, the <code>completionHandler</code> function is
5456            * not passed any arguments. On error, the function is passed an <code>error</code> object
5457            * parameter. The <code>error</code> object, defined by the <a href="Error.html">Error</a>
5458            * class, has two properties: <code>code</code> (an integer)
5459            * and <code>message</code> (a string), which identify the cause of the failure. Calling
5460            * <code>forceUnpublish()</code> fails if the role assigned to your token is not "moderator";
5461            * in this case the <code>error.name</code> property is set to <code>"OT_PERMISSION_DENIED"</code>.
5462            * The following code adds a completion handler when calling the <code>
5462forceUnpublish()</code>
5463            * method:
5464            * <pre>
5465            * session.forceUnpublish(stream, function (error) {
5466            *   if (error) {
5467            *       console.log(error);
5468            *     } else {
5469            *       console.log("Connection forced to disconnect: " + connection.id);
5470            *     }
5471            *   });
5472            * </pre>
5473            *
5474            * @method #forceUnpublish
5475            * @memberOf Session
5476            */(this||_global3).forceUnpublish=function(e,t){void 0===t&&(t=()=>{});const dispatchError=e=>dispatchOTError(k(e.name,new Error(e.msg),e.code),t);const n={msg:"Invalid Parameter. Check that you have passed valid parameter values into the method call.",code:I.INVALID_PARAMETER,name:w.INVALID_PARAMETER};const r={msg:"Cannot call forceUnpublish(). You are not connected to the session.",code:I.NOT_CONNECTED,name:w.NOT_CONNECTED};const o={msg:"This token does not allow forceUnpublish. The role must be at least `moderator` to enable this functionality",code:I.UNABLE_TO_FORCE_UNPUBLISH,name:w.PERMISSION_DENIED};const i={msg:"The stream does not exist.",name:w.NOT_FOUND};const a={msg:"An unexpected error occurred.",name:w.UNEXPECTED_SERVER_RESPONSE,code:I.UNEXPECTED_SERVER_RESPONSE};if(!e){dispatchError(n);return}if(p.isNot("connected")){dispatchError(r);return}const s=getStream(e);permittedTo("forceUnpublish")?re.forceUnpublish(s.id,(e=>{e?"404"===e.code?dispatchError(i):"403"===e.code?dispatchError(o):dispatchError(a):t(null)})):dispatchError(o)};
5477/**
5478            * Forces a the publisher of a specified stream to mute its audio.
5479            *
5480            * <p>
5481            * Calling this method causes the Publisher object in the client publishing the
5482            * stream to dispatch a <code>muteForced</code> event.
5483            * </p>
5484            *
5485            * <p>
5486            * Check the <code>capabilities.canForceMute</code> property of the Session object to see if
5487            * you can call this function successfully. This is reserved for clients that have connected
5488            * with a token that has been assigned the moderator role (see the
5489            * <a href="https://tokbox.com/developer/guides/create-token/">Token Creation</a>
5490            * documentation).
5491            *
5492            * @param { Stream } stream The stream to be muted.
5493            *
5494            * @method #forceMuteStream
5495            * @memberOf Session
5496            * @see <a href="Session.htmll#properties">Session.capabilities</a>
5497            *
5498            * @return {Promise} A promise that resolves with no value when the operation
5499            * completes successfully. The promise is rejected if there is an error. The
5500            * <code>name</code> property of the Error object is set to one of the following
5501            * values, depending the type of error:
5502            *
5503            * <p>
5504            * <ul>
5505            *
5506            *   <li><code>'OT_NOT_CONNECTED'</code> &mdash; The client is not connect to the session.</li>
5507            *
5508            *   <li><code>'OT_INVALID_PARAMETER'</code> &mdash; if one or more of the passed parameters are invalid.</li>
5509            *
5510            *   <li><code>'OT_PERMISSION_DENIED'</code> &mdash; The user's role does not
5511            *   include permissions required to force other users to mute.
5512            *   You define a user's role when you create the user token (see the
5513            *   <a href="https://tokbox.com/developer/guides/create-token/">Token creation overview</a>).
5514            *   You pass the token string as a parameter of the <code>connect()</code> method of the Session
5515            *   object.
5516            *   </li>
5517            *
5518            *   <li><code>'OT_NOT_FOUND'</code> &mdash; The stream wasn't found in this session.</li>
5519            *
5520            *   <li><code>'OT_UNEXPECTED_SERVER_RESPONSE'</code> &mdash; in case of an internal server error.</li>
5521            *
5522            * <ul>
5523            * </p>
5524            */(this||_global3).forceMuteStream=e=>new t(((t,n)=>{const r=checkMuteCapabilities();r?n(r):e&&e.id?re.forceMuteStream(e.id,(e=>{e?n(handleMuteServerError(e)):t()})):n(dispatchMuteError(P.INVALID_PARAMETER))}
5524))
5525/**
5526             * Forces all publishers in the session (except for those publishing excluded streams)
5527             * to mute audio.
5528             *
5529             * <p>
5530             * Calling this method causes the Publisher objects in the clients publishing
5531             * the streams to dispatch a <code>muteForced</code> events. The Session object
5532             * in each client connected to the session dispatches the <code>muteForced</code>
5533             * event.
5534             * </p>
5535             *
5536             * <p>
5537             * Check the <code>capabilities.canForceMute</code> property of the Session object to see if
5538             * you can call this function successfully. This is reserved for clients that have connected
5539             * with a token that has been assigned the moderator role (see the
5540             * <a href="https://tokbox.com/developer/guides/create-token/">Token Creation</a>
5541             * documentation).
5542             *
5543             * @param {Array} excludedStreams An array of Stream objects to be excluded from
5544             * being muted. Note that if you want to prevent the local client's published
5545             * streams from being muted, pass in the Stream object(s) for those stream(s).
5546             *
5547             * @method #forceMuteAll
5548             * @memberOf Session
5549             *
5550             * @return {Promise} A promise that resolves with no value when the operation
5551             * completes successfully. The promise is rejected if there is an error. The
5552             * <code>name</code> property of the Error object is set to one of the following
5553             * values, depending the type of error:
5554             *
5555             * <p>
5556             * <ul>
5557             *
5558             *   <li><code>'OT_NOT_CONNECTED'</code> &mdash; The client is not connect to the session.</li>
5559             *
5560             *   <li><code>'INVALID_PARAMETER'</code> &mdash; if one or more of the passed parameters are invalid.</li>
5561             *
5562             *   <li><code>'OT_PERMISSION_DENIED'</code> &mdash; The user's role does not
5563             *   include permissions required to force other users to mute.
5564             *   You define a user's role when you create the user token (see the
5565             *   <a href="https://tokbox.com/developer/guides/create-token/">Token creation overview</a>).
5566             *   You pass the token string as a parameter of the <code>connect()</code> method of the Session
5567             *   object.
5568             *   </li>
5569             *
5570             *   <li><code>'OT_UNEXPECTED_SERVER_RESPONSE'</code> &mdash; in case of an internal server error.</li>
5571             * <ul>
5572             * </p>
5573             */;(this||_global3).forceMuteAll=e=>new t(((t,n)=>{const r=checkMuteCapabilities();if(r){n(r);return}if(Array.isArray(e)&&!e.every((e=>e instanceof x))||e&&!Array.isArray(e)){n(dispatchMuteError(P.INVALID_PARAMETER));return}const o=(e||[]).map((e=>e.id));re.forceMuteAll(o,true,(e=>{e?n(handleMuteServerError(e)):t()}))}));(this||_global3).disableForceMute=()=>new t(((e,t)=>{const n=checkMuteCapabilities();n?t(n):re.forceMuteAll([],false,(n=>{n?t(handleMuteServerError(n)):e()}))}));(this||_global3).isConnected=()=>this.is("connected");(this||_global3).capabilities=new S([])};return Z}}).call(this||_global3,n(0))},function(e,t,n){const r=n(8);const o=n(21);const i=[400,403,409,r.CONNECTION_LIMIT_EXCEEDED];const a={CONNECT:"ConnectToSession",SESSION_STATE:"GetSessionState"};
5574/*
5575       * Converts an error from RumorSocket to use generic exception codes
5576       * @param {Error} error - Error object with reason property
5577       * @return {Object} The converted error code and message
5578       * @property {number} code
5579       * @property {string} message
5580       */e.exports=function convertRumorError(e){let t;let n;if(e.reason===a.CONNECT&&e.code===r.CONNECT_FAILED){t=e.code;n=o.getTitleByCode(e.code)}else if(e.code&&i.indexOf(Number(e.code))>-1){t=r.CONNECT_FAILED;switch(e.reason){case a.CONNECT:switch(e.code){case r.CONNECTION_LIMIT_EXCEEDED:t=e.code;n="Cannot connect -- the limit for concurrent connections to the session has been reached";break;default:n="Received error response to connection create message.";break}break;case a.SESSION_STATE:n="Received error response to session read";break;default:n="";break}}else{t=r.UNEXPECTED_SERVER_RESPONSE;n="Unexpected server response. Try this operation again later."}return{code:t,message:n}}},function(e,t,n){const r=n(2);const o=n(60).once;e.exports=()=>o()&&(r.isChromiumEdge||["Chrome","Safari","Firefox","Opera"].includes(r.name))},function(e,t,n){e.exports=function serializeMessage(e){return JSON.stringify(e)}},function(e,t,n){t.__esModule=true;t.default=void 0;var _default=e=>{let t=e.logger,n=e.obj,r=e.eventNames;r.forEach((e=>{n.on(e,(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.spam("emitted",e,r)}))}))};t.default=_default},function(e,t,n){const r=n(15);const o=n(21);const i=n(6);const a=n(1)("Dispatcher");const s=n(171);const c=n(705);
5580const l=function Dispatcher(){i(this||_global3);(this||_global3).callbacks={}};e.exports=l;l.prototype.registerCallback=function(e,t){(this||_global3).callbacks[e]=t};l.prototype.triggerCallback=function(e){if(!e)return;const t=(this||_global3).callbacks[e];if(t&&r(t)){const e=Array.prototype.slice.call(arguments);e.shift();t(...e)}delete(this||_global3).callbacks[e]};l.prototype.onClose=function(e){this.emit("close",e)};l.prototype.onReconnected=function(){this.emit("reconnected")};l.prototype.onReconnecting=function(){this.emit("reconnecting")};l.prototype.dispatch=function(e){if(e.type===s.STATUS){var t;a.debug(e);let n;if(e.isError){let t;if("string"===typeof e.data)try{const n=JSON.parse(e.data);n&&"object"===typeof n&&(t=n.reason)}catch(e){a.warn("Failed to parse rumorMessage.data",e)}n=new o(e.status,t)}const r=e.data?JSON.parse(e.data):"";(null==r||null==(t=r.mute)?void 0:t.active)&&this.dispatchMuteOnEntry();this.triggerCallback(e.transactionId,n,e);return}const n=c(e);a.debug(`${n.signature}:`,n);switch(n.resource){case"session":this.dispatchSession(n);break;case"connection":this.dispatchConnection(n);break;case"stream":this.dispatchStream(n);break;case"stream_channel":this.dispatchStreamChannel(n);break;case"subscriber":this.dispatchSubscriber(n);break;case"subscriber_channel":this.dispatchSubscriberChannel(n);break;case"signal":this.dispatchSignal(n);break;case"archive":this.dispatchArchive(n);break;case"source":this.dispatchSource(n);break;default:a.debug(`Type ${n.resource} is not currently implemented`)}};l.prototype.dispatchSession=function(e){switch(e.method){case"read":this.emit("session#read",e.content,e.transactionId);break;
vendor: 1,487 bytes, line 5580
5580case"update":this.emit("session#update",e.content);break;default:a.debug(`${e.signature} is not currently implemented`)}};l.prototype.dispatchMuteOnEntry=function(){this.emit("session#muted")};l.prototype.dispatchConnection=function(e){switch(e.method){case"created":this.emit("connection#created",e.content);break;case"deleted":this.emit("connection#deleted",e.params.connection,e.reason);break;default:a.debug(`${e.signature} is not currently implemented`)}};l.prototype.dispatchStream=function(e){switch(e.method){case"created":this.emit("stream#created",e.content,e.transactionId);break;case"deleted":this.emit("stream#deleted",e.params.stream,e.reason,e.content);break;case"updated":this.emit("stream#updated",e.params.stream,e.content);break;case"update":this.emit("stream#update",e.params.stream,e.content);break;case"generateoffer":case"answer":case"pranswer":case"offer":case"candidate":this.dispatchJsep(e.method,e);break;default:a.debug(`${e.signature} is not currently implemented`)}};l.prototype.dispatchStreamChannel=function(e){switch(e.method){case"updated":this.emit("streamChannel#updated",e.params.stream,e.params.channel,e.content);break;default:a.debug(`${e.signature} is not currently implemented`)}};l.prototype.dispatchJsep=function(e,t){this.emit(`jsep#${e}`,t.params.stream,t.fromAddress,t)};l.prototype.dispatchSubscriberChannel=function(e){switch(e.method){case"updated":this.emit("subscriberChannel#updated",e.params.stream,e.params.channel,e.content);break;
5580case"update":this.emit("subscriberChannel#update",e.params.subscriber,e.params.stream,e.content);break;default:a.debug(`${e.signature} is not currently implemented`)}};l.prototype.dispatchSubscriber=function(e){switch(e.method){case"created":this.emit("subscriber#created",e.params.stream,e.fromAddress,e.content.id);break;case"deleted":this.dispatchJsep("unsubscribe",e);this.emit("subscriber#deleted",e.params.stream,e.fromAddress);break;case"generateoffer":case"answer":case"pranswer":case"offer":case"candidate":this.dispatchJsep(e.method,e);break;default:a.debug(`${e.signature} is not currently implemented`)}};l.prototype.dispatchSignal=function(e){"signal"===e.method?this.emit("signal",e.fromAddress,e.content):a.debug(`${e.signature} is not currently implemented`)};l.prototype.dispatchArchive=function(e){switch(e.method){case"created":this.emit("archive#created",e.content);break;case"updated":this.emit("archive#updated",e.params.archive,e.content);break;default:}};l.prototype.dispatchSource=function(e){switch(e.method){case"create":this.emit
5580("source#create",e.params.source,e.params.stream,e.reason);break;case"delete":this.emit("source#delete",e.params.source,e.params.stream,e.reason);break;default:a.debug(`${e.signature} is not currently implemented`)}}},function(e,t,n){const r=n(19);const o=n(5);const i=n(708);const a=n(709);const s=n(312);const c=n(710);const l=n(44)().onlyLocal();const u={};e.exports=u;u.connections={};u.connections.create=function(e){const t=e.apiKey;const n=e.sessionId;const r=e.connectionId;const i=e.connectionEventsSuppressed;const a=e.capabilities;return s({method:"create",uri:`/v2/partner/${t}/session/${n}/connection/${r}`,content:{userAgent:o.env.userAgent,clientVersion:l.clientVersion,capabilities:a||[],connectionEventsSuppressed:i}})};u.connections.destroy=function(e){const t=e.apiKey;const n=e.sessionId;const r=e.connectionId;return s({method:"delete",uri:`/v2/partner/${t}/session/${n}/connection/${r}`,content:{}})};u.sessions={};u.sessions.get=function(e,t){return s({method:"read",uri:`/v2/partner/${e}/session/${t}`,content:{}})};u.streams={};u.streams.get=function(e,t,n){return s({method:"read",uri:`/v2/partner/${e}/session/${t}/stream/${n}`,content:{}})};u.streams.channelFromOTChannel=function(e){const t={id:e.id,type:e.type,active:e.active};if("video"===e.type){t.width=e.width;t.height=e.height;t.orientation=e.orientation;t.frameRate=e.frameRate;"default"!==e.source&&(t.source=e.source);t.fitMode=e.fitMode}return t};u.streams.create=function(e){void 0===e&&(e={});const t=e,n=t.apiKey,r=t.sessionId,o=t.streamId,i=t.name,a=t.audioFallbackEnabled,c=t.channels,l=t.minBitrate,d=t.maxBitrate,f=t.sourceStreamId;const p={id:o,name:i,audioFallbackEnabled:a,channel:c.map((e=>u.streams.channelFromOTChannel(e)))};l&&(p.minBitrate=Math.round(l));d&&(p.maxBitrate=Math.round(d));f&&(p.sourceStreamId=f);return s({method:"create",uri:`/v2/partner/${n}/session/${r}/stream/${o}`,content:p})};u.streams.destroy=function(e,t,n,r){const o={};r&&(o.sourceStreamId=r);return s({method:"delete",uri:`/v2/partner/${e}/session/${t}/stream/${n}`,content:o})};u.streamChannels={};u.streamChannels.update=function(e,t,n,r,o){return s({method:"update",uri:`/v2/partner/${e}/session/${t}/stream/${n}/channel/${r}`,content:o})};u.subscribers={};u.subscribers.create=function(e){void 0===e&&(e={});const t=e,n=t.apiKey,r=t.sessionId,o=t.streamId,l=t.subscriberId,u=t.connectionId,d=t.channelsToSubscribeTo,f=t.sourceStreamId;const p={id:l,connection:u,keyManagementMethod:c,bundleSupport:i(),rtcpMuxSupport:a()};d&&(p.channel=d);f&&(p.sourceStreamId=f);return s({method:"create",uri:`/v2/partner/${n}/session/${r}/stream/${o}/subscriber/${l}`,content:p})};u.subscribers.destroy=function(e,t,n,r){return s({method:"delete",uri:`/v2/partner/${e}/session/${t}/stream/${n}/subscriber/${r}`,content:{}})};u.subscribers.update=function(e,t,n,r,o){return s({method:"update",uri:`/v2/partner/${e}/session/${t}/stream/${n}/subscriber/${r}`,content:o})};u.subscriberChannels={};u.subscriberChannels.update=function(e,t,n,r,o,i){return s({method:"update",uri:`/v2/partner/${e}/session/${t}/stream/${n}/subscriber/${r}/channel/${o}`,content:i})};u.signals={};u.signals.create=function(e,t,n,o,i){const a={};void 0!==o&&(a.type=o);void 0!==i&&(a.data=i);return s({method:"signal",uri:`/v2/partner/${e}/session/${t}${void 0!==n?`/connection/${n}`:""}/signal/${r()}`,content:a})};u.forceMute={};u.forceMute.update=e=>{const t=e.apiKey,n=e.sessionId,r=e.streamId,o=e.active,i=e.excludedStreamIds;const a={reason:"mute",channels:["audio"],active:o,locked:false};i&&(a.exclusion=i);return s({method:"update",uri:`/v2/partner/${t}/session/${n}${r?`/stream/${r}`:""}`,content:a})}},function(e,t,n){const r=n(36);const o=n(72);const i=n(172);const a=n(315);const s=n(317);const c=8192;const l=128;e.exports=function Signal(e,t,n){const u=function isInvalidType(e){return!/^[a-zA-Z0-9\-\._~]+$/.exec(e)};const d=function validateTo(e){return e?e instanceof i||e._tag===s?null:{code:400,reason:"The To field was invalid"}:{code:400,reason:"The signal to field was invalid. Either set it to a OT.Connection, OT.Session, or omit it entirely"}};const f=function validateType(e){let t=null;null===e||void 0===e?t={code:400,reason:"The signal type was null or undefined. Either set it to a String value or omit it"}:e.length>l?t={code:413,reason:`The signal type was too long, the maximum length of it is ${l} characters`}
5580:u(e)&&(t={code:400,reason:"The signal type was invalid, it can only contain letters, numbers, '-', '_', and '~'."});return t};const p=function validateData(e){let t=null;if(null===e||void 0===e)t={code:400,reason:"The signal data was null or undefined. Either set it to a String value or omit it"};else try{JSON.stringify(e).length>c&&(t={code:413,reason:`The data field was too long, the maximum size of it is ${c} characters`})}catch(e){t={code:400,reason:"The data field was not valid JSON"}}return t};const g=function validateRetryAfterReconnect(e){let t=null;true===e||false===e||(t={code:400,reason:"The signal retryAfterReconnect was not true or false. Either set it to a Boolean value or omit it"});return t};(this||_global3).toRaptorMessage=function(){let t=(this||_global3).to;t&&"string"!==typeof t&&(t=t.id);return a.signals.create(o.value,e,t,(this||_global3).type,(this||_global3).data)};(this||_global3).toHash=function(){return n};(this||_global3).error=null;(this||_global3).retryAfterReconnect=true;if(n){if(n.hasOwnProperty("data")){(this||_global3).data=r(n.data);(this||_global3).error=p((this||_global3).data)}if(n.hasOwnProperty("to")){(this||_global3).to=n.to;(this||_global3).error||((this||_global3).error=d((this||_global3).to))}if(n.hasOwnProperty("type")){(this||_global3).error||((this||_global3).error=f(n.type));(this||_global3).type=n.type}if(n.hasOwnProperty("retryAfterReconnect")){(this||_global3).error||((this||_global3).error=g(n.retryAfterReconnect));(this||_global3).retryAfterReconnect=n.retryAfterReconnect}}(this||_global3).valid=null===(this||_global3).error}},function(e,t,n){e.exports={}},function(e,t,n){var r=n(3);var o=r(n(12));var i=r(n(13));const a=n(319);const s=n(48);const c=n(172);const l=n(713);const u=n(314);const d=n(1)("SessionDispatcher");const f=n(20);const p=n(170);const g=n(149);const h=n(167);function constructBareConnection(e){return{id:e,creationTime:(new Date).getTime(),data:{},capablities:{},permissions:[]}}function parseStream(e,t){const n=e.channel.map((e=>new g(e)));const r=e.connectionId?e.connectionId:e.connection.id;return new p(e.id,e.name,e.creationTime,t.connections.get(r),t,n)}function parseAndAddStreamToSession(e,t){if(t.streams.has(e.id))return;const n=parseStream(e,t);t.streams.add(n);return n}function parseArchive(e){return new a(e.id,e.name,e.status)}function parseAndAddArchiveToSession(e,t){if(t.archives.has(e.id))return;const n=parseArchive(e);t.archives.add(n);return n}const b=function DelayedSessionEvents(e){const t={};(this||_global3).enqueue=function enqueue(){const n=arguments[0];const r=Array.prototype.slice.call(arguments,1);t[n]||(t[n]=new l(e));t[n].enqueue.apply(t[n],r)};(this||_global3).triggerConnectionCreated=function triggerConnectionCreated(e){t[`connectionCreated${e.id}`]&&t[`connectionCreated${e.id}`].triggerAll()};(this||_global3).triggerSessionConnected=function triggerSessionConnected(e){t.sessionConnected&&t.sessionConnected.triggerAll();e.forEach((function(e){this.triggerConnectionCreated(e)}),this||_global3)}};const v={};e.exports=function SessionDispatcher(e,t){let n=void 0===t?{}:t,r=n.connectionEventsSuppressed;const a=new u;let l=false;const p=new b(a);a.on("reconnecting",(()=>{e._.reconnecting()}));a.on("reconnected",(()=>{e._.reconnected()}));a.on("close",(t=>{const n=e.connection;n&&(n.destroyedReason()?d.debug(`Socket was closed but the connection had already been destroyed. Reason: ${n.destroyedReason()}`):n.destroy(t))}));const g=function addConnection(t,n){if(e.connections.has(t.id))return e.connections.get(t.id);t=c.fromHash(t);if(n||e.connection&&t.id!==e.connection.id){e.connections.add(t);p.triggerConnectionCreated(t)}Object.keys(v).forEach((r=>{const o=v[r];if(o&&t.id===o.connection.id){parseAndAddStreamToSession(o,e);delete v[o.id];const r={debug:n?"connection came in session#read":"connection came in connection#created",streamId:o.id,connectionId:t.id};e.logEvent("streamCreated","warning",r)}}));return t};a.on("session#read",((t,n)=>{let r;const o={};o.streams=[];o.connections=[];o.archives=[];t.connection.forEach((e=>{r=g(e,true);o.connections.push(r)}));t.stream.forEach((t=>{o.streams.push(parseAndAddStreamToSession(t,e))}));
5580(t.archive||t.archives).forEach((t=>{o.archives.push(parseAndAddArchiveToSession(t,e))}));a.triggerCallback(n,null,o);l=true;p.triggerSessionConnected(e.connections)}));a.on("session#update",(t=>{if("mute"!==t.reason){d.debug("session#update that handle this reason is not currently implemented");return}const n=true===t.active;e._.forceMute({active:n});n?e._.enableMuteOnEntry():e._.disableMuteOnEntry()}));a.on("session#muted",(()=>{e._.enableMuteOnEntry();e._.forceMute({active:true})}));a.on("connection#created",(e=>{g(e)}));a.on("connection#deleted",((t,n)=>{t=e.connections.get(t);t?t.destroy(n):d.warn("A connection was deleted that we do not know about")}));a.on("stream#created",((t,n)=>{const o=t.id,i=t.sourceStreamId,s=t.connection;let c;if(r){if(null==s||null==s.id){e.logEvent("SessionDispatcher:stream#created","Event",{connection:s,info:"Stream did not contain a connection object. Event ignored"});return}g(s)}const l=t.connectionId||s.id;if(e.connections.has(l))c=parseAndAddStreamToSession(t,e);else{v[o]=t;const n={debug:"eventOrderError -- streamCreated event before connectionCreated",streamId:o,sourceStreamId:h(i)};e.logEvent("streamCreated","warning",n)}if(c){c.publisher&&c.publisher.setStream(c);a.triggerCallback(n,null,c)}else e.sessionInfo.isAdaptiveEnabled&&"P2P"===i&&f.subscribers.where({streamId:o}).forEach((e=>{e._.startRoutedToRelayedTransition()}))}));a.on("stream#deleted",((t,n,r)=>{const o=e.streams.get(t);const i=r.sourceStreamId;const a=f.subscribers;const s=e.sessionInfo.isAdaptiveEnabled;const c=s&&"P2P"===i;(o||c)&&(c?a.where({streamId:t}
5580).forEach((e=>{e._.startRelayedToRoutedTransition()})):o.destroy(n))}));a.on("stream#updated",((t,n)=>{const r=e.streams.get(t);r?r._.update(n):d.error(`A stream does not exist with the id of ${t}, for stream#updated message!`)}));a.on("stream#update",((t,n)=>{const r=e.streams.get(t);const o=n.reason,i=n.active;r?"mute"===o?i&&r._.forceMute(n):d.debug("stream#update that handle this reason is not currently implemented"):d.error(`A stream does not exist with the id of ${t}, for stream#updated message!`)}));a.on("streamChannel#updated",((t,n,r)=>{let o;t&&(o=e.streams.get(t))?o._.updateChannel(n,r):d.error("Unable to determine streamId, or the stream does not exist, for streamChannel message!")}));const jsepHandler=(t,n,r,a)=>{let l;let u;const p={streamId:n};const g=f.subscribers;const h=f.publishers;l=a.params.subscriber?{widgetId:a.params.subscriber}:p;switch(t){case"offer":u=[].concat(g.where(l),h.where(p)).slice(0,1);break;case"answer":case"pranswer":u=[].concat(h.where(p),g.where(l)).slice(0,1);break;case"generateoffer":case"unsubscribe":u=h.where(p);break;case"candidate":u=[].concat(g.where(l),h.where(p));break;default:d.debug(`jsep#${t} is not currently implemented`);return}if(0===u.length)return;let b=e.connections.get(r);if(!b&&r.match(/^symphony\./)){b=c.fromHash({id:r,creationTime:Math.floor(s())});e.connections.add(b)}u.forEach(function(){var e=(0,i.default)(o.default.mark((function _callee(e){return o.default.wrap((function _callee$(n){while(1)switch(n.prev=n.next){case 0:n.prev=0;n.next=3;return e.processMessage(t,r,a);case 3:n.next=8;break;case 5:n.prev=5;n.t0=n.catch(0);d.error("Error occurred during processMessage",n.t0);case 8:case"end":return n.stop()}}),_callee,null,[[0,5]])})));return function(t){return e.apply(this||_global3,arguments)}}())};a.on("jsep#offer",jsepHandler.bind(null,"offer"));a.on("jsep#answer",jsepHandler.bind(null,"answer"));a.on("jsep#pranswer",jsepHandler.bind(null,"pranswer"));a.on("jsep#generateoffer",jsepHandler.bind(null,"generateoffer"));a.on("jsep#unsubscribe",jsepHandler.bind(null,"unsubscribe"));a.on("jsep#candidate",jsepHandler.bind(null,"candidate"));a.on("subscriberChannel#updated",((t,n,r)=>{t&&e.streams.has(t)?e.streams.get(t)._.updateChannel(n,r):d.error("Unable to determine streamId, or the stream does not exist, for subscriberChannel#updated message!")}));a.on("subscriberChannel#update",((t,n,r)=>{n&&e.streams.has(n)?f.subscribers.has(t)?f.subscribers.get(t).disableVideo(r.active):d.error("Unable to determine subscriberId, or the subscriber does not exist, for subscriberChannel#update message!"):d.error("Unable to determine streamId, or the stream does not exist, for subscriberChannel#update message!")}));a.on("signal",((t,n)=>{if(r){let r=n.connection||n.fromConnection;if(null==r||null==r.id){r=constructBareConnection(t);e.logEvent("SessionDispatcher:Signal","Event",{fromAddress:t,connection:n.connection,fromConnection:n.fromConnection,info:"Signal did not contain a connection object. One has been constructed",constructedConnection:r})}g(r)}const o=n.type;const i=n.data;const a=e.connections.get(t);e.connection&&t===e.connection.connectionId?l?e._.dispatchSignal(a,o,i):p.enqueue("sessionConnected","signal",t,o,i):e.connections.get(t)?e._.dispatchSignal(a,o,i):""===t?e._.dispatchSignal(null,o,i):p.enqueue(`connectionCreated${t}`,"signal",t,o,i)}));a.on("archive#created",(t=>{parseAndAddArchiveToSession(t,e)}));a.on("archive#updated",((t,n)=>{const r=e.archives.get(t);r?r._.update(n):d.error(`An archive does not exist with the id of ${t}, for archive#updated message!`)}));a.on("source#create",((t,n,r)=>{const o=h(t);e.logEvent("SessionDispatcher:source#create","Event",{sourceStreamId:o,streamId:n,reason:r});d.debug(`Received a request from RUMOR to start a transition to ${t} for the stream ID ${n} with the reason: ${r}`);f.publishers.where({streamId:n}).forEach((e=>{e._.startRoutedToRelayedTransition()}))}));a.on("source#delete",((t,n,r)=>{e.logEvent("SessionDispatcher:source#delete","Event",{sourceStreamId:h(t),streamId:n,reason:r});d.debug(`Received a request from RUMOR to start a transition from P2P to MANTIS for the stream ID ${n} with the reason: ${r}`);f.publishers.where({streamId:n}
5580).forEach((e=>{e._.startRelayedToRoutedTransition()}))}));return a}},function(e,t,n){const r=n(22)();const o=n(6);e.exports=function Archive(e,t,n){(this||_global3).id=e;(this||_global3).name=t;(this||_global3).status=n;(this||_global3)._={};o(this||_global3);(this||_global3)._.update=e=>{Object.keys(e).forEach((t=>{const n=(this||_global3)[t];(this||_global3)[t]=e[t];const o=new r.ArchiveUpdatedEvent(this||_global3,t,n,(this||_global3)[t]);this.dispatchEvent(o)}))};(this||_global3).destroy=()=>{}}},function(e,t,n){const r=n(23)(),o=r.getAudioOutputMediaDevices;e.exports=()=>o()},function(e,t,n){const r=n(23)(),o=r.getActiveAudioOutputDevice;e.exports=()=>o()},function(e,t,n){(function(t){var r=n(3);var o=r(n(12));var i=r(n(13));const a=n(20);const s=n(105),c=s.setCurrentAudioOutputDeviceId;const l=n(321);const u=n(23)(),d=u.getDefaultAudioOutputDeviceId,f=u.getAudioOutputMediaDevices;const p=n(294);const g=n(27);const h=new g;const logUpdateSubscriberSinkId=(e,t)=>{h.logEvent({action:"updateSubscribersSinkId",variation:e,payload:t})};const updateSinkId=e=>{const n=a.subscribers.map((t=>t._.setSinkId(e)));return t.all(n)};const b=function(){var e=(0,i.default)(o.default.mark((function _callee(e){return o.default.wrap((function _callee$(t){while(1)switch(t.prev=t.next){case 0:t.next=2;return p();case 2:t.prev=2;logUpdateSubscriberSinkId("Attempt",{deviceId:e});t.next=6;return updateSinkId(e);case 6:logUpdateSubscriberSinkId("Success",{deviceId:e});t.next=13;break;case 9:t.prev=9;t.t0=t.catch(2);logUpdateSubscriberSinkId("Failure",{deviceId:e,error:null==t.t0?void 0:t.t0.message});throw t.t0;case 13:case"end":return t.stop()}}),_callee,null,[[2,9]])})));return function rollbackToDevice(t){return e.apply(this||_global3,arguments)}}();const v=function(){var e=(0,i.default)(o.default.mark((function _callee2(){var e,t;return o.default.wrap((function _callee2$(n){while(1)switch(n.prev=n.next){case 0:n.next=2;return f();case 2:e=n.sent;t=d(e);n.prev=4;n.next=7;return b(t);case 7:c(t);n.next=12;break;case 10:n.prev=10;n.t0=n.catch(4);case 12:case"end":return n.stop()}}),_callee2,null,[[4,10]])})));return function rollbackToDefaultDevice(){return e.apply(this||_global3,arguments)}}();const m=function(){var e=(0,i.default)(o.default.mark((function _callee3(){var e;return o.default.wrap((function _callee3$(t){while(1)switch(t.prev=t.next){case 0:t.next=2;return l();case 2:e=t.sent;t.prev=3;t.next=6;return b(e.deviceId);case 6:t.next=12;break;case 8:t.prev=8;t.t0=t.catch(3);t.next=12;return v();case 12:case"end":return t.stop()}}),_callee3,null,[[3,8]])})));return function onUpdateSubscriberSinkIdError(){return e.apply(this||_global3,arguments)}}();e.exports=function(){var e=(0,i.default)(o.default.mark((function _callee4(e){return o.default.wrap((function _callee4$(t){while(1)switch(t.prev=t.next){case 0:t.prev=0;logUpdateSubscriberSinkId("Attempt",{deviceId:e});t.next=4;return updateSinkId(e);case 4:logUpdateSubscriberSinkId("Success",{deviceId:e});c(e);t.next=14;break;case 8:t.prev=8;t.t0=t.catch(0);logUpdateSubscriberSinkId("Failure",{deviceId:e,error:null==t.t0?void 0:t.t0.message});t.next=13;return m();case 13:throw t.t0;case 14:case"end":return t.stop()}}),_callee4,null,[[0,8]])})));return function(t){return e.apply(this||_global3,arguments)}}()}).call(this||_global3,n(0))},function(e,t,n){n(324);const r=n(36);const o=n(26);const i=n(6);const a=n(126);const s=n(44)();const c=n(27);const l=n(249);const u=n(543);const d=n(544);const f=s.onlyLocal();const p={};p.noConflict=n(545)();(void 0!==typeof window?window:_global3).OT=p;e.exports=p;(()=>{let e=p;Object.defineProperty(void 0!==typeof window?window:_global3,"TB",{get:()=>{e===p&&console.warn("window.TB is deprecated, and will be removed in the future. Please access via window.OT");return e},set:t=>{e=t},configurable:true})})();const g=n(142)(void 0!==typeof window?window:_global3);const h=n(5);const b=n(72);const v=n(143);const m=n(252);const _=n(144);const y=n(145);const E=n(253);const S=n(146);const T=n(4);const C=n(8);const w=n(254);const O=n(240);const x=n(1)("OT");const I=n(119);const A=n(572);const R=n(21);const k=n(100),D=k.parseIceServers;const N=n(267);const P=n(20);const M=n(149);const L=n(151);const j=n(152);const U=n(101)({global:g});const F=n(11)({});const V=n(158)();const B=n(280)({otError:F});const W=n(281)();const H=n(286)({global:g});const z=n(23)({getNativeEnumerateDevices:H});const $=n(22)();const G=n(160)();const q=n(626)({otError:F,global:g});const Y=n(161)({chromeExtensionHelper:B,otError:F});const K=n(631)({deviceHelpers:z,generateConstraintInfo:w,getUserMediaHelper:q,global:g,OTHelpers:h,screenSharing:Y});const J=n(634)({otError:F,processPubOptions:K});const Z=n(162)({otError:F});const X=n(74);const Q=n(291)();const ee=n(292)({otError:F});const te=n(293)({global:g,videoElementErrorMap:ee});const ne=n(163)({global:g});const re=n(295)({PeerConnection:U,setCertificates:ne});const oe=n(296)({PeerConnection:U,setCertificates:ne});const ie=n(297)();const ae=n(643)({otError:F});
5580const se=n(107)({NativeVideoElementWrapper:te});const ce=n(150)();const le=n(164)({VideoElementFacade:se});const ue=n(300)({interpretPeerConnectionError:Z,otError:F,SubscriberPeerConnection:oe,WidgetView:le});const de=n(168)({APIKEY:b,createChromeMixin:W,deviceHelpers:z,EnvironmentLoader:S,Errors:T,Events:$,ExceptionCodes:C,calculateCapableSimulcastStreams:m,global:g,interpretPeerConnectionError:Z,IntervalRunner:X,Microphone:Q,otError:F,OTErrorClass:R,OTHelpers:h,parseIceServers:D,processPubOptions:K,PUBLISH_MAX_DELAY:N,PublisherPeerConnection:re,PublishingState:ie,StreamChannel:M,systemRequirements:j,VideoOrientation:ce,WidgetView:le});const fe=n(308)({otError:F,Publisher:de});const pe=n(309)({global:g,initPublisher:fe,otError:F,Publisher:de,Subscriber:ue});const ge=n(717)({Session:pe});i(p);const he=n(718);l(p,"$",{name:"OT.$",getMessage:"Please use an external library like jQuery to select elements from the page.",value:h});p.APIKEY=b.value;p.AnalyserAudioLevelSampler=y;p.Archive=n(319);p.ArchiveEvent=$.ArchiveEvent;p.ArchiveUpdatedEvent=$.ArchiveUpdatedEvent;p.AudioLevelTransformer=v;p.AudioLevelUpdatedEvent=$.AudioLevelUpdatedEvent;p.Capabilities=n(169);p.Chrome=_;p.Connection=n(172);p.ConnectionCapabilities=p.Connection.Capabilities;p.ConnectionEvent=$.ConnectionEvent;Object.keys(I).forEach((e=>{p[e.toUpperCase()]=I[e].priority}));p.NONE=0;p.debug=x.debug;p.error=x.error;p.info=x.info;p.log=x.log;p.warn=x.warn;p.DestroyedEvent=$.DestroyedEvent;p.EnvLoadedEvent=$.EnvLoadedEvent;p.Error=R;p.Error.on(o.EXCEPTION,(e=>{if(e.target===p.Error){const t=r(e);t.target=p;p.dispatchEvent(t)}else p.dispatchEvent(e)}));p.Event=a;p.ExceptionCodes=C;p.ExceptionEvent=$.ExceptionEvent;p.getDevices=n(721);p.getAudioOutputDevices=n(320);p.getActiveAudioOutputDevice=n(321);p.setAudioOutputDevice=n(722)();p.GetAudioLevelSampler=E;p.HAS_REQUIREMENTS=1;p.IntervalRunner=X;p.IssueReportedEvent=$.IssueReportedEvent;p.MediaStoppedEvent=$.MediaStoppedEvent;p.Microphone=Q;p.NOT_HAS_REQUIREMENTS=0;p.PeerConnection=U;p.PeerConnection.QOS=n(278).default;p.Publisher=de;p.PublisherPeerConnection=re;p.PublishingState=ie;p.MuteForcedEvent=$.MuteForcedEvent;p.Session=pe;p.SessionConnectEvent=$.SessionConnectEvent;p.SessionDisconnectEvent=$.SessionDisconnectEvent;p.SessionDispatcher=n(318);p.Signal=n(316);p.SignalEvent=$.SignalEvent;p.Stream=n(170);p.StreamChannel=M;p.StreamEvent=$.StreamEvent;p.StreamPropertyChangedEvent=$.StreamPropertyChangedEvent;p.StreamUpdatedEvent=$.StreamUpdatedEvent;p.StylableComponent=L;p.Subscriber=ue;p.SubscriberPeerConnection=oe;p.SubscribingState=n(303);p.VideoDimensionsChangedEvent=$.VideoDimensionsChangedEvent;p.VideoDisableWarningEvent=$.VideoDisableWarningEvent;p.VideoElement=se;p.VideoEnabledChangedEvent=$.VideoEnabledChangedEvent;p.VideoOrientation=ce;p.WidgetView=le;p.getSupportedCodecs=he;p._={AnalyticsHelper:c,getClientGuid:O.get,StaticConfig:s};Object.defineProperty(p,"version",{value:f.version});const be={};const canPropertyBeMutated=e=>d.includes(e);l(be,"version",{value:f.version,name:"OT.properties.version",getWarning:"Please use OT.version instead",warnOnSet:true,setWarning:"Mutating version has no effect"});u.forEach((e=>{let t;let n;if(Array.isArray(e)){const r=e[0],o=e[1];n=r;t=f[o]||o}else{t=f[e];n=e}const r=canPropertyBeMutated(n);l(be,n,{value:t,name:`OT.properties.${n}`,warnOnSet:true,canSet:r,setWarning:r?`Mutating ${n} can cause side effects`:`Mutating ${n} has no effect`})}));p.properties=be;p.audioContext=V;p.checkScreenSharingCapability=Y.checkCapability;p.checkSystemRequirements=j.check;p.components={};p.generateSimpleStateMachine=G;p.getErrorTitleByCode=R.getTitleByCode;p.getLogs=x.getLogs;p.getStatsAdpater=n(274);p.getStatsHelpers=n(75);p.getUserMedia=J;p.handleJsException=R.handleJsException;p.initPublisher=fe;p.setProxyUrl=n(139).setProxyUrl;p.initSession=function(e,t,n){if(null==t){t=e;e=null}if(0===b.value.length&&e){b.value=e;p.APIKEY=e}return ge(e,t,n)};const deprecatedMessage=e=>`${e} is deprecated and will be removed in a future version of OpenTok`;const warnAndReturn=(e,t)=>()=>{console.warn(deprecatedMessage(e));return t};Object.defineProperties(p,{isUnloaded:{get:warnAndReturn("OT.isUnloaded",S.isUnloaded)},onLoad:{get:warnAndReturn("OT.onLoad",S.onLoad)},onUnload:{get:warnAndReturn("OT.onUnload",S.onUnload)},overrideGuidStorage:{get:warnAndReturn("OT.overrideGuidStorage",O.override)}});p.pickScreenSharingHelper=Y.pickHelper;p.publishers=P.publishers;p.registerScreenSharingExtension=Y.registerExtension;p.registerScreenSharingExtensionHelper=Y.registerExtensionHelper;p.reportIssue=ae;p.sessions=P.sessions;p.setLogLevel=A;p.shouldLog=x.shouldLog;p.subscribers=P.subscribers;p.unblockAudio=n(166);p.upgradeSystemRequirements=j.upgrade;S.onUnload((()=>{P.publishers.destroy();P.subscribers.destroy();P.sessions.destroy("unloaded")}));n(723)();
5581/**
5582       * This method is deprecated. Use <a href="#on">on()</a> or <a href="#once">once()</a> instead.
5583       *
5584       * <p>
5585       * Registers a method as an event listener for a specific event.
5586       * </p>
5587       *
5588       * <p>
5589       * The OT object dispatches one type of event &#151; an <code>exception</code> event. The
5590       * following code adds an event listener for the <code>exception</code> event:
5591       * </p>
5592       *
5593       * <pre>
5594       * OT.addEventListener("exception", exceptionHandler);
5595       *
5596       * function exceptionHandler(event) {
5597       *    alert("exception event. \n  code == " + event.code + "\n  message == " + event.message);
5598       * }
5599       * </pre>
5600       *
5601       * <p>
5602       *   If a handler is not registered for an event, the event is ignored locally. If the event
5603       *   listener function does not exist, the event is ignored locally.
5604       * </p>
5605       * <p>
5606       *   Throws an exception if the <code>listener</code> name is invalid.
5607       * </p>
5608       *
5609       * @param {String} type The string identifying the type of event.
5610       *
5611       * @param {Function} listener The function to be invoked when the OT object dispatches the event.
5612       * @see <a href="#on">on()</a>
5613       * @see <a href="#once">once()</a>
5614       * @memberof OT
5615       * @method addEventListener
5616       *
5617       */
5618/**
5619       * This method is deprecated. Use <a href="#off">off()</a> instead.
5620       *
5621       * <p>
5622       * Removes an event listener for a specific event.
5623       * </p>
5624       *
5625       * <p>
5626       *   Throws an exception if the <code>listener</code> name is invalid.
5627       * </p>
5628       *
5629       * @param {String} type The string identifying the type of event.
5630       *
5631       * @param {Function} listener The event listener function to remove.
5632       *
5633       * @see <a href="#off">off()</a>
5634       * @memberof OT
5635       * @method removeEventListener
5636       */
5637/**
5638      * Adds an event handler function for one or more events.
5639      *
5640      * <p>
5641      * The OT object dispatches one type of event &#151; an <code>exception</code> event. The following
5642      * code adds an event
5643      * listener for the <code>exception</code> event:
5644      * </p>
5645      *
5646      * <pre>
5647      * OT.on("exception", function (event) {
5648      *   // This is the event handler.
5649      * });
5650      * </pre>
5651      *
5652      * <p>You can also pass in a third <code>context</code> parameter (which is optional) to define the
5653      * value of
5654      * <code>this</code> in the handler method:</p>
5655      *
5656      * <pre>
5657      * OT.on("exception",
5658      *   function (event) {
5659      *     // This is the event handler.
5660      *   }),
5661      *   session
5662      * );
5663      * </pre>
5664      *
5665      * <p>
5666      * If you do not add a handler for an event, the event is ignored locally.
5667      * </p>
5668      *
5669      * @param {String} type The string identifying the type of event.
5670      * @param {Function} handler The handler function to process the event. This function takes the event
5671      * object as a parameter.
5672      * @param {Object} context (Optional) Defines the value of <code>this</code> in the event handler
5673      * function.
5674      *
5675      * @memberof OT
5676      * @method on
5677      * @see <a href="#off">off()</a>
5678      * @see <a href="#once">once()</a>
5679      * @see <a href="#events">Events</a>
5680      */
5681/**
5682      * Adds an event handler function for an event. Once the handler is called, the specified handler
5683      * method is
5684      * removed as a handler for this event. (When you use the <code>OT.on()</code> method to add an event
5685      * handler, the handler
5686      * is <i>not</i> removed when it is called.) The <code>OT.once()</code> method is the equivilent of
5687      * calling the <code>OT.on()</code>
5688      * method and calling <code>OT.off()</code> the first time the handler is invoked.
5689      *
5690      * <p>
5691      * The following code adds a one-time event handler for the <code>exception</code> event:
5692      * </p>
5693      *
5694      * <pre>
5695      * OT.once("exception", function (event) {
5696      *   console.log(event);
5697      * }
5698      * </pre>
5699      *
5700      * <p>You can also pass in a third <code>context</code> parameter (which is optional) to define the
5701      * value of
5702      * <code>this</code> in the handler method:</p>
5703      *
5704      * <pre>
5705      * OT.once("exception",
5706      *   function (event) {
5707      *     // This is the event handler.
5708      *   },
5709      *   session
5710      * );
5711      * </pre>
5712      *
5713      * <p>
5714      * The method also supports an alternate syntax, in which the first parameter is an object that is a
5715      * hash map of
5716      * event names and handler functions and the second parameter (optional) is the context for this in
5717      * each handler:
5718      * </p>
5719      * <pre>
5720      * OT.once(
5721      *   {exeption: function (event) {
5722      *     // This is the event handler.
5723      *     }
5724      *   },
5725      *   session
5726      * );
5727      * </pre>
5728      *
5729      * @param {String} type The string identifying the type of event. You can specify multiple event
5730      * names in this string,
5731      * separating them with a space. The event handler will process the first occurence of the events.
5732      * After the first event,
5733      * the handler is removed (for all specified events).
5734      * @param {Function} handler The handler function to process the event. This function takes the event
5735      * object as a parameter.
5736      * @param {Object} context (Optional) Defines the value of <code>this</code> in the event handler
5737      * function.
5738      *
5739      * @memberof OT
5740      * @method once
5741      * @see <a href="#on">on()</a>
5742      * @see <a href="#once">once()</a>
5743      * @see <a href="#events">Events</a>
5744      */
5745/**
5746       * Removes an event handler.
5747       *
5748       * <p>Pass in an event name and a handler method, the handler is removed for that event:</p>
5749       *
5750       * <pre>OT.off("exceptionEvent", exceptionEventHandler);</pre>
5751       *
5752       * <p>If you pass in an event name and <i>no</i> handler method, all handlers are removed for that
5753       * events:</p>
5754       *
5755       * <pre>OT.off("exceptionEvent");</pre>
5756       *
5757       * <p>
5758       * The method also supports an alternate syntax, in which the first parameter is an object that is a
5759       * hash map of
5760       * event names and handler functions and the second parameter (optional) is the context for matching
5761       * handlers:
5762       * </p>
5763       * <pre>
5764       * OT.off(
5765       *   {
5766       *     exceptionEvent: exceptionEventHandler
5767       *   },
5768       *   this
5769       * );
5770       * </pre>
5771       *
5772       * @param {String} type (Optional) The string identifying the type of event. You can use a space to
5773       * specify multiple events, as in "eventName1 eventName2 eventName3". If you pass in no
5774       * <code>type</code> value (or other arguments), all event handlers are removed for the object.
5775       * @param {Function} handler (Optional) The event handler function to remove. If you pass in no
5776       * <code>handler</code>, all event handlers are removed for the specified event <code>type</code>.
5777       * @param {Object} context (Optional) If you specify a <code>context</code>, the event handler is
5778       * removed for all specified events and handlers that use the specified context.
5779       *
5780       * @memberof OT
5781       * @method off
5782       * @see <a href="#on">on()</a>
5783       * @see <a href="#once">once()</a>
5784       * @see <a href="#events">Events</a>
5785       */},function(e,t,n){var r=n(325);"string"===typeof r&&(r=[[e.i,r,""]]);var o;var i={hmr:true};i.transform=o;i.insertInto=void 0;n(339)(r,i);r.locals&&(e.exports=r.locals);false},function(e,t,n){t=e.exports=n(326)(false);var r=n(327);var o=r(n(328));var i=r(n(329));var a=r(n(330));var s=r(n(331));var c=r(n(332));var l=r(n(333));var u=r(n(334));var d=r(n(335));var f=r(n(336));var p=r(n(337));var g=r(n(338));
5785t.push([e.i,"/*!\n * Copyright (c) 2017 TokBox, Inc.\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n */\n\n/**\n * OT Base styles\n */\n\n/* Root OT object, this is where our CSS reset happens */\n.OT_root,\n.OT_root * {\n  color: #ffffff;\n  margin: 0;\n  padding: 0;\n  border: 0;\n  font-size: 100%;\n  font-family: Arial, Helvetica, sans-serif;\n  vertical-align: baseline;\n}\n\n/**\n * Specific Element Reset\n */\n\n.OT_root h1,\n.OT_root h2,\n.OT_root h3,\n.OT_root h4,\n.OT_root h5,\n.OT_root h6 {\n  color: #ffffff;\n  font-family: Arial, Helvetica, sans-serif;\n  font-size: 100%;\n  font-weight: bold;\n}\n\n.OT_root header {\n\n}\n\n.OT_root footer {\n\n}\n\n.OT_root div {\n\n}\n\n.OT_root section {\n\n}\n\n.OT_root video {\n\n}\n\n.OT_root button {\n\n}\n\n.OT_root strong {\n  font-weight: bold;\n}\n\n.OT_root em {\n  font-style: italic;\n}\n\n.OT_root a,\n.OT_root a:link,\n.OT_root a:visited,\n.OT_root a:hover,\n.OT_root a:active {\n  font-family: Arial, Helvetica, sans-serif;\n}\n\n.OT_root ul, .OT_root ol {\n  margin: 1em 1em 1em 2em;\n}\n\n.OT_root ol {\n  list-style: decimal outside;\n}\n\n.OT_root ul {\n  list-style: disc outside;\n}\n\n.OT_root dl {\n  margin: 4px;\n}\n\n.OT_root dl dt,\n.OT_root dl dd {\n  float: left;\n  margin: 0;\n  padding: 0;\n}\n\n.OT_root dl dt {\n  clear: left;\n  text-align: right;\n  width: 50px;\n}\n\n.OT_root dl dd {\n  margin-left: 10px;\n}\n\n.OT_root img {\n  border: 0 none;\n}\n\n/* Modal dialog styles */\n\n/* Modal dialog styles */\n\n.OT_dialog-centering {\n  display: table;\n  width: 100%;\n  height: 100%;\n}\n\n.OT_dialog-centering-child {\n  display: table-cell;\n  vertical-align: middle;\n}\n\n.OT_dialog {\n  position: relative;\n\n  box-sizing: border-box;\n  max-width: 576px;\n  margin-right: auto;\n  margin-left: auto;\n  padding: 36px;\n  text-align: center; /* centers all the inline content */\n\n  background-color: #363636;\n  color: #fff;\n  box-shadow: 2px 4px 6px #999;\n  font-family: 'Didact Gothic', sans-serif;\n  font-size: 13px;\n  line-height: 1.4;\n}\n\n.OT_dialog * {\n  font-family: inherit;\n  box-sizing: inherit;\n}\n\n.OT_closeButton {\n  color: #999999;\n  cursor: pointer;\n  font-size: 32px;\n  line-height: 36px;\n  position: absolute;\n  right: 18px;\n  top: 0;\n}\n\n.OT_dialog-messages {\n  text-align: center;\n}\n\n.OT_dialog-messages-main {\n  margin-bottom: 36px;\n  line-height: 36px;\n\n  font-weight: 300;\n  font-size: 24px;\n}\n\n.OT_dialog-messages-minor {\n  margin-bottom: 18px;\n\n  font-size: 13px;\n  line-height: 18px;\n  color: #A4A4A4;\n}\n\n.OT_dialog-messages-minor strong {\n  color: #ffffff;\n}\n\n.OT_dialog-actions-card {\n  display: inline-block;\n}\n\n.OT_dialog-button-title {\n  margin-bottom: 18px;\n  line-height: 18px;\n\n  font-weight: 300;\n  text-align: center;\n  font-size: 14px;\n  color: #999999;\n}\n.OT_dialog-button-title label {\n  color: #999999;\n}\n\n.OT_dialog-button-title a,\n.OT_dialog-button-title a:link,\n.OT_dialog-button-title a:active {\n  color: #02A1DE;\n}\n\n.OT_dialog-button-title strong {\n  color: #ffffff;\n  font-weight: 100;\n  display: block;\n}\n\n.OT_dialog-button {\n  display: inline-block;\n\n  margin-bottom: 18px;\n  padding: 0 1em;\n\n  background-color: #1CA3DC;\n  text-align: center;\n  cursor: pointer;\n}\n\n.OT_dialog-button:disabled {\n  cursor: not-allowed;\n  opacity: 0.5;\n}\n\n.OT_dialog-button-large {\n  line-height: 36px;\n  padding-top: 9px;\n  padding-bottom: 9px;\n\n  font-weight: 100;\n  font-size: 24px;\n}\n\n.OT_dialog-button-small {\n  line-height: 18px;\n  padding-top: 9px;\n  padding-bottom: 9px;\n\n  background-color: #444444;\n  color: #999999;\n  font-size: 16px;\n}\n\n.OT_dialog-progress-bar {\n  display: inline-block; /* prevents margin collapse */\n  width: 100%;\n  margin-top: 5px;\n  margin-bottom: 41px;\n\n  border: 1px solid #4E4E4E;\n  height: 8px;\n}\n\n.OT_dialog-progress-bar-fill {\n  height: 100%;\n\n  background-color: #29A4DA;\n}\n\n/* Helpers */\n\n.OT_centered {\n  position: fixed;\n  left: 50%;\n  top: 50%;\n  margin: 0;\n}\n\n.OT_dialog-hidden {\n  display: none;\n}\n\n.OT_dialog-button-block {\n  display: block;\n}\n\n.OT_dialog-no-natural-margin {\n  margin-bottom: 0;\n}\n\n/* Publisher and Subscriber styles */\n\n.OT_publisher, .OT_subscriber {\n  position: relative;\n  min-width: 48px;\n  min-height: 48px;\n}\n\n.OT_publisher .OT_video-element,\n.OT_subscriber .OT_video-element {\n  display: block;\n  position: absolute;\n  width: 100%;\n  height: 100%;\n\n  transform-origin: 0 0;\n}\n\n/* Styles that are applied when the video element should be mirrored */\n.OT_publisher.OT_mirrored .OT_video-element {\n  transform: scale(-1, 1);\n  transform-origin: 50% 50%;\n}\n\n.OT_subscriber_error {\n  background-color: #000;\n  color: #fff;\n  text-align: center;\n}\n\n.OT_subscriber_error > p {\n  padding: 20px;\n}\n\n/* The publisher/subscriber name/mute background */\n.OT_publisher .OT_bar,\n.OT_subscriber .OT_bar,\n.OT_publisher .OT_name,\n.OT_subscriber .OT_name,\n.OT_publisher .OT_ar
5785chiving,\n.OT_subscriber .OT_archiving,\n.OT_publisher .OT_archiving-status,\n.OT_subscriber .OT_archiving-status,\n.OT_publisher .OT_archiving-light-box,\n.OT_subscriber .OT_archiving-light-box {\n  -ms-box-sizing: border-box;\n  box-sizing: border-box;\n  top: 0;\n  left: 0;\n  right: 0;\n  display: block;\n  height: 34px;\n  position: absolute;\n}\n\n.OT_publisher .OT_bar,\n.OT_subscriber .OT_bar {\n  background: rgba(0, 0, 0, 0.4);\n}\n\n.OT_publisher .OT_edge-bar-item,\n.OT_subscriber .OT_edge-bar-item {\n  z-index: 1; /* required to get audio level meter underneath */\n}\n\n/* The publisher/subscriber name panel/archiving status bar */\n.OT_publisher .OT_name,\n.OT_subscriber .OT_name {\n  background-color: transparent;\n  color: #ffffff;\n  font-size: 15px;\n  line-height: 34px;\n  font-weight: normal;\n  padding: 0 4px 0 36px;\n  letter-spacing: normal;\n}\n\n.OT_publisher .OT_archiving-status,\n.OT_subscriber .OT_archiving-status {\n  background: rgba(0, 0, 0, 0.4);\n  top: auto;\n  bottom: 0;\n  left: 34px;\n  padding: 0 4px;\n  color: rgba(255, 255, 255, 0.8);\n  font-size: 15px;\n  line-height: 34px;\n  font-weight: normal;\n  letter-spacing: normal;\n}\n\n.OT_micro .OT_archiving-status,\n.OT_micro:hover .OT_archiving-status,\n.OT_mini .OT_archiving-status,\n.OT_mini:hover .OT_archiving-status {\n  display: none;\n}\n\n.OT_publisher .OT_archiving-light-box,\n.OT_subscriber .OT_archiving-light-box {\n  background: rgba(0, 0, 0, 0.4);\n  top: auto;\n  bottom: 0;\n  right: auto;\n  width: 34px;\n  height: 34px;\n}\n\n.OT_archiving-light {\n  width: 7px;\n  height: 7px;\n  border-radius: 30px;\n  position: absolute;\n  top: 14px;\n  left: 14px;\n  background-color: #575757;\n  box-shadow: 0 0 5px 1px #575757;\n}\n\n.OT_archiving-light.OT_active {\n  background-color: #970d13;\n  -webkit-animation: OT_pulse 1.3s ease-in;\n  -moz-animation: OT_pulse 1.3s ease-in;\n  -webkit-animation: OT_pulse 1.3s ease-in;\n  -webkit-animation-iteration-count: infinite;\n  -moz-animation-iteration-count: infinite;\n  -webkit-animation-iteration-count: infinite;\n}\n\n.OT_mini .OT_bar,\n.OT_bar.OT_mode-mini,\n.OT_bar.OT_mode-mini-auto {\n  bottom: 0;\n  height: auto;\n}\n\n.OT_mini .OT_name.OT_mode-off,\n.OT_mini .OT_name.OT_mode-on,\n.OT_mini .OT_name.OT_mode-auto,\n.OT_mini:hover .OT_name.OT_mode-auto {\n  display: none;\n}\n\n.OT_publisher .OT_name,\n.OT_subscriber .OT_name {\n    left: 10px;\n    right: 37px;\n    height: 34px;\n    padding-left: 0;\n}\n\n.OT_publisher .OT_mute,\n.OT_subscriber .OT_mute {\n    border: none;\n    cursor: pointer;\n    display: block;\n    position: absolute;\n    text-align: center;\n    text-indent: -9999em;\n    background-color: transparent;\n    background-repeat: no-repeat;\n}\n\n.OT_publisher .OT_mute,\n.OT_subscriber .OT_mute {\n  right: 0;\n  top: 0;\n  border-left: 1px solid rgba(255, 255, 255, 0.2);\n  height: 36px;\n  width: 37px;\n}\n\n.OT_mini .OT_mute,\n.OT_publisher.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold,\n.OT_subscriber.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold {\n  top: 50%;\n  left: 50%;\n  right: auto;\n  margin-top: -18px;\n  margin-left: -18.5px;\n  border-left: none;\n}\n\n.OT_publisher .OT_mute {\n  background-image: url("+o+");\n  background-position: 9px 5px;\n}\n\n.OT_publisher .OT_mute.OT_active {\n  background-image: url("+i+");\n  background-position: 9px 4px;\n}\n\n.OT_subscriber .OT_mute {\n  background-image: url("+a+");\n  background-position: 8px 7px;\n}\n\n.OT_subscriber .OT_mute.OT_active {\n  background-image: url("+s+");\n  background-position: 7px 7px;\n}\n\n/**\n * Styles for display modes\n *\n * Note: It's important that these completely control the display and opacity\n * attributes, no other selectors should atempt to change them.\n */\n\n/* Default display mode transitions for various chrome elements */\n.OT_publisher .OT_edge-bar-item,\n.OT_subscriber .OT_edge-bar-item {\n  transition-property: top, bottom, opacity;\n  transition-duration: 0.5s;\n  transition-timing-function: ease-in;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\n.OT_subscriber .OT_edge-bar-item.OT_mode-off,\n.OT_publisher .OT_edge-bar-item.OT_mode-auto,\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto,\n.OT_publisher .OT_edge-bar-item.OT_mode-mini-auto,\n.OT_subscriber .OT_edge-bar-item.OT_mode-mini-auto {\n  top: -25px;\n  opacity: 0;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\n.OT_subscriber .OT_edge-bar-item.OT_mode-off {\n  display: none;\n}\n\n.OT_mini .OT_mute.OT_mode-auto,\n.OT_publisher .OT_mute.OT_mode-mini-auto,\n.OT_subscriber .OT_mute.OT_mode-mini-auto {\n  top: 50%;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto,\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto {\n  top: auto;\n  bottom: -25px;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_mode-on,\n.OT_subscriber .OT_edge-bar-item.OT_mode-on,\n.OT_publisher .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-auto,\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-auto,\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-mini-auto,\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-mini-auto {\n  top: 0;\n  opacity: 1;\n}\n\n.OT_mini .OT_mute.OT_mode-on,\n.OT_mini:hover .OT_mute.OT_mode-auto,\n.OT_mute.OT_mode-mini,\n.OT_root:hover .OT_mute.OT_mode-mini-auto {\n  top: 50%;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\n.OT_publisher:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\n.OT_subscriber:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto {\n  top: auto;\n  bottom: 0;\n  opacity: 1;\n}\n\n\n/* Contains the video element, used to fix video letter-boxing */\n.OT_widget-container {\n  position: absolute;\n  background-color: #000000;\n  overflow: hidden;\n}\n\n.OT_hidden-audio {\n  position: absolute !important;\n  height: 1px !important;\n  width: 1px !important;\n}\n\n/* Load animation */\n.OT_root .OT_video-loading {\n  position: absolute;\n  z-index: 1;\n  width: 100%;\n  height: 100%;\n  display: none;\n\n  background-color: rgba(0, 0, 0, .75);\n}\n\n.OT_root .OT_video-loading .OT_video-loading-spinner {\n  background: url("+c+") no-repeat;\n  position: absolute;\n  width: 32px;\n  height: 32px;\n  left: 50%;\n  top: 50%;\n  margin-left: -16px;\n  margin-top: -16px;\n  animation: OT_spin 2s linear infinite;\n}\n@keyframes OT_spin {\n  100% {\n    transform: rotate(360deg);\n  }\n}\n\n.OT_publisher.OT_loading .OT_video-loading,\n.OT_subscriber.OT_loading .OT_video-loading {\n  display: block;\n}\n\n.OT_publisher.OT_loading .OT_video-element,\n.OT_subscriber.OT_loading .OT_video-element {\n  /*display: none;*/\n}\n\n.OT_video-centering {\n  display: table;\n  width: 100%;\n  height: 100%;\n}\n\n.OT_video-container {\n  display: table-cell;\n  vertical-align: middle;\n}\n\n.OT_video-poster {\n  position: absolute;\n  z-index: 1;\n  width: 100%;\n  height: 100%;\n  display: none;\n\n  opacity: .25;\n\n  background-repeat: no-repeat;\n  background-image: url("+l+");\n  background-size: auto 76%;\n}\n\n.OT_fit-mode-cover .OT_video-element {\n  -o-object-fit: cover;\n     object-fit: cover;\n}\n\n/* Workaround for iOS freezing issue when cropping videos */\n/* https://bugs.webkit.org/show_bug.cgi?id=176439 */\n@media only screen\n  and (orientation: portrait) {\n  .OT_subscriber.OT_ForceContain.OT_fit-mode-cover .OT_video-element {\n    -o-object-fit: contain !important;\n       object-fit: contain !important;\n  }\n}\n\n.OT_fit-mode-contain .OT_video-element {\n  -o-object-fit: contain;\n     object-fit: contain;\n}\n\n.OT_fit-mode-cover .OT_video-poster {\n  background-position: center bottom;\n}\n\n.OT_fit-mode-contain .OT_video-poster {\n  background-position: center;\n}\n\n.OT_audio-level-meter {\n  position: absolute;\n  width: 25%;\n  max-width: 224px;\n  min-width: 21px;\n  top: 0;\n  right: 0;\n  overflow: hidden;\n}\n\n.OT_audio-level-meter:before {\n  /* makes the height of the container equals its width */\n  content: '';\n  display: block;\n  padding-top: 100%;\n}\n\n.OT_audio-level-meter__audio-only-img {\n  position: absolute;\n  top: 22%;\n  right: 15%;\n  width: 40%;\n\n  opacity: .7;\n\n  background: url("+u+") no-repeat center;\n}\n\n.OT_audio-level-meter__audio-only-img:before {\n  /* makes the height of the container equals its width */\n  content: '';\n  display: block;\n  padding-top: 100%;\n}\n\n.OT_audio-level-meter__value {\n  will-change: transform;\n  position: absolute;\n  top: -100%;\n  right: -100%;\n  width: 200%;\n  height: 200%;\n  transform: scale(0);\n  border-radius: 50%;\n  background-image: radial-gradient(circle, rgba(151, 206, 0, 1) 0%, rgba(151, 206, 0, 0) 100%);\n}\n\n.OT_audio-level-meter.OT_mode-off {\n    display: none;\n}\n\n.OT_audio-level-meter.OT_mode-on,\n.OT_audio-only .OT_audio-level-meter.OT_mode-auto {\n  display: block;\n}\n\n.OT_audio-only.OT_publisher .OT_video-element,\n.OT_audio-only.OT_subscriber .OT_video-element {\n  display: none;\n}\n\n\n.OT_video-disabled-indicator {\n  opacity: 1;\n  border: none;\n  display: none;\n  position: absolute;\n  background-color: transparent;\n  background-repeat: no-repeat;\n  background-position: bottom right;\n  pointer-events: none;\n  top: 0;\n  left: 0;\n  bottom: 3px;\n  right: 3px;\n}\n\n.OT_video-disabled {\n  background-image: url("+d+");\n  background-size: 33px auto;\n}\n\n.OT_video-disabled-warning {\n  background-image: url("+f+");\n  background-size: 33px auto;\n}\n\n.OT_video-disabled-indicator.OT_active {\n  display: block;\n}\n\n.OT_audio-blocked-indicator {\n  opacity: 1;\n  border: none;\n  display: none;\n  position: absolute;\n  background-color: transparent;\n  background-repeat: no-repeat;\n  background-position: center;\n  pointer-events: none;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n}\n\n.OT_audio-blocked {\n  background-image: url("+p+");\n  background-size: 90px auto;\n}\n\n.OT_container-audio-blocked {\n  cursor: pointer;\n}\n\n.OT_container-audio-blocked.OT_mini .OT_edge-bar-item {\n  display: none;\n}\n\n.OT_container-audio-blocked .OT_mute {\n  display: none;\n}\n\n.OT_audio-blocked-indicator.OT_active {\n  display: block;\n}\n\n.OT_video-unsupported {\n  opacity: 1;\n  border: none;\n  display: none;\n  position: absolute;\n  background-color: transparent;\n  background-repeat: no-repeat;\n  background-position: center;\n  background-image: url("+g+");\n  background-size: 58px auto;\n  pointer-events: none;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n  margin-top: -30px;\n}\n\n.OT_video-unsupported-bar {\n  display: none;\n  position: absolute;\n  width: 192%; /* copy the size of the audio meter bar for symmetry */\n  height: 192%;\n  top: -96% /* half of the size */;\n  left: -96%;\n  border-radius: 50%;\n\n  background-color: rgba(0, 0, 0, .8);\n}\n\n.OT_video-unsupported-img {\n  display: none;\n  position: absolute;\n  top: 11%;\n  left: 15%;\n  width: 70%;\n  opacity: .7;\n  background-image: url("+g+");\n  background-repeat: no-repeat;\n  background-position: center;\n  background-size: 100% auto;\n}\n\n.OT_video-unsupported-img:before {\n  /* makes the height of the container 93% of its width (90/97 px) */\n  content: '';\n  display: block;\n  padding-top: 93%;\n}\n\n.OT_video-unsupported-text {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  text-align: center;\n  height: 100%;\n  margin-top: 40px;\n}\n\n.OT_video-unsupported.OT_active {\n  display: block;\n}\n\n.OT_mini .OT_video-unsupported,\n.OT_micro .OT_video-unsupported {\n  position: absolute;\n  width: 25%;\n  max-width: 224px;\n  min-width: 21px;\n  top: 0;\n  left: 0;\n  overflow: hidden;\n  background: none;\n  bottom: auto;\n  right: auto;\n  margin: auto;\n}\n\n.OT_mini .OT_video-unsupported:before,\n.OT_micro .OT_video-unsupported:before {\n  /* makes the height of the container equals its width */\n  content: '';\n  display: block;\n  padding-top: 100%;\n}\n\n.OT_mini .OT_video-unsupported-bar,\n.OT_micro .OT_video-unsupported-bar,\n.OT_mini .OT_video-unsupported-img,\n.OT_micro .OT_video-unsupported-img {\n  display: block;\n}\n\n.OT_mini .OT_video-unsupported-text,\n.OT_micro .OT_video-unsupported-text {\n  display: none;\n}\n\n.OT_hide-forced {\n  display: none;\n}\n\n.OT_ModalDialog {\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  right: 0px;\n  bottom: 0px;\n  z-index: 1000;\n  background-color: rgba(0, 0, 0, 0.2);\n}\n\n#tb_alert {\n  position: fixed;\n  width: 570px;\n  font-family: \"Lucida Grande\", Arial;\n  top: 50%;\n  left: 50%;\n  margin-top: -75px;\n  margin-left: -285px;\n}\n\n#tb_alert * {\n  box-sizing: border-box;\n}\n\n#tb_alert .OT_alert {\n  border-top-right-radius: 5px;\n  border-bottom-right-radius: 5px;\n  background-color: #333;\n  position: relative;\n  padding: 30px;\n  overflow: visible;\n  margin-left: 70px;\n  border-bottom-color: rgba(255, 255, 255, 0.1);\n  border-left-color: rgba(255, 255, 255, 0.1);\n\n  background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.2)), linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.2));
5785\n\n  background-image: -ms-linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.2)), -ms-linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.2));\n\n  background-size: 4px 4px;\n  background-position: 0 0, 2px 2px;\n  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);\n  border: 1px solid rgba(255, 255, 255, 0.3);\n}\n\n#tb_alert .OT_alert-exclamation {\n  background-color: #9c1408;\n  background-image: linear-gradient(0deg, #dd0c0a 0%, #9c1408 100%);\n  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);\n  border: 1px solid rgba(255, 255, 255, 0.3);\n\n  margin: -1px 0;\n\n  font-family: MS Trebuchet;\n  font-weight: bold;\n  font-size: 60px;\n  text-shadow: -1px -1px 2px rgba(0, 0, 0, 0.5);\n\n  color: white;\n  width: 65px;\n  position: absolute;\n  padding: 42px 0;\n  text-align: center;\n  left: -70px;\n  top: 0;\n  bottom: 0;\n  border-top-left-radius: 5px;\n  border-bottom-left-radius: 5px;\n\n  border-bottom-color: transparent;\n  border-left: none;\n  border-right: none;\n}\n\n#tb_alert .OT_alert-exclamation:after,\n#tb_alert .OT_alert-exclamation:before {\n  content: \" \";\n  position: absolute;\n  right: -24px;\n  top: 40%;\n  border: 12px solid transparent;\n  border-left-color: #9c1408;\n}\n\n#tb_alert .OT_alert-exclamation:before {\n  border-left-color: #bc3428;\n  top: 39%;\n}\n\n#tb_alert .OT_alert-body {\n  color: #c8c5c5;\n  margin: 0;\n  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);\n  font-size: 14px;\n  line-height: 1.3em;\n}\n\n#tb_alert .continue-text {\n  margin-top: 12px\n}\n\n#tb_alert > * a {\n  color: #a7d8df;\n  text-decoration: none;\n}\n\n#tb_alert .OT_alert-header {\n  font-size: 24px;\n  padding-bottom: 5px;\n  color: #aaa;\n  font-weight: bold;\n  position: relative;\n  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);\n  margin: 0;\n}\n\n#tb_alert .OT_alert-header::before {\n  content: attr(data-text);\n  position: absolute;\n  left: 0;\n  color: white;\n  -webkit-mask-image: -webkit-gradient(\n    linear,\n    left top, left bottom,\n    from(rgba(0, 0, 0, 1)),\n    color-stop(60%, rgba(0, 0, 0, 0)),\n    to(rgba(0, 0, 0, 0))\n  );\n}\n\n#tb_alert .OT_alert-close-button {\n  position: absolute;\n  right: 8px;\n  top: 5px;\n  background-color: #000;\n  color: #666;\n  border: none;\n  font-size: 20px;\n  /** Hack to bring it up to the proper line top */\n  line-height: 14px;\n  padding: 0;\n  padding-bottom: 3px;\n  cursor: pointer;\n}\n\n#tb_alert #section-mobile-browser,\n#tb_alert #section-supported-mobile-browser {\n  width: 200px;\n  top: 0px;\n  left: 25%;\n  margin-top: 0;\n  margin-left: 0;\n}\n\n@media all and (max-height: 300px) {\n  #tb_alert {\n    width: 100%;\n    height: 100%;\n    left: 0;\n    top: 0;\n    margin-left: 0;\n    margin-top: 0;\n  }\n  #tb_alert #section-mobile-browser,\n  #tb_alert #section-supported-mobile-browser {\n    margin-left: 0;\n    margin-top: 10px;\n    left: 0;\n  }\n}\n\n#tb_alert #section-normal-install,\n#tb_alert #section-upgrade-install,\n#tb_alert #section-mobile-browser,\n#tb_alert #section-supported-mobile-browser {\n  display: none;\n}\n",""])},function(e,t,n){e.exports=function(e){var t=[];t.toString=function toString(){return this.map((function(t){var n=cssWithMappingToString(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")};t.i=function(e,n){"string"===typeof e&&(e=[[null,e,""]]);var r={};for(var o=0;o<(this||_global3).length;o++){var i=(this||_global3)[o][0];null!=i&&(r[i]=true)}for(o=0;o<e.length;o++){var a=e[o];if(null==a[0]||!r[a[0]]){n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")");t.push(a)}}};return t};function cssWithMappingToString(e,t){var n=e[1]||"";var r=e[3];if(!r)return n;if(t&&"function"===typeof btoa){var o=toComment(r);var i=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}function toComment(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e))));var n="sourceMappingURL=data:application/json;charset=utf-8;base64,"+t;return"/*# "+n+" */"}},function(e,t,n){e.exports=function escape(e,t){if("string"!==typeof e)return e;/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1));return/["'() \t\n]/.test(e)||t?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e}},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAcCAMAAAC02HQrAAAA1VBMVEUAAAD3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj39/j3+Pj3+Pn4+Pk/JRMlAAAAQ3RSTlMABAUHCQoLDhAQERwdHiAjLjAxOD9ASFBRVl1mbnZ6fH2LjI+QkaWqrrC1uLzAwcXJycrL1NXj5Ofo6u3w9fr7/P3+d4M3+QAAAQBJREFUGBlVwYdCglAABdCLlr5Unijm3hMUtBzlBLSr//9JgUToOQgVJgceJgU8aHgMeA38K50ZOpcQmTPwcyXn+JM8M3JJIqQypiIkeXelTyIkGZPwKS1NMia1lgKTVkaE3oQQGYsmHNqSMWnTgUFbMiZtGlD2dpaxrL1XgM0i4ZK8MeAmFhsAs29MGZniawagS63oMOQUNXYB5D0D1RMDpyoMLw/fiE2og/V+PVDR5AiBl0/2Uwik+vx4xV3a5G5Ye68Nd1czjUjZckm6VhmPciRzeCZICjwTJAViQq+3e+St167rAoHK8sLYZVkBYPCZAZ/eGa+2R5LH7Wrc0YFf/O9J3yBDFaoAAAAASUVORK5CYII="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAdCAYAAABFRCf7AAADcElEQVRIiaWVXWhcRRTHf7NNd2aDtUKMIjTpg4ufFIuiUOmDEWm0Vi3VYhXRqIggQh4sWJFSig9+oOhTKSpIRUWMIBIr2kptoTbgU6ooxCiIjR+14kcJmf9sNceHnd3ebnc3Uv9wuXfOzPzmnDMz5zozGwdWAbc65w5
5785RUJQ8cC2wDJgFJioh/MJCMrNxq2vOzK4HmIvRRemxKP0RJWt53o7S+d2Yzsx6gQ+AIUDAnUqpBLzXZd4RYFUlhB/bdZacc3PAOmAcCMC7wfvFwLNdoAPAyx09bXyYWRl4E7gDmAdGlNKFwLYu8GolhO9O87RJd64GbMrgEvB68P4osMWdXLtVV7czlooNpVRWSs8DO7NpR/B+3rBHsvetCgtCMTxwQCm9BbyQrc8F7/uBex3uRCeXO0PrUZ4NfKyUPgWeyj3bg/crDNsIRGwBaJQGorQ3Svdn2wHgc2BUKb0DPJHtjwfvbwRucc7tz+N+i9LFUdoXpfVN36I0CVwBTFI/q9e1LPxT8P4qYEdu70q12mYzWw1MYQzjeJF6zq+shHC4B7jklOBPP/TzSunh4P0DwKvAfb5c9krpe+CcwsEoZdbhEvBM9wxRAl5RShcA9wAngE3B+8tLpdLuwrhp4MNmK0pfRWkySr7NXS8+L5nZbWZWy/Vin1IaitJnUTqvwevJ71lgSSWEFKUfHG7Q2m/xqFJaGry/GXgfGPLl8mJgrXPur2JoUC8Qy3OpG+sAbGhEKT0ErAWOA6uBPWbW1wr9BOgFbgKezot0kAPYqJQA1gC/A9cA+82svzksSn1R+jNKX0SpnM/e1x3yqig92JhrZivM7FjO8bSZLSuCR/Ok16K0KMNHojQWpYko7Y7S1igN5PE3ROl4lNaZ2UVmNpPBU01orvZvZPCeKFXbBR+lEKVtUapFaSZKg9njqpl9aWYTrmXCImA7sCWb9lK/jj9TrwkrgA1AH3AQuKsSwkzbrLfxpgpsBtYDxf/R3xm2ExirhNCuHHZXTsmRwiat+S/zSt06eysVA/4pmGr/G3qm6ik28v29FKgCg8BS6pvS0KNRGgZ+Bb4FpsxsOkfUlMuwDcBWYOUZOHYM2AU8WQmhBifDv70O7PjX7KZ+4G7g3FM8zd6uBIaBy4AqxnIcZwFLCovPAhE4Sj38b4BDwEeVEFKD9S94Khjn486v3QAAAABJRU5ErkJggg=="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAATCAYAAAB7u5a2AAABx0lEQVQ4jaWUv48NURiGn3ONmCs32ZBd28ht1gqyZAkF21ylQkEiSp2ehpDlD1BoFGqqVdJohYKI7MaPxMoVNghCWMF+7ybLUewnOXfcMWO9yeQ857zne8+XmZOBGjJpr0kvTIomvTZpS526UCO4DUwD64FjwCFgqZnnR+oc8LfgzKQ73vGsr42ZtGjSQFV9o8KfBCacZwCaef4YmAf2rzjcpN3A2WSpm/AssKcqPDNpDBjs410CViXzTwk/A7b1C4wxDgOngAsZcAXY2buDfp/6S4F3lDS8DjgBzDWAjX/Y/e/QgYS/AhsKHa+OMQ6GEJ4Cj4BOAxgq6aCowyZtdf4OtAr+FHDO+R4wWnVbihr3cQnICt4boO38GWj9a/icjwOACt4m4K3zEPA+AxaAtTWCnwN3lzHkEL8V/OPAGud9wK2GF9XR1Wae/1zG2AI+pGYI4VUIoRtjHAc2A9cz4LRPevYCZ+i9/4sJt4GXJU10gaPAzdI2TTro/5Tfz8XEe2LSZGmxq/SDNvP8BnA5WRrx4BwYBe6vONx1EnjovGvBLAAd4Adwuyq8UiaNmDTvr+a8SQ9MuvbfwckBHZPe+QEfTdpep+4XZmPBHiHgz74AAAAASUVORK5CYII="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAACtklEQVQ4jZ2VSYiURxTHf+/T9Nc9iRrBuYySmIsXUU9iFMEFERRBvAjJLUQi5ioiHvSScfTmgqC4XAT1ZIgLuJHkICaaQAgKI2hAUBT30bjUq7bbv4eukXK029F3+eqtv/fqK6qQdEnSNUmT6CDB/bvgfjO4N9zj2RD8007xg1IABkwEzkma0qb4PGAPMBZYLtSD8eNwAEjqTlNI0gNJM4YU7w7ut4O7gvuhZFsR3C8NC5BBLiTIY0mzM8AvqbiC++pk+zLpE95XuwAws3vAQuBPYDRwWtL84P4tsDSLv5oaug4EYOawAMF9jMdoLxqNZcDvQA04UVYqL4G/svj7AF21mhJscrvCksYBFO7xc2AAGGg2mrdjvf4rcAyomNn+slLZmUEGBgsYdh945xZJmgvckDSrEJpK6ySBgV6q12O8ABwGPjGzfWWlsjdN9rpjoSfA+DYDXARGAksK4Is3XC1Ub4z1f4CDQGFmu6tleQSYk0U+p7WVeefLJc00s4fAeWB6Qeunvj0m2ugx9gO7kmlrtSxvBfcy6fXUZS6rgG/S+jLQUwCVNmMC9HqM14EtSe+rluWazN8YEv8IqKZ1E1qnaIDO0ucx3gX6kv6TpM3AM+D/IbGjgP60/gq4WQA33gMA2OQxPgHWJX1ttSwL4FAeZGYLgB2SasBs4A8L7qOBf9M0uXQB3a+TMYSmVctyDrA9mfcBK82smSdKWgCcAaa1bTm4fxbc/8uuCQX3RanAD5Ka6Wo5IGnE0HxJPZ03pQX5Org3MsD3AO5xXLPZXJ9BjkrqdFg6QjZkgG3Jtsw93pG0VFI9QU5K6voYQBHcTydAfwheBI9HgvvPAJIWS3qeIL9JGvUxkO7gfi1BrqTvwkG/pPmSnibIqTzXPgAyEVgBjAEu1qrVPbk/PVTHgb/NbPGg/RVIzOQqzSTBaQAAAABJRU5ErkJggg=="},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0yMCAtMjAgMjQwIDI0MCI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4Mj0iMCIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjA4Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImMiIHgxPSIxIiB4Mj0iMCIgeTE9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMDgiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjE2Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgyPSIwIiB5MT0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii4xNiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMzMiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZSIgeDI9IjEiIHkxPSIxIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjMzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii42NiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJmIiB4Mj0iMSIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuNjYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiLz48L2xpbmVhckdyYWRpZW50PjxtYXNrIGlkPSJnIj48ZyBmaWxsPSJub25lIiBzdHJva2Utd2lkdGg9IjQwIj48cGF0aCBzdHJva2U9InVybCgjYSkiIGQ9Ik04Ni42LTUwYTEwMCAxMDAgMCAwMTAgMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNiKSIgZD0iTTg2LjYgNTBBMTAwIDEwMCAwIDAxMCAxMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2MpIiBkPSJNMCAxMDBhMTAwIDEwMCAwIDAxLTg2LjYtNTAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2QpIiBkPSJNLTg2LjYgNTBhMTAwIDEwMCAwIDAxMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2UpIiBkPSJNLTg2LjYtNTBBMTAwIDEwMCAwIDAxMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2YpIiBkPSJNMC0xMDBhMTAwIDEwMCAwIDAxODYuNiA1MCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAwIDEwMCkiLz48L2c+PC9tYXNrPjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4PSItMjAiIHk9Ii0yMCIgbWFzaz0idXJsKCNnKSIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg=="},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDcxIDQ2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIwIiB4Mj0iMCIgeTE9IjAiIHkyPSIxIj48c3RvcCBvZmZzZXQ9IjY2LjY2JSIgc3RvcC1jb2xvcj0iI2ZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48cGF0aCBmaWxsPSJ1cmwoI2EpIiBkPSJNNzkgMzA4YzE0LjI1LTYuNSA1NC4yNS0xOS43NSA3MS0yOSA5LTMuMjUgMjUtMjEgMjUtMjFzMy43NS0xMyAzLTIyYy0xLjc1LTYuNzUtMTUtNDMtMTUtNDMtMi41IDMtNC43NDEgMy4yNTktNyAxLTMuMjUtNy41LTIwLjUtNDQuNS0xNi01NyAxLjI1LTcuNSAxMC02IDEwLTYtMTEuMjUtMzMuNzUtOC02Ny04LTY3cy4wNzMtNy4zNDYgNi0xNWMtMy40OC42MzctOSA0LTkgNCAyLjU2My0xMS43MjcgMTUtMjEgMTUtMjEgLjE0OC0uMzEyLTEuMzIxLTEuNDU0LTEwIDEgMS41LTIuNzggMTYuNjc1LTguNjU0IDMwLTExIDMuNzg3LTkuMzYxIDEyLjc4Mi0xNy4zOTggMjItMjItMi4zNjUgMy4xMzMtMyA2LTMgNnMxNS42NDctOC4wODggNDEtNmMtMTkuNzUgMi0yNCA2LTI0IDZzNzQuNS0xMC43NSAxMDQgMzdjNy41IDkuNSAyNC43NSA1NS43NSAxMCA4OSAzLjc1LTEuNSA0LjUtNC41IDkgMSAuMjUgMTQuNzUtMTEuNSA2My0xOSA2Mi0yLjc1IDEtNC0zLTQtMy0xMC43NSAyOS41LTE0IDM4LTE0IDM4LTIgNC4yNS0zLjc1IDE4LjUtMSAyMiAxLjI1IDQuNSAyMyAyMyAyMyAyM2wxMjcgNTNjMzcgMzUgMjMgMTM1IDIzIDEzNUwwIDQ2NHMtMy05Ni43NSAxNC0xMjBjNS4yNS02LjI1IDIxLjc1LTE5Ljc1IDY1LTM2eiIvPjwvc3ZnPg=="},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNzkgODYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0iTTkuNzU3IDQwLjkyNGMzLjczOC01LjE5MSAxMi43MTEtNC4zMDggMTIuNzExLTQuMzA4IDIuMjIzID
5785MuMDE0IDUuMTI2IDI0LjU4NiAzLjYyNCAyOC43MTgtMS40MDEgMS4zMDEtMTEuNjExIDEuNjI5LTEzLjM4LTEuNDM2LTEuMjI2LTguODA0LTIuOTU1LTIyLjk3NS0yLjk1NS0yMi45NzV6bTU4Ljc4NSAwYy0zLjczNy01LjE5MS0xMi43MTEtNC4zMDgtMTIuNzExLTQuMzA4LTIuMjIzIDMuMDE0LTUuMTI2IDI0LjU4Ni0zLjYyNCAyOC43MTggMS40MDEgMS4zMDEgMTEuNjExIDEuNjI5IDEzLjM4LTEuNDM2IDEuMjI2LTguODA0IDIuOTU1LTIyLjk3NSAyLjk1NS0yMi45NzV6Ii8+PHBhdGggZD0iTTY4LjY0NyA1OC42Yy43MjktNC43NTMgMi4zOC05LjU2MSAyLjM4LTE0LjgwNCAwLTIxLjQxMi0xNC4xMTUtMzguNzctMzEuNTI4LTM4Ljc3LTE3LjQxMiAwLTMxLjUyNyAxNy4zNTgtMzEuNTI3IDM4Ljc3IDAgNC41NDEuNTE1IDguOTM2IDEuODAyIDEyLjk1IDEuNjk4IDUuMjk1LTUuNTQyIDYuOTkxLTYuNjE2IDIuMDczQzIuNDEgNTUuMzk0IDAgNTEuNzg3IDAgNDguMTAzIDAgMjEuNTM2IDE3LjY4NSAwIDM5LjUgMCA2MS4zMTYgMCA3OSAyMS41MzYgNzkgNDguMTAzYzAgLjcxOC0yLjg5OSA5LjY5My0zLjI5MiAxMS40MDgtLjc1NCAzLjI5My03Ljc1MSAzLjU4OS03LjA2MS0uOTEyeiIvPjxwYXRoIGQ9Ik01LjA4NCA1MS4zODVjLS44MDQtMy43ODIuNTY5LTcuMzM1IDMuMTM0LTcuOTIxIDIuNjM2LS42MDMgNS40ODUgMi4xNSA2LjI4OSA2LjEzMi43OTcgMy45NDgtLjc1MiA3LjQ1Ny0zLjM4OCA3Ljg1OS0yLjU2Ni4zOTEtNS4yMzctMi4zMTgtNi4wMzQtNi4wN3ptNjguODM0IDBjLjgwNC0zLjc4Mi0uNTY4LTcuMzM1LTMuMTMzLTcuOTIxLTIuNjM2LS42MDMtNS40ODUgMi4xNS02LjI4OSA2LjEzMi0uNzk3IDMuOTQ4Ljc1MiA3LjQ1NyAzLjM4OSA3Ljg1OSAyLjU2NS4zOTEgNS4yMzctMi4zMTggNi4wMzQtNi4wN3ptLTIuMDM4IDguMjg4Yy0uOTI2IDE5LjY1OS0xNS4xMTIgMjQuNzU5LTI1Ljg1OSAyMC40NzUtNS40MDUtLjYwNi0zLjAzNCAxLjI2Mi0zLjAzNCAxLjI2MiAxMy42NjEgMy41NjIgMjYuMTY4IDMuNDk3IDMxLjI3My0yMC41NDktLjU4NS00LjUxMS0yLjM3OS0xLjE4Ny0yLjM3OS0xLjE4N3oiLz48cGF0aCBkPSJNNDEuNjYyIDc4LjQyMmw3LjU1My41NWMxLjE5Mi4xMDcgMi4xMiAxLjE1MyAyLjA3MiAyLjMzNWwtLjEwOSAyLjczOGMtLjA0NyAxLjE4Mi0xLjA1MSAyLjA1NC0yLjI0MyAxLjk0NmwtNy41NTMtLjU1Yy0xLjE5MS0uMTA3LTIuMTE5LTEuMTUzLTIuMDcyLTIuMzM1bC4xMDktMi43MzdjLjA0Ny0xLjE4MiAxLjA1Mi0yLjA1NCAyLjI0My0xLjk0N3oiLz48L2c+PC9zdmc+"},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAINUlEQVR42u2aaUxUVxTHcRBmAAEBRVTK4sKwDIsg+wCK7CqIw1CN1YobbbS2qYlJ06Qx1UpdqMbYWq2pSzWmH6ytNbXWJY1Lq7VuqBERtW64V0XFLYae0/xvcp3MMAMzDz6IyT/ge2ce5/7ucpY3Ts3NzZ1ygF57AJ0gO0G2jyZPmdbFyclJSAV1EeoEaUUSLGdSV5KLLFxzFmA7QVqGqDqjixhWkxCVeyRVl38wM6bwj6yYItYK47BAuu9B0gCqs6Ng2r494KQtkj/Dz2jHraw6qw2fdSE4rNmcCPCvZONP8iF1I6kdBdMaQJWZLeJqRWa2kPJAxXY+GxE+zxLI03GRh8lGSwoi9WCY8FWlCEh+8JOnT7MfPGjMuXX7Tt61hoaCi/9cKmKdv3BxeEtim/UbNpnbQiqF4MmT7kqrbr4lkMcTo46TTSpJB5g+8NHuVWnWuaampvhmO/7duHmrGluoO4C6OsJZGRrkDIld43ZqUOTnlkDSmXmabAoBU0vqBf+6KgFSxQ9++uzZ8rZApM81TJ8xM5me0Z/UF7PuBmdVdkGEb5gYDeQmyZNW3SJLIP9Kj64lGyMpmxRN6sOfIbkoAhKOdnv2/PmB1kB88eLFo+olyyrps3rSINIAzLonnqlqK8R9w+L86vtrt5L2nhug3Vc3ULu/Liz8AOuXESlZZONH6kmr7gtLIA9lRNeRzVukAvj3BslLnJNKgfScO69K+/Lly0ZbQW7e8tNK+pwBjqaSIjDrXgJkW1ciAZvbQjQ+RDahpBBKd5ZZsqN758hmImk4KQHnpDd8UwSkCyJarx07d4+3BeKJmlMHyX4qaRxpBCmNFE4KENvHDpAutVERn1kCVBMfeRRgYvZnx62wZPdnZkw92VQA5GClQXYRBze2S+iJmpPVVoJLA9l9QKokjcWKTCT1R5rhLg70NuSsziT16diIKkuAjibrTpJNDkn/e17CahtAjlAWJAYkb29Sb1LE9Rs391kILk8mVkyuIpuZcLKUlEmKkra1WuSTNuesEPzwoEploSVAh9Oiz+BIyd9dOHhtx4OEpFpVg6gbNK3yXX1j48N6U5Dz5i/gc/FDrMY3sTLiSMEkXxGxzUEUAGnbxlPaksMlHUXWAlHS8URCPseSohZbCSLjSSU7ixLXdzhIWVKq4Y7t2a/2bN0qGeKly1fYsVmk6RgIDz4J0bonyUOcjeYqm/8hRoYbWkigV2NH9CHAS60EkUkkw47hSRs6FqT1LR5AVcsrueXlK1d5AO+RpmBrZZEiefByytPCanRGNLZY0uF52gNDYr9sCRB8MHY0SJu2OJWKS2WQV65e4y31DmkCImEi0hBfufRime0RIhpbKen0/Ny9OYNW2ghyYytABjNIaxNuKttAWk6HPLn0k0FevdZwFinPWFIuKZbUV16NVko6jbWSDoPO3pOf8K0jQWLSQ0S9bdpkYck+m7vfWpAiHfKgBsZiGSSt0FqcTeU8WETqAHE2CgcAVd3Gkm4MD3xXYeI6B4NMItvKbcUpQ9gP+KMWnSsW+TaYJtoo+avBWLoKoK0CCSDud+7eXWQGZAXqV3YoQjQCfixJ8+fzj9ta3JHhlUeJ8wJOY2ws6eRKpPS3oqTvHAESEz9ya0naXL5WH6pt3FqSOhTHkTcKEXc6k1POh4Q9YJu/03TT4a8PoGMFI4i2EqSbOZAYaBkpCyD92RkG6KCSbjI/H0HEISBnlOZPFdcEzI2GTO4KBZICGKyAKLTEmJOB2txf5MbgohBINCl4FTqmpJMB2W+HiRn1Q2l6lXyPmiEP6VVE2TfGoaMYrHyPdtAnyI0jEOn9RLWmNEhvBBE7SjpFQZaShtLK+1S+T12lRwxUvrZlVPp8jE1PikeO7C/nyEqBDCB1t7+kUx4kKUWclea0yZC5BIGpiJSNSD9QgFR0RQKkL6KxHSWdsiARHJNYewoGrzG1/bk4dTPSunL2EyDjcbb7MQ+lQfZmkKiN7SjpFAM5CWAyGcwyY84YsZ1lUcbRNNtQMAdtQWGvQ0DyVjzYAKQfQFodeAeC1C8vzymXIZqD+ZEh/2OyLSalS/3VbnJZ+VqDXGjMrTCFuK4s66vVZUNfqaDolcbjOcb899sLpEE+I20GifywXe2QR3KElu99PzqjGufhREqB1pjCnG3IL3fY1v733r2FMsiGhutn0LAoJWWIGbPxjKwgjUbF0m52mPhigrpdXOecEq9pR6MkHbu2LOtrcZ9y3d0ODTb15y9MePz48aF79+8fvXnr9sljx2u2I7KNxDuaMPGVECoRs7mC4eT7SIruFNfNHK15MKuM2evwNq+4qjxvGnd5CHwNNynawW4cOlUZdG8b55IIJHmkItwrZHH6QxB3OSL9kTtAGpIvZiQB3Z4SKBfXQtEE9sashWAW87Bt3sYZNR6zn4uzJwWDKUKXfaKCdqUoBpLxSjYe9nqGiwWRBGipuGZ3Qm76itYLbbJI/PEhUApfw73uOIy9xfse3M9F9BuFJHcYrseSouGkHtCVtkuGTTikI8XgZzhg9SeF4VqcvSWiaSvNHQ8JwkNjIfEHemCmNLD1RaEfLs18mlgNuN6PFALHo7CyU5W2g00gFAQF4ozvibH04muwDbWraSFAyt/AAMzewgGR8uCeWn77xzBxPxgzPRCDDMZ14bQ/3jqGKGoHf2Hjgx3kw5LbaJDYWb52t9FMgw4AuWNWukNeuOYqOsmQi2jgws4PA/DD/z0B2x0/veCs4naw0cgybezid7X9jV3rX2RSs0wfLkll4pBGcgifg+NYxe1kJ2ycTaRq66uG/wBOl0vjcw70xwAAAABJRU5ErkJggg=="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAGMElEQVR4Ae2aA7D0yBaAc7oH12vbRmlLaxYWb23btm3btm2899a2bWuYtPZ01cmtU9lJrib315yqr9I3Oem/5
5785/s7acwEnehEJzoxCcX2O+wEeIgRBDDaGjAZOgQ6ihRpLklHZDJIXK1WWymMIhGGkVBKCWMM+Iv/f/b5t7faYtM/sGgIS7j8RNLjceUVl41GvGN1BFiHy9sgtRWaYbhvuVQ6o1VOvV5/tLe3dyssKoZuh8xClkDEi2MMS6ZjR0cScxdK/+HgnJsmLccYOx0e/PUGUqfTJDEHkV5go9lcMQoj4R8RpSIRRUr4a9baTJFCCNfqESKJ7RYJibK0xoi05EhFRTxMi1Rit6xHAuLaKRLwEVi6q1x+EhlVpd3d3Wfh4VQkQhRhxthYLg7SRGqdLlIp7UVOHf+JhEhEMscUolVje3p63saeeOFoKsT7fjj++BNuw2I/0ouUENmGaQcQEilQvUU6xuWC0kqmVWCt8df6kG7WLoFA20VSCOyNh0RKPT+SyrTWtQsvuvTYCy84z3+oAdbgAiLGIvHjTz6bFuu/B3lKKfVkFKknwih6EnnipZdfXQZzepAupXSGSCfwUGZtkrx3t/0dSQGnnXbmdocdetArQoj+4VR23wMP3bj/vnv9Sv/rBmkish09ca655thHSrlWq4TFF1vkNDxsgjiUnPqZnHPABIq47jx7pPMcecShfz7x1DO7D6eit99576X1113nVd8rqLGAuDaNitJonTGIqHgQGQjDsJglMrUH5iDSEQbRa6y2yrNvv/PuWVmV/PTzLz8steTit1B9FtGJeZrJksmWdBzBMcami4xUkaY1A1Qe94WIaPGBApJhaERrLrXkElf8+NPPz6YMLs1DDjn0Wn9PnI/UiQadM4jNEkhzVsEGE8nIHESM1j5/KqRX+/IEiOQ/yifNBlEkpnb00cccesbpp13T3983H88/48xzrrvm6it/8U5JXgX5G6nSvSq1R5LATR7aYGkwMG1RSwkWABH+4jUb3vT/uJ1Z0xpjraTBRltrxUQhksIRmgTJyy69+Pv99tv3qYX6FxgU+fU33352xGEHf5wisU7nNWJpZRMkAjZ6aIN1mwV7h29Jo2wCHlveu/GV169z65E+T6koexCh6c+EEiky3lnxQKFjUeVyOeI5AOBzIiayRhJryd7YYnkIHgvB0qk9Tdql6N3XH4bRUIOIIIKJSiRb0hkSEpZKRd1CpEq8GxtIyCVmDSgFl94GacTgaJw1rUlYhYng0c4ewaUsmKRIJjpiqMSOCh9QeI+UYECmtQIsxEu6OorEcv6Rl0gu0woh8MhFkmSCTXVI4pC704WCFRJvSRNJSzrMMEZO2iKZTCHAZYnmvXCny7ed5vfZK3viHSBdIFCKEFj2+nt+73nw8m2uedcLJlktA++VNMEPaR45aYukcKnnCfY3/DFbZS8t7eHxNgsPM0N1hXhJJwwM1QbpoQFlog2R13a/zBxEYHAQEUYUM6qiVwEyBYoM6JFNF2kFLelI5KQf+fVI4dJFCguDS7oAyx2R6SFQJKRedSDj/cMg/RXQ6ZE05GSIDAaXdCi1I3L021SQWNJ1RLY5OiIdL4/yvuw8ADfWPFrSciaMyH8tEQPwf1uGG54g5+KlJGTmsrxsQdl5PKidnPFe2QS///7Hu+VS6WX/HYnf0sevGL7lXydwod2/9DykZq0s5yff0sgSWCigNOH7TPHL7ufj+/TH8P/+qYpL4HkBDiRYpEXeM8/89/9zzjn7EtY64dfd1nqccM7Bs8+9MKy8555/8TnKS+5MufH6EZVASkgPzf+mJXroet17JirU0ALST3nT0y5ONyLpeo1y64ih+vuQfsoTOeRFSJXa+SvyB90TUmdw49EjLaKpMQ0mzEeTzkWsd/oI6fzfiKM8gWg6X6OjpXstu5ZHnmIb0GFiu29MIUfUewkmVrEN3RqVQ/bY8FzNcquMBv/pCNUZ5pHHem01KdN/I/DG66/lLhKSvTO5M84kav5C5z2ZfyAivi9i9VGd45RH7UWJbjwGG/7NYsRECt7jiOToHedKAui8SW4CsxyRc54mKH/8f7ELhCCACyNcIl/wI+FaAJyc8yzRtinQPzWzuFZrFHq/AAAAAElFTkSuQmCC"},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUwIiBoZWlnaHQ9IjkwIj48ZGVmcz48cGF0aCBkPSJNNjcgMTJMNi40NDggNzIuNTUyIDAgMzFWMThMMjYgMGw0MSAxMnptMyA3bDYgNDctMjkgMTgtMzUuNTAyLTYuNDk4TDcwIDE5eiIgaWQ9ImEiLz48L2RlZnM+PHJlY3Qgd2lkdGg9IjE1MCIgaGVpZ2h0PSI5MCIgcng9IjM1IiByeT0iNDUiIG9wYWNpdHk9Ii41Ii8+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNikiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik0zOS4yNDkgNTEuMzEyYy42OTcgMTAuMzcgMi43ODUgMTcuODk3IDUuMjUxIDE3Ljg5NyAzLjAzOCAwIDUuNS0xMS40MTcgNS41LTI1LjVzLTIuNDYyLTI1LjUtNS41LTI1LjVjLTIuNTEgMC00LjYyOCA3Ljc5Ny01LjI4NyAxOC40NTNBOC45ODkgOC45ODkgMCAwMTQzIDQ0YTguOTg4IDguOTg4IDAgMDEtMy43NTEgNy4zMTJ6TTIwLjk4NSAzMi4yMjRsMTUuNzQ2LTE2Ljg3N2E3LjM4NSA3LjM4NSAwIDAxMTAuMzc0LS40MkM1MS43MDIgMTkuMTE0IDU0IDI5LjIwOCA1NCA0NS4yMDhjMCAxNC41MjctMi4zNDMgMjMuODgtNy4wMyAyOC4wNThhNy4yOCA3LjI4IDAgMDEtMTAuMTY4LS40NjhMMjAuNDA1IDU1LjIyNEgxMmE1IDUgMCAwMS01LTV2LTEzYTUgNSAwIDAxNS01aDguOTg1eiIgZmlsbD0iI0ZGRiIgbWFzaz0idXJsKCNiKSIvPjwvZz48cGF0aCBkPSJNMTA2LjUgMTMuNUw0NC45OTggNzUuMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg=="},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMDE1IDVWNTguMThhNSA1IDAgMDEtNSA1SDkuMTFhNSA1IDAgMDEtNS01VjI1Ljk3YTUgNSAwIDAxNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwMTQuMzA0IDIuNzAydjI2LjgzNWEzIDMgMCAwMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg=="},function(e,t,n){var r={};var memoize=function(e){var t;return function(){"undefined"===typeof t&&(t=e.apply(this||_global3,arguments));return t}};var o=memoize((function(){return window&&document&&document.all&&!window.atob}));var getTarget=function(e,t){return t?t.querySelector(e):document.querySelector(e)};var i=function(e){var t={};return function(e,n){if("function"===typeof e)return e();if("undefined"===typeof t[e]){var r=getTarget.call(this||_global3,e,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}();var a=null;var s=0;var c=[];var l=n(340);e.exports=function(e,t){if("undefined"!==typeof DEBUG&&DEBUG&&"object"!==typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{};t.attrs="object"===typeof t.attrs?t.attrs:{};t.singleton||"boolean"===typeof t.singleton||(t.singleton=o());t.insertInto||(t.insertInto="head");t.insertAt||(t.insertAt="bottom");var n=listToStyles(e,t);addStylesToDom(n,t);return function update(e){var o=[];for(var i=0;i<n.length;i++){var a=n[i];var s=r[a.id];s.refs--;o.push(s)}if(e){var c=listToStyles(e,t);addStylesToDom(c,t)}for(i=0;i<o.length;i++){s=o[i];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete r[s.id]}}}};function addStylesToDom(e,t){for(var n=0;n<e.length;n++){var o=e[n];var i=r[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(addStyle(o.parts[a],t))}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(addStyle(o.parts[a],t));r[o.id]={id:o.id,refs:1,parts:s}}}}function listToStyles(e,t){var n=[];var r={};for(var o=0;o<e.length;o++){var i=e[o];
5785var a=t.base?i[0]+t.base:i[0];var s=i[1];var c=i[2];var l=i[3];var u={css:s,media:c,sourceMap:l};r[a]?r[a].parts.push(u):n.push(r[a]={id:a,parts:[u]})}return n}function insertStyleElement(e,t){var n=i(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=c[c.length-1];if("top"===e.insertAt){r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild);c.push(t)}else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!==typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=i(e.insertAt.before,n);n.insertBefore(t,o)}}function removeStyleElement(e){if(null===e.parentNode)return false;e.parentNode.removeChild(e);var t=c.indexOf(e);t>=0&&c.splice(t,1)}function createStyleElement(e){var t=document.createElement("style");void 0===e.attrs.type&&(e.attrs.type="text/css");if(void 0===e.attrs.nonce){var n=getNonce();n&&(e.attrs.nonce=n)}addAttrs(t,e.attrs);insertStyleElement(e,t);return t}function createLinkElement(e){var t=document.createElement("link");void 0===e.attrs.type&&(e.attrs.type="text/css");e.attrs.rel="stylesheet";addAttrs(t,e.attrs);insertStyleElement(e,t);return t}function addAttrs(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function getNonce(){false;return n.nc}function addStyle(e,t){var n,r,o,i;if(t.transform&&e.css){i="function"===typeof t.transform?t.transform(e.css):t.transform.default(e.css);if(!i)return function(){};e.css=i}if(t.singleton){var c=s++;n=a||(a=createStyleElement(t));r=applyToSingletonTag.bind(null,n,c,false);o=applyToSingletonTag.bind(null,n,c,true)}else if(e.sourceMap&&"function"===typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof URL.revokeObjectURL&&"function"===typeof Blob&&"function"===typeof btoa){n=createLinkElement(t);r=updateLink.bind(null,n,t);o=function(){removeStyleElement(n);n.href&&URL.revokeObjectURL(n.href)}}else{n=createStyleElement(t);r=applyToTag.bind(null,n);o=function(){removeStyleElement(n)}}r(e);return function updateStyle(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}var u=function(){var e=[];return function(t,n){e[t]=n;return e.filter(Boolean).join("\n")}}();function applyToSingletonTag(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var i=document.createTextNode(o);var a=e.childNodes;a[t]&&e.removeChild(a[t]);a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function applyToTag(e,t){var n=t.css;var r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function updateLink(e,t,n){var r=n.css;var o=n.sourceMap;var i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=l(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"});var s=e.href;e.href=URL.createObjectURL(a);s&&URL.revokeObjectURL(s)}},function(e,t){e.exports=function(e){var t="undefined"!==typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!==typeof e)return e;var n=t.protocol+"//"+t.host;var r=n+t.pathname.replace(/\/[^\/]*$/,"/");var o=e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o))return e;var i;i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,"");return"url("+JSON.stringify(i)+")"}));return o}},function(e,t){function listCacheClear(){(this||_global3).__data__=[];(this||_global3).size=0}e.exports=listCacheClear},function(e,t,n){var r=n(80);var o=Array.prototype;var i=o.splice;
5786/**
5787       * Removes `key` and its value from the list cache.
5788       *
5789       * @private
5790       * @name delete
5791       * @memberOf ListCache
5792       * @param {string} key The key of the value to remove.
5793       * @returns {boolean} Returns `true` if the entry was removed, else `false`.
5794       */function listCacheDelete(e){var t=(this||_global3).__data__,n=r(t,e);if(n<0)return false;var o=t.length-1;
5794n==o?t.pop():i.call(t,n,1);--(this||_global3).size;return true}e.exports=listCacheDelete},function(e,t,n){var r=n(80);
5795/**
5796       * Gets the list cache value for `key`.
5797       *
5798       * @private
5799       * @name get
5800       * @memberOf ListCache
5801       * @param {string} key The key of the value to get.
5802       * @returns {*} Returns the entry value.
5803       */function listCacheGet(e){var t=(this||_global3).__data__,n=r(t,e);return n<0?void 0:t[n][1]}e.exports=listCacheGet},function(e,t,n){var r=n(80);
5804/**
5805       * Checks if a list cache value for `key` exists.
5806       *
5807       * @private
5808       * @name has
5809       * @memberOf ListCache
5810       * @param {string} key The key of the entry to check.
5811       * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
5812       */function listCacheHas(e){return r((this||_global3).__data__,e)>-1}e.exports=listCacheHas},function(e,t,n){var r=n(80);
5813/**
5814       * Sets the list cache `key` to `value`.
5815       *
5816       * @private
5817       * @name set
5818       * @memberOf ListCache
5819       * @param {string} key The key of the value to set.
5820       * @param {*} value The value to set.
5821       * @returns {Object} Returns the list cache instance.
5822       */function listCacheSet(e,t){var n=(this||_global3).__data__,o=r(n,e);if(o<0){++(this||_global3).size;n.push([e,t])}else n[o][1]=t;return this||_global3}e.exports=listCacheSet},function(e,t,n){var r=n(79);function stackClear(){(this||_global3).__data__=new r;(this||_global3).size=0}e.exports=stackClear},function(e,t){
5823/**
5824       * Removes `key` and its value from the stack.
5825       *
5826       * @private
5827       * @name delete
5828       * @memberOf Stack
5829       * @param {string} key The key of the value to remove.
5830       * @returns {boolean} Returns `true` if the entry was removed, else `false`.
5831       */
5832function stackDelete(e){var t=(this||_global3).__data__,n=t.delete(e);(this||_global3).size=t.size;return n}e.exports=stackDelete},function(e,t){
5833/**
5834       * Gets the stack value for `key`.
5835       *
5836       * @private
5837       * @name get
5838       * @memberOf Stack
5839       * @param {string} key The key of the value to get.
5840       * @returns {*} Returns the entry value.
5841       */
5842function stackGet(e){return(this||_global3).__data__.get(e)}e.exports=stackGet},function(e,t){
5843/**
5844       * Checks if a stack value for `key` exists.
5845       *
5846       * @private
5847       * @name has
5848       * @memberOf Stack
5849       * @param {string} key The key of the entry to check.
5850       * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
5851       */
5852function stackHas(e){return(this||_global3).__data__.has(e)}e.exports=stackHas},function(e,t,n){var r=n(79),o=n(109),i=n(110);var a=200;
5853/**
5854       * Sets the stack `key` to `value`.
5855       *
5856       * @private
5857       * @name set
5858       * @memberOf Stack
5859       * @param {string} key The key of the value to set.
5860       * @param {*} value The value to set.
5861       * @returns {Object} Returns the stack cache instance.
5862       */function stackSet(e,t){var n=(this||_global3).__data__;if(n instanceof r){var s=n.__data__;if(!o||s.length<a-1){s.push([e,t]);(this||_global3).size=++n.size;return this||_global3}n=(this||_global3).__data__=new i(s)}n.set(e,t);(this||_global3).size=n.size;return this||_global3}e.exports=stackSet},function(e,t,n){var r=n(15),o=n(354),i=n(9),a=n(174);var s=/[\\^$.*+?()[\]{}|]/g;var c=/^\[object .+?Constructor\]$/;var l=Function.prototype,u=Object.prototype;var d=l.toString;var f=u.hasOwnProperty;var p=RegExp("^"+d.call(f).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");
5863/**
5864       * The base implementation of `_.isNative` without bad shim checks.
5865       *
5866       * @private
5867       * @param {*} value The value to check.
5868       * @returns {boolean} Returns `true` if `value` is a native function,
5869       *  else `false`.
5870       */function baseIsNative(e){if(!i(e)||o(e))return false;var t=r(e)?p:c;return t.test(a(e))}e.exports=baseIsNative},function(e,t,n){var r=n(38);var o=Object.prototype;var i=o.hasOwnProperty;var a=o.toString;var s=r?r.toStringTag:void 0;
5871/**
5872       * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
5873       *
5874       * @private
5875       * @param {*} value The value to query.
5876       * @returns {string} Returns the raw `toStringTag`.
5877       */function getRawTag(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=true}catch(e){}var o=a.call(e);r&&(t?e[s]=n:delete e[s]);return o}e.exports=getRawTag},function(e,t){var n=Object.prototype;var r=n.toString;
5878/**
5879       * Converts `value` to a string using `Object.prototype.toString`.
5880       *
5881       * @private
5882       * @param {*} value The value to convert.
5883       * @returns {string} Returns the converted string.
5884       */function objectToString(e){return r.call(e)}e.exports=objectToString},function(e,t,n){var r=n(355);
5884var o=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();
5885/**
5886       * Checks if `func` has its source masked.
5887       *
5888       * @private
5889       * @param {Function} func The function to check.
5890       * @returns {boolean} Returns `true` if `func` is masked, else `false`.
5891       */function isMasked(e){return!!o&&o in e}e.exports=isMasked},function(e,t,n){var r=n(14);var o=r["__core-js_shared__"];e.exports=o},function(e,t){
5892/**
5893       * Gets the value at `key` of `object`.
5894       *
5895       * @private
5896       * @param {Object} [object] The object to query.
5897       * @param {string} key The key of the property to get.
5898       * @returns {*} Returns the property value.
5899       */
5900function getValue(e,t){return null==e?void 0:e[t]}e.exports=getValue},function(e,t,n){var r=n(358),o=n(79),i=n(109);function mapCacheClear(){(this||_global3).size=0;(this||_global3).__data__={hash:new r,map:new(i||o),string:new r}}e.exports=mapCacheClear},function(e,t,n){var r=n(359),o=n(360),i=n(361),a=n(362),s=n(363);
5901/**
5902       * Creates a hash object.
5903       *
5904       * @private
5905       * @constructor
5906       * @param {Array} [entries] The key-value pairs to cache.
5907       */function Hash(e){var t=-1,n=null==e?0:e.length;this.clear();while(++t<n){var r=e[t];this.set(r[0],r[1])}}Hash.prototype.clear=r;Hash.prototype.delete=o;Hash.prototype.get=i;Hash.prototype.has=a;Hash.prototype.set=s;e.exports=Hash},function(e,t,n){var r=n(81);function hashClear(){(this||_global3).__data__=r?r(null):{};(this||_global3).size=0}e.exports=hashClear},function(e,t){
5908/**
5909       * Removes `key` and its value from the hash.
5910       *
5911       * @private
5912       * @name delete
5913       * @memberOf Hash
5914       * @param {Object} hash The hash to modify.
5915       * @param {string} key The key of the value to remove.
5916       * @returns {boolean} Returns `true` if the entry was removed, else `false`.
5917       */
5918function hashDelete(e){var t=this.has(e)&&delete(this||_global3).__data__[e];(this||_global3).size-=t?1:0;return t}e.exports=hashDelete},function(e,t,n){var r=n(81);var o="__lodash_hash_undefined__";var i=Object.prototype;var a=i.hasOwnProperty;
5919/**
5920       * Gets the hash value for `key`.
5921       *
5922       * @private
5923       * @name get
5924       * @memberOf Hash
5925       * @param {string} key The key of the value to get.
5926       * @returns {*} Returns the entry value.
5927       */function hashGet(e){var t=(this||_global3).__data__;if(r){var n=t[e];return n===o?void 0:n}return a.call(t,e)?t[e]:void 0}e.exports=hashGet},function(e,t,n){var r=n(81);var o=Object.prototype;var i=o.hasOwnProperty;
5928/**
5929       * Checks if a hash value for `key` exists.
5930       *
5931       * @private
5932       * @name has
5933       * @memberOf Hash
5934       * @param {string} key The key of the entry to check.
5935       * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
5936       */function hashHas(e){var t=(this||_global3).__data__;return r?void 0!==t[e]:i.call(t,e)}e.exports=hashHas},function(e,t,n){var r=n(81);var o="__lodash_hash_undefined__";
5937/**
5938       * Sets the hash `key` to `value`.
5939       *
5940       * @private
5941       * @name set
5942       * @memberOf Hash
5943       * @param {string} key The key of the value to set.
5944       * @param {*} value The value to set.
5945       * @returns {Object} Returns the hash instance.
5946       */function hashSet(e,t){var n=(this||_global3).__data__;(this||_global3).size+=this.has(e)?0:1;n[e]=r&&void 0===t?o:t;return this||_global3}e.exports=hashSet},function(e,t,n){var r=n(82);
5947/**
5948       * Removes `key` and its value from the map.
5949       *
5950       * @private
5951       * @name delete
5952       * @memberOf MapCache
5953       * @param {string} key The key of the value to remove.
5954       * @returns {boolean} Returns `true` if the entry was removed, else `false`.
5955       */function mapCacheDelete(e){var t=r(this||_global3,e).delete(e);(this||_global3).size-=t?1:0;return t}e.exports=mapCacheDelete},function(e,t){
5956/**
5957       * Checks if `value` is suitable for use as unique object key.
5958       *
5959       * @private
5960       * @param {*} value The value to check.
5961       * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
5962       */
5963function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=isKeyable},function(e,t,n){var r=n(82);
5964/**
5965       * Gets the map value for `key`.
5966       *
5967       * @private
5968       * @name get
5969       * @memberOf MapCache
5970       * @param {string} key The key of the value to get.
5971       * @returns {*} Returns the entry value.
5972       */function mapCacheGet(e){return r(this||_global3,e).get(e)}e.exports=mapCacheGet},function(e,t,n){var r=n(82);
5973/**
5974       * Checks if a map value for `key` exists.
5975       *
5976       * @private
5977       * @name has
5978       * @memberOf MapCache
5979       * @param {string} key The key of the entry to check.
5980       * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
5981       */function mapCacheHas(e){return r(this||_global3,e).has(e)}e.exports=mapCacheHas},function(e,t,n){var r=n(82);
5982/**
5983       * Sets the map `key` to `value`.
5984       *
5985       * @private
5986       * @name set
5987       * @memberOf MapCache
5988       * @param {string} key The key of the value to set.
5989       * @param {*} value The value to set.
5990       * @returns {Object} Returns the map cache instance.
5991       */function mapCacheSet(e,t){var n=r(this||_global3,e),o=n.size;n.set(e,t);(this||_global3).size+=n.size==o?0:1;return this||_global3}e.exports=mapCacheSet},function(e,t){
5992/**
5993       * The base implementation of `_.times` without support for iteratee shorthands
5994       * or max array length checks.
5995       *
5996       * @private
5997       * @param {number} n The number of times to invoke `iteratee`.
5998       * @param {Function} iteratee The function invoked per iteration.
5999       * @returns {Array} Returns the array of results.
6000       */
6001function baseTimes(e,t){var n=-1,r=Array(e);while(++n<e)r[n]=t(n);return r}e.exports=baseTimes},function(e,t,n){var r=n(29),o=n(16);var i="[object Arguments]";
6002/**
6003       * The base implementation of `_.isArguments`.
6004       *
6005       * @private
6006       * @param {*} value The value to check.
6007       * @returns {boolean} Returns `true` if `value` is an `arguments` object,
6008       */function baseIsArguments(e){return o(e)&&r(e)==i}e.exports=baseIsArguments},function(e,t){
6009/**
6010       * This method returns `false`.
6011       *
6012       * @static
6013       * @memberOf _
6014       * @since 4.13.0
6015       * @category Util
6016       * @returns {boolean} Returns `false`.
6017       * @example
6018       *
6019       * _.times(2, _.stubFalse);
6020       * // => [false, false]
6021       */
6022function stubFalse(){return false}e.exports=stubFalse},function(e,t,n){var r=n(29),o=n(112),i=n(16);var a="[object Arguments]",s="[object Array]",c="[object Boolean]",l="[object Date]",u="[object Error]",d="[object Function]",f="[object Map]",p="[object Number]",g="[object Object]",h="[object RegExp]",b="[object Set]",v="[object String]",m="[object WeakMap]";var _="[object ArrayBuffer]",y="[object DataView]",E="[object Float32Array]",S="[object Float64Array]",T="[object Int8Array]",C="[object Int16Array]",w="[object Int32Array]",O="[object Uint8Array]",x="[object Uint8ClampedArray]",I="[object Uint16Array]",A="[object Uint32Array]";var R={};R[E]=R[S]=R[T]=R[C]=R[w]=R[O]=R[x]=R[I]=R[A]=true;R[a]=R[s]=R[_]=R[c]=R[y]=R[l]=R[u]=R[d]=R[f]=R[p]=R[g]=R[h]=R[b]=R[v]=R[m]=false;
6023/**
6024       * The base implementation of `_.isTypedArray` without Node.js optimizations.
6025       *
6026       * @private
6027       * @param {*} value The value to check.
6028       * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
6029       */function baseIsTypedArray(e){return i(e)&&o(e.length)&&!!R[r(e)]}e.exports=baseIsTypedArray},function(e,t,n){var r=n(178);var o=r(Object.keys,Object);e.exports=o},function(e,t,n){var r=n(39),o=n(52);
6030/**
6031       * The base implementation of `_.assignIn` without support for multiple sources
6032       * or `customizer` functions.
6033       *
6034       * @private
6035       * @param {Object} object The destination object.
6036       * @param {Object} source The source object.
6037       * @returns {Object} Returns `object`.
6038       */function baseAssignIn(e,t){return e&&r(t,o(t),e)}e.exports=baseAssignIn},function(e,t,n){var r=n(9),o=n(68),i=n(376);var a=Object.prototype;var s=a.hasOwnProperty;
6039/**
6040       * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
6041       *
6042       * @private
6043       * @param {Object} object The object to query.
6044       * @returns {Array} Returns the array of property names.
6045       */function baseKeysIn(e){if(!r(e))return i(e);var t=o(e),n=[];for(var a in e)"constructor"==a&&(t||!s.call(e,a))||n.push(a);return n}e.exports=baseKeysIn},function(e,t){
6046/**
6047       * This function is like
6048       * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
6049       * except that it includes inherited enumerable properties.
6050       *
6051       * @private
6052       * @param {Object} object The object to query.
6053       * @returns {Array} Returns the array of property names.
6054       */
6055function nativeKeysIn(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}e.exports=nativeKeysIn},function(e,t,n){var r=n(39),o=n(115);
6056/**
6057       * Copies own symbols of `source` to `object`.
6058       *
6059       * @private
6060       * @param {Object} source The object to copy symbols from.
6061       * @param {Object} [object={}] The object to copy symbols to.
6062       * @returns {Object} Returns `object`.
6063       */function copySymbols(e,t){return r(e,o(e),t)}e.exports=copySymbols},function(e,t){
6064/**
6065       * A specialized version of `_.filter` for arrays without support for
6066       * iteratee shorthands.
6067       *
6068       * @private
6069       * @param {Array} [array] The array to iterate over.
6070       * @param {Function} predicate The function invoked per iteration.
6071       * @returns {Array} Returns the new filtered array.
6072       */
6073function arrayFilter(e,t){var n=-1,r=null==e?0:e.length,o=0,i=[];while(++n<r){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}e.exports=arrayFilter},function(e,t,n){var r=n(39),o=n(181);
6074/**
6075       * Copies own and inherited symbols of `source` to `object`.
6076       *
6077       * @private
6078       * @param {Object} source The object to copy symbols from.
6079       * @param {Object} [object={}] The object to copy symbols to.
6080       * @returns {Object} Returns `object`.
6081       */function copySymbolsIn(e,t){return r(e,o(e),t)}e.exports=copySymbolsIn},function(e,t,n){var r=n(37),o=n(14);var i=r(o,"DataView");e.exports=i},function(e,t,n){var r=n(37),o=n(14);var i=r(o,"Promise");e.exports=i},function(e,t){var n=Object.prototype;var r=n.hasOwnProperty;
6082/**
6083       * Initializes an array clone.
6084       *
6085       * @private
6086       * @param {Array} array The array to clone.
6087       * @returns {Array} Returns the initialized clone.
6088       */function initCloneArray(e){var t=e.length,n=new e.constructor(t);if(t&&"string"==typeof e[0]&&r.call(e,"index")){n.index=e.index;n.input=e.input}return n}e.exports=initCloneArray},function(e,t,n){var r=n(118),o=n(384),i=n(385),a=n(386),s=n(188);var c="[object Boolean]",l="[object Date]",u="[object Map]",d="[object Number]",f="[object RegExp]",p="[object Set]",g="[object String]",h="[object Symbol]";var b="[object ArrayBuffer]",v="[object DataView]",m="[object Float32Array]",_="[object Float64Array]",y="[object Int8Array]",E="[object Int16Array]",S="[object Int32Array]",T="[object Uint8Array]",C="[object Uint8ClampedArray]",w="[object Uint16Array]",O="[object Uint32Array]";
6089/**
6090       * Initializes an object clone based on its `toStringTag`.
6091       *
6092       * **Note:** This function only supports cloning values with tags of
6093       * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
6094       *
6095       * @private
6096       * @param {Object} object The object to clone.
6097       * @param {string} tag The `toStringTag` of the object to clone.
6098       * @param {boolean} [isDeep] Specify a deep clone.
6099       * @returns {Object} Returns the initialized clone.
6100       */function initCloneByTag(e,t,n){var x=e.constructor;switch(t){case b:return r(e);case c:case l:return new x(+e);case v:return o(e,n);case m:case _:case y:case E:case S:case T:case C:case w:case O:return s(e,n);case u:return new x;case d:case g:return new x(e);case f:return i(e);case p:return new x;case h:return a(e)}}e.exports=initCloneByTag},function(e,t,n){var r=n(118);
6101/**
6102       * Creates a clone of `dataView`.
6103       *
6104       * @private
6105       * @param {Object} dataView The data view to clone.
6106       * @param {boolean} [isDeep] Specify a deep clone.
6107       * @returns {Object} Returns the cloned data view.
6108       */function cloneDataView(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}e.exports=cloneDataView},function(e,t){var n=/\w*$/;
6109/**
6110       * Creates a clone of `regexp`.
6111       *
6112       * @private
6113       * @param {Object} regexp The regexp to clone.
6114       * @returns {Object} Returns the cloned regexp.
6115       */function cloneRegExp(e){var t=new e.constructor(e.source,n.exec(e));t.lastIndex=e.lastIndex;return t}e.exports=cloneRegExp},function(e,t,n){var r=n(38);var o=r?r.prototype:void 0,i=o?o.valueOf:void 0;
6116/**
6117       * Creates a clone of the `symbol` object.
6118       *
6119       * @private
6120       * @param {Object} symbol The symbol object to clone.
6121       * @returns {Object} Returns the cloned symbol object.
6122       */function cloneSymbol(e){return i?Object(i.call(e)):{}}e.exports=cloneSymbol},function(e,t,n){var r=n(388),o=n(67),i=n(113);var a=i&&i.isMap;
6123/**
6124       * Checks if `value` is classified as a `Map` object.
6125       *
6126       * @static
6127       * @memberOf _
6128       * @since 4.3.0
6129       * @category Lang
6130       * @param {*} value The value to check.
6131       * @returns {boolean} Returns `true` if `value` is a map, else `false`.
6132       * @example
6133       *
6134       * _.isMap(new Map);
6135       * // => true
6136       *
6137       * _.isMap(new WeakMap);
6138       * // => false
6139       */var s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(40),o=n(16);var i="[object Map]";
6140/**
6141       * The base implementation of `_.isMap` without Node.js optimizations.
6142       *
6143       * @private
6144       * @param {*} value The value to check.
6145       * @returns {boolean} Returns `true` if `value` is a map, else `false`.
6146       */function baseIsMap(e){return o(e)&&r(e)==i}e.exports=baseIsMap},function(e,t,n){var r=n(390),o=n(67),i=n(113);var a=i&&i.isSet;
6147/**
6148       * Checks if `value` is classified as a `Set` object.
6149       *
6150       * @static
6151       * @memberOf _
6152       * @since 4.3.0
6153       * @category Lang
6154       * @param {*} value The value to check.
6155       * @returns {boolean} Returns `true` if `value` is a set, else `false`.
6156       * @example
6157       *
6158       * _.isSet(new Set);
6159       * // => true
6160       *
6161       * _.isSet(new WeakSet);
6162       * // => false
6163       */var s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(40),o=n(16);var i="[object Set]";
6164/**
6165       * The base implementation of `_.isSet` without Node.js optimizations.
6166       *
6167       * @private
6168       * @param {*} value The value to check.
6169       * @returns {boolean} Returns `true` if `value` is a set, else `false`.
6170       */function baseIsSet(e){return o(e)&&r(e)==i}e.exports=baseIsSet},function(e,t,n){(function(r){t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33
6170CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){var e=getOption("colors");return!/^(no|off|false|disabled)$/i.test(e)&&(!("undefined"===typeof window||!window.process||"renderer"!==window.process.type)||("undefined"===typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&Boolean("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)))}function formatArgs(t){var n=(this||_global3).useColors;t[0]=(n?"%c":"")+(this||_global3).namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.exports.humanize((this||_global3).diff);if(n){var r="color: "+(this||_global3).color;t.splice(1,0,r,"color: inherit");var o=0;var i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){if("%%"!==e){o++;"%c"===e&&(i=o)}}));t.splice(i,0,r)}}function log(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}
6171/**
6172         * Save `namespaces`.
6173         *
6174         * @param {String} namespaces
6175         * @api private
6176         */function save(e){try{null==e?t.storage.removeItem("debug"):t.storage.setItem("debug",e)}catch(e){}}function load(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!==typeof r&&"env"in r&&(e=r.env.DEBUG);return e}function getOption(e){var n="debug_"+e.toLowerCase();try{return t.storage.getItem(n)}catch(e){return"undefined"!==typeof r&&"env"in r?r.env[n.toUpperCase()]:void 0}}function localstorage(){try{return localStorage}catch(e){}}e.exports=n(392)(t);var o=e.exports.formatters;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this||_global3,n(69))},function(e,t,n){e.exports=function setup(e){createDebug.debug=createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=n(393);Object.keys(e).forEach((function(t){createDebug[t]=e[t]}));createDebug.instances=[];createDebug.names=[];createDebug.skips=[];createDebug.formatters={};
6177/**
6178         * Select a color.
6179         * @param {String} namespace
6180         * @return {Number}
6181         * @api private
6182         */function selectColor(e){var t,n=0;for(t in e){n=(n<<5)-n+e.charCodeAt(t);n|=0}return createDebug.colors[Math.abs(n)%createDebug.colors.length]}createDebug.selectColor=selectColor;
6183/**
6184         * Create a debugger with the given `namespace`.
6185         *
6186         * @param {String} namespace
6187         * @return {Function}
6188         * @api public
6189         */function createDebug(e){var t;function debug(){if(debug.enabled){var e=debug;var n=+new Date;var r=n-(t||n);e.diff=r;e.prev=t;e.curr=n;t=n;var o=new Array(arguments.length);for(var i=0;i<o.length;i++)o[i]=arguments[i];o[0]=createDebug.coerce(o[0]);"string"!==typeof o[0]&&o.unshift("%O");var a=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,(function(t,n){if("%%"===t)return t;a++;var r=createDebug.formatters[n];if("function"===typeof r){var i=o[a];t=r.call(e,i);o.splice(a,1);a--}return t}));createDebug.formatArgs.call(e,o);var s=e.log||createDebug.log;s.apply(e,o)}}debug.namespace=e;debug.enabled=createDebug.enabled(e);debug.useColors=createDebug.useColors();debug.color=selectColor(e);debug.destroy=destroy;"function"===typeof createDebug.init&&createDebug.init(debug);createDebug.instances.push(debug);return debug}function destroy(){var e=createDebug.instances.indexOf(this||_global3);if(-1!==e){createDebug.instances.splice(e,1);return true}return false}
6190/**
6191         * Enables a debug mode by namespaces. This can include modes
6192         * separated by a colon and wildcards.
6193         *
6194         * @param {String} namespaces
6195         * @api public
6196         */function enable(e){createDebug.save(e);createDebug.names=[];createDebug.skips=[];var t;var n=("string"===typeof e?e:"").split(/[\s,]+/);var r=n.length;for(t=0;t<r;t++)if(n[t]){e=n[t].replace(/\*/g,".*?");"-"===e[0]?createDebug.skips.push(new RegExp("^"+e.substr(1)+"$")):createDebug.names.push(new RegExp("^"+e+"$"))}for(t=0;t<createDebug.instances.length;t++){var o=createDebug.instances[t];o.enabled=createDebug.enabled(o.namespace)}}function disable(){createDebug.enable("")}
6197/**
6198         * Returns true if the given mode name is enabled, false otherwise.
6199         *
6200         * @param {String} name
6201         * @return {Boolean}
6202         * @api public
6203         */function enabled(e){if("*"===e[e.length-1])return true;var t,n;for(t=0,n=createDebug.skips.length;t<n;t++)if(createDebug.skips[t].test(e))return false;for(t=0,n=createDebug.names.length;t<n;t++)if(createDebug.names[t].test(e))return true;return false}
6204/**
6205         * Coerce `val`.
6206         *
6207         * @param {Mixed} val
6208         * @return {Mixed}
6209         * @api private
6210         */function coerce(e){return e instanceof Error?e.stack||e.message:e}createDebug.enable(createDebug.load());return createDebug}},function(e,t){var n=1e3;var r=60*n;var o=60*r;var i=24*o;var a=7*i;var s=365.25*i;
6211/**
6212       * Parse or format the given `val`.
6213       *
6214       * Options:
6215       *
6216       *  - `long` verbose formatting [false]
6217       *
6218       * @param {String|Number} val
6219       * @param {Object} [options]
6220       * @throws {Error} throw an error if val is not a non-empty string or a number
6221       * @return {String|Number}
6222       * @api public
6223       */e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return parse(e);if("number"===n&&isFinite(e))return t.long?fmtLong(e):fmtShort(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};
6224/**
6225       * Parse the given `str` and return milliseconds.
6226       *
6227       * @param {String} str
6228       * @return {Number}
6229       * @api private
6230       */function parse(e){e=String(e);if(!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);var l=(t[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*a;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*o;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}
6231/**
6232       * Short format for `ms`.
6233       *
6234       * @param {Number} ms
6235       * @return {String}
6236       * @api private
6237       */function fmtShort(e){var t=Math.abs(e);return t>=i?Math.round(e/i)+"d":t>=o?Math.round(e/o)+"h":t>=r?Math.round(e/r)+"m":t>=n?Math.round(e/n)+"s":e+"ms"}
6238/**
6239       * Long format for `ms`.
6240       *
6241       * @param {Number} ms
6242       * @return {String}
6243       * @api private
6244       */function fmtLong(e){var t=Math.abs(e);return t>=i?plural(e,t,i,"day"):t>=o?plural(e,t,o,"hour"):t>=r?plural(e,t,r,"minute"):t>=n?plural(e,t,n,"second"):e+" ms"}function plural(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}},function(e,t,n){var r=n(395),o=n(175),i=n(88);
6245/**
6246       * The base implementation of `setToString` without support for hot loop shorting.
6247       *
6248       * @private
6249       * @param {Function} func The function to modify.
6250       * @param {Function} string The `toString` result.
6251       * @returns {Function} Returns `func`.
6252       */var a=o?function(e,t){return o(e,"toString",{configurable:true,enumerable:false,value:r(t),writable:true})}:i;e.exports=a},function(e,t){
6253/**
6254       * Creates a function that returns `value`.
6255       *
6256       * @static
6257       * @memberOf _
6258       * @since 2.4.0
6259       * @category Util
6260       * @param {*} value The value to return from the new function.
6261       * @returns {Function} Returns the new constant function.
6262       * @example
6263       *
6264       * var objects = _.times(2, _.constant({ 'a': 1 }));
6265       *
6266       * console.log(objects);
6267       * // => [{ 'a': 1 }, { 'a': 1 }]
6268       *
6269       * console.log(objects[0] === objects[1]);
6270       * // => true
6271       */
6272function constant(e){return function(){return e}}e.exports=constant},function(e,t,n){const r=n(194);const o=new r;
6273/**
6274       * This method needs to memoize fns with their context, this is
6275       * so that calls to off will have the same identity to the calls
6276       * to on.
6277       * @param {function} fn
6278       * @param {object} context
6279       */function weakMemoizeBind(e,t){if(void 0===t)return e;o.has(t)||o.set(t,new r);const n=o.get(t);n.has(e)||n.set(e,e.bind(t));return n.get(e)}e.exports=weakMemoizeBind},function(e,t,n){e.exports=function(){var e,t;if("function"!==typeof WeakMap)return false;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(e){return false}return"[object WeakMap]"===String(e)&&("function"===typeof e.set&&(e.set({},1)===e&&("function"===typeof e.delete&&("function"===typeof e.has&&"one"===e.get(t)))))}},function(e,t,n){var r,o=n(42),i=n(123),a=n(401),s=n(31),c=n(402),l=n(32),u=n(201),d=n(444),f=n(43).toStringTag,p=n(445),g=Array.isArray,h=Object.defineProperty,b=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;e.exports=r=function(){var e,t=arguments[0];if(!((this||_global3)instanceof r))throw new TypeError("Constructor requires 'new'");e=p&&i&&WeakMap!==r?i(new WeakMap,v(this||_global3)):this||_global3;o(t)&&(g(t)||(t=u(t)));h(e,"__weakMapData__",l("c","$weakMap$"+c()));if(!t)return e;d(t,(function(t){s(t);e.set(t[0],t[1])}));return e};if(p){i&&i(r,WeakMap);r.prototype=Object.create(WeakMap.prototype,{constructor:l(r)})}Object.defineProperties(r.prototype,{delete:l((function(e){if(b.call(a(e),(this||_global3).__weakMapData__)){delete e[(this||_global3).__weakMapData__];return true}return false})),get:l((function(e){if(b.call(a(e),(this||_global3).__weakMapData__))return e[(this||_global3).__weakMapData__]})),has:l((function(e){return b.call(a(e),(this||_global3).__weakMapData__)})),set:l((function(e,t){h(a(e),(this||_global3).__weakMapData__,l("c",t));return this||_global3})),toString:l((function(){return"[object WeakMap]"}))});h(r.prototype,f,l("c","WeakMap"))},function(e,t,n){e.exports=function(){}},function(e,t,n){var r,o=Object.create;n(195)()||(r=n(196));e.exports=function(){var e,t,n;if(!r)return o;if(1!==r.level)return o;e={};t={};n={configurable:false,enumerable:false,writable:true,value:void 0};Object.getOwnPropertyNames(Object.prototype).forEach((function(e){t[e]="__proto__"!==e?n:{configurable:true,enumerable:false,writable:true,value:void 0}}));Object.defineProperties(e,t);Object.defineProperty(r,"nullPolyfill",{configurable:false,enumerable:false,writable:false,value:e});return function(t,n){return o(null===t?e:t,n)}}()},function(e,t,n){var r=n(197);e.exports=function(e){if(!r(e))throw new TypeError(e+" is not an Object");return e}},function(e,t,n){var r=Object.create(null),o=Math.random;e.exports=function(){var e;do{e=o().toString(36).slice(2)}while(r[e]);return e}},function(e,t,n){var r=n(404);e.exports=function(e){if("function"!==typeof e)return false;if(!hasOwnProperty.call(e,"length"))return false;try{if("number"!==typeof e.length)return false;if("function"!==typeof e.call)return false;if("function"!==typeof e.apply)return false}catch(e){return false}return!r(e)}},function(e,t,n){var r=n(124);e.exports=function(e){if(!r(e))return false;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return false}}},function(e,t,n){e.exports=function(){var e,t=Object.assign;if("function"!==typeof t)return false;e={foo:"raz"};t(e,{bar:"dwa"},{trzy:"trzy"});return e.foo+e.bar+e.trzy==="razdwatrzy"}},function(e,t,n){var r=n(407),o=n(31),i=Math.max;e.exports=function(e,t){var n,a,s,c=i(arguments.length,2);e=Object(o(e));s=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}};for(a=1;a<c;++a){t=arguments[a];r(t).forEach(s)}if(void 0!==n)throw n;return e}},function(e,t,n){e.exports=n(408)()?Object.keys:n(409)},function(e,t,n){e.exports=function(){try{Object.keys("primitive");return true}catch(e){return false}}},function(e,t,n){var r=n(42);var o=Object.keys;e.exports=function(e){return o(r(e)?Object(e):e)}},function(e,t,n){var r="razdwatrzy";e.exports=function(){return"function"===typeof r.contains&&(true===r.contains("dwa")&&false===r.contains("foo"))}},function(e,t,n){var r=String.prototype.indexOf;e.exports=function(e){return r.call(this||_global3,e,arguments[1])>-1}},function(e,t,n){var r=n(123),o=n(200),i=n(32),a=n(43),s=n(203);var c,l=Object.defineProperty;c=e.exports=function(e,t){if(!((this||_global3)instanceof c))throw new TypeError("Constructor requires 'new'");s.call(this||_global3,e);t=t?o.call(t,"key+value")?"key+value":o.call(t,"key")?"key":"value":"value";l(this||_global3,"__kind__",i("",t))};r&&r(c,s);delete c.prototype.constructor;c.prototype=Object.create(s.prototype,{_resolve:i((function(e){return"value"===(this||_global3).__kind__?(this||_global3).__list__[e]:"key+value"===(this||_global3).__kind__?[e,(this||_global3).__list__[e]]:e}))});l(c.prototype,a.toStringTag,i("c","Array Iterator"))},function(e,t,n){var r=n(91),o={object:true,symbol:true};e.exports=function(){var e=r.Symbol;var t;if("function"!==typeof e)return false;t=e("test symbol");try{String(t)}catch(e){return false}return!!o[typeof e.iterator]&&(!!o[typeof e.toPrimitive]&&!!o[typeof e.toStringTag])}},function(e,t,n){e.exports=function(){return"object"===typeof globalThis&&(!!globalThis&&globalThis.Array===Array)}},function(e,t){var naiveFallback=function(){if("object"===typeof self&&self)return self;if("object"===typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this||_global3)return this||_global3;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this||_global3},configurable:true})}catch(e){return naiveFallback()}try{return __global__||naiveFallback()}finally{delete Object.prototype.__global__}}()},function(e,t,n){var r=n(32),o=n(202),i=n(91).Symbol,a=n(418),s=n(419),c=n(420);var l=Object.create,u=Object.defineProperties,d=Object.defineProperty;var f,p,g;if("function"===typeof i)try{String(i());g=true}catch(e){}else i=null;p=function Symbol(e){if((this||_global3)instanceof p)throw new TypeError("Symbol is not a constructor");return f(e)};e.exports=f=function Symbol(e){var t;if((this||_global3)instanceof Symbol)throw new TypeError("Symbol is not a constructor");if(g)return i(e);t=l(p.prototype);e=void 0===e?"":String(e);return u(t,{__description__:r("",e),__name__:r("",a(e))})};s(f);c(f);u(p.prototype,{constructor:r(f),toString:r("",(function(){return(this||_global3).__name__}))});u(f.prototype,{toString:r((function(){return"Symbol ("+o(this||_global3).__description__+")"}
6279)),valueOf:r((function(){return o(this||_global3)}))});d(f.prototype,f.toPrimitive,r("",(function(){var e=o(this||_global3);return"symbol"===typeof e?e:e.toString()})));d(f.prototype,f.toStringTag,r("c","Symbol"));d(p.prototype,f.toStringTag,r("c",f.prototype[f.toStringTag]));d(p.prototype,f.toPrimitive,r("c",f.prototype[f.toPrimitive]))},function(e,t,n){e.exports=function(e){return!!e&&("symbol"===typeof e||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}},function(e,t,n){var r=n(32);var o=Object.create,i=Object.defineProperty,a=Object.prototype;var s=o(null);e.exports=function(e){var t,n,o=0;while(s[e+(o||"")])++o;e+=o||"";s[e]=true;t="@@"+e;i(a,t,r.gs(null,(function(e){if(!n){n=true;i(this||_global3,t,r(e));n=false}})));return t}},function(e,t,n){var r=n(32),o=n(91).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:r("",o&&o.hasInstance||e("hasInstance")),isConcatSpreadable:r("",o&&o.isConcatSpreadable||e("isConcatSpreadable")),iterator:r("",o&&o.iterator||e("iterator")),match:r("",o&&o.match||e("match")),replace:r("",o&&o.replace||e("replace")),search:r("",o&&o.search||e("search")),species:r("",o&&o.species||e("species")),split:r("",o&&o.split||e("split")),toPrimitive:r("",o&&o.toPrimitive||e("toPrimitive")),toStringTag:r("",o&&o.toStringTag||e("toStringTag")),unscopables:r("",o&&o.unscopables||e("unscopables"))})}},function(e,t,n){var r=n(32),o=n(202);var i=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:r((function(t){return i[t]?i[t]:i[t]=e(String(t))})),keyFor:r((function(e){var t;o(e);for(t in i)if(i[t]===e)return t}))})}},function(e,t,n){var r=n(31);e.exports=function(){r(this||_global3).length=0;return this||_global3}},function(e,t,n){var r=n(54),o=n(423),i=n(427),a=n(428),s=n(199),c=n(438);var l,u=Function.prototype.bind,d=Object.defineProperty,f=Object.prototype.hasOwnProperty;l=function(e,t,n){var r,s=o(t)&&i(t.value);r=a(t);delete r.writable;delete r.value;r.get=function(){if(!n.overwriteDefinition&&f.call(this||_global3,e))return s;t.value=u.call(s,n.resolveContext?n.resolveContext(this||_global3):this||_global3);d(this||_global3,e,t);return(this||_global3)[e]};return r};e.exports=function(e){var t=s(arguments[1]);
6279r(t.resolveContext)&&i(t.resolveContext);return c(e,(function(e,n){return l(n,e,t)}))}},function(e,t,n){var r=n(204),o=n(54);e.exports=function(e){return o(e)?e:r(e,"Cannot use %v",arguments[1])}},function(e,t,n){var r=n(54),o=n(124);var i=Object.prototype.toString;e.exports=function(e){if(!r(e))return null;if(o(e)){var t=e.toString;if("function"!==typeof t)return null;if(t===i)return null}try{return""+e}catch(e){return null}}},function(e,t,n){var r=n(426);var o=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=r(e);if(null===t)return"<Non-coercible to string value>";t.length>100&&(t=t.slice(0,99)+"…");t=t.replace(o,(function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}));return t}},function(e,t,n){e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(e){return null}}}},function(e,t,n){var r=n(204),o=n(198);e.exports=function(e){return o(e)?e:r(e,"%v is not a plain function",arguments[1])}},function(e,t,n){var r=n(429),o=n(125),i=n(31);e.exports=function(e){var t=Object(i(e)),n=arguments[1],a=Object(arguments[2]);if(t!==e&&!n)return t;var s={};n?r(n,(function(t){(a.ensure||t in e)&&(s[t]=e[t])})):o(s,e);return s}},function(e,t,n){e.exports=n(430)()?Array.from:n(431)},function(e,t,n){e.exports=function(){var e,t,n=Array.from;if("function"!==typeof n)return false;e=["raz","dwa"];t=n(e);return Boolean(t&&t!==e&&"dwa"===t[1])}},function(e,t,n){var r=n(43).iterator,o=n(89),i=n(432),a=n(433),s=n(70),c=n(31),l=n(42),u=n(90),d=Array.isArray,f=Function.prototype.call,p={configurable:true,enumerable:true,writable:true,value:null},g=Object.defineProperty;e.exports=function(e){var t,n,h,b,v,m,_,y,E,S,T=arguments[1],C=arguments[2];e=Object(c(e));l(T)&&s(T);if((this||_global3)&&(this||_global3)!==Array&&i(this||_global3))t=this||_global3;else{if(!T){if(o(e)){v=e.length;if(1!==v)return Array.apply(null,e);b=new Array(1);b[0]=e[0];return b}if(d(e)){b=new Array(v=e.length);for(n=0;n<v;++n)b[n]=e[n];return b}}b=[]}if(!d(e))if(void 0!==(E=e[r])){_=s(E).call(e);t&&(b=new t);y=_.next();n=0;while(!y.done){S=T?f.call(T,C,y.value,n):y.value;if(t){p.value=S;g(b,n,p)}else b[n]=S;y=_.next();++n}v=n}else if(u(e)){v=e.length;t&&(b=new t);for(n=0,h=0;n<v;++n){S=e[n];if(n+1<v){m=S.charCodeAt(0);m>=55296&&m<=56319&&(S+=e[++n])}S=T?f.call(T,C,S,h):S;if(t){p.value=S;g(b,h,p)}else b[h]=S;++h}v=h}if(void 0===v){v=a(e.length);t&&(b=new t(v));for(n=0;n<v;++n){S=T?f.call(T,C,e[n],n):e[n];if(t){p.value=S;g(b,n,p)}else b[n]=S}}if(t){p.value=null;b.length=v}return b}},function(e,t,n){var r=Object.prototype.toString,o=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);e.exports=function(e){return"function"===typeof e&&o(r.call(e))}},function(e,t,n){var r=n(434),o=Math.max;e.exports=function(e){return o(0,r(e))}},function(e,t,n){var r=n(435),o=Math.abs,i=Math.floor;e.exports=function(e){if(isNaN(e))return 0;e=Number(e);return 0!==e&&isFinite(e)?r(e)*i(o(e)):e}},function(e,t,n){e.exports=n(436)()?Math.sign:n(437)},function(e,t,n){e.exports=function(){var e=Math.sign;return"function"===typeof e&&(1===e(10)&&-1===e(-20))}},function(e,t,n){e.exports=function(e){e=Number(e);return isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,n){var r=n(70),o=n(439),i=Function.prototype.call;e.exports=function(e,t){var n={},a=arguments[2];r(t);o(e,(function(e,r,o,s){n[r]=i.call(t,a,e,r,o,s)}));return n}},function(e,t,n){e.exports=n(440)("forEach")},function(e,t,n){var r=n(70),o=n(31),i=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,c=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(n,l){var u,d=arguments[2],f=arguments[3];n=Object(o(n));r(l);u=s(n);f&&u.sort("function"===typeof f?i.call(f,n):void 0);"function"!==typeof e&&(e=u[e]);return a.call(e,u,(function(e,r){return c.call(n,e)?a.call(l,d,n[e],e,n,r):t}))}}},function(e,t,n){var r=n(123),o=n(32),i=n(43),a=n(203);var s,c=Object.defineProperty;s=e.exports=function(e){if(!((this||_global3)instanceof s))throw new TypeError("Constructor requires 'new'");e=String(e);a.call(this||_global3,e);c(this||_global3,"__length__",o("",e.length))};r&&r(s,a);delete s.prototype.constructor;s.prototype=Object.create(a.prototype,{_next:o((function(){if((this||_global3).__list__){if((this||_global3).__nextIndex__<(this||_global3).__length__)return(this||_global3).__nextIndex__++;this._unBind()}})),_resolve:o((function(e){var t,n=(this||_global3).__list__[e];if((this||_global3).__nextIndex__===(this||_global3).__length__)return n;t=n.charCodeAt(0);return t>=55296&&t<=56319?n+(this||_global3).__list__[(this||_global3).__nextIndex__++]:n}))});c(s.prototype,i.toStringTag,o("c","String Iterator"))},function(e,t,n){var r=n(443);e.exports=function(e){if(!r(e))throw new TypeError(e+" is not iterable");return e}},function(e,t,n){var r=n(89),o=n(42),i=n(90);var a=n(43).iterator,s=Array.isArray;e.exports=function(e){return!!o(e)&&(!!s(e)||(!!i(e)||(!!r(e)||"function"===typeof e[a])))}},function(e,t,n){var r=n(89),o=n(70),i=n(90),a=n(201);var s=Array.isArray,c=Function.prototype.call,l=Array.prototype.some;e.exports=function(e,t){var n,u,d,f,p,g,h,b,v=arguments[2];s(e)||r(e)?n="array":i(e)?n="string":e=a(e);o(t);d=function(){f=true};if("array"!==n)if("string"!==n){u=e.next();while(!u.done){c.call(t,v,u.value,d);if(f)return;u=e.next()}}else{g=e.length;for(p=0;p<g;++p){h=e[p];
6279if(p+1<g){b=h.charCodeAt(0);b>=55296&&b<=56319&&(h+=e[++p])}c.call(t,v,h,d);if(f)break}}else l.call(e,(function(e){c.call(t,v,e,d);return f}))}},function(e,t,n){e.exports=function(){return"function"===typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)}()},function(e,t,n){var r=n(92),o=n(93),i=n(128),a=n(33),s=n(67),c=n(94);var l=Math.min;
6280/**
6281       * The base implementation of methods like `_.intersection`, without support
6282       * for iteratee shorthands, that accepts an array of arrays to inspect.
6283       *
6284       * @private
6285       * @param {Array} arrays The arrays to inspect.
6286       * @param {Function} [iteratee] The iteratee invoked per element.
6287       * @param {Function} [comparator] The comparator invoked per element.
6288       * @returns {Array} Returns the new array of shared values.
6289       */function baseIntersection(e,t,n){var u=n?i:o,d=e[0].length,f=e.length,p=f,g=Array(f),h=Infinity,b=[];while(p--){var v=e[p];p&&t&&(v=a(v,s(t)));h=l(v.length,h);g[p]=!n&&(t||d>=120&&v.length>=120)?new r(p&&v):void 0}v=e[0];var m=-1,_=g[0];e:while(++m<d&&b.length<h){var y=v[m],E=t?t(y):y;y=n||0!==y?y:0;if(!(_?c(_,E):u(b,E,n))){p=f;while(--p){var S=g[p];if(!(S?c(S,E):u(e[p],E,n)))continue e}_&&_.push(E);b.push(y)}}return b}e.exports=baseIntersection},function(e,t){var n="__lodash_hash_undefined__";
6290/**
6291       * Adds `value` to the array cache.
6292       *
6293       * @private
6294       * @name add
6295       * @memberOf SetCache
6296       * @alias push
6297       * @param {*} value The value to cache.
6298       * @returns {Object} Returns the cache instance.
6299       */function setCacheAdd(e){(this||_global3).__data__.set(e,n);return this||_global3}e.exports=setCacheAdd},function(e,t){
6300/**
6301       * Checks if `value` is in the array cache.
6302       *
6303       * @private
6304       * @name has
6305       * @memberOf SetCache
6306       * @param {*} value The value to search for.
6307       * @returns {number} Returns `true` if `value` is found, else `false`.
6308       */
6309function setCacheHas(e){return(this||_global3).__data__.has(e)}e.exports=setCacheHas},function(e,t,n){var r=n(205),o=n(450),i=n(451);
6310/**
6311       * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
6312       *
6313       * @private
6314       * @param {Array} array The array to inspect.
6315       * @param {*} value The value to search for.
6316       * @param {number} fromIndex The index to search from.
6317       * @returns {number} Returns the index of the matched value, else `-1`.
6318       */function baseIndexOf(e,t,n){return t===t?i(e,t,n):r(e,o,n)}e.exports=baseIndexOf},function(e,t){
6319/**
6320       * The base implementation of `_.isNaN` without support for number objects.
6321       *
6322       * @private
6323       * @param {*} value The value to check.
6324       * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
6325       */
6326function baseIsNaN(e){return e!==e}e.exports=baseIsNaN},function(e,t){
6327/**
6328       * A specialized version of `_.indexOf` which performs strict equality
6329       * comparisons of values, i.e. `===`.
6330       *
6331       * @private
6332       * @param {Array} array The array to inspect.
6333       * @param {*} value The value to search for.
6334       * @param {number} fromIndex The index to search from.
6335       * @returns {number} Returns the index of the matched value, else `-1`.
6336       */
6337function strictIndexOf(e,t,n){var r=n-1,o=e.length;while(++r<o)if(e[r]===t)return r;return-1}e.exports=strictIndexOf},function(e,t,n){var r=n(129);
6338/**
6339       * Casts `value` to an empty array if it's not an array like object.
6340       *
6341       * @private
6342       * @param {*} value The value to inspect.
6343       * @returns {Array|Object} Returns the cast array-like object.
6344       */function castArrayLikeObject(e){return r(e)?e:[]}e.exports=castArrayLikeObject},function(e,t,n){(function(t){var r=n(17);var o=n(207);var i=n(454);var a=n(213);var s=n(210);
6345/**
6346         * Create an instance of Axios
6347         *
6348         * @param {Object} defaultConfig The default config for the instance
6349         * @return {Axios} A new instance of Axios
6350         */function createInstance(e){var t=new i(e);var n=o(i.prototype.request,t);r.extend(n,i.prototype,t);r.extend(n,t);return n}var c=createInstance(s);c.Axios=i;c.create=function create(e){return createInstance(a(c.defaults,e))};c.Cancel=n(214);c.CancelToken=n(467);c.isCancel=n(209);c.all=function all(e){return t.all(e)};c.spread=n(468);c.isAxiosError=n(469);e.exports=c;e.exports.default=c}).call(this||_global3,n(0))},function(e,t,n){(function(t){var r=n(17);var o=n(208);var i=n(455);var a=n(456);var s=n(213);
6351/**
6352         * Create a new instance of Axios
6353         *
6354         * @param {Object} instanceConfig The default config for the instance
6355         */function Axios(e){(this||_global3).defaults=e;(this||_global3).interceptors={request:new i,response:new i}}
6356/**
6357         * Dispatch a request
6358         *
6359         * @param {Object} config The config specific for this request (merged with this.defaults)
6360         */Axios.prototype.request=function request(e){if("string"===typeof e){e=arguments[1]||{};e.url=arguments[0]}else e=e||{};e=s((this||_global3).defaults,e);e.method?e.method=e.method.toLowerCase():(this||_global3).defaults.method?e.method=(this||_global3).defaults.method.toLowerCase():e.method="get";var n=[a,void 0];var r=t.resolve(e);(this||_global3).interceptors.request.forEach((function unshiftRequestInterceptors(e){n.unshift(e.fulfilled,e.rejected)}));(this||_global3).interceptors.response.forEach((function pushResponseInterceptors(e){n.push(e.fulfilled,e.rejected)}));while(n.length)r=r.then(n.shift(),n.shift());return r};Axios.prototype.getUri=function getUri(e){e=s((this||_global3).defaults,e);return o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};r.forEach(["delete","get","head","options"],(function forEachMethodNoData(e){Axios.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}}));r.forEach(["post","put","patch"],(function forEachMethodWithData(e){Axios.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}}));e.exports=Axios}).call(this||_global3,n(0))},function(e,t,n){var r=n(17);function InterceptorManager(){(this||_global3).handlers=[]}
6361/**
6362       * Add a new interceptor to the stack
6363       *
6364       * @param {Function} fulfilled The function to handle `then` for a `Promise`
6365       * @param {Function} rejected The function to handle `reject` for a `Promise`
6366       *
6367       * @return {Number} An ID used to remove interceptor later
6368       */InterceptorManager.prototype.use=function use(e,t){(this||_global3).handlers.push({fulfilled:e,rejected:t});return(this||_global3).handlers.length-1};
6369/**
6370       * Remove an interceptor from the stack
6371       *
6372       * @param {Number} id The ID that was returned by `use`
6373       */InterceptorManager.prototype.eject=function eject(e){(this||_global3).handlers[e]&&((this||_global3).handlers[e]=null)};
6374/**
6375       * Iterate over all the registered interceptors
6376       *
6377       * This method is particularly useful for skipping over any
6378       * interceptors that may have become `null` calling `eject`.
6379       *
6380       * @param {Function} fn The function to call for each interceptor
6381       */InterceptorManager.prototype.forEach=function forEach(e){r.forEach((this||_global3).handlers,(function forEachHandler(t){null!==t&&e(t)}))};e.exports=InterceptorManager},function(e,t,n){(function(t){var r=n(17);var o=n(457);var i=n(209);var a=n(210);function throwIfCancellationRequested(e){e.cancelToken&&e.cancelToken.throwIfRequested()}
6382/**
6383         * Dispatch a request to the server using the configured adapter.
6384         *
6385         * @param {object} config The config that is to be used for the request
6386         * @returns {Promise} The Promise to be fulfilled
6387         */e.exports=function dispatchRequest(e){throwIfCancellationRequested(e);e.headers=e.headers||{};e.data=o(e.data,e.headers,e.transformRequest);e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers);r.forEach(["delete","get","head","post","put","patch","common"],(function cleanHeaderConfig(t){delete e.headers[t]}));var n=e.adapter||a.adapter;return n(e).then((function onAdapterResolution(t){throwIfCancellationRequested(e);t.data=o(t.data,t.headers,e.transformResponse);return t}),(function onAdapterRejection(n){if(!i(n)){throwIfCancellationRequested(e);n&&n.response&&(n.response.data=o(n.response.data,n.response.headers,e.transformResponse))}return t.reject(n)}))}}).call(this||_global3,n(0))},function(e,t,n){var r=n(17);
6388/**
6389       * Transform the data for a request or a response
6390       *
6391       * @param {Object|String} data The data to be transformed
6392       * @param {Array} headers The headers for the request or response
6393       * @param {Array|Function} fns A single function or Array of functions
6394       * @returns {*} The resulting transformed data
6395       */e.exports=function transformData(e,t,n){r.forEach(n,(function transform(n){e=n(e,t)}));return e}},function(e,t,n){var r=n(17);e.exports=function normalizeHeaderName(e,t){r.forEach(e,(function processHeader(n,r){if(r!==t&&r.toUpperCase()===t.toUpperCase()){e[t]=n;delete e[r]}}))}},function(e,t,n){var r=n(212);
6396/**
6397       * Resolve or reject a Promise based on response status.
6398       *
6399       * @param {Function} resolve A function that resolves the promise.
6400       * @param {Function} reject A function that rejects the promise.
6401       * @param {object} response The response.
6402       */e.exports=function settle(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){
6403/**
6404       * Update an Error with the specified config, error code, and response.
6405       *
6406       * @param {Error} error The error to update.
6407       * @param {Object} config The config.
6408       * @param {string} [code] The error code (for example, 'ECONNABORTED').
6409       * @param {Object} [request] The request.
6410       * @param {Object} [response] The response.
6411       * @returns {Error} The error.
6412       */
6413e.exports=function enhanceError(e,t,n,r,o){e.config=t;n&&(e.code=n);e.request=r;e.response=o;e.isAxiosError=true;e.toJSON=function toJSON(){return{message:(this||_global3).message,name:(this||_global3).name,description:(this||_global3).description,number:(this||_global3).number,fileName:(this||_global3).fileName,lineNumber:(this||_global3).lineNumber,columnNumber:(this||_global3).columnNumber,stack:(this||_global3).stack,config:(this||_global3).config,code:(this||_global3).code}};return e}},function(e,t,n){var r=n(17);e.exports=r.isStandardBrowserEnv()?function standardBrowserEnv(){return{write:function write(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t));r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString());r.isString(o)&&s.push("path="+o);r.isString(i)&&s.push("domain="+i);true===a&&s.push("secure");document.cookie=s.join("; ")},read:function read(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function remove(e){this.write(e,"",Date.now()-864e5)}}}():function nonStandardBrowserEnv(){return{write:function write(){},read:function read(){return null},remove:function remove(){}}}()},function(e,t,n){var r=n(463);var o=n(464);
6414/**
6415       * Creates a new URL by combining the baseURL with the requestedURL,
6416       * only when the requestedURL is not already an absolute URL.
6417       * If the requestURL is absolute, this function returns the requestedURL untouched.
6418       *
6419       * @param {string} baseURL The base URL
6420       * @param {string} requestedURL Absolute or relative URL to combine
6421       * @returns {string} The combined full path
6422       */e.exports=function buildFullPath(e,t){return e&&!r(t)?o(e,t):t}},function(e,t,n){
6423/**
6424       * Determines whether the specified URL is absolute
6425       *
6426       * @param {string} url The URL to test
6427       * @returns {boolean} True if the specified URL is absolute, otherwise false
6428       */
6429e.exports=function isAbsoluteURL(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){
6430/**
6431       * Creates a new URL by combining the specified URLs
6432       *
6433       * @param {string} baseURL The base URL
6434       * @param {string} relativeURL The relative URL
6435       * @returns {string} The combined URL
6436       */
6437e.exports=function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){var r=n(17);var o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];
6438/**
6439       * Parse headers into an object
6440       *
6441       * ```
6442       * Date: Wed, 27 Aug 2014 08:58:49 GMT
6443       * Content-Type: application/json
6444       * Connection: keep-alive
6445       * Transfer-Encoding: chunked
6446       * ```
6447       *
6448       * @param {String} headers Headers needing to be parsed
6449       * @returns {Object} Headers parsed into an object
6450       */e.exports=function parseHeaders(e){var t={};var n;var i;var a;if(!e)return t;r.forEach(e.split("\n"),(function parser(e){a=e.indexOf(":");n=r.trim(e.substr(0,a)).toLowerCase();i=r.trim(e.substr(a+1));if(n){if(t[n]&&o.indexOf(n)>=0)return;t[n]="set-cookie"===n?(t[n]?t[n]:[]).concat([i]):t[n]?t[n]+", "+i:i}}));return t}},function(e,t,n){var r=n(17);e.exports=r.isStandardBrowserEnv()?function standardBrowserEnv(){var e=/(msie|trident)/i.test(navigator.userAgent);var t=document.createElement("a");var n;
6451/**
6452        * Parse a URL to discover it's components
6453        *
6454        * @param {String} url The URL to be parsed
6455        * @returns {Object}
6456        */function resolveURL(n){var r=n;if(e){t.setAttribute("href",r);r=t.href}t.setAttribute("href",r);return{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}n=resolveURL(window.location.href);
6457/**
6458        * Determine if a URL shares the same origin as the current location
6459        *
6460        * @param {String} requestURL The URL to test
6461        * @returns {boolean} True if URL shares the same origin, otherwise false
6462        */return function isURLSameOrigin(e){var t=r.isString(e)?resolveURL(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function nonStandardBrowserEnv(){return function isURLSameOrigin(){return true}}()},function(e,t,n){(function(t){var r=n(214);
6463/**
6464         * A `CancelToken` is an object that can be used to request cancellation of an operation.
6465         *
6466         * @class
6467         * @param {Function} executor The executor function.
6468         */function CancelToken(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var n;(this||_global3).promise=new t((function promiseExecutor(e){n=e}));var o=this||_global3;e((function cancel(e){if(!o.reason){o.reason=new r(e);n(o.reason)}}))}CancelToken.prototype.throwIfRequested=function throwIfRequested(){if((this||_global3).reason)throw(this||_global3).reason};CancelToken.source=function source(){var e;var t=new CancelToken((function executor(t){e=t}));return{token:t,cancel:e}};e.exports=CancelToken}).call(this||_global3,n(0))},function(e,t,n){
6469/**
6470       * Syntactic sugar for invoking a function and expanding an array for arguments.
6471       *
6472       * Common use case would be to use `Function.prototype.apply`.
6473       *
6474       *  ```js
6475       *  function f(x, y, z) {}
6476       *  var args = [1, 2, 3];
6477       *  f.apply(null, args);
6478       *  ```
6479       *
6480       * With `spread` this example can be re-written.
6481       *
6482       *  ```js
6483       *  spread(function(x, y, z) {})([1, 2, 3]);
6484       *  ```
6485       *
6486       * @param {Function} callback
6487       * @returns {Function}
6488       */
6489e.exports=function spread(e){return function wrap(t){return e.apply(null,t)}}},function(e,t,n){
6490/**
6491       * Determines whether the payload is an error thrown by Axios
6492       *
6493       * @param {*} payload The value to test
6494       * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
6495       */
6496e.exports=function isAxiosError(e){return"object"===typeof e&&true===e.isAxiosError}},function(e,t,n){var r=n(215),o=r("pick",n(47));o.placeholder=n(130);e.exports=o},function(e,t,n){var r=n(472),o=n(130);var i=Array.prototype.push;
6497/**
6498       * Creates a function, with an arity of `n`, that invokes `func` with the
6499       * arguments it receives.
6500       *
6501       * @private
6502       * @param {Function} func The function to wrap.
6503       * @param {number} n The arity of the new function.
6504       * @returns {Function} Returns the new function.
6505       */function baseArity(e,t){return 2==t?function(t,n){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}
6506/**
6507       * Creates a function that invokes `func`, with up to `n` arguments, ignoring
6508       * any additional arguments.
6509       *
6510       * @private
6511       * @param {Function} func The function to cap arguments for.
6512       * @param {number} n The arity cap.
6513       * @returns {Function} Returns the new function.
6514       */function baseAry(e,t){return 2==t?function(t,n){return e(t,n)}:function(t){return e(t)}}
6515/**
6516       * Creates a clone of `array`.
6517       *
6518       * @private
6519       * @param {Array} array The array to clone.
6520       * @returns {Array} Returns the cloned array.
6521       */function cloneArray(e){var t=e?e.length:0,n=Array(t);while(t--)n[t]=e[t];return n}
6522/**
6523       * Creates a function that clones a given object using the assignment `func`.
6524       *
6525       * @private
6526       * @param {Function} func The assignment function.
6527       * @returns {Function} Returns the new cloner function.
6528       */function createCloner(e){return function(t){return e({},t)}}
6529/**
6530       * A specialized version of `_.spread` which flattens the spread array into
6531       * the arguments of the invoked `func`.
6532       *
6533       * @private
6534       * @param {Function} func The function to spread arguments over.
6535       * @param {number} start The start position of the spread.
6536       * @returns {Function} Returns the new function.
6537       */function flatSpread(e,t){return function(){var n=arguments.length,r=n-1,o=Array(n);while(n--)o[n]=arguments[n];var a=o[t],s=o.slice(0,t);a&&i.apply(s,a);t!=r&&i.apply(s,o.slice(t+1));return e.apply(this||_global3,s)}}
6538/**
6539       * Creates a function that wraps `func` and uses `cloner` to clone the first
6540       * argument it receives.
6541       *
6542       * @private
6543       * @param {Function} func The function to wrap.
6544       * @param {Function} cloner The function to clone arguments.
6545       * @returns {Function} Returns the new immutable function.
6546       */function wrapImmutable(e,t){return function(){var n=arguments.length;if(n){var r=Array(n);while(n--)r[n]=arguments[n];var o=r[0]=t.apply(void 0,r);e.apply(void 0,r);return o}}}
6547/**
6548       * The base implementation of `convert` which accepts a `util` object of methods
6549       * required to perform conversions.
6550       *
6551       * @param {Object} util The util object.
6552       * @param {string} name The name of the function to convert.
6553       * @param {Function} func The function to convert.
6554       * @param {Object} [options] The options object.
6555       * @param {boolean} [options.cap=true] Specify capping iteratee arguments.
6556       * @param {boolean} [options.curry=true] Specify currying.
6557       * @param {boolean} [options.fixed=true] Specify fixed arity.
6558       * @param {boolean} [options.immutable=true] Specify immutable operations.
6559       * @param {boolean} [options.rearg=true] Specify rearranging arguments.
6560       * @returns {Function|Object} Returns the converted function or object.
6561       */function baseConvert(e,t,n,i){var a="function"==typeof t,s=t===Object(t);if(s){i=n;n=t;t=void 0}if(null==n)throw new TypeError;i||(i={});
6561var c={cap:!("cap"in i)||i.cap,curry:!("curry"in i)||i.curry,fixed:!("fixed"in i)||i.fixed,immutable:!("immutable"in i)||i.immutable,rearg:!("rearg"in i)||i.rearg};var l=a?n:o,u="curry"in i&&i.curry,d="fixed"in i&&i.fixed,f="rearg"in i&&i.rearg,p=a?n.runInContext():void 0;var g=a?n:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath};var h=g.ary,b=g.assign,v=g.clone,m=g.curry,_=g.forEach,y=g.isArray,E=g.isError,S=g.isFunction,T=g.isWeakMap,C=g.keys,w=g.rearg,O=g.toInteger,x=g.toPath;var I=C(r.aryMethod);var A={castArray:function(e){return function(){var t=arguments[0];return y(t)?e(cloneArray(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],n=arguments[1],r=e(t,n),o=r.length;if(c.cap&&"number"==typeof n){n=n>2?n-2:1;return o&&o<=n?r:baseAry(r,n)}return r}},mixin:function(e){return function(t){var n=this||_global3;if(!S(n))return e(n,Object(t));var r=[];_(C(t),(function(e){S(t[e])&&r.push([e,n.prototype[e]])}));e(n,Object(t));_(r,(function(e){var t=e[1];S(t)?n.prototype[e[0]]=t:delete n.prototype[e[0]]}));return n}},nthArg:function(e){return function(t){var n=t<0?1:O(t)+1;return m(e(t),n)}},rearg:function(e){return function(t,n){var r=n?n.length:0;return m(e(t,n),r)}},runInContext:function(t){return function(n){return baseConvert(e,t(n),i)}}};
6562/**
6563         * Casts `func` to a function with an arity capped iteratee if needed.
6564         *
6565         * @private
6566         * @param {string} name The name of the function to inspect.
6567         * @param {Function} func The function to inspect.
6568         * @returns {Function} Returns the cast function.
6569         */function castCap(e,t){if(c.cap){var n=r.iterateeRearg[e];if(n)return iterateeRearg(t,n);var o=!a&&r.iterateeAry[e];if(o)return iterateeAry(t,o)}return t}
6570/**
6571         * Casts `func` to a curried function if needed.
6572         *
6573         * @private
6574         * @param {string} name The name of the function to inspect.
6575         * @param {Function} func The function to inspect.
6576         * @param {number} n The arity of `func`.
6577         * @returns {Function} Returns the cast function.
6578         */function castCurry(e,t,n){return u||c.curry&&n>1?m(t,n):t}
6579/**
6580         * Casts `func` to a fixed arity function if needed.
6581         *
6582         * @private
6583         * @param {string} name The name of the function to inspect.
6584         * @param {Function} func The function to inspect.
6585         * @param {number} n The arity cap.
6586         * @returns {Function} Returns the cast function.
6587         */function castFixed(e,t,n){if(c.fixed&&(d||!r.skipFixed[e])){var o=r.methodSpread[e],i=o&&o.start;return void 0===i?h(t,n):flatSpread(t,i)}return t}
6588/**
6589         * Casts `func` to an rearged function if needed.
6590         *
6591         * @private
6592         * @param {string} name The name of the function to inspect.
6593         * @param {Function} func The function to inspect.
6594         * @param {number} n The arity of `func`.
6595         * @returns {Function} Returns the cast function.
6596         */function castRearg(e,t,n){return c.rearg&&n>1&&(f||!r.skipRearg[e])?w(t,r.methodRearg[e]||r.aryRearg[n]):t}
6597/**
6598         * Creates a clone of `object` by `path`.
6599         *
6600         * @private
6601         * @param {Object} object The object to clone.
6602         * @param {Array|string} path The path to clone by.
6603         * @returns {Object} Returns the cloned object.
6604         */function cloneByPath(e,t){t=x(t);var n=-1,r=t.length,o=r-1,i=v(Object(e)),a=i;while(null!=a&&++n<r){var s=t[n],c=a[s];null==c||S(c)||E(c)||T(c)||(a[s]=v(n==o?c:Object(c)));a=a[s]}return i}
6605/**
6606         * Converts `lodash` to an immutable auto-curried iteratee-first data-last
6607         * version with conversion `options` applied.
6608         *
6609         * @param {Object} [options] The options object. See `baseConvert` for more details.
6610         * @returns {Function} Returns the converted `lodash`.
6611         */function convertLib(e){return R.runInContext.convert(e)(void 0)}
6612/**
6613         * Create a converter function for `func` of `name`.
6614         *
6615         * @param {string} name The name of the function to convert.
6616         * @param {Function} func The function to convert.
6617         * @returns {Function} Returns the new converter function.
6618         */function createConverter(e,t){var n=r.aliasToReal[e]||e,o=r.remap[n]||n,s=i;return function(e){var r=a?p:g,i=a?p[o]:t,c=b(b({},s),e);return baseConvert(r,n,i,c)}}
6619/**
6620         * Creates a function that wraps `func` to invoke its iteratee, with up to `n`
6621         * arguments, ignoring any additional arguments.
6622         *
6623         * @private
6624         * @param {Function} func The function to cap iteratee arguments for.
6625         * @param {number} n The arity cap.
6626         * @returns {Function} Returns the new function.
6627         */function iterateeAry(e,t){return overArg(e,(function(e){return"function"==typeof e?baseAry(e,t):e}))}
6628/**
6629         * Creates a function that wraps `func` to invoke its iteratee with arguments
6630         * arranged according to the specified `indexes` where the argument value at
6631         * the first index is provided as the first argument, the argument value at
6632         * the second index is provided as the second argument, and so on.
6633         *
6634         * @private
6635         * @param {Function} func The function to rearrange iteratee arguments for.
6636         * @param {number[]} indexes The arranged argument indexes.
6637         * @returns {Function} Returns the new function.
6638         */function iterateeRearg(e,t){return overArg(e,(function(e){var n=t.length;return baseArity(w(baseAry(e,n),t),n)}))}
6639/**
6640         * Creates a function that invokes `func` with its first argument transformed.
6641         *
6642         * @private
6643         * @param {Function} func The function to wrap.
6644         * @param {Function} transform The argument transform.
6645         * @returns {Function} Returns the new function.
6646         */function overArg(e,t){return function(){var n=arguments.length;if(!n)return e();var r=Array(n);while(n--)r[n]=arguments[n];var o=c.rearg?0:n-1;r[o]=t(r[o]);return e.apply(void 0,r)}}
6647/**
6648         * Creates a function that wraps `func` and applys the conversions
6649         * rules by `name`.
6650         *
6651         * @private
6652         * @param {string} name The name of the function to wrap.
6653         * @param {Function} func The function to wrap.
6654         * @returns {Function} Returns the converted function.
6655         */function wrap(e,t,n){var o,i=r.aliasToReal[e]||e,a=t,s=A[i];s?a=s(t):c.immutable&&(r.mutate.array[i]?a=wrapImmutable(t,cloneArray):r.mutate.object[i]?a=wrapImmutable(t,createCloner(t)):r.mutate.set[i]&&(a=wrapImmutable(t,cloneByPath)));_(I,(function(e){_(r.aryMethod[e],(function(t){if(i==t){var n=r.methodSpread[i],s=n&&n.afterRearg;o=s?castFixed(i,castRearg(i,a,e),e):castRearg(i,castFixed(i,a,e),e);o=castCap(i,o);o=castCurry(i,o,e);return false}}));return!o}));o||(o=a);
6655o==t&&(o=u?m(o,1):function(){return t.apply(this||_global3,arguments)});o.convert=createConverter(i,t);o.placeholder=t.placeholder=n;return o}if(!s)return wrap(t,n,l);var R=n;var k=[];_(I,(function(e){_(r.aryMethod[e],(function(e){var t=R[r.remap[e]||e];t&&k.push([e,wrap(e,t,R)])}))}));_(C(R),(function(e){var t=R[e];if("function"==typeof t){var n=k.length;while(n--)if(k[n][0]==e)return;t.convert=createConverter(e,t);k.push([e,t])}}));_(k,(function(e){R[e[0]]=e[1]}));R.convert=convertLib;R.placeholder=R;_(C(R),(function(e){_(r.realToAlias[e]||[],(function(t){R[t]=R[e]}))}));return R}e.exports=baseConvert},function(e,t){t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"};t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]};t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]};t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom
6655:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2};t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]};t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]};t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}};t.mutate={array:{fill:true,pull:true,pullAll:true,pullAllBy:true,pullAllWith:true,pullAt:true,remove:true,reverse:true},object:{assign:true,assignAll:true,assignAllWith:true,assignIn:true,assignInAll:true,assignInAllWith:true,assignInWith:true,assignWith:true,defaults:true,defaultsAll:true,defaultsDeep:true,defaultsDeepAll:true,merge:true,mergeAll:true,mergeAllWith:true,mergeWith:true},set:{set:true,setWith:true,unset:true,update:true,updateWith:true}};t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,n=t.aliasToReal,r={};for(var o in n){var i=n[o];e.call(r,i)?r[i].push(o):r[i]=[o]}return r}();t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"};t.skipFixed={castArray:true,flow:true,flowRight:true,iteratee:true,mixin:true,rearg:true,runInContext:true};t.skipRearg={add:true,assign:true,assignIn:true,bind:true,bindKey:true,concat:true,difference:true,divide:true,eq:true,gt:true,gte:true,isEqual:true,lt:true,lte:true,matchesProperty:true,merge:true,multiply:true,overArgs:true,partial:true,partialRight:true,propertyOf:true,random:true,range:true,rangeRight:true,subtract:true,zip:true,zipObject:true,zipObjectDeep:true}},function(e,t,n){e.exports={ary:n(474),assign:n(176),clone:n(36),curry:n(492),forEach:n(111),isArray:n(10),isError:n(493),isFunction:n(15),isWeakMap:n(494),iteratee:n(495),keys:n(114),rearg:n(510),toInteger:n(96),toPath:n(513)}},function(e,t,n){var r=n(131);var o=128;
6656/**
6657       * Creates a function that invokes `func`, with up to `n` arguments,
6658       * ignoring any additional arguments.
6659       *
6660       * @static
6661       * @memberOf _
6662       * @since 3.0.0
6663       * @category Function
6664       * @param {Function} func The function to cap arguments for.
6665       * @param {number} [n=func.length] The arity cap.
6666       * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
6667       * @returns {Function} Returns the new capped function.
6668       * @example
6669       *
6670       * _.map(['6', '8', '10'], _.ary(parseInt, 1));
6671       * // => [6, 8, 10]
6672       */function ary(e,t,n){t=n?void 0:t;t=e&&null==t?e.length:t;return r(e,o,void 0,void 0,void 0,void 0,t)}e.exports=ary},function(e,t,n){var r=n(95),o=n(14);var i=1;
6673/**
6674       * Creates a function that wraps `func` to invoke it with the optional `this`
6675       * binding of `thisArg`.
6676       *
6677       * @private
6678       * @param {Function} func The function to wrap.
6679       * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6680       * @param {*} [thisArg] The `this` binding of `func`.
6681       * @returns {Function} Returns the new wrapped function.
6682       */function createBind(e,t,n){var a=t&i,s=r(e);function wrapper(){var t=(this||_global3)&&(this||_global3)!==o&&(this||_global3)instanceof wrapper?s:e;return t.apply(a?n:this||_global3,arguments)}return wrapper}e.exports=createBind},function(e,t,n){var r=n(120),o=n(95),i=n(218),a=n(221),s=n(227),c=n(134),l=n(14);
6683/**
6684       * Creates a function that wraps `func` to enable currying.
6685       *
6686       * @private
6687       * @param {Function} func The function to wrap.
6688       * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6689       * @param {number} arity The arity of `func`.
6690       * @returns {Function} Returns the new wrapped function.
6691       */function createCurry(e,t,n){var u=o(e);function wrapper(){var o=arguments.length,d=Array(o),f=o,p=s(wrapper);while(f--)d[f]=arguments[f];var g=o<3&&d[0]!==p&&d[o-1]!==p?[]:c(d,p);o-=g.length;if(o<n)return a(e,t,i,wrapper.placeholder,void 0,d,g,void 0,void 0,n-o);var h=(this||_global3)&&(this||_global3)!==l&&(this||_global3)instanceof wrapper?u:e;return r(h,this||_global3,d)}return wrapper}e.exports=createCurry},function(e,t){
6692/**
6693       * Gets the number of `placeholder` occurrences in `array`.
6694       *
6695       * @private
6696       * @param {Array} array The array to inspect.
6697       * @param {*} placeholder The placeholder to search for.
6698       * @returns {number} Returns the placeholder count.
6699       */
6700function countHolders(e,t){var n=e.length,r=0;while(n--)e[n]===t&&++r;return r}e.exports=countHolders},function(e,t,n){var r=n(132),o=n(222),i=n(479),a=n(481);
6701/**
6702       * Checks if `func` has a lazy counterpart.
6703       *
6704       * @private
6705       * @param {Function} func The function to check.
6706       * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
6707       *  else `false`.
6708       */function isLaziable(e){var t=i(e),n=a[t];if("function"!=typeof n||!(t in r.prototype))return false;if(e===n)return true;var s=o(n);return!!s&&e===s[0]}e.exports=isLaziable},function(e,t,n){var r=n(480);var o=Object.prototype;var i=o.hasOwnProperty;
6709/**
6710       * Gets the name of `func`.
6711       *
6712       * @private
6713       * @param {Function} func The function to query.
6714       * @returns {string} Returns the function name.
6715       */function getFuncName(e){var t=e.name+"",n=r[t],o=i.call(r,t)?n.length:0;while(o--){var a=n[o],s=a.func;if(null==s||s==e)return a.name}return t}e.exports=getFuncName},function(e,t){var n={};e.exports=n},function(e,t,n){var r=n(132),o=n(224),i=n(133),a=n(10),s=n(16),c=n(482);var l=Object.prototype;var u=l.hasOwnProperty;
6716/**
6717       * Creates a `lodash` object which wraps `value` to enable implicit method
6718       * chain sequences. Methods that operate on and return arrays, collections,
6719       * and functions can be chained together. Methods that retrieve a single value
6720       * or may return a primitive value will automatically end the chain sequence
6721       * and return the unwrapped value. Otherwise, the value must be unwrapped
6722       * with `_#value`.
6723       *
6724       * Explicit chain sequences, which must be unwrapped with `_#value`, may be
6725       * enabled using `_.chain`.
6726       *
6727       * The execution of chained methods is lazy, that is, it's deferred until
6728       * `_#value` is implicitly or explicitly called.
6729       *
6730       * Lazy evaluation allows several methods to support shortcut fusion.
6731       * Shortcut fusion is an optimization to merge iteratee calls; this avoids
6732       * the creation of intermediate arrays and can greatly reduce the number of
6733       * iteratee executions. Sections of a chain sequence qualify for shortcut
6734       * fusion if the section is applied to an array and iteratees accept only
6735       * one argument. The heuristic for whether a section qualifies for shortcut
6736       * fusion is subject to change.
6737       *
6738       * Chaining is supported in custom builds as long as the `_#value` method is
6739       * directly or indirectly included in the build.
6740       *
6741       * In addition to lodash methods, wrappers have `Array` and `String` methods.
6742       *
6743       * The wrapper `Array` methods are:
6744       * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
6745       *
6746       * The wrapper `String` methods are:
6747       * `replace` and `split`
6748       *
6749       * The wrapper methods that support shortcut fusion are:
6750       * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
6751       * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
6752       * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
6753       *
6754       * The chainable wrapper methods are:
6755       * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
6756       * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
6757       * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
6758       * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
6759       * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
6760       * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
6761       * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
6762       * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
6763       * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
6764       * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
6765       * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
6766       * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
6767       * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
6768       * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
6769       * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
6770       * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
6771       * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
6772       * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
6773       * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
6774       * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
6775       * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
6776       * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
6777       * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
6778       * `zipObject`, `zipObjectDeep`, and `zipWith`
6779       *
6780       * The wrapper methods that are **not** chainable by default are:
6781       * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
6782       * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
6783       * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
6784       * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
6785       * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
6786       * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
6787       * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
6788       * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
6789       * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
6790       * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
6791       * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
6792       * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
6793       * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
6794       * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
6795       * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
6796       * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
6797       * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
6798       * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
6799       * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
6800       * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
6801       * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
6802       * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
6803       * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
6804       * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
6805       * `upperFirst`, `value`, and `words`
6806       *
6807       * @name _
6808       * @constructor
6809       * @category Seq
6810       * @param {*} value The value to wrap in a `lodash` instance.
6811       * @returns {Object} Returns the new `lodash` wrapper instance.
6812       * @example
6813       *
6814       * function square(n) {
6815       *   return n * n;
6816       * }
6817       *
6818       * var wrapped = _([1, 2, 3]);
6819       *
6820       * // Returns an unwrapped value.
6821       * wrapped.reduce(_.add);
6822       * // => 6
6823       *
6824       * // Returns a wrapped value.
6825       * var squares = wrapped.map(square);
6826       *
6827       * _.isArray(squares);
6828       * // => false
6829       *
6830       * _.isArray(squares.value());
6831       * // => true
6832       */function lodash(e){if(s(e)&&!a(e)&&!(e instanceof r)){if(e instanceof o)return e;if(u.call(e,"__wrapped__"))return c(e)}return new o(e)}lodash.prototype=i.prototype;lodash.prototype.constructor=lodash;e.exports=lodash},function(e,t,n){var r=n(132),o=n(224),i=n(53);
6833/**
6834       * Creates a clone of `wrapper`.
6835       *
6836       * @private
6837       * @param {Object} wrapper The wrapper to clone.
6838       * @returns {Object} Returns the cloned wrapper.
6839       */function wrapperClone(e){if(e instanceof r)return e.clone();var t=new o(e.__wrapped__,e.__chain__);t.__actions__=i(e.__actions__);t.__index__=e.__index__;t.__values__=e.__values__;return t}e.exports=wrapperClone},function(e,t){var n=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;
6840/**
6841       * Extracts wrapper details from the `source` body comment.
6842       *
6843       * @private
6844       * @param {string} source The source to inspect.
6845       * @returns {Array} Returns the wrapper details.
6846       */function getWrapDetails(e){var t=e.match(n);return t?t[1].split(r):[]}e.exports=getWrapDetails},function(e,t){var n=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;
6847/**
6848       * Inserts wrapper `details` in a comment at the top of the `source` body.
6849       *
6850       * @private
6851       * @param {string} source The source to modify.
6852       * @returns {Array} details The details to insert.
6853       * @returns {string} Returns the modified source.
6854       */function insertWrapDetails(e,t){var r=t.length;if(!r)return e;var o=r-1;t[o]=(r>1?"& ":"")+t[o];t=t.join(r>2?", ":" ");return e.replace(n,"{\n/* [wrapped with "+t+"] */\n")}e.exports=insertWrapDetails},function(e,t,n){var r=n(111),o=n(93);var i=1,a=2,s=8,c=16,l=32,u=64,d=128,f=256,p=512;var g=[["ary",d],["bind",i],["bindKey",a],["curry",s],["curryRight",c],["flip",p],["partial",l],["partialRight",u],["rearg",f]];
6855/**
6856       * Updates wrapper `details` based on `bitmask` flags.
6857       *
6858       * @private
6859       * @returns {Array} details The details to modify.
6860       * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6861       * @returns {Array} Returns `details`.
6862       */function updateWrapDetails(e,t){r(g,(function(n){var r="_."+n[0];
6862t&n[1]&&!o(e,r)&&e.push(r)}));return e.sort()}e.exports=updateWrapDetails},function(e,t,n){var r=n(53),o=n(66);var i=Math.min;
6863/**
6864       * Reorder `array` according to the specified indexes where the element at
6865       * the first index is assigned as the first element, the element at
6866       * the second index is assigned as the second element, and so on.
6867       *
6868       * @private
6869       * @param {Array} array The array to reorder.
6870       * @param {Array} indexes The arranged array indexes.
6871       * @returns {Array} Returns `array`.
6872       */function reorder(e,t){var n=e.length,a=i(t.length,n),s=r(e);while(a--){var c=t[a];e[a]=o(c,n)?s[c]:void 0}return e}e.exports=reorder},function(e,t,n){var r=n(120),o=n(95),i=n(14);var a=1;
6873/**
6874       * Creates a function that wraps `func` to invoke it with the `this` binding
6875       * of `thisArg` and `partials` prepended to the arguments it receives.
6876       *
6877       * @private
6878       * @param {Function} func The function to wrap.
6879       * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6880       * @param {*} thisArg The `this` binding of `func`.
6881       * @param {Array} partials The arguments to prepend to those provided to
6882       *  the new function.
6883       * @returns {Function} Returns the new wrapped function.
6884       */function createPartial(e,t,n,s){var c=t&a,l=o(e);function wrapper(){var t=-1,o=arguments.length,a=-1,u=s.length,d=Array(u+o),f=(this||_global3)&&(this||_global3)!==i&&(this||_global3)instanceof wrapper?l:e;while(++a<u)d[a]=s[a];while(o--)d[a++]=arguments[++t];return r(f,c?n:this||_global3,d)}return wrapper}e.exports=createPartial},function(e,t,n){var r=n(219),o=n(220),i=n(134);var a="__lodash_placeholder__";var s=1,c=2,l=4,u=8,d=128,f=256;var p=Math.min;
6885/**
6886       * Merges the function metadata of `source` into `data`.
6887       *
6888       * Merging metadata reduces the number of wrappers used to invoke a function.
6889       * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
6890       * may be applied regardless of execution order. Methods like `_.ary` and
6891       * `_.rearg` modify function arguments, making the order in which they are
6892       * executed important, preventing the merging of metadata. However, we make
6893       * an exception for a safe combined case where curried functions have `_.ary`
6894       * and or `_.rearg` applied.
6895       *
6896       * @private
6897       * @param {Array} data The destination metadata.
6898       * @param {Array} source The source metadata.
6899       * @returns {Array} Returns `data`.
6900       */function mergeData(e,t){var n=e[1],g=t[1],h=n|g,b=h<(s|c|d);var v=g==d&&n==u||g==d&&n==f&&e[7].length<=t[8]||g==(d|f)&&t[7].length<=t[8]&&n==u;if(!(b||v))return e;if(g&s){e[2]=t[2];h|=n&s?0:l}var m=t[3];if(m){var _=e[3];e[3]=_?r(_,m,t[4]):m;e[4]=_?i(e[3],a):t[4]}m=t[5];if(m){_=e[5];e[5]=_?o(_,m,t[6]):m;e[6]=_?i(e[5],a):t[6]}m=t[7];m&&(e[7]=m);g&d&&(e[8]=null==e[8]?t[8]:p(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0];e[1]=h;return e}e.exports=mergeData},function(e,t,n){var r=n(228);var o=1/0,i=17976931348623157e292;
6901/**
6902       * Converts `value` to a finite number.
6903       *
6904       * @static
6905       * @memberOf _
6906       * @since 4.12.0
6907       * @category Lang
6908       * @param {*} value The value to convert.
6909       * @returns {number} Returns the converted number.
6910       * @example
6911       *
6912       * _.toFinite(3.2);
6913       * // => 3.2
6914       *
6915       * _.toFinite(Number.MIN_VALUE);
6916       * // => 5e-324
6917       *
6918       * _.toFinite(Infinity);
6919       * // => 1.7976931348623157e+308
6920       *
6921       * _.toFinite('3.2');
6922       * // => 3.2
6923       */function toFinite(e){if(!e)return 0===e?e:0;e=r(e);if(e===o||e===-o){var t=e<0?-1:1;return t*i}return e===e?e:0}e.exports=toFinite},function(e,t,n){var r=n(491);var o=/^\s+/;
6924/**
6925       * The base implementation of `_.trim`.
6926       *
6927       * @private
6928       * @param {string} string The string to trim.
6929       * @returns {string} Returns the trimmed string.
6930       */function baseTrim(e){return e?e.slice(0,r(e)+1).replace(o,""):e}e.exports=baseTrim},function(e,t){var n=/\s/;
6931/**
6932       * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
6933       * character of `string`.
6934       *
6935       * @private
6936       * @param {string} string The string to inspect.
6937       * @returns {number} Returns the index of the last non-whitespace character.
6938       */function trimmedEndIndex(e){var t=e.length;while(t--&&n.test(e.charAt(t)));return t}e.exports=trimmedEndIndex},function(e,t,n){var r=n(131);var o=8;
6939/**
6940       * Creates a function that accepts arguments of `func` and either invokes
6941       * `func` returning its result, if at least `arity` number of arguments have
6942       * been provided, or returns a function that accepts the remaining `func`
6943       * arguments, and so on. The arity of `func` may be specified if `func.length`
6944       * is not sufficient.
6945       *
6946       * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
6947       * may be used as a placeholder for provided arguments.
6948       *
6949       * **Note:** This method doesn't set the "length" property of curried functions.
6950       *
6951       * @static
6952       * @memberOf _
6953       * @since 2.0.0
6954       * @category Function
6955       * @param {Function} func The function to curry.
6956       * @param {number} [arity=func.length] The arity of `func`.
6957       * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
6958       * @returns {Function} Returns the new curried function.
6959       * @example
6960       *
6961       * var abc = function(a, b, c) {
6962       *   return [a, b, c];
6963       * };
6964       *
6965       * var curried = _.curry(abc);
6966       *
6967       * curried(1)(2)(3);
6968       * // => [1, 2, 3]
6969       *
6970       * curried(1, 2)(3);
6971       * // => [1, 2, 3]
6972       *
6973       * curried(1, 2, 3);
6974       * // => [1, 2, 3]
6975       *
6976       * // Curried with placeholders.
6977       * curried(1)(_, 3)(2);
6978       * // => [1, 2, 3]
6979       */function curry(e,t,n){t=n?void 0:t;var i=r(e,o,void 0,void 0,void 0,void 0,void 0,t);i.placeholder=curry.placeholder;return i}curry.placeholder={};e.exports=curry},function(e,t,n){var r=n(29),o=n(16),i=n(135);var a="[object DOMException]",s="[object Error]";
6980/**
6981       * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
6982       * `SyntaxError`, `TypeError`, or `URIError` object.
6983       *
6984       * @static
6985       * @memberOf _
6986       * @since 3.0.0
6987       * @category Lang
6988       * @param {*} value The value to check.
6989       * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
6990       * @example
6991       *
6992       * _.isError(new Error);
6993       * // => true
6994       *
6995       * _.isError(Error);
6996       * // => false
6997       */function isError(e){if(!o(e))return false;var t=r(e);return t==s||t==a||"string"==typeof e.message&&"string"==typeof e.name&&!i(e)}e.exports=isError},function(e,t,n){var r=n(40),o=n(16);var i="[object WeakMap]";
6998/**
6999       * Checks if `value` is classified as a `WeakMap` object.
7000       *
7001       * @static
7002       * @memberOf _
7003       * @since 4.3.0
7004       * @category Lang
7005       * @param {*} value The value to check.
7006       * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
7007       * @example
7008       *
7009       * _.isWeakMap(new WeakMap);
7010       * // => true
7011       *
7012       * _.isWeakMap(new Map);
7013       * // => false
7014       */function isWeakMap(e){return o(e)&&r(e)==i}e.exports=isWeakMap},function(e,t,n){var r=n(77),o=n(34);var i=1;
7015/**
7016       * Creates a function that invokes `func` with the arguments of the created
7017       * function. If `func` is a property name, the created function returns the
7018       * property value for a given element. If `func` is an array or object, the
7019       * created function returns `true` for elements that contain the equivalent
7020       * source properties, otherwise it returns `false`.
7021       *
7022       * @static
7023       * @since 4.0.0
7024       * @memberOf _
7025       * @category Util
7026       * @param {*} [func=_.identity] The value to convert to a callback.
7027       * @returns {Function} Returns the callback.
7028       * @example
7029       *
7030       * var users = [
7031       *   { 'user': 'barney', 'age': 36, 'active': true },
7032       *   { 'user': 'fred',   'age': 40, 'active': false }
7033       * ];
7034       *
7035       * // The `_.matches` iteratee shorthand.
7036       * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
7037       * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
7038       *
7039       * // The `_.matchesProperty` iteratee shorthand.
7040       * _.filter(users, _.iteratee(['user', 'fred']));
7041       * // => [{ 'user': 'fred', 'age': 40 }]
7042       *
7043       * // The `_.property` iteratee shorthand.
7044       * _.map(users, _.iteratee('user'));
7045       * // => ['barney', 'fred']
7046       *
7047       * // Create custom iteratee shorthands.
7048       * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
7049       *   return !_.isRegExp(func) ? iteratee(func) : function(string) {
7050       *     return func.test(string);
7051       *   };
7052       * });
7053       *
7054       * _.filter(['abc', 'def'], /ef/);
7055       * // => ['def']
7056       */function iteratee(e){return o("function"==typeof e?e:r(e,i))}
7056e.exports=iteratee},function(e,t,n){var r=n(497),o=n(501),i=n(234);
7057/**
7058       * The base implementation of `_.matches` which doesn't clone `source`.
7059       *
7060       * @private
7061       * @param {Object} source The object of property values to match.
7062       * @returns {Function} Returns the new spec function.
7063       */function baseMatches(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}e.exports=baseMatches},function(e,t,n){var r=n(78),o=n(229);var i=1,a=2;
7064/**
7065       * The base implementation of `_.isMatch` without support for iteratee shorthands.
7066       *
7067       * @private
7068       * @param {Object} object The object to inspect.
7069       * @param {Object} source The object of property values to match.
7070       * @param {Array} matchData The property names, values, and compare flags to match.
7071       * @param {Function} [customizer] The function to customize comparisons.
7072       * @returns {boolean} Returns `true` if `object` is a match, else `false`.
7073       */function baseIsMatch(e,t,n,s){var c=n.length,l=c,u=!s;if(null==e)return!l;e=Object(e);while(c--){var d=n[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return false}while(++c<l){d=n[c];var f=d[0],p=e[f],g=d[1];if(u&&d[2]){if(void 0===p&&!(f in e))return false}else{var h=new r;if(s)var b=s(p,g,f,e,t,h);if(!(void 0===b?o(g,p,i|a,s,h):b))return false}}return true}e.exports=baseIsMatch},function(e,t,n){var r=n(78),o=n(230),i=n(499),a=n(500),s=n(40),c=n(10),l=n(65),u=n(85);var d=1;var f="[object Arguments]",p="[object Array]",g="[object Object]";var h=Object.prototype;var b=h.hasOwnProperty;
7074/**
7075       * A specialized version of `baseIsEqual` for arrays and objects which performs
7076       * deep comparisons and tracks traversed objects enabling objects with circular
7077       * references to be compared.
7078       *
7079       * @private
7080       * @param {Object} object The object to compare.
7081       * @param {Object} other The other object to compare.
7082       * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7083       * @param {Function} customizer The function to customize comparisons.
7084       * @param {Function} equalFunc The function to determine equivalents of values.
7085       * @param {Object} [stack] Tracks traversed `object` and `other` objects.
7086       * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
7087       */function baseIsEqualDeep(e,t,n,h,v,m){var _=c(e),y=c(t),E=_?p:s(e),S=y?p:s(t);E=E==f?g:E;S=S==f?g:S;var T=E==g,C=S==g,w=E==S;if(w&&l(e)){if(!l(t))return false;_=true;T=false}if(w&&!T){m||(m=new r);return _||u(e)?o(e,t,n,h,v,m):i(e,t,E,n,h,v,m)}if(!(n&d)){var O=T&&b.call(e,"__wrapped__"),x=C&&b.call(t,"__wrapped__");
7087if(O||x){var I=O?e.value():e,A=x?t.value():t;m||(m=new r);return v(I,A,n,h,m)}}if(!w)return false;m||(m=new r);return a(e,t,n,h,v,m)}e.exports=baseIsEqualDeep},function(e,t,n){var r=n(38),o=n(187),i=n(51),a=n(230),s=n(232),c=n(97);var l=1,u=2;var d="[object Boolean]",f="[object Date]",p="[object Error]",g="[object Map]",h="[object Number]",b="[object RegExp]",v="[object Set]",m="[object String]",_="[object Symbol]";var y="[object ArrayBuffer]",E="[object DataView]";var S=r?r.prototype:void 0,T=S?S.valueOf:void 0;
7088/**
7089       * A specialized version of `baseIsEqualDeep` for comparing objects of
7090       * the same `toStringTag`.
7091       *
7092       * **Note:** This function only supports comparing values with tags of
7093       * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
7094       *
7095       * @private
7096       * @param {Object} object The object to compare.
7097       * @param {Object} other The other object to compare.
7098       * @param {string} tag The `toStringTag` of the objects to compare.
7099       * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7100       * @param {Function} customizer The function to customize comparisons.
7101       * @param {Function} equalFunc The function to determine equivalents of values.
7102       * @param {Object} stack Tracks traversed `object` and `other` objects.
7103       * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
7104       */function equalByTag(e,t,n,r,S,C,w){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return false;e=e.buffer;t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!C(new o(e),new o(t)));case d:case f:case h:return i(+e,+t);case p:return e.name==t.name&&e.message==t.message;case b:case m:return e==t+"";case g:var O=s;case v:var x=r&l;O||(O=c);if(e.size!=t.size&&!x)return false;var I=w.get(e);if(I)return I==t;r|=u;w.set(e,t);var A=a(O(e),O(t),r,S,C,w);w.delete(e);return A;case _:if(T)return T.call(e)==T.call(t)}return false}e.exports=equalByTag},function(e,t,n){var r=n(182);var o=1;var i=Object.prototype;var a=i.hasOwnProperty;
7105/**
7106       * A specialized version of `baseIsEqualDeep` for objects with support for
7107       * partial deep comparisons.
7108       *
7109       * @private
7110       * @param {Object} object The object to compare.
7111       * @param {Object} other The other object to compare.
7112       * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7113       * @param {Function} customizer The function to customize comparisons.
7114       * @param {Function} equalFunc The function to determine equivalents of values.
7115       * @param {Object} stack Tracks traversed `object` and `other` objects.
7116       * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
7117       */function equalObjects(e,t,n,i,s,c){var l=n&o,u=r(e),d=u.length,f=r(t),p=f.length;if(d!=p&&!l)return false;var g=d;while(g--){var h=u[g];if(!(l?h in t:a.call(t,h)))return false}var b=c.get(e);var v=c.get(t);if(b&&v)return b==t&&v==e;var m=true;c.set(e,t);c.set(t,e);var _=l;while(++g<d){h=u[g];var y=e[h],E=t[h];if(i)var S=l?i(E,y,h,t,e,c):i(y,E,h,e,t,c);if(!(void 0===S?y===E||s(y,E,n,i,c):S)){m=false;break}_||(_="constructor"==h)}if(m&&!_){var T=e.constructor,C=t.constructor;T==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof T&&T instanceof T&&"function"==typeof C&&C instanceof C||(m=false)}c.delete(e);c.delete(t);return m}e.exports=equalObjects},function(e,t,n){var r=n(233),o=n(30);
7118/**
7119       * Gets the property names, values, and compare flags of `object`.
7120       *
7121       * @private
7122       * @param {Object} object The object to query.
7123       * @returns {Array} Returns the match data of `object`.
7124       */function getMatchData(e){var t=o(e),n=t.length;while(n--){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}e.exports=getMatchData},function(e,t,n){var r=n(229),o=n(56),i=n(236),a=n(136),s=n(233),c=n(234),l=n(46);var u=1,d=2;
7125/**
7126       * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
7127       *
7128       * @private
7129       * @param {string} path The path of the property to get.
7130       * @param {*} srcValue The value to match.
7131       * @returns {Function} Returns the new spec function.
7132       */function baseMatchesProperty(e,t){return a(e)&&s(t)?c(l(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,u|d)}}e.exports=baseMatchesProperty},function(e,t,n){var r=n(190);var o=500;
7133/**
7134       * A specialized version of `_.memoize` which clears the memoized function's
7135       * cache when it exceeds `MAX_MEMOIZE_SIZE`.
7136       *
7137       * @private
7138       * @param {Function} func The function to have its output memoized.
7139       * @returns {Function} Returns the new memoized function.
7140       */function memoizeCapped(e){var t=r(e,(function(e){n.size===o&&n.clear();return e}));var n=t.cache;return t}e.exports=memoizeCapped},function(e,t,n){var r=n(38),o=n(33),i=n(10),a=n(71);var s=1/0;var c=r?r.prototype:void 0,l=c?c.toString:void 0;
7141/**
7142       * The base implementation of `_.toString` which doesn't convert nullish
7143       * values to empty strings.
7144       *
7145       * @private
7146       * @param {*} value The value to process.
7147       * @returns {string} Returns the string.
7148       */function baseToString(e){if("string"==typeof e)return e;if(i(e))return o(e,baseToString)+"";if(a(e))return l?l.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}e.exports=baseToString},function(e,t){
7149/**
7150       * The base implementation of `_.hasIn` without support for deep paths.
7151       *
7152       * @private
7153       * @param {Object} [object] The object to query.
7154       * @param {Array|string} key The key to check.
7155       * @returns {boolean} Returns `true` if `key` exists, else `false`.
7156       */
7157function baseHasIn(e,t){return null!=e&&t in Object(e)}e.exports=baseHasIn},function(e,t,n){var r=n(57),o=n(64),i=n(10),a=n(66),s=n(112),c=n(46);
7158/**
7159       * Checks if `path` exists on `object`.
7160       *
7161       * @private
7162       * @param {Object} object The object to query.
7163       * @param {Array|string} path The path to check.
7164       * @param {Function} hasFunc The function to check properties.
7165       * @returns {boolean} Returns `true` if `path` exists, else `false`.
7166       */function hasPath(e,t,n){t=r(t,e);var l=-1,u=t.length,d=false;while(++l<u){var f=c(t[l]);if(!(d=null!=e&&n(e,f)))break;e=e[f]}if(d||++l!=u)return d;u=null==e?0:e.length;return!!u&&s(u)&&a(f,u)&&(i(e)||o(e))}e.exports=hasPath},function(e,t,n){var r=n(508),o=n(509),i=n(136),a=n(46);
7167/**
7168       * Creates a function that returns the value at `path` of a given object.
7169       *
7170       * @static
7171       * @memberOf _
7172       * @since 2.4.0
7173       * @category Util
7174       * @param {Array|string} path The path of the property to get.
7175       * @returns {Function} Returns the new accessor function.
7176       * @example
7177       *
7178       * var objects = [
7179       *   { 'a': { 'b': 2 } },
7180       *   { 'a': { 'b': 1 } }
7181       * ];
7182       *
7183       * _.map(objects, _.property('a.b'));
7184       * // => [2, 1]
7185       *
7186       * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
7187       * // => [1, 2]
7188       */function property(e){return i(e)?r(a(e)):o(e)}e.exports=property},function(e,t){
7189/**
7190       * The base implementation of `_.property` without support for deep paths.
7191       *
7192       * @private
7193       * @param {string} key The key of the property to get.
7194       * @returns {Function} Returns the new accessor function.
7195       */
7196function baseProperty(e){return function(t){return null==t?void 0:t[e]}}
7196e.exports=baseProperty},function(e,t,n){var r=n(98);
7197/**
7198       * A specialized version of `baseProperty` which supports deep paths.
7199       *
7200       * @private
7201       * @param {Array|string} path The path of the property to get.
7202       * @returns {Function} Returns the new accessor function.
7203       */function basePropertyDeep(e){return function(t){return r(t,e)}}e.exports=basePropertyDeep},function(e,t,n){var r=n(131),o=n(137);var i=256;
7204/**
7205       * Creates a function that invokes `func` with arguments arranged according
7206       * to the specified `indexes` where the argument value at the first index is
7207       * provided as the first argument, the argument value at the second index is
7208       * provided as the second argument, and so on.
7209       *
7210       * @static
7211       * @memberOf _
7212       * @since 3.0.0
7213       * @category Function
7214       * @param {Function} func The function to rearrange arguments for.
7215       * @param {...(number|number[])} indexes The arranged argument indexes.
7216       * @returns {Function} Returns the new function.
7217       * @example
7218       *
7219       * var rearged = _.rearg(function(a, b, c) {
7220       *   return [a, b, c];
7221       * }, [2, 0, 1]);
7222       *
7223       * rearged('b', 'c', 'a')
7224       * // => ['a', 'b', 'c']
7225       */var a=o((function(e,t){return r(e,i,void 0,void 0,void 0,t)}));e.exports=a},function(e,t,n){var r=n(237);
7226/**
7227       * Flattens `array` a single level deep.
7228       *
7229       * @static
7230       * @memberOf _
7231       * @since 0.1.0
7232       * @category Array
7233       * @param {Array} array The array to flatten.
7234       * @returns {Array} Returns the new flattened array.
7235       * @example
7236       *
7237       * _.flatten([1, [2, [3, [4]], 5]]);
7238       * // => [1, 2, [3, [4]], 5]
7239       */function flatten(e){var t=null==e?0:e.length;return t?r(e,1):[]}e.exports=flatten},function(e,t,n){var r=n(38),o=n(64),i=n(10);var a=r?r.isConcatSpreadable:void 0;
7240/**
7241       * Checks if `value` is a flattenable `arguments` object or array.
7242       *
7243       * @private
7244       * @param {*} value The value to check.
7245       * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
7246       */function isFlattenable(e){return i(e)||o(e)||!!(a&&e&&e[a])}
7246e.exports=isFlattenable},function(e,t,n){var r=n(33),o=n(53),i=n(10),a=n(71),s=n(235),c=n(46),l=n(58);
7247/**
7248       * Converts `value` to a property path array.
7249       *
7250       * @static
7251       * @memberOf _
7252       * @since 4.0.0
7253       * @category Util
7254       * @param {*} value The value to convert.
7255       * @returns {Array} Returns the new property path array.
7256       * @example
7257       *
7258       * _.toPath('a.b.c');
7259       * // => ['a', 'b', 'c']
7260       *
7261       * _.toPath('a[0].b.c');
7262       * // => ['a', '0', 'b', 'c']
7263       */function toPath(e){return i(e)?r(e,c):a(e)?[e]:o(s(l(e)))}e.exports=toPath},function(e,t,n){var r=n(515),o=n(236);
7264/**
7265       * The base implementation of `_.pick` without support for individual
7266       * property identifiers.
7267       *
7268       * @private
7269       * @param {Object} object The source object.
7270       * @param {string[]} paths The property paths to pick.
7271       * @returns {Object} Returns the new object.
7272       */function basePick(e,t){return r(e,t,(function(t,n){return o(e,n)}))}e.exports=basePick},function(e,t,n){var r=n(98),o=n(516),i=n(57);
7273/**
7274       * The base implementation of  `_.pickBy` without support for iteratee shorthands.
7275       *
7276       * @private
7277       * @param {Object} object The source object.
7278       * @param {string[]} paths The property paths to pick.
7279       * @param {Function} predicate The function invoked per property.
7280       * @returns {Object} Returns the new object.
7281       */function basePickBy(e,t,n){var a=-1,s=t.length,c={};while(++a<s){var l=t[a],u=r(e,l);n(u,l)&&o(c,i(l,e),u)}return c}e.exports=basePickBy},function(e,t,n){var r=n(83),o=n(57),i=n(66),a=n(9),s=n(46);
7282/**
7283       * The base implementation of `_.set`.
7284       *
7285       * @private
7286       * @param {Object} object The object to modify.
7287       * @param {Array|string} path The path of the property to set.
7288       * @param {*} value The value to set.
7289       * @param {Function} [customizer] The function to customize path creation.
7290       * @returns {Object} Returns `object`.
7291       */function baseSet(e,t,n,c){if(!a(e))return e;t=o(t,e);var l=-1,u=t.length,d=u-1,f=e;while(null!=f&&++l<u){var p=s(t[l]),g=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(l!=d){var h=f[p];g=c?c(h,p,f):void 0;void 0===g&&(g=a(h)?h:i(t[l+1])?[]:{})}r(f,p,g);f=f[p]}return e}e.exports=baseSet},function(e,t,n){var r=n(215),o=r("mapKeys",n(518));o.placeholder=n(130);e.exports=o},function(e,t,n){var r=n(63),o=n(99),i=n(34);
7292/**
7293       * The opposite of `_.mapValues`; this method creates an object with the
7294       * same values as `object` and keys generated by running each own enumerable
7295       * string keyed property of `object` thru `iteratee`. The iteratee is invoked
7296       * with three arguments: (value, key, object).
7297       *
7298       * @static
7299       * @memberOf _
7300       * @since 3.8.0
7301       * @category Object
7302       * @param {Object} object The object to iterate over.
7303       * @param {Function} [iteratee=_.identity] The function invoked per iteration.
7304       * @returns {Object} Returns the new mapped object.
7305       * @see _.mapValues
7306       * @example
7307       *
7308       * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
7309       *   return key + value;
7310       * });
7311       * // => { 'a1': 1, 'b2': 2 }
7312       */function mapKeys(e,t){var n={};t=i(t,3);o(e,(function(e,o,i){r(n,t(e,o,i),e)}));return n}e.exports=mapKeys},function(e,t){
7313/**
7314       * Creates a base function for methods like `_.forIn` and `_.forOwn`.
7315       *
7316       * @private
7317       * @param {boolean} [fromRight] Specify iterating from right to left.
7318       * @returns {Function} Returns the new base function.
7319       */
7320function createBaseFor(e){return function(t,n,r){var o=-1,i=Object(t),a=r(t),s=a.length;while(s--){var c=a[e?s:++o];if(false===n(i[c],c,i))break}return t}}e.exports=createBaseFor},function(e,t,n){(function(e){var r;(function(o){(true,t)&&t.nodeType;(true,e)&&e.nodeType;var i="object"==typeof(void 0!==typeof window?window:_global3)&&(void 0!==typeof window?window:_global3);i.global!==i&&i.window!==i&&i.self!==i||i
7321/**
7322           * The `punycode` object.
7323           * @name punycode
7324           * @type Object
7325           */;var a,s=2147483647,c=36,l=1,u=26,d=38,f=700,p=72,g=128,h="-",b=/^xn--/,v=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >
7325= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=c-l,E=Math.floor,S=String.fromCharCode;
7326/**
7327           * A generic error utility function.
7328           * @private
7329           * @param {String} type The error type.
7330           * @returns {Error} Throws a `RangeError` with the applicable error message.
7331           */function error(e){throw new RangeError(_[e])}
7332/**
7333           * A generic `Array#map` utility function.
7334           * @private
7335           * @param {Array} array The array to iterate over.
7336           * @param {Function} callback The function that gets called for every array
7337           * item.
7338           * @returns {Array} A new array of values returned by the callback function.
7339           */function map(e,t){var n=e.length;var r=[];while(n--)r[n]=t(e[n]);return r}
7340/**
7341           * A simple `Array#map`-like wrapper to work with domain name strings or email
7342           * addresses.
7343           * @private
7344           * @param {String} domain The domain name or email address.
7345           * @param {Function} callback The function that gets called for every
7346           * character.
7347           * @returns {Array} A new string of characters returned by the callback
7348           * function.
7349           */function mapDomain(e,t){var n=e.split("@");var r="";if(n.length>1){r=n[0]+"@";e=n[1]}e=e.replace(m,".");var o=e.split(".");var i=map(o,t).join(".");return r+i}
7350/**
7351           * Creates an array containing the numeric code points of each Unicode
7352           * character in the string. While JavaScript uses UCS-2 internally,
7353           * this function will convert a pair of surrogate halves (each of which
7354           * UCS-2 exposes as separate characters) into a single code point,
7355           * matching UTF-16.
7356           * @see `punycode.ucs2.encode`
7357           * @see <https://mathiasbynens.be/notes/javascript-encoding>
7358           * @memberOf punycode.ucs2
7359           * @name decode
7360           * @param {String} string The Unicode input string (UCS-2).
7361           * @returns {Array} The new array of code points.
7362           */function ucs2decode(e){var t,n,r=[],o=0,i=e.length;while(o<i){t=e.charCodeAt(o++);if(t>=55296&&t<=56319&&o<i){n=e.charCodeAt(o++);if(56320==(64512&n))r.push(((1023&t)<<10)+(1023&n)+65536);else{r.push(t);o--}}else r.push(t)}return r}
7363/**
7364           * Creates a string based on an array of numeric code points.
7365           * @see `punycode.ucs2.decode`
7366           * @memberOf punycode.ucs2
7367           * @name encode
7368           * @param {Array} codePoints The array of numeric code points.
7369           * @returns {String} The new Unicode string (UCS-2).
7370           */function ucs2encode(e){return map(e,(function(e){var t="";if(e>65535){e-=65536;t+=S(e>>>10&1023|55296);e=56320|1023&e}t+=S(e);return t})).join("")}
7371/**
7372           * Converts a basic code point into a digit/integer.
7373           * @see `digitToBasic()`
7374           * @private
7375           * @param {Number} codePoint The basic numeric code point value.
7376           * @returns {Number} The numeric value of a basic code point (for use in
7377           * representing integers) in the range `0` to `base - 1`, or `base` if
7378           * the code point does not represent a value.
7379           */function basicToDigit(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}
7380/**
7381           * Converts a digit/integer into a basic code point.
7382           * @see `basicToDigit()`
7383           * @private
7384           * @param {Number} digit The numeric value of a basic code point.
7385           * @returns {Number} The basic code point whose value (when used for
7386           * representing integers) is `digit`, which needs to be in the range
7387           * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
7388           * used; else, the lowercase form is used. The behavior is undefined
7389           * if `flag` is non-zero and `digit` has no uppercase form.
7390           */function digitToBasic(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function adapt(e,t,n){var r=0;e=n?E(e/f):e>>1;e+=E(e/t);for(;e>y*u>>1;r+=c)e=E(e/y);return E(r+(y+1)*e/(e+d))}
7391/**
7392           * Converts a Punycode string of ASCII-only symbols to a 
7392string of Unicode
7393           * symbols.
7394           * @memberOf punycode
7395           * @param {String} input The Punycode string of ASCII-only symbols.
7396           * @returns {String} The resulting string of Unicode symbols.
7397           */function decode(e){var t,n,r,o,i,a,d,f,b,v,m=[],_=e.length,y=0,S=g,T=p;n=e.lastIndexOf(h);n<0&&(n=0);for(r=0;r<n;++r){e.charCodeAt(r)>=128&&error("not-basic");m.push(e.charCodeAt(r))}for(o=n>0?n+1:0;o<_;){for(i=y,a=1,d=c;;d+=c){o>=_&&error("invalid-input");f=basicToDigit(e.charCodeAt(o++));(f>=c||f>E((s-y)/a))&&error("overflow");y+=f*a;b=d<=T?l:d>=T+u?u:d-T;if(f<b)break;v=c-b;a>E(s/v)&&error("overflow");a*=v}t=m.length+1;T=adapt(y-i,t,0==i);E(y/t)>s-S&&error("overflow");S+=E(y/t);y%=t;m.splice(y++,0,S)}return ucs2encode(m)}
7398/**
7399           * Converts a string of Unicode symbols (e.g. a domain name label) to a
7400           * Punycode string of ASCII-only symbols.
7401           * @memberOf punycode
7402           * @param {String} input The string of Unicode symbols.
7403           * @returns {String} The resulting Punycode string of ASCII-only symbols.
7404           */function encode(e){var t,n,r,o,i,a,d,f,b,v,m,_,y,T,C,w=[];e=ucs2decode(e);_=e.length;t=g;n=0;i=p;for(a=0;a<_;++a){m=e[a];m<128&&w.push(S(m))}r=o=w.length;o&&w.push(h);while(r<_){for(d=s,a=0;a<_;++a){m=e[a];m>=t&&m<d&&(d=m)}y=r+1;d-t>E((s-n)/y)&&error("overflow");n+=(d-t)*y;t=d;for(a=0;a<_;++a){m=e[a];m<t&&++n>s&&error("overflow");if(m==t){for(f=n,b=c;;b+=c){v=b<=i?l:b>=i+u?u:b-i;if(f<v)break;C=f-v;T=c-v;w.push(S(digitToBasic(v+C%T,0)));f=E(C/T)}w.push(S(digitToBasic(f,0)));i=adapt(n,y,r==o);n=0;++r}}++n;++t}return w.join("")}
7405/**
7406           * Converts a Punycode string representing a domain name or an email address
7407           * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
7408           * it doesn't matter if you call it on a string that has already been
7409           * converted to Unicode.
7410           * @memberOf punycode
7411           * @param {String} input The Punycoded domain name or email address to
7412           * convert to Unicode.
7413           * @returns {String} The Unicode representation of the given Punycode
7414           * string.
7415           */function toUnicode(e){return mapDomain(e,(function(e){return b.test(e)?decode(e.slice(4).toLowerCase()):e}))}
7416/**
7417           * Converts a Unicode string representing a domain name or an email address to
7418           * Punycode. Only the non-ASCII parts of the domain name will be converted,
7419           * i.e. it doesn't matter if you call it with a domain that's already in
7420           * ASCII.
7421           * @memberOf punycode
7422           * @param {String} input The domain name or email address to convert, as a
7423           * Unicode string.
7424           * @returns {String} The Punycode representation of the given domain name or
7425           * email address.
7426           */function toASCII(e){return mapDomain(e,(function(e){return v.test(e)?"xn--"+encode(e):e}))}a={
7427/**
7428             * A string representing the current Punycode.js version number.
7429             * @memberOf punycode
7430             * @type String
7431             */
7432version:"1.4.1",
7433/**
7434             * An object of methods to convert from JavaScript's internal character
7435             * representation (UCS-2) to Unicode code points, and back.
7436             * @see <https://mathiasbynens.be/notes/javascript-encoding>
7437             * @memberOf punycode
7438             * @type Object
7439             */
7440ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:toASCII,toUnicode:toUnicode};true;!(r=function(){return a}.call(t,n,t,e),void 0!==r&&(e.exports=r))})()}).call(this||_global3,n(84)(e))},function(e,t,n){e.exports={isString:function(e){return"string"===typeof e},isObject:function(e){return"object"===typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){t.decode=t.parse=n(523);t.encode=t.stringify=n(524)},function(e,t,n){function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&";n=n||"=";var i={};if("string"!==typeof e||0===e.length)return i;var a=/\+/g;e=e.split(t);var s=1e3;o&&"number"===typeof o.maxKeys&&(s=o.maxKeys);var c=e.length;s>0&&c>s&&(c=s);for(var l=0;l<c;++l){var u,d,f,p,g=e[l].replace(a,"%20"),h=g.indexOf(n);if(h>=0){u=g.substr(0,h);d=g.substr(h+1)}else{u=g;d=""}f=decodeURIComponent(u);p=decodeURIComponent(d);hasOwnProperty(i,f)?r(i[f])?i[f].push(p):i[f]=[i[f],p]:i[f]=p}return i};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){var stringifyPrimitive=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,i){t=t||"&";n=n||"=";null===e&&(e=void 0);return"object"===typeof e?map(o(e),(function(o){var i=encodeURIComponent(stringifyPrimitive(o))+n;return r(e[o])?map(e[o],(function(e){return i+encodeURIComponent(stringifyPrimitive(e))})).join(t):i+encodeURIComponent(stringifyPrimitive(e[o]))})).join(t):i?encodeURIComponent(stringifyPrimitive(i))+n+encodeURIComponent(stringifyPrimitive(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function map(e,t){if(e.map)return e.map(t);var n=[];for(var r=0;r<e.length;r++)n.push(t(e[r],r));return n}var o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){var r=n(241);var o=n(242);var i;var a;var s=0;var c=0;function v1(e,t,n){var l=t&&n||0;var u=t||[];e=e||{};var d=e.node||i;var f=void 0!==e.clockseq?e.clockseq:a;if(null==d||null==f){var p=r();null==d&&(d=i=[1|p[0],p[1],p[2],p[3],p[4],p[5]]);null==f&&(f=a=16383&(p[6]<<8|p[7]))}var g=void 0!==e.msecs?e.msecs:(new Date).getTime();var h=void 0!==e.nsecs?e.nsecs:c+1;var b=g-s+(h-c)/1e4;b<0&&void 0===e.clockseq&&(f=f+1&16383);(b<0||g>s)&&void 0===e.nsecs&&(h=0);if(h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=g;c=h;a=f;g+=122192928e5;var v=(1e4*(268435455&g)+h)%4294967296;u[l++]=v>>>24&255;u[l++]=v>>>16&255;u[l++]=v>>>8&255;u[l++]=255&v;var m=g/4294967296*1e4&268435455;u[l++]=m>>>8&255;u[l++]=255&m;u[l++]=m>>>24&15|16;u[l++]=m>>>16&255;u[l++]=f>>>8|128;u[l++]=255&f;for(var _=0;_<6;++_)u[l+_]=d[_];return t||o(u)}e.exports=v1},function(e,t,n){var r=n(241);var o=n(242);function v4(e,t,n){var i=t&&n||0;if("string"==typeof e){t="binary"===e?new Array(16):null;e=null}e=e||{};var a=e.random||(e.rng||r)();a[6]=15&a[6]|64;a[8]=63&a[8]|128;if(t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}e.exports=v4},function(e,t,n){var r=n(3);var o=r(n(18));let i=function(){function QueueRunner(e){let t=void 0===e?{}:e,n=t.waitTime,r=void 0===n?50:n;(0,o.default)(this||_global3,"queue",[]);(0,o.default)(this||_global3,"running",false);(this||_global3).waitTime=r}var e=QueueRunner.prototype;e.add=function add(e){(this||_global3).queue.push(e);this.run()};e.run=function run(){if((this||_global3).running)return;(this||_global3).running=true;const loop=()=>{if(0===(this||_global3).queue.length){(this||_global3).running=false;return}const e=(this||_global3).queue.shift();e((()=>{setTimeout(loop,(this||_global3).waitTime)}))};loop()};return QueueRunner}();e.exports=i},function(e,t,n){const r=n(9);const o={for:"htmlFor",class:"className"};e.exports=function(e){e.prototype.attr=function(e,t){if(r(e)){let t;Object.keys(e).forEach((n=>{t=o[n]||n;(this||_global3).first.setAttribute(t,e[n])}))}else{if(void 0===t)return(this||_global3).first.getAttribute(o[e]||e);(this||_global3).first.setAttribute(o[e]||e,t)}return this||_global3};e.prototype.removeAttr=function(e){const t=o[e]||e;this.forEach((e=>{e.removeAttribute(t)}));return this||_global3};e.prototype.html=function(e){void 0!==e&&((this||_global3).first.innerHTML=e);return(this||_global3).first.innerHTML};e.prototype.center=function(t,n){let r;this.forEach((o=>{r=new e(o);t=t||parseInt(r.width(),10);n=n||parseInt(r.height(),10);const i=-.5*t+"px";const a=-.5*n+"px";r.css("margin",`${a} 0 0 ${i}`).addClass("OT_centered")}));return this||_global3};e._attachToOTHelpers.centerElement=function(t,n,r){return new e(t).center(n,r)};const t=function _width(t){return t.offsetWidth>0?`${t.offsetWidth}px`:new e(t).css("width")};const n=function _height(t){return t.offsetHeight>0?`${t.offsetHeight}px`:new e(t).css("height")};e.prototype.width=function(e){if(e){this.css("width",e);return this||_global3}return this.isDisplayNone()?this.makeVisibleAndYield((e=>t(e)))[0]:t(this.get(0))};e._attachToOTHelpers.width=function(t,n){const r=new e(t).width(n);return n?e._attachToOTHelpers:r};e.prototype.height=function(e){if(e){this.css("height",e);return this||_global3}return this.isDisplayNone()?this.makeVisibleAndYield((e=>n(e)))[0]:n(this.get(0))};e._attachToOTHelpers.height=function(t,n){const r=new e(t).height(n);return n?e._attachToOTHelpers:r}}},function(e,t,n){const r=n(2);const o=(void 0!==typeof window?window:_global3).getComputedStyle;const i={Firefox:"moz",Opera:"O",Chrome:"Webkit",Safari:"Webkit"};function vendorPrefix(){return i[r.name]}e.exports=function(e,t){const n={};const r={};const i=function defaultDisplayValueForElement(t){if(r[t.ownerDocument]&&r[t.ownerDocument][t.nodeName])return r[t.ownerDocument][t.nodeName];r[t.ownerDocument]||(r[t.ownerDocument]={});
7440let n=t.ownerDocument.createElement(t.nodeName);let o;t.ownerDocument.body.appendChild(n);o=new e(n).css("display");r[t.ownerDocument][t.nodeName]=o;new e(n).remove();n=null;return o};const a=function isHidden(e){const t=o(e);return"none"===t.getPropertyValue("display")};const s=function getNormalisedPropName(e,t){if(t in e.style)return t;const n=vendorPrefix();const r=n+t[0].toUpperCase()+t.slice(1);return r in e.style?r:t};const c=function setCssProperties(e,t){const n=e.style;for(const r in t)t.hasOwnProperty(r)&&(n[s(e,r)]=t[r])};const l=function setCssProperty(e,t,n){e.style[s(e,t)]=n};const u=function getCssProperty(e,t){const n=s(e,t);const r=o(e);let i=r.getPropertyValue(n);""===i&&(i=e.style[n]);return i};const d=function applyCSS(t,n,r){const o=new e(t);const i={};let a,s;for(a in n)if(n.hasOwnProperty(a)){i[a]=t.style[a];o.css(a,n[a])}s=r(t);for(a in n)n.hasOwnProperty(a)&&o.css(a,i[a]||"");return s};e.prototype.show=function(){return this.forEach((e=>{const t=e.style.display;if(""===t||"none"===t){e.style.display=n[e]||"";delete n[e]}if(a(e)){n[e]="none";e.style.display=i(e)}}))};e.prototype.hide=function(){return this.forEach((e=>{if("none"!==e.style.display){n[e]=e.style.display;e.style.display="none"}}))};e.prototype.css=function(e,t){if(0!==(this||_global3).length)return"string"!==typeof e?this.forEach((t=>{c(t,e)})):void 0!==t?this.forEach((n=>{l(n,e,t)})):u((this||_global3).first,e,t)};e.prototype.makeVisibleAndYield=function(e){const n={display:"block",visibility:"hidden"};const r=[];this.forEach((o=>{const i=t(o);i?r.push(d(i,n,e)):r.push(void 0)}));return r}}},function(e,t,n){let r="Node";"undefined"!==typeof navigator&&(r=navigator.userAgent);e.exports=function isiOSFactory(e){void 0===e&&(e={userAgent:r});return/iPhone|iPad/.test(e.userAgent)||r.includes("Mac")&&"ontouchend"in document}},function(e,t,n){e.exports=function iOSVersion(){const e=navigator.userAgent.match(/OS (\d+_\d+) like Mac/);if(null!==e&&e[1])return e[1].replace("_",".")}},function(e,t,n){const r=/(Electron)\/([0-9]{1,}[.0-9]{0,})/;e.exports=e=>{const t=e.match(r);return t&&parseFloat(t[2])}},function(e,t,n){const r=n(534);function hasClass(e,t){return!!t&&(r()?e.classList.contains(t):e.className.indexOf(t)>-1)}function toggleClasses(e,t){if(!t||0===t.length)return;if(1!==e.nodeType)return;const n=t.length;let o=0;if(r()){for(;o<n;++o)e.classList.toggle(t[o]);return}let i=` ${e.className} `.replace(/[\s+]/," ");for(;o<n;++o)hasClass(e,t[o])?i=i.replace(` ${t[o]} `," "):i+=`${t[o]} `;e.className=i.trim()}function addClass(e,t){if(!t||0===t.length)return;if(1!==e.nodeType)return;const n=t.length;let o=0;if(r())for(;o<n;++o)e.classList.add(t[o]);else if(e.className||1!==t.length){let r=` ${e.className} `;for(;o<n;++o)~r.indexOf(` ${t[o]} `)||(r+=`${t[o]} `);e.className=r.trim()}else e.className=t.join(" ")}function removeClass(e,t){if(!t||0===t.length)return;if(1!==e.nodeType)return;const n=t.length;let o=0;if(r()){for(;o<n;++o)e.classList.remove(t[o]);return}let i=` ${e.className} `.replace(/[\s+]/," ");for(;o<n;++o)i=i.replace(` ${t[o]} `," ");e.className=i.trim()}e.exports=function(e){e.prototype.addClass=function(e){if(e){const t=e.trim().split(/\s+/);this.forEach((e=>{addClass(e,t)}))}return this||_global3};e.prototype.removeClass=function(e){if(e){const t=e.trim().split(/\s+/);this.forEach((e=>{removeClass(e,t)}))}return this||_global3};e.prototype.toggleClass=function(e){if(e){const t=e.trim().split(/\s+/);this.forEach((e=>{toggleClasses(e,t)}))}return this||_global3};e.prototype.hasClass=function(e){return this.some((t=>hasClass(t,e)))}}},function(e,t,n){e.exports=()=>"undefined"!==typeof document&&"classList"in document.createElement("a")},function(e,t,n){const r=n(536);e.exports=function(e){let t=0;let n=0;const o=function observeStyleChanges(t,n,o){const i={};const a=function getStyle(n){switch(n){case"width":return new e(t).width();case"height":return new e(t).height();default:return new e(t).css(n)}};n.forEach((e=>{i[e]=a(e)}));const s=new(void 0!==typeof window?window:_global3).MutationObserver((s=>{const c={};s.forEach((r=>{if("style"!==r.attributeName)return;const o=new e(t).isDisplayNone();
7440n.forEach((e=>{if(o&&("width"===e||"height"===e))return;const t=a(e);if(t!==i[e]){c[e]=[i[e],t];i[e]=t}}))}));r(c)||setTimeout((()=>{o.call(null,c)}))}));s.observe(t,{attributes:true,attributeFilter:["style"],childList:false,characterData:false,subtree:false});return s};const i=function observeNodeOrChildNodeRemoval(t,r){const o=new(void 0!==typeof window?window:_global3).MutationObserver((t=>{let n=[];t.forEach((e=>{e.removedNodes.length&&(n=n.concat(Array.prototype.slice.call(e.removedNodes)))}));n.length&&setTimeout((()=>{r(new e(n))}))}));o.observe(t,{attributes:false,childList:true,characterData:false,subtree:true});n++;const i=o.disconnect;o.disconnect=function(){i.apply(o,arguments);n--};return o};const a=function observeSize(e,n){let r={width:0,height:0};const o=setInterval((()=>{const t=e.getBoundingClientRect();if(r.width!==t.width||r.height!==t.height){n(t,r);r={width:t.width,height:t.height}}}),200);t++;return{disconnect(){clearInterval(o);t--}}};e.prototype.observeStyleChanges=function(e,t){const n=[];this.forEach((r=>{n.push(o(r,e,t))}));return n};e.prototype.observeNodeOrChildNodeRemoval=function(e){const t=[];this.forEach((n=>{t.push(i(n,e))}));return t};e.prototype.observeSize=function(e){const t=[];this.forEach((n=>{t.push(a(n,e))}));return t};e._attachToOTHelpers.observeStyleChanges=function(t,n,r){return new e(t).observeStyleChanges(n,r)[0]};e._attachToOTHelpers.observeNodeOrChildNodeRemoval=function(t,n){return new e(t).observeNodeOrChildNodeRemoval(n)[0]};e.__testOnly||(e.__testOnly={});e.__testOnly.sizeObserverCount=function(){return t};e.__testOnly.nodeRemovalObserverCount=function(){return n}}},function(e,t,n){var r=n(114),o=n(40),i=n(64),a=n(10),s=n(24),c=n(65),l=n(68),u=n(85);var d="[object Map]",f="[object Set]";var p=Object.prototype;var g=p.hasOwnProperty;
7441/**
7442       * Checks if `value` is an empty object, collection, map, or set.
7443       *
7444       * Objects are considered empty if they have no own enumerable string keyed
7445       * properties.
7446       *
7447       * Array-like values such as `arguments` objects, arrays, buffers, strings, or
7448       * jQuery-like collections are considered empty if they have a `length` of `0`.
7449       * Similarly, maps and sets are considered empty if they have a `size` of `0`.
7450       *
7451       * @static
7452       * @memberOf _
7453       * @since 0.1.0
7454       * @category Lang
7455       * @param {*} value The value to check.
7456       * @returns {boolean} Returns `true` if `value` is empty, else `false`.
7457       * @example
7458       *
7459       * _.isEmpty(null);
7460       * // => true
7461       *
7462       * _.isEmpty(true);
7463       * // => true
7464       *
7465       * _.isEmpty(1);
7466       * // => true
7467       *
7468       * _.isEmpty([1, 2, 3]);
7469       * // => false
7470       *
7471       * _.isEmpty({ 'a': 1 });
7472       * // => false
7473       */function isEmpty(e){if(null==e)return true;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||u(e)||i(e)))return!e.length;var t=o(e);if(t==d||t==f)return!e.size;if(l(e))return!r(e).length;for(var n in e)if(g.call(e,n))return false;return true}e.exports=isEmpty},function(e,t,n){e.exports={1004:"Authentication error",1005:"Invalid Session ID",1006:"Connect Failed",1007:"Connect Rejected",1008:"Connect Time-out",1009:"Security Error",1010:"Not Connected",1011:"Invalid Parameter",1012:"Peer-to-peer Stream Play Failed",1013:"Connection Failed",1014:"API Response Failure",1015:"PeerConnection not connected, cannot call this method",1021:"Request Timeout",1026:"Terms of Service Violation: Export Compliance",1027:"Connection Limit Exceeded",1040:"Set Video Source Failure",1041:"Invalid Video Source",1500:"Unable to Publish",1501:"Unable to Subscribe",1502:"Unsupported Video Codec",1503:"No TURN server found",1520:"Unable to Force Disconnect",1530:"Unable to Force Unpublish",1540:"Unable to Force Mute",1553:"ICEWorkflow failed",1600:"createOffer, createAnswer, setLocalDescription, setRemoteDescription",1605:"Stream Limit Exceeded",2e3:"Internal Error",2001:"Unexpected Server Response",2021:"Proxy URL Timing Error",2022:"Proxy URL Already Set Error",2031:"getRtcStatsReport is not supported in this browser",4e3:"WebSocket Connection Failed",4001:"WebSocket Network Disconnected",5001:"Unable to access media engine"}},function(e,t,n){const r=n(15);e.exports=function statable(e,t,n,o,i){let a;let s=n;e.currentState=n;const c=function setState(n){if(s!==n){if(-1===t.indexOf(n)){i&&r(i)&&i("invalidState",n);return}e.previousState=s;a=s;e.currentState=n;s=n;o&&r(o)&&o(n,a)}};e.is=function(){return-1!==Array.prototype.indexOf.call(arguments,s)};e.isNot=function(){return-1===Array.prototype.indexOf.call(arguments,s)};return c}},function(e,t,n){const r=n(247);const o={};e.exports=o;o.isElementNode=function(e){return e&&"object"===typeof e&&1===e.nodeType};o.createElement=function(e,t,n,r){const o=(r||document).createElement(e);t=t||{};Object.keys(t).forEach((e=>{if("object"===typeof t[e]){o[e]||(o[e]={});const n=t[e];
7473Object.keys(n).forEach((t=>{o[e][t]=n[t]}))}else"className"===e?o.className=t[e]:o.setAttribute(e,t[e])}));const i=function setChildren(e){"string"===typeof e?o.innerHTML+=e:o.appendChild(e)};Array.isArray(n)?n.forEach(i):n&&i(n);return o};r(o)},function(e,t,n){const r=n(541);e.exports=function(e){void 0===e&&(e={});const t=e.isSessionProxied||n(542);const o=e,i=o.sessionId;t(i)&&r.forEach((t=>{t in e&&(e[t]="")}))}},function(e,t,n){e.exports=["audioLocalAddress","audioRemoteAddress","videoLocalAddress","videoRemoteAddress"]},function(e,t,n){const r=n(20);const o=r.sessions;e.exports=e=>{const t=o.get(e);return!!t&&!!t._.getProxyUrl()}},function(e,t,n){const r=["buildHash","minimumVersion","debug",["websiteURL","websiteUrl"],["cdnURL","cdnUrl"],["loggingURL","loggingUrl"],["apiURL","apiUrl"],["supportSSL",true],["cdnURLSSL","cdnUrl"],["loggingURLSSL","loggingUrl"],["apiURLSSL","apiUrl"],["assetURL","assetUrl"]];e.exports=r},function(e,t,n){const r=["apiUrl","apiURL","apiURLSSL"];e.exports=r},function(e,t,n){e.exports=function noConflict(){const e=(void 0!==typeof window?window:_global3).OT;const t=(void 0!==typeof window?window:_global3).TB;return()=>{const n=(void 0!==typeof window?window:_global3).OT;(void 0!==typeof window?window:_global3).OT=e;(void 0!==typeof window?window:_global3).TB=t;return n}}},function(e,t,n){const getOwnProperties=e=>{const t={};Object.getOwnPropertyNames(e).forEach((n=>{t[n]=Object.getOwnPropertyDescriptor(e,n)}));return t};e.exports=function extendES5Native(e){function ChildClass(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o=new e(...n);Object.setPrototypeOf(o,ChildClass.prototype);return o}ChildClass.prototype=Object.create(e.prototype);Object.defineProperties(ChildClass.prototype,getOwnProperties(e.prototype));Object.keys(e).forEach((t=>{ChildClass[t]=e[t]}));return ChildClass}},function(e,t,n){var r=n(28);e.exports=function(e,t){var o=e&&e.window;var i={shimChrome:true,shimFirefox:true,shimEdge:true,shimSafari:true};for(var a in t)hasOwnProperty.call(t,a)&&(i[a]=t[a]);var s=r.log;var c=r.detectBrowser(o);var l=n(548)||null;var u=n(550)||null;var d=n(554)||null;var f=n(556)||null;var p=n(557)||null;var g={browserDetails:c,commonShim:p,extractVersion:r.extractVersion,disableLog:r.disableLog,disableWarnings:r.disableWarnings};switch(c.browser){case"chrome":if(!l||!l.shimPeerConnection||!i.shimChrome){s("Chrome shim is not included in this adapter release.");return g}s("adapter.js shimming chrome.");g.browserShim=l;p.shimCreateObjectURL(o);l.shimGetUserMedia(o);l.shimMediaStream(o);l.shimSourceObject(o);l.shimPeerConnection(o);l.shimOnTrack(o);l.shimAddTrackRemoveTrack(o);l.shimGetSendersWithDtmf(o);l.shimSenderReceiverGetStats(o);l.fixNegotiationNeeded(o);p.shimRTCIceCandidate(o);p.shimMaxMessageSize(o);p.shimSendThrowTypeError(o);break;case"firefox":if(!d||!d.shimPeerConnection||!i.shimFirefox){s("Firefox shim is not included in this adapter release.");return g}s("adapter.js shimming firefox.");g.browserShim=d;p.shimCreateObjectURL(o);d.shimGetUserMedia(o);d.shimSourceObject(o);d.shimPeerConnection(o);d.shimOnTrack(o);d.shimRemoveStream(o);d.shimSenderGetStats(o);d.shimReceiverGetStats(o);d.shimRTCDataChannel(o);p.shimRTCIceCandidate(o);p.shimMaxMessageSize(o);p.shimSendThrowTypeError(o);break;case"edge":if(!u||!u.shimPeerConnection||!i.shimEdge){s("MS edge shim is not included in this adapter release.");return g}s("adapter.js shimming edge.");g.browserShim=u;p.shimCreateObjectURL(o);u.shimGetUserMedia(o);u.shimPeerConnection(o);u.shimReplaceTrack(o);u.shimGetDisplayMedia(o);p.shimMaxMessageSize(o);p.shimSendThrowTypeError(o);break;case"safari":if(!f||!i.shimSafari){s("Safari shim is not included in this adapter release.");return g}s("adapter.js shimming safari.");g.browserShim=f;p.shimCreateObjectURL(o);f.shimRTCIceServerUrls(o);f.shimCreateOfferLegacy(o);f.shimCallbacksAPI(o);f.shimLocalStreamsAPI(o);f.shimRemoteStreamsAPI(o);f.shimTrackEventTransceiver(o);f.shimGetUserMedia(o);p.shimRTCIceCandidate(o);p.shimMaxMessageSize(o);p.shimSendThrowTypeError(o);break;default:s("Unsupported browser!");break}return g}},function(e,t,n){(function(t){var r=n(28);var o=r.log;
7473function walkStats(e,t,n){if(t&&!n.has(t.id)){n.set(t.id,t);Object.keys(t).forEach((function(r){r.endsWith("Id")?walkStats(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach((function(t){walkStats(e,e.get(t),n)}))}))}}function filterStats(e,t,n){var r=n?"outbound-rtp":"inbound-rtp";var o=new Map;if(null===t)return o;var i=[];e.forEach((function(e){"track"===e.type&&e.trackIdentifier===t.id&&i.push(e)}));i.forEach((function(t){e.forEach((function(n){n.type===r&&n.trackId===t.id&&walkStats(e,n,o)}))}));return o}e.exports={shimGetUserMedia:n(549),shimMediaStream:function(e){e.MediaStream=e.MediaStream||e.webkitMediaStream},shimOnTrack:function(e){if("object"===typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return(this||_global3)._ontrack},set:function(e){(this||_global3)._ontrack&&this.removeEventListener("track",(this||_global3)._ontrack);this.addEventListener("track",(this||_global3)._ontrack=e)},enumerable:true,configurable:true});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var n=this||_global3;if(!n._ontrackpoly){n._ontrackpoly=function(t){t.stream.addEventListener("addtrack",(function(r){var o;o=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find((function(e){return e.track&&e.track.id===r.track.id})):{track:r.track};var i=new Event("track");i.track=r.track;i.receiver=o;i.transceiver={receiver:o};i.streams=[t.stream];n.dispatchEvent(i)}));t.stream.getTracks().forEach((function(r){var o;o=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find((function(e){return e.track&&e.track.id===r.id})):{track:r};var i=new Event("track");i.track=r;i.receiver=o;i.transceiver={receiver:o};i.streams=[t.stream];n.dispatchEvent(i)}))};n.addEventListener("addstream",n._ontrackpoly)}return t.apply(n,arguments)}}else r.wrapPeerConnectionEvent(e,"track",(function(e){e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}});return e}))},shimGetSendersWithDtmf:function(e){if("object"===typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){var shimSenderWithDtmf=function(e,t){return{track:t,get dtmf(){void 0===(this||_global3)._dtmf&&("audio"===t.kind?(this||_global3)._dtmf=e.createDTMFSender(t):(this||_global3)._dtmf=null);return(this||_global3)._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){(this||_global3)._senders=(this||_global3)._senders||[];return(this||_global3)._senders.slice()};var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){var r=this||_global3;var o=t.apply(r,arguments);if(!o){o=shimSenderWithDtmf(r,e);r._senders.push(o)}return o};var n=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this||_global3;n.apply(t,arguments);var r=t._senders.indexOf(e);-1!==r&&t._senders.splice(r,1)}}var r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var t=this||_global3;t._senders=t._senders||[];r.apply(t,[e]);e.getTracks().forEach((function(e){t._senders.push(shimSenderWithDtmf(t,e))}))};var o=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this||_global3;t._senders=t._senders||[];o.apply(t,[e]);e.getTracks().forEach((function(e){var n=t._senders.find((function(t){return t.track===e}));n&&t._senders.splice(t._senders.indexOf(n),1)}))}}else if("object"===typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){var i=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var e=this||_global3;var t=i.apply(e,[]);t.forEach((function(t){t._pc=e}));return t};Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){void 0===(this||_global3)._dtmf&&("audio"===(this||_global3).track.kind?(this||_global3)._dtmf=(this||_global3)._pc.createDTMFSender((this||_global3).track):(this||_global3)._dtmf=null);return(this||_global3)._dtmf}})}},shimSenderReceiverGetStats:function(e){if("object"===typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver){if(!("getStats"in e.RTCRtpSender.prototype)){var n=e.RTCPeerConnection.prototype.getSenders;n&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this||_global3;var t=n.apply(e,[]);t.forEach((function(t){t._pc=e}));return t});var o=e.RTCPeerConnection.prototype.addTrack;o&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=o.apply(this||_global3,arguments);e._pc=this||_global3;return e});e.RTCRtpSender.prototype.getStats=function(){var e=this||_global3;return(this||_global3)._pc.getStats().then((function(t){return filterStats(t,e.track,true)}))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){var i=e.RTCPeerConnection.prototype.getReceivers;i&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this||_global3;var t=i.apply(e,[]);t.forEach((function(t){t._pc=e}));return t});r.wrapPeerConnectionEvent(e,"track",(function(e){e.receiver._pc=e.srcElement;return e}));e.RTCRtpReceiver.prototype.getStats=function(){var e=this||_global3;return(this||_global3)._pc.getStats().then((function(t){return filterStats(t,e.track,false)}))}}if("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype){var a=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var n=this||_global3;if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){var r=arguments[0];var o;var i;var s;
7473n.getSenders().forEach((function(e){e.track===r&&(o?s=true:o=e)}));n.getReceivers().forEach((function(e){e.track===r&&(i?s=true:i=e);return e.track===r}));return s||o&&i?t.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):o?o.getStats():i?i.getStats():t.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return a.apply(n,arguments)}}}},shimSourceObject:function(e){var t=e&&e.URL;"object"===typeof e&&e.HTMLMediaElement&&!("srcObject"in e.HTMLMediaElement.prototype)&&Object.defineProperty(e.HTMLMediaElement.prototype,"srcObject",{get:function(){return(this||_global3)._srcObject},set:function(e){var n=this||_global3;(this||_global3)._srcObject=e;(this||_global3).src&&t.revokeObjectURL((this||_global3).src);if(e){(this||_global3).src=t.createObjectURL(e);e.addEventListener("addtrack",(function(){n.src&&t.revokeObjectURL(n.src);n.src=t.createObjectURL(e)}));e.addEventListener("removetrack",(function(){n.src&&t.revokeObjectURL(n.src);n.src=t.createObjectURL(e)}))}else(this||_global3).src=""}})},shimAddTrackRemoveTrackWithNative:function(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this||_global3;(this||_global3)._shimmedLocalStreams=(this||_global3)._shimmedLocalStreams||{};return Object.keys((this||_global3)._shimmedLocalStreams).map((function(t){return e._shimmedLocalStreams[t][0]}))};var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this||_global3,arguments);(this||_global3)._shimmedLocalStreams=(this||_global3)._shimmedLocalStreams||{};var r=t.apply(this||_global3,arguments);(this||_global3)._shimmedLocalStreams[n.id]?-1===(this||_global3)._shimmedLocalStreams[n.id].indexOf(r)&&(this||_global3)._shimmedLocalStreams[n.id].push(r):(this||_global3)._shimmedLocalStreams[n.id]=[n,r];return r};var n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var t=this||_global3;(this||_global3)._shimmedLocalStreams=(this||_global3)._shimmedLocalStreams||{};e.getTracks().forEach((function(e){var n=t.getSenders().find((function(t){return t.track===e}));if(n)throw new DOMException("Track already exists.","InvalidAccessError")}));var r=t.getSenders();n.apply(this||_global3,arguments);var o=t.getSenders().filter((function(e){return-1===r.indexOf(e)}));(this||_global3)._shimmedLocalStreams[e.id]=[e].concat(o)};var r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){(this||_global3)._shimmedLocalStreams=(this||_global3)._shimmedLocalStreams||{};delete(this||_global3)._shimmedLocalStreams[e.id];return r.apply(this||_global3,arguments)};var o=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this||_global3;(this||_global3)._shimmedLocalStreams=(this||_global3)._shimmedLocalStreams||{};e&&Object.keys((this||_global3)._shimmedLocalStreams).forEach((function(n){var r=t._shimmedLocalStreams[n].indexOf(e);-1!==r&&t._shimmedLocalStreams[n].splice(r,1);1===t._shimmedLocalStreams[n].length&&delete t._shimmedLocalStreams[n]}));return o.apply(this||_global3,arguments)}},shimAddTrackRemoveTrack:function(e){if(e.RTCPeerConnection){var n=r.detectBrowser(e);if(e.RTCPeerConnection.prototype.addTrack&&n.version>=65)return this.shimAddTrackRemoveTrackWithNative(e);var o=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this||_global3;var t=o.apply(this||_global3);e._reverseStreams=e._reverseStreams||{};return t.map((function(t){return e._reverseStreams[t.id]}))};var i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){var n=this||_global3;n._streams=n._streams||{};n._reverseStreams=n._reverseStreams||{};t.getTracks().forEach((function(e){var t=n.getSenders().find((function(t){return t.track===e}));if(t)throw new DOMException("Track already exists.","InvalidAccessError")}));if(!n._reverseStreams[t.id]){var r=new e.MediaStream(t.getTracks());n._streams[t.id]=r;n._reverseStreams[r.id]=t;t=r}i.apply(n,[t])};var a=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this||_global3;t._streams=t._streams||{};t._reverseStreams=t._reverseStreams||{};a.apply(t,[t._streams[e.id]||e]);delete t._reverseStreams[t._streams[e.id]?t._streams[e.id].id:e.id];delete t._streams[e.id]};e.RTCPeerConnection.prototype.addTrack=function(n,r){var o=this||_global3;if("closed"===o.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");
7473var i=[].slice.call(arguments,1);if(1!==i.length||!i[0].getTracks().find((function(e){return e===n})))throw new DOMException("The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.","NotSupportedError");var a=o.getSenders().find((function(e){return e.track===n}));if(a)throw new DOMException("Track already exists.","InvalidAccessError");o._streams=o._streams||{};o._reverseStreams=o._reverseStreams||{};var s=o._streams[r.id];if(s){s.addTrack(n);t.resolve().then((function(){o.dispatchEvent(new Event("negotiationneeded"))}))}else{var c=new e.MediaStream([n]);o._streams[r.id]=c;o._reverseStreams[c.id]=r;o.addStream(c)}return o.getSenders().find((function(e){return e.track===n}))};["createOffer","createAnswer"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t];e.RTCPeerConnection.prototype[t]=function(){var e=this||_global3;var t=arguments;var r=arguments.length&&"function"===typeof arguments[0];return r?n.apply(e,[function(n){var r=replaceInternalStreamId(e,n);t[0].apply(null,[r])},function(e){t[1]&&t[1].apply(null,e)},arguments[2]]):n.apply(e,arguments).then((function(t){return replaceInternalStreamId(e,t)}))}}));var s=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){var e=this||_global3;if(!arguments.length||!arguments[0].type)return s.apply(e,arguments);arguments[0]=replaceExternalStreamId(e,arguments[0]);return s.apply(e,arguments)};var c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get:function(){var e=this||_global3;var t=c.get.apply(this||_global3);return""===t.type?t:replaceInternalStreamId(e,t)}});e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this||_global3;if("closed"===t.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");var n=e._pc===t;if(!n)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");t._streams=t._streams||{};var r;Object.keys(t._streams).forEach((function(n){var o=t._streams[n].getTracks().find((function(t){return e.track===t}));o&&(r=t._streams[n])}));if(r){1===r.getTracks().length?t.removeStream(t._reverseStreams[r.id]):r.removeTrack(e.track);t.dispatchEvent(new Event("negotiationneeded"))}}}function replaceInternalStreamId(e,t){var n=t.sdp;Object.keys(e._reverseStreams||[]).forEach((function(t){var r=e._reverseStreams[t];var o=e._streams[r.id];n=n.replace(new RegExp(o.id,"g"),r.id)}));return new RTCSessionDescription({type:t.type,sdp:n})}function replaceExternalStreamId(e,t){var n=t.sdp;Object.keys(e._reverseStreams||[]).forEach((function(t){var r=e._reverseStreams[t];var o=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),o.id)}));return new RTCSessionDescription({type:t.type,sdp:n})}},shimPeerConnection:function(e){var n=r.detectBrowser(e);if(!e.RTCPeerConnection&&e.webkitRTCPeerConnection){e.RTCPeerConnection=function(t,n){o("PeerConnection");t&&t.iceTransportPolicy&&(t.iceTransports=t.iceTransportPolicy);return new e.webkitRTCPeerConnection(t,n)};e.RTCPeerConnection.prototype=e.webkitRTCPeerConnection.prototype;e.webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return e.webkitRTCPeerConnection.generateCertificate}})}if(e.RTCPeerConnection){var i=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(e,n,r){var o=this||_global3;var a=arguments;if(arguments.length>0&&"function"===typeof e)return i.apply(this||_global3,arguments);if(0===i.length&&(0===arguments.length||"function"!==typeof arguments[0]))return i.apply(this||_global3,[]);var fixChromeStats_=function(e){var t={};var n=e.result();n.forEach((function(e){var n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};
7473e.names().forEach((function(t){n[t]=e.stat(t)}));t[n.id]=n}));return t};var makeMapStats=function(e){return new Map(Object.keys(e).map((function(t){return[t,e[t]]})))};if(arguments.length>=2){var successCallbackWrapper_=function(e){a[1](makeMapStats(fixChromeStats_(e)))};return i.apply(this||_global3,[successCallbackWrapper_,arguments[0]])}return new t((function(e,t){i.apply(o,[function(t){e(makeMapStats(fixChromeStats_(t)))},t])})).then(n,r)};n.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(n){var r=e.RTCPeerConnection.prototype[n];e.RTCPeerConnection.prototype[n]=function(){var e=arguments;var n=this||_global3;var o=new t((function(t,o){r.apply(n,[e[0],t,o])}));return e.length<2?o:o.then((function(){e[1].apply(null,[])}),(function(t){e.length>=3&&e[2].apply(null,[t])}))}}));n.version<52&&["createOffer","createAnswer"].forEach((function(n){var r=e.RTCPeerConnection.prototype[n];e.RTCPeerConnection.prototype[n]=function(){var e=this||_global3;if(arguments.length<1||1===arguments.length&&"object"===typeof arguments[0]){var n=1===arguments.length?arguments[0]:void 0;return new t((function(t,o){r.apply(e,[t,o,n])}))}return r.apply(this||_global3,arguments)}}));["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t];e.RTCPeerConnection.prototype[t]=function(){arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]);return n.apply(this||_global3,arguments)}}));var a=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){if(!arguments[0]){arguments[1]&&arguments[1].apply(null);return t.resolve()}return a.apply(this||_global3,arguments)}}},fixNegotiationNeeded:function(e){r.wrapPeerConnectionEvent(e,"negotiationneeded",(function(e){var t=e.target;if("stable"===t.signalingState)return e}))},shimGetDisplayMedia:function(e,t){if(e.navigator&&e.navigator.mediaDevices&&!("getDisplayMedia"in e.navigator.mediaDevices))if("function"===typeof t){e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then((function(t){var r=n.video&&n.video.width;var o=n.video&&n.video.height;var i=n.video&&n.video.frameRate;n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:i||3}};r&&(n.video.mandatory.maxWidth=r);o&&(n.video.mandatory.maxHeight=o);return e.navigator.mediaDevices.getUserMedia(n)}))};e.navigator.getDisplayMedia=function(t){r.deprecated("navigator.getDisplayMedia","navigator.mediaDevices.getDisplayMedia");return e.navigator.mediaDevices.getDisplayMedia(t)}}else console.error("shimGetDisplayMedia: getSourceId argument is not a function")}}}).call(this||_global3,n(0))},function(e,t,n){(function(t){var r=n(28);var o=r.log;e.exports=function(e){var n=r.detectBrowser(e);var i=e&&e.navigator;var constraintsToChrome_=function(e){if("object"!==typeof e||e.mandatory||e.optional)return e;var t={};Object.keys(e).forEach((function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r="object"===typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"===typeof r.exact&&(r.min=r.max=r.exact);var oldname_=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];var o={};if("number"===typeof r.ideal){o[oldname_("min",n)]=r.ideal;t.optional.push(o);o={};o[oldname_("max",n)]=r.ideal;t.optional.push(o)}else{o[oldname_("",n)]=r.ideal;t.optional.push(o)}}if(void 0!==r.exact&&"number"!==typeof r.exact){t.mandatory=t.mandatory||{};t.mandatory[oldname_("",n)]=r.exact}else["min","max"].forEach((function(e){if(void 0!==r[e]){t.mandatory=t.mandatory||{};t.mandatory[oldname_(e,n)]=r[e]}}))}}));e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced));return t};var shimConstraints_=function(e,t){if(n.version>=61)return t(e);e=JSON.parse(JSON.stringify(e));if(e&&"object"===typeof e.audio){var remap=function(e,t,n){if(t in e&&!(n in e)){e[n]=e[t];delete e[t]}};e=JSON.parse(JSON.stringify(e));remap(e.audio,"autoGainControl","googAutoGainControl");remap(e.audio,"noiseSuppression","googNoiseSuppression");e.audio=constraintsToChrome_(e.audio)}if(e&&"object"===typeof e.video){var r=e.video.facingMode;r=r&&("object"===typeof r?r:{ideal:r});var a=n.version<66;
7473if(r&&("user"===r.exact||"environment"===r.exact||"user"===r.ideal||"environment"===r.ideal)&&!(i.mediaDevices.getSupportedConstraints&&i.mediaDevices.getSupportedConstraints().facingMode&&!a)){delete e.video.facingMode;var s;"environment"===r.exact||"environment"===r.ideal?s=["back","rear"]:"user"!==r.exact&&"user"!==r.ideal||(s=["front"]);if(s)return i.mediaDevices.enumerateDevices().then((function(n){n=n.filter((function(e){return"videoinput"===e.kind}));var i=n.find((function(e){return s.some((function(t){return-1!==e.label.toLowerCase().indexOf(t)}))}));!i&&n.length&&-1!==s.indexOf("back")&&(i=n[n.length-1]);i&&(e.video.deviceId=r.exact?{exact:i.deviceId}:{ideal:i.deviceId});e.video=constraintsToChrome_(e.video);o("chrome: "+JSON.stringify(e));return t(e)}))}e.video=constraintsToChrome_(e.video)}o("chrome: "+JSON.stringify(e));return t(e)};var shimError_=function(e){return n.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString:function(){return(this||_global3).name+((this||_global3).message&&": ")+(this||_global3).message}}};var getUserMedia_=function(e,t,n){shimConstraints_(e,(function(e){i.webkitGetUserMedia(e,t,(function(e){n&&n(shimError_(e))}))}))};i.getUserMedia=getUserMedia_;var getUserMediaPromise_=function(e){return new t((function(t,n){i.getUserMedia(e,t,n)}))};i.mediaDevices||(i.mediaDevices={getUserMedia:getUserMediaPromise_,enumerateDevices:function(){return new t((function(t){var n={audio:"audioinput",video:"videoinput"};return e.MediaStreamTrack.getSources((function(e){t(e.map((function(e){return{label:e.label,kind:n[e.kind],deviceId:e.id,groupId:""}})))}))}))},getSupportedConstraints:function(){return{deviceId:true,echoCancellation:true,facingMode:true,frameRate:true,height:true,width:true}}});if(i.mediaDevices.getUserMedia){var a=i.mediaDevices.getUserMedia.bind(i.mediaDevices);i.mediaDevices.getUserMedia=function(e){return shimConstraints_(e,(function(e){return a(e).then((function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length){t.getTracks().forEach((function(e){e.stop()}));throw new DOMException("","NotFoundError")}return t}),(function(e){return t.reject(shimError_(e))}))}))}}else i.mediaDevices.getUserMedia=function(e){return getUserMediaPromise_(e)};"undefined"===typeof i.mediaDevices.addEventListener&&(i.mediaDevices.addEventListener=function(){o("Dummy mediaDevices.addEventListener called.")});"undefined"===typeof i.mediaDevices.removeEventListener&&(i.mediaDevices.removeEventListener=function(){o("Dummy mediaDevices.removeEventListener called.")})}}).call(this||_global3,n(0))},function(e,t,n){var r=n(28);var o=n(551);var i=n(552);e.exports={shimGetUserMedia:n(553),shimPeerConnection:function(e){var t=r.detectBrowser(e);if(e.RTCIceGatherer){e.RTCIceCandidate||(e.RTCIceCandidate=function(e){return e});e.RTCSessionDescription||(e.RTCSessionDescription=function(e){return e});if(t.version<15025){var n=Object.getOwnPropertyDescriptor(e.MediaStreamTrack.prototype,"enabled");Object.defineProperty(e.MediaStreamTrack.prototype,"enabled",{set:function(e){n.set.call(this||_global3,e);var t=new Event("enabled");t.enabled=e;this.dispatchEvent(t)}})}}e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)&&Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){void 0===(this||_global3)._dtmf&&("audio"===(this||_global3).track.kind?(this||_global3)._dtmf=new e.RTCDtmfSender(this||_global3):"video"===(this||_global3).track.kind&&((this||_global3)._dtmf=null));return(this||_global3)._dtmf}});e.RTCDtmfSender&&!e.RTCDTMFSender&&(e.RTCDTMFSender=e.RTCDtmfSender);var a=i(e,t.version);e.RTCPeerConnection=function(e){e&&e.iceServers&&(e.iceServers=o(e.iceServers));return new a(e)};e.RTCPeerConnection.prototype=a.prototype},shimReplaceTrack:function(e){e.RTCRtpSender&&!("replaceTrack"in e.RTCRtpSender.prototype)&&(e.RTCRtpSender.prototype.replaceTrack=e.RTCRtpSender.prototype.setTrack)},shimGetDisplayMedia:function(e,t){if("getDisplayMedia"in e.navigator&&e.navigator.mediaDevices&&!("getDisplayMedia"in e.navigator.mediaDevices)){var n=e.navigator.getDisplayMedia;e.navigator.mediaDevices.getDisplayMedia=function(t){return n.call(e.navigator,t)};e.navigator.getDisplayMedia=function(t){r.deprecated("navigator.getDisplayMedia","navigator.mediaDevices.getDisplayMedia");return n.call(e.navigator,t)}}}}},function(e,t,n){var r=n(28);e.exports=function(e,t){var n=false;e=JSON.parse(JSON.stringify(e));return e.filter((function(e){if(e&&(e.urls||e.url)){var o=e.urls||e.url;e.url&&!e.urls&&r.deprecated("RTCIceServer.url","RTCIceServer.urls");var i="string"===typeof o;i&&(o=[o]);o=o.filter((function(e){var r=0===e.indexOf("turn:")&&-1!==e.indexOf("transport=udp")&&-1===e.indexOf("turn:[")&&!n;if(r){n=true;return true}return 0===e.indexOf("stun:")&&t>=14393&&-1===e.indexOf("?transport=udp")}));delete e.url;e.urls=i?o[0]:o;return!!o.length}}))}},function(e,t,n){(function(t){var r=n(251);
7473function fixStatsType(e){return{inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type}function writeMediaSection(e,t,n,o,i){var a=r.writeRtpDescription(e.kind,t);a+=r.writeIceParameters(e.iceGatherer.getLocalParameters());a+=r.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":i||"active");a+="a=mid:"+e.mid+"\r\n";e.rtpSender&&e.rtpReceiver?a+="a=sendrecv\r\n":e.rtpSender?a+="a=sendonly\r\n":e.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n";if(e.rtpSender){var s=e.rtpSender._initialTrackId||e.rtpSender.track.id;e.rtpSender._initialTrackId=s;var c="msid:"+(o?o.id:"-")+" "+s+"\r\n";a+="a="+c;a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+c;if(e.sendEncodingParameters[0].rtx){a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+c;a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n"}}a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n";e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n");return a}function filterIceServers(e,t){var n=false;e=JSON.parse(JSON.stringify(e));return e.filter((function(e){if(e&&(e.urls||e.url)){var r=e.urls||e.url;e.url&&!e.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var o="string"===typeof r;o&&(r=[r]);r=r.filter((function(e){var r=0===e.indexOf("turn:")&&-1!==e.indexOf("transport=udp")&&-1===e.indexOf("turn:[")&&!n;if(r){n=true;return true}return 0===e.indexOf("stun:")&&t>=14393&&-1===e.indexOf("?transport=udp")}));delete e.url;e.urls=o?r[0]:r;return!!r.length}}))}function getCommonCapabilities(e,t){var n={codecs:[],headerExtensions:[],fecMechanisms:[]};var findCodecByPayloadType=function(e,t){e=parseInt(e,10);for(var n=0;n<t.length;n++)if(t[n].payloadType===e||t[n].preferredPayloadType===e)return t[n]};var rtxCapabilityMatches=function(e,t,n,r){var o=findCodecByPayloadType(e.parameters.apt,n);var i=findCodecByPayloadType(t.parameters.apt,r);return o&&i&&o.name.toLowerCase()===i.name.toLowerCase()};e.codecs.forEach((function(r){for(var o=0;o<t.codecs.length;o++){var i=t.codecs[o];if(r.name.toLowerCase()===i.name.toLowerCase()&&r.clockRate===i.clockRate){if("rtx"===r.name.toLowerCase()&&r.parameters&&i.parameters.apt&&!rtxCapabilityMatches(r,i,e.codecs,t.codecs))continue;i=JSON.parse(JSON.stringify(i));i.numChannels=Math.min(r.numChannels,i.numChannels);n.codecs.push(i);i.rtcpFeedback=i.rtcpFeedback.filter((function(e){for(var t=0;t<r.rtcpFeedback.length;t++)if(r.rtcpFeedback[t].type===e.type&&r.rtcpFeedback[t].parameter===e.parameter)return true;return false}));break}}}));e.headerExtensions.forEach((function(e){for(var r=0;r<t.headerExtensions.length;r++){var o=t.headerExtensions[r];if(e.uri===o.uri){n.headerExtensions.push(o);break}}}));return n}function isActionAllowedInSignalingState(e,t,n){return-1!=={offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}}[t][e].indexOf(n)}function maybeAddCandidate(e,t){var n=e.getRemoteCandidates().find((function(e){return t.foundation===e.foundation&&t.ip===e.ip&&t.port===e.port&&t.priority===e.priority&&t.protocol===e.protocol&&t.type===e.type}));n||e.addRemoteCandidate(t);return!n}function makeError(e,t){var n=new Error(t);n.name=e;n.code={NotSupportedError:9,InvalidStateError:11,InvalidAccessError:15,TypeError:void 0,OperationError:void 0}[e];return n}e.exports=function(e,n){function addTrackToStreamAndFireEvent(t,n){n.addTrack(t);n.dispatchEvent(new e.MediaStreamTrackEvent("addtrack",{track:t}))}function removeTrackFromStreamAndFireEvent(t,n){n.removeTrack(t);n.dispatchEvent(new e.MediaStreamTrackEvent("removetrack",{track:t}))}function fireAddTrack(t,n,r,o){var i=new Event("track");i.track=n;i.receiver=r;i.transceiver={receiver:r};i.streams=o;e.setTimeout((function(){t._dispatchEvent("track",i)}))}var RTCPeerConnection=function(t){var o=this||_global3;var i=document.createDocumentFragment();["addEventListener","removeEventListener","dispatchEvent"].forEach((function(e){o[e]=i[e].bind(i)}));(this||_global3).canTrickleIceCandidates=null;(this||_global3).needNegotiation=false;(this||_global3).localStreams=[];(this||_global3).remoteStreams=[];(this||_global3)._localDescription=null;(this||_global3)._remoteDescription=null;(this||_global3).signalingState="stable";(this||_global3).iceConnectionState="new";(this||_global3).connectionState="new";(this||_global3).iceGatheringState="new";t=JSON.parse(JSON.stringify(t||{}));(this||_global3).usingBundle="max-bundle"===t.bundlePolicy;if("negotiate"===t.rtcpMuxPolicy)throw makeError("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported");t.rtcpMuxPolicy||(t.rtcpMuxPolicy="require");switch(t.iceTransportPolicy){case"all":case"relay":break;default:t.iceTransportPolicy="all";break}switch(t.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:t.bundlePolicy="balanced";break}t.iceServers=filterIceServers(t.iceServers||[],n);(this||_global3)._iceGatherers=[];if(t.iceCandidatePoolSize)for(var a=t.iceCandidatePoolSize;a>0;a--)(this||_global3)._iceGatherers.push(new e.RTCIceGatherer({iceServers:t.iceServers,gatherPolicy:t.iceTransportPolicy}));else t.iceCandidatePoolSize=0;
7473(this||_global3)._config=t;(this||_global3).transceivers=[];(this||_global3)._sdpSessionId=r.generateSessionId();(this||_global3)._sdpSessionVersion=0;(this||_global3)._dtlsRole=void 0;(this||_global3)._isClosed=false};Object.defineProperty(RTCPeerConnection.prototype,"localDescription",{configurable:true,get:function(){return(this||_global3)._localDescription}});Object.defineProperty(RTCPeerConnection.prototype,"remoteDescription",{configurable:true,get:function(){return(this||_global3)._remoteDescription}});RTCPeerConnection.prototype.onicecandidate=null;RTCPeerConnection.prototype.onaddstream=null;RTCPeerConnection.prototype.ontrack=null;RTCPeerConnection.prototype.onremovestream=null;RTCPeerConnection.prototype.onsignalingstatechange=null;RTCPeerConnection.prototype.oniceconnectionstatechange=null;RTCPeerConnection.prototype.onconnectionstatechange=null;RTCPeerConnection.prototype.onicegatheringstatechange=null;RTCPeerConnection.prototype.onnegotiationneeded=null;RTCPeerConnection.prototype.ondatachannel=null;RTCPeerConnection.prototype._dispatchEvent=function(e,t){if(!(this||_global3)._isClosed){this.dispatchEvent(t);"function"===typeof(this||_global3)["on"+e]&&this["on"+e](t)}};RTCPeerConnection.prototype._emitGatheringStateChange=function(){var e=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",e)};RTCPeerConnection.prototype.getConfiguration=function(){return(this||_global3)._config};RTCPeerConnection.prototype.getLocalStreams=function(){return(this||_global3).localStreams};RTCPeerConnection.prototype.getRemoteStreams=function(){return(this||_global3).remoteStreams};RTCPeerConnection.prototype._createTransceiver=function(e,t){var n=(this||_global3).transceivers.length>0;var r={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:e,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:true};if((this||_global3).usingBundle&&n){r.iceTransport=(this||_global3).transceivers[
74730].iceTransport;r.dtlsTransport=(this||_global3).transceivers[0].dtlsTransport}else{var o=this._createIceAndDtlsTransports();r.iceTransport=o.iceTransport;r.dtlsTransport=o.dtlsTransport}t||(this||_global3).transceivers.push(r);return r};RTCPeerConnection.prototype.addTrack=function(t,n){if((this||_global3)._isClosed)throw makeError("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var r=(this||_global3).transceivers.find((function(e){return e.track===t}));if(r)throw makeError("InvalidAccessError","Track already exists.");var o;for(var i=0;i<(this||_global3).transceivers.length;i++)(this||_global3).transceivers[i].track||(this||_global3).transceivers[i].kind!==t.kind||(o=(this||_global3).transceivers[i]);o||(o=this._createTransceiver(t.kind));this._maybeFireNegotiationNeeded();-1===(this||_global3).localStreams.indexOf(n)&&(this||_global3).localStreams.push(n);o.track=t;o.stream=n;o.rtpSender=new e.RTCRtpSender(t,o.dtlsTransport);return o.rtpSender};RTCPeerConnection.prototype.addStream=function(e){var t=this||_global3;if(n>=15025)e.getTracks().forEach((function(n){t.addTrack(n,e)}));else{var r=e.clone();e.getTracks().forEach((function(e,t){var n=r.getTracks()[t];e.addEventListener("enabled",(function(e){n.enabled=e.enabled}))}));r.getTracks().forEach((function(e){t.addTrack(e,r)}))}};RTCPeerConnection.prototype.removeTrack=function(t){if((this||_global3)._isClosed)throw makeError("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(t instanceof e.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var n=(this||_global3).transceivers.find((function(e){return e.rtpSender===t}));if(!n)throw makeError("InvalidAccessError","Sender was not created by this connection.");var r=n.stream;n.rtpSender.stop();n.rtpSender=null;n.track=null;n.stream=null;var o=(this||_global3).transceivers.map((function(e){return e.stream}));-1===o.indexOf(r)&&(this||_global3).localStreams.indexOf(r)>-1&&(this||_global3).localStreams.splice((this||_global3).localStreams.indexOf(r),1);this._maybeFireNegotiationNeeded()};RTCPeerConnection.prototype.removeStream=function(e){var t=this||_global3;e.getTracks().forEach((function(e){var n=t.getSenders().find((function(t){return t.track===e}));n&&t.removeTrack(n)}))};RTCPeerConnection.prototype.getSenders=function(){return(this||_global3).transceivers.filter((function(e){return!!e.rtpSender})).map((function(e){return e.rtpSender}))};RTCPeerConnection.prototype.getReceivers=function(){return(this||_global3).transceivers.filter((function(e){return!!e.rtpReceiver})).map((function(e){return e.rtpReceiver}))};RTCPeerConnection.prototype._createIceGatherer=function(t,n){var r=this||_global3;if(n&&t>
74730)return(this||_global3).transceivers[0].iceGatherer;if((this||_global3)._iceGatherers.length)return(this||_global3)._iceGatherers.shift();var o=new e.RTCIceGatherer({iceServers:(this||_global3)._config.iceServers,gatherPolicy:(this||_global3)._config.iceTransportPolicy});Object.defineProperty(o,"state",{value:"new",writable:true});(this||_global3).transceivers[t].bufferedCandidateEvents=[];(this||_global3).transceivers[t].bufferCandidates=function(e){var n=!e.candidate||0===Object.keys(e.candidate).length;o.state=n?"completed":"gathering";null!==r.transceivers[t].bufferedCandidateEvents&&r.transceivers[t].bufferedCandidateEvents.push(e)};o.addEventListener("localcandidate",(this||_global3).transceivers[t].bufferCandidates);return o};RTCPeerConnection.prototype._gather=function(t,n){var o=this||_global3;var i=(this||_global3).transceivers[n].iceGatherer;if(!i.onlocalcandidate){var a=(this||_global3).transceivers[n].bufferedCandidateEvents;(this||_global3).transceivers[n].bufferedCandidateEvents=null;i.removeEventListener("localcandidate",(this||_global3).transceivers[n].bufferCandidates);i.onlocalcandidate=function(e){if(!(o.usingBundle&&n>0)){var a=new Event("icecandidate");a.candidate={sdpMid:t,sdpMLineIndex:n};var s=e.candidate;var c=!s||0===Object.keys(s).length;if(c)"new"!==i.state&&"gathering"!==i.state||(i.state="completed");else{"new"===i.state&&(i.state="gathering");s.component=1;s.ufrag=i.getLocalParameters().usernameFragment;var l=r.writeCandidate(s);a.candidate=Object.assign(a.candidate,r.parseCandidate(l));a.candidate.candidate=l;a.candidate.toJSON=function(){return{candidate:a.candidate.candidate,sdpMid:a.candidate.sdpMid,sdpMLineIndex:a.candidate.sdpMLineIndex,usernameFragment:a.candidate.usernameFragment}}}var u=r.getMediaSections(o._localDescription.sdp);u[a.candidate.sdpMLineIndex]+=c?"a=end-of-candidates\r\n":"a="+a.candidate.candidate+"\r\n";o._localDescription.sdp=r.getDescription(o._localDescription.sdp)+u.join("");var d=o.transceivers.every((function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state}));if("gathering"!==o.iceGatheringState){o.iceGatheringState="gathering";o._emitGatheringStateChange()}c||o._dispatchEvent("icecandidate",a);if(d){o._dispatchEvent("icecandidate",new Event("icecandidate"));o.iceGatheringState="complete";o._emitGatheringStateChange()}}};e.setTimeout((function(){a.forEach((function(e){i.onlocalcandidate(e)}))}),0)}};RTCPeerConnection.prototype._createIceAndDtlsTransports=function(){var t=this||_global3;var n=new e.RTCIceTransport(null);n.onicestatechange=function(){t._updateIceConnectionState();t._updateConnectionState()};var r=new e.RTCDtlsTransport(n);r.ondtlsstatechange=function(){t._updateConnectionState()};r.onerror=function(){Object.defineProperty(r,"state",{value:"failed",writable:true});t._updateConnectionState()};return{iceTransport:n,dtlsTransport:r}};RTCPeerConnection.prototype._disposeIceAndDtlsTransports=function(e){var t=(this||_global3).transceivers[e].iceGatherer;if(t){delete t.onlocalcandidate;delete(this||_global3).transceivers[e].iceGatherer}var n=(this||_global3).transceivers[e].iceTransport;if(n){delete n.onicestatechange;delete(this||_global3).transceivers[e].iceTransport}var r=(this||_global3).transceivers[e].dtlsTransport;if(r){delete r.ondtlsstatechange;delete r.onerror;delete(this||_global3).transceivers[e].dtlsTransport}};RTCPeerConnection.prototype._transceive=function(e,t,o){var i=getCommonCapabilities(e.localCapabilities,e.remoteCapabilities);if(t&&e.rtpSender){i.encodings=e.sendEncodingParameters;i.rtcp={cname:r.localCName,compound:e.rtcpParameters.compound};e.recvEncodingParameters.length&&(i.rtcp.ssrc=e.recvEncodingParameters[0].ssrc);e.rtpSender.send(i)}if(o&&e.rtpReceiver&&i.codecs.length>0){"video"===e.kind&&e.recvEncodingParameters&&n<15019&&e.recvEncodingParameters.forEach((function(e){delete e.rtx}));e.recvEncodingParameters.length?i.encodings=e.recvEncodingParameters:i.encodings=[{}];i.rtcp={compound:e.rtcpParameters.compound};e.rtcpParameters.cname&&(i.rtcp.cname=e.rtcpParameters.cname);e.sendEncodingParameters.length&&(i.rtcp.ssrc=e.sendEncodingParameters[0].ssrc);e.rtpReceiver.receive(i)}};RTCPeerConnection.prototype.setLocalDescription=function(e){var n=this||_global3;if(-1===["offer","answer"].indexOf(e.type))return t.reject(makeError("TypeError",'Unsupported type "'+e.type+'"'));if(!isActionAllowedInSignalingState("setLocalDescription",e.type,n.signalingState)||n._isClosed)return t.reject(makeError("InvalidStateError","Can not set local "+e.type+" in state "+n.signalingState));var o;var i;if("offer"===e.type){o=r.splitSections(e.sdp);i=o.shift();o.forEach((function(e,t){var o=r.parseRtpParameters(e);n.transceivers[t].localCapabilities=o}));
7473n.transceivers.forEach((function(e,t){n._gather(e.mid,t)}))}else if("answer"===e.type){o=r.splitSections(n._remoteDescription.sdp);i=o.shift();var a=r.matchPrefix(i,"a=ice-lite").length>0;o.forEach((function(e,t){var o=n.transceivers[t];var s=o.iceGatherer;var c=o.iceTransport;var l=o.dtlsTransport;var u=o.localCapabilities;var d=o.remoteCapabilities;var f=r.isRejected(e)&&0===r.matchPrefix(e,"a=bundle-only").length;if(!f&&!o.rejected){var p=r.getIceParameters(e,i);var g=r.getDtlsParameters(e,i);a&&(g.role="server");if(!n.usingBundle||0===t){n._gather(o.mid,t);"new"===c.state&&c.start(s,p,a?"controlling":"controlled");"new"===l.state&&l.start(g)}var h=getCommonCapabilities(u,d);n._transceive(o,h.codecs.length>0,false)}}))}n._localDescription={type:e.type,sdp:e.sdp};"offer"===e.type?n._updateSignalingState("have-local-offer"):n._updateSignalingState("stable");return t.resolve()};RTCPeerConnection.prototype.setRemoteDescription=function(o){var i=this||_global3;if(-1===["offer","answer"].indexOf(o.type))return t.reject(makeError("TypeError",'Unsupported type "'+o.type+'"'));if(!isActionAllowedInSignalingState("setRemoteDescription",o.type,i.signalingState)||i._isClosed)return t.reject(makeError("InvalidStateError","Can not set remote "+o.type+" in state "+i.signalingState));var a={};i.remoteStreams.forEach((function(e){a[e.id]=e}));var s=[];var c=r.splitSections(o.sdp);var l=c.shift();var u=r.matchPrefix(l,"a=ice-lite").length>0;var d=r.matchPrefix(l,"a=group:BUNDLE ").length>0;i.usingBundle=d;var f=r.matchPrefix(l,"a=ice-options:")[0];i.canTrickleIceCandidates=!!f&&f.substr(14).split(" ").indexOf("trickle")>=0;c.forEach((function(t,c){var f=r.splitLines(t);var p=r.getKind(t);var g=r.isRejected(t)&&0===r.matchPrefix(t,"a=bundle-only").length;var h=f[0].substr(2).split(" ")[2];var b=r.getDirection(t,l);var v=r.parseMsid(t);var m=r.getMid(t)||r.generateIdentifier();if(g||"application"===p&&("DTLS/SCTP"===h||"UDP/DTLS/SCTP"===h))i.transceivers[c]={mid:m,kind:p,protocol:h,rejected:true};else{!g&&i.transceivers[c]&&i.transceivers[c].rejected&&(i.transceivers[c]=i._createTransceiver(p,true));var _;var y;var E;var S;var T;var C;var w;var O;var x;var I=r.parseRtpParameters(t);var A;var R;if(!g){A=r.getIceParameters(t,l);R=r.getDtlsParameters(t,l);R.role="client"}w=r.parseRtpEncodingParameters(t);var k=r.parseRtcpParameters(t);var D=r.matchPrefix(t,"a=end-of-candidates",l).length>0;var N=r.matchPrefix(t,"a=candidate:").map((function(e){return r.parseCandidate(e)})).filter((function(e){return 1===e.component}));if(("offer"===o.type||"answer"===o.type)&&!g&&d&&c>0&&i.transceivers[c]){i._disposeIceAndDtlsTransports(c);
7473i.transceivers[c].iceGatherer=i.transceivers[0].iceGatherer;i.transceivers[c].iceTransport=i.transceivers[0].iceTransport;i.transceivers[c].dtlsTransport=i.transceivers[0].dtlsTransport;i.transceivers[c].rtpSender&&i.transceivers[c].rtpSender.setTransport(i.transceivers[0].dtlsTransport);i.transceivers[c].rtpReceiver&&i.transceivers[c].rtpReceiver.setTransport(i.transceivers[0].dtlsTransport)}if("offer"!==o.type||g){if("answer"===o.type&&!g){_=i.transceivers[c];y=_.iceGatherer;E=_.iceTransport;S=_.dtlsTransport;T=_.rtpReceiver;C=_.sendEncodingParameters;O=_.localCapabilities;i.transceivers[c].recvEncodingParameters=w;i.transceivers[c].remoteCapabilities=I;i.transceivers[c].rtcpParameters=k;N.length&&"new"===E.state&&(!u&&!D||d&&0!==c?N.forEach((function(e){maybeAddCandidate(_.iceTransport,e)})):E.setRemoteCandidates(N));if(!d||0===c){"new"===E.state&&E.start(y,A,"controlling");"new"===S.state&&S.start(R)}var P=getCommonCapabilities(_.localCapabilities,_.remoteCapabilities);var M=P.codecs.filter((function(e){return"rtx"===e.name.toLowerCase()})).length;!M&&_.sendEncodingParameters[0].rtx&&delete _.sendEncodingParameters[0].rtx;i._transceive(_,"sendrecv"===b||"recvonly"===b,"sendrecv"===b||"sendonly"===b);if(!T||"sendrecv"!==b&&"sendonly"!==b)delete _.rtpReceiver;else{x=T.track;if(v){a[v.stream]||(a[v.stream]=new e.MediaStream);addTrackToStreamAndFireEvent(x,a[v.stream]);s.push([x,T,a[v.stream]])}else{a.default||(a.default=new e.MediaStream);addTrackToStreamAndFireEvent(x,a.default);s.push([x,T,a.default])}}}}else{_=i.transceivers[c]||i._createTransceiver(p);_.mid=m;_.iceGatherer||(_.iceGatherer=i._createIceGatherer(c,d));N.length&&"new"===_.iceTransport.state&&(!D||d&&0!==c?N.forEach((function(e){maybeAddCandidate(_.iceTransport,e)})):_.iceTransport.setRemoteCandidates(N));O=e.RTCRtpReceiver.getCapabilities(p);n<15019&&(O.codecs=O.codecs.filter((function(e){return"rtx"!==e.name})));C=_.sendEncodingParameters||[{ssrc:1001*(2*c+2)}];var L=false;if("sendrecv"===b||"sendonly"===b){L=!_.rtpReceiver;T=_.rtpReceiver||new e.RTCRtpReceiver(_.dtlsTransport,p);if(L){var j;x=T.track;if(v&&"-"===v.stream);else if(v){if(!a[v.stream]){a[v.stream]=new e.MediaStream;Object.defineProperty(a[v.stream],"id",{get:function(){return v.stream}})}Object.defineProperty(x,"id",{get:function(){return v.track}});j=a[v.stream]}else{a.default||(a.default=new e.MediaStream);j=a.default}if(j){addTrackToStreamAndFireEvent(x,j);_.associatedRemoteMediaStreams.push(j)}s.push([x,T,j])}}else if(_.rtpReceiver&&_.rtpReceiver.track){_.associatedRemoteMediaStreams.forEach((function(e){var t=e.getTracks().find((function(e){return e.id===_.rtpReceiver.track.id}));t&&removeTrackFromStreamAndFireEvent(t,e)}));_.associatedRemoteMediaStreams=[]}_.localCapabilities=O;_.remoteCapabilities=I;_.rtpReceiver=T;_.rtcpParameters=k;_.sendEncodingParameters=C;_.recvEncodingParameters=w;i._transceive(i.transceivers[c],false,L)}}}));void 0===i._dtlsRole&&(i._dtlsRole="offer"===o.type?"active":"passive");i._remoteDescription={type:o.type,sdp:o.sdp};"offer"===o.type?i._updateSignalingState("have-remote-offer"):i._updateSignalingState("stable");Object.keys(a).forEach((function(t){var n=a[t];if(n.getTracks().length){if(-1===i.remoteStreams.indexOf(n)){i.remoteStreams.push(n);var r=new Event("addstream");r.stream=n;e.setTimeout((function(){i._dispatchEvent("addstream",r)}))}s.forEach((function(e){var t=e[0];var r=e[1];n.id===e[2].id&&fireAddTrack(i,t,r,[n])}))}}));s.forEach((function(e){e[2]||fireAddTrack(i,e[0],e[1],[])}));e.setTimeout((function(){i&&i.transceivers&&i.transceivers.forEach((function(e){if(e.iceTransport&&"new"===e.iceTransport.state&&e.iceTransport.getRemoteCandidates().length>0){console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification");e.iceTransport.addRemoteCandidate({})}}))}),4e3);return t.resolve()};RTCPeerConnection.prototype.close=function(){(this||_global3).transceivers.forEach((function(e){e.iceTransport&&e.iceTransport.stop();e.dtlsTransport&&e.dtlsTransport.stop();e.rtpSender&&e.rtpSender.stop();e.rtpReceiver&&e.rtpReceiver.stop()}));(this||_global3)._isClosed=true;this._updateSignalingState("closed")};RTCPeerConnection.prototype._updateSignalingState=function(e){(this||_global3).signalingState=e;var t=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",t)};RTCPeerConnection.prototype._maybeFireNegotiationNeeded=function(){var t=this||_global3;if("stable"===(this||_global3).signalingState&&true!==(this||_global3).needNegotiation){(this||_global3).needNegotiation=true;e.setTimeout((function(){if(t.needNegotiation){t.needNegotiation=false;var e=new Event("negotiationneeded");t._dispatchEvent("negotiationneeded",e)}}),0)}};RTCPeerConnection.prototype._updateIceConnectionState=function(){var e;var t={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};
7473(this||_global3).transceivers.forEach((function(e){e.iceTransport&&!e.rejected&&t[e.iceTransport.state]++}));e="new";t.failed>0?e="failed":t.checking>0?e="checking":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0?e="connected":t.completed>0&&(e="completed");if(e!==(this||_global3).iceConnectionState){(this||_global3).iceConnectionState=e;var n=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",n)}};RTCPeerConnection.prototype._updateConnectionState=function(){var e;var t={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};(this||_global3).transceivers.forEach((function(e){if(e.iceTransport&&e.dtlsTransport&&!e.rejected){t[e.iceTransport.state]++;t[e.dtlsTransport.state]++}}));t.connected+=t.completed;e="new";t.failed>0?e="failed":t.connecting>0?e="connecting":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0&&(e="connected");if(e!==(this||_global3).connectionState){(this||_global3).connectionState=e;var n=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",n)}};RTCPeerConnection.prototype.createOffer=function(){var o=this||_global3;if(o._isClosed)return t.reject(makeError("InvalidStateError","Can not call createOffer after close"));var i=o.transceivers.filter((function(e){return"audio"===e.kind})).length;var a=o.transceivers.filter((function(e){return"video"===e.kind})).length;var s=arguments[0];if(s){if(s.mandatory||s.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==s.offerToReceiveAudio&&(i=true===s.offerToReceiveAudio?1:false===s.offerToReceiveAudio?0:s.offerToReceiveAudio);void 0!==s.offerToReceiveVideo&&(a=true===s.offerToReceiveVideo?1:false===s.offerToReceiveVideo?0:s.offerToReceiveVideo)}o.transceivers.forEach((function(e){if("audio"===e.kind){i--;i<0&&(e.wantReceive=false)}else if("video"===e.kind){a--;a<0&&(e.wantReceive=false)}}));while(i>0||a>0){if(i>0){o._createTransceiver("audio");i--}if(a>0){o._createTransceiver("video");a--}}var c=r.writeSessionBoilerplate(o._sdpSessionId,o._sdpSessionVersion++);o.transceivers.forEach((function(t,i){var a=t.track;var s=t.kind;var c=t.mid||r.generateIdentifier();t.mid=c;t.iceGatherer||(t.iceGatherer=o._createIceGatherer(i,o.usingBundle));var l=e.RTCRtpSender.getCapabilities(s);n<15019&&(l.codecs=l.codecs.filter((function(e){return"rtx"!==e.name})));l.codecs.forEach((function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1");t.remoteCapabilities&&t.remoteCapabilities.codecs&&t.remoteCapabilities.codecs.forEach((function(t){e.name.toLowerCase()===t.name.toLowerCase()&&e.clockRate===t.clockRate&&(e.preferredPayloadType=t.payloadType)}))}));l.headerExtensions.forEach((function(e){var n=t.remoteCapabilities&&t.remoteCapabilities.headerExtensions||[];n.forEach((function(t){e.uri===t.uri&&(e.id=t.id)}))}));var u=t.sendEncodingParameters||[{ssrc:1001*(2*i+1)}];a&&n>=15019&&"video"===s&&!u[0].rtx&&(u[0].rtx={ssrc:u[0].ssrc+1});t.wantReceive&&(t.rtpReceiver=new e.RTCRtpReceiver(t.dtlsTransport,s));t.localCapabilities=l;t.sendEncodingParameters=u}));"max-compat"!==o._config.bundlePolicy&&(c+="a=group:BUNDLE "+o.transceivers.map((function(e){return e.mid})).join(" ")+"\r\n");c+="a=ice-options:trickle\r\n";o.transceivers.forEach((function(e,t){c+=writeMediaSection(e,e.localCapabilities,"offer",e.stream,o._dtlsRole);c+="a=rtcp-rsize\r\n";if(e.iceGatherer&&"new"!==o.iceGatheringState&&(0===t||!o.usingBundle)){e.iceGatherer.getLocalCandidates().forEac
7473h((function(e){e.component=1;c+="a="+r.writeCandidate(e)+"\r\n"}));"completed"===e.iceGatherer.state&&(c+="a=end-of-candidates\r\n")}}));var l=new e.RTCSessionDescription({type:"offer",sdp:c});return t.resolve(l)};RTCPeerConnection.prototype.createAnswer=function(){var o=this||_global3;if(o._isClosed)return t.reject(makeError("InvalidStateError","Can not call createAnswer after close"));if(!("have-remote-offer"===o.signalingState||"have-local-pranswer"===o.signalingState))return t.reject(makeError("InvalidStateError","Can not call createAnswer in signalingState "+o.signalingState));var i=r.writeSessionBoilerplate(o._sdpSessionId,o._sdpSessionVersion++);o.usingBundle&&(i+="a=group:BUNDLE "+o.transceivers.map((function(e){return e.mid})).join(" ")+"\r\n");i+="a=ice-options:trickle\r\n";var a=r.getMediaSections(o._remoteDescription.sdp).length;o.transceivers.forEach((function(e,t){if(!(t+1>a))if(e.rejected){"application"===e.kind?"DTLS/SCTP"===e.protocol?i+="m=application 0 DTLS/SCTP 5000\r\n":i+="m=application 0 "+e.protocol+" webrtc-datachannel\r\n":"audio"===e.kind?i+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===e.kind&&(i+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n");i+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+e.mid+"\r\n"}else{if(e.stream){var r;"audio"===e.kind?r=e.stream.getAudioTracks()[0]:"video"===e.kind&&(r=e.stream.getVideoTracks()[0]);r&&n>=15019&&"video"===e.kind&&!e.sendEncodingParameters[0].rtx&&(e.sendEncodingParameters[0].rtx={ssrc:e.sendEncodingParameters[0].ssrc+1})}var s=getCommonCapabilities(e.localCapabilities,e.remoteCapabilities);var c=s.codecs.filter((function(e){return"rtx"===e.name.toLowerCase()})).length;!c&&e.sendEncodingParameters[0].rtx&&delete e.sendEncodingParameters[0].rtx;i+=writeMediaSection(e,s,"answer",e.stream,o._dtlsRole);e.rtcpParameters&&e.rtcpParameters.reducedSize&&(i+="a=rtcp-rsize\r\n")}}));var s=new e.RTCSessionDescription({type:"answer",sdp:i});return t.resolve(s)};RTCPeerConnection.prototype.addIceCandidate=function(e){var n=this||_global3;var o;return e&&!(void 0!==e.sdpMLineIndex||e.sdpMid)?t.reject(new TypeError("sdpMLineIndex or sdpMid required")):new t((function(t,i){if(!n._remoteDescription)return i(makeError("InvalidStateError","Can not add ICE candidate without a remote description"));if(e&&""!==e.candidate){var a=e.sdpMLineIndex;if(e.sdpMid)for(var s=0;s<n.transceivers.length;s++)if(n.transceivers[s].mid===e.sdpMid){a=s;break}var c=n.transceivers[a];if(!c)return i(makeError("OperationError","Can not add ICE candidate"));if(c.rejected)return t();var l=Object.keys(e.candidate).length>0?r.parseCandidate(e.candidate):{};if("tcp"===l.protocol&&(0===l.port||9===l.port))return t();if(l.component&&1!==l.component)return t();if((0===a||a>
74730&&c.iceTransport!==n.transceivers[0].iceTransport)&&!maybeAddCandidate(c.iceTransport,l))return i(makeError("OperationError","Can not add ICE candidate"));var u=e.candidate.trim();0===u.indexOf("a=")&&(u=u.substr(2));o=r.getMediaSections(n._remoteDescription.sdp);o[a]+="a="+(l.type?u:"end-of-candidates")+"\r\n";n._remoteDescription.sdp=r.getDescription(n._remoteDescription.sdp)+o.join("")}else for(var d=0;d<n.transceivers.length;d++)if(!n.transceivers[d].rejected){n.transceivers[d].iceTransport.addRemoteCandidate({});o=r.getMediaSections(n._remoteDescription.sdp);o[d]+="a=end-of-candidates\r\n";n._remoteDescription.sdp=r.getDescription(n._remoteDescription.sdp)+o.join("");if(n.usingBundle)break}t()}))};RTCPeerConnection.prototype.getStats=function(n){if(n&&n instanceof e.MediaStreamTrack){var r=null;(this||_global3).transceivers.forEach((function(e){e.rtpSender&&e.rtpSender.track===n?r=e.rtpSender:e.rtpReceiver&&e.rtpReceiver.track===n&&(r=e.rtpReceiver)}));if(!r)throw makeError("InvalidAccessError","Invalid selector.");return r.getStats()}var o=[];(this||_global3).transceivers.forEach((function(e){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach((function(t){e[t]&&o.push(e[t].getStats())}))}));return t.all(o).then((function(e){var t=new Map;e.forEach((function(e){e.forEach((function(e){t.set(e.id,e)}))}));return t}))};var o=["RTCRtpSender","RTCRtpReceiver","RTCIceGatherer","RTCIceTransport","RTCDtlsTransport"];o.forEach((function(t){var n=e[t];if(n&&n.prototype&&n.prototype.getStats){var r=n.prototype.getStats;n.prototype.getStats=function(){return r.apply(this||_global3).then((function(e){var t=new Map;Object.keys(e).forEach((function(n){e[n].type=fixStatsType(e[n]);t.set(n,e[n])}));return t}))}}}));var i=["createOffer","createAnswer"];i.forEach((function(e){var t=RTCPeerConnection.prototype[e];RTCPeerConnection.prototype[e]=function(){var e=arguments;return"function"===typeof e[0]||"function"===typeof e[1]?t.apply(this||_global3,[arguments[2]]).then((function(t){"function"===typeof e[0]&&e[0].apply(null,[t])}),(function(t){"function"===typeof e[1]&&e[1].apply(null,[t])})):t.apply(this||_global3,arguments)}}));i=["setLocalDescription","setRemoteDescription","addIceCandidate"];i.forEach((function(e){var t=RTCPeerConnection.prototype[e];RTCPeerConnection.prototype[e]=function(){var e=arguments;return"function"===typeof e[1]||"function"===typeof e[2]?t.apply(this||_global3,arguments).then((function(){"function"===typeof e[1]&&e[1].apply(null)}),(function(t){"function"===typeof e[2]&&e[2].apply(null,[t])})):t.apply(this||_global3,arguments)}}));["getStats"].forEach((function(e){var t=RTCPeerConnection.prototype[e];RTCPeerConnection.prototype[e]=function(){var e=arguments;return"function"===typeof e[1]?t.apply(this||_global3,arguments).then((function(){"function"===typeof e[1]&&e[1].apply(null)})):t.apply(this||_global3,arguments)}}));return RTCPeerConnection}}).call(this||_global3,n(0))},function(e,t,n){(function(t){e.exports=function(e){var n=e&&e.navigator;var shimError_=function(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint,toString:function(){return(this||_global3).name}}};var r=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(e){return r(e).catch((function(e){return t.reject(shimError_(e))}))}}}).call(this||_global3,n(0))},function(e,t,n){(function(t){var r=n(28);e.exports={shimGetUserMedia:n(555),shimOnTrack:function(e){"object"===typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)&&Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return(this||_global3)._ontrack},set:function(e){if((this||_global3)._ontrack){this.removeEventListener("track",(this||_global3)._ontrack);this.removeEventListener("addstream",(this||_global3)._ontrackpoly)}this.addEventListener("track",(this||_global3)._ontrack=e);this.addEventListener("addstream",(this||_global3)._ontrackpoly=function(e){e.stream.getTracks().forEach(function(t){var n=new Event("track");n.track=t;n.receiver={track:t};n.transceiver={receiver:n.receiver};n.streams=[e.stream];this.dispatchEvent(n)}.bind(this||_global3))}.bind(this||_global3))},enumerable:true,configurable:true});"object"===typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:(this||_global3).receiver}}})},shimSourceObject:function(e){"object"===typeof e&&e.HTMLMediaElement&&!("srcObject"in e.HTMLMediaElement.prototype)&&Object.defineProperty(e.HTMLMediaElement.prototype,"srcObject",{get:function(){return(this||_global3).mozSrcObject},set:function(e){(this||_global3).mozSrcObject=e}})},shimPeerConnection:function(e){var n=r.detectBrowser(e);if("object"===typeof e&&(e.RTCPeerConnection||e.mozRTCPeerConnection)){if
7473(!e.RTCPeerConnection){e.RTCPeerConnection=function(t,r){if(n.version<38&&t&&t.iceServers){var o=[];for(var i=0;i<t.iceServers.length;i++){var a=t.iceServers[i];if(a.hasOwnProperty("urls"))for(var s=0;s<a.urls.length;s++){var c={url:a.urls[s]};if(0===a.urls[s].indexOf("turn")){c.username=a.username;c.credential=a.credential}o.push(c)}else o.push(t.iceServers[i])}t.iceServers=o}return new e.mozRTCPeerConnection(t,r)};e.RTCPeerConnection.prototype=e.mozRTCPeerConnection.prototype;e.mozRTCPeerConnection.generateCertificate&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return e.mozRTCPeerConnection.generateCertificate}});e.RTCSessionDescription=e.mozRTCSessionDescription;e.RTCIceCandidate=e.mozRTCIceCandidate}["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t];e.RTCPeerConnection.prototype[t]=function(){arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]);return n.apply(this||_global3,arguments)}}));var o=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){if(!arguments[0]){arguments[1]&&arguments[1].apply(null);return t.resolve()}return o.apply(this||_global3,arguments)};var makeMapStats=function(e){var t=new Map;Object.keys(e).forEach((function(n){t.set(n,e[n]);t[n]=e[n]}));return t};var i={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"};var a=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(e,t,r){return a.apply(this||_global3,[e||null]).then((function(e){n.version<48&&(e=makeMapStats(e));if(n.version<53&&!t)try{e.forEach((function(e){e.type=i[e.type]||e.type}))}catch(t){if("TypeError"!==t.name)throw t;e.forEach((function(t,n){e.set(n,Object.assign({},t,{type:i[t.type]||t.type}))}))}return e})).then(t,r)}}},shimSenderGetStats:function(e){if("object"===typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!("getStats"in e.RTCRtpSender.prototype))){var n=e.RTCPeerConnection.prototype.getSenders;n&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this||_global3;var t=n.apply(e,[]);t.forEach((function(t){t._pc=e}));return t});var r=e.RTCPeerConnection.prototype.addTrack;r&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=r.apply(this||_global3,arguments);e._pc=this||_global3;return e});e.RTCRtpSender.prototype.getStats=function(){return(this||_global3).track?(this||_global3)._pc.getStats((this||_global3).track):t.resolve(new Map)}}},shimReceiverGetStats:function(e){if("object"===typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!("getStats"in e.RTCRtpReceiver.prototype))){var t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this||_global3;var n=t.apply(e,[]);n.forEach((function(t){t._pc=e}));return n});r.wrapPeerConnectionEvent(e,"track",(function(e){e.receiver._pc=e.srcElement;return e}));e.RTCRtpReceiver.prototype.getStats=function(){return(this||_global3)._pc.getStats((this||_global3).track)}}},shimRemoveStream:function(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this||_global3;r.deprecated("removeStream","removeTrack");this.getSenders().forEach((function(n){n.track&&-1!==e.getTracks().indexOf(n.track)&&t.removeTrack(n)}))})},shimRTCDataChannel:function(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)},shimGetDisplayMedia:function(e,n){if(e.navigator&&e.navigator.mediaDevices&&!("getDisplayMedia"in e.navigator.mediaDevices)){e.navigator.mediaDevices.getDisplayMedia=function(r){if(!(r&&r.video)){var o=new DOMException("getDisplayMedia without video constraints is undefined");o.name="NotFoundError";o.code=8;return t.reject(o)}true===r.video?r.video={mediaSource:n}:r.video.mediaSource=n;return e.navigator.mediaDevices.getUserMedia(r)};e.navigator.getDisplayMedia=function(t){r.deprecated("navigator.getDisplayMedia","navigator.mediaDevices.getDisplayMedia");return e.navigator.mediaDevices.getDisplayMedia(t)}}}}}).call(this||_global3,n(0))},function(e,t,n){(function(t){var r=n(28);var o=r.log;e.exports=function(e){var n=r.detectBrowser(e);var i=e&&e.navigator;var a=e&&e.MediaStreamTrack;var shimError_=function(e){return{name:{InternalError:"NotReadableError",NotSupportedError:"TypeError",PermissionDeniedError:"NotAllowedError",SecurityError:"NotAllowedError"}[e.name]||e.name,message:{"The operation is insecure.":"The request is not allowed by the user agent or the platform in the current context."}[e.message]||e.message,constraint:e.constraint,toString:function(){return(this||_global3).name+((this||_global3).message&&": ")+(this||_global3).message}}};var getUserMedia_=function(e,t,r){var constraintsToFF37_=function(e){if("object"!==typeof e||e.require)return e;var t=[];Object.keys(e).forEach((function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r=e[n]="object"===typeof e[n]?e[n]:{ideal:e[n]};void 0===r.min&&void 0===r.max&&void 0===r.exact||t.push(n);if(void 0!==r.exact){"number"===typeof r.exact?r.min=r.max=r.exact:e[n]=r.exact;delete r.exact}if(void 0!==r.ideal){e.advanced=e.advanced||[];var o={};"number"===typeof r.ideal?o[n]={min:r.ideal,max:r.ideal}:o[n]=r.ideal;e.advanced.push(o);delete r.ideal;Object.keys(r).length||delete e[n]}}}));t.length&&(e.require=t);return e};e=JSON.parse(JSON.stringify(e));if(n.version<38){o("spec: "+JSON.stringify(e));e.audio&&(e.audio=constraintsToFF37_(e.audio));e.video&&(e.video=constraintsToFF37_(e.video));o("ff37: "+JSON.stringify(e))}return i.mozGetUserMedia(e,t,(function(e){r(shimError_(e))}))};var getUserMediaPromise_=function(e){return new t((function(t,n){getUserMedia_(e,t,n)}))};i.mediaDevices||(i.mediaDevices={getUserMedia:getUserMediaPromise_,addEventListener:function(){},removeEventListener:function(){}});i.mediaDevices.enumerateDevices=i.mediaDevices.enumerateDevices||function(){return new t((function(e){var t=[{kind:"audioinput",deviceId:"default",label:"",groupId:""},{kind:"videoinput",deviceId:"default",label:"",groupId:""}];e(t)}))};if(n.version<41){var s=i.mediaDevices.enumerateDevices.bind(i.mediaDevices);i.mediaDevices.enumerateDevices=function(){return s().then(void 0,(function(e){if("NotFoundError"===e.name)return[];throw e}))}}if(n.version<49){var c=i.mediaDevices.getUserMedia.bind(i.mediaDevices);i.mediaDevices.getUserMedia=function(e){return c(e).then((function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length){t.getTracks().forEac
7473h((function(e){e.stop()}));throw new DOMException("The object can not be found here.","NotFoundError")}return t}),(function(e){return t.reject(shimError_(e))}))}}if(!(n.version>55&&"autoGainControl"in i.mediaDevices.getSupportedConstraints())){var remap=function(e,t,n){if(t in e&&!(n in e)){e[n]=e[t];delete e[t]}};var l=i.mediaDevices.getUserMedia.bind(i.mediaDevices);i.mediaDevices.getUserMedia=function(e){if("object"===typeof e&&"object"===typeof e.audio){e=JSON.parse(JSON.stringify(e));remap(e.audio,"autoGainControl","mozAutoGainControl");remap(e.audio,"noiseSuppression","mozNoiseSuppression")}return l(e)};if(a&&a.prototype.getSettings){var u=a.prototype.getSettings;a.prototype.getSettings=function(){var e=u.apply(this||_global3,arguments);remap(e,"mozAutoGainControl","autoGainControl");remap(e,"mozNoiseSuppression","noiseSuppression");return e}}if(a&&a.prototype.applyConstraints){var d=a.prototype.applyConstraints;a.prototype.applyConstraints=function(e){if("audio"===(this||_global3).kind&&"object"===typeof e){e=JSON.parse(JSON.stringify(e));remap(e,"autoGainControl","mozAutoGainControl");remap(e,"noiseSuppression","mozNoiseSuppression")}return d.apply(this||_global3,[e])}}}i.getUserMedia=function(e,t,o){if(n.version<44)return getUserMedia_(e,t,o);r.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia");i.mediaDevices.getUserMedia(e).then(t,o)}}}).call(this||_global3,n(0))},function(e,t,n){(function(t){var r=n(28);e.exports={shimLocalStreamsAPI:function(e){if("object"===typeof e&&e.RTCPeerConnection){"getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){(this||_global3)._localStreams||((this||_global3)._localStreams=[]);return(this||_global3)._localStreams});"getStreamById"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getStreamById=function(e){var t=null;(this||_global3)._localStreams&&(this||_global3)._localStreams.forEach((function(n){n.id===e&&(t=n)}));(this||_global3)._remoteStreams&&(this||_global3)._remoteStreams.forEach((function(n){n.id===e&&(t=n)}));return t});if(!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){(this||_global3)._localStreams||((this||_global3)._localStreams=[]);-1===(this||_global3)._localStreams.indexOf(e)&&(this||_global3)._localStreams.push(e);var n=this||_global3;e.getTracks().forEach((function(r){t.call(n,r,e)}))};
7473e.RTCPeerConnection.prototype.addTrack=function(e,n){n&&((this||_global3)._localStreams?-1===(this||_global3)._localStreams.indexOf(n)&&(this||_global3)._localStreams.push(n):(this||_global3)._localStreams=[n]);return t.call(this||_global3,e,n)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){(this||_global3)._localStreams||((this||_global3)._localStreams=[]);var t=(this||_global3)._localStreams.indexOf(e);if(-1!==t){(this||_global3)._localStreams.splice(t,1);var n=this||_global3;var r=e.getTracks();this.getSenders().forEach((function(e){-1!==r.indexOf(e.track)&&n.removeTrack(e)}))}})}},shimRemoteStreamsAPI:function(e){if("object"===typeof e&&e.RTCPeerConnection){"getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return(this||_global3)._remoteStreams?(this||_global3)._remoteStreams:[]});if(!("onaddstream"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return(this||_global3)._onaddstream},set:function(e){(this||_global3)._onaddstream&&this.removeEventListener("addstream",(this||_global3)._onaddstream);this.addEventListener("addstream",(this||_global3)._onaddstream=e)}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var e=this||_global3;(this||_global3)._onaddstreampoly||this.addEventListener("track",(this||_global3)._onaddstreampoly=function(t){t.streams.forEach((function(t){e._remoteStreams||(e._remoteStreams=[]);if(!(e._remoteStreams.indexOf(t)>=0)){e._remoteStreams.push(t);var n=new Event("addstream");n.stream=t;e.dispatchEvent(n)}}))});return t.apply(e,arguments)}}}},shimCallbacksAPI:function(e){if("object"===typeof e&&e.RTCPeerConnection){var n=e.RTCPeerConnection.prototype;var r=n.createOffer;var o=n.createAnswer;var i=n.setLocalDescription;var a=n.setRemoteDescription;var s=n.addIceCandidate;n.createOffer=function(e,n){var o=arguments.length>=2?arguments[2]:arguments[0];var i=r.apply(this||_global3,[o]);if(!n)return i;i.then(e,n);return t.resolve()};n.createAnswer=function(e,n){var r=arguments.length>=2?arguments[2]:arguments[0];var i=o.apply(this||_global3,[r]);if(!n)return i;i.then(e,n);return t.resolve()};var withCallback=function(e,n,r){var o=i.apply(this||_global3,[e]);if(!r)return o;o.then(n,r);return t.resolve()};n.setLocalDescription=withCallback;withCallback=function(e,n,r){var o=a.apply(this||_global3,[e]);if(!r)return o;o.then(n,r);return t.resolve()};n.setRemoteDescription=withCallback;withCallback=function(e,n,r){var o=s.apply(this||_global3,[e]);if(!r)return o;o.then(n,r);return t.resolve()};n.addIceCandidate=withCallback}},shimGetUserMedia:function(e){var t=e&&e.navigator;t.getUserMedia||(t.webkitGetUserMedia?t.getUserMedia=t.webkitGetUserMedia.bind(t):t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t)))},shimRTCIceServerUrls:function(e){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){var o=[];for(var i=0;i<e.iceServers.length;i++){var a=e.iceServers[i];if(!a.hasOwnProperty("urls")&&a.hasOwnProperty("url")){r.deprecated("RTCIceServer.url","RTCIceServer.urls");a=JSON.parse(JSON.stringify(a));a.urls=a.url;delete a.url;o.push(a)}else o.push(e.iceServers[i])}e.iceServers=o}return new t(e,n)};e.RTCPeerConnection.prototype=t.prototype;"generateCertificate"in e.RTCPeerConnection&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return t.generateCertificate}})},shimTrackEventTransceiver:function(e){"object"===typeof e&&e.RTCPeerConnection&&"receiver"in e.RTCTrackEvent.prototype&&!e.RTCTransceiver&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:(this||_global3).receiver}}})},shimCreateOfferLegacy:function(e){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){var n=this||_global3;if(e){"undefined"!==typeof e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);var r=n.getTransceivers().find((function(e){return e.sender.track&&"audio"===e.sender.track.kind}));false===e.offerToReceiveAudio&&r?"sendrecv"===r.direction?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":"recvonly"===r.direction&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):true!==e.offerToReceiveAudio||r||n.addTransceiver("audio");"undefined"!==typeof e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);var o=n.getTransceivers().find((function(e){return e.sender.track&&"video"===e.sender.track.kind}));false===e.offerToReceiveVideo&&o?"sendrecv"===o.direction?o.setDirection("sendonly"):"recvonly"===o.direction&&o.setDirection("inactive"):true!==e.offerToReceiveVideo||o||n.addTransceiver("video")}return t.apply(n,arguments)}}}}).call(this||_global3,n(0))},function(e,t,n){var r=n(251);var o=n(28);e.exports={shimRTCIceCandidate:function(e){if(!(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)){var t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"===typeof e&&e.candidate&&0===e.candidate.indexOf("a=")){e=JSON.parse(JSON.stringify(e));e.candidate=e.candidate.substr(2)}if(e.candidate&&e.candidate.length){var n=new t(e);var o=r.parseCandidate(e.candidate);var i=Object.assign(n,o);i.toJSON=function(){return{candidate:i.candidate,sdpMid:i.sdpMid,sdpMLineIndex:i.sdpMLineIndex,usernameFragment:i.usernameFragment}};return i}return new t(e)};e.RTCIceCandidate.prototype=t.prototype;o.wrapPeerConnectionEvent(e,"icecandidate",(function(t){t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"});return t}))}},shimCreateObjectURL:function(e){var t=e&&e.URL;if("object"===typeof e&&e.HTMLMediaElement&&"srcObject"in e.HTMLMediaElement.prototype&&t.createObjectURL&&t.revokeObjectURL){var n=t.createObjectURL.bind(t);var r=t.revokeObjectURL.bind(t);var i=new Map,a=0;t.createObjectURL=function(e){if("getTracks"in e){var t="polyblob:"+ ++a;i.set(t,e);o.deprecated("URL.createObjectURL(stream)","elem.srcObject = stream");return t}return n(e)};t.revokeObjectURL=function(e){r(e);i.delete(e)};var s=Object.getOwnPropertyDescriptor(e.HTMLMediaElement.prototype,"src");Object.defineProperty(e.HTMLMediaElement.prototype,"src",{get:function(){return s.get.apply(this||_global3)},set:function(e){(this||_global3).srcObject=i.get(e)||null;return s.set.apply(this||_global3,[e])}});var c=e.HTMLMediaElement.prototype.setAttribute;e.HTMLMediaElement.prototype.setAttribute=function(){2===arguments.length&&"src"===(""+arguments[0]).toLowerCase()&&((this||_global3).srcObject=i.get(arguments[1])||null);return c.apply(this||_global3,arguments)}}},shimMaxMessageSize:function(e){if(!e.RTCSctpTransport&&e.RTCPeerConnection){var t=o.detectBrowser(e);
7473"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get:function(){return"undefined"===typeof(this||_global3)._sctp?null:(this||_global3)._sctp}});var sctpInDescription=function(e){var t=r.splitSections(e.sdp);t.shift();return t.some((function(e){var t=r.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")}))};var getRemoteFirefoxVersion=function(e){var t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;var n=parseInt(t[1],10);return n!==n?-1:n};var getCanSendMaxMessageSize=function(e){var n=65536;"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637);return n};var getMaxMessageSize=function(e,n){var o=65536;"firefox"===t.browser&&57===t.version&&(o=65535);var i=r.matchPrefix(e.sdp,"a=max-message-size:");i.length>0?o=parseInt(i[0].substr(19),10):"firefox"===t.browser&&-1!==n&&(o=2147483637);return o};var n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var e=this||_global3;e._sctp=null;if(sctpInDescription(arguments[0])){var t=getRemoteFirefoxVersion(arguments[0]);var r=getCanSendMaxMessageSize(t);var o=getMaxMessageSize(arguments[0],t);var i;i=0===r&&0===o?Number.POSITIVE_INFINITY:0===r||0===o?Math.max(r,o):Math.min(r,o);var a={};Object.defineProperty(a,"maxMessageSize",{get:function(){return i}});e._sctp=a}return n.apply(e,arguments)}}},shimSendThrowTypeError:function(e){if(e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype){var t=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){var e=this||_global3;var n=t.apply(e,arguments);wrapDcSend(n,e);return n};o.wrapPeerConnectionEvent(e,"datachannel",(function(e){wrapDcSend(e.channel,e.target);return e}))}function wrapDcSend(e,t){var n=e.send;e.send=function(){var r=arguments[0];var o=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&o>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}}}},function(e,t,n){(function(t){const r=n(6);function isDomReady(){return"undefined"===typeof document||"complete"===document.readyState||"interactive"===document.readyState&&document.body}let o=false;const i={isDomLoaded:isDomReady,isDomUnloaded(){return o},whenUnloaded:new t((e=>{if("undefined"!==typeof window){const unload=()=>{o=true;i.emit("unload");e()};window.addEventListener("unload",unload)}})),whenLoaded:new t((e=>{if(isDomReady()){e();return}const load=()=>{document.removeEventListener("DOMContentLoaded",load);document.removeEventListener("load",load);i.emit("load");e()};document.addEventListener("DOMContentLoaded",load);document.addEventListener("load",load)}))};r(i);e.exports=i}).call(this||_global3,n(0))},function(e,t,n){var r=n(78),o=n(255),i=n(238),a=n(560),s=n(9),c=n(52),l=n(256);
7474/**
7475       * The base implementation of `_.merge` without support for multiple sources.
7476       *
7477       * @private
7478       * @param {Object} object The destination object.
7479       * @param {Object} source The source object.
7480       * @param {number} srcIndex The index of `source`.
7481       * @param {Function} [customizer] The function to customize merged values.
7482       * @param {Object} [stack] Tracks traversed source values and their merged
7483       *  counterparts.
7484       */function baseMerge(e,t,n,u,d){e!==t&&i(t,(function(i,c){d||(d=new r);if(s(i))a(e,t,c,n,baseMerge,u,d);else{var f=u?u(l(e,c),i,c+"",e,t,d):void 0;void 0===f&&(f=i);o(e,c,f)}}),c)}e.exports=baseMerge},function(e,t,n){var r=n(255),o=n(179),i=n(188),a=n(53),s=n(189),c=n(64),l=n(10),u=n(129),d=n(65),f=n(15),p=n(9),g=n(135),h=n(85),b=n(256),v=n(561);
7485/**
7486       * A specialized version of `baseMerge` for arrays and objects which performs
7487       * deep merges and tracks traversed objects enabling objects with circular
7488       * references to be merged.
7489       *
7490       * @private
7491       * @param {Object} object The destination object.
7492       * @param {Object} source The source object.
7493       * @param {string} key The key of the value to merge.
7494       * @param {number} srcIndex The index of `source`.
7495       * @param {Function} mergeFunc The function to merge values.
7496       * @param {Function} [customizer] The function to customize assigned values.
7497       * @param {Object} [stack] Tracks traversed source values and their merged
7498       *  counterparts.
7499       */function baseMergeDeep(e,t,n,m,_,y,E){var S=b(e,n),T=b(t,n),C=E.get(T);if(C)r(e,n,C);else{var w=y?y(S,T,n+"",e,t,E):void 0;var O=void 0===w;if(O){var x=l(T),I=!x&&d(T),A=!x&&!I&&h(T);w=T;if(x||I||A)if(l(S))w=S;else if(u(S))w=a(S);else if(I){O=false;w=o(T,true)}else if(A){O=false;w=i(T,true)}else w=[];else if(g(T)||c(T)){w=S;c(S)?w=v(S):p(S)&&!f(S)||(w=s(T))}else O=false}if(O){E.set(T,w);_(w,T,m,y,E);E.delete(T)}r(e,n,w)}}e.exports=baseMergeDeep},function(e,t,n){var r=n(39),o=n(52);
7500/**
7501       * Converts `value` to a plain object flattening inherited enumerable str
7501ing
7502       * keyed properties of `value` to own properties of the plain object.
7503       *
7504       * @static
7505       * @memberOf _
7506       * @since 3.0.0
7507       * @category Lang
7508       * @param {*} value The value to convert.
7509       * @returns {Object} Returns the converted plain object.
7510       * @example
7511       *
7512       * function Foo() {
7513       *   this.b = 2;
7514       * }
7515       *
7516       * Foo.prototype.c = 3;
7517       *
7518       * _.assign({ 'a': 1 }, new Foo);
7519       * // => { 'a': 1, 'b': 2 }
7520       *
7521       * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
7522       * // => { 'a': 1, 'b': 2, 'c': 3 }
7523       */function toPlainObject(e){return r(e,o(e))}e.exports=toPlainObject},function(e,t,n){const r=n(148);const o=n(257);const i=n(258);const a=n(263);const s=n(1)("normalizeConstraintInput");const c={"320x240":{width:320,height:240},"320x180":{width:320,height:180},"640x480":{width:640,height:480},"640x360":{width:640,height:360},"1280x720":{width:1280,height:720},"1280x960":{width:1280,height:960},"1920x1080":{width:1920,height:1080}};const l=[1,7,15,30];function getLogging(e){return e._inject&&e._inject.logging||s}function lookupParam(e,t,n,r,o){if(void 0===t)return;const i=n(t);i||o.warn(`Invalid ${e} passed to the Publisher. Got: ${t}, expecting one of ${r}`);return i}function normalizeMediaParams(e,t){const n=getLogging(t);const r=(()=>{const n=t[`publish${i(e)}`];return void 0===n||Boolean(n)})();let o=(()=>{const r=t[`${e}Source`];if(void 0===r)return true;if(null===r||false===r)return false;if("object"===typeof r){if(t[`isCustom${i(e)}Track`])return false;if("string"!==typeof r.deviceId){n.warn(`Invalid ${e}Source passed to Publisher. Expected either a device ID or device.`);return true}return r.deviceId}if("string"!==typeof r){n.warn(`Ignoring invalid ${e}Source parameter`);return true}return r})();if("audio"===e&&t.isScreenSharing&&!a&&false!==o){t.audioSource&&getLogging(t).warn("Invalid audioSource passed to Publisher - when using screen sharing no audioSource may be used");o=false}return{source:o,publish:r}}function fixChromeBug707118(e,t){return"Chrome"===e.name&&-1!==e.userAgent.indexOf("Mac OS X")&&1===t?2:t}const u=["user","environment","left","right"];const normaliseFacingMode=(e,t)=>{if(void 0===e||u.indexOf(e)>=0)return e;const n=getLogging(t);n.warn(`Invalid facingMode passed to Publisher. Expected one of: ${u.join(", ")}`)};e.exports=function normalizeConstraintInput(e){const t=getLogging(e);const n=e.env||{};const i=e.isScreenSharing,a=e.isCustomAudioTrack,s=e.isCustomVideoTrack;i&&!o&&r(e.usingOptionalMandatoryStyle,"Screensharing only uses optional-mandatory constraints right now");["echoCancellation","autoGainControl","noiseSuppression"].forEach((t=>{false!==e[t]&&Object.assign(e,{[t]:true})}));return{isScreenSharing:i,isCustomAudioTrack:a,isCustomVideoTrack:s,audio:normalizeMediaParams("audio",e),video:normalizeMediaParams("video",e),usingOptionalMandatoryStyle:e.usingOptionalMandatoryStyle,enableRenegotiation:e.enableRenegotiation,enableStereo:e.enableStereo,noiseSuppression:e.noiseSuppression,autoGainControl:e.autoGainControl,echoCancellation:e.echoCancellation,disableAudioProcessing:e.disableAudioProcessing,videoDimensions:lookupParam("resolution",e.resolution,(e=>c[e]),`"${Object.keys(c).join('", "')}"`,t),frameRate:fixChromeBug707118(n,lookupParam("frameRate",e.frameRate,(e=>-1!==l.indexOf(e)?e:void 0),l.join(","),t)),maxResolution:function(){if(void 0===e.maxResolution)return i?{width:1920,height:1920}:void 0;const n={width:e.maxResolution.width,height:e.maxResolution.height};Object.keys(n).forEach((e=>{const r=n[e];if("number"!==typeof r||r>1920){t.warn(`Invalid maxResolution passed to the Publisher. maxResolution.${e} must be less than or equal to 1920`);n[e]=1920}}));return n}(),facingMode:normaliseFacingMode(e.facingMode,e)}}},function(e,t,n){
7524/*
7525      object-assign
7526      (c) Sindre Sorhus
7527      @license MIT
7528      */
7529var r=Object.getOwnPropertySymbols;var o=Object.prototype.hasOwnProperty;var i=Object.prototype.propertyIsEnumerable;function toObject(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){try{if(!Object.assign)return false;var e=new String("abc");e[5]="de";if("5"===Object.getOwnPropertyNames(e)[0])return false;var t={};for(var n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return false;var o={};"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e}));return"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return false}}e.exports=shouldUseNative()?Object.assign:function(e,t){var n;var a=toObject(e);var s;for(var c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var l in n)o.call(n,l)&&(a[l]=n[l]);if(r){s=r(n);for(var u=0;u<s.length;u++)i.call(n,s[u])&&(a[s[u]]=n[s[u]])}}return a}},function(e,t,n){(function(e,r){var o=Object.getOwnPropertyDescriptors||function getOwnPropertyDescriptors(e){var t=Object.keys(e);var n={};for(var r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n};var i=/%[sdj%]/g;t.format=function(e){if(!isString(e)){var t=[];for(var n=0;n<arguments.length;n++)t.push(inspect(arguments[n]));return t.join(" ")}n=1;var r=arguments;var o=r.length;var a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}));for(var s=r[n];n<o;s=r[++n])isNull(s)||!isObject(s)?a+=" "+s:a+=" "+inspect(s);return a};
7529t.deprecate=function(n,r){if("undefined"!==typeof e&&true===e.noDeprecation)return n;if("undefined"===typeof e)return function(){return t.deprecate(n,r).apply(this||_global3,arguments)};var o=false;function deprecated(){if(!o){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r);o=true}return n.apply(this||_global3,arguments)}return deprecated};var a={};var s;t.debuglog=function(n){isUndefined(s)&&(s=e.env.NODE_DEBUG||"");n=n.toUpperCase();if(!a[n])if(new RegExp("\\b"+n+"\\b","i").test(s)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]};
7530/**
7531         * Echos the value of a value. Trys to print the value out
7532         * in the best way possible given the different types.
7533         *
7534         * @param {Object} obj The object to print out.
7535         * @param {Object} opts Optional options object that alters the output.
7536         */function inspect(e,n){var r={seen:[],stylize:stylizeNoColor};arguments.length>=3&&(r.depth=arguments[2]);arguments.length>=4&&(r.colors=arguments[3]);isBoolean(n)?r.showHidden=n:n&&t._extend(r,n);isUndefined(r.showHidden)&&(r.showHidden=false);isUndefined(r.depth)&&(r.depth=2);isUndefined(r.colors)&&(r.colors=false);isUndefined(r.customInspect)&&(r.customInspect=true);r.colors&&(r.stylize=stylizeWithColor);return formatValue(r,e,r.depth)}t.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(e,t){var n=inspect.styles[t];return n?"�["+inspect.colors[n][0]+"m"+e+"�["+inspect.colors[n][1]+"m":e}function stylizeNoColor(e,t){return e}function arrayToHash(e){var t={};e.forEach((function(e,n){t[e]=true}));return t}function formatValue(e,n,r){if(e.customInspect&&n&&isFunction(n.inspect)&&n.inspect!==t.inspect&&!(n.constructor&&n.constructor.prototype===n)){var o=n.inspect(r,e);isString(o)||(o=formatValue(e,o,r));return o}var i=formatPrimitive(e,n);if(i)return i;var a=Object.keys(n);var s=arrayToHash(a);e.showHidden&&(a=Object.getOwnPropertyNames(n));if(isError(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return formatError(n);if(0===a.length){if(isFunction(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(isRegExp(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(isDate(n))return e.stylize(Date.prototype.toString.call(n),"date");if(isError(n))return formatError(n)}var l="",u=false,d=["{","}"];if(isArray(n)){u=true;d=["[","]"]}if(isFunction(n)){var f=n.name?": "+n.name:"";l=" [Function"+f+"]"}isRegExp(n)&&(l=" "+RegExp.prototype.toString.call(n));isDate(n)&&(l=" "+Date.prototype.toUTCString.call(n));isError(n)&&(l=" "+formatError(n));if(0===a.length&&(!u||0==n.length))return d[0]+l+d[1];if(r<0)return isRegExp(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var p;p=u?formatArray(e,n,r,s,a):a.map((function(t){return formatProperty(e,n,r,s,t,u)}));e.seen.pop();return reduceToSingleString(p,l,d)}function formatPrimitive(e,t){if(isUndefined(t))return e.stylize("undefined","undefined");if(isString(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return isNumber(t)?e.stylize(""+t,"number"):isBoolean(t)?e.stylize(""+t,"boolean"):isNull(t)?e.stylize("null","null"):void 0}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,t,n,r,o){var i=[];for(var a=0,s=t.length;a<s;++a)hasOwnProperty(t,String(a))?i.push(formatProperty(e,t,n,r,String(a),true)):i.push("");o.forEach((function(o){o.match(/^\d+$/)||i.push(formatProperty(e,t,n,r,o,true))}));return i}function formatProperty(e,t,n,r,o,i){var a,s,c;c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]};c.get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[
7536Setter]","special"));hasOwnProperty(r,o)||(a="["+o+"]");if(!s)if(e.seen.indexOf(c.value)<0){s=isNull(n)?formatValue(e,c.value,null):formatValue(e,c.value,n-1);s.indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return"   "+e})).join("\n"))}else s=e.stylize("[Circular]","special");if(isUndefined(a)){if(i&&o.match(/^\d+$/))return s;a=JSON.stringify(""+o);if(a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){a=a.substr(1,a.length-2);a=e.stylize(a,"name")}else{a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");a=e.stylize(a,"string")}}return a+": "+s}function reduceToSingleString(e,t,n){var r=0;var o=e.reduce((function(e,t){r++;t.indexOf("\n")>=0&&r++;return e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return o>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function isArray(e){return Array.isArray(e)}t.isArray=isArray;function isBoolean(e){return"boolean"===typeof e}t.isBoolean=isBoolean;function isNull(e){return null===e}t.isNull=isNull;function isNullOrUndefined(e){return null==e}t.isNullOrUndefined=isNullOrUndefined;function isNumber(e){return"number"===typeof e}t.isNumber=isNumber;function isString(e){return"string"===typeof e}t.isString=isString;function isSymbol(e){return"symbol"===typeof e}t.isSymbol=isSymbol;function isUndefined(e){return void 0===e}t.isUndefined=isUndefined;function isRegExp(e){return isObject(e)&&"[object RegExp]"===objectToString(e)}t.isRegExp=isRegExp;function isObject(e){return"object"===typeof e&&null!==e}t.isObject=isObject;function isDate(e){return isObject(e)&&"[object Date]"===objectToString(e)}t.isDate=isDate;function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}t.isError=isError;function isFunction(e){return"function"===typeof e}t.isFunction=isFunction;function isPrimitive(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e}t.isPrimitive=isPrimitive;t.isBuffer=n(565);function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?"0"+e.toString(10):e.toString(10)}var c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var e=new Date;var t=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),c[e.getMonth()],t].join(" ")}t.log=function(){console.log("%s - %s",timestamp(),t.format.apply(t,arguments))};
7537/**
7538         * Inherit the prototype methods from one constructor into another.
7539         *
7540         * The Function.prototype.inherits from lang.js rewritten as a standalone
7541         * function (not on Function.prototype). NOTE: If this file is to be loaded
7542         * during bootstrapping this function needs to be rewritten using some native
7543         * functions as prototype setup using normal JavaScript does not work as
7544         * expected during bootstrapping (see mirror.js in r114903).
7545         *
7546         * @param {function} ctor Constructor function which needs to inherit the
7547         *     prototype.
7548         * @param {function} superCtor Constructor function to inherit prototype from.
7549         */t.inherits=n(566);t._extend=function(e,t){if(!t||!isObject(t))return e;var n=Object.keys(t);var r=n.length;while(r--)e[n[r]]=t[n[r]];return e};function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var l="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;t.promisify=function promisify(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(l&&e[l]){fn=e[l];if("function"!==typeof fn)throw new TypeError('The "util.promisify.custom" argument must be of type Function');Object.defineProperty(fn,l,{value:fn,enumerable:false,writable:false,configurable:true});return fn}function fn(){var t,n;var o=new r((function(e,r){t=e;n=r}));var i=[];for(var a=0;a<arguments.length;a++)i.push(arguments[a]);i.push((function(e,r){e?n(e):t(r)}));try{e.apply(this||_global3,i)}catch(e){n(e)}return o}Object.setPrototypeOf(fn,Object.getPrototypeOf(e));l&&Object.defineProperty(fn,l,{value:fn,enumerable:false,writable:false,configurable:true});return Object.defineProperties(fn,o(e))};t.promisify.custom=l;function callbackifyOnRejected(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e;e=n}return t(e)}function callbackify(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');function callbackified(){var n=[];for(var r=0;r<arguments.length;r++)n.push(arguments[r]);var o=n.pop();if("function"!==typeof o)throw new TypeError("The last argument must be of type Function");var i=this||_global3;var cb=function(){return o.apply(i,arguments)};t.apply(this||_global3,n).then((function(t){e.nextTick(cb,null,t)}),(function(t){e.nextTick(callbackifyOnRejected,t,cb)}))}Object.setPrototypeOf(callbackified,Object.getPrototypeOf(t));Object.defineProperties(callbackified,o(t));return callbackified}t.callbackify=callbackify}).call(this||_global3,n(69),n(0))},function(e,t){e.exports=function isBuffer(e){return e&&"object"===typeof e&&"function"===typeof e.copy&&"function"===typeof e.fill&&"function"===typeof e.readUInt8}},function(e,t){"function"===typeof Object.create?e.exports=function inherits(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}:e.exports=function inherits(e,t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}},function(e,t,n){var r=n(568),o=n(261),i=n(262),a=n(58);
7550/**
7551       * Creates a function like `_.lowerFirst`.
7552       *
7553       * @private
7554       * @param {string} methodName The name of the `String` case method to use.
7555       * @returns {Function} Returns the new case function.
7556       */function createCaseFirst(e){return function(t){t=a(t);var n=o(t)?i(t):void 0;var s=n?n[0]:t.charAt(0);var c=n?r(n,1).join(""):t.slice(1);return s[e]()+c}}
7556e.exports=createCaseFirst},function(e,t,n){var r=n(260);
7557/**
7558       * Casts `array` to a slice if it's needed.
7559       *
7560       * @private
7561       * @param {Array} array The array to inspect.
7562       * @param {number} start The start position.
7563       * @param {number} [end=array.length] The end position.
7564       * @returns {Array} Returns the cast slice.
7565       */function castSlice(e,t,n){var o=e.length;n=void 0===n?o:n;return!t&&n>=o?e:r(e,t,n)}e.exports=castSlice},function(e,t){
7566/**
7567       * Converts an ASCII `string` to an array.
7568       *
7569       * @private
7570       * @param {string} string The string to convert.
7571       * @returns {Array} Returns the converted array.
7572       */
7573function asciiToArray(e){return e.split("")}e.exports=asciiToArray},function(e,t){var n="\\ud800-\\udfff",r="\\u0300-\\u036f",o="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",a=r+o+i,s="\\ufe0e\\ufe0f";var c="["+n+"]",l="["+a+"]",u="\\ud83c[\\udffb-\\udfff]",d="(?:"+l+"|"+u+")",f="[^"+n+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d";var b=d+"?",v="["+s+"]?",m="(?:"+h+"(?:"+[f,p,g].join("|")+")"+v+b+")*",_=v+b+m,y="(?:"+[f+l+"?",l,p,g,c].join("|")+")";var E=RegExp(u+"(?="+u+")|"+y+_,"g");
7574/**
7575       * Converts a Unicode `string` to an array.
7576       *
7577       * @private
7578       * @param {string} string The string to convert.
7579       * @returns {Array} Returns the converted array.
7580       */function unicodeToArray(e){return e.match(E)||[]}e.exports=unicodeToArray},function(e,t,n){e.exports=["screen","window","tab","browser","application"]},function(e,t,n){const r=n(1);const o=n(44)();const i=n(49);const a=n(119);const s=n(574);const c=n(577);const l="/opentok/webrtc/docs/js/release-notes.html";const u=o.onlyLocal();const d=r("setLogLevel");const f="\n ██████╗ ██████╗ ███████╗███╗   ██╗████████╗ ██████╗ ██╗  ██╗\n██╔═══██╗██╔══██╗██╔════╝████╗  ██║╚══██╔══╝██╔═══██╗██║ ██╔╝\n██║   ██║██████╔╝█████╗  ██╔██╗ ██║   ██║   ██║   ██║█████╔╝\n██║   ██║██╔═══╝ ██╔══╝  ██║╚██╗██║   ██║   ██║   ██║██╔═██╗\n╚██████╔╝██║     ███████╗██║ ╚████║   ██║   ╚██████╔╝██║  ██╗\n ╚═════╝ ╚═╝     ╚══════╝╚═╝  ╚═══╝   ╚═╝    ╚═════╝ ╚═╝  ╚═╝";const p=i((()=>{d.info(`%c${f}`,'font-family: "Fire Code", Courier, "Courier New", Consolas, "DejaVu Sans Mono"');d.info(`OpenTok JS SDK ${u.version}`);d.info(`Release notes: ${u.websiteUrl}${l}`);d.info(`Known issues: ${u.websiteUrl}${l}l#knownIssues`)}));function setLogLevel(e){if(void 0===e||!s(a,{priority:e})&&0!==e){const t=c(a,((e,t)=>`OT.${t.toUpperCase()} = ${e.priority}`)).join(", ");d.error(`level must be one of: OT.NONE = 0, ${t}`);d.warn("Using OT.WARN instead");e=a.warn.priority}r.setLogLevel(e);e>=a.debug.priority&&p();const t="https://www.npmjs.com/package/debug#browser-support";d.info(`OpenTok JS SDK now uses the debug library. More info at ${t}`);d.info(`Changed log level to: ${e}`);return e}setLogLevel(u.debug?a.debug.priority:a.warn.priority);e.exports=setLogLevel;
7581/**
7582        * Sets the API log level.
7583        * <p>
7584        * Calling <code>OT.setLogLevel()</code> sets the log level for runtime log messages that
7585        * are the OpenTok library generates. The default value for the log level is
7586        * <code>OT.ERROR</code>.
7587        * </p>
7588        * <p>
7589        * The OpenTok JavaScript library displays log messages in the debugger console (such as
7590        * Firebug), if one exists.
7591        * </p>
7592        * <p>
7593        * The following example logs the session ID to the console, by calling <code>OT.log()</code>.
7594        * The code also logs an error message when it attempts to publish a stream before you have
7595        * connected to the session (by calling <code>Session.connect()</code>).
7596        * </p>
7597        * <pre>
7598        * OT.setLogLevel(OT.LOG);
7599        * session = OT.initSession(sessionId);
7600        * OT.log(sessionId);
7601        * publisher = OT.initPublisher("publishContainer");
7602        * session.publish(publisher);
7603        * </pre>
7604        *
7605        * @param {Number} logLevel The degree of logging desired by the developer:
7606        *
7607        * <p>
7608        * <ul>
7609        *   <li>
7610        *     <code>OT.NONE</code> &#151; API logging is disabled.
7611        *   </li>
7612        *   <li>
7613        *     <code>OT.ERROR</code> &#151; Logging of errors only.
7614        *   </li>
7615        *   <li>
7616        *     <code>OT.WARN</code> &#151; Logging of warnings and errors.
7617        *   </li>
7618        *   <li>
7619        *     <code>OT.INFO</code> &#151; Logging of other useful information, in addition to
7620        *     warnings and errors.
7621        *   </li>
7622        *   <li>
7623        *     <code>OT.LOG</code> &#151; Logging of <code>OT.log()</code> messages, in addition
7624        *     to OpenTok info, warning,
7625        *     and error messages.
7626        *   </li>
7627        *   <li>
7628        *     <code>OT.DEBUG</code> &#151; Fine-grained logging of all API actions, as well as
7629        *     <code>OT.log()</code> messages.
7630        *   </li>
7631        * </ul>
7632        * </p>
7633        *
7634        * @name OT.setLogLevel
7635        * @memberof OT
7636        * @function
7637        * @see <a href="#log">OT.log()</a>
7638        */
7639/**
7640        * Sends a string to the debugger console. However, the function only logs to the console
7641        * if you have set the log level to <code>OT.LOG</code> or <code>OT.DEBUG</code>,
7642        * by calling <code>OT.setLogLevel(OT.LOG)</code> or <code>OT.setLogLevel(OT.DEBUG)</code>.
7643        *
7644        * @param {String} message The string to log.
7645        *
7646        * @name OT.log
7647        * @memberof OT
7648        * @function
7649        * @see <a href="#setLogLevel">OT.setLogLevel()</a>
7650        */},function(e,t,n){var r=n(96);var o="Expected a function";
7651/**
7652       * Creates a function that invokes `func`, with the `this` binding and arguments
7653       * of the created function, while it's called less than `n` times. Subsequent
7654       * calls to the created function return the result of the last `func` invocation.
7655       *
7656       * @static
7657       * @memberOf _
7658       * @since 3.0.0
7659       * @category Function
7660       * @param {number} n The number of calls at which `func` is no longer invoked.
7661       * @param {Function} func The function to restrict.
7662       * @returns {Function} Returns the new restricted function.
7663       * @example
7664       *
7665       * jQuery(element).on('click', _.before(5, addContactToList));
7666       * // => Allows adding up to 4 contacts to the list.
7667       */function before(e,t){var n;if("function"!=typeof t)throw new TypeError(o);e=r(e);return function(){--e>0&&(n=t.apply(this||_global3,arguments));e<=1&&(t=void 0);return n}}e.exports=before},function(e,t,n){var r=n(231),o=n(34),i=n(575),a=n(10),s=n(122);
7668/**
7669       * Checks if `predicate` returns truthy for **any** element of `collection`.
7670       * Iteration is stopped once `predicate` returns truthy. The predicate is
7671       * invoked with three arguments: (value, index|key, collection).
7672       *
7673       * @static
7674       * @memberOf _
7675       * @since 0.1.0
7676       * @category Collection
7677       * @param {Array|Object} collection The collection to iterate over.
7678       * @param {Function} [predicate=_.identity] The function invoked per iteration.
7679       * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
7680       * @returns {boolean} Returns `true` if any element passes the predicate check,
7681       *  else `false`.
7682       * @example
7683       *
7684       * _.some([null, 0, 'yes', false], Boolean);
7685       * // => true
7686       *
7687       * var users = [
7688       *   { 'user': 'barney', 'active': true },
7689       *   { 'user': 'fred',   'active': false }
7690       * ];
7691       *
7692       * // The `_.matches` iteratee shorthand.
7693       * _.some(users, { 'user': 'barney', 'active': false });
7694       * // => false
7695       *
7696       * // The `_.matchesProperty` iteratee shorthand.
7697       * _.some(users, ['active', false]);
7698       * // => true
7699       *
7700       * // The `_.property` iteratee shorthand.
7701       * _.some(users, 'active');
7702       * // => true
7703       */function some(e,t,n){var c=a(e)?r:i;
7703n&&s(e,t,n)&&(t=void 0);return c(e,o(t,3))}e.exports=some},function(e,t,n){var r=n(266);
7704/**
7705       * The base implementation of `_.some` without support for iteratee shorthands.
7706       *
7707       * @private
7708       * @param {Array|Object} collection The collection to iterate over.
7709       * @param {Function} predicate The function invoked per iteration.
7710       * @returns {boolean} Returns `true` if any element passes the predicate check,
7711       *  else `false`.
7712       */function baseSome(e,t){var n;r(e,(function(e,r,o){n=t(e,r,o);return!n}));return!!n}e.exports=baseSome},function(e,t,n){var r=n(24);
7713/**
7714       * Creates a `baseEach` or `baseEachRight` function.
7715       *
7716       * @private
7717       * @param {Function} eachFunc The function to iterate over a collection.
7718       * @param {boolean} [fromRight] Specify iterating from right to left.
7719       * @returns {Function} Returns the new base function.
7720       */function createBaseEach(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);var i=n.length,a=t?i:-1,s=Object(n);while(t?a--:++a<i)if(false===o(s[a],a,s))break;return n}}e.exports=createBaseEach},function(e,t,n){var r=n(33),o=n(34),i=n(578),a=n(10);
7721/**
7722       * Creates an array of values by running each element in `collection` thru
7723       * `iteratee`. The iteratee is invoked with three arguments:
7724       * (value, index|key, collection).
7725       *
7726       * Many lodash methods are guarded to work as iteratees for methods like
7727       * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
7728       *
7729       * The guarded methods are:
7730       * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
7731       * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
7732       * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
7733       * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
7734       *
7735       * @static
7736       * @memberOf _
7737       * @since 0.1.0
7738       * @category Collection
7739       * @param {Array|Object} collection The collection to iterate over.
7740       * @param {Function} [iteratee=_.identity] The function invoked per iteration.
7741       * @returns {Array} Returns the new mapped array.
7742       * @example
7743       *
7744       * function square(n) {
7745       *   return n * n;
7746       * }
7747       *
7748       * _.map([4, 8], square);
7749       * // => [16, 64]
7750       *
7751       * _.map({ 'a': 4, 'b': 8 }, square);
7752       * // => [16, 64] (iteration order is not guaranteed)
7753       *
7754       * var users = [
7755       *   { 'user': 'barney' },
7756       *   { 'user': 'fred' }
7757       * ];
7758       *
7759       * // The `_.property` iteratee shorthand.
7760       * _.map(users, 'user');
7761       * // => ['barney', 'fred']
7762       */function map(e,t){var n=a(e)?r:i;return n(e,o(t,3))}e.exports=map},function(e,t,n){var r=n(266),o=n(24);
7763/**
7764       * The base implementation of `_.map` without support for iteratee shorthands.
7765       *
7766       * @private
7767       * @param {Array|Object} collection The collection to iterate over.
7768       * @param {Function} iteratee The function invoked per iteration.
7769       * @returns {Array} Returns the new mapped array.
7770       */function baseMap(e,t){var n=-1,i=o(e)?Array(e.length):[];r(e,(function(e,r,o){i[++n]=t(e,r,o)}));return i}e.exports=baseMap},function(e,t,n){e.exports=function fixBackgroundImageURI(e){return"http:"!==e.substr(0,5)&&"https:"!==e.substr(0,6)&&"data:image/png;base64,"!==e.substr(0,22)?`data:image/png;base64,${e}`:e}},function(e,t,n){const r=n(55);const o=n(1)("Style");e.exports=function Style(e,t){const n=this||_global3;const i={};const a={buttonDisplayMode:["auto","mini","mini-auto","off","on"],nameDisplayMode:["auto","off","on"],audioLevelDisplayMode:["auto","off","on"],showSettingsButton:[true,false],showSpeakerButton:null,showMicButton:[true,false],backgroundImageURI:null,showControlBar:[true,false],showArchiveStatus:[true,false],archiveStatusDisplayMode:["auto","off","on"],videoDisabledDisplayMode:["auto","off","on"],audioBlockedDisplayMode:["auto","off","on"]};const s=function isValidStyle(e,t){const n=a[e];return void 0!==n&&(null===n||-1!==n.indexOf(t))};const c=function castValue(e){switch(e){case"true":return true;case"false":return false;default:return e}};n.getAll=function(){return r(i)};n.get=function(e){return e?i[e]:n.getAll()};n.setAll=function(e,t){Object.keys(e).forEach((r=>{n.set(r,e[r],t)}));return n};n.set=function(e,r,a){o.debug(`setStyle: ${e.toString()}`);let l;const u=c(r);if(!s(e,u)){o.warn(`Style.set::Invalid style property passed ${e} : ${u}`);return n}l=i[e];if(u!==l){i[e]=u;a||t(e,r,l)}
7770return n};e&&n.setAll(e,true)}},function(e,t,n){const r=n(55);e.exports=function styleHashLogFilter(e){const t=r(e);if(t.backgroundImageURI){const e=t.backgroundImageURI.split(":")[0];t.backgroundImageURI=-1!==["http","https","data"].indexOf(e)?e:"other"}return t}},function(e,t,n){const r=n(2);const o=n(269);const hasGetUserMediaSupport=()=>!r.isIosWebView&&(!!o()||((void 0!==typeof window?window:_global3).navigator.mediaDevices&&(void 0!==typeof window?window:_global3).navigator.mediaDevices.getUserMedia||(void 0!==typeof window?window:_global3).navigator.webkitGetUserMedia||(void 0!==typeof window?window:_global3).navigator.mozGetUserMedia));e.exports=()=>Boolean("Node"!==r.name&&hasGetUserMediaSupport())},function(e,t,n){const r=n(2);e.exports=()=>"Node"!==r.name&&(!("function"!==typeof(void 0!==typeof window?window:_global3).webkitRTCPeerConnection||!(void 0!==typeof window?window:_global3).webkitRTCPeerConnection.prototype.addStream)||("function"===typeof(void 0!==typeof window?window:_global3).RTCPeerConnection||"function"===typeof(void 0!==typeof window?window:_global3).mozRTCPeerConnection&&r.version>20))},function(e,t,n){e.exports=void 0!==(void 0!==typeof window?window:_global3).WebSocket},function(e,t){e.exports='<div id="tb_alert"><div id="section-normal-install" class="OT_alert"><div class="OT_alert-exclamation">!</div><button class="OT_alert-close-button" role="OT_close">&#x00D7;</button><div class="OT_alert-header" data-text="Incompatible Browser">Incompatible Browser</div><div class="OT_alert-body">The video component of this application requires <a target="_blank" href="https://www.google.com/chrome/">Google Chrome</a>, <a target="_blank" href="http://www.mozilla.org/firefox">Firefox</a>, <a target="_blank" href="https://www.microsoft.com/en-us/edge">Edge</a>, or <a target="_blank" href="https://www.apple.com/safari/">Safari</a>.</div></div><div id="section-upgrade-install" class="OT_alert"><div class="OT_alert-exclamation">!</div><button class="OT_alert-close-button" role="OT_close">&#x00D7;</button><div class="OT_alert-header" data-text="Incompatible Browser">Incompatible Browser</div><div class="OT_alert-body">The video component of this application requires a newer version of <a target="_blank" href="https://www.google.com/chrome/">Google Chrome</a>, <a target="_blank" href="http://www.mozilla.org/firefox">Firefox</a>, <a target="_blank" href="https://www.microsoft.com/en-us/edge">Edge</a>, or <a target="_blank" href="https://www.apple.com/safari/">Safari</a>.</div><div class="continue-text"><a href="#" role="OT_close">Continue at my own risk.</a></div></div><div id="section-supported-mobile-browser" class="OT_alert"><div class="OT_alert-exclamation">!</div><button class="OT_alert-close-button" role="OT_close">&#x00D7;</button><div class="OT_alert-header" data-text="Incompatible Browser">Incompatible Browser</div><div class="OT_alert-body">The video component of this application requires a newer version of <a target="_blank" href="https://www.google.com.au/chrome/browser/mobile/">Google Chrome</a>.</div><div class="continue-text"><a href="#" role="OT_close">Continue at my own risk.</a></div></div><div id="section-mobile-browser" class="OT_alert"><div class="OT_alert-exclamation">!</div><button class="OT_alert-close-button" role="OT_close">&#x00D7;</button><div class="OT_alert-header" data-text="Incompatible Browser">Incompatible Browser</div><div class="OT_alert-body">The video component of this application is not supported on your mobile device\'s browser at this time.</div></div></div>'},function(e,t,n){var r=n(3);var o=r(n(59));const i=n(41);e.exports=function(e){(0,o.default)(Modal,e);function Modal(t,n){var r;let o=void 0===n?{}:n,i=o.destroyOnClose,a=void 0===i||i;r=e.call(this||_global3)||this||_global3;r.modalDiv=document.createElement("div");r.modalDiv.classList.add("OT_ModalDialog");r.modalDiv.innerHTML=t;const s=r.modalDiv.querySelectorAll("[role=OT_close]");[].forEach.call(s,(e=>e.addEventListener("click",(e=>{e.preventDefault();r.close()}))));r.close();document.body.appendChild(r.modalDiv);a&&r.on("closed",(()=>r.destroy()));return r}var t=Modal.prototype;t.open=function open(){(this||_global3).modalDiv.style.display="block";
7770this.emit("opened")};t.close=function close(){(this||_global3).modalDiv.style.display="none";this.emit("closed")};t.destroy=function destroy(){(this||_global3).modalDiv.innerHTML="";(this||_global3).modalDiv.parentNode.removeChild((this||_global3).modalDiv);this.emit("destroyed")};t.el=function el(e){return(this||_global3).modalDiv.querySelector(e)};return Modal}(i)},function(e,t,n){const r=n(27);e.exports=function(e){void 0===e&&(e={});const t=e.env||n(2);const o=e.analytics||new r;o.logEvent({action:"UserAgentParsing",variation:"Attempt",payload:{userAgent:t.userAgent}});o.logEvent({action:"UserAgentParsing",variation:t.error?"Failure":"Success",payload:{userAgent:t.userAgent}})}},function(e,t,n){var r=n(589);var o=n(270);var i=n(590);var a=n(591);function _wrapNativeSuper(t){var n="function"===typeof Map?new Map:void 0;e.exports=_wrapNativeSuper=function _wrapNativeSuper(e){if(null===e||!i(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,Wrapper)}function Wrapper(){return a(e,arguments,r(this||_global3).constructor)}Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return o(Wrapper,e)};return _wrapNativeSuper(t)}e.exports=_wrapNativeSuper},function(e,t){function _getPrototypeOf(t){e.exports=_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)};return _getPrototypeOf(t)}e.exports=_getPrototypeOf},function(e,t){function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}e.exports=_isNativeFunction},function(e,t,n){var r=n(270);function isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if("function"===typeof Proxy)return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return true}catch(e){return false}}function _construct(t,n,o){isNativeReflectConstruct()?e.exports=_construct=Reflect.construct:e.exports=_construct=function _construct(e,t,n){var o=[null];o.push.apply(o,t);var i=Function.bind.apply(e,o);var a=new i;n&&r(a,n.prototype);return a};return _construct.apply(null,arguments)}e.exports=_construct},function(e,t,n){(function(t){e.exports=(e,n)=>{n=n||(()=>{});return e.then((e=>new t((e=>{e(n())})).then((()=>e))),(e=>new t((e=>{e(n())})).then((()=>{throw e}))))}}).call(this||_global3,n(0))},function(e,t,n){var r=n(57),o=n(594),i=n(595),a=n(46);
7771/**
7772       * The base implementation of `_.unset`.
7773       *
7774       * @private
7775       * @param {Object} object The object to modify.
7776       * @param {Array|string} path The property path to unset.
7777       * @returns {boolean} Returns `true` if the property is deleted, else `false`.
7778       */function baseUnset(e,t){t=r(t,e);e=i(e,t);return null==e||delete e[a(o(t))]}e.exports=baseUnset},function(e,t){
7779/**
7780       * Gets the last element of `array`.
7781       *
7782       * @static
7783       * @memberOf _
7784       * @since 0.1.0
7785       * @category Array
7786       * @param {Array} array The array to query.
7787       * @returns {*} Returns the last element of `array`.
7788       * @example
7789       *
7790       * _.last([1, 2, 3]);
7791       * // => 3
7792       */
7793function last(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}e.exports=last},function(e,t,n){var r=n(98),o=n(260);
7794/**
7795       * Gets the parent value at `path` of `object`.
7796       *
7797       * @private
7798       * @param {Object} object The object to query.
7799       * @param {Array} path The path to get the parent value of.
7800       * @returns {*} Returns the parent value.
7801       */function parent(e,t){return t.length<2?e:r(e,o(t,0,-1))}e.exports=parent},function(e,t,n){var r=n(135);
7802/**
7803       * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
7804       * objects.
7805       *
7806       * @private
7807       * @param {*} value The value to inspect.
7808       * @param {string} key The key of the property to inspect.
7809       * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
7810       */function customOmitClone(e){return r(e)?void 0:e}e.exports=customOmitClone},function(e,t,n){var r=n(34),o=n(24),i=n(30);
7811/**
7812       * Creates a `_.find` or `_.findLast` function.
7813       *
7814       * @private
7815       * @param {Function} findIndexFunc The function to find the collection index.
7816       * @returns {Function} Returns the new find function.
7817       */function createFind(e){return function(t,n,a){var s=Object(t);if(!o(t)){var c=r(n,3);t=i(t);n=function(e){return c(s[e],e,s)}}var l=e(t,n,a);return l>-1?s[c?t[l]:l]:void 0}}e.exports=createFind},function(e,t,n){var r=n(92),o=n(93),i=n(128),a=n(94),s=n(599),c=n(97);var l=200;
7818/**
7819       * The base implementation of `_.uniqBy` without support for iteratee shorthands.
7820       *
7821       * @private
7822       * @param {Array} array The array to inspect.
7823       * @param {Function} [iteratee] The iteratee invoked per element.
7824       * @param {Function} [comparator] The comparator invoked per element.
7825       * @returns {Array} Returns the new duplicate free array.
7826       */function baseUniq(e,t,n){var u=-1,d=o,f=e.length,p=true,g
7826=[],h=g;if(n){p=false;d=i}else if(f>=l){var b=t?null:s(e);if(b)return c(b);p=false;d=a;h=new r}else h=t?[]:g;e:while(++u<f){var v=e[u],m=t?t(v):v;v=n||0!==v?v:0;if(p&&m===m){var _=h.length;while(_--)if(h[_]===m)continue e;t&&h.push(m);g.push(v)}else if(!d(h,m,n)){h!==g&&h.push(m);g.push(v)}}return g}e.exports=baseUniq},function(e,t,n){var r=n(185),o=n(223),i=n(97);var a=1/0;
7827/**
7828       * Creates a set object of `values`.
7829       *
7830       * @private
7831       * @param {Array} values The values to add to the set.
7832       * @returns {Object} Returns the new set.
7833       */var s=r&&1/i(new r([,-0]))[1]==a?function(e){return new r(e)}:o;e.exports=s},function(e,t,n){(function(t){var r=n(3);var o=r(n(12));var i=r(n(13));const a=n(1);const s=a("hasValidPeerConnection");function checkPeerConnection(e){return new t((t=>{e.addEventListener("signalingstatechange",(()=>t(true)));e.createOffer({offerToReceiveAudio:1}).then((t=>e.setLocalDescription(t))).then((()=>setTimeout((()=>{t(false)}),1e3)))}))}function hasValidPeerConnection(e){return _hasValidPeerConnection.apply(this||_global3,arguments)}function _hasValidPeerConnection(){_hasValidPeerConnection=(0,i.default)(o.default.mark((function _callee(e){var t;return o.default.wrap((function _callee$(n){while(1)switch(n.prev=n.next){case 0:n.prev=0;t=new e({iceServers:[]});n.next=8;break;case 4:n.prev=4;n.t0=n.catch(0);s.error("Error occurred creating PeerConnection",n.t0);return n.abrupt("return",false);case 8:n.prev=8;n.next=11;return checkPeerConnection(t);case 11:n.next=18;break;case 13:n.prev=13;n.t1=n.catch(8);s.error("Error occurred checking the validity of the PeerConnection",n.t1);try{t.close()}catch(e){}return n.abrupt("return",false);case 18:n.prev=18;t.close();n.next=26;break;case 22:n.prev=22;n.t2=n.catch(18);s.error("Error occurred closing PeerConnection",n.t2);return n.abrupt("return",false);case 26:return n.abrupt("return",true);case 27:case"end":return n.stop()}}),_callee,null,[[0,4],[8,13],[18,22]])})));return _hasValidPeerConnection.apply(this||_global3,arguments)}e.exports=hasValidPeerConnection}).call(this||_global3,n(0))},function(e,t,n){var r=function(){return this||_global3||"object"===typeof self&&self}()||Function("return this")();var o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0;var i=o&&r.regeneratorRuntime;r.regeneratorRuntime=void 0;e.exports=n(602);if(o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t,n){(function(t){!function(n){var r=Object.prototype;var o=r.hasOwnProperty;var i;var a="function"===typeof Symbol?Symbol:{};var s=a.iterator||"@@iterator";var c=a.asyncIterator||"@@asyncIterator";var l=a.toStringTag||"@@toStringTag";var u="object"===typeof e;var d=n.regeneratorRuntime;if(d)u&&(e.exports=d);else{d=n.regeneratorRuntime=u?e.exports:{};d.wrap=wrap;var f="suspendedStart";var p="suspendedYield";var g="executing";var h="completed";var b={};var v={};v[s]=function(){return this||_global3};var m=Object.getPrototypeOf;var _=m&&m(m(values([])));_&&_!==r&&o.call(_,s)&&(v=_);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(v);GeneratorFunction.prototype=y.constructor=GeneratorFunctionPrototype;GeneratorFunctionPrototype.constructor=GeneratorFunction;GeneratorFunctionPrototype[l]=GeneratorFunction.displayName="GeneratorFunction";d.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===GeneratorFunction||"GeneratorFunction"===(t.displayName||t.name))};d.mark=function(e){if(Object.setPrototypeOf)Object.setPrototypeOf(e,GeneratorFunctionPrototype);else{e.__proto__=GeneratorFunctionPrototype;l in e||(e[l]="GeneratorFunction")}e.prototype=Object.create(y);return e};d.awrap=function(e){return{__await:e}};defineIteratorMethods(AsyncIterator.prototype);AsyncIterator.prototype[c]=function(){return this||_global3};d.AsyncIterator=AsyncIterator;d.async=function(e,t,n,r){var o=new AsyncIterator(wrap(e,t,n,r));return d.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))};defineIteratorMethods(y);y[l]="Generator";y[s]=function(){return this||_global3};y.toString=function(){return"[object Generator]"};d.keys=function(e){var t=[];for(var n in e)t.push(n);t.reverse();return function next(){while(t.length){var n=t.pop();if(n in e){next.value=n;next.done=false;return next}}next.done=true;return next}};d.values=values;Context.prototype={constructor:Context,reset:function(e){(this||_global3).prev=0;(this||_global3).next=0;(this||_global3).sent=(this||_global3)._sent=i;(this||_global3).done=false;(this||_global3).delegate=null;(this||_global3).method="next";(this||_global3).arg=i;
7833(this||_global3).tryEntries.forEach(resetTryEntry);if(!e)for(var t in this||_global3)"t"===t.charAt(0)&&o.call(this||_global3,t)&&!isNaN(+t.slice(1))&&((this||_global3)[t]=i)},stop:function(){(this||_global3).done=true;var e=(this||_global3).tryEntries[0];var t=e.completion;if("throw"===t.type)throw t.arg;return(this||_global3).rval},dispatchException:function(e){if((this||_global3).done)throw e;var t=this||_global3;function handle(n,r){a.type="throw";a.arg=e;t.next=n;if(r){t.method="next";t.arg=i}return!!r}for(var n=(this||_global3).tryEntries.length-1;n>=0;--n){var r=(this||_global3).tryEntries[n];var a=r.completion;if("root"===r.tryLoc)return handle("end");if(r.tryLoc<=(this||_global3).prev){var s=o.call(r,"catchLoc");var c=o.call(r,"finallyLoc");if(s&&c){if((this||_global3).prev<r.catchLoc)return handle(r.catchLoc,true);if((this||_global3).prev<r.finallyLoc)return handle(r.finallyLoc)}else if(s){if((this||_global3).prev<r.catchLoc)return handle(r.catchLoc,true)}else{if(!c)throw new Error("try statement without catch or finally");if((this||_global3).prev<r.finallyLoc)return handle(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=(this||_global3).tryEntries.length-1;n>=0;--n){var r=(this||_global3).tryEntries[n];if(r.tryLoc<=(this||_global3).prev&&o.call(r,"finallyLoc")&&(this||_global3).prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};a.type=e;a.arg=t;if(i){(this||_global3).method="next";(this||_global3).next=i.finallyLoc;return b}return this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;if("break"===e.type||"continue"===e.type)(this||_global3).next=e.arg;else if("return"===e.type){(this||_global3).rval=(this||_global3).arg=e.arg;(this||_global3).method="return";(this||_global3).next="end"}else"normal"===e.type&&t&&((this||_global3).next=t);return b},finish:function(e){for(var t=(this||_global3).tryEntries.length-1;t>=0;--t){var n=(this||_global3).tryEntries[t];if(n.finallyLoc===e){this.complete(n.completion,n.afterLoc);resetTryEntry(n);return b}}},catch:function(e){for(var t=(this||_global3).tryEntries.length-1;t>=0;--t){var n=(this||_global3).tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;resetTryEntry(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){(this||_global3).delegate={iterator:values(e),resultName:t,nextLoc:n};"next"===(this||_global3).method&&((this||_global3).arg=i);return b}}}function wrap(e,t,n,r){var o=t&&t.prototype instanceof Generator?t:Generator;var i=Object.create(o.prototype);var a=new Context(r||[]);i._invoke=makeInvokeMethod(e,n,a);return i}
7833function tryCatch(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}function defineIteratorMethods(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function AsyncIterator(e){function invoke(n,r,i,a){var s=tryCatch(e[n],e,r);if("throw"!==s.type){var c=s.arg;var l=c.value;return l&&"object"===typeof l&&o.call(l,"__await")?t.resolve(l.__await).then((function(e){invoke("next",e,i,a)}),(function(e){invoke("throw",e,i,a)})):t.resolve(l).then((function(e){c.value=e;i(c)}),(function(e){return invoke("throw",e,i,a)}))}a(s.arg)}var n;function enqueue(e,r){function callInvokeWithMethodAndArg(){return new t((function(t,n){invoke(e,r,t,n)}))}return n=n?n.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}(this||_global3)._invoke=enqueue}function makeInvokeMethod(e,t,n){var r=f;return function invoke(o,i){if(r===g)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return doneResult()}n.method=o;n.arg=i;while(true){var a=n.delegate;if(a){var s=maybeInvokeDelegate(a,n);if(s){if(s===b)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f){r=h;throw n.arg}n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=g;
7833var c=tryCatch(e,t,n);if("normal"===c.type){r=n.done?h:p;if(c.arg===b)continue;return{value:c.arg,done:n.done}}if("throw"===c.type){r=h;n.method="throw";n.arg=c.arg}}}}function maybeInvokeDelegate(e,t){var n=e.iterator[t.method];if(n===i){t.delegate=null;if("throw"===t.method){if(e.iterator.return){t.method="return";t.arg=i;maybeInvokeDelegate(e,t);if("throw"===t.method)return b}t.method="throw";t.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var r=tryCatch(n,e.iterator,t.arg);if("throw"===r.type){t.method="throw";t.arg=r.arg;t.delegate=null;return b}var o=r.arg;if(!o){t.method="throw";t.arg=new TypeError("iterator result is not an object");t.delegate=null;return b}if(!o.done)return o;t[e.resultName]=o.value;t.next=e.nextLoc;if("return"!==t.method){t.method="next";t.arg=i}t.delegate=null;return b}function pushTryEntry(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]);if(2 in e){t.finallyLoc=e[2];t.afterLoc=e[3]}(this||_global3).tryEntries.push(t)}function resetTryEntry(e){var t=e.completion||{};t.type="normal";delete t.arg;e.completion=t}function Context(e){(this||_global3).tryEntries=[{tryLoc:"root"}];e.forEach(pushTryEntry,this||_global3);this.reset(true)}function values(e){if(e){var t=e[s];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function next(){while(++n<e.length)if(o.call(e,n)){next.value=e[n];next.done=false;return next}next.value=i;next.done=true;return next};return r.next=r}}return{next:doneResult}}function doneResult(){return{value:i,done:true}}}(function(){return this||_global3||"object"===typeof self&&self}()||Function("return this")())}).call(this||_global3,n(0))},function(e,t,n){(function(t){const r=n(36);const o=n(2);const i=n(604);const a=n(73);const s=n(1)("createPeerConnection");e.exports=function createPeerConnection(e){let n=e.window,c=e.config,l=e.constraints;s.debug("called");const u=r(c);u.iceServers=i(o,u.iceServers);a()&&(u.sdpSemantics="plan-b");const d=new n.RTCPeerConnection(u,l);return t.resolve(d)}}).call(this||_global3,n(0))},function(e,t,n){const r=n(7);const o=n(271);const i={Edge(e){let t=false;return e.map((e=>{if(!e)return;const n=e.urls||e.url&&[e.url];if(!n)return;const i=n.filter((e=>{const n=0===e.indexOf("turn:")&&-1!==e.indexOf("transport=udp")&&-1===e.indexOf("turn:[")&&!t;if(n){t=true;return true}return 0===e.indexOf("stun:")}));return 0!==i.length?r(o(e,["url","urls"]),{urls:i}):void 0})).filter((e=>void 0!==e))},Safari(e){return e.map((e=>{if(void 0!==e.urls&&void 0===e.url)return e;const t=e.urls||e.url&&[e.url];return r(o(e,["url","urls"]),{urls:t})}))}};e.exports=function filterIceServers(e,t){let n=e.name;e.isEdge&&(n=e.isLegacyEdge?"Edge":"ChromiumEdge");const r=i[n];return r?r(t):t}},function(e,t,n){const r=n(50);const o=n(2);const i={h264:{baseline:"42001f",constBaseline:"42e01f"}};const replaceProfileId=e=>{let t=e.sdp,n=e.from,r=e.to;return t.replace(new RegExp(`^(a=fmtp:\\d+ .*profile-level-id=)${n}`,"gmi"),`$1${r}`)};e.exports={local:{offer:function offer(e,t){let n=void 0===e?{}:e,a=n.numSimulcastStreams,s=n.audioBitrate,c=n.priorityVideoCodec,l=void 0===c?"":c,u=n.codecFlags,d=void 0===u?{}:u,f=n.enableStereo,p=void 0!==f&&f,g=n.enableDtx,h=void 0!==g&&g,b=n.replaceBaselineProfile,v=void 0!==b&&b;let m=r.filterExcessSSRCs(t);a>1&&(m=r.enableSimulcast(m,a));s>0&&(m=r.setAudioBitrate(m,s));m=r.modifyReceiveStereo(m,false);m=r.modifySendStereo(m,Boolean(p));m=r.modifyDtx(m,Boolean(h));o.isLegacyEdge||Object.keys(d).filter((e=>false===d[e])).forEach((e=>{m=r.removeVideoCodec(m,e)}));l&&!o.isLegacyEdge?m=r.reprioritizeVideoCodec(m,l,"top"):"h264"!==l&&(m=r.reprioritizeVideoCodec(m,"h264","bottom"));let _=m;v&&(_=replaceProfileId({sdp:_,from:i.h264.baseline,to:i.h264.constBaseline}));return{local:m,remote:_}},answer:function answer(e,t){let n=void 0===e?{}:e,o=n.audioBitrate,a=n.codecFlags,s=n.enableStereo,c=void 0!==s&&s,l=n.enableDtx,u=void 0!==l&&l,d=n.replaceBaselineProfile,f=void 0!==d&&d;let p=t;o>0&&(p=r.setAudioBitrate(p,o));p=r.modifyReceiveStereo(p,Boolean(c));p=r.modifySendStereo(p,false);p=r.modifyDtx(p,Boolean(u));a&&Object.keys(a).filter((e=>
7833false===a[e])).forEach((e=>{p=r.removeVideoCodec(p,e)}));let g=p;f&&(g=replaceProfileId({sdp:g,from:i.h264.baseline,to:i.h264.constBaseline}));return{local:p,remote:g}}},remote:{offer:(e,t)=>{let n=e.replaceBaselineProfile,r=void 0!==n&&n;let o=t;if(-1===o.indexOf("a=rtcp-fb")){const e="a=rtcp-fb:* ccm fir\r\na=rtcp-fb:* nack ";o=o.replace(/^m=video(.*)$/gim,`m=video$1\r\n${e}`)}r&&(o=replaceProfileId({sdp:o,from:i.h264.constBaseline,to:i.h264.baseline}));return{local:o}},answer:function answer(e,t){let n=void 0===e?{}:e,o=n.audioBitrate,a=n.replaceBaselineProfile,s=void 0!==a&&a;let c=t;o>0&&(c=r.setAudioBitrate(c,o));s&&(c=replaceProfileId({sdp:c,from:i.h264.constBaseline,to:i.h264.baseline}));return{local:c}}}}},function(e,t,n){var r=n(38),o=n(53),i=n(40),a=n(24),s=n(275),c=n(607),l=n(232),u=n(97),d=n(262),f=n(276);var p="[object Map]",g="[object Set]";var h=r?r.iterator:void 0;
7834/**
7835       * Converts `value` to an array.
7836       *
7837       * @static
7838       * @since 0.1.0
7839       * @memberOf _
7840       * @category Lang
7841       * @param {*} value The value to convert.
7842       * @returns {Array} Returns the converted array.
7843       * @example
7844       *
7845       * _.toArray({ 'a': 1, 'b': 2 });
7846       * // => [1, 2]
7847       *
7848       * _.toArray('abc');
7849       * // => ['a', 'b', 'c']
7850       *
7851       * _.toArray(1);
7852       * // => []
7853       *
7854       * _.toArray(null);
7855       * // => []
7856       */function toArray(e){if(!e)return[];if(a(e))return s(e)?d(e):o(e);if(h&&e[h])return c(e[h]());var t=i(e),n=t==p?l:t==g?u:f;return n(e)}e.exports=toArray},function(e,t){
7857/**
7858       * Converts `iterator` to an array.
7859       *
7860       * @private
7861       * @param {Object} iterator The iterator to convert.
7862       * @returns {Array} Returns the converted array.
7863       */
7864function iteratorToArray(e){var t,n=[];while(!(t=e.next()).done)n.push(t.value);return n}e.exports=iteratorToArray},function(e,t,n){var r=n(33);
7865/**
7866       * The base implementation of `_.values` and `_.valuesIn` which creates an
7867       * array of `object` property values corresponding to the property names
7868       * of `props`.
7869       *
7870       * @private
7871       * @param {Object} object The object to query.
7872       * @param {Array} props The property names to get values for.
7873       * @returns {Object} Returns the array of property values.
7874       */function baseValues(e,t){return r(t,(function(t){return e[t]}))}e.exports=baseValues},function(e,t,n){e.exports=(e,t)=>{let n=[];let r=null;if("function"===typeof e.getReceivers){const t=e.getReceivers().find((e=>"audio"===e.track.kind));t&&(n=t.getSynchronizationSources())}else r=new Error("peerConnection does not support getReceivers function");t&&t(r,n)}},function(e,t,n){(function(t){const r=n(611);
7875/*
7876         * Process incoming Ice Candidates from a remote connection.
7877         *
7878         * @constructor
7879         * @private
7880         *
7881         * @param {PeerConection} peerConnection The PeerConnection we want to add the
7882         * Ice Candidates to.
7883         *
7884         * @description The Ice Candidates cannot be processed until the PeerConnection
7885         * has local and remote descriptions, if candidates are added too early they
7886         * will be put in a pending list. Once the PeerConnection is ready the pending
7887         * candidates will be applied.
7888         *
7889         * **note:** We assume that the PeerConnection has implemented the promisified
7890         * versions of addIceCandidate.
7891         *
7892         *
7893         * @example
7894         *
7895         *  const iceProcessor = new IceCandidateProcessor(pc);
7896         *  iceProcessor.process(iceMessage1);
7897         *  iceProcessor.process(iceMessage2);
7898         *  iceProcessor.process(iceMessage3);
7899         *
7900         *
7901         */const o=function IceCandidateProcessor(e){(this||_global3).pending=[];(this||_global3)._processBinding=(this||_global3).maybeProcessPending.bind(this||_global3);e&&this.setPeerConnection(e)};o.prototype.setPeerConnection=function setPeerConnection(e){if((this||_global3).pc)throw new Error("Peer connection already set");(this||_global3).pc=e;(this||_global3)._forwardIceCandidate=r((this||_global3).pc,"addIceCandidate");(this||_global3).pc.addEventListener("signalingstatechange",(this||_global3)._processBinding);this.maybeProcessPending()};o.prototype.canAddCandidates=function canAddCandidates(){return!!((this||_global3).pc&&"closed"!==(this||_global3).pc.iceConnectionState&&(this||_global3).pc.remoteDescription&&(this||_global3).pc.remoteDescription.type&&(this||_global3).pc.localDescription&&(this||_global3).pc.localDescription.type)};
7902/**
7903         * Add an RTCIceCandidate to the PeerConnection. If the PeerConnection is ready
7904         * it will be applied immediately, otherwise it will be buffered until later.
7905         *
7906         * @param {RTCIceCandidate} iceCandidate The candidate to add.
7907         *
7908         * @returns {Promise} A promise that is resolved when the candidate is applied.
7909         *
7910         * @method #addIceCandidate
7911         * @memberof IceCandidateProcessor
7912         *
7913         */o.prototype.addIceCandidate=function addIceCandidate(e){if(this.canAddCandidates())return this._forwardIceCandidate(e);const n=(this||_global3).pending;return new t(((t,r)=>{n.push({iceCandidate:e,resolve:t,reject:r})}))};
7914/**
7915         * Called to attempt to process any pending candidates.
7916         *
7917         * @description This will be called automatically when needed so there's no
7918         * reason to call it yourself. You totally could, but surely you have better
7919         * things to do?
7920         *
7921         * @param {RTCIceCandidate} iceCandidate The candidate to add.
7922         *
7923         * @returns {Promise} A promise that is resolved when the candidate is applied.
7924         *
7925         * @method #addIceCandidate
7926         * @memberof IceCandidateProcessor
7927         *
7928         */o.prototype.maybeProcessPending=function maybeProcessPending(){this.canAddCandidates()&&this.process()};o.prototype.process=function process(){while((this||_global3).pending.length){const e=(this||_global3).pending.shift();this._forwardIceCandidate(e.iceCandidate).then(e.resolve).catch(e.reject)}};o.prototype.destroy=function destroy(){(this||_global3).pc&&(this||_global3).pc.removeEventListener("signalingstatechange",(this||_global3)._processBinding);(this||_global3)._processBinding=null;(this||_global3).pc=null};e.exports=o}).call(this||_global3,n(0))},function(e,t,n){(function(t){e.exports=function promisify(e,n){const r=e[n];return function(n){return new t(((t,o)=>{const i=r.apply(e,[n,t,o]);i&&"function"===typeof i.then&&t(i)}))}}}).call(this||_global3,n(0))},function(e,t,n){const r=n(155);const o=n(2);const i=n(1)("offerProcessor");const a=n(50);const s=n(613);e.exports=function offerProcessor(e,t,n,c,l,u,d,f,p,g,h,b){const generateErrorCallback=(e,t)=>n=>{i.error(e);i.error(n);g&&g(e,n,t)};const setLocalDescription=t=>{const n=a.hasSendStereo(u.sdp);const o=a.hasSendDtx(u.sdp);const i=a.getAudioBitrate(u.sdp);const s=r(l,"local","answer",{enableStereo:n,enableDtx:o,audioBitrate:i,replaceBaselineProfile:b,codecFlags:d},t.sdp);const f=new c({type:t.type,sdp:s.local});const g={type:t.type,sdp:s.remote};return e.setLocalDescription(f).then((()=>p(g))).catch(generateErrorCallback("Error while setting LocalDescription","SetLocalDescription"))};const createAnswer=()=>e.createAnswer().then(setLocalDescription).catch(generateErrorCallback("Error while setting createAnswer","CreateAnswer"));const v=new c({type:u.type,sdp:r(l,"remote","offer",{replaceBaselineProfile:b},u.sdp).local});const m=generateErrorCallback("Error while setting RemoteDescription","SetRemoteDescription");const _=s(v,f,o,t,n).then((()=>{h(true);return v})).catch((e=>{h(false);if(!a.hasMediaType(v.sdp,"audio"))throw new Error("Unsupported video without audio for fallback");i.debug("Couldn't set remote description",v,e,", trying without video");const t=new c({type:u.type,sdp:a.disableMediaType(v.sdp,"video")});i.debug("offer without video",t.sdp);return t}));return _.then((t=>e.setRemoteDescription(t))).then(createAnswer).catch(m)}},function(e,t,n){(function(t){const r=n(73);const testSupportVideo=(e,n,o,i,a)=>{if(!i)return t.resolve(true);const s={iceServers:[]};r()&&(s.sdpSemantics="plan-b");const c=new i(s);const cleanup=()=>{try{c.close()}catch(e){}};return c.setRemoteDescription(new a(e)).then((()=>{cleanup()})).catch((e=>{cleanup();throw e}))};e.exports=testSupportVideo}).call(this||_global3,n(0))},function(e,t,n){const r=n(61);const o=n(615);e.exports=function PeerConnectionChannels(e){let t=[];const n={};let i={sentMessages:0,recvMessages:0};const a=function remove(e){t.filter((t=>e!==t))};const s=function add(e){const n=new o(e);t.push(n);n.on("close",(()=>{a(n)}));return n};n.add=function(t,n){return s(e.createDataChannel(t,n))};n.addMany=function(e){for(const t in e)e.hasOwnProperty(t)&&n.add(t,e[t])};n.get=function(e,n){return r(t,(t=>t.equals(e,n)))};n.getOrAdd=function(e,t){let r=n.get(e,t);r||(r=n.add(e,t));return r};n.getQosData=function(){const e={sentMessages:0,recvMessages:0};t.forEach((t=>{e.sentMessages+=t.getQosData().sentMessages;e.recvMessages+=t.getQosData().recvMessages}));return e};n.sampleQos=function(){const e=n.getQosData();const t={sentMessages:e.sentMessages-i.sentMessages,recvMessages:e.recvMessages-i.recvMessages};i=e;return t};n.destroy=function(){t.forEach((e=>{e.close()}));t=[]};e.addEventListener("datachannel",(e=>{s(e.channel)}));return n}},function(e,t,n){const r=n(6);const o=n(1)("DataChannel");const i=function DataChannelMessageEvent(e){(this||_global3).data=e.data;(this||_global3).source=e.source;(this||_global3).lastEventId=e.lastEventId;(this||_global3).origin=e.origin;(this||_global3).timeStamp=e.timeStamp;(this||_global3).type=e.type;(this||_global3).ports=e.ports;(this||_global3).path=e.path};
7928e.exports=function DataChannel(e){const t={};const n=[];const a={sentMessages:0,recvMessages:0};const s=function bufferMessage(e){n.push(e);return t};const c=function sendMessage(n){e.send(n);a.sentMessages++;return t};const l=function flushBufferedMessages(){let e;while(e=n.shift())t.send(e)};const u=function onOpen(){t.send=c;l()};const d=function onClose(e){t.send=s;t.trigger("close",e)};const f=function onError(e){o.error(e)};const p=function onMessage(e){const n=new i(e);a.recvMessages++;t.trigger("message",n)};r(t,true);t.label=e.label;t.id=e.id;t.reliable=e.reliable;t.negotiated=e.negotiated;t.ordered=e.ordered;t.protocol=e.protocol;t._channel=e;t.close=function(){e.close()};t.equals=function(e,n){if(t.label!==e)return false;for(const e in n)if(n.hasOwnProperty(e)&&t[e]!==n[e])return false;return true};t.getQosData=function(){return a};t.send=s;e.addEventListener("open",u,false);e.addEventListener("close",d,false);e.addEventListener("error",f,false);e.addEventListener("message",p,false);return t}},function(e,t,n){const r=n(7);const o=n(155);const i=n(1)("subscribeProcessor");e.exports=function subscribeProcessor(e){let t=e.peerConnection,n=e.NativeRTCSessionDescription,a=e.sdpTransforms,s=e.numSimulcastStreams,c=e.offerOverrides,l=e.offerConstraints,u=e.replaceBaselineProfile;const generateErrorCallback=(e,t)=>n=>{i.error(e,n);const r=new Error(e);r.reason=n;r.prefix=t;throw r};const setLocalDescription=e=>{i.debug("subscribeProcessor: offer created",e);const l=o(a,"local","offer",r({numSimulcastStreams:s,replaceBaselineProfile:u},c),e.sdp);const d=new n({type:e.type,sdp:l.local});const f=new n({type:e.type,sdp:l.remote});i.debug("subscribeProcessor: setting local description");return t.setLocalDescription(d).then((()=>f),generateErrorCallback("Error while setting LocalDescription","SetLocalDescription"))};i.debug("subscribeProcessor: creating offer");return t.createOffer(l).then(setLocalDescription,generateErrorCallback("Error while creating Offer","CreateOffer")).then((e=>({sdp:e.sdp,type:e.type})))}},function(e,t,n){var r=n(3);var o=r(n(12));var i=r(n(13));const a=n(50);const s=a.mediaDirections,c=s.RECVONLY,l=s.INACTIVE;const u=function(){var e=(0,i.default)(o.default.mark((function _callee(e,t){var n,r,i;return o.default.wrap((function _callee$(o){while(1)switch(o.prev=o.next){case 0:if(e){o.next=2;break}return o.abrupt("return");case 2:o.next=4;return e.createOffer();case 4:n=o.sent;o.next=7;return e.setLocalDescription(n);case 7:r=e.remoteDescription.sdp;i=a.changeMediaDirection(r,t);e.setRemoteDescription({type:e.remoteDescription.type,sdp:i});case 10:case"end":return o.stop()}}),_callee)})));return function changeMediaDirection(t,n){return e.apply(this||_global3,arguments)}}();
7929/**
7930       * Changes the RTP media direction by SDP munging
7931       * @param {Object} peerConnection - the peer connection to apply the change
7932       * @param {('recvonly' | 'inactive')} direction - The new direction that could be recvonly or
7933       * inactive. If it's inactive, then the peer connection will stop sending RTP media.
7934       */e.exports={changeMediaDirectionToInactive:e=>u(e,l),changeMediaDirectionToRecvOnly:e=>u(e,c)}},function(e,t,n){t.__esModule=true;t.parseStatsOldAPI=parseStatsOldAPI;t.parseStatsNewAPI=parseStatsNewAPI;t.default=parseQOS;function _createForOfIteratorHelperLoose(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:true}:{done:false,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n=e[Symbol.iterator]();return n.next.bind(n)}function _unsupportedIterableToArray(e,t){if(e){if("string"===typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const r=n(2);const o=n(5);const i=n(1)("QoS");const a=n(50);const s=n(279);const c=n(619);const l=n(102)();const u=n(157);const d=["audioCodec","audioSentBytes","audioSentPackets","audioSentPacketsLost","audioRtt","videoCodec","videoHeight","videoHeightInput","videoSentBytes","videoFrameRateSent","videoSentPackets","videoRtt","videoSentPacketsLost","videoWidthInput","videoWidth"];const f=["audioCodec","audioRecvBytes","audioRecvPackets","audioRecvPacketsLost","videoCodec","videoHeight","videoRecvBytes","videoRecvPackets","videoRecvPacketsLost","videoFrameRateReceived","videoWidth"];const rawStatsHandler=(e,t)=>i.debug(`Raw stats for peer conn ${e.id}:`,t);const getAddress=e=>{const t=e.portNumber||e.port;
7934const n=e.ipAddress||e.address||e.ip;return`${n}:${t}`};function parseStatsOldAPI(e,t,n,r,o){const parseVideoStats=e=>{if(Number(e.stat("googFrameRateSent"))>0){n.videoSentBytes=Number(e.stat("bytesSent"));n.videoSentPackets=Number(e.stat("packetsSent"));n.videoSentPacketsLost=Number(e.stat("packetsLost"));n.videoRtt=Number(e.stat("googRtt"))/1e3;n.videoFrameRate=Number(e.stat("googFrameRateInput"));n.videoWidth=Number(e.stat("googFrameWidthSent"));n.videoHeight=Number(e.stat("googFrameHeightSent"));n.videoFrameRateSent=Number(e.stat("googFrameRateSent"));n.videoWidthInput=Number(e.stat("googFrameWidthInput"));n.videoHeightInput=Number(e.stat("googFrameHeightInput"));n.videoCodec=e.stat("googCodecName")}else if(Number(e.stat("googFrameRateReceived"))>0){n.videoRecvBytes=Number(e.stat("bytesReceived"));n.videoRecvPackets=Number(e.stat("packetsReceived"));n.videoRecvPacketsLost=Number(e.stat("packetsLost"));n.videoFrameRate=Number(e.stat("googFrameRateOutput"));n.videoFrameRateReceived=Number(e.stat("googFrameRateReceived"));n.videoFrameRateDecoded=Number(e.stat("googFrameRateDecoded"));n.videoWidth=Number(e.stat("googFrameWidthReceived"));n.videoHeight=Number(e.stat("googFrameHeightReceived"));n.videoCodec=e.stat("googCodecName")}return null};const parseAudioStats=e=>{if(Number(e.stat("audioInputLevel"))>0){n.audioSentPackets=Number(e.stat("packetsSent"));n.audioSentPacketsLost=Number(e.stat("packetsLost"));n.audioSentBytes=Number(e.stat("bytesSent"));n.audioCodec=e.stat("googCodecName");n.audioRtt=Number(e.stat("googRtt"))/1e3}else if(Number(e.stat("audioOutputLevel"))>0){n.audioRecvPackets=Number(e.stat("packetsReceived"));n.audioRecvPacketsLost=Number(e.stat("packetsLost"));n.audioRecvBytes=Number(e.stat("bytesReceived"));n.audioCodec=e.stat("googCodecName")}};const parseStatsReports=t=>{if(t.result){const r=t.result();rawStatsHandler(e,r);const getCandidate=(e,t)=>r.filter((n=>n.id===t.stat(e)))[0];const getLocalCandidate=e=>getCandidate("localCandidateId",e);const getRemoteCandidate=e=>getCandidate("remoteCandidateId",e);for(let e=0;e<r.length;e++){const t=r[e];if(t.stat){if("true"===t.stat("googActiveConnection"))if(t.stat("googChannelId").indexOf("audio")>-1){n.audioLocalAddress=t.stat("googLocalAddress");n.audioRemoteAddress=t.stat("googRemoteAddress");n.audioLocalCandidateType=t.stat("googLocalCandidateType");n.audioRemoteCandidateType=t.stat("googRemoteCandidateType");
7934n.audioTransportType=t.stat("googTransportType");n.audioLocalRelayProtocol=s(getLocalCandidate(t).stat("priority"));n.audioRemoteRelayProtocol=s(getRemoteCandidate(t).stat("priority"))}else if(t.stat("googChannelId").indexOf("video")>-1){n.videoLocalAddress=t.stat("googLocalAddress");n.videoRemoteAddress=t.stat("googRemoteAddress");n.videoLocalCandidateType=t.stat("googLocalCandidateType");n.videoRemoteCandidateType=t.stat("googRemoteCandidateType");n.videoTransportType=t.stat("googTransportType");n.videoLocalRelayProtocol=s(getLocalCandidate(t).stat("priority"));n.videoRemoteRelayProtocol=s(getRemoteCandidate(t).stat("priority"))}parseAudioStats(t);parseVideoStats(t)}}"videoCodec"in n&&!n.videoLocalAddress&&["LocalAddress","RemoteAddress","LocalCandidateType","RemoteCandidateType","TransportType","LocalRelayProtocol","RemoteRelayProtocol"].forEach((e=>{n[`video${e}`]=n[`audio${e}`]}))}o(null,n)};e.getStats(parseStatsReports)}function parseStatsNewAPI(e,t,n,i,s){const l=function onStatsError(e){s(e)};const parseAudioStats=(t,r)=>{if("outboundrtp"===r){n.audioSentPackets=t.packetsSent;n.audioSentPacketsLost=t.packetsLost;n.audioSentBytes=t.bytesSent}else if("inboundrtp"===r){n.audioRecvPackets=t.packetsReceived;n.audioRecvPacketsLost=t.packetsLost;n.audioRecvBytes=t.bytesReceived}if(void 0===n.audioCodec&&-1!==["Safari"].indexOf(o.env.name)&&void 0!==t.codecId){const r="answer"===e.remoteDescription.type?e.remoteDescription:e.localDescription,o=r.sdp;const i=t.codecId.lastIndexOf("_");const s=a.getCodecsAndCodecMap(o,"audio");-1!==i&&void 0!==s&&(n.audioCodec=s.codecMap[t.codecId.substring(i+1)])}};const parseOutboundVideoStats=e=>{const t={packetsSent:"videoSentPackets",packetsLost:"videoSentPacketsLost",bytesSent:"videoSentBytes",framesPerSecond:"videoFrameRate",framesSent:"videoFrameRateSent",framesReceived:"videoFramesReceived",frameWidth:"videoWidth",frameHeight:"videoHeight"};const r=["videoSentPackets","videoSentBytes"];for(const o in t)if(o in e){const i=t[o];r.includes(i)&&Number.isSafeInteger(n[i])?n[i]+=e[o]:n[i]=e[o]}};const parseVideoStats=(s,c)=>{const getVideoFrameRate=()=>{const e="videoSentBytes"in n?n.videoSentBytes>0:n.videoRecvBytes>0;if(!e)return 0;let o=0;if(r.isFirefox&&r.version<96)o=Number(s.framerateMean);else{const e="outboundrtp"===c?"framesEncoded":"framesDecoded";n[e]=s[e];o=u({currentStatFrames:s[e],currentTimestamp:s.timestamp,prevStatFrames:t[e],prevTimestamp:t.timeStamp||Date.now()})}return o};if("outboundrtp"===c)parseOutboundVideoStats(s);else if("inboundrtp"===c){n.videoRecvPackets=s.packetsReceived;n.videoRecvPacketsLost=s.packetsLost;n.videoRecvBytes=s.bytesReceived}(r.isFirefox&&["outboundrtp","inboundrtp"].includes(c)||!i&&"inboundrtp"===c)&&(n.videoFrameRate=getVideoFrameRate());if(void 0===n.videoCodec&&-1!==["Safari"].indexOf(o.env.name)&&void 0!==s.codecId){const t="answer"===e.remoteDescription.type?e.remoteDescription:e.localDescription,r=t.sdp;const o=s.codecId.lastIndexOf("_");const i=a.getCodecsAndCodecMap(r,"video");-1!==o&&void 0!==i&&(n.videoCodec=i.codecMap[s.codecId.substring(o+1)])}};e.getStats(null).then((t=>{let r,o,l,u,d,f,p,g;const h=[];const getVideoRttAverage=()=>{if(0===h.length)return null;const e=h.filter((e=>e>0));const t=e.reduce(((e,t)=>e+t),0);const n=e.length?t/e.length:0;return n};const getStrippedType=e=>e.toLowerCase().replace(/[^a-z]/g,"");const statsLoop=e=>{const i=getStrippedType(e.type);const a=e.id.toLowerCase();if(/(in|out)boundrtp$/.test(i)){const t=/rtp/.test(a);const r=t&&/audio/.test(a);const o=t&&/video/.test(a);const s=r||"audio"===e.kind;const c=o||"video"===e.kind;s?parseAudioStats(e,i):c&&parseVideoStats(e,i);if(e.hasOwnProperty("roundTripTime")){const t=e.mediaType||e.kind;"video"===t?h.push(e.roundTripTime):"audio"===t&&(n.audioRtt=e.roundTripTime)}if("remoteinboundrtp"===i&&e.hasOwnProperty("packetsLost")){const t=e.kind;const r=`${t}SentPacketsLost`;n[r]||(n[r]=0);n[r]+=e.packetsLost}}else if("transport"===i){const n=e.selectedCandidatePairId;n&&(u=c(n,t))}else if("localcandidate"===i){r=e.candidateType;l=getAddress(e);f=e.protocol||e.transport}else if("remotecandidate"===i){o=e.candidateType;d=getAddress(e)}else if("track"===i&&0!==a.indexOf("video")){p=e.frameWidth;g=e.frameHeight;parseOutboundVideoStats(e)}else if("mediasource"===i){e.hasOwnProperty("framesPerSecond")&&(n.videoFrameRate=e.framesPerSecond);e.hasOwnProperty("width")&&(n.videoWidthInput=e.width);e.hasOwnProperty("height")&&(n.videoHeightInput=e.height)}};if("function"===typeof t[Symbol.iterator]){rawStatsHandler(e,Array.from(t));for(var b,v=_createForOfIteratorHelperLoose(t);!(b=v()).done;){const e=b.value;const t=Array.isArray(e)?e[1]:e;statsLoop(t)}}else{rawStatsHandler(e,t);for(const e in t)t.hasOwnProperty(e)&&statsLoop(t[e])}e.currentRemoteDescription&&(n.useDtx=a.hasSendDtx(e.currentRemoteDescription.sdp));i&&(n.videoRtt=getVideoRttAverage());if(n.audioRecvBytes||n.audioSentBytes){n.audioLocalCandidateType=r;n.audioLocalAddress=l;n.audioRemoteCandidateType=o;n.audioRemoteAddress=d;n.audioTransportType=f;n.audioLocalRelayProtocol=u;if(void 0===n.audioCodec){const t="answer"===e.remoteDescription.type?e.remoteDescription:e.localDescription,r=t.sdp;const o=a.getCodecs(r,"audio");n.audioCodec=o[0]}}if(n.videoRecvBytes||n.videoSentBytes){n.videoLocalCandidateType=r;n.videoLocalAddress=l;n.videoRemoteCandidateType=o;n.videoRemoteAddress=d;n.videoTransportType=f;n.videoLocalRelayProtocol=u;if(void 0===n.videoCodec){const t="answer"===e.remoteDescription.type?e.remoteDescription:e.localDescription,r=t.sdp;const o=a.getCodecs(r,"video");n.videoCodec=o[0]}}extendStats(n,i);n.videoWidth=n.videoWidth||p;n.videoHeight=n.videoHeight||g;s(null,n)})).catch(l)}function parseQOS(e,t,n,r,o){return l?parseStatsNewAPI(e,t,n,r,o):parseStatsOldAPI(e,t,n,r,o)}function extendStats(e,t){const n=t?d:f;
7934n.forEach((t=>{e.hasOwnProperty(t)||(e[t]=null)}))}},function(e,t,n){const r=n(279);e.exports=(e,t)=>{let n="";if(!e||!t)return n;const o=t.get(e);if(o){const e=o.localCandidateId;if(e){const o=t.get(e);if(o){const e=o.relayProtocol,t=o.priority;if(e){const t=e.toUpperCase();n=`TURN/${t}`}else n=r(t)}}}return n}},function(e,t,n){var r=n(3);t.__esModule=true;t.default=void 0;var o=r(n(18));let i=function(){function TruthyChangeCounter(){(0,o.default)(this||_global3,"value",null);(0,o.default)(this||_global3,"changeCount",0)}var e=TruthyChangeCounter.prototype;e.onValue=function onValue(e){if(e&&e!==(this||_global3).value){(this||_global3).value&&((this||_global3).changeCount+=1);(this||_global3).value=e}};return TruthyChangeCounter}();t.default=i},function(e,t,n){var r=n(9),o=n(622),i=n(228);var a="Expected a function";var s=Math.max,c=Math.min;
7935/**
7936       * Creates a debounced function that delays invoking `func` until after `wait`
7937       * milliseconds have elapsed since the last time the debounced function was
7938       * invoked. The debounced function comes with a `cancel` method to cancel
7939       * delayed `func` invocations and a `flush` method to immediately invoke them.
7940       * Provide `options` to indicate whether `func` should be invoked on the
7941       * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
7942       * with the last arguments provided to the debounced function. Subsequent
7943       * calls to the debounced function return the result of the last `func`
7944       * invocation.
7945       *
7946       * **Note:** If `leading` and `trailing` options are `true`, `func` is
7947       * invoked on the trailing edge of the timeout only if the debounced function
7948       * is invoked more than once during the `wait` timeout.
7949       *
7950       * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
7951       * until to the next tick, similar to `setTimeout` with a timeout of `0`.
7952       *
7953       * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
7954       * for details over the differences between `_.debounce` and `_.throttle`.
7955       *
7956       * @static
7957       * @memberOf _
7958       * @since 0.1.0
7959       * @category Function
7960       * @param {Function} func The function to debounce.
7961       * @param {number} [wait=0] The number of milliseconds to delay.
7962       * @param {Object} [options={}] The options object.
7963       * @param {boolean} [options.leading=false]
7964       *  Specify invoking on the leading edge of the timeout.
7965       * @param {number} [options.maxWait]
7966       *  The maximum time `func` is allowed to be delayed before it's invoked.
7967       * @param {boolean} [options.trailing=true]
7968       *  Specify invoking on the trailing edge of the timeout.
7969       * @returns {Function} Returns the new debounced function.
7970       * @example
7971       *
7972       * // Avoid costly calculations while the window size is in flux.
7973       * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
7974       *
7975       * // Invoke `sendMail` when clicked, debouncing subsequent calls.
7976       * jQuery(element).on('click', _.debounce(sendMail, 300, {
7977       *   'leading': true,
7978       *   'trailing': false
7979       * }));
7980       *
7981       * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
7982       * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
7983       * var source = new EventSource('/stream');
7984       * jQuery(source).on('message', debounced);
7985       *
7986       * // Cancel the trailing debounced invocation.
7987       * jQuery(window).on('popstate', debounced.cancel);
7988       */function debounce(e,t,n){var l,u,d,f,p,g,h=0,b=false,v=false,m=true;if("function"!=typeof e)throw new TypeError(a);t=i(t)||0;if(r(n)){b=!!n.leading;v="maxWait"in n;d=v?s(i(n.maxWait)||0,t):d;m="trailing"in n?!!n.trailing:m}function invokeFunc(t){var n=l,r=u;l=u=void 0;h=t;f=e.apply(r,n);return f}function leadingEdge(e){h=e;p=setTimeout(timerExpired,t);return b?invokeFunc(e):f}function remainingWait(e){var n=e-g,r=e-h,o=t-n;return v?c(o,d-r):o}function shouldInvoke(e){var n=e-g,r=e-h;return void 0===g||n>=t||n<0||v&&r>=d}function timerExpired(){var e=o();if(shouldInvoke(e))return trailingEdge(e);p=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){p=void 0;if(m&&l)return invokeFunc(e);l=u=void 0;return f}function cancel(){void 0!==p&&clearTimeout(p);h=0;l=g=u=p=void 0}function flush(){return void 0===p?f:trailingEdge(o())}function debounced(){var e=o(),n=shouldInvoke(e);l=arguments;u=this||_global3;g=e;if(n){if(void 0===p)return leadingEdge(g);if(v){clearTimeout(p);p=setTimeout(timerExpired,t);return invokeFunc(g)}}void 0===p&&(p=setTimeout(timerExpired,t));return f}debounced.cancel=cancel;debounced.flush=flush;return debounced}e.exports=debounce},function(e,t,n){var r=n(14);
7989/**
7990       * Gets the timestamp of the number of milliseconds that have elapsed since
7991       * the Unix epoch (1 January 1970 00:00:00 UTC).
7992       *
7993       * @static
7994       * @memberOf _
7995       * @since 2.4.0
7996       * @category Date
7997       * @returns {number} Returns the timestamp.
7998       * @example
7999       *
8000       * _.defer(function(stamp) {
8001       *   console.log(_.now() - stamp);
8002       * }, _.now());
8003       * // => Logs the number of milliseconds it took for the deferred invocation.
8004       */var now=function(){return r.Date.now()};e.exports=now},function(e,t,n){const r=n(49);t.check=function(e){void 0===e&&(e={});const t=e.env||n(2);return"Chrome"===t.name&&t.userAgent.toLowerCase().indexOf("android")>-1&&t.version<65};t.once=r((()=>t.check()))},function(e,t,n){const r=n(35);const o=n(5);e.exports=function Archiving(e){let t,n,i,a,s;const c=this||_global3;let l=e.archiving;
8004const u=e.archivingStarted||"Archiving on";const d=e.archivingEnded||"Archiving off";let f=true;const p=function renderText(e){a.nodeValue=e;t.setAttribute("title",e)};const g=function renderStage(){if(s){clearTimeout(s);s=null}l?o.addClass(n,"OT_active"):o.removeClass(n,"OT_active");o.removeClass(c.domElement,"OT_archiving-"+(l?"off":"on"));o.addClass(c.domElement,"OT_archiving-"+(l?"on":"off"));if(e.show&&l){p(u);o.addClass(i,"OT_mode-on");o.removeClass(i,"OT_mode-auto");c.setDisplayMode("on");s=setTimeout((()=>{o.addClass(i,"OT_mode-auto");o.removeClass(i,"OT_mode-on")}),5e3)}else if(e.show&&!f){o.addClass(i,"OT_mode-on");o.removeClass(i,"OT_mode-auto");c.setDisplayMode("on");p(d);s=setTimeout((()=>{c.setDisplayMode("off")}),5e3)}else c.setDisplayMode("off")};r(this||_global3,{mode:l&&e.show?"on":"off",nodeName:"h1",htmlAttributes:{className:"OT_archiving OT_edge-bar-item OT_edge-bottom"},onCreate(){t=o.createElement("div",{className:"OT_archiving-light-box"},"");n=o.createElement("div",{className:"OT_archiving-light"},"");t.appendChild(n);i=o.createElement("div",{className:"OT_archiving-status OT_mode-on OT_edge-bar-item OT_edge-bottom"},"");a=document.createTextNode("");i.appendChild(a);c.domElement.appendChild(t);c.domElement.appendChild(i);g()}});(this||_global3).setShowArchiveStatus=function(t){e.show=t;c.domElement&&g.call(c)};(this||_global3).setArchiving=function(e){l=e;f=false;c.domElement&&g.call(c)}}},function(e,t,n){e.exports=function(e){void 0===e&&(e={});const t=e.global||(void 0!==typeof window?window:_global3);return()=>t.navigator&&t.navigator.mediaDevices}},function(e,t,n){(function(t){const r=n(7);const o=n(9);const i=n(106);const a=n(627);const s=n(27);const c=n(21);const l=n(6);e.exports=function getUserMediaFactory(e){void 0===e&&(e={});const u=e.env||n(2);const d=e.Errors||n(4);const f=e.otError||n(11)();const p=e.logging||n(1)("getUserMedia");const g=e.screenSharing||n(161)();const h=e.getDisplayMediaExtensionHelper||n(287);const b=e.customGetUserMedia;const v=e.global||(void 0!==typeof window?window:_global3);
8005/** @type {AnalyticsHelper} */const m=e.analytics||new s;const _=v.navigator,y=v.location;const getGetUserMediaFn=()=>{if(b)return b;if(_.mediaDevices){var e;return(e=_.mediaDevices).getUserMedia.bind(e)}};const E=function getUserMedia(){const e=getGetUserMediaFn();return e?e(...arguments):t.reject(new Error("Cannot find getUserMedia"))};const getGetDisplayMediaFn=()=>{if(b)return b;if(_.mediaDevices&&_.getDisplayMedia)return _.getDisplayMedia.bind(_);if(_.mediaDevices&&_.mediaDevices.getDisplayMedia){var e;return(e=_.mediaDevices).getDisplayMedia.bind(e)}};const S=function getDisplayMedia(){const e=getGetDisplayMediaFn();return e?e(...arguments):t.reject(new Error("Cannot find getDisplayMedia"))};const T=(()=>{const e={name:d.USER_MEDIA_ACCESS_DENIED,message:"End-user denied permission to hardware devices"};const t={name:d.NOT_SUPPORTED,message:"A constraint specified is not supported by the browser."};const n={name:d.CONSTRAINTS_NOT_SATISFIED,message:"It's not possible to satisfy one or more constraints passed into the getUserMedia function"};const o={name:d.NO_DEVICES_FOUND,message:"No voice or video input devices are available on this machine."};const i={name:d.HARDWARE_UNAVAILABLE,message:"The selected voice or video devices are unavailable. Verify that the chosen devices are not in use by another application."};const s={name:d.UNABLE_TO_CAPTURE_SCREEN,message:"Unable to capture screen. Unknown error occurred"};const c={name:d.UNABLE_TO_CAPTURE_MEDIA,message:"Unable to capture media. Unknown error occurred"};const l={AbortError:c,NotAllowedError:e,NotFoundError:o,NotReadableError:i,OverconstrainedError:n,SecurityError:r({},e,{message:"End-user denied permission to hardware devices or user media support may be disabled on this page"}),TypeError:n,PermissionDeniedError:e,PermissionDismissedError:e,NotSupportedError:t,ConstraintNotSatisfiedError:n,MandatoryUnsatisfiedError:n,OverConstrainedError:n,DevicesNotFoundError:o,NoDevicesFoundError:o,HardwareUnavailableError:i,SourceUnavailableError:i,TrackStartError:i,ScreenCaptureError:s,TabCaptureError:s};a({objectToTrack:l,keys:["PermissionDeniedError","PermissionDismissedError","NotSupportedError","ConstraintNotSatisfiedError","MandatoryUnsatisfiedError","OverConstrainedError","DevicesNotFoundError","NoDevicesFoundError","HardwareUnavailableError","S
8005ourceUnavailableError","TrackStartError","ScreenCaptureError","TabCaptureError"],onUsage(e){m.logEvent({action:"DeprecatedPropertyUsage:getUserMedia:errorMap",variation:"Event",payload:{key:e}})}});return l})();const errorFromVendorNameAndMessage=(e,t)=>{let n=e;"AbortError"===n&&"string"===typeof t&&t.match(/(screen|tab).?capture/i)&&(n="ScreenCaptureError");const r=T[n];let o;o=r?f(r.name,new Error(`${r.message} (getUserMedia error: ${e})`)):new Error(`Unknown error while getting user media: ${e}`);o.originalMessage=t;o.originalName=e;return o};const parseErrorEvent=e=>{if(o(e)&&e.name){let t=e.name,n=e.message;"Cannot find getUserMedia"!==n&&"Cannot find getDisplayMedia"!==n||(t="Chrome"===u.name&&u.version>73&&"https:"!==v.location.protocol?"NotAllowedError":"NotSupportedError");if("Safari"===u.name&&"Error"===t){const n=Object.prototype.toString.call(e);const r=n.match(/^\[object (\w+Error)\]$/);r&&(t=r[1])}const r=errorFromVendorNameAndMessage(t,n);r.constraintName=e.constraint||e.constraintName;r instanceof c||m.logEvent({action:"UnexpectedError:getUserMedia:parseErrorEvent",variation:"Event",payload:{name:r.name,message:r.message,originalMessage:r.originalMessage}});return r}if("string"===typeof e){const t=errorFromVendorNameAndMessage(e);m.logEvent({action:"CheckUnreachable:getUserMedia:parseErrorEvent",variation:"Event",payload:{info:"error is string",error:e}});return t}m.logEvent({action:"CheckUnreachable:getUserMedia:parseErrorEvent",variation:"Event",payload:{info:"error was not string or object with name property",error:e}});return new Error("Unknown error type while getting media")};const C=function areInvalidConstraints(e){if(!e||!o(e))return true;for(const t in e)if(e.hasOwnProperty(t)&&e[t])return false;return true};return function(e,n){void 0===n&&(n=false);p.debug("getUserMedia wrapper called with",e);if(C(e)){p.error("Couldn't get UserMedia: All constraints were false");return l(t.reject(f(d.NO_VALID_CONSTRAINTS,new Error("Video and Audio was disabled, you need to enable at least one"))))}const r=n&&h.isSupportedInThisBrowser?S:E;const o=l(r(e).catch((e=>{const n=parseErrorEvent(e);if(n.name===d.UNABLE_TO_CAPTURE_SCREEN)return new t(((e,t)=>{g.checkCapability((e=>{if("chrome"===e.extensionRequired){if(e.extensionRegistered&&!e.extensionInstalled){const e=f(d.SCREEN_SHARING_EXTENSION_NOT_INSTALLED,n);e.message="Screen sharing extension not installed see https://tokbox.com/developer/guides/screen-sharing/js/#chrome-extension";t(e)}else if(!e.extensionRegistered){const e=f(d.SCREEN_SHARING_EXTENSION_NOT_REGISTERED,n);e.message="Screen sharing extension not registered see https://tokbox.com/developer/guides/screen-sharing/js/#chrome-extension";t(e)}}else t(n)}))}));throw n})).then((e=>{p.debug("got stream:",{stream:e,tracks:e.getTracks(),trackLabels:e.getTracks().map((e=>e.label))});return e})));const a=-1!==y.protocol.indexOf("https")?500:100;let s=true;const setWaitingForStreamFalse=()=>{s=false};o.then(setWaitingForStreamFalse,setWaitingForStreamFalse);i(a).then((()=>
8005{if(!s)return;const closeDialog=()=>o.emit("accessDialogClosed");o.emit("accessDialogOpened");o.then(closeDialog,closeDialog)}));return o}}}).call(this||_global3,n(0))},function(e,t,n){e.exports=function(e){let t=void 0===e?{}:e,n=t.objectToTrack,r=t.keys,o=t.onUsage;if(!Array.isArray(r)&&void 0!==r)throw new Error("keys must be an array, or undefined");if("function"!==typeof o)throw new Error("onUsage must be a function");if(null==n)throw new Error("Expected objectToTrack to be a trackable object");Object.keys(n).forEach((e=>{if(void 0!==r&&-1===r.indexOf(e))return;let t=n[e];Object.defineProperty(n,e,{get(){o(e);return t},set(n){t=n;o(e,t)},enumerable:true})}))}},function(e,t,n){const r=n(2);const o=n(629),i=o.isCallbackBasedAPI;let a=n(265);let s=null;const getSourcesUsingCallback=(e,t)=>{s.getSources(e,t)};const getSourcesUsingPromise=(e,t)=>{s.getSources(e).then((e=>{t(void 0,e)}),t)};const getSourcesAdapter=()=>i?getSourcesUsingCallback:getSourcesUsingPromise;const getSourcesWrapper=(e,t)=>{const n=getSourcesAdapter();n({types:[e]},((n,r)=>{if(n){t(n);return}const o=r[0];if(!o){t(new Error("Could not find Electron source for screensharing"));return}const i={audio:false,video:{mandatory:{chromeMediaSource:e,chromeMediaSourceId:o.id}}};t(void 0,i)}))};e.exports=function electronExtensionHelperFactory(e){void 0===e&&(e={});try{const globalContext=()=>{let e=void 0!==typeof window?window:_global3;while("function"!==typeof e.require&&e.parent&&e.parent!==e)e=e.parent;return e};const getDesktopCapturer=()=>{const e=globalContext();const t=e.require?e.require("electron"):e.electron;return t.desktopCapturer};s=e.desktopCapturer||(r.isElectron?getDesktopCapturer():null);a=e.isElectronScreenSharingSource||a}catch(e){}return{isSupportedInThisBrowser:null!==s,autoRegisters:true,extensionRequired:false,getConstraintsShowsPermissionUI:false,sources:{screen:true,application:true,window:true,browser:true},register:()=>({isInstalled:e=>e(true),getConstraints(e,t,n){a(e)?n(void 0,{audio:true,video:false}):getSourcesWrapper(e,n)}})}}},function(e,t,n){const r=n(2);const o=r.version<78;const i=!o;e.exports={isCallbackBasedAPI:o,isPromiseBasedAPI:i}},function(e,t,n){const r=n(2);const o=n(159).default;const isSupportedInThisBrowser=()=>{const e=r.isFirefox;return!!e&&!o};e.exports={isSupportedInThisBrowser:isSupportedInThisBrowser(),autoRegisters:true,extensionRequired:false,extensionInstalled:false,getConstraintsShowsPermissionUI:false,sources:{screen:true,application:false,window:true,browser:false},register(){return{isInstalled(e){e("object"===typeof OTScreenSharing)},getConstraints(e,t,n){t.video={mediaSource:e};if(t.browserWindow){t.video.browserWindow=t.browserWindow;delete t.browserWindow}if("undefined"!==typeof t.scrollWithPage){t.video.scrollWithPage=t.scrollWithPage;delete t.scrollWithPage}n(void 0,t)}}}}},function(e,t,n){var r=n(3);var o=r(n(12));var i=r(n(13));var a=r(n(25));const s=n(632),c=s.normaliseOptions;const l=n(288),u=l.isMediaStreamTrack;const d=n(148);const f=n(7);const p=n(140);const g=n(289).default;const h=n(4);const b=n(47);const v=n(11);const m=n(290),_=m.isValidVideoContentHint;const y=n(6);const E=n(264);const S=n(2);const T=n(263);const C="getUserMedia request was aborted";e.exports=function processPubOptionsFactory(e){void 0===e&&(e={});["deviceHelpers","getUserMediaHelper"].forEach((t=>{d(e[t],`${t} dependency must be injected into processPubOptions`)}));const t=e.generateConstraintInfo||n(254);const r=e.global||(void 0!==typeof window?window:_global3);const s=e.logging||n(1)("processPubOptions");const l=e.navigator||r.navigator;const m=e.screenSharing||n(161)();const w=e.env||S;const O=n(633)({navigator:l||{}});const x=e,I=x.deviceHelpers,A=x.getUserMediaHelper;return(e,n,l)=>{const d=c(e,n,s);const S=E(d.videoSource);const x=u(d.audioSource);const R=u(d.videoSource);const k=!x&&null!==d.audioSource;const D=!R&&null!==d.videoSource;const N=k||D;const isBoolean=e=>"boolean"===typeof e;const P=!S||x||T;const M=p(d,{mirror:!S&&!R,publishAudio:true,publishVideo:true,showControls:true,fitMode:S?"contain":"cover",audioFallbackEnabled:P,insertDefaultUI:true,enableRenegotiation:false,enableStereo:false,enableDtx:false,disableAudioProcessing:false,echoCancellation:true,noiseSuppression:true,autoGainControl:true});if(void 0!==M.videoContentHint&&!_(M.videoContentHint)){s.warn(`${n}: Invalid content hint. Valid content hints are "text", "detail", "motion", or ""`);M.videoContentHint=""}M.name&&(M.name=String(M.name));isBoolean(M.enableDtx)||(M.enableDtx=false);isBoolean(M.enableStereo)||(M.enableStereo=false);
8005if(M.constraints)s.warn(`${n}: You have passed your own constraints not using ours`);else{const e=t((0,a.default)({isScreenSharing:S,isCustomAudioTrack:x,isCustomVideoTrack:R},b(M,["audioSource","publishAudio","videoSource","publishVideo","resolution","maxResolution","frameRate","facingMode","enableRenegotiation","enableStereo","disableAudioProcessing","echoCancellation","noiseSuppression","autoGainControl"]),{env:w,usingOptionalMandatoryStyle:O(S)}));f(M,e)}const L={isScreenSharing:S,isCustomAudioTrack:x,isCustomVideoTrack:R,shouldAllowAudio:P,properties:M};y(L);L.getUserMedia=(0,i.default)(o.default.mark((function _callee2(){var e,t,a,c,u,f,p,b,_;return o.default.wrap((function _callee2$(y){while(1)switch(y.prev=y.next){case 0:e=function onAccessDialogOpened(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return L.emit("accessDialogOpened",...t)};t=function onAccessDialogClosed(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return L.emit("accessDialogClosed",...t)};if(N){y.next=7;break}a=new r.MediaStream;x&&a.addTrack(d.audioSource);R&&a.addTrack(d.videoSource);return y.abrupt("return",a);case 7:if(!S){y.next=15;break}y.next=10;return m.getConstraints({onAccessDialogOpened:e,onAccessDialogClosed:t,videoSource:d.videoSource,constraints:M.constraints});case 10:M.constraints=y.sent;if(!l()){y.next=13;break}throw v(h.CANCEL,new Error(C));case 13:y.next=25;break;case 15:y.next=17;return I.shouldAskForDevices();case 17:c=y.sent;if(!l()){y.next=20;break}throw v(h.CANCEL,new Error(C));case 20:s.debug(`${n}: shouldAskForDevices:`,c);if(!c.video){s.warn(`${n}: Setting video constraint to false, there are no video sources`);M.constraints.video=false}if(!c.audio){s.warn(`${n}: Setting audio constraint to false, there are no audio sources`);M.constraints.audio=false}L.videoDevices=c.videoDevices;L.audioDevices=c.audioDevices;case 25:u=M.constraints;s.debug(`${n}: onConstraintsFound`,u);if(!l()){y.next=29;break}throw v(h.CANCEL,new Error(C));case 29:f="Failed to acquire functional stream, this might be caused by the following iOS bug: https://bugs.webkit.org/show_bug.cgi?id=188088";p="Failed to acquire functional stream, this might be caused by the following iOS bug: https://bugs.webkit.org/show_bug.cgi?id=204106";b=e=>"NotReadableError"===e.originalName&&"Failed starting capture of a video track"===e.originalMessage;_=function(){var r=(0,i.default)(o.default.mark((function _callee(){var r,i,a,c,l;return o.default.wrap((function _callee$(o){while(1)switch(o.prev=o.next){case 0:r=A(u,S);r.on("accessDialogOpened",e);r.on("accessDialogClosed",t);o.prev=3;o.next=6;return r;case 6:i=o.sent;if(!(w.isiOS&&M.publishVideo&&i.getVideoTracks().length&&"ended"===i.getVideoTracks()[0].readyState)){o.next=11;break}i.getTracks().forEach((e=>e.stop()));a=new Error(f);throw a;case 11:return o.abrupt("return",i);case 14:o.prev=14;o.t0=o.catch(3);if(!w.isiOS){o.next=34;break}if(!(b(o.t0)&&w.iOSVersion>=13&&w.iOSVersion<14)){o.next=32;break}o.prev=18;c=A({audio:true,video:false},false);o.next=22;return c;case 22:l=o.sent;l.getTracks().forEach((e=>e.stop()));o.next=29;break;case 26:o.prev=26;o.t1=o.catch(18);s.debug(`${n}: error disposing audio track`,o.t1);case 29:throw new Error(p);case 32:if(!(o.t0.name===h.HARDWARE_UNAVAILABLE)){o.next=34;break}throw new Error(f);case 34:throw o.t0;case 35:o.prev=35;setTimeout((()=>{r.off("accessDialogOpened",e);r.off("accessDialogClosed",t)}));return o.finish(35);case 38:case"end":return o.stop()}}),_callee,null,[[3,14,35,38],[18,26]])})));return function tryGetUserMedia(){return r.apply(this||_global3,arguments)}}();y.next=35;return g(_,((e,t)=>{const n=[f,p];return!(!n.includes(e.message)||1!==t||l())&&1e3}))();case 35:a=y.sent;if(!l()){y.next=39;break}a.getTracks().forEach((e=>{e.stop()}));throw v(h.CANCEL,new Error(C));case 39:x&&a.addTrack(d.audioSource);R&&a.addTrack(d.videoSource);return y.abrupt("return",a);case 42:case"end":return y.stop()}}),_callee2)})));return L}}},function(e,t,n){const r=n(288),o=r.isMediaStreamTrack;const i=n(36);const a=n(2);const normaliseOptions=(e,t,n)=>{const r=e&&"object"===typeof e?i(e):{};false===r.audioSource&&(r.audioSource=null);false===r.videoSource&&(r.videoSource=null);if(void 0!==r.minVideoBitrate&&!("number"===typeof r.minVideoBitrate&&r.minVideoBitrate>0)){n.warn(`${t}: Invalid minVideoBitrate in publisher properties. minVideoBitrate must be a positive number`);delete r.minVideoBitrate}
8005if(void 0!==r.audioBitrate&&!(r.audioBitrate>=6e3&&r.audioBitrate<=51e4)){n.warn(`${t}: Invalid audioBitrate in publisher properties. audioBitrate must be a number between 6000 and 510000 bits per second`);delete r.audioBitrate}if("Firefox"===a.name&&a.version<49){const e="Firefox 48 and below";if(o(r.audioSource)){r.audioSource=null;n.warn(`${t}: Cannot use custom tracks with ${e}. Setting audioSource to null`)}if(o(r.videoSource)){r.videoSource=null;n.warn(`${t}: Cannot use custom tracks with ${e}. Setting videoSource to null`)}}return r};t.normaliseOptions=normaliseOptions},function(e,t,n){const r=n(2),o=r.name,i=r.version;const a=n(257);e.exports=function usingOptionalMandatoryStyleFactory(e){let t=void 0===e?{}:e,n=t.navigator,r=void 0===n?window.navigator:n;return function usingOptionalMandatoryStyle(e){return e&&!a||!(r.mediaDevices&&r.mediaDevices.getUserMedia)||"Chrome"===o&&i<61}}},function(e,t,n){e.exports=function getUserMediaFactory(e){void 0===e&&(e={});["processPubOptions"].forEach((t=>{if(!e[t])throw new Error(`${t} dependency must be injected into OT.getUserMedia`)}));const t=e.logging||n(1)("getUserMedia");const r=e,o=r.processPubOptions;
8006/**
8007        * Gets a MediaStream object that uses a microphone and camera as the audio and video source.
8008        * This method returns a promise that is resolved when the user has granted permission to
8009        * use the camera or microphone (or both) and the MediaStream object is available. The
8010        * promise is rejected if there is an error in getting the media or if the end user denies
8011        * access to the camera or microphone.
8012        * <p>
8013        * You can use this method to get MediaStreamTrack objects to pass into the
8014        * <code>audioSource</code> and <code>videoSource</code> options of the
8015        * <a href="OT.html#initPublisher">OT.initPublisher()</a> method. For example, call this method
8016        * to get a MediaStream that uses the microphone and camera as the audio and video sources. Then
8017        * you can call <code>getVideoTracks()[0]</code> on the MediaStream object to get a video
8018        * MediaStreamTrack object for the camera's video. You can then add the video MediaStreamTrack
8019        * as a source for an HTML Video element, draw that Video element into an HTML Canvas element, and
8020        * apply video filters or effects to the Canvas. Then you can call the <code>captureStream()</code>
8021        * method of the HTMLCanvasElement object to get a MediaStream object and call
8022        * <code>getVideoTracks()[0]</code> on the MediaStream object to get a video MediaStreamTrack
8023        * object (with the video filters or effects applied). Finally, you can use the video
8024        * MediaStreamTrack object as the <code>videoSource</code> property of the options you pass
8025        * into <code>OT.initPublisher()</code>. The OpenTok Publisher will use the
8026        * video track (with the filters and effects applied) as the video source.
8027        * </p>
8028        *
8029        * @param {Object} options <p>(optional) Defines settings for the MediaStream object.
8030        * The options are the same as those defined for the
8031        * <a href="OT.html#initPublisher">OT.initPublisher()</a> method. However, only the following
8032        * properties apply for <code>OT.getUserMedia()</code>:
8033        * </p>
8034        * <p>
8035        * <ul>
8036        *   <li><code>audioSource</code></li>
8037        *   <li><code>autoGainControl</code></li>
8038        *   <li><code>disableAudioProcessing</code></li>
8039        *   <li><code>echoCancellation</code></li>
8040        *   <li><code>enableStereo</code></li>
8041        *   <li><code>facingMode</code></li>
8042        *   <li><code>frameRate</code></li>
8043        *   <li><code>maxResolution</code></li>
8044        *   <li><code>noiseSuppression</code></li>
8045        *   <li><code>resolution</code></li>
8046        *   <li><code>videoSource</code></li>
8047        * </ul>
8048        * </p>
8049        *
8050        * @return {Promise} A promise that is resolved when the user has granted permission to
8051        * use the camera or microphone (or both) and the MediaStream object is available. The
8052        * promise is rejected if there is an error in getting the media, if the end user denies
8053        * access to the camera or microphone, or if the method is called on Internet Explorer.
8054        *
8055        * @see The options (especially <code>audioSource</code> and <code>videoSource</code>) of the
8056        * <a href="OT.html#initPublisher">OT.initPublisher()</a> method
8057        *
8058        * @method OT.getUserMedia
8059        * @memberof OT
8060        */const i=function getUserMedia(e){void 0===e&&(e={});const n=o(e,"OT.getUserMedia",(()=>false));return n.getUserMedia().catch((e=>{t.error(`OT.getUserMedia failed to getUserMedia: ${e}`);throw e}))};return i}},function(e,t,n){e.exports=function destroyObj(e,t){const throwErr=(t,n)=>()=>{throw new Error(`Cannot ${t} ${n}, ${e} is destroyed`)};Object.keys(t).forEach((e=>{"function"===typeof t[e]?t[e]=throwErr("call",e):Object.defineProperty(t,e,{get:throwErr("get",e),set:throwErr("set",e)})}))}},function(e,t,n){e.exports=e=>{if("srcObject"in e)return;const t=window&&window.URL;
8060"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(e,"srcObject",{get(){return(this||_global3)._srcObject},set(e){const n=this||_global3;(this||_global3)._srcObject=e;(this||_global3).src&&t.revokeObjectURL((this||_global3).src);if(e){(this||_global3).src=t.createObjectURL(e);e.addEventListener("addtrack",(()=>{n.src&&t.revokeObjectURL(n.src);n.src=t.createObjectURL(e)}));e.addEventListener("removetrack",(()=>{n.src&&t.revokeObjectURL(n.src);n.src=t.createObjectURL(e)}));return(this||_global3)._srcObject}(this||_global3).src=""}})}},function(e,t,n){const isDomElement=e=>!(!e||"function"!==typeof e.getBoundingClientRect);const isInViewPort=e=>{const t=e.getBoundingClientRect();const n=window.innerHeight||document.documentElement.clientHeight;const r=window.innerWidth||document.documentElement.clientWidth;const o=t.top<=n&&t.top+t.height>=0;const i=t.left<=r&&t.left+t.width>=0;return o&&i};const isVisible=e=>{const isVisibilityHidden=e=>!(!e.style||"hidden"!==e.style.visibility)||!!e.parentNode&&isVisibilityHidden(e.parentNode);return null!==e.offsetParent&&!isVisibilityHidden(e)};e.exports=e=>isDomElement(e)&&isInViewPort(e)&&isVisible(e)},function(e,t,n){const r=n(104);const o=n(5);const i={0:"rotate(0deg)",270:"rotate(90deg)",90:"rotate(-90deg)",180:"rotate(180deg)"};e.exports=function canBeOrientatedMixin(e,t,n){let a=n;r(e,{isRotated:{get(){return this.orientation()&&(270===this.orientation().videoOrientation||90===this.orientation().videoOrientation)}},orientation:{get(){return a},set(n){a=n;const r=i[n.videoOrientation]||i.ROTATED_NORMAL;switch(o.env.name){case"Chrome":case"Safari":t().style.webkitTransform=r;break;default:t().style.transform=r}e.trigger("orientationChanged",a)}},audioChannelType:{get(){return"mozAudioChannelType"in(this||_global3).domElement?(this||_global3).domElement.mozAudioChannelType:"unknown"},set(e){"mozAudioChannelType"in(this||_global3).domElement&&((this||_global3).domElement.mozAudioChannelType=e)}}})}},function(e,t,n){e.exports=function listenForTracksEndedFactory(){function isEveryTrackEnded(e){return e.getTracks().every((e=>"ended"===e.readyState))}return function listenForTracksEnded(e,t,n){const r=[];function singleTrackEndedHandler(o){setTimeout((()=>{if(r.length)if(isEveryTrackEnded(e)){removeAllTrackListeners();"function"===typeof t&&t()}else{const e=o.target;removeTrackListener(e);"function"===typeof n&&n(e)}}),100)}function removeTrackListener(e){e.removeEventListener&&e.removeEventListener("ended",singleTrackEndedHandler);e.onended===singleTrackEndedHandler&&(e.onended=null);const t=r.indexOf(e);t>=0&&r.splice(t,1)}function removeAllTrackListeners(){r.slice().forEach(removeTrackListener)}function addTrackListeners(){e.getTracks().forEach((e=>{r.push(e);e.onended=singleTrackEndedHandler;e.addEventListener&&e.addEventListener("ended",singleTrackEndedHandler)}))}addTrackListeners();return{stop:removeAllTrackListeners,refresh:()=>{removeAllTrackListeners();addTrackListeners()}}}}},function(e,t,n){var r=n(63),o=n(99),i=n(34);
8061/**
8062       * Creates an object with the same keys as `object` and values generated
8063       * by running each own enumerable string keyed property of `object` thru
8064       * `iteratee`. The iteratee is invoked with three arguments:
8065       * (value, key, object).
8066       *
8067       * @static
8068       * @memberOf _
8069       * @since 2.4.0
8070       * @category Object
8071       * @param {Object} object The object to iterate over.
8072       * @param {Function} [iteratee=_.identity] The function invoked per iteration.
8073       * @returns {Object} Returns the new mapped object.
8074       * @see _.mapKeys
8075       * @example
8076       *
8077       * var users = {
8078       *   'fred':    { 'user': 'fred',    'age': 40 },
8079       *   'pebbles': { 'user': 'pebbles', 'age': 1 }
8080       * };
8081       *
8082       * _.mapValues(users, function(o) { return o.age; });
8083       * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
8084       *
8085       * // The `_.property` iteratee shorthand.
8086       * _.mapValues(users, 'age');
8087       * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
8088       */function mapValues(e,t){var n={};t=i(t,3);o(e,(function(e,o,i){r(n,o,t(e,o,i))}));return n}
8088e.exports=mapValues},function(e,t,n){
8089/*
8090       * Installs a watcher that will calls the given callback if the audio acquisition seems to not
8091       * work porperly.
8092       *
8093       * It waits 3 seconds and poll getStats to find any sign of audio bytes sent. If it can't find any
8094       * it signals the anomaly by executing the given function.
8095       *
8096       * @param {function(cb: function(DOMError, Array<RTCStats>))} getStats
8097       *    the function to call to get the stats
8098       * @param {function} warningCb to be called when a potential problem is detected
8099       * @returns {function} cancel the watch
8100       */
8101e.exports=function watchAudioAcquisition(e,t){const n=setTimeout((()=>{e(((e,n)=>{if(!e)for(let e=0;e<n.length;e+=1){const r=n[e];-1===r.id.indexOf("_send")||"ssrc"!==r.type||"audio"!==r.kind&&"audio"!==r.mediaType||0!==parseInt(r.bytesSent,10)||t()}}))}),3e3);return function cancel(){clearTimeout(n)}}},function(e,t,n){
8102/*
8103       * Installs a watcher that will call the given callback if the audio from a subscriber is
8104       arriving, but the output is having issues.
8105       *
8106       * It polls getStats every 500 ms to find
8107       * 1) any sign of audio bytes received, but no change in audioLevel, and totalSamplesReceived or
8108       * 2) any sign of audio bytes received, but audioLevel is 0, and totalSamplesReceived is increasing
8109       * If it finds the issue,
8110       * it signals the anomaly by executing the given function.
8111       *
8112       * @param {function(cb: function(DOMError, Array<RTCStats>))} getStats
8113       *    the function to call to get the stats
8114       * @param {function} warningCb to be called when a potential problem is detected
8115       * @param {function} disableAudioLevelStuckAt0 if true, it won't verify audioLevelStuckAt0 scenario
8116       * @returns {function} cancel the watch
8117       */
8118const r=3e3;e.exports=function watchSubscriberAudio(e,t,n){void 0===n&&(n=false);let o=null;let i=0;let a=null;let s=n;const isInboundAudioRTPStream=e=>"inbound-rtp"===e.type&&"audio"===(e.kind||e.mediaType);const isInboundAudioReceiver=e=>e.id===a&&"track"===e.type&&"audio"===(e.kind||e.mediaType);const isAudioLevelStuck=(e,t)=>e===o&&t===i;const isAudioLevelStuckAt0=(e,t)=>!s&&0===e&&0===o&&t>i;const initAudioLevelStuckAt0Timer=()=>{setTimeout((()=>{s=true}),r)};const c=setInterval((()=>{e(((e,n)=>{if(e)return;const r=n.find(isInboundAudioRTPStream)||{};a=r.trackId;const s=n.find(isInboundAudioReceiver);if(s){const e=s.audioLevel,n=s.totalSamplesReceived;if(void 0===e)return;if(isAudioLevelStuck(e,n)){clearInterval(c);t("audioLevelStuck")}else if(isAudioLevelStuckAt0(e,n)){clearInterval(c);t("audioLevelStuckAt0")}o=e;i=n}}))}),500);n||initAudioLevelStuckAt0Timer();return{stop:()=>{clearInterval(c)}}}},function(e,t,n){(function(t){const r=n(27);const o=new r;e.exports=function reportIssueFactory(e){void 0===e&&(e={})
8119/** @type defaultAnalytics */;const r=e.analytics||o;const i=e.errors||n(4);const a=e.ExceptionCodes||n(8);const s=e.otError||n(11)();const c=e.sessionObjects||n(20);const l=e.uuid||n(19);
8120/**
8121          * Report that your app experienced an issue. You can use the issue ID with
8122          * <a href="http://tokbox.com/developer/tools/Inspector">Inspector</a> or when discussing
8123          * an issue with the TokBox support team.
8124          *
8125          * @param completionHandler {Function} A function that is called when the call to this method
8126          * succeeds or fails. This function has two parameters. The first parameter is an
8127          * <a href="Error.html">Error</a> object that is set when the call to the
8128          * <code>reportIssue()</code> method fails (for example, if the client is not connected to the
8129          * network) or <code>null</code> when the call to the <code>reportIssue()</code> method succeeds.
8130          * The second parameter is set to the report ID (a unique string) when the call succeeds.
8131          *
8132          * @method OT.reportIssue
8133          * @memberof OT
8134          */return function reportIssue(e){void 0===e&&(e=()=>{});const n=l();function onDone(t){t?e(s(i.REPORT_ISSUE_FAILED,new Error("Error calling OT.reportIssue(). Check the client's network connection."),a.REPORT_ISSUE_ERROR)):e(null,n)}0===c.sessions.length()?r.logEvent({action:"ReportIssue",variation:"Event",payload:{reportIssueId:n}},null,onDone):t.all(c.sessions.map((e=>e.reportIssue({id:n})))).then((()=>onDone()),(e=>onDone(e)))}}}).call(this||_global3,n(0))},function(e,t,n){e.exports=e=>{let t=e.window;let n=false;try{const e=Object.defineProperty({},"passive",{get(){n=true}});t.addEventListener("testPassive",null,e);t.removeEventListener("testPassive",null,e)}catch(e){}return n}},function(e,t,n){const r=/^[0-9]+(\.[0-9]+)*$/;
8135/**
8136       * versionGreaterThan - Returns true if version1 is greater than version2
8137       *
8138       * @param {String} version1 The version to compare from
8139       * @param {String} version2 The version to compare to
8140       *
8141       */e.exports=function versionGreaterThan(e,t){if(!r.test(e)||!r.test(t))throw new Error("could not recognize version");const n=String(e).split(".").map(Number);const o=String(t).split(".").map(Number);if(n.length!==o.length)throw new Error("versions must be same length");const i=n.length;for(let e=0;e<i;e+=1)if(n[e]!==o[e])return n[e]>o[e];if(e!==t)throw new Error("versions should be equal");return false}}
8141,function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});var r=function(){function defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;"value"in r&&(r.writable=true);Object.defineProperty(e,r.key,r)}}return function(e,t,n){t&&defineProperties(e.prototype,t);n&&defineProperties(e,n);return e}}();var o=n(298);var i=_interopRequireDefault(o);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function noop(){};var s=function(){function Cancellation(){_classCallCheck(this||_global3,Cancellation);(this||_global3).internalIsCanceled=false;(this||_global3).listeners=[]}r(Cancellation,[{key:"isCanceled",value:function isCanceled(){return(this||_global3).internalIsCanceled}},{key:"cancel",value:function cancel(){if(!(this||_global3).internalIsCanceled){(this||_global3).internalIsCanceled=true;(this||_global3).listeners.forEach((function(e){return e()}));(this||_global3).listeners=null}}},{key:"throwIfCanceled",value:function throwIfCanceled(){if((this||_global3).internalIsCanceled)throw new i.default("Operation has been canceled.")}
8142/**
8143           * Adds a listener to be notified when cancellation is requested.
8144           *
8145           * @param {Function} listener The function to be called when cancellation is requested.
8146           * @returns {Function} A function that, when called, removes the listener.
8147           */},{key:"onCancel",value:function onCancel(e){var t=this||_global3;if((this||_global3).internalIsCanceled)return a;(this||_global3).listeners.push(e);return function(){if(t.listeners){var n=t.listeners.indexOf(e);-1!==n&&t.listeners.splice(n,1)}}}
8148/**
8149           * Creates a child `Cancellation` object.
8150           *
8151           * @returns {Cancellation}
8152           */},{key:"fork",value:function fork(){if((this||_global3).internalIsCanceled)return Cancellation.CANCELED;var e=new Cancellation;this.onCancel((function(){return e.cancel()}));return e}}]);return Cancellation}();t.default=s;s.CANCELED=new s;s.CANCELED.internalIsCanceled=true},function(e,t,n){(function(t){const r=n(62);const o=n(299).default;const i=n(153);n(107)();
8153/**
8154         * Returns a Promise that will resolve when the video resolution is greater than
8155         * 2 in either dimension, or a timeout occurs.
8156         *
8157         * @param {typeVideoElementFacade} videoElementFacade
8158         * @param {Number} timeoutMs
8159         *
8160         * @returns Promise<Boolean> true if resolution succeeded, false otherwise
8161         */function waitForCorrectResolution(e,n){const a=r(e);const s=new t((t=>{const checkResolution=()=>{(e.videoWidth()>2||e.videoHeight()>2)&&t(true)};a.on("videoDimensionsChanged",checkResolution);checkResolution()}));return o(i(s,n,(()=>false)),(()=>a.removeAll()))}e.exports=waitForCorrectResolution}).call(this||_global3,n(0))},function(e,t,n){(function(t){const r=n(62);const o=n(299).default;const i=n(153);n(107)();
8162/**
8163         * Wait for the video to be playing
8164         *
8165         * @param {typeVideoElementFacade} videoElementFacade
8166         * @param {Number} maxWaitTime
8167         *
8168         * @returns Promise<Boolean> true if we think the video is playing, false if we timeout
8169         */function waitForVideoToBePlaying(e,n){void 0===n&&(n=5e3);const a=r(e);const s=new t((e=>{a.on("timeupdate",e);a.on("loadedmetadata",e)}));return o(i(s,n,(()=>false)),(()=>a.removeAll()))}e.exports=waitForVideoToBePlaying}).call(this||_global3,n(0))},function(e,t,n){const r=n(1)("WidgetView:fixMini");const o=128;const i=128;const a=64;const s=64;e.exports=function fixMini(
8170/** @type {HTMLElement} */
8171e){const t=e.clientWidth,n=e.clientHeight;e.classList.remove("OT_micro");e.classList.remove("OT_mini");if(t<a||n<s){e.classList.add("OT_micro");r.debug("OT_micro class added",{clientWidth:t,clientHeight:n,microWidth:a,microHeight:s})}if(t<o||n<i){e.classList.add("OT_mini");r.debug("OT_mini class added",{clientWidth:t,clientHeight:n,miniWidth:o,miniHeight:i})}}},function(e,t,n){const r=n(19);e.exports=function getOrCreateContainer(e,t){
8172/** @type {HTMLElement} */
8173let n;let o;if(e&&e.nodeName){n=e;n.getAttribute("id")&&0!==n.getAttribute("id").length||n.setAttribute("id",`OT_${r()}`);o=n.getAttribute("id")}else if(e){n=document.getElementById(e);n&&(o=e)}o||(o=`OT_${r().replace(/-/g,"_")}`);
8173if(!n){n=document.createElement("div");n.id=o;n.setAttribute("id",o);n.style.backgroundColor="#000000";document.body.appendChild(n);return n}const i=document.createElement("div");i.id=`OT_${r()}`;switch(t){case"append":n.appendChild(i);return i;case"before":n.parentNode.insertBefore(i,n);return i;case"after":n.parentNode.insertBefore(i,n.nextSibling);return i;case"replace":default:while(n.firstChild)n.removeChild(n.firstChild);return n}}},function(e,t,n){e.exports=function ensureCSSUnit(e,t){void 0===t&&(t="px");return String(parseFloat(e,10))===String(e).trim()?`${String(e).trim()}${t}`:e}},function(e,t,n){(function(t){const r=n(74);e.exports=function waitUntil(e,n){let o=void 0===n?{}:n,i=o.frequency,a=void 0===i?60:i,s=o.timeout,c=void 0===s?2e3:s;return new t(((t,n)=>{let o;const i=new r((()=>{function tryPredicate(){try{return e()}catch(e){return false}}if(tryPredicate()){clearTimeout(o);i.stop();t()}}),a);o=setTimeout((()=>{i.stop();n(new Error("TIMEOUT"))}),c);i.start()}))}}).call(this||_global3,n(0))},function(e,t,n){const r=n(11)();const o=n(4);const i=n(8);e.exports=e=>"404"===String(e.code)?r(o.STREAM_NOT_FOUND,new Error("stream not found"),i.UNABLE_TO_SUBSCRIBE):"409"===String(e.code)&&"streamLimitExceeded"===e.message?r(o.STREAM_LIMIT_EXCEEDED,new Error("The limit for concurrent streams in the session has been reached"),i.STREAM_LIMIT_EXCEEDED):r(o.UNABLE_TO_SUBSCRIBE,new Error(`subscriberCreate failed with unexpected code ${e.code}: ${e.message}`),i.UNEXPECTED_SERVER_RESPONSE)},function(e,t,n){const r=n(26);const o=n(48);const i=n(103);const a=n(22)();e.exports=e=>{let t=e.subscriber,n=e.audioLevelSampler;let s=0;let c=0;const l=new i((()=>{const e=t.listenerCount(r.AUDIO_LEVEL_UPDATED);const shouldStopWatchingAudio=()=>o()-c>1e4&&0===e;if(shouldStopWatchingAudio())l.stop();else{s=n.sample();e>0&&t.dispatchEvent(new a.AudioLevelUpdatedEvent(s))}}));Object.defineProperty(t,"loudness",{get(){l.start();c=o();return s},set(){throw new TypeError("Cannot set readonly property loudness")},configurable:true});t.listenerCount(r.AUDIO_LEVEL_UPDATED)&&l.start();t.on("audioLevelUpdated:added",(()=>{l.start()}));t.once(r.SUBSCRIBER_DESTROYED,(()=>{l.stop()}));return{destroy(){n.destroy();l.stop()}}}},function(e,t,n){const r=n(253);const o=n(145);const i=n(656);const a=n(301);const s=n(302);const c=n(158)();const l=n(657);const u=n(1)("Subscriber");e.exports=function(e,t){void 0===t&&(t={});const n=t.hasGetSynchronizationSupport;if(e){if(i({hasGetSynchronizationSupport:n}))return new r(e.getSynchronizationSources);if(a())return new r(e.getStats);if(s()){let e;try{e=t.audioContext||c()}catch(e){u.warn("Failed to get AudioContext()",e)}if(l(e))return new o(e)}}}},function(e,t,n){const r=n(2);const hasGetSynchronizationSupport=()=>window.RTCRtpReceiver&&"getSynchronizationSources"in window.RTCRtpReceiver.prototype;e.exports=function(e){void 0===e&&(e={});const t=e.hasGetSynchronizationSupport||hasGetSynchronizationSupport;return t()&&!r.isFirefox}},function(e,t,n){e.exports=e=>(void 0!==typeof window?window:_global3).AudioContext&&e instanceof(void 0!==typeof window?window:_global3).AudioContext||(void 0!==typeof window?window:_global3).webkitAudioContext&&e instanceof(void 0!==typeof window?window:_global3).webkitAudioContext},function(e,t,n){const r=n(35);const o=n(5);e.exports=function VideoDisabledIndicator(e){let t=false;let n=false;const i=function(e){const r=["auto","on"].indexOf(this.getDisplayMode())>-1;o.removeClass(e,"OT_video-disabled OT_video-disabled-warning OT_active");if(r){t?o.addClass(e,"OT_video-disabled"):n&&o.addClass(e,"OT_video-disabled-warning");o.addClass(e,"OT_active")}}.bind(this||_global3);(this||_global3).disableVideo=function(e){t=e;true===e&&(n=false);i((this||_global3).domElement)};(this||_global3).setWarning=function(e){n=e;i((this||_global3).domElement)};r(this||_global3,{mode:e.mode||"auto",nodeName:"div",htmlAttributes:{className:"OT_video-disabled-indicator"}});const a=(this||_global3).setDisplayMode.bind(this||_global3);(this||_global3).setDisplayMode=function(e){a(e);i((this||_global3).domElement)}}},function(e,t,n){const r=n(35);const o=n(5);e.exports=function AudioBlockedIndicator(e){let t=false;const updateClasses=e=>{const n=["auto","on"].indexOf(this.getDisplayMode())>-1;o.removeClass(e,["OT_audio-blocked","OT_active"].join(" "));if(n){t&&o.addClass(e,"OT_audio-blocked");o.addClass(e,"OT_active")}};(this||_global3).setAudioBlocked=e=>{t=e;updateClasses((this||_global3).domElement)};r(this||_global3,{mode:e.mode||"auto",nodeName:"div",htmlAttributes:{className:"OT_audio-blocked-indicator"}});const n=(this||_global3).setDisplayMode.bind(this||_global3);(this||_global3).setDisplayMode=e=>{n(e);updateClasses((this||_global3).domElement)}}},function(e,t,n){const r=n(35);const o=n(5);e.exports=function VideoUnsupportedIndicator(e){let t=false;const updateClasses=e=>{const n=["auto","on"].indexOf(this.getDisplayMode())>-1;o.removeClass(e,["OT_active"].join(" "));n&&t&&o.addClass(e,"OT_active")};(this||_global3).setVideoUnsupported=e=>{t=e;updateClasses((this||_global3).domElement)};r(this||_global3,{mode:e.mode||"auto",nodeName:"div",htmlAttributes:{className:"OT_video-unsupported"},htmlContent:'<div class="OT_video-unsupported-bar"></div><div class="OT_video-unsupported-img"></div><span class="OT_video-unsupported-text">Video format not supported</span>'});const n=(this||_global3).setDisplayMode.bind(this||_global3);(this||_global3).setDisplayMode=e=>{n(e);updateClasses((this||_global3).domElement)}}},function(e,t,n){const r=n(47);const o=n(7);const i=n(61);const a=n(75);const s=n(157);const c=function watchFrameRate(e,t){void 0===t&&(t=5e3);let n;let c=false;const l={};const u=function getVideoInboundStat(e){void 0===e&&(e=[]);return i(e,(e=>a.isVideoInboundRtpStat(e)))};const query=()=>{c||e(((e,i)=>{if(!c){if(!e){const e=u(i);e?o(l,r(e,["timestamp","framesDecoded"])):l.timestamp||o(l,{timestamp:Date.now(),framesDecoded:0})}n=setTimeout(query,t)}}))};query();return{getFrameRateFromStat(e){return s({currentStatFrames:e.framesDecoded,currentTimestamp:e.timestamp,prevStatFrames:l.framesDecoded,prevTimestamp:l.timestamp})},destroy(){c=true;if(n){clearTimeout(n);n=null}}}};e.exports=c},function(e,t,n){e.exports=e=>{let t=e.connectivityState,n=e.onWarning,r=e.onTimeout,o=e.warningMs,i=e.timeoutMs;const a=[];const cancelBindGuards=()=>{a.forEach((e=>clearTimeout(e)))};t.observe({onEnterConnecting(){a.push(setTimeout(n,o),setTimeout(r,i))},onEnterConnected:cancelBindGuards,onEnterDisconnected:cancelBindGuards})}},function(e,t,n){const r=n(305);e.exports=e=>{let t=e.onInvalidTransition;return new r({init:"disconnected",transitions:[{name:"beginConnect",from:"disconnected",to:"connecting"},{name:"connect",from:"connecting",to:"connected"},{name:"fail",from:["connecting","connected"],to:"disconnected"},{name:"cancel",from:["connecting","connected"],to:"disconnected"},{name:"disconnect",from:["connecting","connected"],to:"disconnected"}],methods:{onInvalidTransition:t}})}},function(e,t,n){const r=n(74);e.exports=e=>{let t=e.connectivityState,n=e.logAttempt;const o=new r(n,.2,6);t.observe({onEnterConnecting(){o.start()},onEnterDisconnected(){o.stop()},onEnterConnected(){o.stop()}})}},function(e,t,n){var r=n(666),o=n(259);
8174/**
8175       * Converts `string` to
8176       * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
8177       *
8178       * @static
8179       * @memberOf _
8180       * @since 3.1.0
8181       * @category String
8182       * @param {string} [string=''] The string to convert.
8183       * @returns {string} Returns the start cased string.
8184       * @example
8185       *
8186       * _.startCase('--foo-bar--');
8187       * // => 'Foo Bar'
8188       *
8189       * _.startCase('fooBar');
8190       * // => 'Foo Bar'
8191       *
8192       * _.startCase('__FOO_BAR__');
8193       * // => 'FOO BAR'
8194       */var i=r((function(e,t,n){return e+(n?" ":"")+o(t)}));e.exports=i},function(e,t,n){var r=n(667),o=n(668),i=n(671);var a="['’]";var s=RegExp(a,"g");
8195/**
8196       * Creates a function like `_.camelCase`.
8197       *
8198       * @private
8199       * @param {Function}
8199 callback The function to combine each word.
8200       * @returns {Function} Returns the new compounder function.
8201       */function createCompounder(e){return function(t){return r(i(o(t).replace(s,"")),e,"")}}e.exports=createCompounder},function(e,t){
8202/**
8203       * A specialized version of `_.reduce` for arrays without support for
8204       * iteratee shorthands.
8205       *
8206       * @private
8207       * @param {Array} [array] The array to iterate over.
8208       * @param {Function} iteratee The function invoked per iteration.
8209       * @param {*} [accumulator] The initial value.
8210       * @param {boolean} [initAccum] Specify using the first element of `array` as
8211       *  the initial value.
8212       * @returns {*} Returns the accumulated value.
8213       */
8214function arrayReduce(e,t,n,r){var o=-1,i=null==e?0:e.length;r&&i&&(n=e[++o]);while(++o<i)n=t(n,e[o],o,e);return n}e.exports=arrayReduce},function(e,t,n){var r=n(669),o=n(58);var i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;var a="\\u0300-\\u036f",s="\\ufe20-\\ufe2f",c="\\u20d0-\\u20ff",l=a+s+c;var u="["+l+"]";var d=RegExp(u,"g");
8215/**
8216       * Deburrs `string` by converting
8217       * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
8218       * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
8219       * letters to basic Latin letters and removing
8220       * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
8221       *
8222       * @static
8223       * @memberOf _
8224       * @since 3.0.0
8225       * @category String
8226       * @param {string} [string=''] The string to deburr.
8227       * @returns {string} Returns the deburred string.
8228       * @example
8229       *
8230       * _.deburr('déjà vu');
8231       * // => 'deja vu'
8232       */function deburr(e){e=o(e);return e&&e.replace(i,r).replace(d,"")}e.exports=deburr},function(e,t,n){var r=n(670);var o={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"};
8233/**
8234       * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
8235       * letters to basic Latin letters.
8236       *
8237       * @private
8238       * @param {string} letter The matched letter to deburr.
8239       * @returns {string} Returns the deburred letter.
8240       */var i=r(o);e.exports=i},function(e,t){
8241/**
8242       * The base implementation of `_.propertyOf` without support for deep paths.
8243       *
8244       * @private
8245       * @param {Object} object The object to query.
8246       * @returns {Function} Returns the new accessor function.
8247       */
8248function basePropertyOf(e){return function(t){return null==e?void 0:e[t]}}
8248e.exports=basePropertyOf},function(e,t,n){var r=n(672),o=n(673),i=n(58),a=n(674);
8249/**
8250       * Splits `string` into an array of its words.
8251       *
8252       * @static
8253       * @memberOf _
8254       * @since 3.0.0
8255       * @category String
8256       * @param {string} [string=''] The string to inspect.
8257       * @param {RegExp|string} [pattern] The pattern to match words.
8258       * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8259       * @returns {Array} Returns the words of `string`.
8260       * @example
8261       *
8262       * _.words('fred, barney, & pebbles');
8263       * // => ['fred', 'barney', 'pebbles']
8264       *
8265       * _.words('fred, barney, & pebbles', /[^, ]+/g);
8266       * // => ['fred', 'barney', '&', 'pebbles']
8267       */function words(e,t,n){e=i(e);t=n?void 0:t;return void 0===t?o(e)?a(e):r(e):e.match(t)||[]}e.exports=words},function(e,t){var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
8268/**
8269       * Splits an ASCII `string` into an array of its words.
8270       *
8271       * @private
8272       * @param {string} The string to inspect.
8273       * @returns {Array} Returns the words of `string`.
8274       */function asciiWords(e){return e.match(n)||[]}e.exports=asciiWords},function(e,t){var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
8275/**
8276       * Checks if `string` contains a word composed of Unicode symbols.
8277       *
8278       * @private
8279       * @param {string} string The string to inspect.
8280       * @returns {boolean} Returns `true` if a word is found, else `false`.
8281       */function hasUnicodeWord(e){return n.test(e)}e.exports=hasUnicodeWord},function(e,t){var n="\\ud800-\\udfff",r="\\u0300-\\u036f",o="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",a=r+o+i,s="\\u2700-\\u27bf",c="a-z\\xdf-\\xf6\\xf8-\\xff",l="\\xac\\xb1\\xd7\\xf7",u="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",d="\\u2000-\\u206f",f=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="A-Z\\xc0-\\xd6\\xd8-\\xde",g="\\ufe0e\\ufe0f",h=l+u+d+f;var b="['’]",v="["+h+"]",m="["+a+"]",_="\\d+",y="["+s+"]",E="["+c+"]",S="[^"+n+h+_+s+c+p+"]",T="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+T+")",w="[^"+n+"]",O="(?:\\ud83c[\\udde6-\\uddff]){2}",x="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+p+"]",A="\\u200d";var R="(?:"+E+"|"+S+")",k="(?:"+I+"|"+S+")",D="(?:"+b+"(?:d|ll|m|re|s|t|ve))?",N="(?:"+b+"(?:D|LL|M|RE|S|T|VE))?",P=C+"?",M="["+g+"]?",L="(?:"+A+"(?:"+[w,O,x].join("|")+")"+M+P+")*",j="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",U="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",F=M+P+L,V="(?:"+[y,O,x].join("|")+")"+F;var B=RegExp([I+"?"+E+"+"+D+"(?="+[v,I,"$"].join("|")+")",k+"+"+N+"(?="+[v,I+R,"$"].join("|")+")",I+"?"+R+"+"+D,I+"+"+N,U,j,_,V].join("|"),"g");
8282/**
8283       * Splits a Unicode `string` into an array of its words.
8284       *
8285       * @private
8286       * @param {string} The string to inspect.
8287       * @returns {Array} Returns the words of `string`.
8288       */function unicodeWords(e){return e.match(B)||[]}e.exports=unicodeWords},function(e,t,n){e.exports=(e,t)=>{const n=e.getSenders().find((e=>{let t=e.track;return"video"===t.kind}));const r=n.getParameters();
8288r.encodings.forEach((e=>{e.active=t}));n.setParameters(r)}},function(e,t,n){const r=n(47);e.exports=e=>r(e,["audioDeviceId","audioFallbackEnabled","audioSource","channels","classNames","constraints","disableAudioProcessing","echoCancellation","noiseSuppression","autoGainControl","enableRenegotiation","enableStereo","facingMode","fitMode","frameRate","height","insertDefaultUI","insertMode","audioBitrate","maxResolution","minVideoBitrate","mirror","name","publishAudio","publishVideo","resolution","showControls","style","videoContentHint","videoDeviceId","videoDimensions","videoSource","width"])},function(e,t,n){const r=n(26);const o=n(48);const i=n(103);const a=n(22)();e.exports=e=>{let t=e.publisher,n=e.widgetView;let s=0;let c=0;const l=new i((()=>{const e=t.listenerCount(r.AUDIO_LEVEL_UPDATED);const shouldStopWatchingAudio=()=>o()-c>1e4&&0===e;if(shouldStopWatchingAudio()){l.stop();return}const i=n&&n.video();if(i){const n=i.getAudioInputLevel();s=n;e>0&&t.dispatchEvent(new a.AudioLevelUpdatedEvent(n))}}));Object.defineProperty(t,"loudness",{get(){l.start();c=o();return s},set(){throw new TypeError("Cannot set readonly property loudness")}});t.listenerCount(r.AUDIO_LEVEL_UPDATED)&&l.start();t.on("audioLevelUpdated:added",(()=>{l.start()}));t.once(r.PUBLISHER_DESTROYED,(()=>{l.stop()}))}},function(e,t,n){var r=n(3);var o=r(n(12));var i=r(n(13));e.exports=function blockCallsUntilComplete(e){let t=false;return function(){var n=(0,i.default)(o.default.mark((function _callee(){var n,r,i,a=arguments;return o.default.wrap((function _callee$(o){while(1)switch(o.prev=o.next){case 0:if(!t){o.next=2;break}throw new Error("The previous call to this function has not yet completed.");case 2:t=true;o.prev=3;for(n=a.length,r=new Array(n),i=0;i<n;i++)r[i]=a[i];o.next=7;return e.call(this||_global3,...r);case 7:return o.abrupt("return",o.sent);case 8:o.prev=8;t=false;return o.finish(8);case 11:case"end":return o.stop()}}),_callee,this||_global3,[[3,,8,11]])})));function blocker(){return n.apply(this||_global3,arguments)}return blocker}()}},function(e,t,n){const r=n(11)();const o=n(4);e.exports=function createCanvasVideoTrack(e){const t=document.createElement("canvas");if(!t.captureStream)throw r(o.NOT_SUPPORTED,new Error("Your browser does not support HTMLCanvasElement.captureStream()"));t.width=e.width;t.height=e.height;t.getContext("2d").fillRect(0,0,1,1);const n=t.captureStream().getVideoTracks(),i=n[0];i.isCreatedCanvas=true;i.enabled=false;return i}},function(e,t,n){const getDeviceIdFromSettings=e=>e.getSettings&&e.getSettings().deviceId;const getDeviceIdFromConstraints=e=>{let t;e.getConstraints&&e.getConstraints().deviceId&&(t=e.getConstraints().deviceId.exact);return t};const getDeviceIdFromDevicesList=(e,t)=>{let n;if(t&&t.length){const r=t.find((t=>t.label===e.label));r&&(n=r.deviceId)}return n};const getDeviceId=(e,t)=>getDeviceIdFromSettings(e)||getDeviceIdFromConstraints(e)||getDeviceIdFromDevicesList(e,t);e.exports=(e,t)=>{if(!e)return null;const n=e.getVideoTracks(),r=n[0];return r?getDeviceId(r,t):null}},function(e,t,n){const r=n(4);const o=n(8);const i=n(11)();e.exports=e=>{const t=[403,404,409];return t.includes(parseInt(e.code,10))?i(r.STREAM_CREATE_FAILED,new Error(`Failed to create stream in server model: ${e.message}`),o.UNABLE_TO_PUBLISH):i(r.UNEXPECTED_SERVER_RESPONSE,new Error(`Unexpected server response: ${e.message}`),o.UNEXPECTED_SERVER_RESPONSE)}},function(e,t,n){const isNullOrFalse=e=>null===e||false===e;e.exports=isNullOrFalse},function(e,t,n){e.exports=e=>{var t;const n=!!(e&&(null==(t=e.videoSource)?void 0:t.canvas));const r=!!(e&&"videoContentHint"in e);n&&!r&&(e.videoContentHint="detail")}},function(e,t,n){var r=n(685),o=n(99),i=n(34);
8289/**
8290       * This method is like `_.find` except that it returns the key of the first
8291       * element `predicate` returns truthy for instead of the element itself.
8292       *
8293       * @static
8294       * @memberOf _
8295       * @since 1.1.0
8296       * @category Object
8297       * @param {Object} object The object to inspect.
8298       * @param {Function} [predicate=_.identity] The function invoked per iteration.
8299       * @returns {string|undefined} Returns the key of the matched element,
8300       *  else `undefined`.
8301       * @example
8302       *
8303       * var users = {
8304       *   'barney':  { 'age': 36, 'active': true },
8305       *   'fred':    { 'age': 40, 'active': false },
8306       *   'pebbles': { 'age': 1,  'active': true }
8307       * };
8308       *
8309       * _.findKey(users, function(o) { return o.age < 40; });
8310       * // => 'barney' (iteration order is not guaranteed)
8311       *
8312       * // The `_.matches` iteratee shorthand.
8313       * _.findKey(users, { 'age': 1, 'active': true });
8314       * // => 'pebbles'
8315       *
8316       * // The `_.matchesProperty` iteratee shorthand.
8317       * _.findKey(users, ['active', false]);
8318       * // => 'fred'
8319       *
8320       * // The `_.property` iteratee shorthand.
8321       * _.findKey(users, 'active');
8322       * // => 'barney'
8323       */function findKey(e,t){return r(e,i(t,3),o)}e.exports=findKey},function(e,t){
8324/**
8325       * The base implementation of methods like `_.findKey` and `_.findLastKey`,
8326       * without support for iteratee shorthands, which iterates over `collection`
8327       * using `eachFunc`.
8328       *
8329       * @private
8330       * @param {Array|Object} collection The collection to inspect.
8331       * @param {Function} predicate The function invoked per iteration.
8332       * @param {Function} eachFunc The function to iterate over `collection`.
8333       * @returns {*} Returns the found element or its key, else `undefined`.
8334       */
8335function baseFindKey(e,t,n){var r;n(e,(function(e,n,o){if(t(e,n,o)){r=n;return false}}));return r}e.exports=baseFindKey},function(e,t,n){(function(t){const r=n(50);const o=n(73);e.exports=e=>{let n=e.RTCPeerConnection,i=e.env,a=e.stream,s=e.codecFlags;if(i.isLegacyEdge)return true;
8335let c;let l;const cleanup=()=>{try{c.close()}catch(e){}try{l.close()}catch(e){}c=null;l=null};try{const e={iceServers:[]};o()&&(e.sdpSemantics="plan-b");c=new n(e);l=new n(e);c.addStream(a)}catch(e){cleanup();return t.resolve(false)}return c.createOffer().then((e=>{const t={type:e.type,sdp:e.sdp};Object.keys(s).forEach((e=>{s[e]||(t.sdp=r.removeVideoCodec(t.sdp,e))}));return l.setRemoteDescription(t)})).then((()=>true)).catch((()=>false)).then((e=>{cleanup();return e}))}}).call(this||_global3,n(0))},function(e,t,n){const r=n(4),o=r.INVALID_PARAMETER;e.exports=e=>{let t=e.otError;return e=>{if(!e)return;const check=(e,n)=>{if(!e)throw t(o,new Error(`iceConfig invalid: ${n}`))};"includeServers"in e&&check(-1!==["all","custom"].indexOf(e.includeServers),".includeServers must be all or custom");"transportPolicy"in e&&check(-1!==["all","relay"].indexOf(e.transportPolicy),".transportPolicy must be all or relay");check(Array.isArray(e.customServers),".customServers must be an array");e.customServers.forEach((e=>{check(e.urls||!("url"in e),"ice servers need .urls, not .url");check("string"===typeof e.urls||Array.isArray(e.urls),"ice server .urls must be a string or an array");check(!e.username||"string"===typeof e.username,"ice server .username must be a string if present");check(!e.credential||"string"===typeof e.credential,"ice server .credential must be a string if present")}))}}},function(e,t,n){const r=n(8);e.exports=function convertAnvilErrorCode(e){switch(e){case r.AUTHENTICATION_ERROR:case r.INVALID_SESSION_ID:case r.TERMS_OF_SERVICE_FAILURE:case r.UNEXPECTED_SERVER_RESPONSE:return e;case r.ANVIL_EMPTY_RESPONSE_BODY:case r.ANVIL_CONNECT_FAILED:return r.CONNECT_FAILED;case r.ANVIL_BADLY_FORMED_RESPONSE:case r.ANVIL_INVALID_HTTP_STATUS:case r.ANVIL_XDOMAIN_OR_PARSING_ERROR:case r.ANVIL_UNKNOWN_HTTP_ERROR:case r.ANVIL_UNEXPECTED_ERROR_CODE:default:return r.UNEXPECTED_SERVER_RESPONSE}}},function(e,t,n){const r=n(8);const o=n(4);e.exports={NOT_CONNECTED:{code:o.NOT_CONNECTED,message:"Cannot use forceMute functionality. You are not connected to the session.",exceptionCode:r.NOT_CONNECTED},PERMISSION_DENIED:{code:o.PERMISSION_DENIED,message:"This token does not allow forceMute usage. The role must be at least `moderator` to enable this functionality",exceptionCode:r.UNABLE_TO_FORCE_MUTE},INVALID_PARAMETER:{code:o.INVALID_PARAMETER,message:"Invalid Parameter. Check that you have passed valid parameter values into the method call.",exceptionCode:r.INVALID_PARAMETER},NOT_FOUND:{code:o.NOT_FOUND,message:"The stream does not exist."},UNEXPECTED_SERVER_RESPONSE:{code:o.UNEXPECTED_SERVER_RESPONSE,message:"An unexpected error occurred.",exceptionCode:r.UNEXPECTED_SERVER_RESPONSE}}},function(e,t,n){(function(e){var r=n(3);t.__esModule=true;t.default=RaptorSocketFactory;var o=r(n(25));var i=r(n(15));var a=r(n(7));var s=r(n(49));var c=r(n(19));var l=r(n(312));var u=r(n(691));function RaptorSocketFactory(t){void 0===t&&(t={});const r=t.convertRumorError||n(310);const d=t.Dispatcher||n(314);const f=t.ExceptionCodes||n(8);const p=t.hasIceRestartsCapability||n(311);const g=t.hasRenegotiationCapability||n(707);const h=t.logging||n(1)("RaptorSocket");const b=t.Message||n(315);const v=t.OTHelpers||n(5);const m=t.RumorSocket||(0,u.default)();const _=t.Signal||n(316);const y=t.SignalError||n(712);const E=function RaptorSocket(t,n,u,p,g,E,S){var T=this||_global3;void 0===S&&(S=[]);let C,w,O,x,I,A,R,k;const D=["disconnected","connecting","connected","error","disconnecting"];const N=g||new d;const P=v.statable(this||_global3,D,"disconnected");const M=function logAnalyticsEvent(e){e.action&&e.variation||h.debug("Expected action and variation");E.logEvent((0,a.default)({sessionId:w,partnerId:C,p2p:A,messagingServer:R,connectionId:t},e))};const L=function onConnectComplete(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0];P(r?"error":"connected");I(...t)};const onClose=e=>{let t="clientDisconnected";!this.is("disconnecting")&&k&&(t="networkDisconnected");e&&4001===e.code&&(t="networkTimedout");P("disconnected");N.onClose(t)};const onError=e=>{k=true;h.error(e)};const onReconnecting=()=>{N.onReconnecting()};const onReconnected=()=>{M({action:"Reconnect",variation:"Success",retries:(this||_global3)._rumor.reconnectRetriesCount(),messageQueueSize:(this||_global3)._rumor.messageQueueSize(),socketId:(this||_global3).socketId});N.onReconnected()};const onReconnectAttempt=()=>{M({action:"Reconnect",variation:"Attempt",retries:(this||_global3)._rumor.reconnectRetriesCount(),messageQueueSize:(this||_global3)._rumor.messageQueueSize(),socketId:(this||_global3).socketId})};const onReconnectFailure=e=>{"connectionLimitExceeded"===e.message&&(e.code=f.CONNECTION_LIMIT_EXCEEDED);e.reason="ConnectToSession";const t=r(e);M({action:"Reconnect",variation:"Failure",failureReason:e.reason,failureCode:t.code,failureMessage:t.message,messageQueueSize:(this||_global3)._rumor.messageQueueSize(),socketId:(this||_global3).socketId})};Object.defineProperty(this||_global3,"socketId",{get(){return(this||_global3)._rumor.socketID}});
8335(this||_global3).connect=function connect(n,r,o,i){if(!this.is("disconnected","error")){h.warn("Cannot connect the Raptor Socket as it is currently connected. You should disconnect first.");return}P("connecting");C=r.partnerId;w=r.sessionId;A=r.p2pEnabled;R=r.messagingServer;O=n;I=i;x={apiKey:C,sessionId:w};const a=`/v2/partner/${C}/session/${w}`;(this||_global3)._rumor=new RaptorSocket.RumorSocket({messagingURL:u,notifyDisconnectAddress:p,connectionId:t,enableReconnection:r.reconnection});(this||_global3)._rumor.on("close",onClose);(this||_global3)._rumor.on("error",onError);(this||_global3)._rumor.on("reconnecting",onReconnecting);(this||_global3)._rumor.on("reconnectAttempt",onReconnectAttempt);(this||_global3)._rumor.on("reconnectFailure",onReconnectFailure);(this||_global3)._rumor.on("reconnected",onReconnected);(this||_global3)._rumor.on("message",N.dispatch.bind(N));const onStartupError=e=>{L({reason:"WebSocketConnection",code:e.code,message:e.message})};(this||_global3)._rumor.once("error",onStartupError);(this||_global3)._rumor.once("open",(()=>{(this||_global3)._rumor.removeListener("error",onStartupError);h.debug(`connected. Subscribing to ${a} on ${u}`);(this||_global3)._rumor.subscribe([a]);const t=S;const n=(RaptorSocket.hasIceRestartsCapability()||RaptorSocket.hasRenegotiationCapability())&&r.renegotiation;n&&t.push("renegotiation");const i=b.connections.create({apiKey:C,sessionId:w,connectionId:(this||_global3)._rumor.id,connectionEventsSuppressed:o.connectionEventsSuppressed,capabilities:t});const s=new e((e=>{const processConnectionCreated=t=>{if(t.id===(this||_global3)._rumor.id){e(t);g.off("connection#created",processConnectionCreated)}};g.on("connection#created",processConnectionCreated)}));this.publish(i,{"X-TB-TOKEN-AUTH":O},true,((e,t)=>{if(e){"connectionLimitExceeded"===e.message&&(e.code=f.CONNECTION_LIMIT_EXCEEDED);L({reason:"ConnectToSession",code:e.code,message:e.message,socketId:(this||_global3).socketId});return}const n=t&&t.data?JSON.parse(t.data):null;if(n&&(!n.connection||0===n.connection.length)){n.connection=[];Array.isArray(n.stream)&&n.stream.forEach((e=>{let t=e.connection;return n.connection.push(t)}))}const onSessionState=(e,t)=>{e?L({reason:"GetSessionState",code:e.code,message:e.message,socketId:(this||_global3).socketId}):L(void 0,t)};s.then((e=>{n.connection.some((t=>t.id===e.id))||n.connection.unshift(e);const t=(0,c.default)();N.registerCallback(t,onSessionState);N.emit("session#read",n,t)}))}))}))};(this||_global3).disconnect=function(){if(!this.is("disconnected")){P("disconnecting");(this||_global3)._rumor.disconnect()}};(this||_global3).publish=function(e,t,n,r){r=r||function(){};const o=(0,s.default)(r);const i=(0,c.default)();h.debug(`Publish (ID:${i}) ${e}`);if((this||_global3)._rumor.readyState===m.OPEN&&(!(this||_global3)._rumor.reconnecting||n)){N.registerCallback(i,o);(this||_global3)._rumor.publish([p],e,(0,a.default)({},t,{"Content-Type":"application/x-raptor+v2","TRANSACTION-ID":i,"X-TB-FROM-ADDRESS":(this||_global3)._rumor.id}),n,(function(e){e&&o(...arguments)}));return i}{const e=new Error("Not connected.");e.code=500;o(e);h.error("cannot publish until the socket is connected.")}};(this||_global3).send=function(e,t,n,r){void 0===n&&(n=true);void 0===r&&(r=()=>{});T.publish((0,l.default)(e),t,n,r)};(this||_global3).streamCreate=function(e,t,n,r,o,i,a,s){const c={apiKey:C,sessionId:w,streamId:t,name:e,audioFallbackEnabled:n,channels:r,minBitrate:o,maxBitrate:i,sourceStreamId:a};const l=b.streams.create(c);this.publish(l,{},true,((e,n)=>{s(e,t,n)}))};(this||_global3).streamDestroy=function(e,t){this.publish(b.streams.destroy(C,w,e,t),{},true)};(this||_global3).streamChannelUpdate=function(e,t,n){this.publish(b.streamChannels.update(C,w,e,t,n),{},true)};(this||_global3).subscriberCreate=function(e,t,n,r,o){const i={apiKey:C,sessionId:w,streamId:e,subscriberId:t,connectionId:(this||_global3)._rumor.id,channelsToSubscribeTo:n,sourceStreamId:r};this.publish(b.subscribers.create(i),{},true,o)};(this||_global3).subscriberDestroy=function(e,t){this.publish(b.subscribers.destroy(C,w,e,t),{},true)};(this||_global3).subscriberUpdate=function(e,t,n){this.publish(b.subscribers.update(C,w,e,t,n),{},true)};(this||_global3).subscriberChannelUpdate=function(e,t,n,r){this.publish(b.subscriberChannels.update(C,w,e,t,n,r),{},true)};(this||_global3).forceDisconnect=function(e,t){this.publish(b.connections.destroy({apiKey:C,sessionId:w,connectionId:e}),{},true,t)};(this||_global3).forceUnpublish=function(e,t){this.publish(b.streams.destroy(C,w,e),{},true,t)};(this||_global3).forceMuteStream=function(e,t){const n={streamId:e,active:true};this.publish(b.forceMute.update((0,o.default)({},x,n)),{},true,t)};(this||_global3).forceMuteAll=function(e,t,n){const r={excludedStreamIds:e,active:t};this.publish(b.forceMute.update((0,o.default)({},x,r)),{},true,n)};(this||_global3).signal=function(e,t,n){const r=new _(w,(this||_global3)._rumor.id,e||{});r.valid?this.publish(r.toRaptorMessage(),{},r.retryAfterReconnect,(e=>{let o,a,s;const c=[400,403,404,413,500];if(e){const t=parseInt(e.code,10);if(c.includes(t)){a=t;s=e.message}else{a=f.UNEXPECTED_SERVER_RESPONSE;s="Unexpected server response. Try this operation again later."}o=new y(a,s)}else{const e=r.data?typeof r.data:null;n("signal","send",{type:e})}t&&(0,i.default)(t)&&t(o,r.toHash())})):t&&(0,i.default)(t)&&t(new y(r.error.code,r.error.reason),r.toHash())};(this||_global3).id=function(){return(this||_global3)._rumor&&(this||_global3)._rumor.id}};E.hasIceRestartsCapability=p;E.hasRenegotiationCapability=g;E.RumorSocket=m;return E}}).call(this||_global3,n(0))},function(e,t,n){var r=n(3);t.__esModule=true;t.default=defaultRumorSocket;var o=r(n(41));var i=r(n(692));var a=r(n(1));var s=r(n(693));var c=r(n(698));var l=r(n(703));function defaultRumorSocket(e){let t=void 0===e?{}:e,n=t.WebSocket,r=void 0===n?l.default:n;const u=(0,i.default)();const d=(0,s.default)({EventEmitter:o.default,WebSocket:r,logging:a.default,allocateId:u});const f=(0,c.default)({EventEmitter:o.default,ReconnectableSocket:d,logging:a.default,allocateId:u});return f}},function(e,t,n){t.__esModule=true;t.default=createCounter;function createCounter(){let e=0;return()=>{e+=1;return e}}},function(e,t,n){var r=n(3);t.__esModule=true;t.default=void 0;var o=r(n(12));var i=r(n(13));var a=r(n(156));var s=r(n(45));var c=r(n(59));var l=r(n(18));var u=r(n(313));var d=n(76);var f=r(n(694));var p=r(n(62));var g=r(n(695));var h=r(n(697));const removeReturnVal=e=>function(){e(...arguments)};const isValidCode=e=>1e3===e||e>=3e3&&e<=4999;const b=d.codes.CLOSE_TIMEOUT;var _default=e=>{var t,n;let r=e.EventEmitter,d=e.WebSocket,v=e.logging,m=e.allocateId,_=e.BUFFER_DRAIN_INTERVAL,y=void 0===_?100:_,E=e.BUFFER_DRAIN_MAX_RETRIES,S=void 0===E?10:E;return n=t=function(e){(0,c.default)(ReconnectableSocket,e);(0,s.default)(ReconnectableSocket,[{key:"url",get:function get(){return"function"===typeof(this||_global3)._url?this._url():(this||_global3)._url}},{key:"reconnecting",get:function get(){return"reconnecting"===(this||_global3).readyStateMachine.state}},{key:"binaryType",get:function get(){return(this||_global3)._webSocket.b
8335inaryType}},{key:"bufferedAmount",get:function get(){return(this||_global3)._webSocket.bufferedAmount}},{key:"protocol",get:function get(){return(this||_global3)._webSocket.protocol}},{key:"extensions",get:function get(){return(this||_global3)._webSocket.extensions}},{key:"readyState",get:function get(){const e={reconnecting:ReconnectableSocket.OPEN,open:ReconnectableSocket.OPEN,closing:ReconnectableSocket.CLOSING,closed:ReconnectableSocket.CLOSED,connecting:ReconnectableSocket.CONNECTING};return e[(this||_global3).readyStateMachine.state]}}]);function ReconnectableSocket(t){var n;const r="string"===typeof t?{url:t}:t,s=r.url,c=r.connectTimeout,d=void 0===c?15e3:c,p=r.pingThreshold,h=void 0===p?3e3:p,b=r.pingWarningDelay,_=void 0===b?100:b,y=r.disconnectThreshold,E=void 0===y?5900:y,S=r.reconnectMaxDuration,T=void 0===S?6e4:S;if(!s)throw new Error("Must provide url");n=e.call(this||_global3)||this||_global3;(0,l.default)((0,a.default)(n),"_url",void 0);(0,l.default)((0,a.default)(n),"_id",m());(0,l.default)((0,a.default)(n),"_logger",v(`ReconnectableSocket:${n._id}`));(0,l.default)((0,a.default)(n),"_webSocket",void 0);(0,l.default)((0,a.default)(n),"_connectTimer",void 0);(0,l.default)((0,a.default)(n),"_pingTimer",void 0);(0,l.default)((0,a.default)(n),"_pingWarningTimer",void 0);(0,l.default)((0,a.default)(n),"_disconnectTimer",void 0);(0,l.default)((0,a.default)(n),"_queuedMessages",[]);(0,l.default)((0,a.default)(n),"_draining",false);n.readyStateMachine=(0,g.default)({reconnectMaxDuration:T,CLOSED:ReconnectableSocket.CLOSED,CLOSING:ReconnectableSocket.CLOSING});n._url=s;(0,u.default)({logger:n._logger,obj:(0,a.default)(n),eventNames:["error","open","message","needsPing","reconnecting","reconnectAttempt","reconnectFailure","reconnected","close"]});n.readyStateMachine.observe("onEnterOpen",(e=>{let t=e.from;n._resetPingTimers();n._resetDisconnectTimer();n._connectTimer.clear();if("reconnecting"===t){n._queuedMessages.forEach((e=>n.send(e,true)));n._queuedMessages=[];n.emit("reconnected")}else n.emit("open")}));n.readyStateMachine.observe("onEnterClosed",((e,t)=>{n.emit("close",t)}));n.readyStateMachine.observe("onEnterClosing",removeReturnVal(function(){var e=(0,i.default)(o.default.mark((function _callee(e,t){var r,i,a;return o.default.wrap((function _callee$(o){while(1)switch(o.prev=o.next){case 0:r=e.from;i=t.code,a=t.reason;n._clearTimers();o.next=5;return n._clearSocket({drain:"open"===r,code:i,reason:a});case 5:"reconnecting"===r&&n.emit("reconnectFailure",{code:i,reason:a});setTimeout((()=>{n.readyStateMachine.closed({code:i,reason:a})}));case 7:case"end":return o.stop()}}),_callee)})));return function(t,n){return e.apply(this||_global3,arguments)}}()));n.readyStateMachine.observe("onEnterReconnecting",(()=>{n.emit("reconnecting")}));n.readyStateMachine.observe("onDisconnect",removeReturnVal(function(){var e=(0,i.default)(o.default.mark((function _callee2(e,t){var r,i,a,s;return o.default.wrap((function _callee2$(o){while(1)switch(o.prev=o.next){case 0:r=e.from,i=e.to;a=t.code,s=t.reason;if(!("reconnecting"===i)){o.next=10;break}if(!n._draining){o.next=5;break}return o.abrupt("return");case 5:n._clearTimers();n.emit("reconnectAttempt");o.next=9;return n._clearSocket({drain:"open"===r,code:a,reason:s});case 9:n._createSocket();case 10:case"end":return o.stop()}}),_callee2)})));return function(t,n){return e.apply(this||_global3,arguments)}}()));const createTimer=(e,t)=>new f.default({name:e,duration:t,logger:n._logger});n._connectTimer=createTimer("connect",d);n._pingTimer=createTimer("ping",h);n._pingWarningTimer=createTimer("pingWarning",_);n._disconnectTimer=createTimer("disconnect",E);n._createSocket();return n}var t=ReconnectableSocket.prototype;t._createSocket=function _createSocket(){const e=new d((this||_global3).url);e.binaryType="arraybuffer";const t=(0,p.default)(e);t.on("open",(()=>{(this||_global3).readyStateMachine.open()}));t.on("close",(e=>{let t=e.code,n=e.reason;(this||_global3).readyStateMachine.disconnect({code:t,reason:n})}));t.on("error",(e=>{this.emit("error",e)}));t.on("message",(e=>{(this||_global3).readyState!==ReconnectableSocket.CLOSING&&this._resetDisconnectTimer();
8335this.emit("message",e)}));(this||_global3)._webSocket=e;(this||_global3)._webSocketEvents=t;(this||_global3)._connectTimer.reset((()=>{const e={code:b,reason:"Timeout while opening connection"};const t=new Error(e.reason);t.code=b;this.emit("error",t);(this||_global3).readyStateMachine.disconnect(e)}))};t._clearSocket=function(){var e=(0,i.default)(o.default.mark((function _callee3(e){var t,n,r,i,a;return o.default.wrap((function _callee3$(o){while(1)switch(o.prev=o.next){case 0:t=void 0===e?{}:e,n=t.drain,r=void 0!==n&&n,i=t.code,a=t.reason;(this||_global3)._draining=true;(this||_global3)._webSocketEvents&&(this||_global3)._webSocketEvents.removeAll();if(!((this||_global3)._webSocket.readyState!==ReconnectableSocket.CLOSED)){o.next=8;break}if(!r){o.next=7;break}o.next=7;return(0,h.default)((this||_global3)._webSocket,{BUFFER_DRAIN_INTERVAL:y,BUFFER_DRAIN_MAX_RETRIES:S});case 7:try{!isValidCode(i)||void 0===i&&void 0===a?(this||_global3)._webSocket.close():(this||_global3)._webSocket.close(i,a)}catch(e){v.error("Could not close websocket",e)}case 8:(this||_global3)._draining=false;case 9:case"end":return o.stop()}}),_callee3,this||_global3)})));function _clearSocket(t){return e.apply(this||_global3,arguments)}return _clearSocket}();t.send=function send(e,t){void 0===t&&(t=true);(this||_global3).readyState===ReconnectableSocket.OPEN&&this._resetPingTimers();const sendMessage=()=>{try{(this||_global3)._webSocket.send(e);return"sent"}catch(e){if((this||_global3)._webSocket.readyState===d.OPEN){(this||_global3)._logger.debug("webSocket.send threw exception even though it was open:",e);return"dropped"}throw e}};if("reconnecting"===(this||_global3).readyStateMachine.state){if((this||_global3)._webSocket.readyState===d.OPEN)try{sendMessage()}catch(e){}if(t){(this||_global3)._queuedMessages.push(e);return"queued"}(this||_global3)._logger.debug("Dropping message during reconnection since retryAfterReconnect is false:",e);return"dropped"}return sendMessage()};t.close=function close(e,t){if((this||_global3).readyState===ReconnectableSocket.CLOSING)throw new Error("Can not call close on a closing ReconnectableSocket");if((this||_global3).readyState===ReconnectableSocket.CLOSED)throw new Error("Can not call close on an already closed ReconnectableSocket");(this||_global3).readyStateMachine.close({code:e,reason:t})};t._resetPingTimers=function _resetPingTimers(){(this||_global3)._pingWarningTimer.clear();(this||_global3)._pingTimer.reset((()=>{(this||_global3)._pingWarningTimer.reset((()=>{(this||_global3)._logger.warn("Did not send message after needsPing event. Other side may disconnect.")}));this.emit("needsPing")}))};t._resetDisconnectTimer=function _resetDisconnectTimer(){(this||_global3)._disconnectTimer.reset((()=>(this||_global3).readyStateMachine.disconnect({code:b,reason:"No activity"})))};t._clearTimers=function _clearTimers(){[(this||_global3)._disconnectTimer,(this||_global3)._connectTimer,(this||_global3)._pingTimer,(this||_global3)._pingWarningTimer].forEach((e=>e.clear()))};return ReconnectableSocket}(r),(0,l.default)(t,"CONNECTING",d.CONNECTING),(0,l.default)(t,"OPEN",d.OPEN),(0,l.default)(t,"CLOSING",d.CLOSING),(0,l.default)(t,"CLOSED",d.CLOSED),n};t.default=_default},function(e,t,n){var r=n(3);t.__esModule=true;t.default=void 0;var o=r(n(18));let i=function(){function Timer(e){let t=e.name,n=e.logger,r=e.duration;(0,o.default)(this||_global3,"name",void 0);(0,o.default)(this||_global3,"logger",void 0);(0,o.default)(this||_global3,"duration",void 0);(0,o.default)(this||_global3,"currId",void 0);(this||_global3).name=t;(this||_global3).logger=n;(this||_global3).duration=r}var e=Timer.prototype;e.reset=function reset(e){this.clear();const t=setTimeout((()=>{if(void 0!==(this||_global3).currId){(this||_global3).logger.spam(`${(this||_global3).name} timer with id ${(this||_global3).currId} expired, entering callback`);(this||_global3).currId=void 0;e()}}),(this||_global3).duration);(this||_global3).currId=t;(this||_global3).logger.spam(`Started ${(this||_global3).name} timer with id ${(this||_global3).currId}, expires in ${(this||_global3).duration}ms`)};e.clear=function clear(){if(void 0!==(this||_global3).currId){clearTimeout((this||_global3).currId);(this||_global3).logger.spam(`Cleared ${(this||_global3).name}
8335 timer with id ${(this||_global3).currId}`);(this||_global3).currId=void 0}};e.isRunning=function isRunning(){return void 0!==(this||_global3).currId};return Timer}();t.default=i},function(e,t,n){var r=n(3);t.__esModule=true;t.default=void 0;var o=r(n(305));var i=r(n(696));var a=n(76);var s=r(n(1));const c=(0,s.default)("ReconnectableSocketStateMachine");const l=a.codes.CLOSE_UNSUPPORTED,u=a.codes.CLOSE_UNEXPECTED_CONDITION;var _default=e=>{let t=e.reconnectMaxDuration,n=e.CLOSED,r=e.CLOSING;let a;function handleDisconnect(e){let o=e.code;"open"!==(this||_global3).state&&a||(a=(0,i.default)(t));const s=t>0&&!a()&&-1===[l,u].indexOf(o)&&-1===[n,r].indexOf((this||_global3).readyState);return s?"reconnecting":"closing"}return new o.default({init:"connecting",methods:{onInvalidTransition(e,t,n){c.error("Invalid state transition",{transition:e,from:t,to:n})}},transitions:[{name:"open",from:["connecting","reconnecting"],to:"open"},{name:"close",from:["connecting","reconnecting","open"],to:"closing"},{name:"closed",from:"closing",to:"closed"},{name:"disconnect",from:["reconnecting","open","connecting"],to:handleDisconnect}]})};t.default=_default},function(e,t,n){e.exports=e=>{let t=false;setTimeout((()=>{t=true}),e);return()=>t}},function(e,t,n){var r=n(3);t.__esModule=true;t.default=void 0;var o=r(n(12));var i=r(n(13));var a=r(n(106));var s=function(){var e=(0,i.default)(o.default.mark((function _callee(e,t){var n,r,i,s,c,l;return o.default.wrap((function _callee$(o){while(1)switch(o.prev=o.next){case 0:n=void 0===t?{}:t,r=n.BUFFER_DRAIN_INTERVAL,i=void 0===r?100:r,s=n.BUFFER_DRAIN_MAX_RETRIES,c=void 0===s?10:s;l=0;case 2:if(!(l<c)){o.next=10;break}if(!(0===e.bufferedAmount)){o.next=5;break}return o.abrupt("break",10);case 5:o.next=7;return(0,a.default)(i);case 7:l+=1;o.next=2;break;case 10:case"end":return o.stop()}}),_callee)})));return function(t,n){return e.apply(this||_global3,arguments)}}();t.default=s},function(e,t,n){var r=n(108);var o=n(3);t.__esModule=true;t.default=void 0;var i=o(n(156));var a=o(n(45));var s=o(n(59));var c=o(n(18));var l=o(n(19));var u=o(n(313));var d=o(n(699));var f=r(n(171));var p=o(n(702));var g=n(76);var _default=e=>{var t,n;let r=e.EventEmitter,o=e.ReconnectableSocket,h=e.logging,b=e.allocateId;return n=t=function(e){(0,s.default)(RumorSocket,e);(0,a.default)(RumorSocket,[{key:"readyState",get:function get(){return(this||_global3)._socket?(this||_global3)._socket.readyState:o.CONNECTING}},{key:"reconnecting",get:function get(){return(this||_global3)._opened&&(this||_global3)._socket&&(this||_global3)._socket.reconnecting}}]);function RumorSocket(t){var n;let r=t.messagingURL,a=t.notifyDisconnectAddress,s=t.connectionId,f=t.enableReconnection,v=t.pingThreshold,m=void 0===v?2e3:v,_=t.disconnectThreshold,y=void 0===_?(f?3:25)*m-100:_,E=t.reconnectMaxDuration,S=void 0===E?f?6e4:0:E;n=e.call(this||_global3)||this||_global3;(0,c.default)((0,i.default)(n),"url",void 0);(0,c.default)((0,i.default)(n),"id",void 0);(0,c.default)((0,i.default)(n),"_opened",false);(0,c.default)((0,i.default)(n),"_socket",void 0);(0,c.default)((0,i.default)(n),"_reconnectAttempts",0);(0,c.default)((0,i.default)(n),"_socketID",(0,l.default)());(0,c.default)((0,i.default)(n),"_receivedTransactionIDs",[]);(0,c.default)((0,i.default)(n),"_notifyDisconnectAddress",void 0);(0,c.default)((0,i.default)(n),"_enableReconnection",void 0);(0,c.default)((0,i.default)(n),"_pendingMessages",[]);(0,c.default)((0,i.default)(n),"_logger",h(`RumorSocket:${b()}`));(0,u.default)({logger:n._logger,obj:(0,i.default)(n),eventNames:["open","message","error","reconnecting","reconnectAttempt","reconnectFailure","reconnected","close"]});n.url=r;n.id=s;n._notifyDisconnectAddress=a;n._enableReconnection=f;n.on("error",(e=>{n._logger.error(e.message)}));try{n._socket=new o({url:()=>n._enableReconnection?[n.url,n.url.indexOf("?")>=0?"&":"?",`socketId=${n._socketID}`,n._socket&&n._socket.reconnecting?"&reconnect=true":"",`&attempt=${(0,l.default)()}`].join(""):n.url,pingThreshold:m,disconnectThreshold:y,reconnectMaxDuration:S})}catch(e){n._logger.error(e);n.emit("error",new p.default(g.codes.CLOSE_CONNECT_EXCEPTION))}const onOpen=()=>{n._opened=true;n._socket.send(d.default.Connect(n.id,a).serialize());n.emit("open",n.id)};n._socket.once("open",onOpen);n._socket.on("message",(e=>n._receiveMessage(e)));n._socket.once("close",(e=>{n._logger.debug(`ReconnectableSocket closed (code: ${e.code})`);n._clearPendingMessages();const t=g.codes.CLOSE_NORMAL,r=g.codes.CLOSE_GOING_AWAY,o=g.codes.CLOSE_TIMEOUT;-1===[t,r,o].indexOf(e.code)&&n.emit("error",new p.default(e.code,e.reason||e.message));n.emit("close",e)}));n._socket.on("error",(e=>{let t=e.code;return n.emit("error",new p.default(t))}));n._socket.on("needsPing",(()=>{n._socket.send(d.default.Ping().serialize())}));n._socket.on("reconnecting",(()=>
8335{if(n._opened){n._clearPendingMessagesWhichShouldntRetry();n.emit("reconnecting");n._reconnectAttempts=0}}));n._socket.on("reconnectAttempt",(()=>{if(n._opened){n._reconnectAttempts+=1;n._socket.send(d.default.Disconnect("1").serialize(),false);n.emit("reconnectAttempt")}}));n._socket.on("reconnected",(()=>{if(n._opened){n._pendingMessages.forEach((e=>{n._socket.send(e.rumorMessage.serialize())}));n.emit("reconnected")}else onOpen()}));n._socket.on("reconnectFailure",(()=>{if(n._opened){n._logger.debug(`Reconnecting failed as connectivity was not restored within ${S}ms`);n.emit("reconnectFailure",new p.default)}}));return n}var t=RumorSocket.prototype;t._clearPendingMessagesWhichShouldntRetry=function _clearPendingMessagesWhichShouldntRetry(){const e=(this||_global3)._pendingMessages.filter((e=>!e.retryAfterReconnect));(this||_global3)._pendingMessages=(this||_global3)._pendingMessages.filter((e=>e.retryAfterReconnect));e.forEach((e=>{const t=new Error("Not connected.");t.code=500;e.completion(t)}))};t._clearPendingMessages=function _clearPendingMessages(){(this||_global3)._pendingMessages.forEach((e=>{const t=new Error("Not connected.");t.code=500;e.completion(t)}));(this||_global3)._pendingMessages=[]};t._sendAck=function _sendAck(e){(this||_global3)._socket.send(d.default.Status([e.fromAddress],{"TRANSACTION-ID":e.headers["TRANSACTION-ID"],"X-TB-FROM-ADDRESS":(this||_global3).id}).serialize())};t._receiveMessage=function _receiveMessage(e){const t=d.default.deserialize(e.data);if(t.type!==f.PONG){(this||_global3)._logger.debug("Received:",t);t.transactionId&&((this||_global3)._pendingMessages=(this||_global3)._pendingMessages.filter((e=>{if(e.rumorMessage.transactionId===t.transactionId){(this||_global3)._logger.debug("Marking",t.transactionId," as received");e.completion(void 0,t)}return e.rumorMessage.transactionId!==t.transactionId})));if(t.transactionId&&t.type!==f.STATUS){this._sendAck(t);if((this||_global3)._receivedTransactionIDs.indexOf(t.transactionId)>=0)return;(this||_global3)._receivedTransactionIDs.push(t.transactionId)}this.emit("message",t)}};t.publish=function publish(e,t,n,r,o){void 0===o&&(o=()=>{});const i=d.default.Publish(e,t,n);const a=(this||_global3)._socket.send(i.serialize(),false);if("dropped"!==a||r)(this||_global3)._pendingMessages.push({rumorMessage:i,retryAfterReconnect:r,completion:o});else{const e=new Error("Not connected.");e.code=500;o(e)}};t.subscribe=function subscribe(e){(this||_global3)._socket.send(d.default.Subscribe(e).serialize())};t.unsubscribe=function unsubscribe(e){(this||_global3)._socket.send(d.default.Unsubscribe(e).serialize())};t.disconnect=function disconnect(){(this||_global3).readyState===RumorSocket.OPEN&&(this||_global3)._socket.send(d.default.Disconnect().serialize());if((this||_global3)._socket.readyState!==o.CLOSED&&(this||_global3)._socket.readyState!==o.CLOSING){const e=g.codes.CLOSE_NORMAL;(this||_global3)._socket.close(e,g.messages[e])}};t.status=function status(e,t){(this||_global3)._socket.send(d.default.Status(e,{"TRANSACTION-ID":t,"X-TB-FROM-ADDRESS":(this||_global3).id}).serialize())};t.reconnectRetriesCount=function reconnectRetriesCount(){return(this||_global3)._reconnectAttempts};t.messageQueueSize=function messageQueueSize(){return(this||_global3)._pendingMessages.length};(0,a.default)(RumorSocket,[{key:"socketID",get:function get(){return(this||_global3)._socketID}}]);return RumorSocket}(r),(0,c.default)(t,"CONNECTING",o.CONNECTING),(0,c.default)(t,"OPEN",o.OPEN),(0,c.default)(t,"CLOSING",o.CLOSING),(0,c.default)(t,"CLOSED",o.CLOSED),n};t.default=_default},function(e,t,n){var r=n(108);var o=n(3);t.__esModule=true;t.default=void 0;var i=o(n(18));var a=o(n(19));var s=n(700);var c=r(n(171));const toArrayBuffer=e=>{const t=new ArrayBuffer(e.length);const n=new Uint8Array(t);for(let t=0;t<e.length;++t)n[t]=e[t];return t};let l=function(){function RumorMessage(e,t,n,r){(0,i.default)(this||_global3,"type",void 0);(0,i.default)(this||_global3,"toAddress",void 0);(0,i.default)(this||_global3,"headers",void 0);(0,i.default)(this||_global3,"data",void 0);(this||_global3).type=e;(this||_global3).toAddress=t;(this||_global3).headers=n;(this||_global3).data=r;(this||_global3).fromAddress=(this||_global3).headers["X-TB-FROM-ADDRESS"];(this||_global3).transactionId=(this||_global3).headers["TRANSACTION-ID"];(this||_global3).status=(this||_global3).headers.STATUS;(this||_global3).isError=(this||_global3).status&&"2"!==(this||_global3).status[0]}var e=RumorMessage.prototype;e.serialize=function serialize(){let e,t,n,r;let o=8;let i=7;const a=[];const c=[];const l=[];i++;for(n=0;n<(this||_global3).toAddress.length;n++){a.push(new s.TextEncoder("utf-8").encode((this||_global3).toAddress[n]));i+=2;i+=a[n].length}i++;n=0;for(const e in(this||_global3).headers)if((this||_global3).headers.hasOwnProperty(e)){c.push(new s.TextEncoder("utf-8").encode(e));l.push(new s.TextEncoder("utf-8").encode((this||_global3).headers[e]));i+=4;i+=c[n].length;i+=l[n].length;n++}t=new s.TextEncoder("utf-8").encode((this||_global3).data);i+=t.length;const u=new ArrayBuffer(i);const d=new Uint8Array(u,0,i);i-=4;d[0]=(4278190080&i)>>>24;d[1]=(16711680&i)>>>16;d[2]=(65280&i)>>>8;d[3]=(255&i)>>>0;d[4]=0;
8335d[5]=0;d[6]=(this||_global3).type;d[7]=(this||_global3).toAddress.length;for(n=0;n<a.length;n++){e=a[n];d[o++]=e.length>>8&255;d[o++]=e.length>>0&255;for(r=0;r<e.length;r++)d[o++]=e[r]}d[o++]=c.length;for(n=0;n<c.length;n++){e=c[n];d[o++]=e.length>>8&255;d[o++]=e.length>>0&255;for(r=0;r<e.length;r++)d[o++]=e[r];e=l[n];d[o++]=e.length>>8&255;d[o++]=e.length>>0&255;for(r=0;r<e.length;r++)d[o++]=e[r]}for(n=0;n<t.length;n++)d[o++]=t[n];return u};RumorMessage.deserialize=function deserialize(e){(void 0!==typeof window?window:_global3).Buffer&&(void 0!==typeof window?window:_global3).Buffer.isBuffer(e)&&(e=toArrayBuffer(e));let t,n,r,o,i,a,c,l;let u=8;const d=new Uint8Array(e);t=d[6];const f=[];for(l=0;l<d[7];l++){c=d[u++]<<8;c+=d[u++];n=new Uint8Array(e,u,c);f[l]=new s.TextDecoder("utf-8").decode(n);u+=c}r=d[u++];o={};for(l=0;l<r;l++){c=d[u++]<<8;c+=d[u++];n=new Uint8Array(e,u,c);i=new s.TextDecoder("utf-8").decode(n);u+=c;c=d[u++]<<8;c+=d[u++];n=new Uint8Array(e,u,c);a=new s.TextDecoder("utf-8").decode(n);o[i]=a;u+=c}const p=new Uint8Array(e,u);const g=new s.TextDecoder("utf-8").decode(p);return new RumorMessage(t,f,o,g)};RumorMessage.Connect=function Connect(e,t){const n={uniqueId:e,"TRANSACTION-ID":(0,a.default)(),notifyDisconnectAddress:t};return new RumorMessage(c.CONNECT,[],n,"")};RumorMessage.Disconnect=function Disconnect(e){return new RumorMessage(c.DISCONNECT,[],{reconnect:e},"")};RumorMessage.Subscribe=function Subscribe(e){return new RumorMessage(c.SUBSCRIBE,e,{},"")};RumorMessage.Unsubscribe=function Unsubscribe(e){return new RumorMessage(c.UNSUBSCRIBE,e,{},"")};RumorMessage.Publish=function Publish(e,t,n){return new RumorMessage(c.MESSAGE,e,n||{},t||"")};RumorMessage.Status=function Status(e,t){return new RumorMessage(c.STATUS,e,t||{},"")};RumorMessage.Ping=function Ping(){return new RumorMessage(c.PING,[],{},"")};return RumorMessage}();t.default=l},function(e,t,n){var r=n(108);t.__esModule=true;t.TextDecoder=t.TextEncoder=void 0;var o=r(n(701));const i=(void 0!==typeof window?window:_global3).TextEncoder||o.TextEncoder;t.TextEncoder=i;const a=(void 0!==typeof window?window:_global3).TextDecoder||o.TextDecoder;t.TextDecoder=a},function(e,t,n){n.r(t);n.d(t,"TextEncoder",(function(){return TextEncoder}));n.d(t,"TextDecoder",(function(){return TextDecoder}));
8336/**
8337       * @param {number} a The number to test.
8338       * @param {number} min The minimum value in the range, inclusive.
8339       * @param {number} max The maximum value in the range, inclusive.
8340       * @return {boolean} True if a >= min and a <= max.
8341       */function inRange(e,t,n){return t<=e&&e<=n}
8342/**
8343       * @param {*} o
8344       * @return {Object}
8345       */function ToDictionary(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}
8346/**
8347       * @param {string} string Input string of UTF-16 code units.
8348       * @return {!Array.<number>} Code points.
8349       */function stringToCodePoints(e){var t=String(e);var n=t.length;var r=0;var o=[];while(r<n){var i=t.charCodeAt(r);if(i<55296||i>57343)o.push(i);else if(56320<=i&&i<=57343)o.push(65533);else if(55296<=i&&i<=56319)if(r===n-1)o.push(65533);else{var a=e.charCodeAt(r+1);if(56320<=a&&a<=57343){var s=1023&i;var c=1023&a;o.push(65536+(s<<10)+c);r+=1}else o.push(65533)}r+=1}return o}
8350/**
8351       * @param {!Array.<number>} code_points Array of code points.
8352       * @return {string} string String of UTF-16 code units.
8353       */function codePointsToString(e){var t="";for(var n=0;n<e.length;++n){var r=e[n];if(r<=65535)t+=String.fromCharCode(r);else{r-=65536;t+=String.fromCharCode(55296+(r>>10),56320+(1023&r))}}return t}var r=-1;
8354/**
8355       * A stream represents an ordered sequence of tokens.
8356       *
8357       * @constructor
8358       * @param {!(Array.<number>|Uint8Array)} tokens Array of tokens that provide the
8359       * stream.
8360       */function Stream(e){
8361/** @type {!Array.<number>} */
8362(this||_global3).tokens=[].slice.call(e)}Stream.prototype={endOfStream:function(){return!(this||_global3).tokens.length},read:function(){return(this||_global3).tokens.length?(this||_global3).tokens.shift():r},
8363/**
8364         * When one or more tokens are prepended to a stream, those tokens
8365         * must be inserted, in given order, before the first token in the
8366         * stream.
8367         *
8368         * @param {(number|!Array.<number>)}
8368 token The token(s) to prepend to the stream.
8369         */
8370prepend:function(e){if(Array.isArray(e)){var t=e;while(t.length)(this||_global3).tokens.unshift(t.pop())}else(this||_global3).tokens.unshift(e)},
8371/**
8372         * When one or more tokens are pushed to a stream, those tokens
8373         * must be inserted, in given order, after the last token in the
8374         * stream.
8375         *
8376         * @param {(number|!Array.<number>)} token The tokens(s) to prepend to the stream.
8377         */
8378push:function(e){if(Array.isArray(e)){var t=e;while(t.length)(this||_global3).tokens.push(t.shift())}else(this||_global3).tokens.push(e)}};var o=-1;
8379/**
8380       * @param {boolean} fatal If true, decoding errors raise an exception.
8381       * @param {number=} opt_code_point Override the standard fallback code point.
8382       * @return {number} The code point to insert on a decoding error.
8383       */function decoderError(e,t){if(e)throw TypeError("Decoder error");return t||65533}function Decoder(){}Decoder.prototype={
8384/**
8385         * @param {Stream} stream The stream of bytes being decoded.
8386         * @param {number} bite The next byte read from the stream.
8387         * @return {?(number|!Array.<number>)} The next code point(s)
8388         *     decoded, or null if not enough data exists in the input
8389         *     stream to decode a complete code point, or |finished|.
8390         */
8391handler:function(e,t){}};function Encoder(){}Encoder.prototype={
8392/**
8393         * @param {Stream} stream The stream of code points being encoded.
8394         * @param {number} code_point Next code point read from the stream.
8395         * @return {(number|!Array.<number>)} Byte(s) to emit, or |finished|.
8396         */
8397handler:function(e,t){}};var i="utf-8";
8398/**
8399       * @constructor
8400       * @param {string=} encoding The label of the encoding;
8401       *     defaults to 'utf-8'.
8402       * @param {Object=} options
8403       */function TextDecoder(e,t){if(!((this||_global3)instanceof TextDecoder))return new TextDecoder(e,t);e=void 0!==e?String(e).toLowerCase():i;if(e!==i)throw new Error("Encoding not supported. Only utf-8 is supported");t=ToDictionary(t);
8404/** @private @type {boolean} */(this||_global3)._streaming=false;
8405/** @private @type {boolean} */(this||_global3)._BOMseen=false;
8406/** @private @type {?Decoder} */(this||_global3)._decoder=null;
8407/** @private @type {boolean} */(this||_global3)._fatal=Boolean(t.fatal);
8408/** @private @type {boolean} */(this||_global3)._ignoreBOM=Boolean(t.ignoreBOM);Object.defineProperty(this||_global3,"encoding",{value:"utf-8"});Object.defineProperty(this||_global3,"fatal",{value:(this||_global3)._fatal});Object.defineProperty(this||_global3,"ignoreBOM",{value:(this||_global3)._ignoreBOM})}TextDecoder.prototype={
8409/**
8410         * @param {ArrayBufferView=} input The buffer of bytes to decode.
8411         * @param {Object=} options
8412         * @return {string} The decoded string.
8413         */
8414decode:function decode(e,t){var n;n="object"===typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"===typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0);t=ToDictionary(t);if(!(this||_global3)._streaming){(this||_global3)._decoder=new UTF8Decoder({fatal:(this||_global3)._fatal});(this||_global3)._BOMseen=false}(this||_global3)._streaming=Boolean(t.stream);var r=new Stream(n);var i=[];
8415/** @type {?(number|!Array.<number>)} */var a;while(!r.endOfStream()){a=(this||_global3)._decoder.handler(r,r.read());if(a===o)break;null!==a&&(Array.isArray(a)?i.push.apply(i,a):i.push(a))}if(!(this||_global3)._streaming){do{a=(this||_global3)._decoder.handler(r,r.read());if(a===o)break;null!==a&&(Array.isArray(a)?i.push.apply(i,a):i.push(a))}while(!r.endOfStream());(this||_global3)._decoder=null}if(i.length&&-1!==["utf-8"].indexOf((this||_global3).encoding)&&!(this||_global3)._ignoreBOM&&!(this||_global3)._BOMseen)if(65279===i[0]){(this||_global3)._BOMseen=true;i.shift()}else(this||_global3)._BOMseen=true;return codePointsToString(i)}};
8416/**
8417       * @constructor
8418       * @param {string=} encoding The label of the encoding;
8419       *     defaults to 'utf-8'.
8420       * @param {Object=} options
8421       */function TextEncoder(e,t){if(!((this||_global3)instanceof TextEncoder))return new TextEncoder(e,t);e=void 0!==e?String(e).toLowerCase():i;
8421if(e!==i)throw new Error("Encoding not supported. Only utf-8 is supported");t=ToDictionary(t);
8422/** @private @type {boolean} */(this||_global3)._streaming=false;
8423/** @private @type {?Encoder} */(this||_global3)._encoder=null;
8424/** @private @type {{fatal: boolean}} */(this||_global3)._options={fatal:Boolean(t.fatal)};Object.defineProperty(this||_global3,"encoding",{value:"utf-8"})}TextEncoder.prototype={
8425/**
8426         * @param {string=} opt_string The string to encode.
8427         * @param {Object=} options
8428         * @return {Uint8Array} Encoded bytes, as a Uint8Array.
8429         */
8430encode:function encode(e,t){e=e?String(e):"";t=ToDictionary(t);(this||_global3)._streaming||((this||_global3)._encoder=new UTF8Encoder((this||_global3)._options));(this||_global3)._streaming=Boolean(t.stream);var n=[];var r=new Stream(stringToCodePoints(e));
8431/** @type {?(number|!Array.<number>)} */var i;while(!r.endOfStream()){i=(this||_global3)._encoder.handler(r,r.read());if(i===o)break;Array.isArray(i)?n.push.apply(n,i):n.push(i)}if(!(this||_global3)._streaming){while(true){i=(this||_global3)._encoder.handler(r,r.read());if(i===o)break;Array.isArray(i)?n.push.apply(n,i):n.push(i)}(this||_global3)._encoder=null}return new Uint8Array(n)}};
8432/**
8433       * @constructor
8434       * @implements {Decoder}
8435       * @param {{fatal: boolean}} options
8436       */function UTF8Decoder(e){var t=e.fatal;var
8437/** @type {number} */
8438n=0,
8439/** @type {number} */
8440i=0,
8441/** @type {number} */
8442a=0,
8443/** @type {number} */
8444s=128,
8445/** @type {number} */
8446c=191;
8447/**
8448         * @param {Stream} stream The stream of bytes being decoded.
8449         * @param {number} bite The next byte read from the stream.
8450         * @return {?(number|!Array.<number>)} The next code point(s)
8451         *     decoded, or null if not enough data exists in the input
8452         *     stream to decode a complete code point.
8453         */(this||_global3).handler=function(e,l){if(l===r&&0!==a){a=0;return decoderError(t)}if(l===r)return o;if(0===a){if(inRange(l,0,127))return l;if(inRange(l,194,223)){a=1;n=l-192}else if(inRange(l,224,239)){224===l&&(s=160);237===l&&(c=159);a=2;n=l-224}else{if(!inRange(l,240,244))return decoderError(t);240===l&&(s=144);244===l&&(c=143);a=3;n=l-240}n<<=6*a;return null}if(!inRange(l,s,c)){n=a=i=0;s=128;c=191;e.prepend(l);return decoderError(t)}s=128;c=191;i+=1;n+=l-128<<6*(a-i);if(i!==a)return null;var u=n;n=a=i=0;return u}}
8454/**
8455       * @constructor
8456       * @implements {Encoder}
8457       * @param {{fatal: boolean}} options
8458       */function UTF8Encoder(e){e.fatal;
8459/**
8460         * @param {Stream} stream Input stream.
8461         * @param {number} code_point Next code point read from the stream.
8462         * @return {(number|!Array.<number>)} Byte(s) to emit.
8463         */(this||_global3).handler=function(e,t){if(t===r)return o;if(inRange(t,0,127))return t;var n,i;if(inRange(t,128,2047)){n=1;i=192}else if(inRange(t,2048,65535)){n=2;i=224}else if(inRange(t,65536,1114111)){n=3;i=240}var a=[(t>>6*n)+i];while(n>0){var s=t>>6*(n-1);a.push(128|63&s);n-=1}return a}}},function(e,t,n){var r=n(108);var o=n(3);t.__esModule=true;t.default=void 0;var i=o(n(18));var a=r(n(76));let s=function SocketError(e,t){void 0===e&&(e=a.codes.CLOSE_FALLBACK_CODE);void 0===t&&(t=a.messages[e]||"No message available from code.");(0,i.default)(this||_global3,"code",void 0);(0,i.default)(this||_global3,"message",void 0);(this||_global3).code=e;(this||_global3).message=t};t.default=s},function(e,t,n){var r=n(3);t.__esModule=true;t.default=void 0;var o=r(n(704));var i=(()=>(void 0!==typeof window?window:_global3).WebSocket?(void 0!==typeof window?window:_global3).WebSocket:o.default)();t.default=i},function(e,t,n){e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(e,t,n){const r=n(706);e.exports=function unboxFromRumorMessage(e){const t=r(e.data);t.transactionId=e.transactionId;t.fromAddress=e.headers["X-TB-FROM-ADDRESS"];return t}},function(e,t,n){e.exports=function deserializeMessage(e){if(0===e.length)return{};const t=JSON.parse(e);const n=t.uri.substr(1).split("/");n.shift();""===n[n.length-1]&&n.pop();t.params={};for(let e=0,r=n.length;e<r-1;e+=2)t.params[n[e]]=n[e+1];n.length%2===0?"channel"===n[n.length-2]&&n.length>6?t.resource=`${n[n.length-4]}_${n[n.length-2]}`:t.resource=n[n.length-2]:"channel"===n[n.length-1]&&n.length>5?t.resource=`${n[n.length-3]}_${n[n.length-1]}`:t.resource=n[n.length-1];t.signature=`${t.resource}#${t.method}`;return t}},function(e,t,n){const r=n(2),o=r.name;const i=n(60).once;e.exports=()=>i()&&["Chrome","Firefox","Safari"].indexOf(o)>-1},function(e,t,n){const r=n(2);const o=n(60).once;e.exports=()=>o()&&("Chrome"===r.name||"Firefox"===r.name||"Node"===r.name||"Safari"===r.name||"Edge"===r.name)},function(e,t,n){const r=n(60).once;e.exports=()=>r()},function(e,t,n){e.exports="DTLS_SRTP"},function(e,t,n){e.exports=function capabilitiesFromHash(e){let t=e.supportsWebRTC;return{supportsWebRTC:"true"===t||true===t}}},function(e,t,n){e.exports=function SignalError(e,t){(this||_global3).code=e;(this||_global3).message=t;(this||_global3).reason=t}},function(e,t,n){const r=function DelayedEventQueue(e){const t=[];(this||_global3).enqueue=function enqueue(){t.push(Array.prototype.slice.call(arguments))};(this||_global3).triggerAll=function triggerAll(){let n;while(n=t.shift())e.trigger(...n)}};e.exports=r},function(e,t,n){var r=n(3);var o=r(n(25));const i=n(206);const a=n(239);const s=n(56);const c=n(7);const l=n(141);const u=n(8);const d=n(715);const f=n(716);const p=n(289).default;const g={EMPTY_RESPONSE:"Response body was empty, probably due to connectivity loss",BADLY_FORMED:"Unknown error: JSON response was badly formed",NO_ERROR:"No error message",UNEXPECTED_SERVER_RESPONSE:e=>
8463`Unexpected server response (${e}). Try this operation again later.`};const h=[0,600,1200];
8464/**
8465       * @typedef {Object} getSessionInfoConfig Configuration
8466       * @property {String} anvilUrl The base anvil url
8467       * @property {String} sessionId The id of the session to retrieve info for
8468       * @property {String} token The token used for authentication
8469       * @property {String} clientVersion The client version passed to Anvil
8470       * @property {String} connectionId The connection id passed to Anvil
8471       *
8472       * @typedef {Object} getSessionDependencies
8473       * @property {String=} axios
8474       */
8475/**
8476       * Factory for injecting dependencies into and returning a getSessionInfo function
8477       *
8478       * @param {getSessionDependencies} dependencies
8479       * @returns {getSessionInfo}
8480       */function getSessionInfoFactory(e){let t=void 0===e?{}:e,n=t.axios,r=void 0===n?i:n,b=t.retryDelays,v=void 0===b?h:b;
8481/**
8482         * getSessionInfo - Fetch session details from Anvil and return a SessionInfo object
8483         *
8484         * @function getSessionInfo
8485         * @param {getSessionInfoConfig} config
8486         * @returns {Promise<SessionInfo>} The session info
8487         */function getSessionInfo(
8488/** @type getSessionInfoConfig */
8489e){let t=e.anvilUrl,n=e.sessionId,i=e.token,p=e.clientVersion,h=e.connectionId;const b=a.parse(t,true);const v=a.format({protocol:b.protocol,auth:b.auth,host:b.host,pathname:a.resolve((b.pathname||"").replace(/\/?$/,"/"),`session/${n}`),query:(0,o.default)({},b.query,{extended:true})});return r.get(v,{validateStatus:e=>e>=200&&e<300,headers:{"X-OPENTOK-AUTH":i,"X-TB-VERSION":1,"X-TB-CLIENT-VERSION":p,"X-TB-CONNECTIONID":h,Accept:"application/json"}}).catch((e=>{if(e.response){const t=new Error(g.UNEXPECTED_SERVER_RESPONSE(`${e.response.statusCode}${e.response.status?` ${e.response.status}`:""}`));t.code=u.ANVIL_INVALID_HTTP_STATUS;t.name=d(t.code);throw t}if(e.request){const e=new Error(g.CONNECT_FAILED);e.code=u.ANVIL_CONNECT_FAILED;e.name=d(e.code);throw e}{const t=u.ANVIL_UNKNOWN_HTTP_ERROR;const n=d(e.code);c(e,{code:t,name:n});throw e}})).then((e=>{let t=e.data;if("string"===typeof t){if(t.length>0)try{JSON.parse(t)}catch(e){e.message=g.UNEXPECTED_SERVER_RESPONSE(e.toString());e.code=u.ANVIL_XDOMAIN_OR_PARSING_ERROR;e.name=d(e.code);throw e}const e=new Error(0===t.length?g.EMPTY_RESPONSE:g.BADLY_FORMED);e.code=0===t.length?u.ANVIL_EMPTY_RESPONSE_BODY:u.ANVIL_BADLY_FORMED_RESPONSE;e.name=d(e.code);throw e}if(null===t||0===t.length){const e=new Error(g.EMPTY_RESPONSE);e.code=u.ANVIL_EMPTY_RESPONSE_BODY;e.name=d(e.code);throw e}const n=t.filter((e=>null!=e.error)),r=n[0];if(r){const e=f(s(r,"error.code","500"));"Invalid token format"===s(r,"error.errorMessage.message")&&(r.error.errorMessage.message+=` Token: ${i}`);const t=new Error(s(r,"error.errorMessage.message",void 0===e?`Unknown error: ${r.error.code}`:g.NO_ERROR));t.code=e||u.ANVIL_UNEXPECTED_ERROR_CODE;t.name=d(t.code);throw t}return new l(t[0])}))}const m=p(getSessionInfo,((e,t)=>e.code&&e.code>=3e3&&e.code<=3007&&v[t]));return m}e.exports=getSessionInfoFactory},function(e,t,n){const r=n(8);const o=n(4);const i={[r.ANVIL_BADLY_FORMED_RESPONSE]:o.BADLY_FORMED_RESPONSE,[r.ANVIL_INVALID_HTTP_STATUS]:o.INVALID_HTTP_STATUS,[r.ANVIL_XDOMAIN_OR_PARSING_ERROR]:o.XDOMAIN_OR_PARSING_ERROR,[r.ANVIL_UNKNOWN_HTTP_ERROR]:o.UNKNOWN_HTTP_ERROR,[r.ANVIL_UNEXPECTED_ERROR_CODE]:o.UNEXPECTED_ERROR_CODE,[r.ANVIL_EMPTY_RESPONSE_BODY]:o.EMPTY_RESPONSE_BODY,[r.ANVIL_CONNECT_FAILED]:o.CONNECT_FAILED,[r.AUTHENTICATION_ERROR]:o.AUTHENTICATION_ERROR,[r.INVALID_SESSION_ID]:o.INVALID_SESSION_ID,[r.TERMS_OF_SERVICE_FAILURE]:o.TERMS_OF_SERVICE_FAILURE,[r.UNEXPECTED_SERVER_RESPONSE]:o.UNEXPECTED_SERVER_RESPONSE};
8490/**
8491       * Maps an error from SessionInfo.get to its corresponding name
8492       * @param {number} code - Error code
8493       * @return {string|undefined} Error name
8494       */function mapErrorCodeToName(e){return i[e]}e.exports=mapErrorCodeToName},function(e,t,n){const r=n(8);const o={400:r.INVALID_SESSION_ID,403:r.AUTHENTICATION_ERROR,404:r.INVALID_SESSION_ID,409:r.TERMS_OF_SERVICE_FAILURE,500:r.UNEXPECTED_SERVER_RESPONSE};
8495/**
8496       * Maps an Anvil status code error to an exception code
8497       * @param {number} code - Anvil status code
8498       * @return {string|undefined} Exception code
8499       */function mapStatusCodeToErrorCode(e){return o[e]}e.exports=mapStatusCodeToErrorCode},function(e,t,n){e.exports=function initSessionFactory(e){void 0===e&&(e={});const t=e.Session||n(309)();const r=e.sessionObjects||n(20);
8500/**
8501        * <p class="mSummary">
8502        * Initializes and returns the local session object for a specified session ID.
8503        * </p>
8504        * <p>
8505        * You connect to an OpenTok session using the <code>connect()</code> method
8506        * of the Session object returned by the <code>OT.initSession()</code> method.
8507        * Note that calling <code>OT.initSession()</code> does not initiate communications
8508        * with the cloud. It simply initializes the Session object that you can use to
8509        * connect (and to perform other operations once connected).
8510        * </p>
8511        *
8512        * <p>
8513        * Note that you can initialize only one Session object per session ID. Calling
8514        * <code>OT.initSession()</code> a second time with the same session ID returns the
8515        * previously created Session object. However, you can initialize multiple Session objects
8516        * for different sessions (with different session IDs) to connect to multiple sessions.
8517        * </p>
8518        *
8519        * <p>
8520        * When the client disconnects from the session (and the session dispatches a
8521        * <code>sessionDisconnected</code> event), you can reuse the Session object to
8522        * reconnect to the session. However, the Session object will retain any existing
8523        * event handlers attached to it. You can remove all event handlers by calling the
8524        * <code>off()</code> method of the Session object (passing in no parameters).
8525        * </p>
8526        *
8527        *  <p>
8528        *    For an example, see <a href="Session.html#connect">Session.connect()</a>.
8529        *  </p>
8530        *
8531        * @method OT.initSession
8532        * @memberof OT
8533        * @param {String} apiKey Your OpenTok API key (see your <a href="https://tokbox.com/account">TokBox
8534        * account page</a>).
8535        * @param {String} sessionId The session ID identifying the OpenTok session. For more
8536        * information, see <a href="https://tokbox.com/opentok/tutorials/create-session/">Session
8537        * creation</a>.
8538        * @param {Object} options An object that includes optional options for initializing the session.
8539        * This object includes the following properties:
8540        * <ul>
8541        *   <li><code>connectionEventsSuppressed</code> &mdash; (Boolean)
8542        *     Set this property to <code>true</code> to support large interactive video sessions.
8543        *     This prevents the Session object from dispatching <code>connectionCreated</code> and
8544        *     <code>connectionDestroyed</code> events when other clients connect to or disconnect from
8545        *     the session. (Also, the OpenTok server does not send these events to the web client.)
8546        *     For more information, see
8547        *     <a href="https://tokbox.com/developer/guides/broadcast/live-interactive-video/#suppressing-connection-events">
8548        *     Suppressing connection events</a> in the OpenTok developer guides.
8549        *   </li>
8550        *   <li><code>ipWhitelist</code> &mdash; (Boolean) This is available as an add-on feature for
8551        *     <a href="https://tokbox.com/pricing/plans" target="_blank">enterprise accounts</a>.
8552        *     Set this to <code>true</code> if IP white listing is enabled for your project.
8553        *     The default value is <code>false</code>.
8554        *   </li>
8555        *   <li><code>iceConfig</code> &mdash; (Object) This feature is part of the configurable TURN
8556        *     <a href="https://tokbox.com/pricing/plans" target="_blank">add-on feature</a>.
8557        *   </li>
8558        * </ul>
8559        *
8560        * @returns {Session} The session object through which all further interactions with
8561        * the session will occur.
8562        */return function initSession(e,n,o){if(null==n){n=e;e=null}Array.isArray(n)&&1===n.length&&(n=n[0]);let i=r.sessions.get(n);if(!i){i=new t(e,n,o);r.sessions.add(i)}return i}}},function(e,t,n){var r=n(3);var o=r(n(12));var i=r(n(13));const a=n(719);const s=n(273);const c=n(2);const l=n(4);const u=n(8);const d=n(11)();const f=n(50);const p=n(73);const g=n(142)(void 0!==typeof window?window:_global3);function filterCodecList(e){return s(a(e,["AV1X","AV1","VP9","rtx","red","ulpfec","H265","X-H264UC","x-ulpfecuc"]))}const h=function(){var e=(0,i.default)(o.default.mark((function _callee(){var e,t,n,r,i,a,s;return o.default.wrap((function _callee$(o){while(1)switch(o.prev=o.next){case 0:if(!("undefined"===typeof window)){o.next=2;break}return o.abrupt("return",{videoEncoders:[],videoDecoders:[]});case 2:e=g.RTCPeerConnection;if(!(window.RTCRtpSender&&"getCapabilities"in window.RTCRtpSender)){o.next=7;break}t=window.RTCRtpSender.getCapabilities("video").codecs.map((e=>e.mimeType||e.name)).map((e=>e.replace("video/","")));t=filterCodecList(t);return o.abrupt("return",{videoEncoders:t,videoDecoders:t});case 7:if(!("Chrome"===c.name&&!("captureStream"in window.HTMLCanvasElement.prototype))){o.next=9;break}return o.abrupt("return",{videoEncoders:["VP8"],videoDecoders:["VP8"]});case 9:if(!c.isLegacyEdge){o.next=11;break}return o.abrupt("return",{videoEncoders:["H264","VP8"],videoDecoders:["H264","VP8"]});case 11:n=window.document.createElement("canvas");n.getContext("2d");r=n.captureStream();o.prev=14;a={iceServers:[]};p()&&(a.sdpSemantics="plan-b");i=new e(a);i.addTrack?i.addTrack(r.getVideoTracks()[0],r):i.addStream&&i.addStream(r);o.next=21;return i.createOffer();case 21:s=o.sent;t=f.getCodecs(s.sdp,"video")||[];t=filterCodecList(t);return o.abrupt("return",{videoEncoders:t,videoDecoders:t});case 27:o.prev=27;o.t0=o.catch(14);
8562throw d(l.UNABLE_TO_ACCESS_MEDIA_ENGINE,new Error("OT.getSupportedCodecs was not able to get the list of supported codecs"),u.UNABLE_TO_ACCESS_MEDIA_ENGINE);case 30:o.prev=30;i.close();return o.finish(30);case 33:case"end":return o.stop()}}),_callee,null,[[14,27,30,33]])})));return function getSupportedCodecs(){return e.apply(this||_global3,arguments)}}();e.exports=h},function(e,t,n){var r=n(720),o=n(237),i=n(87),a=n(129);
8563/**
8564       * Creates an array of `array` values not included in the other given arrays
8565       * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
8566       * for equality comparisons. The order and references of result values are
8567       * determined by the first array.
8568       *
8569       * **Note:** Unlike `_.pullAll`, this method returns a new array.
8570       *
8571       * @static
8572       * @memberOf _
8573       * @since 0.1.0
8574       * @category Array
8575       * @param {Array} array The array to inspect.
8576       * @param {...Array} [values] The values to exclude.
8577       * @returns {Array} Returns the new array of filtered values.
8578       * @see _.without, _.xor
8579       * @example
8580       *
8581       * _.difference([2, 1], [2, 3]);
8582       * // => [1]
8583       */var s=i((function(e,t){return a(e)?r(e,o(t,1,a,true)):[]}));e.exports=s},function(e,t,n){var r=n(92),o=n(93),i=n(128),a=n(33),s=n(67),c=n(94);var l=200;
8584/**
8585       * The base implementation of methods like `_.difference` without support
8586       * for excluding multiple arrays or iteratee shorthands.
8587       *
8588       * @private
8589       * @param {Array} array The array to inspect.
8590       * @param {Array} values The values to exclude.
8591       * @param {Function} [iteratee] The iteratee invoked per element.
8592       * @param {Function} [comparator] The comparator invoked per element.
8593       * @returns {Array} Returns the new array of filtered values.
8594       */function baseDifference(e,t,n,u){var d=-1,f=o,p=true,g=e.length,h=[],b=t.length;if(!g)return h;n&&(t=a(t,s(n)));if(u){f=i;p=false}else if(t.length>=l){f=c;p=false;t=new r(t)}e:while(++d<g){var v=e[d],m=null==n?v:n(v);v=u||0!==v?v:0;if(p&&m===m){var _=b;while(_--)if(t[_]===m)continue e;h.push(v)}else f(t,m,u)||h.push(v)}return h}e.exports=baseDifference},function(e,t,n){const r=n(23)(),o=r.getInputMediaDevices;
8595/**
8596       * Enumerates the audio input devices (such as microphones) and video input devices
8597       * (cameras) available to the browser.
8598       * <p>
8599       * The array of devices is passed in as the <code>devices</code> parameter of
8600       * the <code>callback</code> function passed into the method.
8601       *
8602       * @param callback {Function} The callback function invoked when the list of devices
8603       * devices is available. This function takes two parameters:
8604       * <ul>
8605       *   <li><code>error</code> &mdash; This is set to an error object when
8606       *   there is an error in calling this method; it is set to <code>null</code>
8607       *   when the call succeeds.</li>
8608       *
8609       *   <li><p><code>devices</code> &mdash; An array of objects corresponding to
8610       *   available microphones and cameras. Each object has three properties: <code>kind</code>,
8611       *   <code>deviceId</code>, and <code>label</code>, each of which are strings.
8612       *   <p>
8613       *   The <code>kind</code> property is set to <code>"audioInput"</code> for audio input
8614       *   devices or <code>"videoInput"</code> for video input devices.
8615       *   <p>
8616       *   The <code>deviceId</code> property is a unique ID for the device. You can pass
8617       *   the <code>deviceId</code> in as the <code>audioSource</code> or <code>videoSource</code>
8618       *   property of the <code>options</code> parameter of the
8619       *   <a href="#initPublisher">OT.initPublisher()</a> method.
8620       *   <p>
8621       *   The <code>label</code> property identifies the device. The <code>label</code>
8622       *   property is set to an empty string if the user has not previously granted access to
8623       *   a camera and microphone.</li>
8624       * </ul>
8625       * <i>Note:</i> The browser may limit the number of returned audio and video input devices
8626       * to one each before the user has granted access to a camera or microphone.
8627       *
8628       * @see <a href="#initPublisher">OT.initPublisher()</a>
8629       * @method OT.getDevices
8630       * @memberof OT
8631       */e.exports=function getDevices(e){o().then((t=>e(void 0,t)),e)}},function(e,t,n){var r=n(3);var o=r(n(12));var i=r(n(13));e.exports=function(e){void 0===e&&(e={});const t=e.deviceHelpers||n(23)(),r=t.hasAudioOutputApiSupport,a=t.hasDevice;const s=e.getAudioOutputDevices||n(320);const c=e.updateSubscribersSinkId||n(322);const l=n(11)();const u=n(4);const d=function(){var e=(0,i.default)(o.default.mark((function _callee(e){var t,n;return o.default.wrap((function _callee$(o){while(1)switch(o.prev=o.next){case 0:if(r()){o.next=2;break}
8631throw l(u.UNSUPPORTED_BROWSER,new Error("setAudioOutputDevice is not supported in your browser."));case 2:o.next=4;return s();case 4:t=o.sent;n=a(t,e);if(n){o.next=8;break}throw l(u.INVALID_AUDIO_OUTPUT_SOURCE,new Error("The requested device is not valid."));case 8:o.prev=8;o.next=11;return c(e);case 11:o.next=16;break;case 13:o.prev=13;o.t0=o.catch(8);throw l(u.REQUESTED_DEVICE_PERMISSION_DENIED,new Error("No permission to use the requested device."));case 16:case"end":return o.stop()}}),_callee,null,[[8,13]])})));return function setAudioOutputDevice(t){return e.apply(this||_global3,arguments)}}();return d}},function(e,t,n){var r=n(3);var o=r(n(12));var i=r(n(13));const a=n(724)();const s=n(23)(),c=s.hasAudioOutputApiSupport,l=s.getNativeMediaDevices;e.exports=()=>{if(c()){const e=l();let t=false;e.addEventListener("devicechange",(0,i.default)(o.default.mark((function _callee(){return o.default.wrap((function _callee$(e){while(1)switch(e.prev=e.next){case 0:if(!t){e.next=2;break}return e.abrupt("return");case 2:t=true;e.next=5;return a();case 5:t=false;case 6:case"end":return e.stop()}}),_callee)}))))}}},function(e,t,n){var r=n(3);var o=r(n(12));var i=r(n(13));e.exports=function(e){void 0===e&&(e={});const t=e.deviceHelpers||n(23)(),r=t.getAudioOutputMediaDevices,a=t.getDefaultAudioOutputDeviceId,s=t.hasDevice;const c=e.currentAudioOutputDevice||n(105),l=c.getCurrentAudioOutputDeviceId,u=c.setCurrentAudioOutputDeviceId;const d=e.updateSubscribersSinkId||n(322);const f=e.logging||n(1)("currentAudioOutputDevice");const p=function(){var e=(0,i.default)(o.default.mark((function _callee(){var e,t,n;return o.default.wrap((function _callee$(o){while(1)switch(o.prev=o.next){case 0:o.next=2;return r();case 2:e=o.sent;if(!(0===e.length)){o.next=6;break}u("");return o.abrupt("return");case 6:t=s(e,l());if(!t){o.next=9;break}return o.abrupt("return");case 9:n=a(e);u(n);o.prev=11;o.next=14;return d(n);case 14:o.next=19;break;case 16:o.prev=16;o.t0=o.catch(11);f.debug("Failed to set the default audio output device.",o.t0);case 19:case"end":return o.stop()}}),_callee,null,[[11,16]])})));return function audioOutputDevicesChangeHandler(){return e.apply(this||_global3,arguments)}}();return p}}])}));var exports$1=exports;const OT=exports.OT,__esModule=exports.__esModule,isArray=exports.isArray,isArrayBuffer=exports.isArrayBuffer,isBuffer=exports.isBuffer,isFormData=exports.isFormData,isArrayBufferView=exports.isArrayBufferView,isString=exports.isString,isNumber=exports.isNumber,isObject=exports.isObject,isPlainObject=exports.isPlainObject,isUndefined=exports.isUndefined,isDate=exports.isDate,isFile=exports.isFile,isBlob=exports.isBlob,isFunction=exports.isFunction,isStream=exports.isStream,isURLSearchParams=exports.isURLSearchParams,isStandardBrowserEnv=exports.isStandardBrowserEnv,forEach=exports.forEach,merge=exports.merge,extend=exports.extend,trim=exports.trim,stripBOM=exports.stripBOM,extractVersion=exports.extractVersion,wrapPeerConnectionEvent=exports.wrapPeerConnectionEvent,disableLog=exports.disableLog,once=exports.once,check=exports.check,value=exports.value,codes=exports.codes,messages=exports.messages,adaptIceServers=exports.adaptIceServers,parseIceServers=exports.parseIceServers,getCurrentAudioOutputDeviceId=exports.getCurrentAudioOutputDeviceId,setCurrentAudioOutputDeviceId=exports.setCurrentAudioOutputDeviceId,prependProxyToUrlIfNeeded=exports.prependProxyToUrlIfNeeded,errorMessages=exports.errorMessages,setProxyUrl=exports.setProxyUrl,TimeoutError=exports.TimeoutError,CancellationError=exports.CancellationError,STATUS=exports.STATUS,PONG=exports.PONG,PING=exports.PING,DISCONNECT=exports.DISCONNECT,CONNECT=exports.CONNECT,MESSAGE=exports.MESSAGE,UNSUBSCRIBE=exports.UNSUBSCRIBE,SUBSCRIBE=exports.SUBSCRIBE,parse=exports.parse,resolve=exports.resolve,resolveObject=exports.resolveObject,format=exports.format,Url=exports.Url,isSupportedInThisBrowser=exports.isSupportedInThisBrowser,isMediaStreamTrack=exports.isMediaStreamTrack,isValidVideoContentHint=exports.isValidVideoContentHint,setVideoContentHint=exports.setVideoContentHint,getVideoContentHint=exports.getVideoContentHint,build=exports.build,log=ex
8631ports.log,formatArgs=exports.formatArgs,save=exports.save,load=exports.load,useColors=exports.useColors,storage=exports.storage,colors=exports.colors,aliasToReal=exports.aliasToReal,aryMethod=exports.aryMethod,aryRearg=exports.aryRearg,iterateeAry=exports.iterateeAry,iterateeRearg=exports.iterateeRearg,methodRearg=exports.methodRearg,methodSpread=exports.methodSpread,mutate=exports.mutate,realToAlias=exports.realToAlias,remap=exports.remap,skipFixed=exports.skipFixed,skipRearg=exports.skipRearg,ary=exports.ary,decode=exports.decode,encode=exports.encode,stringify=exports.stringify,shimGetUserMedia=exports.shimGetUserMedia,shimLocalStreamsAPI=exports.shimLocalStreamsAPI,shimRTCIceCandidate=exports.shimRTCIceCandidate,deprecate=exports.deprecate,debuglog=exports.debuglog,inspect=exports.inspect,isBoolean=exports.isBoolean,isNull=exports.isNull,isNullOrUndefined=exports.isNullOrUndefined,isSymbol=exports.isSymbol,isRegExp=exports.isRegExp,isError=exports.isError,isPrimitive=exports.isPrimitive,inherits=exports.inherits,_extend=exports._extend,promisify=exports.promisify,callbackify=exports.callbackify,changeMediaDirectionToInactive=exports.changeMediaDirectionToInactive,parseStatsOldAPI=exports.parseStatsOldAPI,parseStatsNewAPI=exports.parseStatsNewAPI,isCallbackBasedAPI=exports.isCallbackBasedAPI,isPromiseBasedAPI=exports.isPromiseBasedAPI,normaliseOptions=exports.normaliseOptions,TextDecoder=exports.TextDecoder,TextEncoder=exports.TextEncoder;export{CONNECT,CancellationError,DISCONNECT,MESSAGE,OT,PING,PONG,STATUS,SUBSCRIBE,TextDecoder,TextEncoder,TimeoutError,UNSUBSCRIBE,Url,__esMo
8631dule,_extend,adaptIceServers,aliasToReal,ary,aryMethod,aryRearg,build,callbackify,changeMediaDirectionToInactive,check,codes,colors,debuglog,decode,exports$1 as default,deprecate,disableLog,encode,errorMessages,extend,extractVersion,forEach,format,formatArgs,getCurrentAudioOutputDeviceId,getVideoContentHint,inherits,inspect,isArray,isArrayBuffer,isArrayBufferView,isBlob,isBoolean,isBuffer,isCallbackBasedAPI,isDate,isError,isFile,isFormData,isFunction,isMediaStreamTrack,isNull,isNullOrUndefined,isNumber,isObject,isPlainObject,isPrimitive,isPromiseBasedAPI,isRegExp,isStandardBrowserEnv,isStream,isString,isSupportedInThisBrowser,isSymbol,isURLSearchParams,isUndefined,isValidVideoContentHint,iterateeAry,iterateeRearg,load,log,merge,messages,methodRearg,methodSpread,mutate,normaliseOptions,once,parse,parseIceServers,parseStatsNewAPI,parseStatsOldAPI,prependProxyToUrlIfNeeded,promisify,realToAlias,remap,resolve,resolveObject,save,setCurrentAudioOutputDeviceId,setProxyUrl,setVideoContentHint,shimGetUserMedia,shimLocalStreamsAPI,shimRTCIceCandidate,skipFixed,skipRearg,storage,stringify,stripBOM,trim,useColors,value,wrapPeerConnectionEvent};
8632
8633//# sourceMappingURL=opentok.js.map

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.