UNPKG

@wowzamediasystems/sdk-rts

Version:

SDK for building a realtime broadcaster using the Wowza platform.

1 lines 177 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).wowza={})}(this,(function(e){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!==t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}function n(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){var t={exports:{}};return e(t,t.exports),t.exports}var s,a,c=function(e){return e&&e.Math==Math&&e},u=c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof i&&i)||function(){return this}()||Function("return this")(),l=function(e){try{return!!e()}catch(e){return!0}},d=!l((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f=!l((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),p=Function.prototype.call,h=f?p.bind(p):function(){return p.apply(p,arguments)},g={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,v=m&&!g.call({1:2},1)?function(e){var t=m(this,e);return!!t&&t.enumerable}:g,y={f:v},b=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},w=Function.prototype,S=w.call,C=f&&w.bind.bind(S,S),E=f?C:function(e){return function(){return S.apply(e,arguments)}},x=E({}.toString),I=E("".slice),T=function(e){return I(x(e),8,-1)},P=Object,R=E("".split),k=l((function(){return!P("z").propertyIsEnumerable(0)}))?function(e){return"String"==T(e)?R(e,""):P(e)}:P,O=function(e){return null==e},A=TypeError,D=function(e){if(O(e))throw A("Can't call method on "+e);return e},L=function(e){return k(D(e))},j="object"==typeof document&&document.all,M={all:j,IS_HTMLDDA:void 0===j&&void 0!==j},N=M.all,B=M.IS_HTMLDDA?function(e){return"function"==typeof e||e===N}:function(e){return"function"==typeof e},_=M.all,U=M.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:B(e)||e===_}:function(e){return"object"==typeof e?null!==e:B(e)},F=function(e){return B(e)?e:void 0},V=function(e,t){return arguments.length<2?F(u[e]):u[e]&&u[e][t]},z=E({}.isPrototypeOf),G=V("navigator","userAgent")||"",q=u.process,X=u.Deno,H=q&&q.versions||X&&X.version,W=H&&H.v8;W&&(a=(s=W.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!a&&G&&(!(s=G.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=G.match(/Chrome\/(\d+)/))&&(a=+s[1]);var Y=a,J=!!Object.getOwnPropertySymbols&&!l((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Y&&Y<41})),K=J&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Z=Object,Q=K?function(e){return"symbol"==typeof e}:function(e){var t=V("Symbol");return B(t)&&z(t.prototype,Z(e))},ee=String,te=function(e){try{return ee(e)}catch(e){return"Object"}},re=TypeError,ne=function(e){if(B(e))return e;throw re(te(e)+" is not a function")},ie=function(e,t){var r=e[t];return O(r)?void 0:ne(r)},oe=TypeError,se=Object.defineProperty,ae=function(e,t){try{se(u,e,{value:t,configurable:!0,writable:!0})}catch(r){u[e]=t}return t},ce="__core-js_shared__",ue=u[ce]||ae(ce,{}),le=o((function(e){(e.exports=function(e,t){return ue[e]||(ue[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),de=Object,fe=function(e){return de(D(e))},pe=E({}.hasOwnProperty),he=Object.hasOwn||function(e,t){return pe(fe(e),t)},ge=0,me=Math.random(),ve=E(1..toString),ye=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ve(++ge+me,36)},be=le("wks"),we=u.Symbol,Se=we&&we.for,Ce=K?we:we&&we.withoutSetter||ye,Ee=function(e){if(!he(be,e)||!J&&"string"!=typeof be[e]){var t="Symbol."+e;J&&he(we,e)?be[e]=we[e]:be[e]=K&&Se?Se(t):Ce(t)}return be[e]},xe=TypeError,Ie=Ee("toPrimitive"),Te=function(e,t){if(!U(e)||Q(e))return e;var r,n=ie(e,Ie);if(n){if(void 0===t&&(t="default"),r=h(n,e,t),!U(r)||Q(r))return r;throw xe("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&B(r=e.toString)&&!U(n=h(r,e)))return n;if(B(r=e.valueOf)&&!U(n=h(r,e)))return n;if("string"!==t&&B(r=e.toString)&&!U(n=h(r,e)))return n;throw oe("Can't convert object to primitive value")}(e,t)},Pe=function(e){var t=Te(e,"string");return Q(t)?t:t+""},Re=u.document,ke=U(Re)&&U(Re.createElement),Oe=function(e){return ke?Re.createElement(e):{}},Ae=!d&&!l((function(){return 7!=Object.defineProperty(Oe("div"),"a",{get:function(){return 7}}).a})),De=Object.getOwnPropertyDescriptor,Le={f:d?De:function(e,t){if(e=L(e),t=Pe(t),Ae)try{return De(e,t)}catch(e){}if(he(e,t))return b(!h(y.f,e,t),e[t])}},je=d&&l((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Me=String,Ne=TypeError,Be=function(e){if(U(e))return e;throw Ne(Me(e)+" is not an object")},_e=TypeError,Ue=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,Ve="enumerable",ze="configurable",Ge="writable",$e={f:d?je?function(e,t,r){if(Be(e),t=Pe(t),Be(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Ge in r&&!r[Ge]){var n=Fe(e,t);n&&n[Ge]&&(e[t]=r.value,r={configurable:ze in r?r[ze]:n[ze],enumerable:Ve in r?r[Ve]:n[Ve],writable:!1})}return Ue(e,t,r)}:Ue:function(e,t,r){if(Be(e),t=Pe(t),Be(r),Ae)try{return Ue(e,t,r)}catch(e){}if("get"in r||"set"in r)throw _e("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},qe=d?function(e,t,r){return $e.f(e,t,b(1,r))}:function(e,t,r){return e[t]=r,e},Xe=Function.prototype,He=d&&Object.getOwnPropertyDescriptor,We=he(Xe,"name"),Ye={EXISTS:We,PROPER:We&&"something"===function(){}.name,CONFIGURABLE:We&&(!d||d&&He(Xe,"name").configurable)},Je=E(Function.toString);B(ue.inspectSource)||(ue.inspectSource=function(e){return Je(e)});var Ke,Ze,Qe,et=ue.inspectSource,tt=u.WeakMap,rt=B(tt)&&/native code/.test(String(tt)),nt=le("keys"),it=function(e){return nt[e]||(nt[e]=ye(e))},ot={},st="Object already initialized",at=u.TypeError,ct=u.WeakMap;if(rt||ue.state){var ut=ue.state||(ue.state=new ct);ut.get=ut.get,ut.has=ut.has,ut.set=ut.set,Ke=function(e,t){if(ut.has(e))throw at(st);return t.facade=e,ut.set(e,t),t},Ze=function(e){return ut.get(e)||{}},Qe=function(e){return ut.has(e)}}else{var lt=it("state");ot[lt]=!0,Ke=function(e,t){if(he(e,lt))throw at(st);return t.facade=e,qe(e,lt,t),t},Ze=function(e){return he(e,lt)?e[lt]:{}},Qe=function(e){return he(e,lt)}}var dt={set:Ke,get:Ze,has:Qe,enforce:function(e){return Qe(e)?Ze(e):Ke(e,{})},getterFor:function(e){return function(t){var r;if(!U(t)||(r=Ze(t)).type!==e)throw at("Incompatible receiver, "+e+" required");return r}}},ft=o((function(e){var t=Ye.CONFIGURABLE,r=dt.enforce,n=dt.get,i=Object.defineProperty,o=d&&!l((function(){return 8!==i((function(){}),"length",{value:8}).length})),s=String(String).split("String"),a=e.exports=function(e,n,a){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(n="get "+n),a&&a.setter&&(n="set "+n),(!he(e,"name")||t&&e.name!==n)&&(d?i(e,"name",{value:n,configurable:!0}):e.name=n),o&&a&&he(a,"arity")&&e.length!==a.arity&&i(e,"length",{value:a.arity});try{a&&he(a,"constructor")&&a.constructor?d&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return he(c,"source")||(c.source=s.join("string"==typeof n?n:"")),e};Function.prototype.toString=a((function(){return B(this)&&n(this).source||et(this)}),"toString")})),pt=function(e,t,r,n){n||(n={});var i=n.enumerable,o=void 0!==n.name?n.name:t;if(B(r)&&ft(r,o,n),n.global)i?e[t]=r:ae(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:$e.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},ht=Math.ceil,gt=Math.floor,mt=Math.trunc||function(e){var t=+e;return(t>0?gt:ht)(t)},vt=function(e){var t=+e;return t!=t||0===t?0:mt(t)},yt=Math.max,bt=Math.min,wt=Math.min,St=function(e){return e>0?wt(vt(e),9007199254740991):0},Ct=function(e){return St(e.length)},Et=function(e){return function(t,r,n){var i,o=L(t),s=Ct(o),a=function(e,t){var r=vt(e);return r<0?yt(r+t,0):bt(r,t)}(n,s);if(e&&r!=r){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((e||a in o)&&o[a]===r)return e||a||0;return!e&&-1}},xt={includes:Et(!0),indexOf:Et(!1)},It=xt.indexOf,Tt=E([].push),Pt=function(e,t){var r,n=L(e),i=0,o=[];for(r in n)!he(ot,r)&&he(n,r)&&Tt(o,r);for(;t.length>i;)he(n,r=t[i++])&&(~It(o,r)||Tt(o,r));return o},Rt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=Rt.concat("length","prototype"),Ot={f:Object.getOwnPropertyNames||function(e){return Pt(e,kt)}},At={f:Object.getOwnPropertySymbols},Dt=E([].concat),Lt=V("Reflect","ownKeys")||function(e){var t=Ot.f(Be(e)),r=At.f;return r?Dt(t,r(e)):t},jt=function(e,t,r){for(var n=Lt(t),i=$e.f,o=Le.f,s=0;s<n.length;s++){var a=n[s];he(e,a)||r&&he(r,a)||i(e,a,o(t,a))}},Mt=/#|\.prototype\./,Nt=function(e,t){var r=_t[Bt(e)];return r==Ft||r!=Ut&&(B(t)?l(t):!!t)},Bt=Nt.normalize=function(e){return String(e).replace(Mt,".").toLowerCase()},_t=Nt.data={},Ut=Nt.NATIVE="N",Ft=Nt.POLYFILL="P",Vt=Nt,zt=Le.f,Gt=function(e,t){var r,n,i,o,s,a=e.target,c=e.global,l=e.stat;if(r=c?u:l?u[a]||ae(a,{}):(u[a]||{}).prototype)for(n in t){if(o=t[n],i=e.dontCallGetSet?(s=zt(r,n))&&s.value:r[n],!Vt(c?n:a+(l?".":"#")+n,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;jt(o,i)}(e.sham||i&&i.sham)&&qe(o,"sham",!0),pt(r,n,o,e)}},$t=Function.prototype,qt=$t.apply,Xt=$t.call,Ht="object"==typeof Reflect&&Reflect.apply||(f?Xt.bind(qt):function(){return Xt.apply(qt,arguments)}),Wt=Array.isArray||function(e){return"Array"==T(e)},Yt=E([].slice),Jt=V("JSON","stringify"),Kt=E(/./.exec),Zt=E("".charAt),Qt=E("".charCodeAt),er=E("".replace),tr=E(1..toString),rr=/[\uD800-\uDFFF]/g,nr=/^[\uD800-\uDBFF]$/,ir=/^[\uDC00-\uDFFF]$/,or=!J||l((function(){var e=V("Symbol")();return"[null]"!=Jt([e])||"{}"!=Jt({a:e})||"{}"!=Jt(Object(e))})),sr=l((function(){return'"\\udf06\\ud834"'!==Jt("\udf06\ud834")||'"\\udead"'!==Jt("\udead")})),ar=function(e,t){var r=Yt(arguments),n=t;if((U(t)||void 0!==e)&&!Q(e))return Wt(t)||(t=function(e,t){if(B(n)&&(t=h(n,this,e,t)),!Q(t))return t}),r[1]=t,Ht(Jt,null,r)},cr=function(e,t,r){var n=Zt(r,t-1),i=Zt(r,t+1);return Kt(nr,e)&&!Kt(ir,i)||Kt(ir,e)&&!Kt(nr,n)?"\\u"+tr(Qt(e,0),16):e};Jt&&Gt({target:"JSON",stat:!0,arity:3,forced:or||sr},{stringify:function(e,t,r){var n=Yt(arguments),i=Ht(or?ar:Jt,null,n);return sr&&"string"==typeof i?er(i,rr,cr):i}});var ur,lr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},dr=Oe("span").classList,fr=dr&&dr.constructor&&dr.constructor.prototype,pr=fr===Object.prototype?void 0:fr,hr=Object.keys||function(e){return Pt(e,Rt)},gr=d&&!je?Object.defineProperties:function(e,t){Be(e);for(var r,n=L(t),i=hr(t),o=i.length,s=0;o>s;)$e.f(e,r=i[s++],n[r]);return e},mr={f:gr},vr=V("document","documentElement"),yr="prototype",br="script",wr=it("IE_PROTO"),Sr=function(){},Cr=function(e){return"<"+br+">"+e+"</"+br+">"},Er=function(e){e.write(Cr("")),e.close();var t=e.parentWindow.Object;return e=null,t},xr=function(){try{ur=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;xr="undefined"!=typeof document?document.domain&&ur?Er(ur):(t=Oe("iframe"),r="java"+br+":",t.style.display="none",vr.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Cr("document.F=Object")),e.close(),e.F):Er(ur);for(var n=Rt.length;n--;)delete xr[yr][Rt[n]];return xr()};ot[wr]=!0;var Ir=Object.create||function(e,t){var r;return null!==e?(Sr[yr]=Be(e),r=new Sr,Sr[yr]=null,r[wr]=e):r=xr(),void 0===t?r:mr.f(r,t)},Tr=$e.f,Pr=Ee("unscopables"),Rr=Array.prototype;null==Rr[Pr]&&Tr(Rr,Pr,{configurable:!0,value:Ir(null)});var kr,Or,Ar,Dr=function(e){Rr[Pr][e]=!0},Lr={},jr=!l((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Mr=it("IE_PROTO"),Nr=Object,Br=Nr.prototype,_r=jr?Nr.getPrototypeOf:function(e){var t=fe(e);if(he(t,Mr))return t[Mr];var r=t.constructor;return B(r)&&t instanceof r?r.prototype:t instanceof Nr?Br:null},Ur=Ee("iterator"),Fr=!1;[].keys&&("next"in(Ar=[].keys())?(Or=_r(_r(Ar)))!==Object.prototype&&(kr=Or):Fr=!0);var Vr=!U(kr)||l((function(){var e={};return kr[Ur].call(e)!==e}));Vr&&(kr={}),B(kr[Ur])||pt(kr,Ur,(function(){return this}));var zr={IteratorPrototype:kr,BUGGY_SAFARI_ITERATORS:Fr},Gr=$e.f,$r=Ee("toStringTag"),qr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!he(e,$r)&&Gr(e,$r,{configurable:!0,value:t})},Xr=zr.IteratorPrototype,Hr=function(){return this},Wr=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Ir(Xr,{next:b(+!n,r)}),qr(e,i,!1),Lr[i]=Hr,e},Yr=String,Jr=TypeError,Kr=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=E(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Be(r),function(e){if("object"==typeof e||B(e))return e;throw Jr("Can't set "+Yr(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),Zr=Ye.PROPER,Qr=Ye.CONFIGURABLE,en=zr.IteratorPrototype,tn=zr.BUGGY_SAFARI_ITERATORS,rn=Ee("iterator"),nn="keys",on="values",sn="entries",an=function(){return this},cn=function(e,t){return{value:e,done:t}},un=$e.f,ln="Array Iterator",dn=dt.set,fn=dt.getterFor(ln),pn=function(e,t,r,n,i,o,s){Wr(r,t,n);var a,c,u,l=function(e){if(e===i&&m)return m;if(!tn&&e in p)return p[e];switch(e){case nn:case on:case sn:return function(){return new r(this,e)}}return function(){return new r(this)}},d=t+" Iterator",f=!1,p=e.prototype,g=p[rn]||p["@@iterator"]||i&&p[i],m=!tn&&g||l(i),v="Array"==t&&p.entries||g;if(v&&(a=_r(v.call(new e)))!==Object.prototype&&a.next&&(_r(a)!==en&&(Kr?Kr(a,en):B(a[rn])||pt(a,rn,an)),qr(a,d,!0)),Zr&&i==on&&g&&g.name!==on&&(Qr?qe(p,"name",on):(f=!0,m=function(){return h(g,this)})),i)if(c={values:l(on),keys:o?m:l(nn),entries:l(sn)},s)for(u in c)(tn||f||!(u in p))&&pt(p,u,c[u]);else Gt({target:t,proto:!0,forced:tn||f},c);return p[rn]!==m&&pt(p,rn,m,{name:i}),Lr[t]=m,c}(Array,"Array",(function(e,t){dn(this,{type:ln,target:L(e),index:0,kind:t})}),(function(){var e=fn(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,cn(void 0,!0)):cn("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),hn=Lr.Arguments=Lr.Array;if(Dr("keys"),Dr("values"),Dr("entries"),d&&"values"!==hn.name)try{un(hn,"name",{value:"values"})}catch(e){}var gn=Ee("iterator"),mn=Ee("toStringTag"),vn=pn.values,yn=function(e,t){if(e){if(e[gn]!==vn)try{qe(e,gn,vn)}catch(t){e[gn]=vn}if(e[mn]||qe(e,mn,t),lr[t])for(var r in pn)if(e[r]!==pn[r])try{qe(e,r,pn[r])}catch(t){e[r]=pn[r]}}};for(var bn in lr)yn(u[bn]&&u[bn].prototype,bn);yn(pr,"DOMTokenList");var wn=o((function(e){!function(t){var r,n={};n.VERSION="1.6.1";var i={},o=function(e,t){return function(){return t.apply(e,arguments)}},s=function(){var e,t,r=arguments,n=r[0];for(t=1;t<r.length;t++)for(e in r[t])!(e in n)&&r[t].hasOwnProperty(e)&&(n[e]=r[t][e]);return n},a=function(e,t){return{value:e,name:t}};n.TRACE=a(1,"TRACE"),n.DEBUG=a(2,"DEBUG"),n.INFO=a(3,"INFO"),n.TIME=a(4,"TIME"),n.WARN=a(5,"WARN"),n.ERROR=a(8,"ERROR"),n.OFF=a(99,"OFF");var c=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};c.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},getLevel:function(){return this.context.filterLevel},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(n.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(n.TIME,[e,"end"])},invoke:function(e,t){r&&this.enabledFor(e)&&r(t,s({level:e},this.context))}};var u,l=new c({filterLevel:n.OFF});(u=n).enabledFor=o(l,l.enabledFor),u.trace=o(l,l.trace),u.debug=o(l,l.debug),u.time=o(l,l.time),u.timeEnd=o(l,l.timeEnd),u.info=o(l,l.info),u.warn=o(l,l.warn),u.error=o(l,l.error),u.log=u.info,n.setHandler=function(e){r=e},n.setLevel=function(e){for(var t in l.setLevel(e),i)i.hasOwnProperty(t)&&i[t].setLevel(e)},n.getLevel=function(){return l.getLevel()},n.get=function(e){return i[e]||(i[e]=new c(s({name:e},l.context)))},n.createDefaultHandler=function(e){(e=e||{}).formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},r=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(i,o){i=Array.prototype.slice.call(i);var s,a=console.log;o.level===n.TIME?(s=(o.name?"["+o.name+"] ":"")+i[0],"start"===i[1]?console.time?console.time(s):t[s]=(new Date).getTime():console.timeEnd?console.timeEnd(s):r(a,[s+": "+((new Date).getTime()-t[s])+"ms"])):(o.level===n.WARN&&console.warn?a=console.warn:o.level===n.ERROR&&console.error?a=console.error:o.level===n.INFO&&console.info?a=console.info:o.level===n.DEBUG&&console.debug?a=console.debug:o.level===n.TRACE&&console.trace&&(a=console.trace),e.formatter(i,o),r(a,i))}},n.useDefaults=function(e){n.setLevel(e&&e.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(e))},n.setDefaults=n.useDefaults,e.exports?e.exports=n:(n._prevLogger=t.Logger,n.noConflict=function(){return t.Logger=n._prevLogger,n},t.Logger=n)}(i)}));function Sn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Cn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sn(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}wn.useDefaults({defaultLevel:wn.TRACE});const En=(e,t)=>{e.unshift("[".concat(t.name||"Global","] ").concat((new Date).toISOString()," - ").concat(t.level.name," -"))},xn=(e,t)=>t?e.value>=kn[t].value:e.value>=Rn.value,In=wn.createDefaultHandler({formatter:En});wn.setHandler(((e,t)=>{((e,t)=>{e=(e=Array.prototype.slice.call(e)).map((e=>"object"==typeof e?JSON.stringify(e):e)),En(e,t),0!==Tn?(Pn.push(e.join(" ")),Pn.length>=Tn&&(Pn=Pn.slice(-Tn))):Pn=[]})(e,t),xn(t.level,t.name)&&In(e,t);for(const{handler:r,level:n}of On)t.level.value>=n.value&&r(e,t)}));let Tn=1e4,Pn=[],Rn=wn.OFF;const kn={},On=[],An=Cn(Cn({},wn),{},{enabledFor:xn,getHistory:()=>Pn,getHistoryMaxSize:()=>Tn,setHistoryMaxSize:e=>{Tn=e},setLevel:e=>{Rn=e;for(const t in kn)kn[t]=e},getLevel:()=>Rn,get:e=>{kn[e]||(kn[e]=Rn);const t=wn.get(e);return t.setLevel=t=>{kn[e]=t},t.getLevel=()=>kn[e],t},setHandler:(e,t)=>{On.push({handler:e,level:t})},VERSION:"0.1.43"});var Dn="process"==T(u.process),Ln=Ee("species"),jn=function(e){var t=V(e),r=$e.f;d&&t&&!t[Ln]&&r(t,Ln,{configurable:!0,get:function(){return this}})},Mn=TypeError,Nn={};Nn[Ee("toStringTag")]="z";var Bn="[object z]"===String(Nn),_n=Ee("toStringTag"),Un=Object,Fn="Arguments"==T(function(){return arguments}()),Vn=Bn?T: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=Un(e),_n))?r:Fn?T(t):"Object"==(n=T(t))&&B(t.callee)?"Arguments":n},zn=function(){},Gn=[],$n=V("Reflect","construct"),qn=/^\s*(?:class|function)\b/,Xn=E(qn.exec),Hn=!qn.exec(zn),Wn=function(e){if(!B(e))return!1;try{return $n(zn,Gn,e),!0}catch(e){return!1}},Yn=function(e){if(!B(e))return!1;switch(Vn(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Hn||!!Xn(qn,et(e))}catch(e){return!0}};Yn.sham=!0;var Jn,Kn,Zn,Qn,ei=!$n||l((function(){var e;return Wn(Wn.call)||!Wn(Object)||!Wn((function(){e=!0}))||e}))?Yn:Wn,ti=TypeError,ri=Ee("species"),ni=function(e,t){var r,n=Be(e).constructor;return void 0===n||O(r=Be(n)[ri])?t:function(e){if(ei(e))return e;throw ti(te(e)+" is not a constructor")}(r)},ii=function(e){if("Function"===T(e))return E(e)},oi=ii(ii.bind),si=function(e,t){return ne(e),void 0===t?e:f?oi(e,t):function(){return e.apply(t,arguments)}},ai=TypeError,ci=function(e,t){if(e<t)throw ai("Not enough arguments");return e},ui=/(?:ipad|iphone|ipod).*applewebkit/i.test(G),li=u.setImmediate,di=u.clearImmediate,fi=u.process,pi=u.Dispatch,hi=u.Function,gi=u.MessageChannel,mi=u.String,vi=0,yi={},bi="onreadystatechange";try{Jn=u.location}catch(e){}var wi=function(e){if(he(yi,e)){var t=yi[e];delete yi[e],t()}},Si=function(e){return function(){wi(e)}},Ci=function(e){wi(e.data)},Ei=function(e){u.postMessage(mi(e),Jn.protocol+"//"+Jn.host)};li&&di||(li=function(e){ci(arguments.length,1);var t=B(e)?e:hi(e),r=Yt(arguments,1);return yi[++vi]=function(){Ht(t,void 0,r)},Kn(vi),vi},di=function(e){delete yi[e]},Dn?Kn=function(e){fi.nextTick(Si(e))}:pi&&pi.now?Kn=function(e){pi.now(Si(e))}:gi&&!ui?(Qn=(Zn=new gi).port2,Zn.port1.onmessage=Ci,Kn=si(Qn.postMessage,Qn)):u.addEventListener&&B(u.postMessage)&&!u.importScripts&&Jn&&"file:"!==Jn.protocol&&!l(Ei)?(Kn=Ei,u.addEventListener("message",Ci,!1)):Kn=bi in Oe("script")?function(e){vr.appendChild(Oe("script"))[bi]=function(){vr.removeChild(this),wi(e)}}:function(e){setTimeout(Si(e),0)});var xi,Ii,Ti,Pi,Ri,ki,Oi,Ai,Di={set:li,clear:di},Li=/ipad|iphone|ipod/i.test(G)&&void 0!==u.Pebble,ji=/web0s(?!.*chrome)/i.test(G),Mi=Le.f,Ni=Di.set,Bi=u.MutationObserver||u.WebKitMutationObserver,_i=u.document,Ui=u.process,Fi=u.Promise,Vi=Mi(u,"queueMicrotask"),zi=Vi&&Vi.value;zi||(xi=function(){var e,t;for(Dn&&(e=Ui.domain)&&e.exit();Ii;){t=Ii.fn,Ii=Ii.next;try{t()}catch(e){throw Ii?Pi():Ti=void 0,e}}Ti=void 0,e&&e.enter()},ui||Dn||ji||!Bi||!_i?!Li&&Fi&&Fi.resolve?((Oi=Fi.resolve(void 0)).constructor=Fi,Ai=si(Oi.then,Oi),Pi=function(){Ai(xi)}):Dn?Pi=function(){Ui.nextTick(xi)}:(Ni=si(Ni,u),Pi=function(){Ni(xi)}):(Ri=!0,ki=_i.createTextNode(""),new Bi(xi).observe(ki,{characterData:!0}),Pi=function(){ki.data=Ri=!Ri}));var Gi=zi||function(e){var t={fn:e,next:void 0};Ti&&(Ti.next=t),Ii||(Ii=t,Pi()),Ti=t},$i=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},qi=function(){this.head=null,this.tail=null};qi.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var Xi=qi,Hi=u.Promise,Wi="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Yi=!Wi&&!Dn&&"object"==typeof window&&"object"==typeof document;Hi&&Hi.prototype;var Ji,Ki,Zi,Qi=Ee("species"),eo=!1,to=B(u.PromiseRejectionEvent),ro=Vt("Promise",(function(){var e=et(Hi),t=e!==String(Hi);if(!t&&66===Y)return!0;if(!Y||Y<51||!/native code/.test(e)){var r=new Hi((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[Qi]=n,!(eo=r.then((function(){}))instanceof n))return!0}return!t&&(Yi||Wi)&&!to})),no={CONSTRUCTOR:ro,REJECTION_EVENT:to,SUBCLASSING:eo},io=TypeError,oo=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw io("Bad Promise constructor");t=e,r=n})),this.resolve=ne(t),this.reject=ne(r)},so={f:function(e){return new oo(e)}},ao=Di.set,co="Promise",uo=no.CONSTRUCTOR,lo=no.REJECTION_EVENT,fo=no.SUBCLASSING,po=dt.getterFor(co),ho=dt.set,go=Hi&&Hi.prototype,mo=Hi,vo=go,yo=u.TypeError,bo=u.document,wo=u.process,So=so.f,Co=So,Eo=!!(bo&&bo.createEvent&&u.dispatchEvent),xo="unhandledrejection",Io=function(e){var t;return!(!U(e)||!B(t=e.then))&&t},To=function(e,t){var r,n,i,o=t.value,s=1==t.state,a=s?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{a?(s||(2===t.rejection&&Ao(t),t.rejection=1),!0===a?r=o:(l&&l.enter(),r=a(o),l&&(l.exit(),i=!0)),r===e.promise?u(yo("Promise-chain cycle")):(n=Io(r))?h(n,r,c,u):c(r)):u(o)}catch(e){l&&!i&&l.exit(),u(e)}},Po=function(e,t){e.notified||(e.notified=!0,Gi((function(){for(var r,n=e.reactions;r=n.get();)To(r,e);e.notified=!1,t&&!e.rejection&&ko(e)})))},Ro=function(e,t,r){var n,i;Eo?((n=bo.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!lo&&(i=u["on"+e])?i(n):e===xo&&function(e,t){var r=u.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},ko=function(e){h(ao,u,(function(){var t,r=e.facade,n=e.value;if(Oo(e)&&(t=$i((function(){Dn?wo.emit("unhandledRejection",n,r):Ro(xo,r,n)})),e.rejection=Dn||Oo(e)?2:1,t.error))throw t.value}))},Oo=function(e){return 1!==e.rejection&&!e.parent},Ao=function(e){h(ao,u,(function(){var t=e.facade;Dn?wo.emit("rejectionHandled",t):Ro("rejectionhandled",t,e.value)}))},Do=function(e,t,r){return function(n){e(t,n,r)}},Lo=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Po(e,!0))},jo=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw yo("Promise can't be resolved itself");var n=Io(t);n?Gi((function(){var r={done:!1};try{h(n,t,Do(jo,r,e),Do(Lo,r,e))}catch(t){Lo(r,t,e)}})):(e.value=t,e.state=1,Po(e,!1))}catch(t){Lo({done:!1},t,e)}}};if(uo&&(vo=(mo=function(e){!function(e,t){if(z(t,e))return e;throw Mn("Incorrect invocation")}(this,vo),ne(e),h(Ji,this);var t=po(this);try{e(Do(jo,t),Do(Lo,t))}catch(e){Lo(t,e)}}).prototype,(Ji=function(e){ho(this,{type:co,done:!1,notified:!1,parent:!1,reactions:new Xi,rejection:!1,state:0,value:void 0})}).prototype=pt(vo,"then",(function(e,t){var r=po(this),n=So(ni(this,mo));return r.parent=!0,n.ok=!B(e)||e,n.fail=B(t)&&t,n.domain=Dn?wo.domain:void 0,0==r.state?r.reactions.add(n):Gi((function(){To(n,r)})),n.promise})),Ki=function(){var e=new Ji,t=po(e);this.promise=e,this.resolve=Do(jo,t),this.reject=Do(Lo,t)},so.f=So=function(e){return e===mo||undefined===e?new Ki(e):Co(e)},B(Hi)&&go!==Object.prototype)){Zi=go.then,fo||pt(go,"then",(function(e,t){var r=this;return new mo((function(e,t){h(Zi,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete go.constructor}catch(e){}Kr&&Kr(go,vo)}Gt({global:!0,constructor:!0,wrap:!0,forced:uo},{Promise:mo}),qr(mo,co,!1),jn(co);var Mo=Ee("iterator"),No=Array.prototype,Bo=Ee("iterator"),_o=function(e){if(!O(e))return ie(e,Bo)||ie(e,"@@iterator")||Lr[Vn(e)]},Uo=TypeError,Fo=function(e,t,r){var n,i;Be(e);try{if(!(n=ie(e,"return"))){if("throw"===t)throw r;return r}n=h(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Be(n),r},Vo=TypeError,zo=function(e,t){this.stopped=e,this.result=t},Go=zo.prototype,$o=function(e,t,r){var n,i,o,s,a,c,u,l,d=r&&r.that,f=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),g=!(!r||!r.IS_ITERATOR),m=!(!r||!r.INTERRUPTED),v=si(t,d),y=function(e){return n&&Fo(n,"normal",e),new zo(!0,e)},b=function(e){return f?(Be(e),m?v(e[0],e[1],y):v(e[0],e[1])):m?v(e,y):v(e)};if(p)n=e.iterator;else if(g)n=e;else{if(!(i=_o(e)))throw Vo(te(e)+" is not iterable");if(void 0!==(l=i)&&(Lr.Array===l||No[Mo]===l)){for(o=0,s=Ct(e);s>o;o++)if((a=b(e[o]))&&z(Go,a))return a;return new zo(!1)}n=function(e,t){var r=arguments.length<2?_o(e):t;if(ne(r))return Be(h(r,e));throw Uo(te(e)+" is not iterable")}(e,i)}for(c=p?e.next:n.next;!(u=h(c,n)).done;){try{a=b(u.value)}catch(e){Fo(n,"throw",e)}if("object"==typeof a&&a&&z(Go,a))return a}return new zo(!1)},qo=Ee("iterator"),Xo=!1;try{var Ho=0,Wo={next:function(){return{done:!!Ho++}},return:function(){Xo=!0}};Wo[qo]=function(){return this},Array.from(Wo,(function(){throw 2}))}catch(e){}var Yo=no.CONSTRUCTOR||!function(e,t){if(!t&&!Xo)return!1;var r=!1;try{var n={};n[qo]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}((function(e){Hi.all(e).then(void 0,(function(){}))}));Gt({target:"Promise",stat:!0,forced:Yo},{all:function(e){var t=this,r=so.f(t),n=r.resolve,i=r.reject,o=$i((function(){var r=ne(t.resolve),o=[],s=0,a=1;$o(e,(function(e){var c=s++,u=!1;a++,h(r,t,e).then((function(e){u||(u=!0,o[c]=e,--a||n(o))}),i)})),--a||n(o)}));return o.error&&i(o.value),r.promise}});var Jo=no.CONSTRUCTOR,Ko=Hi&&Hi.prototype;if(Gt({target:"Promise",proto:!0,forced:Jo,real:!0},{catch:function(e){return this.then(void 0,e)}}),B(Hi)){var Zo=V("Promise").prototype.catch;Ko.catch!==Zo&&pt(Ko,"catch",Zo,{unsafe:!0})}Gt({target:"Promise",stat:!0,forced:Yo},{race:function(e){var t=this,r=so.f(t),n=r.reject,i=$i((function(){var i=ne(t.resolve);$o(e,(function(e){h(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Gt({target:"Promise",stat:!0,forced:no.CONSTRUCTOR},{reject:function(e){var t=so.f(this);return h(t.reject,void 0,e),t.promise}});var Qo=no.CONSTRUCTOR;V("Promise"),Gt({target:"Promise",stat:!0,forced:Qo},{resolve:function(e){return function(e,t){if(Be(e),U(t)&&t.constructor===e)return t;var r=so.f(e);return(0,r.resolve)(t),r.promise}(this,e)}});var es=$e.f,ts=function(e,t,r){r in e||es(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},rs=function(e,t,r){var n,i;return Kr&&B(n=t.constructor)&&n!==r&&U(i=n.prototype)&&i!==r.prototype&&Kr(e,i),e},ns=String,is=function(e){if("Symbol"===Vn(e))throw TypeError("Cannot convert a Symbol value to a string");return ns(e)},os=function(e,t){return void 0===e?arguments.length<2?"":t:is(e)},ss=function(e,t){U(t)&&"cause"in t&&qe(e,"cause",t.cause)},as=Error,cs=E("".replace),us=String(as("zxcasd").stack),ls=/\n\s*at [^:]*:[^\n]*/,ds=ls.test(us),fs=function(e,t){if(ds&&"string"==typeof e&&!as.prepareStackTrace)for(;t--;)e=cs(e,ls,"");return e},ps=!l((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",b(1,7)),7!==e.stack)})),hs=function(e,t,r,n){var i="stackTraceLimit",o=n?2:1,s=e.split("."),a=s[s.length-1],c=V.apply(null,s);if(c){var u=c.prototype;if(he(u,"cause")&&delete u.cause,!r)return c;var l=V("Error"),f=t((function(e,t){var r=os(n?t:e,void 0),i=n?new c(e):new c;return void 0!==r&&qe(i,"message",r),ps&&qe(i,"stack",fs(i.stack,2)),this&&z(u,this)&&rs(i,this,f),arguments.length>o&&ss(i,arguments[o]),i}));f.prototype=u,"Error"!==a?Kr?Kr(f,l):jt(f,l,{name:!0}):d&&i in c&&(ts(f,c,i),ts(f,c,"prepareStackTrace")),jt(f,c);try{u.name!==a&&qe(u,"name",a),u.constructor=f}catch(e){}return f}},gs="WebAssembly",ms=u[gs],vs=7!==Error("e",{cause:7}).cause,ys=function(e,t){var r={};r[e]=hs(e,t,vs),Gt({global:!0,constructor:!0,arity:1,forced:vs},r)},bs=function(e,t){if(ms&&ms[e]){var r={};r[e]=hs(gs+"."+e,t,vs),Gt({target:gs,stat:!0,constructor:!0,arity:1,forced:vs},r)}};ys("Error",(function(e){return function(t){return Ht(e,this,arguments)}})),ys("EvalError",(function(e){return function(t){return Ht(e,this,arguments)}})),ys("RangeError",(function(e){return function(t){return Ht(e,this,arguments)}})),ys("ReferenceError",(function(e){return function(t){return Ht(e,this,arguments)}})),ys("SyntaxError",(function(e){return function(t){return Ht(e,this,arguments)}})),ys("TypeError",(function(e){return function(t){return Ht(e,this,arguments)}})),ys("URIError",(function(e){return function(t){return Ht(e,this,arguments)}})),bs("CompileError",(function(e){return function(t){return Ht(e,this,arguments)}})),bs("LinkError",(function(e){return function(t){return Ht(e,this,arguments)}})),bs("RuntimeError",(function(e){return function(t){return Ht(e,this,arguments)}}));var ws=Ee("match"),Ss=function(e){var t;return U(e)&&(void 0!==(t=e[ws])?!!t:"RegExp"==T(e))},Cs=function(){var e=Be(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Es=RegExp.prototype,xs=function(e){var t=e.flags;return void 0!==t||"flags"in Es||he(e,"flags")||!z(Es,e)?t:h(Cs,e)},Is=u.RegExp,Ts=l((function(){var e=Is("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Ps=Ts||l((function(){return!Is("a","y").sticky})),Rs={BROKEN_CARET:Ts||l((function(){var e=Is("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Ps,UNSUPPORTED_Y:Ts},ks=u.RegExp,Os=l((function(){var e=ks(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),As=u.RegExp,Ds=l((function(){var e=As("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ls=Ot.f,js=dt.enforce,Ms=Ee("match"),Ns=u.RegExp,Bs=Ns.prototype,_s=u.SyntaxError,Us=E(Bs.exec),Fs=E("".charAt),Vs=E("".replace),zs=E("".indexOf),Gs=E("".slice),$s=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,qs=/a/g,Xs=/a/g,Hs=new Ns(qs)!==qs,Ws=Rs.MISSED_STICKY,Ys=Rs.UNSUPPORTED_Y,Js=d&&(!Hs||Ws||Os||Ds||l((function(){return Xs[Ms]=!1,Ns(qs)!=qs||Ns(Xs)==Xs||"/a/i"!=Ns(qs,"i")})));if(Vt("RegExp",Js)){for(var Ks=function(e,t){var r,n,i,o,s,a,c=z(Bs,this),u=Ss(e),l=void 0===t,d=[],f=e;if(!c&&u&&l&&e.constructor===Ks)return e;if((u||z(Bs,e))&&(e=e.source,l&&(t=xs(f))),e=void 0===e?"":is(e),t=void 0===t?"":is(t),f=e,Os&&"dotAll"in qs&&(n=!!t&&zs(t,"s")>-1)&&(t=Vs(t,/s/g,"")),r=t,Ws&&"sticky"in qs&&(i=!!t&&zs(t,"y")>-1)&&Ys&&(t=Vs(t,/y/g,"")),Ds&&(o=function(e){for(var t,r=e.length,n=0,i="",o=[],s={},a=!1,c=!1,u=0,l="";n<=r;n++){if("\\"===(t=Fs(e,n)))t+=Fs(e,++n);else if("]"===t)a=!1;else if(!a)switch(!0){case"["===t:a=!0;break;case"("===t:Us($s,Gs(e,n+1))&&(n+=2,c=!0),i+=t,u++;continue;case">"===t&&c:if(""===l||he(s,l))throw new _s("Invalid capture group name");s[l]=!0,o[o.length]=[l,u],c=!1,l="";continue}c?l+=t:i+=t}return[i,o]}(e),e=o[0],d=o[1]),s=rs(Ns(e,t),c?this:Bs,Ks),(n||i||d.length)&&(a=js(s),n&&(a.dotAll=!0,a.raw=Ks(function(e){for(var t,r=e.length,n=0,i="",o=!1;n<=r;n++)"\\"!==(t=Fs(e,n))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+Fs(e,++n);return i}(e),r)),i&&(a.sticky=!0),d.length&&(a.groups=d)),e!==f)try{qe(s,"source",""===f?"(?:)":f)}catch(e){}return s},Zs=Ls(Ns),Qs=0;Zs.length>Qs;)ts(Ks,Ns,Zs[Qs++]);Bs.constructor=Ks,Ks.prototype=Bs,pt(u,"RegExp",Ks,{constructor:!0})}jn("RegExp");var ea,ta,ra,na=dt.get,ia=RegExp.prototype,oa=TypeError;d&&Os&&(ea=ia,ta="dotAll",(ra={configurable:!0,get:function(){if(this!==ia){if("RegExp"===T(this))return!!na(this).dotAll;throw oa("Incompatible receiver, RegExp required")}}}).get&&ft(ra.get,ta,{getter:!0}),ra.set&&ft(ra.set,ta,{setter:!0}),$e.f(ea,ta,ra));var sa=dt.get,aa=le("native-string-replace",String.prototype.replace),ca=RegExp.prototype.exec,ua=ca,la=E("".charAt),da=E("".indexOf),fa=E("".replace),pa=E("".slice),ha=function(){var e=/a/,t=/b*/g;return h(ca,e,"a"),h(ca,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),ga=Rs.BROKEN_CARET,ma=void 0!==/()??/.exec("")[1];(ha||ma||ga||Os||Ds)&&(ua=function(e){var t,r,n,i,o,s,a,c=this,u=sa(c),l=is(e),d=u.raw;if(d)return d.lastIndex=c.lastIndex,t=h(ua,d,l),c.lastIndex=d.lastIndex,t;var f=u.groups,p=ga&&c.sticky,g=h(Cs,c),m=c.source,v=0,y=l;if(p&&(g=fa(g,"y",""),-1===da(g,"g")&&(g+="g"),y=pa(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==la(l,c.lastIndex-1))&&(m="(?: "+m+")",y=" "+y,v++),r=new RegExp("^(?:"+m+")",g)),ma&&(r=new RegExp("^"+m+"$(?!\\s)",g)),ha&&(n=c.lastIndex),i=h(ca,p?r:c,y),p?i?(i.input=pa(i.input,v),i[0]=pa(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:ha&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),ma&&i&&i.length>1&&h(aa,i[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i&&f)for(i.groups=s=Ir(null),o=0;o<f.length;o++)s[(a=f[o])[0]]=i[a[1]];return i});var va=ua;Gt({target:"RegExp",proto:!0,forced:/./.exec!==va},{exec:va});var ya=xt.includes,ba=l((function(){return!Array(1).includes()}));Gt({target:"Array",proto:!0,forced:ba},{includes:function(e){return ya(this,e,arguments.length>1?arguments[1]:void 0)}}),Dr("includes");var wa,Sa="object"==typeof Reflect?Reflect:null,Ca=Sa&&"function"==typeof Sa.apply?Sa.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};wa=Sa&&"function"==typeof Sa.ownKeys?Sa.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Ea=Number.isNaN||function(e){return e!=e};function xa(){xa.init.call(this)}var Ia=xa,Ta=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}Na(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&Na(e,"error",t,r)}(e,i,{once:!0})}))};xa.EventEmitter=xa,xa.prototype._events=void 0,xa.prototype._eventsCount=0,xa.prototype._maxListeners=void 0;var Pa=10;function Ra(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function ka(e){return void 0===e._maxListeners?xa.defaultMaxListeners:e._maxListeners}function Oa(e,t,r,n){var i,o,s,a;if(Ra(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=ka(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function Aa(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Da(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=Aa.bind(n);return i.listener=r,n.wrapFn=i,i}function La(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):Ma(i,i.length)}function ja(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function Ma(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function Na(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(xa,"defaultMaxListeners",{enumerable:!0,get:function(){return Pa},set:function(e){if("number"!=typeof e||e<0||Ea(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Pa=e}}),xa.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},xa.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Ea(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},xa.prototype.getMaxListeners=function(){return ka(this)},xa.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)Ca(a,this,t);else{var c=a.length,u=Ma(a,c);for(r=0;r<c;++r)Ca(u[r],this,t)}return!0},xa.prototype.addListener=function(e,t){return Oa(this,e,t,!1)},xa.prototype.on=xa.prototype.addListener,xa.prototype.prependListener=function(e,t){return Oa(this,e,t,!0)},xa.prototype.once=function(e,t){return Ra(t),this.on(e,Da(this,e,t)),this},xa.prototype.prependOnceListener=function(e,t){return Ra(t),this.prependListener(e,Da(this,e,t)),this},xa.prototype.removeListener=function(e,t){var r,n,i,o,s;if(Ra(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},xa.prototype.off=xa.prototype.removeListener,xa.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},xa.prototype.listeners=function(e){return La(this,e,!0)},xa.prototype.rawListeners=function(e){return La(this,e,!1)},xa.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):ja.call(e,t)},xa.prototype.listenerCount=ja,xa.prototype.eventNames=function(){return this._eventsCount>0?wa(this._events):[]},Ia.once=Ta;var Ba=Fa,_a=function(e,t){var r=new Ua;return Fa(e,r,t),r},Ua=Ia.EventEmitter;function Fa(e,t,r){Array.isArray(r)||(r=[r]);var n=[];return r.forEach((function(r){var i=function(){var e=[].slice.call(arguments);e.unshift(r),t.emit.apply(t,e)};n.push(i),e.on(r,i)})),function(){r.forEach((function(t,r){e.removeListener(t,n[r])}))}}function Va(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function za(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Va(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Va(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ba.filter=_a;const Ga=An.get("PeerConnectionStats"),$a="stats";class qa extends Ia{constructor(e){super(),this.peer=e,this.stats=null,this.emitInterval=null,this.previousStats=null}init(){Ga.info("Initializing peer connection stats"),this.emitInterval=setInterval((async()=>{const e=await this.peer.getStats();this.parseStats(e),this.emit($a,this.stats)}),1e3)}parseStats(e){this.previousStats=this.stats;const t={audio:{inbounds:[],outbounds:[]},video:{inbounds:[],outbounds:[]},raw:e};for(const r of e.values())switch(r.type){case"outbound-rtp":Xa(r,this.previousStats,t);break;case"inbound-rtp":Ha(r,this.previousStats,t);break;case"candidate-pair":r.nominated&&Wa(r,t)}this.stats=t}stop(){Ga.info("Stopping peer connection stats"),clearInterval(this.emitInterval)}}const Xa=(e,t,r)=>{var n,i;const o=Ya(e),s=Ja(e.codecId,r.raw),a=Ka(e,o);a.totalBytesSent=e.bytesSent,a.id=e.id,a.mid=e.mid;const c=t?null!==(n=null===(i=t[o].outbounds.find((e=>e.id===a.id)))||void 0===i?void 0:i.totalBytesSent)&&void 0!==n?n:0:null;a.bitrate=c?8*(e.bytesSent-c):0,"video"===o&&(a.qualityLimitationReason=e.qualityLimitationReason),r[o].outbounds.push(za(za({},s),a))},Ha=(e,t,r)=>{let n=Ya(e);const i=Ja(e.codecId,r.raw);["audio","video"].includes(n)||(n=e.id.includes("Video")?"video":"audio");const o=Ka(e,n);if(o.totalBytesReceived=e.bytesReceived,o.totalPacketsReceived=e.packetsReceived,o.totalPacketsLost=e.packetsLost,o.jitter=e.jitter,o.id=e.id,o.mid=e.mid,o.trackIdentifier=e.trackIdentifier,o.bitrate=0,o.packetsLostRatioPerSecond=0,o.packetsLostDeltaPerSecond=0,t){const r=t[n].inbounds.find((e=>e.id===o.id));if(r){const t=r.totalBytesReceived;o.bitrate=8*(e.bytesReceived-t),o.packetsLostRatioPerSecond=Za(o,r),o.packetsLostDeltaPerSecond=Qa(o,r)}}r[n].inbounds.push(za(za({},i),o))},Wa=(e,t)=>{t.totalRoundTripTime=e.totalRoundTripTime,t.currentRoundTripTime=e.currentRoundTripTime,t.availableOutgoingBitrate=e.availableOutgoingBitrate,t.candidateType=t.raw.get(e.localCandidateId).candidateType},Ya=e=>e.mediaType||e.kind,Ja=(e,t)=>{var r;const{mimeType:n}=e&&null!==(r=t.get(e))&&void 0!==r?r:{};return{mimeType:n}},Ka=(e,t)=>{const r={};return"video"===t&&(r.framesPerSecond=e.framesPerSecond,r.frameHeight=e.frameHeight,r.frameWidth=e.frameWidth),r.timestamp=e.timestamp,r},Za=(e,t)=>Qa(e,t)/(e.totalPacketsReceived-t.totalPacketsReceived),Qa=(e,t)=>e.totalPacketsLost-t.totalPacketsLost;var ec=Ee("species"),tc=RegExp.prototype,rc=E("".charAt),nc=E("".charCodeAt),ic=E("".slice),oc=function(e){return function(t,r){var n,i,o=is(D(t)),s=vt(r),a=o.length;return s<0||s>=a?e?"":void 0:(n=nc(o,s))<55296||n>56319||s+1===a||(i=nc(o,s+1))<56320||i>57343?e?rc(o,s):n:e?ic(o,s,s+2):i-56320+(n-55296<<10)+65536}},sc={codeAt:oc(!1),charAt:oc(!0)}.charAt,ac=function(e,t,r){return t+(r?sc(e,t).length:1)},cc=Math.floor,uc=E("".charAt),lc=E("".replace),dc=E("".slice),fc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,pc=/\$([$&'`]|\d{1,2})/g,hc=function(e,t,r,n,i,o){var s=r+e.length,a=n.length,c=pc;return void 0!==i&&(i=fe(i),c=fc),lc(o,c,(function(o,c){var u;switch(uc(c,0)){case"$":return"$";case"&":return e;case"`":return dc(t,0,r);case"'":return dc(t,s);case"<":u=i[dc(c,1,-1)];break;default:var l=+c;if(0===l)return o;if(l>a){var d=cc(l/10);return 0===d?o:d<=a?void 0===n[d-1]?uc(c,1):n[d-1]+uc(c,1):o}u=n[l-1]}return void 0===u?"":u}))},gc=TypeError,mc=function(e,t){var r=e.exec;if(B(r)){var n=h(r,e,t);return null!==n&&Be(n),n}if("RegExp"===T(e))return h(va,e,t);throw gc("RegExp#exec called on incompatible receiver")},vc=Ee("replace"),yc=Math.max,bc=Math.min,wc=E([].concat),Sc=E([].push),Cc=E("".indexOf),Ec=E("".slice),xc="$0"==="a".replace(/./,"$0"),Ic=!!/./[vc]&&""===/./[vc]("a","$0");!function(e,t,r,n){var i=Ee(e),o=!l((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=o&&!l((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[ec]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!o||!s||r){var a=ii(/./[i]),c=t(i,""[e],(function(e,t,r,n,i){var s=ii(e),c=t.exec;return c===va||c===tc.exec?o&&!i?{done:!0,value:a(t,r,n)}:{done:!0,value:s(r,t,n)}:{done:!1}}));pt(String.prototype,e,c[0]),pt(tc,i,c[1])}n&&qe(tc[i],"sham",!0)}("replace",(function(e,t,r){var n=Ic?"$":"$0";return[function(e,r){var n=D(this),i=O(e)?void 0:ie(e,vc);return i?h(i,e,n,r):h(t,is(n),e,r)},function(e,i){var o=Be(this),s=is(e);if("string"==typeof i&&-1===Cc(i,n)&&-1===Cc(i,"$<")){var a=r(t,o,s,i);if(a.done)return a.value}var c=B(i);c||(i=is(i));var u=o.global;if(u){var l=o.unicode;o.lastIndex=0}for(var d=[];;){var f=mc(o,s);if(null===f)break;if(Sc(d,f),!u)break;""===is(f[0])&&(o.lastIndex=ac(s,St(o.lastIndex),l))}for(var p,h="",g=0,m=0;m<d.length;m++){for(var v=is((f=d[m])[0]),y=yc(bc(vt(f.index),s.length),0),b=[],w=1;w<f.length;w++)Sc(b,void 0===(p=f[w])?p:String(p));var S=f.groups;if(c){var C=wc([v],b,y,s);void 0!==S&&Sc(C,S);var E=is(Ht(i,void 0,C))}else E=hc(v,s,y,b,S,i);y>=g&&(h+=Ec(s,g,y)+E,g=y+v.length)}return h+Ec(s,g)}]}),!!l((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!xc||Ic);var Tc,Pc="\t\n\v\f\r                 \u2028\u2029\ufeff",Rc=E("".replace),kc="["+Pc+"]",Oc=RegExp("^"+kc+kc+"*"),Ac=RegExp(kc+kc+"*$"),Dc=function(e){return function(t){var r=is(D(t));return 1&e&&(r=Rc(r,Oc,"")),2&e&&(r=Rc(r,Ac,"")),r}},Lc={start:Dc(1),end:Dc(2),trim:Dc(3)},jc=Ye.PROPER,Mc=Lc.trim;Gt({target:"String",proto:!0,forced:(Tc="trim",l((function(){return!!Pc[Tc]()||"​…᠎"!=="​…᠎"[Tc]()||jc&&Pc[Tc].name!==Tc})))},{trim:function(){return Mc(this)}});var Nc=Ee("matchAll"),Bc="RegExp String",_c=Bc+" Iterator",Uc=dt.set,Fc=dt.getterFor(_c),Vc=RegExp.prototype,zc=TypeError,Gc=ii("".indexOf),$c=ii("".matchAll),qc=!!$c&&!l((function(){$c("a",/./)})),Xc=Wr((function(e,t,r,n){Uc(this,{type:_c,regexp:e,string:t,global:r,unicode:n,done:!1})}),Bc,(function(){var e=Fc(this);if(e.done)return cn(void 0,!0);var t=e.regexp,r=e.string,n=mc(t,r);return null===n?(e.done=!0,cn(void 0,!0)):e.global?(""===is(n[0])&&(t.lastIndex=ac(r,St(t.lastIndex),e.unicode)),cn(n,!1)):(e.done=!0,cn(n,!1))})),Hc=function(e){var t,r,n,i=Be(this),o=is(e),s=ni(i,RegExp),a=is(xs(i));return t=new s(s===RegExp?i.source:i,a),r=!!~Gc(a,"g"),n=!!~Gc(a,"u"),t.lastIndex=St(i.lastIndex),new Xc(t,o,r,n)};Gt({ta