import{aA as pT}from"./@vue-DqCYILjk.js";var hc={exports:{}},tB=hc.exports,fT;function iB(){return fT||(fT=1,function(mT,nB){(function(pc,te){mT.exports=te()})(tB,function(){function pc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function te(e){for(var t=1;t=0;--d){var _=this.tryEntries[d],E=_.completion;if(_.tryLoc==="root")return y("end");if(_.tryLoc<=this.prev){var C=n.call(_,"catchLoc"),O=n.call(_,"finallyLoc");if(C&&O){if(this.prev<_.catchLoc)return y(_.catchLoc,!0);if(this.prev<_.finallyLoc)return y(_.finallyLoc)}else if(C){if(this.prev<_.catchLoc)return y(_.catchLoc,!0)}else{if(!O)throw new Error("try statement without catch or finally");if(this.prev<_.finallyLoc)return y(_.finallyLoc)}}}},abrupt:function(R,P){for(var y=this.tryEntries.length-1;y>=0;--y){var d=this.tryEntries[y];if(d.tryLoc<=this.prev&&n.call(d,"finallyLoc")&&this.prev=0;--P){var y=this.tryEntries[P];if(y.finallyLoc===R)return this.complete(y.completion,y.afterLoc),D(y),u}},catch:function(R){for(var P=this.tryEntries.length-1;P>=0;--P){var y=this.tryEntries[P];if(y.tryLoc===R){var d=y.completion;if(d.type==="throw"){var _=d.arg;D(y)}return _}}throw new Error("illegal catch attempt")},delegateYield:function(R,P,y){return this.delegate={iterator:v(R),resultName:P,nextLoc:y},this.method==="next"&&(this.arg=void 0),u}},e}function bi(e){return bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bi(e)}function Gp(e,t,n,i,r,o,c){try{var a=e[o](c),s=a.value}catch(l){return void n(l)}a.done?t(s):Promise.resolve(s).then(i,r)}function F(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function c(s){Gp(o,i,r,c,a,"next",s)}function a(s){Gp(o,i,r,c,a,"throw",s)}c(void 0)})}}function ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zp(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fc(e,t,n){return fc=Jp()?Reflect.construct.bind():function(i,r,o){var c=[null];c.push.apply(c,r);var a=new(Function.bind.apply(i,c));return o&&Ii(a,o.prototype),a},fc.apply(null,arguments)}function mc(e){var t=typeof Map=="function"?new Map:void 0;return mc=function(n){if(n===null||(i=n,Function.toString.call(i).indexOf("[native code]")===-1))return n;var i;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,r)}function r(){return fc(n,arguments,ve(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ii(r,n)},mc(e)}function _T(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ti(e){var t=Jp();return function(){var n,i=ve(e);if(t){var r=ve(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return _T(this,n)}}function vT(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=ve(e))!==null;);return e}function Re(){return Re=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=vT(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Re.apply(this,arguments)}function lt(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var o,c,a=[],s=!0,l=!1;try{for(r=r.call(n);!(s=(o=r.next()).done)&&(a.push(o.value),!i||a.length!==i);s=!0);}catch(u){l=!0,c=u}finally{try{s||r.return==null||r.return()}finally{if(l)throw c}}return a}}(e,t)||_c(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Se(e){return function(t){if(Array.isArray(t))return vc(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||_c(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function _c(e,t){if(e){if(typeof e=="string")return vc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vc(e,t):void 0}}function vc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(s){throw s},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,c=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var s=n.next();return c=s.done,s},e:function(s){a=!0,o=s},f:function(){try{c||n.return==null||n.return()}finally{if(a)throw o}}}}function ie(e,t,n,i,r){var o={};return Object.keys(i).forEach(function(c){o[c]=i[c]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(c,a){return a(e,t,c)||c},o),r&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(r):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var gc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof pT<"u"?pT:typeof self<"u"?self:{},Ha=function(e){return e&&e.Math==Math&&e},oe=Ha(typeof globalThis=="object"&&globalThis)||Ha(typeof window=="object"&&window)||Ha(typeof self=="object"&&self)||Ha(typeof gc=="object"&&gc)||function(){return this}()||Function("return this")(),hn={},Z=function(e){try{return!!e()}catch{return!0}},Ae=!Z(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),wi=!Z(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),gT=wi,Wa=Function.prototype.call,we=gT?Wa.bind(Wa):function(){return Wa.apply(Wa,arguments)},Ga={},qp={}.propertyIsEnumerable,Kp=Object.getOwnPropertyDescriptor,yT=Kp&&!qp.call({1:2},1);Ga.f=yT?function(e){var t=Kp(this,e);return!!t&&t.enumerable}:qp;var pn,za,Sr=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Qp=wi,Xp=Function.prototype,yc=Xp.call,ST=Qp&&Xp.bind.bind(yc,yc),Yp=function(e){return Qp?ST(e):function(){return yc.apply(e,arguments)}},$p=Yp,bT=$p({}.toString),kT=$p("".slice),Kt=function(e){return kT(bT(e),8,-1)},IT=Kt,TT=Yp,$=function(e){if(IT(e)==="Function")return TT(e)},wT=Z,ET=Kt,Sc=Object,RT=$("".split),Ei=wT(function(){return!Sc("z").propertyIsEnumerable(0)})?function(e){return ET(e)=="String"?RT(e,""):Sc(e)}:Sc,Lt=function(e){return e==null},CT=Lt,AT=TypeError,dt=function(e){if(CT(e))throw AT("Can't call method on "+e);return e},xT=Ei,PT=dt,kt=function(e){return xT(PT(e))},bc=typeof document=="object"&&document.all,Ja={all:bc,IS_HTMLDDA:bc===void 0&&bc!==void 0},DT=Ja.all,ge=Ja.IS_HTMLDDA?function(e){return typeof e=="function"||e===DT}:function(e){return typeof e=="function"},Zp=ge,OT=Ja.all,xe=Ja.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:Zp(e)||e===OT}:function(e){return typeof e=="object"?e!==null:Zp(e)},kc=oe,MT=ge,NT=function(e){return MT(e)?e:void 0},Qt=function(e,t){return arguments.length<2?NT(kc[e]):kc[e]&&kc[e][t]},fn=$({}.isPrototypeOf),Xt=Qt("navigator","userAgent")||"",ef=oe,Ic=Xt,tf=ef.process,nf=ef.Deno,rf=tf&&tf.versions||nf&&nf.version,af=rf&&rf.v8;af&&(za=(pn=af.split("."))[0]>0&&pn[0]<4?1:+(pn[0]+pn[1])),!za&&Ic&&(!(pn=Ic.match(/Edge\/(\d+)/))||pn[1]>=74)&&(pn=Ic.match(/Chrome\/(\d+)/))&&(za=+pn[1]);var br=za,of=br,LT=Z,sf=!!Object.getOwnPropertySymbols&&!LT(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&of&&of<41}),cf=sf&&!Symbol.sham&&typeof Symbol.iterator=="symbol",UT=Qt,VT=ge,jT=fn,FT=Object,qa=cf?function(e){return typeof e=="symbol"}:function(e){var t=UT("Symbol");return VT(t)&&jT(t.prototype,FT(e))},BT=String,kr=function(e){try{return BT(e)}catch{return"Object"}},HT=ge,WT=kr,GT=TypeError,It=function(e){if(HT(e))return e;throw GT(WT(e)+" is not a function")},zT=It,JT=Lt,Ir=function(e,t){var n=e[t];return JT(n)?void 0:zT(n)},Tc=we,wc=ge,Ec=xe,qT=TypeError,Ka={exports:{}},uf=oe,KT=Object.defineProperty,Rc=function(e,t){try{KT(uf,e,{value:t,configurable:!0,writable:!0})}catch{uf[e]=t}return t},QT=Rc,lf="__core-js_shared__",Cc=oe[lf]||QT(lf,{}),df=Cc;(Ka.exports=function(e,t){return df[e]||(df[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.25.5",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE",source:"https://github.com/zloirock/core-js"});var XT=dt,YT=Object,ze=function(e){return YT(XT(e))},$T=ze,ZT=$({}.hasOwnProperty),Le=Object.hasOwn||function(e,t){return ZT($T(e),t)},ew=$,tw=0,nw=Math.random(),rw=ew(1 .toString),Qa=function(e){return"Symbol("+(e===void 0?"":e)+")_"+rw(++tw+nw,36)},iw=oe,aw=Ka.exports,hf=Le,ow=Qa,pf=sf,ff=cf,Ri=aw("wks"),Bn=iw.Symbol,mf=Bn&&Bn.for,sw=ff?Bn:Bn&&Bn.withoutSetter||ow,be=function(e){if(!hf(Ri,e)||!pf&&typeof Ri[e]!="string"){var t="Symbol."+e;pf&&hf(Bn,e)?Ri[e]=Bn[e]:Ri[e]=ff&&mf?mf(t):sw(t)}return Ri[e]},cw=we,_f=xe,vf=qa,uw=Ir,lw=function(e,t){var n,i;if(t==="string"&&wc(n=e.toString)&&!Ec(i=Tc(n,e))||wc(n=e.valueOf)&&!Ec(i=Tc(n,e))||t!=="string"&&wc(n=e.toString)&&!Ec(i=Tc(n,e)))return i;throw qT("Can't convert object to primitive value")},dw=TypeError,hw=be("toPrimitive"),Xa=function(e,t){if(!_f(e)||vf(e))return e;var n,i=uw(e,hw);if(i){if(t===void 0&&(t="default"),n=cw(i,e,t),!_f(n)||vf(n))return n;throw dw("Can't convert object to primitive value")}return t===void 0&&(t="number"),lw(e,t)},pw=Xa,fw=qa,Ya=function(e){var t=pw(e,"string");return fw(t)?t:t+""},gf=xe,Ac=oe.document,mw=gf(Ac)&&gf(Ac.createElement),$a=function(e){return mw?Ac.createElement(e):{}},_w=$a,yf=!Ae&&!Z(function(){return Object.defineProperty(_w("div"),"a",{get:function(){return 7}}).a!=7}),vw=Ae,gw=we,yw=Ga,Sw=Sr,bw=kt,kw=Ya,Iw=Le,Tw=yf,Sf=Object.getOwnPropertyDescriptor;hn.f=vw?Sf:function(e,t){if(e=bw(e),t=kw(t),Tw)try{return Sf(e,t)}catch{}if(Iw(e,t))return Sw(!gw(yw.f,e,t),e[t])};var Ve={},bf=Ae&&Z(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),ww=xe,Ew=String,Rw=TypeError,Oe=function(e){if(ww(e))return e;throw Rw(Ew(e)+" is not an object")},Cw=Ae,Aw=yf,xw=bf,Za=Oe,kf=Ya,Pw=TypeError,xc=Object.defineProperty,Dw=Object.getOwnPropertyDescriptor,Ow="enumerable",Mw="configurable",Nw="writable";Ve.f=Cw?xw?function(e,t,n){if(Za(e),t=kf(t),Za(n),typeof e=="function"&&t==="prototype"&&"value"in n&&Nw in n&&!n.writable){var i=Dw(e,t);i&&i.writable&&(e[t]=n.value,n={configurable:Mw in n?n.configurable:i.configurable,enumerable:Ow in n?n.enumerable:i.enumerable,writable:!1})}return xc(e,t,n)}:xc:function(e,t,n){if(Za(e),t=kf(t),Za(n),Aw)try{return xc(e,t,n)}catch{}if("get"in n||"set"in n)throw Pw("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Lw=Ve,Uw=Sr,Ut=Ae?function(e,t,n){return Lw.f(e,t,Uw(1,n))}:function(e,t,n){return e[t]=n,e},Pc={exports:{}},Dc=Ae,Vw=Le,If=Function.prototype,jw=Dc&&Object.getOwnPropertyDescriptor,Oc=Vw(If,"name"),Hn={EXISTS:Oc,PROPER:Oc&&(function(){}).name==="something",CONFIGURABLE:Oc&&(!Dc||Dc&&jw(If,"name").configurable)},Fw=ge,Mc=Cc,Bw=$(Function.toString);Fw(Mc.inspectSource)||(Mc.inspectSource=function(e){return Bw(e)});var eo,Ci,to,Nc=Mc.inspectSource,Hw=ge,Tf=oe.WeakMap,wf=Hw(Tf)&&/native code/.test(String(Tf)),Ww=Ka.exports,Gw=Qa,Ef=Ww("keys"),Lc=function(e){return Ef[e]||(Ef[e]=Gw(e))},no={},zw=wf,Rf=oe,Jw=xe,qw=Ut,Uc=Le,Vc=Cc,Kw=Lc,Qw=no,Cf="Object already initialized",jc=Rf.TypeError,Xw=Rf.WeakMap;if(zw||Vc.state){var Vt=Vc.state||(Vc.state=new Xw);Vt.get=Vt.get,Vt.has=Vt.has,Vt.set=Vt.set,eo=function(e,t){if(Vt.has(e))throw jc(Cf);return t.facade=e,Vt.set(e,t),t},Ci=function(e){return Vt.get(e)||{}},to=function(e){return Vt.has(e)}}else{var Tr=Kw("state");Qw[Tr]=!0,eo=function(e,t){if(Uc(e,Tr))throw jc(Cf);return t.facade=e,qw(e,Tr,t),t},Ci=function(e){return Uc(e,Tr)?e[Tr]:{}},to=function(e){return Uc(e,Tr)}}var Me={set:eo,get:Ci,has:to,enforce:function(e){return to(e)?Ci(e):eo(e,{})},getterFor:function(e){return function(t){var n;if(!Jw(t)||(n=Ci(t)).type!==e)throw jc("Incompatible receiver, "+e+" required");return n}}},Yw=Z,$w=ge,ro=Le,Fc=Ae,Zw=Hn.CONFIGURABLE,eE=Nc,tE=Me.enforce,nE=Me.get,io=Object.defineProperty,rE=Fc&&!Yw(function(){return io(function(){},"length",{value:8}).length!==8}),iE=String(String).split("String"),aE=Pc.exports=function(e,t,n){String(t).slice(0,7)==="Symbol("&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!ro(e,"name")||Zw&&e.name!==t)&&(Fc?io(e,"name",{value:t,configurable:!0}):e.name=t),rE&&n&&ro(n,"arity")&&e.length!==n.arity&&io(e,"length",{value:n.arity});try{n&&ro(n,"constructor")&&n.constructor?Fc&&io(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var i=tE(e);return ro(i,"source")||(i.source=iE.join(typeof t=="string"?t:"")),e};Function.prototype.toString=aE(function(){return $w(this)&&nE(this).source||eE(this)},"toString");var oE=ge,sE=Ve,cE=Pc.exports,uE=Rc,He=function(e,t,n,i){i||(i={});var r=i.enumerable,o=i.name!==void 0?i.name:t;if(oE(n)&&cE(n,o,i),i.global)r?e[t]=n:uE(t,n);else{try{i.unsafe?e[t]&&(r=!0):delete e[t]}catch{}r?e[t]=n:sE.f(e,t,{value:n,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},mn={},lE=Math.ceil,dE=Math.floor,hE=Math.trunc||function(e){var t=+e;return(t>0?dE:lE)(t)},Tt=function(e){var t=+e;return t!=t||t===0?0:hE(t)},pE=Tt,fE=Math.max,mE=Math.min,_n=function(e,t){var n=pE(e);return n<0?fE(n+t,0):mE(n,t)},_E=Tt,vE=Math.min,jt=function(e){return e>0?vE(_E(e),9007199254740991):0},gE=jt,qe=function(e){return gE(e.length)},yE=kt,SE=_n,bE=qe,Af=function(e){return function(t,n,i){var r,o=yE(t),c=bE(o),a=SE(i,c);if(e&&n!=n){for(;c>a;)if((r=o[a++])!=r)return!0}else for(;c>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},Ai={includes:Af(!0),indexOf:Af(!1)},Bc=Le,kE=kt,IE=Ai.indexOf,TE=no,xf=$([].push),Pf=function(e,t){var n,i=kE(e),r=0,o=[];for(n in i)!Bc(TE,n)&&Bc(i,n)&&xf(o,n);for(;t.length>r;)Bc(i,n=t[r++])&&(~IE(o,n)||xf(o,n));return o},Hc=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wE=Pf,EE=Hc.concat("length","prototype");mn.f=Object.getOwnPropertyNames||function(e){return wE(e,EE)};var Wc={};Wc.f=Object.getOwnPropertySymbols;var RE=Qt,CE=mn,AE=Wc,xE=Oe,PE=$([].concat),DE=RE("Reflect","ownKeys")||function(e){var t=CE.f(xE(e)),n=AE.f;return n?PE(t,n(e)):t},OE=Le,ME=DE,NE=hn,LE=Ve,UE=Z,VE=ge,jE=/#|\.prototype\./,xi=function(e,t){var n=BE[FE(e)];return n==WE||n!=HE&&(VE(t)?UE(t):!!t)},FE=xi.normalize=function(e){return String(e).replace(jE,".").toLowerCase()},BE=xi.data={},HE=xi.NATIVE="N",WE=xi.POLYFILL="P",Pi=xi,Gc=oe,GE=hn.f,zE=Ut,JE=He,qE=Rc,KE=function(e,t,n){for(var i=ME(t),r=LE.f,o=NE.f,c=0;c"u"?void 0:window});i.exports=o},{"./adapter_factory.js":2}],2:[function(n,i,r){function o(k){return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},o(k)}Object.defineProperty(r,"__esModule",{value:!0}),r.adapterFactory=T;var c=b(n("./utils")),a=b(n("./chrome/chrome_shim")),s=b(n("./firefox/firefox_shim")),l=b(n("./safari/safari_shim")),u=b(n("./common_shim")),h=b(n("sdp"));function g(k){if(typeof WeakMap!="function")return null;var p=new WeakMap,S=new WeakMap;return(g=function(f){return f?S:p})(k)}function b(k,p){if(k&&k.__esModule)return k;if(k===null||o(k)!=="object"&&typeof k!="function")return{default:k};var S=g(p);if(S&&S.has(k))return S.get(k);var f={},I=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in k)if(A!=="default"&&Object.prototype.hasOwnProperty.call(k,A)){var x=I?Object.getOwnPropertyDescriptor(k,A):null;x&&(x.get||x.set)?Object.defineProperty(f,A,x):f[A]=k[A]}return f.default=k,S&&S.set(k,f),f}function T(){var k=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).window,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimSafari:!0},S=c.log,f=c.detectBrowser(k),I={browserDetails:f,commonShim:u,extractVersion:c.extractVersion,disableLog:c.disableLog,disableWarnings:c.disableWarnings,sdp:h};switch(f.browser){case"chrome":if(!a||!a.shimPeerConnection||!p.shimChrome)return S("Chrome shim is not included in this adapter release."),I;if(f.version===null)return S("Chrome shim can not determine version, not shimming."),I;S("adapter.js shimming chrome."),I.browserShim=a,u.shimAddIceCandidateNullOrEmpty(k,f),u.shimParameterlessSetLocalDescription(k,f),a.shimGetUserMedia(k,f),a.shimMediaStream(k,f),a.shimPeerConnection(k,f),a.shimOnTrack(k,f),a.shimAddTrackRemoveTrack(k,f),a.shimGetSendersWithDtmf(k,f),a.shimGetStats(k,f),a.shimSenderReceiverGetStats(k,f),a.fixNegotiationNeeded(k,f),u.shimRTCIceCandidate(k,f),u.shimRTCIceCandidateRelayProtocol(k,f),u.shimConnectionState(k,f),u.shimMaxMessageSize(k,f),u.shimSendThrowTypeError(k,f),u.removeExtmapAllowMixed(k,f);break;case"firefox":if(!s||!s.shimPeerConnection||!p.shimFirefox)return S("Firefox shim is not included in this adapter release."),I;S("adapter.js shimming firefox."),I.browserShim=s,u.shimAddIceCandidateNullOrEmpty(k,f),u.shimParameterlessSetLocalDescription(k,f),s.shimGetUserMedia(k,f),s.shimPeerConnection(k,f),s.shimOnTrack(k,f),s.shimRemoveStream(k,f),s.shimSenderGetStats(k,f),s.shimReceiverGetStats(k,f),s.shimRTCDataChannel(k,f),s.shimAddTransceiver(k,f),s.shimGetParameters(k,f),s.shimCreateOffer(k,f),s.shimCreateAnswer(k,f),u.shimRTCIceCandidate(k,f),u.shimConnectionState(k,f),u.shimMaxMessageSize(k,f),u.shimSendThrowTypeError(k,f);break;case"safari":if(!l||!p.shimSafari)return S("Safari shim is not included in this adapter release."),I;S("adapter.js shimming safari."),I.browserShim=l,u.shimAddIceCandidateNullOrEmpty(k,f),u.shimParameterlessSetLocalDescription(k,f),l.shimRTCIceServerUrls(k,f),l.shimCreateOfferLegacy(k,f),l.shimCallbacksAPI(k,f),l.shimLocalStreamsAPI(k,f),l.shimRemoteStreamsAPI(k,f),l.shimTrackEventTransceiver(k,f),l.shimGetUserMedia(k,f),l.shimAudioContext(k,f),u.shimRTCIceCandidate(k,f),u.shimRTCIceCandidateRelayProtocol(k,f),u.shimMaxMessageSize(k,f),u.shimSendThrowTypeError(k,f),u.removeExtmapAllowMixed(k,f);break;default:S("Unsupported browser!")}return I}},{"./chrome/chrome_shim":3,"./common_shim":6,"./firefox/firefox_shim":7,"./safari/safari_shim":10,"./utils":11,sdp:12}],3:[function(n,i,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fixNegotiationNeeded=D,r.shimAddTrackRemoveTrack=A,r.shimAddTrackRemoveTrackWithNative=I,Object.defineProperty(r,"shimGetDisplayMedia",{enumerable:!0,get:function(){return a.shimGetDisplayMedia}}),r.shimGetSendersWithDtmf=p,r.shimGetStats=S,Object.defineProperty(r,"shimGetUserMedia",{enumerable:!0,get:function(){return c.shimGetUserMedia}}),r.shimMediaStream=T,r.shimOnTrack=k,r.shimPeerConnection=x,r.shimSenderReceiverGetStats=f;var o=l(n("../utils.js")),c=n("./getusermedia"),a=n("./getdisplaymedia");function s(m){if(typeof WeakMap!="function")return null;var v=new WeakMap,w=new WeakMap;return(s=function(R){return R?w:v})(m)}function l(m,v){if(m&&m.__esModule)return m;if(m===null||b(m)!=="object"&&typeof m!="function")return{default:m};var w=s(v);if(w&&w.has(m))return w.get(m);var R={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in m)if(y!=="default"&&Object.prototype.hasOwnProperty.call(m,y)){var d=P?Object.getOwnPropertyDescriptor(m,y):null;d&&(d.get||d.set)?Object.defineProperty(R,y,d):R[y]=m[y]}return R.default=m,w&&w.set(m,R),R}function u(m,v,w){return(v=h(v))in m?Object.defineProperty(m,v,{value:w,enumerable:!0,configurable:!0,writable:!0}):m[v]=w,m}function h(m){var v=g(m,"string");return b(v)==="symbol"?v:String(v)}function g(m,v){if(b(m)!=="object"||m===null)return m;var w=m[Symbol.toPrimitive];if(w!==void 0){var R=w.call(m,v);if(b(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(m)}function b(m){return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},b(m)}function T(m){m.MediaStream=m.MediaStream||m.webkitMediaStream}function k(m){if(b(m)==="object"&&m.RTCPeerConnection&&!("ontrack"in m.RTCPeerConnection.prototype)){Object.defineProperty(m.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(w){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=w)},enumerable:!0,configurable:!0});var v=m.RTCPeerConnection.prototype.setRemoteDescription;m.RTCPeerConnection.prototype.setRemoteDescription=function(){var w=this;return this._ontrackpoly||(this._ontrackpoly=function(R){R.stream.addEventListener("addtrack",function(P){var y;y=m.RTCPeerConnection.prototype.getReceivers?w.getReceivers().find(function(_){return _.track&&_.track.id===P.track.id}):{track:P.track};var d=new Event("track");d.track=P.track,d.receiver=y,d.transceiver={receiver:y},d.streams=[R.stream],w.dispatchEvent(d)}),R.stream.getTracks().forEach(function(P){var y;y=m.RTCPeerConnection.prototype.getReceivers?w.getReceivers().find(function(_){return _.track&&_.track.id===P.id}):{track:P};var d=new Event("track");d.track=P,d.receiver=y,d.transceiver={receiver:y},d.streams=[R.stream],w.dispatchEvent(d)})},this.addEventListener("addstream",this._ontrackpoly)),v.apply(this,arguments)}}else o.wrapPeerConnectionEvent(m,"track",function(w){return w.transceiver||Object.defineProperty(w,"transceiver",{value:{receiver:w.receiver}}),w})}function p(m){if(b(m)==="object"&&m.RTCPeerConnection&&!("getSenders"in m.RTCPeerConnection.prototype)&&"createDTMFSender"in m.RTCPeerConnection.prototype){var v=function(_,E){return{track:E,get dtmf(){return this._dtmf===void 0&&(E.kind==="audio"?this._dtmf=_.createDTMFSender(E):this._dtmf=null),this._dtmf},_pc:_}};if(!m.RTCPeerConnection.prototype.getSenders){m.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var w=m.RTCPeerConnection.prototype.addTrack;m.RTCPeerConnection.prototype.addTrack=function(_,E){var C=w.apply(this,arguments);return C||(C=v(this,_),this._senders.push(C)),C};var R=m.RTCPeerConnection.prototype.removeTrack;m.RTCPeerConnection.prototype.removeTrack=function(_){R.apply(this,arguments);var E=this._senders.indexOf(_);E!==-1&&this._senders.splice(E,1)}}var P=m.RTCPeerConnection.prototype.addStream;m.RTCPeerConnection.prototype.addStream=function(_){var E=this;this._senders=this._senders||[],P.apply(this,[_]),_.getTracks().forEach(function(C){E._senders.push(v(E,C))})};var y=m.RTCPeerConnection.prototype.removeStream;m.RTCPeerConnection.prototype.removeStream=function(_){var E=this;this._senders=this._senders||[],y.apply(this,[_]),_.getTracks().forEach(function(C){var O=E._senders.find(function(L){return L.track===C});O&&E._senders.splice(E._senders.indexOf(O),1)})}}else if(b(m)==="object"&&m.RTCPeerConnection&&"getSenders"in m.RTCPeerConnection.prototype&&"createDTMFSender"in m.RTCPeerConnection.prototype&&m.RTCRtpSender&&!("dtmf"in m.RTCRtpSender.prototype)){var d=m.RTCPeerConnection.prototype.getSenders;m.RTCPeerConnection.prototype.getSenders=function(){var _=this,E=d.apply(this,[]);return E.forEach(function(C){return C._pc=_}),E},Object.defineProperty(m.RTCRtpSender.prototype,"dtmf",{get:function(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function S(m){if(m.RTCPeerConnection){var v=m.RTCPeerConnection.prototype.getStats;m.RTCPeerConnection.prototype.getStats=function(){var w=this,R=Array.prototype.slice.call(arguments),P=R[0],y=R[1],d=R[2];if(arguments.length>0&&typeof P=="function")return v.apply(this,arguments);if(v.length===0&&(arguments.length===0||typeof P!="function"))return v.apply(this,[]);var _=function(O){var L={};return O.result().forEach(function(N){var W={id:N.id,timestamp:N.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[N.type]||N.type};N.names().forEach(function(B){W[B]=N.stat(B)}),L[W.id]=W}),L},E=function(O){return new Map(Object.keys(O).map(function(L){return[L,O[L]]}))};if(arguments.length>=2){var C=function(O){y(E(_(O)))};return v.apply(this,[C,P])}return new Promise(function(O,L){v.apply(w,[function(N){O(E(_(N)))},L])}).then(y,d)}}}function f(m){if(b(m)==="object"&&m.RTCPeerConnection&&m.RTCRtpSender&&m.RTCRtpReceiver){if(!("getStats"in m.RTCRtpSender.prototype)){var v=m.RTCPeerConnection.prototype.getSenders;v&&(m.RTCPeerConnection.prototype.getSenders=function(){var y=this,d=v.apply(this,[]);return d.forEach(function(_){return _._pc=y}),d});var w=m.RTCPeerConnection.prototype.addTrack;w&&(m.RTCPeerConnection.prototype.addTrack=function(){var y=w.apply(this,arguments);return y._pc=this,y}),m.RTCRtpSender.prototype.getStats=function(){var y=this;return this._pc.getStats().then(function(d){return o.filterStats(d,y.track,!0)})}}if(!("getStats"in m.RTCRtpReceiver.prototype)){var R=m.RTCPeerConnection.prototype.getReceivers;R&&(m.RTCPeerConnection.prototype.getReceivers=function(){var y=this,d=R.apply(this,[]);return d.forEach(function(_){return _._pc=y}),d}),o.wrapPeerConnectionEvent(m,"track",function(y){return y.receiver._pc=y.srcElement,y}),m.RTCRtpReceiver.prototype.getStats=function(){var y=this;return this._pc.getStats().then(function(d){return o.filterStats(d,y.track,!1)})}}if("getStats"in m.RTCRtpSender.prototype&&"getStats"in m.RTCRtpReceiver.prototype){var P=m.RTCPeerConnection.prototype.getStats;m.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof m.MediaStreamTrack){var y,d,_,E=arguments[0];return this.getSenders().forEach(function(C){C.track===E&&(y?_=!0:y=C)}),this.getReceivers().forEach(function(C){return C.track===E&&(d?_=!0:d=C),C.track===E}),_||y&&d?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):y?y.getStats():d?d.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return P.apply(this,arguments)}}}}function I(m){m.RTCPeerConnection.prototype.getLocalStreams=function(){var y=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(function(d){return y._shimmedLocalStreams[d][0]})};var v=m.RTCPeerConnection.prototype.addTrack;m.RTCPeerConnection.prototype.addTrack=function(y,d){if(!d)return v.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var _=v.apply(this,arguments);return this._shimmedLocalStreams[d.id]?this._shimmedLocalStreams[d.id].indexOf(_)===-1&&this._shimmedLocalStreams[d.id].push(_):this._shimmedLocalStreams[d.id]=[d,_],_};var w=m.RTCPeerConnection.prototype.addStream;m.RTCPeerConnection.prototype.addStream=function(y){var d=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},y.getTracks().forEach(function(C){if(d.getSenders().find(function(O){return O.track===C}))throw new DOMException("Track already exists.","InvalidAccessError")});var _=this.getSenders();w.apply(this,arguments);var E=this.getSenders().filter(function(C){return _.indexOf(C)===-1});this._shimmedLocalStreams[y.id]=[y].concat(E)};var R=m.RTCPeerConnection.prototype.removeStream;m.RTCPeerConnection.prototype.removeStream=function(y){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[y.id],R.apply(this,arguments)};var P=m.RTCPeerConnection.prototype.removeTrack;m.RTCPeerConnection.prototype.removeTrack=function(y){var d=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},y&&Object.keys(this._shimmedLocalStreams).forEach(function(_){var E=d._shimmedLocalStreams[_].indexOf(y);E!==-1&&d._shimmedLocalStreams[_].splice(E,1),d._shimmedLocalStreams[_].length===1&&delete d._shimmedLocalStreams[_]}),P.apply(this,arguments)}}function A(m,v){if(m.RTCPeerConnection){if(m.RTCPeerConnection.prototype.addTrack&&v.version>=65)return I(m);var w=m.RTCPeerConnection.prototype.getLocalStreams;m.RTCPeerConnection.prototype.getLocalStreams=function(){var C=this,O=w.apply(this);return this._reverseStreams=this._reverseStreams||{},O.map(function(L){return C._reverseStreams[L.id]})};var R=m.RTCPeerConnection.prototype.addStream;m.RTCPeerConnection.prototype.addStream=function(C){var O=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},C.getTracks().forEach(function(N){if(O.getSenders().find(function(W){return W.track===N}))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[C.id]){var L=new m.MediaStream(C.getTracks());this._streams[C.id]=L,this._reverseStreams[L.id]=C,C=L}R.apply(this,[C])};var P=m.RTCPeerConnection.prototype.removeStream;m.RTCPeerConnection.prototype.removeStream=function(C){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},P.apply(this,[this._streams[C.id]||C]),delete this._reverseStreams[this._streams[C.id]?this._streams[C.id].id:C.id],delete this._streams[C.id]},m.RTCPeerConnection.prototype.addTrack=function(C,O){var L=this;if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var N=[].slice.call(arguments,1);if(N.length!==1||!N[0].getTracks().find(function(se){return se===C}))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(function(se){return se.track===C}))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var W=this._streams[O.id];if(W)W.addTrack(C),Promise.resolve().then(function(){L.dispatchEvent(new Event("negotiationneeded"))});else{var B=new m.MediaStream([C]);this._streams[O.id]=B,this._reverseStreams[B.id]=O,this.addStream(B)}return this.getSenders().find(function(se){return se.track===C})},["createOffer","createAnswer"].forEach(function(C){var O=m.RTCPeerConnection.prototype[C],L=u({},C,function(){var N=this,W=arguments;return arguments.length&&typeof arguments[0]=="function"?O.apply(this,[function(B){var se=_(N,B);W[0].apply(null,[se])},function(B){W[1]&&W[1].apply(null,B)},arguments[2]]):O.apply(this,arguments).then(function(B){return _(N,B)})});m.RTCPeerConnection.prototype[C]=L[C]});var y=m.RTCPeerConnection.prototype.setLocalDescription;m.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=E(this,arguments[0]),y.apply(this,arguments)):y.apply(this,arguments)};var d=Object.getOwnPropertyDescriptor(m.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(m.RTCPeerConnection.prototype,"localDescription",{get:function(){var C=d.get.apply(this);return C.type===""?C:_(this,C)}}),m.RTCPeerConnection.prototype.removeTrack=function(C){var O,L=this;if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!C._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(C._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{},Object.keys(this._streams).forEach(function(N){L._streams[N].getTracks().find(function(W){return C.track===W})&&(O=L._streams[N])}),O&&(O.getTracks().length===1?this.removeStream(this._reverseStreams[O.id]):O.removeTrack(C.track),this.dispatchEvent(new Event("negotiationneeded")))}}function _(C,O){var L=O.sdp;return Object.keys(C._reverseStreams||[]).forEach(function(N){var W=C._reverseStreams[N],B=C._streams[W.id];L=L.replace(new RegExp(B.id,"g"),W.id)}),new RTCSessionDescription({type:O.type,sdp:L})}function E(C,O){var L=O.sdp;return Object.keys(C._reverseStreams||[]).forEach(function(N){var W=C._reverseStreams[N],B=C._streams[W.id];L=L.replace(new RegExp(W.id,"g"),B.id)}),new RTCSessionDescription({type:O.type,sdp:L})}}function x(m,v){!m.RTCPeerConnection&&m.webkitRTCPeerConnection&&(m.RTCPeerConnection=m.webkitRTCPeerConnection),m.RTCPeerConnection&&v.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(w){var R=m.RTCPeerConnection.prototype[w],P=u({},w,function(){return arguments[0]=new(w==="addIceCandidate"?m.RTCIceCandidate:m.RTCSessionDescription)(arguments[0]),R.apply(this,arguments)});m.RTCPeerConnection.prototype[w]=P[w]})}function D(m,v){o.wrapPeerConnectionEvent(m,"negotiationneeded",function(w){var R=w.target;if(!(v.version<72||R.getConfiguration&&R.getConfiguration().sdpSemantics==="plan-b")||R.signalingState==="stable")return w})}},{"../utils.js":11,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(n,i,r){function o(c,a){c.navigator.mediaDevices&&"getDisplayMedia"in c.navigator.mediaDevices||c.navigator.mediaDevices&&(typeof a=="function"?c.navigator.mediaDevices.getDisplayMedia=function(s){return a(s).then(function(l){var u=s.video&&s.video.width,h=s.video&&s.video.height,g=s.video&&s.video.frameRate;return s.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:l,maxFrameRate:g||3}},u&&(s.video.mandatory.maxWidth=u),h&&(s.video.mandatory.maxHeight=h),c.navigator.mediaDevices.getUserMedia(s)})}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}Object.defineProperty(r,"__esModule",{value:!0}),r.shimGetDisplayMedia=o},{}],5:[function(n,i,r){function o(u){if(typeof WeakMap!="function")return null;var h=new WeakMap,g=new WeakMap;return(o=function(b){return b?g:h})(u)}function c(u,h){if(u&&u.__esModule)return u;if(u===null||a(u)!=="object"&&typeof u!="function")return{default:u};var g=o(h);if(g&&g.has(u))return g.get(u);var b={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var k in u)if(k!=="default"&&Object.prototype.hasOwnProperty.call(u,k)){var p=T?Object.getOwnPropertyDescriptor(u,k):null;p&&(p.get||p.set)?Object.defineProperty(b,k,p):b[k]=u[k]}return b.default=u,g&&g.set(u,b),b}function a(u){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},a(u)}Object.defineProperty(r,"__esModule",{value:!0}),r.shimGetUserMedia=l;var s=c(n("../utils.js")).log;function l(u,h){var g=u&&u.navigator;if(g.mediaDevices){var b=function(f){if(a(f)!=="object"||f.mandatory||f.optional)return f;var I={};return Object.keys(f).forEach(function(A){if(A!=="require"&&A!=="advanced"&&A!=="mediaSource"){var x=a(f[A])==="object"?f[A]:{ideal:f[A]};x.exact!==void 0&&typeof x.exact=="number"&&(x.min=x.max=x.exact);var D=function(v,w){return v?v+w.charAt(0).toUpperCase()+w.slice(1):w==="deviceId"?"sourceId":w};if(x.ideal!==void 0){I.optional=I.optional||[];var m={};typeof x.ideal=="number"?(m[D("min",A)]=x.ideal,I.optional.push(m),(m={})[D("max",A)]=x.ideal,I.optional.push(m)):(m[D("",A)]=x.ideal,I.optional.push(m))}x.exact!==void 0&&typeof x.exact!="number"?(I.mandatory=I.mandatory||{},I.mandatory[D("",A)]=x.exact):["min","max"].forEach(function(v){x[v]!==void 0&&(I.mandatory=I.mandatory||{},I.mandatory[D(v,A)]=x[v])})}}),f.advanced&&(I.optional=(I.optional||[]).concat(f.advanced)),I},T=function(f,I){if(h.version>=61)return I(f);if((f=JSON.parse(JSON.stringify(f)))&&a(f.audio)==="object"){var A=function(v,w,R){w in v&&!(R in v)&&(v[R]=v[w],delete v[w])};A((f=JSON.parse(JSON.stringify(f))).audio,"autoGainControl","googAutoGainControl"),A(f.audio,"noiseSuppression","googNoiseSuppression"),f.audio=b(f.audio)}if(f&&a(f.video)==="object"){var x=f.video.facingMode;x=x&&(a(x)==="object"?x:{ideal:x});var D,m=h.version<66;if(x&&(x.exact==="user"||x.exact==="environment"||x.ideal==="user"||x.ideal==="environment")&&(!g.mediaDevices.getSupportedConstraints||!g.mediaDevices.getSupportedConstraints().facingMode||m)&&(delete f.video.facingMode,x.exact==="environment"||x.ideal==="environment"?D=["back","rear"]:x.exact!=="user"&&x.ideal!=="user"||(D=["front"]),D))return g.mediaDevices.enumerateDevices().then(function(v){var w=(v=v.filter(function(R){return R.kind==="videoinput"})).find(function(R){return D.some(function(P){return R.label.toLowerCase().includes(P)})});return!w&&v.length&&D.includes("back")&&(w=v[v.length-1]),w&&(f.video.deviceId=x.exact?{exact:w.deviceId}:{ideal:w.deviceId}),f.video=b(f.video),s("chrome: "+JSON.stringify(f)),I(f)});f.video=b(f.video)}return s("chrome: "+JSON.stringify(f)),I(f)},k=function(f){return h.version>=64?f:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[f.name]||f.name,message:f.message,constraint:f.constraint||f.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},p=function(f,I,A){T(f,function(x){g.webkitGetUserMedia(x,I,function(D){A&&A(k(D))})})};if(g.getUserMedia=p.bind(g),g.mediaDevices.getUserMedia){var S=g.mediaDevices.getUserMedia.bind(g.mediaDevices);g.mediaDevices.getUserMedia=function(f){return T(f,function(I){return S(I).then(function(A){if(I.audio&&!A.getAudioTracks().length||I.video&&!A.getVideoTracks().length)throw A.getTracks().forEach(function(x){x.stop()}),new DOMException("","NotFoundError");return A},function(A){return Promise.reject(k(A))})})}}}}},{"../utils.js":11}],6:[function(n,i,r){Object.defineProperty(r,"__esModule",{value:!0}),r.removeExtmapAllowMixed=p,r.shimAddIceCandidateNullOrEmpty=S,r.shimConnectionState=k,r.shimMaxMessageSize=b,r.shimParameterlessSetLocalDescription=f,r.shimRTCIceCandidate=h,r.shimRTCIceCandidateRelayProtocol=g,r.shimSendThrowTypeError=T;var o=l(n("sdp")),c=s(n("./utils"));function a(I){if(typeof WeakMap!="function")return null;var A=new WeakMap,x=new WeakMap;return(a=function(D){return D?x:A})(I)}function s(I,A){if(I&&I.__esModule)return I;if(I===null||u(I)!=="object"&&typeof I!="function")return{default:I};var x=a(A);if(x&&x.has(I))return x.get(I);var D={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in I)if(v!=="default"&&Object.prototype.hasOwnProperty.call(I,v)){var w=m?Object.getOwnPropertyDescriptor(I,v):null;w&&(w.get||w.set)?Object.defineProperty(D,v,w):D[v]=I[v]}return D.default=I,x&&x.set(I,D),D}function l(I){return I&&I.__esModule?I:{default:I}}function u(I){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},u(I)}function h(I){if(!(!I.RTCIceCandidate||I.RTCIceCandidate&&"foundation"in I.RTCIceCandidate.prototype)){var A=I.RTCIceCandidate;I.RTCIceCandidate=function(x){if(u(x)==="object"&&x.candidate&&x.candidate.indexOf("a=")===0&&((x=JSON.parse(JSON.stringify(x))).candidate=x.candidate.substring(2)),x.candidate&&x.candidate.length){var D=new A(x),m=o.default.parseCandidate(x.candidate);for(var v in m)v in D||Object.defineProperty(D,v,{value:m[v]});return D.toJSON=function(){return{candidate:D.candidate,sdpMid:D.sdpMid,sdpMLineIndex:D.sdpMLineIndex,usernameFragment:D.usernameFragment}},D}return new A(x)},I.RTCIceCandidate.prototype=A.prototype,c.wrapPeerConnectionEvent(I,"icecandidate",function(x){return x.candidate&&Object.defineProperty(x,"candidate",{value:new I.RTCIceCandidate(x.candidate),writable:"false"}),x})}}function g(I){!I.RTCIceCandidate||I.RTCIceCandidate&&"relayProtocol"in I.RTCIceCandidate.prototype||c.wrapPeerConnectionEvent(I,"icecandidate",function(A){if(A.candidate){var x=o.default.parseCandidate(A.candidate.candidate);x.type==="relay"&&(A.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[x.priority>>24])}return A})}function b(I,A){if(I.RTCPeerConnection){"sctp"in I.RTCPeerConnection.prototype||Object.defineProperty(I.RTCPeerConnection.prototype,"sctp",{get:function(){return this._sctp===void 0?null:this._sctp}});var x=function(R){if(!R||!R.sdp)return!1;var P=o.default.splitSections(R.sdp);return P.shift(),P.some(function(y){var d=o.default.parseMLine(y);return d&&d.kind==="application"&&d.protocol.indexOf("SCTP")!==-1})},D=function(R){var P=R.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(P===null||P.length<2)return-1;var y=parseInt(P[1],10);return y!=y?-1:y},m=function(R){var P=65536;return A.browser==="firefox"&&(P=A.version<57?R===-1?16384:2147483637:A.version<60?A.version===57?65535:65536:2147483637),P},v=function(R,P){var y=65536;A.browser==="firefox"&&A.version===57&&(y=65535);var d=o.default.matchPrefix(R.sdp,"a=max-message-size:");return d.length>0?y=parseInt(d[0].substring(19),10):A.browser==="firefox"&&P!==-1&&(y=2147483637),y},w=I.RTCPeerConnection.prototype.setRemoteDescription;I.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,A.browser==="chrome"&&A.version>=76&&this.getConfiguration().sdpSemantics==="plan-b"&&Object.defineProperty(this,"sctp",{get:function(){return this._sctp===void 0?null:this._sctp},enumerable:!0,configurable:!0}),x(arguments[0])){var R,P=D(arguments[0]),y=m(P),d=v(arguments[0],P);R=y===0&&d===0?Number.POSITIVE_INFINITY:y===0||d===0?Math.max(y,d):Math.min(y,d);var _={};Object.defineProperty(_,"maxMessageSize",{get:function(){return R}}),this._sctp=_}return w.apply(this,arguments)}}}function T(I){if(I.RTCPeerConnection&&"createDataChannel"in I.RTCPeerConnection.prototype){var A=I.RTCPeerConnection.prototype.createDataChannel;I.RTCPeerConnection.prototype.createDataChannel=function(){var D=A.apply(this,arguments);return x(D,this),D},c.wrapPeerConnectionEvent(I,"datachannel",function(D){return x(D.channel,D.target),D})}function x(D,m){var v=D.send;D.send=function(){var w=arguments[0],R=w.length||w.size||w.byteLength;if(D.readyState==="open"&&m.sctp&&R>m.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+m.sctp.maxMessageSize+" bytes)");return v.apply(D,arguments)}}}function k(I){if(I.RTCPeerConnection&&!("connectionState"in I.RTCPeerConnection.prototype)){var A=I.RTCPeerConnection.prototype;Object.defineProperty(A,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(A,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(x){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),x&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=x)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(function(x){var D=A[x];A[x]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(m){var v=m.target;if(v._lastConnectionState!==v.connectionState){v._lastConnectionState=v.connectionState;var w=new Event("connectionstatechange",m);v.dispatchEvent(w)}return m},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),D.apply(this,arguments)}})}}function p(I,A){if(I.RTCPeerConnection&&!(A.browser==="chrome"&&A.version>=71||A.browser==="safari"&&A.version>=605)){var x=I.RTCPeerConnection.prototype.setRemoteDescription;I.RTCPeerConnection.prototype.setRemoteDescription=function(D){if(D&&D.sdp&&D.sdp.indexOf(` a=extmap-allow-mixed`)!==-1){var m=D.sdp.split(` `).filter(function(v){return v.trim()!=="a=extmap-allow-mixed"}).join(` `);I.RTCSessionDescription&&D instanceof I.RTCSessionDescription?arguments[0]=new I.RTCSessionDescription({type:D.type,sdp:m}):D.sdp=m}return x.apply(this,arguments)}}}function S(I,A){if(I.RTCPeerConnection&&I.RTCPeerConnection.prototype){var x=I.RTCPeerConnection.prototype.addIceCandidate;x&&x.length!==0&&(I.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?(A.browser==="chrome"&&A.version<78||A.browser==="firefox"&&A.version<68||A.browser==="safari")&&arguments[0]&&arguments[0].candidate===""?Promise.resolve():x.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}}function f(I,A){if(I.RTCPeerConnection&&I.RTCPeerConnection.prototype){var x=I.RTCPeerConnection.prototype.setLocalDescription;x&&x.length!==0&&(I.RTCPeerConnection.prototype.setLocalDescription=function(){var D=this,m=arguments[0]||{};if(u(m)!=="object"||m.type&&m.sdp)return x.apply(this,arguments);if(!(m={type:m.type,sdp:m.sdp}).type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":m.type="offer";break;default:m.type="answer"}return m.sdp||m.type!=="offer"&&m.type!=="answer"?x.apply(this,[m]):(m.type==="offer"?this.createOffer:this.createAnswer).apply(this).then(function(v){return x.apply(D,[v])})})}}},{"./utils":11,sdp:12}],7:[function(n,i,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shimAddTransceiver=R,r.shimCreateAnswer=d,r.shimCreateOffer=y,Object.defineProperty(r,"shimGetDisplayMedia",{enumerable:!0,get:function(){return a.shimGetDisplayMedia}}),r.shimGetParameters=P,Object.defineProperty(r,"shimGetUserMedia",{enumerable:!0,get:function(){return c.shimGetUserMedia}}),r.shimOnTrack=A,r.shimPeerConnection=x,r.shimRTCDataChannel=w,r.shimReceiverGetStats=m,r.shimRemoveStream=v,r.shimSenderGetStats=D;var o=l(n("../utils")),c=n("./getusermedia"),a=n("./getdisplaymedia");function s(_){if(typeof WeakMap!="function")return null;var E=new WeakMap,C=new WeakMap;return(s=function(O){return O?C:E})(_)}function l(_,E){if(_&&_.__esModule)return _;if(_===null||I(_)!=="object"&&typeof _!="function")return{default:_};var C=s(E);if(C&&C.has(_))return C.get(_);var O={},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var N in _)if(N!=="default"&&Object.prototype.hasOwnProperty.call(_,N)){var W=L?Object.getOwnPropertyDescriptor(_,N):null;W&&(W.get||W.set)?Object.defineProperty(O,N,W):O[N]=_[N]}return O.default=_,C&&C.set(_,O),O}function u(_){return T(_)||b(_)||g(_)||h()}function h(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(_,E){if(_){if(typeof _=="string")return k(_,E);var C=Object.prototype.toString.call(_).slice(8,-1);return C==="Object"&&_.constructor&&(C=_.constructor.name),C==="Map"||C==="Set"?Array.from(_):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?k(_,E):void 0}}function b(_){if(typeof Symbol<"u"&&_[Symbol.iterator]!=null||_["@@iterator"]!=null)return Array.from(_)}function T(_){if(Array.isArray(_))return k(_)}function k(_,E){(E==null||E>_.length)&&(E=_.length);for(var C=0,O=new Array(E);C0;O&&C.forEach(function(B){if("rid"in B&&!/^[a-z0-9]{0,16}$/i.test(B.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in B&&!(parseFloat(B.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in B&&!(parseFloat(B.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});var L=E.apply(this,arguments);if(O){var N=L.sender,W=N.getParameters();(!("encodings"in W)||W.encodings.length===1&&Object.keys(W.encodings[0]).length===0)&&(W.encodings=C,N.sendEncodings=C,this.setParametersPromises.push(N.setParameters(W).then(function(){delete N.sendEncodings}).catch(function(){delete N.sendEncodings})))}return L})}}function P(_){if(I(_)==="object"&&_.RTCRtpSender){var E=_.RTCRtpSender.prototype.getParameters;E&&(_.RTCRtpSender.prototype.getParameters=function(){var C=E.apply(this,arguments);return"encodings"in C||(C.encodings=[].concat(this.sendEncodings||[{}])),C})}}function y(_){if(I(_)==="object"&&_.RTCPeerConnection){var E=_.RTCPeerConnection.prototype.createOffer;_.RTCPeerConnection.prototype.createOffer=function(){var C=arguments,O=this;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return E.apply(O,C)}).finally(function(){O.setParametersPromises=[]}):E.apply(this,arguments)}}}function d(_){if(I(_)==="object"&&_.RTCPeerConnection){var E=_.RTCPeerConnection.prototype.createAnswer;_.RTCPeerConnection.prototype.createAnswer=function(){var C=arguments,O=this;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return E.apply(O,C)}).finally(function(){O.setParametersPromises=[]}):E.apply(this,arguments)}}}},{"../utils":11,"./getdisplaymedia":8,"./getusermedia":9}],8:[function(n,i,r){function o(c,a){c.navigator.mediaDevices&&"getDisplayMedia"in c.navigator.mediaDevices||c.navigator.mediaDevices&&(c.navigator.mediaDevices.getDisplayMedia=function(s){if(!s||!s.video){var l=new DOMException("getDisplayMedia without video constraints is undefined");return l.name="NotFoundError",l.code=8,Promise.reject(l)}return s.video===!0?s.video={mediaSource:a}:s.video.mediaSource=a,c.navigator.mediaDevices.getUserMedia(s)})}Object.defineProperty(r,"__esModule",{value:!0}),r.shimGetDisplayMedia=o},{}],9:[function(n,i,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shimGetUserMedia=l;var o=a(n("../utils"));function c(u){if(typeof WeakMap!="function")return null;var h=new WeakMap,g=new WeakMap;return(c=function(b){return b?g:h})(u)}function a(u,h){if(u&&u.__esModule)return u;if(u===null||s(u)!=="object"&&typeof u!="function")return{default:u};var g=c(h);if(g&&g.has(u))return g.get(u);var b={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var k in u)if(k!=="default"&&Object.prototype.hasOwnProperty.call(u,k)){var p=T?Object.getOwnPropertyDescriptor(u,k):null;p&&(p.get||p.set)?Object.defineProperty(b,k,p):b[k]=u[k]}return b.default=u,g&&g.set(u,b),b}function s(u){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},s(u)}function l(u,h){var g=u&&u.navigator,b=u&&u.MediaStreamTrack;if(g.getUserMedia=function(f,I,A){o.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),g.mediaDevices.getUserMedia(f).then(I,A)},!(h.version>55&&"autoGainControl"in g.mediaDevices.getSupportedConstraints())){var T=function(f,I,A){I in f&&!(A in f)&&(f[A]=f[I],delete f[I])},k=g.mediaDevices.getUserMedia.bind(g.mediaDevices);if(g.mediaDevices.getUserMedia=function(f){return s(f)==="object"&&s(f.audio)==="object"&&(f=JSON.parse(JSON.stringify(f)),T(f.audio,"autoGainControl","mozAutoGainControl"),T(f.audio,"noiseSuppression","mozNoiseSuppression")),k(f)},b&&b.prototype.getSettings){var p=b.prototype.getSettings;b.prototype.getSettings=function(){var f=p.apply(this,arguments);return T(f,"mozAutoGainControl","autoGainControl"),T(f,"mozNoiseSuppression","noiseSuppression"),f}}if(b&&b.prototype.applyConstraints){var S=b.prototype.applyConstraints;b.prototype.applyConstraints=function(f){return this.kind==="audio"&&s(f)==="object"&&(f=JSON.parse(JSON.stringify(f)),T(f,"autoGainControl","mozAutoGainControl"),T(f,"noiseSuppression","mozNoiseSuppression")),S.apply(this,[f])}}}}},{"../utils":11}],10:[function(n,i,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shimAudioContext=S,r.shimCallbacksAPI=h,r.shimConstraints=b,r.shimCreateOfferLegacy=p,r.shimGetUserMedia=g,r.shimLocalStreamsAPI=l,r.shimRTCIceServerUrls=T,r.shimRemoteStreamsAPI=u,r.shimTrackEventTransceiver=k;var o=a(n("../utils"));function c(f){if(typeof WeakMap!="function")return null;var I=new WeakMap,A=new WeakMap;return(c=function(x){return x?A:I})(f)}function a(f,I){if(f&&f.__esModule)return f;if(f===null||s(f)!=="object"&&typeof f!="function")return{default:f};var A=c(I);if(A&&A.has(f))return A.get(f);var x={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in f)if(m!=="default"&&Object.prototype.hasOwnProperty.call(f,m)){var v=D?Object.getOwnPropertyDescriptor(f,m):null;v&&(v.get||v.set)?Object.defineProperty(x,m,v):x[m]=f[m]}return x.default=f,A&&A.set(f,x),x}function s(f){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},s(f)}function l(f){if(s(f)==="object"&&f.RTCPeerConnection){if("getLocalStreams"in f.RTCPeerConnection.prototype||(f.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in f.RTCPeerConnection.prototype)){var I=f.RTCPeerConnection.prototype.addTrack;f.RTCPeerConnection.prototype.addStream=function(A){var x=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(A)||this._localStreams.push(A),A.getAudioTracks().forEach(function(D){return I.call(x,D,A)}),A.getVideoTracks().forEach(function(D){return I.call(x,D,A)})},f.RTCPeerConnection.prototype.addTrack=function(A){for(var x=this,D=arguments.length,m=new Array(D>1?D-1:0),v=1;v=0)){A._remoteStreams.push(D);var m=new Event("addstream");m.stream=D,A.dispatchEvent(m)}})}),I.apply(A,arguments)}}}function h(f){if(s(f)==="object"&&f.RTCPeerConnection){var I=f.RTCPeerConnection.prototype,A=I.createOffer,x=I.createAnswer,D=I.setLocalDescription,m=I.setRemoteDescription,v=I.addIceCandidate;I.createOffer=function(R,P){var y=arguments.length>=2?arguments[2]:arguments[0],d=A.apply(this,[y]);return P?(d.then(R,P),Promise.resolve()):d},I.createAnswer=function(R,P){var y=arguments.length>=2?arguments[2]:arguments[0],d=x.apply(this,[y]);return P?(d.then(R,P),Promise.resolve()):d};var w=function(R,P,y){var d=D.apply(this,[R]);return y?(d.then(P,y),Promise.resolve()):d};I.setLocalDescription=w,w=function(R,P,y){var d=m.apply(this,[R]);return y?(d.then(P,y),Promise.resolve()):d},I.setRemoteDescription=w,w=function(R,P,y){var d=v.apply(this,[R]);return y?(d.then(P,y),Promise.resolve()):d},I.addIceCandidate=w}}function g(f){var I=f&&f.navigator;if(I.mediaDevices&&I.mediaDevices.getUserMedia){var A=I.mediaDevices,x=A.getUserMedia.bind(A);I.mediaDevices.getUserMedia=function(D){return x(b(D))}}!I.getUserMedia&&I.mediaDevices&&I.mediaDevices.getUserMedia&&(I.getUserMedia=(function(D,m,v){I.mediaDevices.getUserMedia(D).then(m,v)}).bind(I))}function b(f){return f&&f.video!==void 0?Object.assign({},f,{video:o.compactObject(f.video)}):f}function T(f){if(f.RTCPeerConnection){var I=f.RTCPeerConnection;f.RTCPeerConnection=function(A,x){if(A&&A.iceServers){for(var D=[],m=0;m=v&&parseInt(w[v],10)}function g(D,m,v){if(D.RTCPeerConnection){var w=D.RTCPeerConnection.prototype,R=w.addEventListener;w.addEventListener=function(y,d){if(y!==m)return R.apply(this,arguments);var _=function(E){var C=v(E);C&&(d.handleEvent?d.handleEvent(C):d(C))};return this._eventMap=this._eventMap||{},this._eventMap[m]||(this._eventMap[m]=new Map),this._eventMap[m].set(d,_),R.apply(this,[y,_])};var P=w.removeEventListener;w.removeEventListener=function(y,d){if(y!==m||!this._eventMap||!this._eventMap[m])return P.apply(this,arguments);if(!this._eventMap[m].has(d))return P.apply(this,arguments);var _=this._eventMap[m].get(d);return this._eventMap[m].delete(d),this._eventMap[m].size===0&&delete this._eventMap[m],Object.keys(this._eventMap).length===0&&delete this._eventMap,P.apply(this,[y,_])},Object.defineProperty(w,"on"+m,{get:function(){return this["_on"+m]},set:function(y){this["_on"+m]&&(this.removeEventListener(m,this["_on"+m]),delete this["_on"+m]),y&&this.addEventListener(m,this["_on"+m]=y)},enumerable:!0,configurable:!0})}}function b(D){return typeof D!="boolean"?new Error("Argument type: "+s(D)+". Please use a boolean."):(l=D,D?"adapter.js logging disabled":"adapter.js logging enabled")}function T(D){return typeof D!="boolean"?new Error("Argument type: "+s(D)+". Please use a boolean."):(u=!D,"adapter.js deprecation warnings "+(D?"disabled":"enabled"))}function k(){if((typeof window>"u"?"undefined":s(window))==="object"){if(l)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function p(D,m){u&&console.warn(D+" is deprecated, please use "+m+" instead.")}function S(D){var m={browser:null,version:null};if(D===void 0||!D.navigator||!D.navigator.userAgent)return m.browser="Not a browser.",m;var v=D.navigator;if(v.mozGetUserMedia)m.browser="firefox",m.version=h(v.userAgent,/Firefox\/(\d+)\./,1);else if(v.webkitGetUserMedia||D.isSecureContext===!1&&D.webkitRTCPeerConnection)m.browser="chrome",m.version=h(v.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!D.RTCPeerConnection||!v.userAgent.match(/AppleWebKit\/(\d+)\./))return m.browser="Not a supported browser.",m;m.browser="safari",m.version=h(v.userAgent,/AppleWebKit\/(\d+)\./,1),m.supportsUnifiedPlan=D.RTCRtpTransceiver&&"currentDirection"in D.RTCRtpTransceiver.prototype}return m}function f(D){return Object.prototype.toString.call(D)==="[object Object]"}function I(D){return f(D)?Object.keys(D).reduce(function(m,v){var w=f(D[v]),R=w?I(D[v]):D[v],P=w&&!Object.keys(R).length;return R===void 0||P?m:Object.assign(m,o({},v,R))},{}):D}function A(D,m,v){m&&!v.has(m.id)&&(v.set(m.id,m),Object.keys(m).forEach(function(w){w.endsWith("Id")?A(D,D.get(m[w]),v):w.endsWith("Ids")&&m[w].forEach(function(R){A(D,D.get(R),v)})}))}function x(D,m,v){var w=v?"outbound-rtp":"inbound-rtp",R=new Map;if(m===null)return R;var P=[];return D.forEach(function(y){y.type==="track"&&y.trackIdentifier===m.id&&P.push(y)}),P.forEach(function(y){D.forEach(function(d){d.type===w&&d.trackId===y.id&&A(D,d,R)})}),R}},{}],12:[function(n,i,r){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},c={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};c.localCName=c.generateIdentifier(),c.splitLines=function(a){return a.trim().split(` `).map(function(s){return s.trim()})},c.splitSections=function(a){return a.split(` m=`).map(function(s,l){return(l>0?"m="+s:s).trim()+`\r `})},c.getDescription=function(a){var s=c.splitSections(a);return s&&s[0]},c.getMediaSections=function(a){var s=c.splitSections(a);return s.shift(),s},c.matchPrefix=function(a,s){return c.splitLines(a).filter(function(l){return l.indexOf(s)===0})},c.parseCandidate=function(a){for(var s=void 0,l={foundation:(s=a.indexOf("a=candidate:")===0?a.substring(12).split(" "):a.substring(10).split(" "))[0],component:{1:"rtp",2:"rtcp"}[s[1]]||s[1],protocol:s[2].toLowerCase(),priority:parseInt(s[3],10),ip:s[4],address:s[4],port:parseInt(s[5],10),type:s[7]},u=8;u0?s[0].split("/")[1]:"sendrecv",uri:s[1],attributes:s.slice(2).join(" ")}},c.writeExtmap=function(a){return"a=extmap:"+(a.id||a.preferredId)+(a.direction&&a.direction!=="sendrecv"?"/"+a.direction:"")+" "+a.uri+(a.attributes?" "+a.attributes:"")+`\r `},c.parseFmtp=function(a){for(var s={},l=void 0,u=a.substring(a.indexOf(" ")+1).split(";"),h=0;h-1?(l.attribute=a.substring(s+1,u),l.value=a.substring(u+1)):l.attribute=a.substring(s+1),l},c.parseSsrcGroup=function(a){var s=a.substring(13).split(" ");return{semantics:s.shift(),ssrcs:s.map(function(l){return parseInt(l,10)})}},c.getMid=function(a){var s=c.matchPrefix(a,"a=mid:")[0];if(s)return s.substring(6)},c.parseFingerprint=function(a){var s=a.substring(14).split(" ");return{algorithm:s[0].toLowerCase(),value:s[1].toUpperCase()}},c.getDtlsParameters=function(a,s){return{role:"auto",fingerprints:c.matchPrefix(a+s,"a=fingerprint:").map(c.parseFingerprint)}},c.writeDtlsParameters=function(a,s){var l="a=setup:"+s+`\r `;return a.fingerprints.forEach(function(u){l+="a=fingerprint:"+u.algorithm+" "+u.value+`\r `}),l},c.parseCryptoLine=function(a){var s=a.substring(9).split(" ");return{tag:parseInt(s[0],10),cryptoSuite:s[1],keyParams:s[2],sessionParams:s.slice(3)}},c.writeCryptoLine=function(a){return"a=crypto:"+a.tag+" "+a.cryptoSuite+" "+(o(a.keyParams)==="object"?c.writeCryptoKeyParams(a.keyParams):a.keyParams)+(a.sessionParams?" "+a.sessionParams.join(" "):"")+`\r `},c.parseCryptoKeyParams=function(a){if(a.indexOf("inline:")!==0)return null;var s=a.substring(7).split("|");return{keyMethod:"inline",keySalt:s[0],lifeTime:s[1],mkiValue:s[2]?s[2].split(":")[0]:void 0,mkiLength:s[2]?s[2].split(":")[1]:void 0}},c.writeCryptoKeyParams=function(a){return a.keyMethod+":"+a.keySalt+(a.lifeTime?"|"+a.lifeTime:"")+(a.mkiValue&&a.mkiLength?"|"+a.mkiValue+":"+a.mkiLength:"")},c.getCryptoParameters=function(a,s){return c.matchPrefix(a+s,"a=crypto:").map(c.parseCryptoLine)},c.getIceParameters=function(a,s){var l=c.matchPrefix(a+s,"a=ice-ufrag:")[0],u=c.matchPrefix(a+s,"a=ice-pwd:")[0];return l&&u?{usernameFragment:l.substring(12),password:u.substring(10)}:null},c.writeIceParameters=function(a){var s="a=ice-ufrag:"+a.usernameFragment+`\r a=ice-pwd:`+a.password+`\r `;return a.iceLite&&(s+=`a=ice-lite\r `),s},c.parseRtpParameters=function(a){var s={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},l=c.splitLines(a)[0].split(" ");s.profile=l[2];for(var u=3;u0?"9":"0",l+=" "+(s.profile||"UDP/TLS/RTP/SAVPF")+" ",l+=s.codecs.map(function(h){return h.preferredPayloadType!==void 0?h.preferredPayloadType:h.payloadType}).join(" ")+`\r `,l+=`c=IN IP4 0.0.0.0\r `,l+=`a=rtcp:9 IN IP4 0.0.0.0\r `,s.codecs.forEach(function(h){l+=c.writeRtpMap(h),l+=c.writeFmtp(h),l+=c.writeRtcpFb(h)});var u=0;return s.codecs.forEach(function(h){h.maxptime>u&&(u=h.maxptime)}),u>0&&(l+="a=maxptime:"+u+`\r `),s.headerExtensions&&s.headerExtensions.forEach(function(h){l+=c.writeExtmap(h)}),l},c.parseRtpEncodingParameters=function(a){var s=[],l=c.parseRtpParameters(a),u=l.fecMechanisms.indexOf("RED")!==-1,h=l.fecMechanisms.indexOf("ULPFEC")!==-1,g=c.matchPrefix(a,"a=ssrc:").map(function(S){return c.parseSsrcMedia(S)}).filter(function(S){return S.attribute==="cname"}),b=g.length>0&&g[0].ssrc,T=void 0,k=c.matchPrefix(a,"a=ssrc-group:FID").map(function(S){return S.substring(17).split(" ").map(function(f){return parseInt(f,10)})});k.length>0&&k[0].length>1&&k[0][0]===b&&(T=k[0][1]),l.codecs.forEach(function(S){if(S.name.toUpperCase()==="RTX"&&S.parameters.apt){var f={ssrc:b,codecPayloadType:parseInt(S.parameters.apt,10)};b&&T&&(f.rtx={ssrc:T}),s.push(f),u&&((f=JSON.parse(JSON.stringify(f))).fec={ssrc:b,mechanism:h?"red+ulpfec":"red"},s.push(f))}}),s.length===0&&b&&s.push({ssrc:b});var p=c.matchPrefix(a,"b=");return p.length&&(p=p[0].indexOf("b=TIAS:")===0?parseInt(p[0].substring(7),10):p[0].indexOf("b=AS:")===0?1e3*parseInt(p[0].substring(5),10)*.95-16e3:void 0,s.forEach(function(S){S.maxBitrate=p})),s},c.parseRtcpParameters=function(a){var s={},l=c.matchPrefix(a,"a=ssrc:").map(function(g){return c.parseSsrcMedia(g)}).filter(function(g){return g.attribute==="cname"})[0];l&&(s.cname=l.value,s.ssrc=l.ssrc);var u=c.matchPrefix(a,"a=rtcp-rsize");s.reducedSize=u.length>0,s.compound=u.length===0;var h=c.matchPrefix(a,"a=rtcp-mux");return s.mux=h.length>0,s},c.writeRtcpParameters=function(a){var s="";return a.reducedSize&&(s+=`a=rtcp-rsize\r `),a.mux&&(s+=`a=rtcp-mux\r `),a.ssrc!==void 0&&a.cname&&(s+="a=ssrc:"+a.ssrc+" cname:"+a.cname+`\r `),s},c.parseMsid=function(a){var s=void 0,l=c.matchPrefix(a,"a=msid:");if(l.length===1)return{stream:(s=l[0].substring(7).split(" "))[0],track:s[1]};var u=c.matchPrefix(a,"a=ssrc:").map(function(h){return c.parseSsrcMedia(h)}).filter(function(h){return h.attribute==="msid"});return u.length>0?{stream:(s=u[0].value.split(" "))[0],track:s[1]}:void 0},c.parseSctpDescription=function(a){var s=c.parseMLine(a),l=c.matchPrefix(a,"a=max-message-size:"),u=void 0;l.length>0&&(u=parseInt(l[0].substring(19),10)),isNaN(u)&&(u=65536);var h=c.matchPrefix(a,"a=sctp-port:");if(h.length>0)return{port:parseInt(h[0].substring(12),10),protocol:s.fmt,maxMessageSize:u};var g=c.matchPrefix(a,"a=sctpmap:");if(g.length>0){var b=g[0].substring(10).split(" ");return{port:parseInt(b[0],10),protocol:b[1],maxMessageSize:u}}},c.writeSctpDescription=function(a,s){var l=[];return l=a.protocol!=="DTLS/SCTP"?["m="+a.kind+" 9 "+a.protocol+" "+s.protocol+`\r `,`c=IN IP4 0.0.0.0\r `,"a=sctp-port:"+s.port+`\r `]:["m="+a.kind+" 9 "+a.protocol+" "+s.port+`\r `,`c=IN IP4 0.0.0.0\r `,"a=sctpmap:"+s.port+" "+s.protocol+` 65535\r `],s.maxMessageSize!==void 0&&l.push("a=max-message-size:"+s.maxMessageSize+`\r `),l.join("")},c.generateSessionId=function(){return Math.random().toString().substr(2,22)},c.writeSessionBoilerplate=function(a,s,l){var u=s!==void 0?s:2;return`v=0\r o=`+(l||"thisisadapterortc")+" "+(a||c.generateSessionId())+" "+u+` IN IP4 127.0.0.1\r s=-\r t=0 0\r `},c.getDirection=function(a,s){for(var l=c.splitLines(a),u=0;uc;)iR.f(e,n=r[c++],i[n]);return e};var oo,Nf=Qt("document","documentElement"),cR=Oe,uR=Mf,Lf=Hc,lR=no,dR=Nf,hR=$a,Uf=Lc("IE_PROTO"),Jc=function(){},Vf=function(e){return"