@vonage/client-sdk-video
Version:
The OpenTok.js library lets you use OpenTok-powered video sessions on the web
17 lines • 2.53 MB
JavaScript
/**
* @license OpenTok.js 2.34.1 9b9487b44
*
* Copyright (c) 2010-2026 TokBox, Inc.
* Subject to the applicable Software Development Kit (SDK) License Agreement:
* https://www.vonage.com/legal/communications-apis/terms-of-use/
*
* Date: Wed, 13 May 2026 07:24:06 GMT
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.OT=t():e.OT=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=391)}([function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";(function(e){var r=n(128);const{toString:i}=Object.prototype,{getPrototypeOf:o}=Object,{iterator:a,toStringTag:l}=Symbol,s=(d=Object.create(null),e=>{const t=i.call(e);return d[t]||(d[t]=t.slice(8,-1).toLowerCase())});var d;const c=e=>(e=e.toLowerCase(),t=>s(t)===e),A=e=>t=>typeof t===e,{isArray:u}=Array,Q=A("undefined");function h(e){return null!==e&&!Q(e)&&null!==e.constructor&&!Q(e.constructor)&&U(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g=c("ArrayBuffer");const F=A("string"),U=A("function"),p=A("number"),B=e=>null!==e&&"object"==typeof e,m=e=>{if("object"!==s(e))return!1;const t=o(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||l in e||a in e)},f=c("Date"),b=c("File"),R=c("Blob"),I=c("FileList");const Z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==(void 0!==typeof window?window:global)?void 0!==typeof window?window:global:{},C=void 0!==Z.FormData?Z.FormData:void 0,V=c("URLSearchParams"),[E,y,W,S]=["ReadableStream","Request","Response","Headers"].map(c);function v(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),u(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(h(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function N(e,t){if(h(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const J="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window||void 0!==typeof window?window:global,G=e=>!Q(e)&&e!==J;const k=(X="undefined"!=typeof Uint8Array&&o(Uint8Array),e=>X&&e instanceof X);var X;const T=c("HTMLFormElement"),w=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Y=c("RegExp"),D=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};v(n,(n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)}),Object.defineProperties(e,r)};const x=c("AsyncFunction"),M=(K="function"==typeof setImmediate,H=U(J.postMessage),K?setImmediate:H?(L="axios@"+Math.random(),O=[],J.addEventListener("message",({source:e,data:t})=>{e===J&&t===L&&O.length&&O.shift()()},!1),e=>{O.push(e),J.postMessage(L,"*")}):e=>setTimeout(e));var K,H,L,O;const z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(J):void 0!==e&&e.nextTick||M;t.a={isArray:u,isArrayBuffer:g,isBuffer:h,isFormData:e=>{let t;return e&&(C&&e instanceof C||U(e.append)&&("formdata"===(t=s(e))||"object"===t&&U(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t},isString:F,isNumber:p,isBoolean:e=>!0===e||!1===e,isObject:B,isPlainObject:m,isEmptyObject:e=>{if(!B(e)||h(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:E,isRequest:y,isResponse:W,isHeaders:S,isUndefined:Q,isDate:f,isFile:b,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:R,isRegExp:Y,isFunction:U,isStream:e=>B(e)&&U(e.pipe),isURLSearchParams:V,isTypedArray:k,isFileList:I,forEach:v,merge:function e(){const{caseless:t,skipUndefined:n}=G(this)&&this||{},r={},i=(i,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const a=t&&N(r,o)||o;m(r[a])&&m(i)?r[a]=e(r[a],i):m(i)?r[a]=e({},i):u(i)?r[a]=i.slice():n&&Q(i)||(r[a]=i)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&v(arguments[e],i);return r},extend:(e,t,n,{allOwnKeys:i}={})=>(v(t,(t,i)=>{n&&U(t)?Object.defineProperty(e,i,{value:Object(r.a)(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,a,l;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)l=i[a],r&&!r(l,e,t)||s[l]||(t[l]=e[l],s[l]=!0);e=!1!==n&&o(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!p(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[a]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:T,hasOwnProperty:w,hasOwnProp:w,reduceDescriptors:D,freezeMethods:e=>{D(e,(t,n)=>{if(U(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];U(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return u(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:N,global:J,isContextDefined:G,isSpecCompliantForm:function(e){return!!(e&&U(e.append)&&"FormData"===e[l]&&e[a])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(B(e)){if(t.indexOf(e)>=0)return;if(h(e))return e;if(!("toJSON"in e)){t[r]=e;const i=u(e)?[]:{};return v(e,(e,t)=>{const o=n(e,r+1);!Q(o)&&(i[t]=o)}),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:x,isThenable:e=>e&&(B(e)||U(e))&&U(e.then)&&U(e.catch),setImmediate:M,asap:z,isIterable:e=>null!=e&&U(e[a])}}).call(this,n(37))},function(e,t,n){(function(t){
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/var n;n=function(){"use strict";function e(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,i=void 0,o=void 0,a=function(e,t){Q[r]=e,Q[r+1]=t,2===(r+=2)&&(o?o(h):B())},l="undefined"!=typeof window?window:void 0,s=l||{},d=s.MutationObserver||s.WebKitMutationObserver,c="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),A="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function u(){var e=setTimeout;return function(){return e(h,1)}}var Q=new Array(1e3);function h(){for(var e=0;e<r;e+=2)(0,Q[e])(Q[e+1]),Q[e]=void 0,Q[e+1]=void 0;r=0}var g,F,U,p,B=void 0;function m(e,t){var n=this,r=new this.constructor(R);void 0===r[b]&&N(r);var i=n._state;if(i){var o=arguments[i-1];a((function(){return S(i,r,o,n._result)}))}else y(n,r,e,t);return r}function f(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(R);return Z(t,e),t}c?B=function(){return t.nextTick(h)}:d?(F=0,U=new d(h),p=document.createTextNode(""),U.observe(p,{characterData:!0}),B=function(){p.data=F=++F%2}):A?((g=new MessageChannel).port1.onmessage=h,B=function(){return g.port2.postMessage(0)}):B=void 0===l?function(){try{var e=Function("return this")().require("vertx");return void 0!==(i=e.runOnLoop||e.runOnContext)?function(){i(h)}:u()}catch(e){return u()}}():u();var b=Math.random().toString(36).substring(2);function R(){}function I(t,n,r){n.constructor===t.constructor&&r===m&&n.constructor.resolve===f?function(e,t){1===t._state?V(e,t._result):2===t._state?E(e,t._result):y(t,void 0,(function(t){return Z(e,t)}),(function(t){return E(e,t)}))}(t,n):void 0===r?V(t,n):e(r)?function(e,t,n){a((function(e){var r=!1,i=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,t!==n?Z(e,n):V(e,n))}),(function(t){r||(r=!0,E(e,t))}),e._label);!r&&i&&(r=!0,E(e,i))}),e)}(t,n,r):V(t,n)}function Z(e,t){if(e===t)E(e,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof(r=t),null===r||"object"!==i&&"function"!==i)V(e,t);else{var n=void 0;try{n=t.then}catch(t){return void E(e,t)}I(e,t,n)}var r,i}function C(e){e._onerror&&e._onerror(e._result),W(e)}function V(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&a(W,e))}function E(e,t){void 0===e._state&&(e._state=2,e._result=t,a(C,e))}function y(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+1]=n,i[o+2]=r,0===o&&e._state&&a(W,e)}function W(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,i=void 0,o=e._result,a=0;a<t.length;a+=3)r=t[a],i=t[a+n],r?S(n,r,i,o):i(o);e._subscribers.length=0}}function S(t,n,r,i){var o=e(r),a=void 0,l=void 0,s=!0;if(o){try{a=r(i)}catch(e){s=!1,l=e}if(n===a)return void E(n,new TypeError("A promises callback cannot return that same promise."))}else a=i;void 0!==n._state||(o&&s?Z(n,a):!1===s?E(n,l):1===t?V(n,a):2===t&&E(n,a))}var v=0;function N(e){e[b]=v++,e._state=void 0,e._result=void 0,e._subscribers=[]}var J=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(R),this.promise[b]||N(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?V(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&V(this.promise,this._result))):E(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;void 0===this._state&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===f){var i=void 0,o=void 0,a=!1;try{i=e.then}catch(e){a=!0,o=e}if(i===m&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===G){var l=new n(R);a?E(l,o):I(l,e,i),this._willSettleAt(l,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;void 0===r._state&&(this._remaining--,2===e?E(r,n):this._result[t]=n),0===this._remaining&&V(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;y(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}(),G=function(){function t(e){this[b]=v++,this._result=this._state=void 0,this._subscribers=[],R!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){Z(e,t)}),(function(t){E(e,t)}))}catch(t){E(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this.constructor;return e(t)?this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return G.prototype.then=m,G.all=function(e){return new J(this,e).promise},G.race=function(e){var t=this;return n(e)?new t((function(n,r){for(var i=e.length,o=0;o<i;o++)t.resolve(e[o]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},G.resolve=f,G.reject=function(e){var t=new this(R);return E(t,e),t},G._setScheduler=function(e){o=e},G._setAsap=function(e){a=e},G._asap=a,G.polyfill=function(){var e=void 0;if(void 0!==(void 0!==typeof window?window:global))e=void 0!==typeof window?window:global;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=G},G.Promise=G,G},e.exports=n()}).call(this,n(37))},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var i=r(n(446)),o=r(n(152)),a=r(n(153));const l=(0,o.default)(e=>{const t={};return Object.keys(a.default).forEach(n=>{const r=a.default[n].method,o=(0,i.default)(`OpenTok:${e}:${n.toLowerCase()}`);o.log=console[r].bind(console),t[n.toLowerCase()]=o}),t});l.setLogLevel=e=>{let t;try{t=(void 0!==typeof window?window:global).localStorage.debug}catch(e){t=""}const n=[...Object.keys(a.default).map(t=>`${e>=a.default[t].priority?"":"-"}(autogen)?OpenTok:*:${t.toLowerCase()}`),...(t||"").split(/[\s,]/).filter(e=>-1===e.indexOf("(autogen)?"))].filter(e=>e).join(",");i.default.enable(n)};var s=l;t.default=s},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var i=r(n(502)).default.parse();t.default=i},function(e,t,n){e.exports=n(442)},function(e,t,n){(function(t){function n(e,n,r,i,o,a,l){try{var s=e[a](l),d=s.value}catch(e){return void r(e)}s.done?n(d):t.resolve(d).then(i,o)}e.exports=function(e){return function(){var r=this,i=arguments;return new t((function(t,o){var a=e.apply(r,i);function l(e){n(a,t,o,l,s,"next",e)}function s(e){n(a,t,o,l,s,"throw",e)}l(void 0)}))}}}).call(this,n(2))},function(e,t,n){"use strict";var r=n(1);class i extends Error{static from(e,t,n,r,o,a){const l=new i(e.message,t||e.code,n,r,o);return l.cause=e,l.name=e.name,null!=e.status&&null==l.status&&(l.status=e.status),a&&Object.assign(l,a),l}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r.a.toJSONObject(this.config),code:this.code,status:this.status}}}i.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",i.ERR_BAD_OPTION="ERR_BAD_OPTION",i.ECONNABORTED="ECONNABORTED",i.ETIMEDOUT="ETIMEDOUT",i.ERR_NETWORK="ERR_NETWORK",i.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",i.ERR_DEPRECATED="ERR_DEPRECATED",i.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",i.ERR_BAD_REQUEST="ERR_BAD_REQUEST",i.ERR_CANCELED="ERR_CANCELED",i.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",i.ERR_INVALID_URL="ERR_INVALID_URL",t.a=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;t.default={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",FAILED_SET_CONFIGURATION:"OT_FAILED_SET_CONFIGURATION",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_FALLBACK_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",INVALID_ENCRYPTION_SECRET:"OT_INVALID_ENCRYPTION_SECRET"}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=function(e){const t=new a.default;t.on("newListener",e=>{t.emit(e+":added")}),t.on("removeListener",e=>{t.emit(e+":removed")});const n={eventsDispatched:{},on(e,n,r){return"string"==typeof e&&n?e.split(" ").forEach(e=>{t.on(e,(0,s.default)(n,r))}):Object.keys(e).forEach(r=>{t.on(r,(0,s.default)(e[r],n))}),this},off(e,n,r){return"string"==typeof e?this.off(e.split(" "),n,r):Array.isArray(e)?e.forEach(e=>{n&&(0,o.default)(n)?t.removeListener(e,(0,s.default)(n,r)):t.removeAllListeners(e)}):e?Object.keys(e).forEach(r=>{t.removeListener(r,(0,s.default)(e[r],n))}):t.removeAllListeners(),this},once(e,n,r){return"string"==typeof e&&n?e.split(" ").forEach(e=>{t.once(e,(0,s.default)(n,r))}):Object.keys(e).forEach(r=>{t.once(r,(0,s.default)(e[r],n))}),this},dispatchEvent(e){if(!e.type)throw new Error("dispatchEvent: Event has no type");return e.target||(e.target=this),this.trigger(e.type,e),this},dispatchEventOnce(e,t){this.isEventDispatched(e.type,t)||(this.dispatchEvent(e),this.eventsDispatched[e.type]?this.eventsDispatched[e.type].push(t):this.eventsDispatched[e.type]=[t])},isEventDispatched(e,t){var n;return null==(n=this.eventsDispatched[e])?void 0:n.includes(t)},trigger(e){try{for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit(e,...r)}catch(e){d.error("An error occurred in an event handler",e)}return this},emit(){return e.trigger(...arguments)},addEventListener:(t,n,r)=>(d.warn("The addEventListener() method is deprecated. Use on() or once() instead."),e.on(t,n,r)),removeEventListener:(t,n,r)=>(d.warn("The removeEventListener() method is deprecated. Use off() instead."),e.off(t,n,r)),listenerCount:e=>t.listenerCount(e)};return(0,i.default)(e,n)};var i=r(n(14)),o=r(n(21)),a=r(n(11)),l=r(n(3)),s=r(n(449));const d=(0,l.default)("Events")},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var i=r(n(167)),o=r(n(278)),a=r(n(9)),l=r(n(3)),s=r(n(4)),d=r(n(119)),c=r(n(279)),A=r(n(280)),u=r(n(578)),Q=r(n(282)),h=r(n(285)),g=r(n(592)),F=r(n(173));o.default.logging=(0,l.default)("OT.$"),o.default.env=s.default,o.default.ElementCollection=c.default,o.default.ajax=A.default,o.default.statable=u.default,o.default.Analytics=Q.default,o.default.Collection=h.default,o.default.domExtras=g.default,o.default.Error=F.default,(0,d.default)(o.default,"useLogHelpers",{value(e){const t=(0,l.default)("useLogHelpersDeprecatedMixin");return Object.keys(t).forEach(n=>{e[n]=t[n]}),e},name:"OT.useLogHelpers",getWarning:"Please use an external library for your debugging needs"}),o.default.defaults=i.default,(0,d.default)(o.default,"eventing",{value:a.default,name:"OT.$.eventing",getWarning:"Please use an external library to create an event emitter."}),Object.keys(o.default).forEach(e=>{const t=o.default[e]._attachToOTHelpers||{};Object.keys(t).forEach(n=>{!Object.hasOwnProperty.call(o.default,n)||"util"===e&&"bind"===n||console.warn(`More than one module is trying to define ${n} on OTHelpers.`),o.default[n]=t[n]})});var U=o.default;t.default=U},function(e,t,n){"use strict";(function(t){var n,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,n){return new t((function(t,r){function i(t){e.removeListener(n,o),r(t)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),t([].slice.call(arguments))}F(e,n,o,{once:!0}),"error"!==n&&function(e,t,n){"function"==typeof e.on&&F(e,"error",t,n)}(e,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function d(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,o,a,l;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=d(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,l=c,console&&console.warn&&console.warn(l)}return e}function A(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=A.bind(r);return i.listener=n,r.wrapFn=i,i}function Q(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):g(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function F(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return d(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var l=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw l.context=a,l}var s=o[e];if(void 0===s)return!1;if("function"==typeof s)i(s,this,t);else{var d=s.length,c=g(s,d);for(n=0;n<d;++n)i(c[n],this,t)}return!0},a.prototype.addListener=function(e,t){return c(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return c(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,u(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,u(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,o,a;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return Q(this,e,!0)},a.prototype.rawListeners=function(e){return Q(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}}).call(this,n(2))},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"hasBrowserEnv",(function(){return a})),n.d(r,"hasStandardBrowserWebWorkerEnv",(function(){return d})),n.d(r,"hasStandardBrowserEnv",(function(){return s})),n.d(r,"navigator",(function(){return l})),n.d(r,"origin",(function(){return c}));var i=n(131),o={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:i.a,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const a="undefined"!=typeof window&&"undefined"!=typeof document,l="object"==typeof navigator&&navigator||void 0,s=a&&(!l||["ReactNative","NativeScript","NS"].indexOf(l.product)<0),d="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,c=a&&window.location.href||"http://localhost";t.a={...r,...o}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r={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};t.default=r},function(e,t,n){var r=n(99),i=n(52),o=n(234),a=n(31),l=n(78),s=n(41),d=Object.prototype.hasOwnProperty,c=o((function(e,t){if(l(t)||a(t))i(t,s(t),e);else for(var n in t)d.call(t,n)&&r(e,n,t[n])}));e.exports=c},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=function(e){void 0===e&&(e={});const t=e.Errors||o.default,n=e.OTErrorClass||i.default,r=Object.keys(t).map(e=>t[e]);return function(e,t,i){if(-1===r.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 o=new n(void 0,t.message);if(o.name=e,!t.stack)try{throw t}catch(e){}return o.stack=t.stack,i&&(o.code=i),o}};var i=r(n(26)),o=r(n(8))},function(e,t,n){"use strict";var r=n(1);const i=r.a.toObjectSet(["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"]);const o=Symbol("internals");function a(e){return e&&String(e).trim().toLowerCase()}function l(e){return!1===e||null==e?e:r.a.isArray(e)?e.map(l):function(e){let t=e.length;for(;t>0;){const n=e.charCodeAt(t-1);if(10!==n&&13!==n)break;t-=1}return t===e.length?e:e.slice(0,t)}(String(e))}function s(e,t,n,i,o){return r.a.isFunction(i)?i.call(this,t,n):(o&&(t=n),r.a.isString(t)?r.a.isString(i)?-1!==t.indexOf(i):r.a.isRegExp(i)?i.test(t):void 0:void 0)}class d{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function s(e,t,n){const i=a(t);if(!i)throw new Error("header name must be a non-empty string");const s=r.a.findKey(o,i);(!s||void 0===o[s]||!0===n||void 0===n&&!1!==o[s])&&(!function e(t,n){if(!1!==t&&null!=t)if(r.a.isArray(t))t.forEach(t=>e(t,n));else if(!(e=>!/[\r\n]/.test(e))(String(t)))throw new Error(`Invalid character in header content ["${n}"]`)}(e,t),o[s||t]=l(e))}const d=(e,t)=>r.a.forEach(e,(e,n)=>s(e,n,t));if(r.a.isPlainObject(e)||e instanceof this.constructor)d(e,t);else if(r.a.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))d((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&i[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(r.a.isObject(e)&&r.a.isIterable(e)){let n,i,o={};for(const t of e){if(!r.a.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[i=t[0]]=(n=o[i])?r.a.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}d(o,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=a(e)){const n=r.a.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(r.a.isFunction(t))return t.call(this,e,n);if(r.a.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=a(e)){const n=r.a.findKey(this,e);return!(!n||void 0===this[n]||t&&!s(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function o(e){if(e=a(e)){const o=r.a.findKey(n,e);!o||t&&!s(0,n[o],o,t)||(delete n[o],i=!0)}}return r.a.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!s(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return r.a.forEach(this,(i,o)=>{const a=r.a.findKey(n,o);if(a)return t[a]=l(i),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();s!==o&&delete t[o],t[s]=l(i),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return r.a.forEach(this,(n,i)=>{null!=n&&!1!==n&&(t[i]=e&&r.a.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[o]=this[o]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=a(e);t[i]||(!function(e,t){const n=r.a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}(n,e),t[i]=!0)}return r.a.isArray(e)?e.forEach(i):i(e),this}}d.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),r.a.reduceDescriptors(d.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),r.a.freezeMethods(d);t.a=d},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(216),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=function(e){void 0===e&&(e={});const t=e.logging||(0,a.default)("Events"),n={ExceptionEvent:function(e,t,n,r,i,o,a){return new l.default(e,!1,{error:a,message:t,title:n,code:r,component:i,target:o})},IssueReportedEvent:function(e,t){return new l.default(e,!1,{issueId:t})},EnvLoadedEvent:function(e){return new l.default(e,!1)}};let r=!1;n.ConnectionEvent=function(e){function n(t,n,r){return e.call(this,t,!1,{connection:n,reason:r})||this}return(0,o.default)(n,e),(0,i.default)(n,[{key:"connections",get:function(){return r||(t.warn("OT.ConnectionEvent connections property is deprecated, use connection instead."),r=!0),[this.connection]}}]),n}(l.default);let d=!1;n.StreamEvent=function(e){function n(t,n,r,i){return e.call(this,t,i,{stream:n,reason:r})||this}return(0,o.default)(n,e),(0,i.default)(n,[{key:"streams",get:function(){return d||(t.warn("OT.StreamEvent streams property is deprecated, use stream instead."),d=!0),[this.stream]}}]),n}(l.default);let c=!1,A=!1,u=!1;return n.SessionConnectEvent=function(e){function n(t){return e.call(this,t,!1)||this}return(0,o.default)(n,e),(0,i.default)(n,[{key:"connections",get:function(){return c||(t.warn("OT.SessionConnectedEvent no longer includes connections. Listen for connectionCreated events instead."),c=!0),[]}},{key:"streams",get:function(){return A||(t.warn("OT.SessionConnectedEvent no longer includes streams. Listen for streamCreated events instead."),A=!0),[]}},{key:"archives",get:function(){return u||(t.warn("OT.SessionConnectedEvent no longer includes archives. Listen for archiveStarted events instead."),u=!0),[]}}]),n}(l.default),n.SessionReconnectingEvent=function(){return new l.default(s.default.SESSION_RECONNECTING,!1)},n.SessionReconnectedEvent=function(){return new l.default(s.default.SESSION_RECONNECTED)},n.SessionDisconnectEvent=function(e,t,n){return new l.default(e,n,{reason:t})},n.StreamPropertyChangedEvent=function(e,t,n,r,i){return new l.default(e,!1,{stream:t,changedProperty:n,oldValue:r,newValue:i})},n.VideoDimensionsChangedEvent=function(e,t,n){return new l.default("videoDimensionsChanged",!1,{target:e,oldValue:t,newValue:n})},n.ArchiveEvent=function(e,t){return new l.default(e,!1,{id:t.id,name:t.name,status:t.status,archive:t})},n.ArchiveUpdatedEvent=function(e,t,n,r){return new l.default("updated",!1,{target:e,changedProperty:t,oldValue:n,newValue:r})},n.SignalEvent=function(e,t,n){return new l.default(e?"signal:"+e:s.default.SIGNAL,!1,{data:t,from:n})},n.CpuPerformanceChangedEvent=function(e){return new l.default("cpuPerformanceChanged",!1,{cpuPerformanceState:e})},n.QualityScoreChangedEvent=function(e){return new l.default("qualityScoreChanged",!1,{qualityScore:e})},n.CaptionReceivedEvent=function(e,t,n){return new l.default("caption",!1,{caption:e,streamId:t,isFinal:n})},n.PublisherCaptionsEnabled=function(e){return new l.default("publisherCaptionsEnabled",!1,{captionsEnabled:e})},n.MediaStreamAvailableEvent=function(e){return new l.default("mediaStreamAvailable",!1,{mediaStream:e})},n.StreamUpdatedEvent=function(e,t,n,r){return new l.default("updated",!1,{target:e,changedProperty:t,oldValue:n,newValue:r})},n.DestroyedEvent=function(e,t,n){return new l.default(e,!1,{target:t,reason:n})},n.ConnectionStateChangedEvent=function(e,t,n){return new l.default(e,!1,{target:t,mediaMode:n})},n.VideoEnabledChangedEvent=function(e,t){return new l.default(e,!1,{reason:t.reason})},n.VideoDisableWarningEvent=function(e){return new l.default(e,!1)},n.AudioLevelUpdatedEvent=function(e){return new l.default(s.default.AUDIO_LEVEL_UPDATED,!1,{audioLevel:e})},n.AudioInputDeviceChangedEvent=function(e){return new l.default(s.default.AUDIO_INPUT_DEVICE_CHANGED,!1,{device:e})},n.MediaStoppedEvent=function(e,t){return new l.default(s.default.MEDIA_STOPPED,!0,{target:e,track:t})},n.MuteForcedEvent=function(e){return new l.default(s.default.MUTE_FORCED,!1,e)},n.VideoElementCreatedEvent=function(e){return new l.default(s.default.VIDEO_ELEMENT_CREATED,!1,{element:e})},n};var i=r(n(30)),o=r(n(27)),a=r(n(3)),l=r(n(168)),s=r(n(32))},function(e,t,n){var r=n(40),i=n(15);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(579),i=n(580),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){"use strict";t.__esModule=!0,t.MEDIUM=t.LOW=t.CongestionLevels=t.CRITICAL=void 0;t.CRITICAL=2;t.MEDIUM=1;t.LOW=0;const r={CRITICAL:2,MEDIUM:1,LOW:0};t.CongestionLevels=r},function(e,t,n){"use strict";(function(e){var r=n(0);t.__esModule=!0,t.default=void 0;var i=r(n(5)),o=r(n(6)),a=r(n(4)),l=r(n(117)),s=r(n(277)),d=r(n(570));var c=function(t){void 0===t&&(t={});const n=t.getNativeEnumerateDevices||(0,s.default)(),r=t.getNativeMediaDevices||(0,d.default)(),c=(t.currentAudioOutputDevice||l.default).getCurrentAudioOutputDeviceId,A=t.env||a.default,u=t.global||(void 0!==typeof window?window:global),Q={},h={audio:"audioInput",video:"videoInput",audioinput:"audioInput",videoinput:"videoInput",audiooutput:"audioOutput",audioInput:"audioInput",videoInput:"videoInput",audioOutput:"audioOutput"};return Q.getNativeMediaDevices=()=>r(),Q.hasEnumerateDevicesCapability=()=>"function"==typeof n(),Q.hasDeviceChangeCapability=()=>{const e=r();return!(!e||!("ondevicechange"in e))},Q.hasSetSinkIdCapability=()=>"setSinkId"in(null==u?void 0:u.HTMLMediaElement.prototype),Q.hasAudioOutputApiSupport=()=>{if(A.isFirefox&&A.version<=126)return!1;const e=t.hasSetSinkIdCapability,n=void 0===e?Q.hasSetSinkIdCapability:e,r=t.hasDeviceChangeCapability,i=void 0===r?Q.hasDeviceChangeCapability:r;return n()&&i()},Q.hasEnumerateDevicesBug=()=>A.isSafari&&13.1===A.version,Q.getMediaDevices=()=>Q.hasEnumerateDevicesCapability()?n()().then(e=>e.map(e=>({deviceId:e.deviceId||e.id,label:e.label,kind:h[e.kind]}))):e.reject(new Error("This browser does not support enumerateDevices APIs")),Q.getInputMediaDevices=()=>Q.getMediaDevices().then(e=>e.filter(e=>/^(audio|video)Input$/.test(e.kind))),Q.getAudioOutputMediaDevices=()=>Q.getMediaDevices().then(e=>e.filter(e=>"audioOutput"===e.kind).map(e=>({deviceId:e.deviceId,label:e.label}))),Q.getAudioInputMediaDevices=()=>Q.getMediaDevices().then(e=>e.filter(e=>"audioInput"===e.kind).map(e=>({deviceId:e.deviceId,label:e.label}))),Q.shouldAskForDevices=()=>Q.hasEnumerateDevicesCapability()?Q.getInputMediaDevices().then(e=>{if(0===e.length)return{video:!0,audio:!0};const t=e.filter(e=>"audioInput"===e.kind),n=e.filter(e=>"videoInput"===e.kind);return Q.hasEnumerateDevicesBug()&&0===n.length?{audio:!0,video:!0}:{video:n.length>0,audio:t.length>0,videoDevices:n,audioDevices:t}}).catch(()=>({video:!0,audio:!0})):e.resolve({video:!0,audio:!0}),Q.getDefaultAudioOutputDeviceId=e=>{if(!Array.isArray(e)||0===e.length)return"";return(e.find(e=>"default"===e.deviceId)||e[0]).deviceId},Q.hasDevice=(e,t)=>{let n=e;return Array.isArray(n)||(n=[]),n.some(e=>e.deviceId===t)},Q.getActiveAudioOutputDevice=(0,o.default)(i.default.mark((function e(){var t,n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Q.getAudioOutputMediaDevices();case 3:t=e.sent,e.next=9;break;case 6:throw e.prev=6,e.t0=e.catch(0),e.t0;case 9:if(0!==t.length){e.next=11;break}return e.abrupt("return",{deviceId:null,label:null});case 11:return(n=t.find(e=>e.deviceId===c()))||(r=Q.getDefaultAudioOutputDeviceId(t),n=t.find(e=>e.deviceId===r)),e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[0,6]])}))),Q};t.default=c}).call(this,n(2))},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var i=r(n(9)),o=r(n(3)),a=r(n(20)),l=r(n(32)),s=r(n(584));const d=(0,o.default)("GlobalExceptionHandler"),c=(0,a.default)(),A=function(e,t){Error.call(this),this.code=e,this.message=t};(A.prototype=Object.create(Error.prototype)).constructor=A,(0,i.default)(A),A.getTitleByCode=function(e){return s.default[+e]},A.handleJsException=e=>{let t=e.error,n=e.errorMsg,r=e.code,i=e.target,o=e.analytics;if(!i)throw new Error("handleJsException requires target");const a=()=>void 0!==r?r:t&&t.code,s=()=>void 0!==n?n:t&&t.message,u=A.getTitleByCode(a());d.error(`OT.exception :: title: ${u} (${a()}) msg: ${s()}`);try{const e={partnerId:i.session?i.session.apiKey:i.apiKey,sessionId:i.session?i.session.sessionId:i.sessionId};o.logError(a(),"tb.exception",u,{details:s()},e);const n=new c.ExceptionEvent(l.default.EXCEPTION,s(),u,a(),i,i,t);if(t)n.stack=t.stack;else try{throw new Error}catch(e){n.stack=e.stack}A.dispatchEvent(n)}catch(e){d.error("OT.exception :: Failed to dispatch exception - "+e.toString())}};var u=A;t.default=u},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var i=r(n(285));var o={publishers:new i.default("guid"),subscribers:new i.default("widgetId"),sessions:new i.default};t.default=o},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var i=r(n(14)),o=r(n(87)),a=r(n(311)),l=r(n(169)),s=r(n(312)),d=r(n(3)),c=r(n(313));function A(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,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.")}function u(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 Q=(0,d.default)("SDPHelpers"),h={getSections:e=>e.split(/\r\n|\r|\n/).reduce((e,t)=>{const n=t.match(/^m=(\w+) \d+/);return n&&(e.sections[e.section=n[1]]=[]),e.sections[e.section].push(t),e},{sections:{header:[]},section:"header"}).sections,getCodecsFromSection:e=>({codecs:e[0].match(/m=\w+ \d+ [A-Z/]+ ([\d ]+)$/)[1].split(" "),codecMap:(0,i.default)(...e.filter(e=>e.match(/^a=rtpmap:\d+/)).map(e=>e.match(/^a=rtpmap:(\d+) ([\w-]+)/).splice(1)).map(e=>({[e[0]]:e[1]})))}),getCodecsAndCodecMap(e,t){const n=h.getSections(e)[t];if(!n)throw new Error("no mediaType "+t);return h.getCodecsFromSection(n)},getCodecs(e,t){const n=h.getCodecsAndCodecMap(e,t);return n.codecs.map(e=>n.codecMap[e]||"Unknown codec")},MediaDirection:c.default,iceCredentials:{ufrag:"a=ice-ufrag:",pwd:"a=ice-pwd:"},getMLineIndex:function(e,t){const n="m="+t;return(0,a.default)(e,e=>-1!==e.indexOf(n))},getMLine:function(e,t){const n=h.getMLineIndex(e,t);return n>-1?e[n]:void 0},hasMediaType:(e,t)=>{const n=new RegExp("^m="+t),r=e.split("\r\n");return(0,a.default)(r,e=>n.test(e))>=0},hasMLinePayloadType:function(e,t,n){const r=h.getMLine(e,t);return h.getMLinePayloadTypes(r,t).indexOf(n)>-1},getMLinePayloadTypes:function(e,t){const n=new RegExp(`^m=${t} \\d+(/\\d+)? [a-zA-Z0-9/]+(( [a-zA-Z0-9/]+)+)$`,"i"),r=e.match(n);return!r||r.length<2?[]:r[2].trim().split(" ")},splitSections:function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},getLinesPerSection:e=>h.splitSections(e).map(e=>h.getSDPLines(e)),replaceDirectionInSdpLines:(e,t,n)=>{const r=e.join("\r\n");return h.replaceDirection(r,t,n).split("\r\n")},replaceDirection:(e,t,n)=>{const r=new RegExp("a="+t,"g");return e.replace(r,"a="+n)},setSubscriberMediaSectionToInactive:e=>{const t=c.default.SENDONLY,n=c.default.INACTIVE;return h.replaceDirectionInSdpLines(e,t,n)},changeMediaDirection:function(e,t){const n=h.splitSections(e);let r=n.shift();const i=c.default.RECVONLY,o=c.default.INACTIVE,a=t===i?o:i;return n.forEach(e=>{const n=e.includes("m=video")?h.replaceDirection(e,a,t):e;r+=n}),r},removeTypesFromMLine:function(e,t){const n=/[0-9 ]*$/.exec(e)[0],r=n.split(" ").filter(e=>""!==e&&-1===t.indexOf(e));return e.replace(n," "+r.join(" "))},removeMediaEncoding:function(e,t,n){let r,i,o,a,l=e.split("\r\n");const s=h.getMLineIndex(l,t),d=s>-1?l[s]:void 0,c=[];if(-1===s)return l.join("\r\n");if(r=h.getMLinePayloadTypes(d,t),0===r.length)return l.join("\r\n");for(i=s;i<l.length;i++){const e=new RegExp(n,"i");0===l[i].indexOf("a=rtpmap:")&&(a=l[i].split(" "),2===a.length&&e.test(a[1])&&c.push(a[0].substr(9)))}if(!c.length)return l.join("\r\n");for(i=s;i<l.length;i++)if(0===l[i].indexOf("a=fmtp:"))for(a=l[i].split(" "),o=0;o<c.length;o++)2===a.length&&a[1]==="apt="+c[o]&&c.push(a[0].substr(7));return l=l.filter(e=>{for(let t=0;t<c.length;t++)if(0===e.indexOf(`a=rtpmap:${c[t]} `)||0===e.indexOf(`a=fmtp:${c[t]} `)||0===e.indexOf(`a=rtcp-fb:${c[t]} `))return!1;return!0}),c.length>0&&s>-1&&(l[s]=h.removeTypesFromMLine(d,c)),l.join("\r\n")},disableMediaType:function(e,t){const n=e.split("\r\n"),r=[];let i;n.forEach(e=>{let t=e;/^m=/.test(t)&&(i=void 0),i||(i=[],r.push(i)