UNPKG

cloudhub-rtc-js-sdk

Version:

CloudHubRtc JSSDK

1 lines 841 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CloudHubRTC=t():e.CloudHubRTC=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=735)}([function(e,t,r){e.exports=r(697)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(192);function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),n(e,i.key,i)}}e.exports=function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),n(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(240),i=r(358);function o(t){return e.exports=o=n?i:function(e){return e.__proto__||i(e)},e.exports.__esModule=!0,e.exports.default=e.exports,o(t)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(357),i=r(192),o=r(700);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=n(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),i(e,"prototype",{writable:!1}),t&&o(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(6).default,i=r(701);e.exports=function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(173),i=r(426);function o(t){return e.exports=o="function"==typeof n&&"symbol"==typeof i?function(e){return typeof e}:function(e){return e&&"function"==typeof n&&e.constructor===n&&e!==n.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,o(t)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){e.exports=r(509)},function(e,t,r){var n=r(594),i=r(598),o=r(353),a=r(605);e.exports=function(e){return n(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){e.exports=r(439)},function(e,t,r){e.exports=r(484)},function(e,t,r){var n=r(225),i=r(54),o=r(557);n||i(Object.prototype,"toString",o,{unsafe:!0})},function(e,t,r){e.exports=r(299)},function(e,t,r){(function(t){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,r(198))},function(e,t,r){(function(t){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,r(198))},function(e,t,r){"use strict";var n=r(14),i=r(118),o=r(23),a=r(37),s=r(95).f,c=r(272),u=r(26),d=r(80),l=r(79),f=r(42),h=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return i(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var r,i,p,v,m,g,_,y,b=e.target,k=e.global,S=e.stat,w=e.proto,T=k?n:S?n[b]:(n[b]||{}).prototype,C=k?u:u[b]||l(u,b,{})[b],I=C.prototype;for(p in t)r=!c(k?p:b+(S?".":"#")+p,e.forced)&&T&&f(T,p),m=C[p],r&&(g=e.noTargetGet?(y=s(T,p))&&y.value:T[p]),v=r&&g?g:t[p],r&&typeof m==typeof v||(_=e.bind&&r?d(v,n):e.wrap&&r?h(v):w&&a(v)?o(v):v,(e.sham||v&&v.sham||m&&m.sham)&&l(_,"sham",!0),l(C,p,_),w&&(f(u,i=b+"Prototype")||l(u,i,{}),l(u[i],p,v),e.real&&I&&!I[p]&&l(I,p,v)))}},function(e,t,r){e.exports=r(280)},function(e,t,r){e.exports=r(639)()},function(e,t,r){e.exports=r(539)},function(e,t,r){e.exports=r(505)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){var n=r(179),i=Function.prototype,o=i.bind,a=i.call,s=n&&o.bind(a,a);e.exports=n?function(e){return e&&s(e)}:function(e){return e&&function(){return a.apply(e,arguments)}}},function(e,t,r){e.exports=r(347)},function(e,t,r){var n=r(141),i=Function.prototype,o=i.bind,a=i.call,s=n&&o.bind(a,a);e.exports=n?function(e){return e&&s(e)}:function(e){return e&&function(){return a.apply(e,arguments)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){var n=r(356);function i(e,t,r,i,o,a,s){try{var c=e[a](s),u=c.value}catch(e){return void r(e)}c.done?t(u):n.resolve(u).then(i,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new n((function(n,o){var a=e.apply(t,r);function s(e){i(a,n,o,s,c,"next",e)}function c(e){i(a,n,o,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports={}},function(e,t,r){e.exports=r(390)},function(e,t,r){e.exports=r(290)},function(e,t,r){"use strict";var n,i,o,a=r(242),s=r(48),c=r(13),u=r(31),d=r(60),l=r(46),f=r(133),h=r(130),p=r(76),v=r(54),m=r(49).f,g=r(74),_=r(191),y=r(135),b=r(38),k=r(181),S=c.Int8Array,w=S&&S.prototype,T=c.Uint8ClampedArray,C=T&&T.prototype,I=S&&_(S),A=w&&_(w),R=Object.prototype,x=c.TypeError,E=b("toStringTag"),D=k("TYPED_ARRAY_TAG"),M=k("TYPED_ARRAY_CONSTRUCTOR"),P=a&&!!y&&"Opera"!==f(c.opera),L=!1,O={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},N={BigInt64Array:8,BigUint64Array:8},B=function(e){if(!d(e))return!1;var t=f(e);return l(O,t)||l(N,t)};for(n in O)(o=(i=c[n])&&i.prototype)?p(o,M,i):P=!1;for(n in N)(o=(i=c[n])&&i.prototype)&&p(o,M,i);if((!P||!u(I)||I===Function.prototype)&&(I=function(){throw x("Incorrect invocation")},P))for(n in O)c[n]&&y(c[n],I);if((!P||!A||A===R)&&(A=I.prototype,P))for(n in O)c[n]&&y(c[n].prototype,A);if(P&&_(C)!==A&&y(C,A),s&&!l(A,E))for(n in L=!0,m(A,E,{get:function(){return d(this)?this[D]:void 0}}),O)c[n]&&p(c[n],D,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_CONSTRUCTOR:M,TYPED_ARRAY_TAG:L&&D,aTypedArray:function(e){if(B(e))return e;throw x("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!y||g(I,e)))return e;throw x(h(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(s){if(r)for(var i in O){var o=c[i];if(o&&l(o.prototype,e))try{delete o.prototype[e]}catch(r){try{o.prototype[e]=t}catch(e){}}}A[e]&&!r||v(A,e,r?t:P&&w[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(s){if(y){if(r)for(n in O)if((i=c[n])&&l(i,e))try{delete i[e]}catch(e){}if(I[e]&&!r)return;try{return v(I,e,r?t:P&&I[e]||t)}catch(e){}}for(n in O)!(i=c[n])||i[e]&&!r||v(i,e,t)}},isView:function(e){if(!d(e))return!1;var t=f(e);return"DataView"===t||l(O,t)||l(N,t)},isTypedArray:B,TypedArray:I,TypedArrayPrototype:A}},function(e,t,r){e.exports=r(490)},function(e,t){e.exports=function(e){return"function"==typeof e}},function(e,t,r){e.exports=r(268)},function(e,t,r){var n=r(23);e.exports=n({}.isPrototypeOf)},function(e,t,r){"use strict";var n=r(39),i=r(187);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,r){var n=r(14),i=r(143),o=r(42),a=r(165),s=r(116),c=r(271),u=i("wks"),d=n.Symbol,l=d&&d.for,f=c?d:d&&d.withoutSetter||a;e.exports=function(e){if(!o(u,e)||!s&&"string"!=typeof u[e]){var t="Symbol."+e;s&&o(d,e)?u[e]=d[e]:u[e]=c&&l?l(t):f(t)}return u[e]}},function(e,t,r){var n=r(179),i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},function(e,t){e.exports=function(e){return"function"==typeof e}},function(e,t,r){var n=r(13),i=r(131),o=r(46),a=r(181),s=r(128),c=r(318),u=i("wks"),d=n.Symbol,l=d&&d.for,f=c?d:d&&d.withoutSetter||a;e.exports=function(e){if(!o(u,e)||!s&&"string"!=typeof u[e]){var t="Symbol."+e;s&&o(d,e)?u[e]=d[e]:u[e]=c&&l?l(t):f(t)}return u[e]}},function(e,t,r){var n=r(13),i=r(125).f,o=r(76),a=r(54),s=r(221),c=r(322),u=r(186);e.exports=function(e,t){var r,d,l,f,h,p=e.target,v=e.global,m=e.stat;if(r=v?n:m?n[p]||s(p,{}):(n[p]||{}).prototype)for(d in t){if(f=t[d],l=e.noTargetGet?(h=i(r,d))&&h.value:r[d],!u(v?d:p+(m?".":"#")+d,e.forced)&&void 0!==l){if(typeof f==typeof l)continue;c(f,l)}(e.sham||l&&l.sham)&&o(f,"sham",!0),a(r,d,f,e)}}},function(e,t,r){e.exports=r(443)},function(e,t,r){var n=r(24);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,r){var n=r(23),i=r(63),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},function(e,t,r){var n=r(26),i=r(42),o=r(213),a=r(58).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,r){var n=r(141),i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},function(e,t,r){var n=r(26);e.exports=function(e){return n[e+"Prototype"]}},function(e,t,r){var n=r(21),i=r(70),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},function(e,t,r){var n=r(37);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},function(e,t,r){var n=r(20);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,r){var n=r(13),i=r(48),o=r(319),a=r(320),s=r(50),c=r(151),u=n.TypeError,d=Object.defineProperty,l=Object.getOwnPropertyDescriptor;t.f=i?a?function(e,t,r){if(s(e),t=c(t),s(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=l(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return d(e,t,r)}:d:function(e,t,r){if(s(e),t=c(t),s(r),o)try{return d(e,t,r)}catch(e){}if("get"in r||"set"in r)throw u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(13),i=r(60),o=n.String,a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not an object")}},function(e,t,r){e.exports=r(578)},function(e,t,r){var n=r(21),i=r(54),o=Date.prototype,a=n(o.toString),s=n(o.getTime);"Invalid Date"!=String(new Date(NaN))&&i(o,"toString",(function(){var e=s(this);return e==e?a(this):"Invalid Date"}))},function(e,t,r){e.exports=r(348)},function(e,t,r){var n=r(13),i=r(31),o=r(76),a=r(321),s=r(221);e.exports=function(e,t,r,c){var u=!!c&&!!c.unsafe,d=!!c&&!!c.enumerable,l=!!c&&!!c.noTargetGet,f=c&&void 0!==c.name?c.name:t;return i(r)&&a(r,f,c),e===n?(d?e[t]=r:s(t,r),e):(u?!l&&e[t]&&(d=!0):delete e[t],d?e[t]=r:o(e,t,r),e)}},function(e,t,r){var n=r(48),i=r(152).EXISTS,o=r(21),a=r(49).f,s=Function.prototype,c=o(s.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,d=o(u.exec);n&&!i&&a(s,"name",{configurable:!0,get:function(){try{return d(u,c(this))[1]}catch(e){return""}}})},function(e,t,r){var n=r(14),i=r(47),o=n.String,a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not an object")}},function(e,t,r){var n=r(26),i=r(14),o=r(37),a=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?a(n[e])||a(i[e]):n[e]&&n[e][t]||i[e]&&i[e][t]}},function(e,t,r){var n=r(14),i=r(41),o=r(269),a=r(270),s=r(56),c=r(163),u=n.TypeError,d=Object.defineProperty,l=Object.getOwnPropertyDescriptor;t.f=i?a?function(e,t,r){if(s(e),t=c(t),s(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=l(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return d(e,t,r)}:d:function(e,t,r){if(s(e),t=c(t),s(r),o)try{return d(e,t,r)}catch(e){}if("get"in r||"set"in r)throw u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(14),i=r(97),o=n.String;e.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},function(e,t,r){var n=r(31);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},function(e,t){e.exports=!0},function(e,t,r){var n=r(14),i=r(37),o=r(142),a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a function")}},function(e,t,r){var n=r(14),i=r(106),o=n.Object;e.exports=function(e){return o(i(e))}},function(e,t,r){var n=r(13),i=r(31),o=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(n[e]):n[e]&&n[e][t]}},function(e,t,r){var n=r(13),i=r(133),o=n.String;e.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},function(e,t,r){e.exports=r(480)},function(e,t,r){e.exports=r(610)},function(e,t,r){e.exports=r(606)},function(e,t,r){var n=r(162),i=r(106);e.exports=function(e){return n(i(e))}},function(e,t,r){var n=r(13),i=r(110),o=n.Object;e.exports=function(e){return o(i(e))}},function(e,t,r){var n=r(85);e.exports=function(e){return n(e.length)}},function(e,t,r){var n=r(207);e.exports=function(e){return n(e.length)}},function(e,t,r){var n=r(79);e.exports=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e}},function(e,t,r){var n=r(21);e.exports=n({}.isPrototypeOf)},function(e,t){e.exports=!1},function(e,t,r){var n=r(48),i=r(49),o=r(126);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){e.exports=r(279)},function(e,t,r){e.exports=r(487)},function(e,t,r){var n=r(41),i=r(58),o=r(94);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(23),i=r(62),o=r(141),a=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},function(e,t,r){var n=r(209),i=r(58).f,o=r(79),a=r(42),s=r(382),c=r(35)("toStringTag");e.exports=function(e,t,r,u){if(e){var d=r?e:e.prototype;a(d,c)||i(d,c,{configurable:!0,value:t}),u&&!n&&o(d,"toString",s)}}},function(e,t,r){var n=r(180),i=r(110);e.exports=function(e){return n(i(e))}},function(e,t,r){var n=r(13),i=r(31),o=r(130),a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a function")}},function(e,t,r){var n,i,o,a=r(548),s=r(13),c=r(21),u=r(60),d=r(76),l=r(46),f=r(220),h=r(184),p=r(185),v=s.TypeError,m=s.WeakMap;if(a||f.state){var g=f.state||(f.state=new m),_=c(g.get),y=c(g.has),b=c(g.set);n=function(e,t){if(y(g,e))throw new v("Object already initialized");return t.facade=e,b(g,e,t),t},i=function(e){return _(g,e)||{}},o=function(e){return y(g,e)}}else{var k=h("state");p[k]=!0,n=function(e,t){if(l(e,k))throw new v("Object already initialized");return t.facade=e,d(e,k,t),t},i=function(e){return l(e,k)?e[k]:{}},o=function(e){return l(e,k)}}e.exports={set:n,get:i,has:o,enforce:function(e){return o(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=i(t)).type!==e)throw v("Incompatible receiver, "+e+" required");return r}}}},function(e,t,r){var n=r(100),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){"use strict";var n=r(113),i=r(36),o=r(21),a=r(228),s=r(20),c=r(50),u=r(31),d=r(100),l=r(85),f=r(65),h=r(110),p=r(229),v=r(129),m=r(550),g=r(230),_=r(38)("replace"),y=Math.max,b=Math.min,k=o([].concat),S=o([].push),w=o("".indexOf),T=o("".slice),C="$0"==="a".replace(/./,"$0"),I=!!/./[_]&&""===/./[_]("a","$0");a("replace",(function(e,t,r){var o=I?"$":"$0";return[function(e,r){var n=h(this),o=null==e?void 0:v(e,_);return o?i(o,e,n,r):i(t,f(n),e,r)},function(e,i){var a=c(this),s=f(e);if("string"==typeof i&&-1===w(i,o)&&-1===w(i,"$<")){var h=r(t,a,s,i);if(h.done)return h.value}var v=u(i);v||(i=f(i));var _=a.global;if(_){var C=a.unicode;a.lastIndex=0}for(var I=[];;){var A=g(a,s);if(null===A)break;if(S(I,A),!_)break;""===f(A[0])&&(a.lastIndex=p(s,l(a.lastIndex),C))}for(var R,x="",E=0,D=0;D<I.length;D++){for(var M=f((A=I[D])[0]),P=y(b(d(A.index),s.length),0),L=[],O=1;O<A.length;O++)S(L,void 0===(R=A[O])?R:String(R));var N=A.groups;if(v){var B=k([M],L,P,s);void 0!==N&&S(B,N);var U=f(n(i,void 0,B))}else U=m(M,s,P,L,N,i);P>=E&&(x+=T(s,E,P)+U,E=P+M.length)}return x+T(s,E)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!C||I)},function(e,t,r){var n=r(157),i=r(21),o=r(180),a=r(70),s=r(71),c=r(676),u=i([].push),d=function(e){var t=1==e,r=2==e,i=3==e,d=4==e,l=6==e,f=7==e,h=5==e||l;return function(p,v,m,g){for(var _,y,b=a(p),k=o(b),S=n(v,m),w=s(k),T=0,C=g||c,I=t?C(p,w):r||f?C(p,0):void 0;w>T;T++)if((h||T in k)&&(y=S(_=k[T],T,b),e))if(t)I[T]=y;else if(y)switch(e){case 3:return!0;case 5:return _;case 6:return T;case 2:u(I,_)}else switch(e){case 4:return!1;case 7:u(I,_)}return l?-1:i||d?d:I}};e.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6),filterReject:d(7)}},function(e,t,r){e.exports=r(621)},function(e,t,r){e.exports=r(623)},function(e,t,r){r(91);var n=r(384),i=r(14),o=r(97),a=r(79),s=r(115),c=r(35)("toStringTag");for(var u in n){var d=i[u],l=d&&d.prototype;l&&o(l)!==c&&a(l,c,u),s[u]=s.Array}},function(e,t,r){"use strict";var n=r(69),i=r(199),o=r(115),a=r(92),s=r(58).f,c=r(204),u=r(61),d=r(41),l=a.set,f=a.getterFor("Array Iterator");e.exports=c(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:n(e),index:0,kind:t})}),(function(){var e=f(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values");var h=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!u&&d&&"values"!==h.name)try{s(h,"name",{value:"values"})}catch(e){}},function(e,t,r){var n,i,o,a=r(378),s=r(14),c=r(23),u=r(47),d=r(79),l=r(42),f=r(201),h=r(166),p=r(144),v=s.TypeError,m=s.WeakMap;if(a||f.state){var g=f.state||(f.state=new m),_=c(g.get),y=c(g.has),b=c(g.set);n=function(e,t){if(y(g,e))throw new v("Object already initialized");return t.facade=e,b(g,e,t),t},i=function(e){return _(g,e)||{}},o=function(e){return y(g,e)}}else{var k=h("state");p[k]=!0,n=function(e,t){if(l(e,k))throw new v("Object already initialized");return t.facade=e,d(e,k,t),t},i=function(e){return l(e,k)?e[k]:{}},o=function(e){return l(e,k)}}e.exports={set:n,get:i,has:o,enforce:function(e){return o(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=i(t)).type!==e)throw v("Incompatible receiver, "+e+" required");return r}}}},function(e,t,r){var n=r(57);e.exports=n("navigator","userAgent")||""},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(41),i=r(44),o=r(167),a=r(94),s=r(69),c=r(163),u=r(42),d=r(269),l=Object.getOwnPropertyDescriptor;t.f=n?l:function(e,t){if(e=s(e),t=c(t),d)try{return l(e,t)}catch(e){}if(u(e,t))return a(!i(o.f,e,t),e[t])}},function(e,t,r){var n,i=r(56),o=r(205),a=r(208),s=r(144),c=r(277),u=r(202),d=r(166),l=d("IE_PROTO"),f=function(){},h=function(e){return"<script>"+e+"<\/script>"},p=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t;v="undefined"!=typeof document?document.domain&&n?p(n):((t=u("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):p(n);for(var r=a.length;r--;)delete v.prototype[a[r]];return v()};s[l]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(f.prototype=i(e),r=new f,f.prototype=null,r[l]=e):r=v(),void 0===t?r:o.f(r,t)}},function(e,t,r){var n=r(14),i=r(209),o=r(37),a=r(105),s=r(35)("toStringTag"),c=n.Object,u="Arguments"==a(function(){return arguments}());e.exports=i?a:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=c(e),s))?r:u?a(t):"Object"==(n=a(t))&&o(t.callee)?"Arguments":n}},function(e,t,r){var n=r(80),i=r(23),o=r(162),a=r(63),s=r(72),c=r(210),u=i([].push),d=function(e){var t=1==e,r=2==e,i=3==e,d=4==e,l=6==e,f=7==e,h=5==e||l;return function(p,v,m,g){for(var _,y,b=a(p),k=o(b),S=n(v,m),w=s(k),T=0,C=g||c,I=t?C(p,w):r||f?C(p,0):void 0;w>T;T++)if((h||T in k)&&(y=S(_=k[T],T,b),e))if(t)I[T]=y;else if(y)switch(e){case 3:return!0;case 5:return _;case 6:return T;case 2:u(I,_)}else switch(e){case 4:return!1;case 7:u(I,_)}return l?-1:i||d?d:I}};e.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6),filterReject:d(7)}},function(e,t,r){"use strict";var n=r(62),i=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new i(e)}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){var t=+e;return t!=t||0===t?0:(t>0?n:r)(t)}},function(e,t,r){"use strict";var n=r(113),i=r(36),o=r(21),a=r(228),s=r(330),c=r(50),u=r(110),d=r(155),l=r(229),f=r(85),h=r(65),p=r(129),v=r(189),m=r(230),g=r(187),_=r(227),y=r(20),b=_.UNSUPPORTED_Y,k=Math.min,S=[].push,w=o(/./.exec),T=o(S),C=o("".slice);a("split",(function(e,t,r){var o;return o="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var o=h(u(this)),a=void 0===r?4294967295:r>>>0;if(0===a)return[];if(void 0===e)return[o];if(!s(e))return i(t,o,e,a);for(var c,d,l,f=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),m=0,_=new RegExp(e.source,p+"g");(c=i(g,_,o))&&!((d=_.lastIndex)>m&&(T(f,C(o,m,c.index)),c.length>1&&c.index<o.length&&n(S,f,v(c,1)),l=c[0].length,m=d,f.length>=a));)_.lastIndex===c.index&&_.lastIndex++;return m===o.length?!l&&w(_,"")||T(f,""):T(f,C(o,m)),f.length>a?v(f,0,a):f}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:i(t,this,e,r)}:t,[function(t,r){var n=u(this),a=null==t?void 0:p(t,e);return a?i(a,t,n,r):i(o,h(n),t,r)},function(e,n){var i=c(this),a=h(e),s=r(o,i,a,n,o!==t);if(s.done)return s.value;var u=d(i,RegExp),p=i.unicode,v=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(b?"g":"y"),g=new u(b?"^(?:"+i.source+")":i,v),_=void 0===n?4294967295:n>>>0;if(0===_)return[];if(0===a.length)return null===m(g,a)?[a]:[];for(var y=0,S=0,w=[];S<a.length;){g.lastIndex=b?0:S;var I,A=m(g,b?C(a,S):a);if(null===A||(I=k(f(g.lastIndex+(b?S:0)),a.length))===y)S=l(a,S,p);else{if(T(w,C(a,y,S)),w.length===_)return w;for(var R=1;R<=A.length-1;R++)if(T(w,A[R]),w.length===_)return w;S=y=I}}return T(w,C(a,y)),w}]}),!!y((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),b)},function(e,t,r){"use strict";var n=r(82),i=r(573),o=r(160),a=r(84),s=r(49).f,c=r(345),u=r(75),d=r(48),l=a.set,f=a.getterFor("Array Iterator");e.exports=c(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:n(e),index:0,kind:t})}),(function(){var e=f(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values");var h=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!u&&d&&"values"!==h.name)try{s(h,"name",{value:"values"})}catch(e){}},function(e,t,r){e.exports=r(512)},function(e,t,r){var n,i,o,a,s=r(77),c=r(16),u=r(289),d=r(431),l=r(32),f=r(28),h=r(9),p=r(40),v=r(447),m=r(298),g=r(27),_=r(12),y=r(66),b=r(10),k=r(78),S=r(30),w=r(492),T=r(497),C=r(19),I=r(7),A=r(103),R=r(266),x=r(267),E=r(313),D=r(314),M=r(534),P=r(18),L=r(542),O=r(6);r(34),r(86),r(231),r(153),r(55),r(332),r(333),r(136),r(114),r(154),r(101),r(11),r(233),r(572),r(102),r(238),r(239),r(52),a=function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[a]={exports:{}};t[a][0].call(u.exports,(function(e){return i(t[a][1][e]||e)}),u,u.exports,e,t,r,n)}return r[a].exports}for(var o=!1,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){"use strict";var n=(0,e("./adapter_factory.js").adapterFactory)({window:window});t.exports=n},{"./adapter_factory.js":2}],2:[function(e,t,r){"use strict";s(r,"__esModule",{value:!0}),r.adapterFactory=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.window,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0},s=n.log,d=n.detectBrowser(t),l={browserDetails:d,commonShim:u,extractVersion:n.extractVersion,disableLog:n.disableLog,disableWarnings:n.disableWarnings};switch(d.browser){case"chrome":if(!i||!i.shimPeerConnection||!r.shimChrome)return s("Chrome shim is not included in this adapter release."),l;if(null===d.version)return s("Chrome shim can not determine version, not shimming."),l;s("adapter.js shimming chrome."),l.browserShim=i,i.shimGetUserMedia(t),i.shimMediaStream(t),i.shimPeerConnection(t),i.shimOnTrack(t),i.shimAddTrackRemoveTrack(t),i.shimGetSendersWithDtmf(t),i.shimGetStats(t),i.shimSenderReceiverGetStats(t),i.fixNegotiationNeeded(t),u.shimRTCIceCandidate(t),u.shimConnectionState(t),u.shimMaxMessageSize(t),u.shimSendThrowTypeError(t),u.removeAllowExtmapMixed(t);break;case"firefox":if(!a||!a.shimPeerConnection||!r.shimFirefox)return s("Firefox shim is not included in this adapter release."),l;s("adapter.js shimming firefox."),l.browserShim=a,a.shimGetUserMedia(t),a.shimPeerConnection(t),a.shimOnTrack(t),a.shimRemoveStream(t),a.shimSenderGetStats(t),a.shimReceiverGetStats(t),a.shimRTCDataChannel(t),a.shimAddTransceiver(t),a.shimCreateOffer(t),a.shimCreateAnswer(t),u.shimRTCIceCandidate(t),u.shimConnectionState(t),u.shimMaxMessageSize(t),u.shimSendThrowTypeError(t);break;case"edge":if(!o||!o.shimPeerConnection||!r.shimEdge)return s("MS edge shim is not included in this adapter release."),l;s("adapter.js shimming edge."),l.browserShim=o,o.shimGetUserMedia(t),o.shimGetDisplayMedia(t),o.shimPeerConnection(t),o.shimReplaceTrack(t),u.shimMaxMessageSize(t),u.shimSendThrowTypeError(t);break;case"safari":if(!c||!r.shimSafari)return s("Safari shim is not included in this adapter release."),l;s("adapter.js shimming safari."),l.browserShim=c,c.shimRTCIceServerUrls(t),c.shimCreateOfferLegacy(t),c.shimCallbacksAPI(t),c.shimLocalStreamsAPI(t),c.shimRemoteStreamsAPI(t),c.shimTrackEventTransceiver(t),c.shimGetUserMedia(t),c.shimAudioContext(t),u.shimRTCIceCandidate(t),u.shimMaxMessageSize(t),u.shimSendThrowTypeError(t),u.removeAllowExtmapMixed(t);break;default:s("Unsupported browser!")}return l};var n=d(e("./utils")),i=d(e("./chrome/chrome_shim")),o=d(e("./edge/edge_shim")),a=d(e("./firefox/firefox_shim")),c=d(e("./safari/safari_shim")),u=d(e("./common_shim"));function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}},{"./chrome/chrome_shim":3,"./common_shim":6,"./edge/edge_shim":7,"./firefox/firefox_shim":11,"./safari/safari_shim":14,"./utils":15}],3:[function(e,t,r){"use strict";s(r,"__esModule",{value:!0}),r.shimGetDisplayMedia=r.shimGetUserMedia=void 0;var n="function"==typeof c&&"symbol"===O(u)?function(e){return O(e)}:function(e){return e&&"function"==typeof c&&e.constructor===c&&e!==c.prototype?"symbol":O(e)},i=e("./getusermedia");s(r,"shimGetUserMedia",{enumerable:!0,get:function(){return i.shimGetUserMedia}});var o=e("./getdisplaymedia");s(r,"shimGetDisplayMedia",{enumerable:!0,get:function(){return o.shimGetDisplayMedia}}),r.shimMediaStream=function(e){e.MediaStream=e.MediaStream||e.webkitMediaStream},r.shimOnTrack=function(e){if("object"===(void 0===e?"undefined":n(e))&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){s(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var r=this;return this._ontrackpoly||(this._ontrackpoly=function(t){var n;t.stream.addEventListener("addtrack",(function(n){var i,o=void 0;o=e.RTCPeerConnection.prototype.getReceivers?d(i=r.getReceivers()).call(i,(function(e){return e.track&&e.track.id===n.track.id})):{track:n.track};var a=new Event("track");a.track=n.track,a.receiver=o,a.transceiver={receiver:o},a.streams=[t.stream],r.dispatchEvent(a)})),l(n=t.stream.getTracks()).call(n,(function(n){var i,o=void 0;o=e.RTCPeerConnection.prototype.getReceivers?d(i=r.getReceivers()).call(i,(function(e){return e.track&&e.track.id===n.id})):{track:n};var a=new Event("track");a.track=n,a.receiver=o,a.transceiver={receiver:o},a.streams=[t.stream],r.dispatchEvent(a)}))},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else a.wrapPeerConnectionEvent(e,"track",(function(e){return e.transceiver||s(e,"transceiver",{value:{receiver:e.receiver}}),e}))},r.shimGetSendersWithDtmf=function(e){if("object"===(void 0===e?"undefined":n(e))&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){var t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){var e;return this._senders=this._senders||[],f(e=this._senders).call(e)};var r=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){var i=r.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};var i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t;i.apply(this,arguments);var r,n=h(t=this._senders).call(t,e);-1!==n&&p(r=this._senders).call(r,n,1)}}var o=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var r,n=this;this._senders=this._senders||[],o.apply(this,[e]),l(r=e.getTracks()).call(r,(function(e){n._senders.push(t(n,e))}))};var a=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t,r=this;this._senders=this._senders||[],a.apply(this,[e]),l(t=e.getTracks()).call(t,(function(e){var t,n,i,o=d(t=r._senders).call(t,(function(t){return t.track===e}));o&&p(n=r._senders).call(n,h(i=r._senders).call(i,o),1)}))}}else if("object"===(void 0===e?"undefined":n(e))&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){var c=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var e=this,t=c.apply(this,[]);return l(t).call(t,(function(t){return t._pc=e})),t},s(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}},r.shimGetStats=function(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var e=this,r=f(Array.prototype).call(arguments),n=r[0],i=r[1],o=r[2];if(arguments.length>0&&"function"==typeof n)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof n))return t.apply(this,[]);var a=function(e){var t={},r=e.result();return l(r).call(r,(function(e){var r,n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};l(r=e.names()).call(r,(function(t){n[t]=e.stat(t)})),t[n.id]=n})),t},s=function(e){var t;return new v(m(t=g(e)).call(t,(function(t){return[t,e[t]]})))};if(arguments.length>=2){var c=function(e){i(s(a(e)))};return t.apply(this,[c,n])}return new _((function(r,n){t.apply(e,[function(e){r(s(a(e)))},n])})).then(i,o)}}},r.shimSenderReceiverGetStats=function(e){if("object"===(void 0===e?"undefined":n(e))&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver){if(!("getStats"in e.RTCRtpSender.prototype)){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,r=t.apply(this,[]);return l(r).call(r,(function(t){return t._pc=e})),r});var r=e.RTCPeerConnection.prototype.addTrack;r&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=r.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){var e=this;return this._pc.getStats().then((function(t){return a.filterStats(t,e.track,!0)}))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){var i=e.RTCPeerConnection.prototype.getReceivers;i&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,t=i.apply(this,[]);return l(t).call(t,(function(t){return t._pc=e})),t}),a.wrapPeerConnectionEvent(e,"track",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){var e=this;return this._pc.getStats().then((function(t){return a.filterStats(t,e.track,!1)}))}}if("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype){var o=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){var t,r,n=arguments[0],i=void 0,a=void 0,s=void 0;return l(t=this.getSenders()).call(t,(function(e){e.track===n&&(i?s=!0:i=e)})),l(r=this.getReceivers()).call(r,(function(e){return e.track===n&&(a?s=!0:a=e),e.track===n})),s||i&&a?_.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):i?i.getStats():a?a.getStats():_.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return o.apply(this,arguments)}}}},r.shimAddTrackRemoveTrackWithNative=w,r.shimAddTrackRemoveTrack=function(e){var t;if(e.RTCPeerConnection){var r=a.detectBrowser(e);if(e.RTCPeerConnection.prototype.addTrack&&r.version>=65)return w(e);var n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this,t=n.apply(this);return this._reverseStreams=this._reverseStreams||{},m(t).call(t,(function(t){return e._reverseStreams[t.id]}))};var i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){var r,n=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},l(r=t.getTracks()).call(r,(function(e){var t;if(d(t=n.getSenders()).call(t,(function(t){return t.track===e})))throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[t.id]){var o=new e.MediaStream(t.getTracks());this._streams[t.id]=o,this._reverseStreams[o.id]=t,t=o}i.apply(this,[t])};var o=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},o.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,r){var n,i,o,a=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var s=f([]).call(arguments,1);if(1!==s.length||!d(n=s[0].getTracks()).call(n,(function(e){return e===t})))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");var c=d(i=this.getSenders()).call(i,(function(e){return e.track===t}));if(c)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var u=this._streams[r.id];if(u)u.addTrack(t),_.resolve().then((function(){a.dispatchEvent(new Event("negotiationneeded"))}));else{var l=new e.MediaStream([t]);this._streams[r.id]=l,this._reverseStreams[l.id]=r,this.addStream(l)}return d(o=this.getSenders()).call(o,(function(e){return e.track===t}))},l(t=["createOffer","createAnswer"]).call(t,(function(t){var r=e.RTCPeerConnection.prototype[t],n=S({},t,(function(){var e=this,t=arguments,n=arguments.length&&"function"==typeof arguments[0];return n?r.apply(this,[function(r){var n=h(e,r);t[0].apply(null,[n])},function(e){t[1]&&t[1].apply(null,e)},arguments[2]]):r.apply(this,arguments).then((function(t){return h(e,t)}))}));e.RTCPeerConnection.prototype[t]=n[t]}));var c=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=p(this,arguments[0]),c.apply(this,arguments)):c.apply(this,arguments)};var u=k(e.RTCPeerConnection.prototype,"localDescription");s(e.RTCPeerConnection.prototype,"localDescription",{get:function(){var e=u.get.apply(this);return""===e.type?e:h(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){var t,r=this;if("closed"===this.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");if(e._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};var n=void 0;l(t=g(this._streams)).call(t,(function(t){var i;d(i=r._streams[t].getTracks()).call(i,(function(t){return e.track===t}))&&(n=r._streams[t])})),n&&(1===n.getTracks().length?this.removeStream(this._reverseStreams[n.id]):n.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function h(e,t){var r,n=t.sdp;return l(r=g(e._reverseStreams||[])).call(r,(function(t){var r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)})),new RTCSessionDescription({type:t.type,sdp:n})}function p(e,t){var r,n=t.sdp;return l(r=g(e._reverseStreams||[])).call(r,(function(t){var r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)})),new RTCSessionDescription({type:t.type,sdp:n})}},r.shimPeerConnection=function(e){var t=a.detectBrowser(e);if(!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection){var r,n=0===e.RTCPeerConnection.prototype.addIceCandidate.length;t.version<53&&l(r=["setLocalDescription","setRemoteDescription","addIceCandidate"]).call(r,(function(t){var r=e.RTCPeerConnection.prototype[t],n=S({},t,(function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}));e.RTCPeerConnection.prototype[t]=n[t]}));var i=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return n||arguments[0]?t.version<78&&arguments[0]&&""===arguments[0].candidate?_.resolve():i.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),_.resolve())}}},r.fixNegotiationNeeded=function(e){a.wrapPeerConnectionEvent(e,"negotiationneeded",(function(e){if("stable"===e.target.signalingState)return e}))};var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../utils.js"));function S(e,t,r){return t in e?s(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){var e,t=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},m(e=g(this._shimmedLocalStreams)).call(e,(function(e){return t._shimmedLocalStreams[e][0]}))};var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){var n;if(!r)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var i=t.apply(this,arguments);return this._shimmedLocalStreams[r.id]?-1===h(n=this._shimmedLocalStreams[r.id]).call(n,i)&&this._shimmedLocalStreams[r.id].push(i):this._shimmedLocalStreams[r.id]=[r,i],i};var r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var t,n,i,o=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},l(t=e.getTracks()).call(t,(function(e){var t;if(d(t=o.getSenders()).call(t,(function(t){return t.track===e})))throw new DOMException("Track already exists.","InvalidAccessError")}));var a=this.getSenders();r.apply(this,arguments);var s=y(n=this.getSenders()).call(n,(function(e){return-1===h(a).call(a,e)}));this._shimmedLocalStreams[e.id]=b(i=[e]).call(i,s)};var n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],n.apply(this,arguments)};var i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t,r=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&l(t=g(this._shimmedLocalStreams)).call(t,(function(t){var n,i,o=h(n=r._shimmedLocalStreams[t]).call(n,e);-1!==o&&p(i=r._shimmedLocalStreams[t]).call(i,o,1),1===r._shimmedLocalStreams[t].length&&delete r._shimmedLocalStreams[t]})),i.apply(this,arguments)}}},{"../utils.js":15,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(e,t,r){"use strict";s(r,"__esModule",{value:!0}),r.shimGetDisplayMedia=function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(r){return t(r).then((function(t){var n=r.video&&r.video.width,i=r.video&&r.video.height,o=r.video&&r.video.frameRate;return r.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:o||3}},n&&(r.video.mandatory.maxWidth=n),i&&(r.video.mandatory.maxHeight=i),e.navigator.mediaDevices.getUserMedia(r)}))}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}},{}],5:[function(e,t,r){"use strict";s(r,"__esModule",{value:!0});var n="function"==typeof c&&"symbol"===O(u)?function(e){return O(e)}:function(e){return e&&"function"==typeof c&&e.constructor===c&&e!==c.prototype?"symbol":O(e)};r.shimGetUserMedia=function(e){var t=e&&e.navigator;if(t.mediaDevices){var r=i.detectBrowser(e),a=function(e){var t;if("object"!==(void 0===e?"undefined":n(e))||e.mandatory||e.optional)return e;var r,i={};return l(t=g(e)).call(t,(function(t){if("require"!==t&&"advanced"!==t&&"mediaSource"!==t){var r="object"===n(e[t])?e[t]:{ideal:e[t]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var o,a=function(e,t){return e?e+t.charAt(0).toUpperCase()+f(t).call(t,1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){i.optional=i.optional||[];var s={};"number"==typeof r.ideal?(s[a("min",t)]=r.ideal,i.optional.push(s),(s={})[a("max",t)]=r.ideal,i.optional.push(s)):(s[a("",t)]=r.ideal,i.optional.push(s))}void 0!==r.exact&&"number"!=typeof r.exact?(i.mandatory=i.mandatory||{},i.mandatory[a("",t)]=r.exact):l(o=["min","max"]).call(o,(function(e){void 0!==r[e]&&(i.mandatory=i.mandatory||{},i.mandatory[a(e,t)]=r[e])}))}})),e.advanced&&(i.optional=b(r=i.optional||[]).call(r,e.advanced)),i},s=function(e,i){if(r.version>=61)return i(e);if((e=JSON.parse(S(e)))&&"object"===n(e.audio)){var s=function(e,t,r){t in e&&!(r in e)&&(e[r]=e[t],delete e[t])};s((e=JSON.parse(S(e))).audio,"autoGainControl","googAutoGainControl"),s(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=a(e.audio)}if(e&&"object"===n(e.video)){var c=e.video.facingMode;c=c&&("object"===(void 0===c?"undefined":n(c))?c:{ideal:c});var u=r.version<66;if(c&&("user"===c.exact||"environment"===c.exact||"user"===c.ideal||"environment"===c.ideal)&&(!t.mediaDevices.getSupportedConstraints||!t.mediaDevices.getSupportedConstraints().facingMode||u)){delete e.video.facingMode;var l=void 0;if("environment"===c.exact||"environment"===c.ideal?l=["back","rear"]:"user"!==c.exact&&"user"!==c.ideal||(l=["front"]),l)return t.mediaDevices.enumerateDevices().then((function(t){t=y(t).call(t,(function(e){return"videoinput"===e.kind}));var r=d(t).call(t,(function(e){return w(l).call(l,(function(t){var r;return T(r=e.label.toLowerCase()).call(r,t)}))}));return!r&&t.length&&T(l).call(l,"back")&&(r=t[t.length-1]),r&&(e.video.deviceId=c.exact?{exact:r.deviceId}:{ideal:r.deviceId}),e.video=a(e.video),o("chrome: "+S(e)),i(e)}))}e.video=a(e.video)}return o("chrome: "+S(e)),i(e)},c=function(e){return r.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.name+(this.message&&": ")+this.message}}},u=function(e,r,n){s(e,(function(e){t.webkitGetUserMedia(e,r,(function(e){n&&n(c(e))}))}))};if(t.getUserMedia=C(u).call(u,t),t.mediaDevices.getUserMedia){var h,p=C(h=t.mediaDevices.getUserMedia).call(h,t.mediaDevices);t.mediaDevices.getUserMedia=function(e){return s(e,(function(e){return p(e).then((function(t){var r;if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw l(r=t.getTracks()).call(r,(function(e){e.stop()})),new DOMException("","NotFoundError");return t}),(function(e){return _.reject(c(e))}))}))}}}};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../utils.js")),o=i.log},{"../utils.js":15}],6:[function(e,t,r){"use strict";s(r,"__esModule",{value:!0});var n="function"==typeof c&&"symbol"===O(u)?function(e){return O(e)}:function(e){return e&&"function"==typeof c&&e.constructor===c&&e!==c.prototype?"symbol":O(e)};r.shimRTCIceCandidate=function(e){if(!(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)){var t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){var r;if("object"===(void 0===e?"undefined":n(e))&&e.candidate&&0===h(r=e.candidate).call(r,"a=")&&((e=JSON.parse(S(e))).candidate=e.candidate.substr(2)),e.candidate&&e.candidate.length){var i=new t(e),o=a.default.parseCandidate(e.candidate),s=I(i,o);return s.toJSON=function(){return{candidate:s.candidate,sdpMid:s.sdpMid,sdpMLineIndex:s.sdpMLineIndex,usernameFragment:s.usernameFragment}},s}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,d.wrapPeerConnectionEvent(e,"icecandidate",(function(t){return t.candidate&&s(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t}))}},r.shimMaxMessageSize=function(e){if(e.RTCPeerConnection){var t=d.detectBrowser(e);"sctp"in e.RTCPeerConnection.prototype||s(e.RTCPeerConnection.prototype,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp}});var r=function(e){if(!e||!e.sdp)return!1;var t=a.default.splitSections(e.sdp);return t.shift(),w(t).call(t,(function(e){var t,r=a.default.parseMLine(e);return r&&"application"===r.kind&&-1!==h(t=r.protocol).call(t,"SCTP")}))},n=function(e){var t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;var r=A(t[1],10);return r!=r?-1:r},i=function(e){var r=65536;return"firefox"===t.browser&&(r=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),r},o=function(e,r){var n=65536;"firefox"===t.browser&&57===t.version&&(n=65535);var i=a.default.matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?n=A(i[0].substr(19),10):"firefox"===t.browser&&-1!==r&&(n=2147483637),n},c=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){var e=this.getConfiguration(),a=e.sdpSemantics;"plan-b"===a&&s(this,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(r(arguments[0])){var u=n(arguments[0]),d=i(u),l=o(arguments[0],u),f=void 0;f=0===d&&0===l?Number.POSITIVE_INFINITY:0===d||0===l?Math.max(d,l):Math.min(d,l);var h={};s(h,"maxMessageSize",{get:function(){return f}}),this._sctp=h}return c.apply(this,arguments)}}},r.shimSendThrowTypeError=function(e){if(e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype){var t=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){var e=t.apply(this,arguments);return r(e,this),e},d.wrapPeerConnectionEvent(e,"datachannel",(function(e){return r(e.channel,e.target),e}))}function r(e,t){var r=e.send;e.send=function(){var n=arguments[0],i=n.leng